Blame
|
1 | --- |
||||||
| 2 | category: reference |
|||||||
| 3 | tags: [process, agents, workflow] |
|||||||
| 4 | last_updated: 2026-03-16 |
|||||||
| 5 | confidence: high |
|||||||
| 6 | --- |
|||||||
| 7 | ||||||||
| 8 | # Implementation Workflow |
|||||||
| 9 | ||||||||
| 10 | How Claude Code orchestrates implementation tasks on robot.wtf using Sonnet subagents. |
|||||||
| 11 | ||||||||
| 12 | ## Principles |
|||||||
| 13 | ||||||||
|
14 | - **Opus plans, Sonnet implements.** The orchestrator (Opus) dispatches agents directly. The Plan agent is Opus — the plan is the leverage point where deeper reasoning prevents downstream rework. All other agents (implementation, review, fix, verify) are Sonnet. |
||||||
|
15 | - **Background everything.** ALL subagents run in background (`run_in_background: true`), no exceptions — research, implementation, review, verification. The orchestrator must stay responsive to the user at all times. |
||||||
|
16 | - **Task list tracks the pipeline.** Each implementation task gets 5-6 task list items with dependencies. The orchestrator dispatches agents as blockers clear. |
||||||
| 17 | - **Rule of Two.** No subagent output is merged without independent verification by a second agent. |
|||||||
| 18 | - **No VPS mutations outside Ansible.** Read-only SSH diagnostics only. All changes go through Ansible playbooks. |
|||||||
| 19 | ||||||||
| 20 | ## Pipeline per task |
|||||||
| 21 | ||||||||
| 22 | When the user and orchestrator agree on an implementation task: |
|||||||
| 23 | ||||||||
|
24 | ### 0. Setup (orchestrator, before any agents) |
||||||
| 25 | - **Read memories and this workflow page.** Critical constraints (worktree scoping, repo paths) live in memory and are easy to forget. |
|||||||
| 26 | - **Create the full task list** with dependencies (Plan → Implement → Reviews → Fix → Re-reviews → Verify) before dispatching the first agent. The task list is the source of truth for pipeline state. |
|||||||
| 27 | - **`cd` into the target git repo** before launching worktree-isolated agents. The parent dir (`/Users/sderle/code/otterwiki/`) is not a git repo — worktrees fail there. |
|||||||
| 28 | ||||||||
|
29 | ### 1. Plan (Opus Plan agent) |
||||||
|
30 | - Reads relevant code |
||||||
| 31 | - Produces implementation plan with specific file changes |
|||||||
| 32 | - **Dispatch:** immediately |
|||||||
|
33 | - **Model: Opus** — the plan is where reasoning quality has the highest leverage |
||||||
|
34 | |||||||
|
35 | ### 1b. Plan Review (Sonnet agent) |
||||||
| 36 | - Reviews the plan for design flaws, missing constraints, and operational risks |
|||||||
| 37 | - Must be told the deployment context (e.g. "runs under gunicorn with 30s worker timeout") |
|||||||
| 38 | - If issues found: planner revises, reviewer re-reviews (cap at 3 iterations) |
|||||||
| 39 | - If plan review passes: orchestrator reviews with user if non-trivial |
|||||||
| 40 | - **Dispatch:** when Plan completes |
|||||||
| 41 | ||||||||
|
42 | ### 2. Implement (Sonnet agent, worktree isolation) |
||||||
| 43 | - Gets the plan output + file paths |
|||||||
| 44 | - Writes code, writes tests, commits to feature branch |
|||||||
|
45 | - **Dispatch:** when Plan Review passes |
||||||
|
46 | - **Always use `isolation: "worktree"`** |
||||||
| 47 | ||||||||
| 48 | ### 3. Chico review (Sonnet agent) |
|||||||
| 49 | - Code quality, correctness, edge cases |
|||||||
| 50 | - Rates issues: critical / important / minor |
|||||||
| 51 | - **Dispatch:** when Implement completes (parallel with Zeppo) |
|||||||
| 52 | ||||||||
| 53 | ### 4. Zeppo review (Sonnet agent) |
|||||||
| 54 | - Security, infrastructure, deployment concerns |
|||||||
| 55 | - Same rating scale |
|||||||
| 56 | - **Dispatch:** when Implement completes (parallel with Chico) |
|||||||
| 57 | ||||||||
| 58 | ### 5. Fix (Sonnet agent, same worktree) |
|||||||
| 59 | - Gets review output + code |
|||||||
| 60 | - Fixes critical and important issues |
|||||||
| 61 | - Recommits to same branch |
|||||||
| 62 | - **Dispatch:** when both reviews complete |
|||||||
| 63 | - **Skip if:** no critical or important issues found |
|||||||
| 64 | ||||||||
|
65 | ### 6. Re-review (Sonnet agents, mandatory if Fix made changes) |
||||||
| 66 | - Chico and Zeppo re-review the Fix diff only (not full implementation) |
|||||||
| 67 | - Same rating scale; focus on whether fixes are correct and whether new issues were introduced |
|||||||
| 68 | - **Dispatch:** when Fix completes (parallel, same as initial review) |
|||||||
| 69 | - **Skip if:** Fix was skipped (no changes needed) |
|||||||
| 70 | - Rule of Two: moving fast is a false economy; re-review catches issues Fix introduces |
|||||||
| 71 | ||||||||
| 72 | ### 7. Verify (Sonnet agent) |
|||||||
| 73 | - Final backstop: reads the full diff, runs tests, confirms changes match the spec |
|||||||
|
74 | - Reports pass/fail |
||||||
|
75 | - **Dispatch:** when re-review completes (or after Implement if no Fix/re-review needed) |
||||||
|
76 | |||||||
|
77 | ### 8. Report |
||||||
|
78 | - Orchestrator summarizes results and any concerns to the user |
||||||
| 79 | - User approves |
|||||||
| 80 | - Orchestrator merges and deploys via Ansible |
|||||||
| 81 | ||||||||
| 82 | ## Task list structure |
|||||||
| 83 | ||||||||
| 84 | For a task "Foo", create these items: |
|||||||
| 85 | ||||||||
| 86 | ``` |
|||||||
| 87 | - [ ] Foo: Plan |
|||||||
|
88 | - [ ] Foo: Plan Review (blocked by Plan) |
||||||
| 89 | - [ ] Foo: Implement (blocked by Plan Review) |
|||||||
|
90 | - [ ] Foo: Chico review (blocked by Implement) |
||||||
| 91 | - [ ] Foo: Zeppo review (blocked by Implement) |
|||||||
| 92 | - [ ] Foo: Fix (blocked by Chico + Zeppo) |
|||||||
|
93 | - [ ] Foo: Chico re-review (blocked by Fix) |
||||||
| 94 | - [ ] Foo: Zeppo re-review (blocked by Fix) |
|||||||
| 95 | - [ ] Foo: Verify (blocked by re-reviews) |
|||||||
|
96 | ``` |
||||||
| 97 | ||||||||
| 98 | Mark each `in_progress` when the agent launches, `completed` when it returns. |
|||||||
| 99 | ||||||||
| 100 | ## Agent prompts |
|||||||
| 101 | ||||||||
| 102 | Keep prompts short and specific: |
|||||||
| 103 | - "Read X, change Y, commit to branch Z" |
|||||||
| 104 | - Include the Plan output for implementers |
|||||||
| 105 | - Include the diff for reviewers |
|||||||
| 106 | - Include review findings for fixers |
|||||||
| 107 | - All agents: "Do NOT use git add -A. ALWAYS commit before reporting back. Do NOT push or merge." |
|||||||
| 108 | ||||||||
| 109 | ## What NOT to do |
|||||||
| 110 | ||||||||
|
111 | - Don't launch Opus agents for anything except planning (implementation, review, fix, verify are all Sonnet) |
||||||
|
112 | - Don't merge without verification |
||||||
| 113 | - Don't debug VPS issues via SSH mutations |
|||||||
| 114 | - Don't ask the user if they're done |
|||||||
