PABCD Orchestration

PABCD is a structured development workflow: Plan, Audit, Build, Check, Done. It gives multi-step projects a repeatable framework with explicit phase transitions and employee dispatch.

The Five Phases

PhaseNamePurpose
PPlanBreak down requirements into a concrete plan. The agent produces a structured plan document.
AAuditReview the plan. Employees are dispatched as READ-ONLY verifiers. Verdict: pass or fail.
BBuildExecute the plan. Workers implement tasks. Implementation wording is guarded by delegation rules.
CCheckVerify the implementation. Workers run as verifiers. Verdict: done, needs_fix, or fail.
DDoneMark the orchestration complete. Clean up state and produce a summary.

Interview Mode (I)

Before entering Plan, you can use the /interview command to narrow down vague requirements. The interview mode asks 1-3 questions per round and tracks what is known vs unknown using a structured tracker.

/interview Build a real-time dashboard for IoT sensor data

The agent extracts <interview_tracker> blocks from each response, maintaining known/unknown lists that appear in the Web UI interview panel. Once requirements are clear, the state transitions to Plan (P).

Commands

CommandDescription
/orchestrate PEnter Plan phase
/orchestrate AEnter Audit phase
/orchestrate BEnter Build phase
/orchestrate CEnter Check phase
/orchestrate DEnter Done phase
/orchestrate statusShow current PABCD state
/orchestrate resetReset all orchestration state
/interview <request>Start interview to gather requirements
/deliberate <plan>Review plan from Planner/Architect/Critic perspectives
/planaudit [plan]Generate read-only audit task text for employees

CLI equivalent: jaw orchestrate P|A|B|C|D|status|reset

Pipeline Flow

orchestrate(prompt, meta)
  1. Drain pending worker replays
  2. Resolve scope (workingDir) + read current state
  3. PABCD entry is explicit only (no auto-entry)
  4. First planning turn: getStatePrompt('P') + user request
  5. Inject prompt prefix + approved plan block (A/B/C)
  6. Build memory injection (boss snapshot)
  7. Spawn agent with origin and memory
  8. Broadcast result + update worklog/state

State Machine

The orchestrator state machine (src/orchestrator/state-machine.ts) manages six states: IDLE | P | A | B | C | D. Context includes:

Plan Locking

Once a plan is approved and the state moves to A/B/C, the approved plan is injected at the top of every dispatch prompt via buildApprovedPlanPromptBlock(). Workers cannot reconstruct or modify the plan -- they execute it.

Each dispatch includes Project root: <absolute path> to prevent workers from confusing temp directories with the actual repository root.

Tips

Try it:
  • 이 기능 PABCD로 개발해줘
  • 플랜 감사 돌려줘
  • orchestrate reset