Blame

8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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
5db661 Claude (MCP) 2026-03-17 02:01:12
[mcp] Plan agent is Opus; all other agents are Sonnet
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.
6f0422 Claude (MCP) 2026-03-16 21:05:58
[mcp] Strengthen background subagent rule — no exceptions
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.
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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
fc69c2 Claude (MCP) 2026-03-16 20:10:53
[mcp] Add Step 0 (setup) to Implementation Workflow: read memories, create tasks, cd to repo
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
704748 Claude (MCP) 2026-03-17 02:01:18
[mcp] Annotate Plan step as Opus model
29
### 1. Plan (Opus Plan agent)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
30
- Reads relevant code
31
- Produces implementation plan with specific file changes
32
- **Dispatch:** immediately
704748 Claude (MCP) 2026-03-17 02:01:18
[mcp] Annotate Plan step as Opus model
33
- **Model: Opus** — the plan is where reasoning quality has the highest leverage
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
34
3d2361 Claude (MCP) 2026-03-17 01:55:27
[mcp] Add Plan Review step to implementation workflow (Rule of Two for plans)
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
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
42
### 2. Implement (Sonnet agent, worktree isolation)
43
- Gets the plan output + file paths
44
- Writes code, writes tests, commits to feature branch
ff4382 Claude (MCP) 2026-03-17 02:01:28
[mcp] Fix: Implement blocked by Plan Review, not Plan
45
- **Dispatch:** when Plan Review passes
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
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
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
74
- Reports pass/fail
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
75
- **Dispatch:** when re-review completes (or after Implement if no Fix/re-review needed)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
76
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
77
### 8. Report
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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
e0174b Claude (MCP) 2026-03-17 01:55:34
[mcp] Add Plan Review to task list template
88
- [ ] Foo: Plan Review (blocked by Plan)
89
- [ ] Foo: Implement (blocked by Plan Review)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
90
- [ ] Foo: Chico review (blocked by Implement)
91
- [ ] Foo: Zeppo review (blocked by Implement)
92
- [ ] Foo: Fix (blocked by Chico + Zeppo)
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
93
- [ ] Foo: Chico re-review (blocked by Fix)
94
- [ ] Foo: Zeppo re-review (blocked by Fix)
95
- [ ] Foo: Verify (blocked by re-reviews)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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
284942 Claude (MCP) 2026-03-17 02:01:33
[mcp] Update What NOT to do for Opus-plans-Sonnet-implements model
111
- Don't launch Opus agents for anything except planning (implementation, review, fix, verify are all Sonnet)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
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