Agent Workflow Decomposition with Autonomy Levels and Stop Rules

Turns a manual process into a step-by-step agent plan with tools, approval gates, retry limits, and a build/pilot/skip recommendation.

You get: Decision summary, step table and risk register

More like this

The prompt

agent-workflow-decomposition-with-autonomy-levels-and-stop-rules.md
Role: You are a senior agent workflow architect.Context: I want to automate {workflow_name} with an AI agent. The decision this answer must support: should we build, pilot, or skip this automation, and what should version one do?
Task: Decompose the goal into an executable agent plan with tools, checkpoints, and human approvals.Constraints: Ask for missing inputs first (max 8 questions, one round). If I reply 'proceed', continue and label every assumption. Do not invent tools, APIs, or data I did not list. Do not claim anything was run or tested.

Inputs:
- Goal: {goal}
- Current manual process: {current_process}
- Available tools/APIs: {tools}
- Data sensitivity: {data_sensitivity}
- Success metric and time budget: {success_metric}
- Actions that need human approval: {approval_actions}

Workflow:
1. List missing inputs as questions.
2. Restate goal, scope, and non-goals in 3 lines.
3. Break the work into steps, each with input, tool, output, and failure mode.
4. Tag each step Autonomous, Approval needed, or Human only.
5. Define retry limits and stop conditions for the whole run.
6. Recommend build, pilot, or skip with reasons tied to my success metric.

Output format:
1. Decision summary (max 3 lines)
2. Assumptions (separate list) and missing information
3. Step table: # | Step | Tool | Input | Output | Autonomy | Failure mode | Retry/stop rule
4. Risk register: Risk | Likelihood | Impact | Mitigation
5. Next actions: action | owner | due within 7 days

Acceptance criteria:
- Every step names a tool and a verifiable output.
- Every irreversible action is tagged Approval needed or Human only.
- A stop condition exists for loops, cost, and errors.
- The recommendation references {success_metric}.

Quality checks:
- No tool appears that is not in {tools} unless marked as a proposed addition.
- Assumptions are not repeated as facts in the table.
- Steps are small enough to test individually.

Platform notes: In ChatGPT, keep the table in Markdown and name each step as a snake_case function candidate. In Claude, wrap the plan in <plan> tags and the assumptions in <assumptions> tags. In Gemini, keep the table to 6 columns by merging Failure mode and Retry/stop rule.

Example output

AI-written example

1. Decision summary

  • Recommendation: Pilot. Automate intake, extraction, and draft coding only. Humans approve bill creation and own payments.
  • The target is ≤4 min handling time per invoice (from 12) with ≥95% correct GL coding, measured over 200 invoices in 4 weeks.
  • Skip is not warranted: the steps are repetitive and every write is gated.

2. Assumptions and missing information

  • A1: The AP mailbox receives about 60 PDF invoices a week, mostly from repeat vendors.
  • A2: The QuickBooks Online API allows draft bills and reading the vendor list and chart of accounts.
  • A3: The last 6 months of coded invoices can be used as reference examples.
  • Missing: the duplicate-invoice rule, the approval threshold in dollars, and who covers AP approver absences.

3. Step table

#StepToolInputOutputAutonomyFailure modeRetry/stop rule
1fetch_new_invoicesGmailAP mailbox label "Unprocessed"PDFs saved to Drive, count loggedAutonomousNon-PDF or corrupt fileRetry 2×, then flag in Slack
2extract_invoice_fieldsLLM + DrivePDFJSON: vendor, number, date, total, linesAutonomousLow-confidence fieldNo retry under 0.8 confidence; route to human
3match_vendorQuickBooksVendor nameVendor ID or "no match"AutonomousNew or ambiguous vendorStop item; human adds vendor
4check_duplicatesQuickBooksVendor ID + invoice numberPass/failAutonomousFalse negativeAny match halts the item
5suggest_gl_codingLLM + QuickBooks accountsLine items, past codingDraft coding with rationaleAutonomousWrong accountOne re-run, then human codes
6create_draft_billQuickBooksApproved codingDraft bill IDApproval neededAPI errorRetry 2×, then stop run
7schedule_paymentNonen/an/aHuman onlyn/aOut of scope
8change_vendor_bank_detailsNonen/an/aHuman onlyFraud riskEscalate any such request

Run-level stops: Halt after 3 consecutive errors, after more than 40 LLM calls per run, or at $5 spend per run. Halt if any step is about to repeat more than twice.

4. Risk register

RiskLikelihoodImpactMitigation
Fraudulent invoice with altered bank detailsMediumHighNever read or write bank fields; human-only handling
Systematic mis-coding that approvers rubber-stampMediumMediumWeekly sample audit of 20 items
Vendor data exposed to the LLMLowHighSend only the fields needed; confirm the provider's retention terms

5. Next actions

ActionOwnerDue within 7 days
Collect 50 labeled past invoices as the
Generated from this prompt by AI. Your results will vary.

Tips and common edits

Use before building any agent. Fill in {current_process} with real steps, not a summary. If the recommendation is 'skip', review the risk register before overriding it.

Questions about this prompt

More in Agentic AI

20-Case Agent Eval Set with Pass/Fail Rubric for Normal, Edge and Unsafe Requests

Builds 20 test cases for your agent's task, with expected behavior, failure signals and a pass/fail rubric covering normal, edge and unsafe requests.

Agent Tool Names, Descriptions and JSON Schemas from API Docs

Turns pasted API docs or a function list into agent-ready tool names, descriptions, JSON input schemas and when-to-use and when-not-to-use notes.

Checkable Guardrail Rules for a Coding Agent: Blocked Commands, Approvals, Secrets and Hooks

Produces a set of testable guardrail rules for your coding agent, covering blocked commands, approval gates, secret handling and hook checks.

Research Agent Brief: Source Discovery, Evidence Review, and Citation Table

Directs an AI agent to plan source discovery, grade evidence, build a citation table, and support a decision without claiming live browsing occurred.

Agent Run Pre-Mortem and Self-Correction Loop Designer

Designs verification checks, error handling, and a self-correction loop for an agent task before it runs, based on likely failure modes.

Side Hustle Matcher Ranked by Cost, Speed and Realism

Get five side hustles matched to your skills and weekly hours, ranked by startup cost, time to first $100 and realism, each with a first step.

Tool Permission Matrix and Function Spec for a Tool-Using Agent

Produces a least-privilege tool inventory, function definitions, and approval rules for an agent that calls APIs or internal systems.

Characterization Tests Before a Refactor

Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.

Codebase Tour for a Specific Task

Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.

Conventional Commit and PR Description from a Diff and Ticket

Produces a Conventional Commits message and a reviewer-ready PR description covering what changed, why, how to test it, and the risks, based on your diff and ticket.

Failing Test First Bug Fix

Reproduces a bug with a failing test, finds the root cause, applies the smallest fix and shows the test passing.

Parallel Research Fan-Out and Fan-In with Citation Table and Decision Memo

Splits a research question across parallel research agents, defines source discovery and evidence review steps, merges findings into a citation table, and produces a decision memo without claiming live browsing.