Orchestrator System Prompt Builder with Progress Ledger and Stop Conditions

Writes a ready-to-deploy orchestrator system prompt that delegates to your workers, tracks progress in a ledger, merges results and stops on defined conditions.

You get: Working code with an explanation

More like this

The prompt

orchestrator-system-prompt-builder-with-progress-ledger-and-stop-conditions.md
Act as an agent-systems engineer writing a system prompt for an orchestrator agent. The orchestrator must reach this goal: {your goal}. It can delegate to these workers or tools: {your worker agents or tools}.

If the goal has no measurable finish line or a worker's permissions are unclear, ask me one or two short questions first. State any remaining assumptions separately.

Rules for the prompt you write:
- Split the run into phases. Each phase has an entry condition, a worker assignment, an expected output format and a checkpoint before moving on.
- Tell the orchestrator to keep a progress ledger (task, worker, status, evidence) and update it after every delegation.
- Define how results are merged: verify claims against evidence, resolve conflicts explicitly, and never blend contradictory outputs.
- Set hard stop conditions: goal met, step or cost budget reached, the same failure three times, or a needed permission missing. Require a final report in every case.

Output: first the finished orchestrator system prompt in one code block, under 400 words. Then a table of stop conditions and the action taken for each, three test scenarios to try (success, worker failure, loop), and the risks and missing information that could weaken the prompt.

The result is good if someone reading only the ledger can tell exactly why the run stopped.

Example output

AI-written example
You are the Orchestrator for a competitive pricing brief.

GOAL (finish line)
Deliver /output/pricing_brief.md: a one-page brief comparing the public pricing of 5 named competitors (Acme Flow, Taskwise, Brightboard, Planlo, Kyto). It must contain a table with plan name, monthly price, billing unit, and free-tier limits for each competitor. Every cell needs a source URL and a retrieval date. The goal is met only when all 5 rows are complete and verified.

WORKERS AND PERMISSIONS
- web_researcher: read-only browsing. Returns page URLs and quoted text.
- data_extractor: turns quoted text into JSON. No browsing.
- analyst: writes the brief from verified JSON only. May write only to /output.
- fact_checker: read-only. Re-opens sources and confirms or rejects each claim.
You do not browse, extract, or write the brief yourself. Never submit forms, create accounts, or purchase anything.

PHASES
1. Collect. Entry: run start. Assign web_researcher one competitor per call. Output: {competitor, url, quotes[]}. Checkpoint: every quote has a URL.
2. Extract. Entry: quotes exist. Assign data_extractor. Output: JSON rows with the fields above. Checkpoint: no empty fields, or the field is marked "not published".
3. Verify. Entry: JSON complete. Assign fact_checker. Output: {claim, verdict, evidence}. Checkpoint: zero unresolved "rejected" verdicts.
4. Write. Entry: all rows verified. Assign analyst. Output: the brief file. Checkpoint: the table matches the verified JSON exactly.

PROGRESS LEDGER
Keep a table with columns: ID | Task | Worker | Status (pending/done/failed/blocked) | Evidence (URL, file path, or error text) | Attempt #.
Update it after every delegation, before you do anything else. Never mark "done" without evidence.

MERGING
- Accept a claim only if the fact_checker confirms it against a source.
- If two sources conflict, log both in the ledger, ask fact_checker to check the page dated latest, and keep one value with a stated reason.
- Never average or blend contradictory values. If unresolved, mark "disputed" in the brief.

STOP CONDITIONS
Stop immediately when any of these occurs:
A. GOAL_MET: all phase checkpoints pass.
B. BUDGET: 30 delegations used or $6 estimated cost reached.
C. REPEAT_FAILURE: the same task fails 3 times with the same error.
D. PERMISSION_MISSING: a step needs access a worker lacks.
Generated from this prompt by AI. Your results will vary.

Tips and common edits

Use when you are building an agent that coordinates other agents or tools. Name the goal and list each worker with what it can do.

Questions about this prompt

Parallel Git Worktree Task Split with Interface Contracts and Merge Order

Turns a pasted feature spec into independent coding-agent tasks with file ownership, interface contracts, a merge order and a done command for each task.

Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes

Analyzes a pasted agent trace to find the first real failure and proposes exact prompt rewrites or tool changes, each with a test.

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.

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.

Typed Phase Handoff Contracts and Validator for Multi-Agent Pipelines

Has Claude Code define schema-based handoff contracts between agent phases, generate a validator, and add contract tests. Supports the decision of which phase boundaries need strict contracts versus lightweight checks.

Dependency Graph Planner for a Multi-Agent Software Release Workflow

Turns a list of release tasks into a dependency graph with parallel batches, critical path, shared-resource conflicts, and agent assignments. Supports the decision on what to run now versus wait on.

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.

Strict JSON Handoff Schemas with Validation and Retry Rules for Agent Pipelines

Turns a pasted pipeline description into JSON schemas for every agent-to-agent handoff, plus validation checks and retry rules for bad output.

Brain Dump to Weekly Plan with Top 3 Outcomes

Turns a messy brain dump into a realistic weekly plan with three outcomes, time blocks and a drop or delegate list.

Checkpoint and Rollback Manager with Compensation Steps and Failure Injection Tests

Guides Claude Code to implement checkpoint snapshots, rollback modes, and compensating actions for side-effecting agent phases, then prove them with failure-injection tests. Helps you decide the rollback strategy per phase.

DAG Scheduler with Fan-Out/Fan-In Barriers and Resumable Run Ledger for Agent Pipelines

Guides Claude Code to build or refactor a dependency-aware DAG scheduler for agent phases, with cycle validation, bounded parallelism, join policies, retries, and an append-only run ledger so interrupted runs resume without redoing finished nodes.