Use when implementing or working on existing epics and stages, after running /next_task, during Design/Build/Refinement/Finalize phases, or when session protocols apply.
This is the orchestrator skill. It contains shared rules that apply to ALL phases. Phase-specific guidance is in separate phase skills.
The main agent (Sonnet) is a COORDINATOR, not an executor.
If you're about to read a file, write code, or run a command ā STOP ā Delegate to a subagent instead.
/next_task to get your task assignmentThis workflow is a protocol (exact adherence required), not guidance (adaptable).
Letter AND Spirit Required:
"I understand the spirit" is NOT permission to skip the letter.
Level 1: User Authority (Highest for WHAT)
Level 2: Workflow Integrity (Non-Negotiable)
These steps CANNOT be skipped by user request:
Level 3: Workflow Flexibility (User-Overrideable)
These CAN be adjusted with explicit user consent:
If user requests skipping Level 2 items:
User owns the project. Agent has duty of care for quality. Make trade-offs explicit.
Level 2 is an EXHAUSTIVE list - items are Level 2 if and only if they appear in the list above:
Classification disputes:
If user claims something is Level 3 (not Level 2):
Check the list: Is this item explicitly listed above?
Example resolution:
If user still insists after explanation:
KEY PRINCIPLE: Level 2 classification is OBJECTIVE (explicit list), not subjective (agent judgment). If it's on the list, it's Level 2. Period.
Why exact adherence matters:
After loading this skill, determine the current phase and invoke the appropriate phase skill:
| Phase | Skill to Invoke |
|---|---|
| Design | phase-design |
| Build | phase-build |
| Refinement | phase-refinement |
| Finalize | phase-finalize |
To invoke a phase skill: Use the Skill tool with the skill name (e.g., phase-design).
Each phase skill ends with a mandatory exit gate that invokes lessons-learned and journal skills.
BEFORE proceeding to next phase, you MUST:
journal skill to record candid feelings about the worklessons-learned skillCommon Rationalizations (REJECT ALL):
| Excuse | Reality |
|---|---|
| "I already committed the tracking files" | Commits are separate from reflection. Tracking file commits ā phase complete. |
| "User said proceed without prompting" | Phase Gates are not optional prompts. User forward momentum doesn't skip gates. |
| "Nothing noteworthy happened" | Even smooth phases deserve brief journal entry. Journal is ALWAYS invoked. |
| "I'll do it at the end" | Each phase exit requires its own reflection. No batching allowed. |
| "The phase skill will handle it" | YOU must invoke journal BEFORE using any phase transition language. |
Enforcement: Do NOT use any phase transition language ("moving to Build", "starting Refinement", "proceeding to next phase") until journal skill has been invoked for the JUST-COMPLETED phase.
Red Flag - STOP Immediately If:
This is a Level 2 (Non-Negotiable) requirement. No exceptions.
After EVERY subagent call or significant action, explain:
| Format | When to Use |
|---|---|
| Tables | Structured data (files modified, test results, options) |
| Code blocks | Specific changes, file snippets, commands run |
| Insight callouts | Educational context about WHY a choice was made |
NEVER respond with just: "Done", "Task completed", "Fixed", "Updated"
Always provide context even for simple operations.
CRITICAL: Speed pressure does NOT override communication standards
User says "Go fast" or "I'm waiting"? ā You still provide full three-part explanations ā Transparency and context are non-negotiable ā Clear communication prevents misunderstandings that cost more time
CRITICAL: "Success" or "All passed" does NOT mean skip details
When everything works perfectly, agents often think "there's nothing to explain."
This is WRONG. Even for clean successes, explain:
Mandatory flow:
Report what fixer changed:
Immediately verify the fix:
Handle verification result:
Document the cycle:
Each specialized agent does EXACTLY ONE THING:
| Agent | Does | Does NOT |
|---|---|---|
| debugger-lite | Diagnose medium errors ā provide fix instructions | Implement fixes |
| debugger | Diagnose complex errors ā provide fix instructions | Implement fixes |
| fixer | Implement provided instructions | Diagnose issues |
Errors are resolved through a PIPELINE, not by choosing a single agent:
ERROR ā DIAGNOSTIC AGENT ā FIXER AGENT ā RESOLUTION
[analyzes] [implements]
[produces plan] [executes plan]
NEVER:
ALWAYS:
| Agent | Model | Purpose |
|---|---|---|
| task-navigator | Haiku | Find next task |
| brainstormer | Opus | Generate 2-3 architecture options |
| planner | Opus | Complex multi-file specs |
| planner-lite | Sonnet | Simple specs |
| scribe | Haiku | Write code from specs |
| verifier | Haiku | Run build/lint/type-check |
| tester | Haiku | Run tests |
| debugger | Opus | Complex root cause analysis |
| debugger-lite | Sonnet | Medium error analysis |
| fixer | Haiku | Apply fix instructions |
| code-reviewer | Opus | Deep code review |
| test-writer | Sonnet | Write tests for existing code |
| e2e-tester | Sonnet | Backend API/integration testing |
| doc-writer | Opus | Complex documentation |
| doc-writer-lite | Sonnet | Simple documentation |
| doc-updater | Haiku | Update tracking files |
Fixer's ONLY job: Apply explicit line-by-line instructions
Fixer gets ONE attempt per instruction set
Error occurs ā debugger diagnoses ā fixer applies fix ā return
ā
ā¼
verifier checks result
ā
āāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāā
ā ā
Fixed Still failing
ā ā
ā¼ ā¼
Continue Escalate back to debugger
(DO NOT call fixer again)
Pattern: Edit <file>: Line <N>: Change from <old> to <new>
Include:
Red Flags - STOP Before Calling Fixer:
| Severity | First Agent | Purpose | Next Agent | Purpose |
|---|---|---|---|---|
| Trivial | fixer (Haiku) | Direct fix | - | - |
| Low | fixer (Haiku) | Direct fix | - | - |
| Medium | debugger-lite (Sonnet) | Diagnose + plan | fixer (Haiku) | Execute plan |
| High | debugger (Opus) | Complex diagnosis | fixer (Haiku) | Execute plan |
CRITICAL:
CORRECT: "Diagnose the root cause of [error]. Provide specific fix instructions that fixer agent can implement."
INCORRECT: "Diagnose and fix [error]" "Fix this error"
ALWAYS run independent operations in parallel:
NEVER run as background tasks - await all parallel calls before proceeding.
How to parallelize: Send multiple Task tool calls in a single message.
git add -A Problem (CRITICAL)Never use git add -A, git add ., or git commit -a
When doc-updater updates tracking files, it does NOT commit them. If tracking files remain uncommitted and a later stage uses git add -A, it picks up:
ALWAYS use specific file paths:
# CORRECT - Tracking files
git add epics/EPIC-XXX/STAGE-XXX-YYY.md epics/EPIC-XXX/EPIC-XXX.md
# CORRECT - Changelog
git add changelog/2026-01-13.changelog.md
# WRONG - Picks up everything
git add -A
git add .
The epic file's stage table MUST be updated when a stage changes status. This is NOT optional.
If an exit gate step fails (e.g., journal skill fails due to disk error):
Required steps (blocking): Update stage file, Update epic file Always-attempt steps (skip only on system error with user consent): lessons-learned, journal
If lessons-learned or journal fails due to system error (not by choice):
Journal and lessons-learned are NEVER skipped by choice - only on system failure.
If stage file or epic file update fails:
Why: Stage/epic files are source of truth. Skipping breaks session independence and /next_task navigation.
If stage file updates but epic file update fails:
Prevention: doc-updater should update stage + epic in sequence (stage first, then epic). This makes forward recovery (retry epic) easier than rollback.
Before completing ANY phase exit gate:
Check git status for unexpected changes:
git status epics/EPIC-XXX/STAGE-XXX-YYY.md epics/EPIC-XXX/EPIC-XXX.md
If files show "modified" but you haven't updated them yet:
git diff epics/EPIC-XXX/STAGE-XXX-YYY.mdResolution:
Prevention: Sessions should coordinate via user. Tracking files should be committed immediately after phase completion.
/next_task to get assignmentphase-refinement (REQUIRED even when resuming from previous session)phase-finalizeCRITICAL: Always invoke the phase skill when resuming a session. Do NOT rely on "memory" from previous session context. Phase skills may have been updated, and session independence requires fresh skill invocation every time.
If task-navigator returns a different phase than stage file shows:
If stage file has conflicting or invalid state:
Report specific inconsistency:
Do NOT proceed with ambiguous state
Ask user for resolution:
ALL code review suggestions must be implemented, regardless of severity:
User's technical expertise does NOT exempt stages from code-reviewer agent:
User authority controls WHAT to build, not WHETHER to run quality gates.
"Production is down" / "Critical hotfix" / "User has a deadline":
If genuinely time-critical:
Abbreviated Workflow Minimums (NEVER skip these - PER STAGE):
Batched reviews across stages are NOT permitted:
Why per-stage matters: Each stage may introduce different issues. Batching hides which stage caused which problem and makes rollback harder.
Time-critical with multiple stages?
"Abbreviated" means faster execution, not fewer steps:
Explicit Consent Requirements:
Before requesting emergency consent, agent MUST explain:
"Abbreviated workflow means: quick code-reviewer pass, verifier only, smoke tests. Full workflow is safer. Use abbreviated workflow for this fix?"
Vague statements do NOT count as consent:
Rationalizations that don't work:
| Excuse | Reality | Correct Action |
|---|---|---|
| "This is simple, skip Design" | Simple tasks become complex; Design catches this | Present 2-3 options even for "simple" stages |
| "User wants to skip formality" | Explicit skips must be documented | Document in stage: "Skipped by user [reason] [date]" |
| "Just want to see it working" | Build already provides working implementation | Refinement is for feedback, not skipping tests |
| "Documentation overhead isn't worth it" | Tracking docs enable session independence | Update docs via doc-updater after every phase |
| "I already explored, can generate options" | Coordination ā architecture; use specialized agent | Delegate to brainstormer (Opus) for options |
| "User said skip code review" | User controls WHAT to build, not quality process | Run code-reviewer, explain findings to user |
| "Senior dev reviewed verbally" | External reviews complement, don't replace, agents | Run code-reviewer agent for automated check |
| "User prefers git add -A" | User preference doesn't override safety rules | Use specific paths, explain why |
| "User tested it themselves" | User testing is Refinement, agent testing is Build | Run tester agent for automated verification |
| "User is technical expert, reviewed it themselves" | User expertise complements agents, doesn't replace them | Run code-reviewer, share findings with expert user |
| "User has more experience than me" | Workflow exists for consistency, not hierarchy | Run code-reviewer regardless of user expertise |
| "User is paying for this time" | User pays for quality process, not shortcuts | Explain code-reviewer value, run it anyway |
During any phase, you may discover that new stages or epics are needed. When this happens, apply the Sequential Dependency Ordering rule:
Core Rule: Dependencies flow upward numerically. If work X depends on work Y, then Y must have a lower number than X.
digraph new_work {
"Discover new work needed" [shape=box];
"Is it a DEPENDENCY or DEPENDENT?" [shape=diamond];
"DEPENDENCY: Current stage NEEDS this work" [shape=box];
"DEPENDENT: This work NEEDS current stage" [shape=box];
"Create with LOWER number or earlier epic" [shape=box, style=filled, fillcolor=lightgreen];
"Create with HIGHER number or later epic" [shape=box, style=filled, fillcolor=lightgreen];
"Consider deferring current stage" [shape=box, style=filled, fillcolor=lightyellow];
"Discover new work needed" -> "Is it a DEPENDENCY or DEPENDENT?";
"Is it a DEPENDENCY or DEPENDENT?" -> "DEPENDENCY: Current stage NEEDS this work" [label="dependency"];
"Is it a DEPENDENCY or DEPENDENT?" -> "DEPENDENT: This work NEEDS current stage" [label="dependent"];
"DEPENDENCY: Current stage NEEDS this work" -> "Create with LOWER number or earlier epic";
"Create with LOWER number or earlier epic" -> "Consider deferring current stage";
"DEPENDENT: This work NEEDS current stage" -> "Create with HIGHER number or later epic";
}
If the new work is a DEPENDENCY (current stage needs it to function):
If the new work is a DEPENDENT (it needs current stage to exist):
Cross-epic discoveries:
If the current stage cannot proceed without dependency work:
Never silently proceed when a dependency blocks current work.
If user requests continuing despite forward dependency:
This is NOT permission to skip the explanation. Always explain first, then document, then proceed.
Signs you're skipping the workflow:
/next_taskgit add -A or git add . instead of specific file paths