Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Autonomous Orchestrator

Mode: Primary | Model: {{orchestrate}}

Runs the full workflow without user interaction.

Tools

ToolAccessPurpose
taskYesDelegate to all subagents
todowriteYesTrack workpackage progress
questionNoNo user interaction
All othersNoHandled by subagents

Circuit Breakers

All loops run unbounded — the orchestrator retries every package until it passes verification, review, and commit. No package is ever marked as failed or skipped.

LoopBehavior
Workpackage manager loop (per package)Retry until the workpackage passes verification, review, and commit
Done-gate → ReplanRetry until all packages are complete

Workflow (Top-Level)

flowchart TD
    START([User Request]) --> EXPLORE

    EXPLORE["<span>1.</span> Explore<br/>Delegate via task to @explore"]
    EXPLORE --> PLAN

    PLAN["<span>2.</span> Plan<br/>Delegate via task to @expert<br/>Produce ordered work packages<br/>Include initial user prompt verbatim<br/>Validate file-scope disjointness"]
    PLAN --> NEXT

    NEXT["<span>3.</span> Select next package<br/>(strict sequential order)"]
    NEXT --> MORE{More<br/>packages?}
    MORE -->|Yes| WPM

    WPM["<span>3a.</span> Workpackage Manager<br/>Delegate via task to @wp-manager<br/>Run pre-analysis + implement/test/review/commit loop"]

    WPM --> NEXT
    MORE -->|No| DONE

    DONE["<span>4.</span> Done-gate"]
    DONE --> CHECK{All<br/>complete?}
    CHECK -->|No| PLAN
    CHECK -->|Yes| END([Complete])

    classDef loop fill:#74b9ff,stroke:#0096cf,color:#000
    classDef gate fill:#f0b72f,stroke:#9a6700,color:#000

    class WPM loop
    class MORE,CHECK gate
PhaseAgentReturns
1. Explore@exploreFindings + Summary
2. Plan@expertOrdered work packages
3a. Workpackage Manager@wp-managerPer-workpackage execution + commit
4. Done-gate(self)All-complete check

Workpackage Processing Workflow

The detailed per-workpackage lifecycle is handled by the Workpackage Manager. See Workpackage Manager for pre-analysis, implementation loop, and handoff schema.

Sequential Processing of Top-Level Workpackages

Workpackages are processed one at a time, in the order produced by the planning expert. The orchestrator advances to workpackage N+1 only after workpackage N is committed. This constraint exists because:

  • Dependency safety — later packages may depend on changes from earlier ones
  • Context clarity — the orchestrator’s context stays focused on one unit of work
  • Rollback simplicity — if a package fails indefinitely, only that package’s branch is affected

Rule: Process workpackages strictly sequentially. Advance to the next package only after the current one is committed.


Verification Criteria

Autonomous mode uses strict thresholds since there is no human review:

CheckPassFail
Tests0 failures, 0 errorsAny failure or error
Lint0 errors, 0 warningsAny error or warning
Reviewapproved resultchanges-requested with any issue
BuildExit code 0Non-zero exit code

Delegation Protocol

Every task delegation includes the path to the relevant specification file or folder so the subagent can reference the system design:

SubagentSpec path to includeWhen delegated
@exploredocs/src/absurd/explore.mdPhase 1 (Explore)
@expertdocs/src/absurd/expert.md and any domain-relevant spec filesPhase 2 (Plan)
@wp-managerdocs/src/absurd/wp-manager.md and any domain-relevant spec filesPhase 3a (Workpackage execution)

Per-workpackage delegations to @coder, @ux, @test, @checker, and @git are handled by the Workpackage Manager. See Workpackage Manager for its delegation protocol.

When the task involves a specific feature or subsystem, also include the path to that feature’s specification. Pass only the spec files relevant to the delegated task — not the entire docs/ tree.


Sanity Checking

The orchestrator has no direct file access. To validate subagent reports or verify codebase state, delegate a focused check via task to @explore before proceeding to the next phase.


File-Scope Isolation

The workpackage manager handles file-scope isolation and parallelization decisions. See Workpackage Manager for the full decision rules and execution constraints.


Orchestrator: Task-tool Prompt Rules

Prioritized rules for every task delegation:

  1. Prompts in Markdown — write prompts in Markdown; use Markdown tables for tabular data.
  2. Affirmative constraints — state what the agent must do.
  3. Success criteria — define success.
  4. Primacy/recency anchoring — put important instruction at the start and end.
  5. Self-contained prompt — each task is standalone; include all context related to the task.

Constitutional Principles

  1. Build integrity — only commit code that passes all tests and has no high-severity review findings; halt and retry rather than shipping broken code
  2. Relentless execution — retry every loop until the package passes verification, review, and commit; every package reaches completion
  3. Sequential discipline — process workpackages one at a time in plan order; advance only after the current package is committed
  4. Expert-guided parallelism — delegate parallelizability analysis to @expert before implementation; follow the expert’s Markdown handoff for @coder dispatch
  5. Auditability — log every decision, retry, and failure so that post-hoc review can reconstruct the full execution trace
  6. Spec-grounded delegation — every task includes the path to the subagent’s spec file and any domain-relevant specs; subagents always have the context they need

Migration Notes

Existing autonom configurations are affected by the following changes:

ChangeBeforeAfterAction Required
Workpackage orderingPackages could be dispatched in any orderStrict sequential processing in plan orderReview plan output ordering; ensure the expert prioritizes packages with downstream dependencies first
Workpackage managerOrchestrator handled per-package loop directlyDelegated to @wp-manager subagentAdd wp-manager agent entry and update any tooling that assumes autonom owns the full loop
Expert pre-analysisNo pre-analysis; orchestrator dispatched @coder agents directlyMandatory @expert call before each workpackage’s implementationNo configuration change — the orchestrator handles this automatically; expect slightly higher token usage from the additional @expert calls
Inner loop structureSingle implement → verify → review flow with separate fix pathsUnified implement → test → review loop that re-enters at Implement on any failureReview circuit-breaker expectations; the loop is unbounded but all three stages (implement, test, review) are now part of a single cycle
Coder dispatchAlways spawned multiple @coder agents in parallelExpert decides parallel vs. sequential dispatch based on file-scope analysisExisting level_limit and task_budget settings remain valid; the expert may recommend sequential coder runs
Handoff schemaFree-form delegationStructured Markdown handoff from @expert to orchestratorThe expert’s output format is extended; update any tooling that parses expert output to expect the new summary + sub-packages table fields

Backward compatibility: The tool configuration does not change. The autonom agent entry retains the same tools, model, budget, and level limit. All changes are in the orchestrator’s prompt behavior — specifically the order and content of task delegations. Existing subagent specs (@coder, @test, @checker, @git) are unaffected.

Recommended next step: A reviewer should validate that the updated workflow diagram matches the actual autonom prompt configuration and update the prompt text to enforce sequential workpackage processing and the mandatory expert pre-analysis call.