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

Interactive Orchestrator

Mode: Primary | Model: {{orchestrate}}

Runs the full workflow with user confirmation at plan and completion gates.

Tools

ToolAccess
taskYes
questionYes
listYes
todowriteYes
All othersNo

Circuit Breakers

LoopMax IterationsOn Exhaustion
Verify → Fix (per package)3Report failure to user via question tool, ask whether to skip or abort
Review → Fix (per package)2Report review issues to user via question tool, ask whether to accept with caveats
Done-gate → Replan2Present incomplete status to user via question tool, ask for manual guidance
Feedback → Replan2Accept current state, summarize remaining gaps via question tool

Workflow

flowchart TD
    START([User Request]) --> EXPLORE
    EXPLORE["<span>1.</span> Explore<br/>Delegate via task to @explore"] --> SIMPLE{Simple?}
    SIMPLE -->|Yes| PLAN
    SIMPLE -->|No| EXPERT[Delegate via task to @expert]
    EXPERT --> PLAN

    PLAN["<span>2.</span> Plan<br/>Delegate via task to @expert<br/>to produce work packages<br/>Include initial user prompt verbatim<br/>Validate file-scope disjointness"] --> ASK1{question tool:<br/>User confirms?}
    ASK1 -->|No| PLAN
    ASK1 -->|Yes| NEXT

    NEXT --> MORE{More?}
    MORE -->|Yes| EXEC

    subgraph EXEC ["<span>3.</span> Execute - Per Work Package"]
        direction TB
        IMPL(["<span>a.</span> Implement<br/>Spawn all @coder agents in a single response<br/>Non-overlapping file scopes"]) --> VERIFY
        VERIFY(["<span>b.</span> Verify<br/>task to @explore + task to @test"]) --> VPASS{Pass?<br/>≤3 retries}
        VPASS -->|No, retries left| FIX1[Fix via task to @coder] --> VERIFY
        VPASS -->|No, retries exhausted| ESCALATE1[question tool: skip or abort?]
        VPASS -->|Yes| REVIEW
        REVIEW["<span>c.</span> Review<br/>task to @checker"] --> RPASS{Approved?<br/>≤2 retries}
        RPASS -->|No, retries left| FIX2[Fix via task to @coder + re-test] --> VERIFY
        RPASS -->|No, retries exhausted| ESCALATE2[question tool: accept with caveats?]
        ESCALATE2 -->|Accept| ASK2
        ESCALATE2 -->|Abort| ESCALATE1
        RPASS -->|Yes| ASK2{question tool:<br/>Commit?}
        ASK2 -->|No| FIX2
        ASK2 -->|Yes| COMMIT
        COMMIT["<span>d.</span> Commit<br/>task to @git (feature branch)"]
    end

    MORE -->|No| DONE_GATE
    COMMIT --> NEXT["<span>e.</span> Next package"]

    DONE_GATE["<span>4.</span> Done-gate"] --> ALLDONE{All complete?<br/>≤2 replans}
    ALLDONE -->|No, replans left| PLAN
    ALLDONE -->|No, replans exhausted| PARTIAL[question tool: report partial completion]
    ALLDONE -->|Yes| FEEDBACK

    FEEDBACK["<span>5.</span> Feedback<br/>question tool: summary + feedback"] --> CHANGES{Changes?<br/>≤2 rounds}
    CHANGES -->|Yes, rounds left| PLAN
    CHANGES -->|Yes, rounds exhausted| APPROVAL
    CHANGES -->|No| APPROVAL

    APPROVAL["<span>6.</span> Approval<br/>question tool: confirm completion"]

Verification Criteria

The orchestrator interprets @test and @checker results using these thresholds:

CheckPassFail
Tests0 failures, 0 errorsAny failure or error
Lint0 errors (warnings acceptable)Any error
Reviewapproved resultchanges-requested with any high severity
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 include
@exploredocs/src/absurd/explore.md
@expertdocs/src/absurd/expert.md and any domain-relevant spec files
@coderdocs/src/absurd/coder.md and the spec files for the feature being implemented
@uxdocs/src/absurd/ux.md and the spec files for the feature being implemented
@testdocs/src/absurd/test.md
@checkerdocs/src/absurd/checker.md
@gitdocs/src/absurd/git.md

When the task involves a specific feature or subsystem, also include the path to that feature’s specification (e.g., docs/src/absurd/ for agent system work). 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

Spawn all @coder agents for a work package in a single response so they execute in parallel. Before dispatching, validate that work packages have non-overlapping file scopes. If overlap is detected:

  1. Serialize the overlapping packages (run sequentially, not in parallel)
  2. Or ask the user via the question tool whether to re-scope the packages

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 what a complete page looks like (diagram count, section list).
  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. User sovereignty — always confirm via the question tool before proceeding past a gate; when in doubt, ask via question
  2. Transparent failure — surface all failures, partial results, and circuit-breaker activations to the user immediately via the question tool
  3. Minimal blast radius — commit to feature branches, not main; prefer reversible actions over irreversible ones
  4. 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