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
14
- **Opus orchestrates, Sonnet implements.** No Opus manager layer. The orchestrator (main Claude Code session) dispatches Sonnet agents directly.
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
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
29
### 1. Plan (Sonnet Plan agent)
30
- Reads relevant code
31
- Produces implementation plan with specific file changes
32
- Orchestrator reviews plan with user if non-trivial
33
- **Dispatch:** immediately
34
35
### 2. Implement (Sonnet agent, worktree isolation)
36
- Gets the plan output + file paths
37
- Writes code, writes tests, commits to feature branch
38
- **Dispatch:** when Plan completes
39
- **Always use `isolation: "worktree"`**
40
41
### 3. Chico review (Sonnet agent)
42
- Code quality, correctness, edge cases
43
- Rates issues: critical / important / minor
44
- **Dispatch:** when Implement completes (parallel with Zeppo)
45
46
### 4. Zeppo review (Sonnet agent)
47
- Security, infrastructure, deployment concerns
48
- Same rating scale
49
- **Dispatch:** when Implement completes (parallel with Chico)
50
51
### 5. Fix (Sonnet agent, same worktree)
52
- Gets review output + code
53
- Fixes critical and important issues
54
- Recommits to same branch
55
- **Dispatch:** when both reviews complete
56
- **Skip if:** no critical or important issues found
57
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
58
### 6. Re-review (Sonnet agents, mandatory if Fix made changes)
59
- Chico and Zeppo re-review the Fix diff only (not full implementation)
60
- Same rating scale; focus on whether fixes are correct and whether new issues were introduced
61
- **Dispatch:** when Fix completes (parallel, same as initial review)
62
- **Skip if:** Fix was skipped (no changes needed)
63
- Rule of Two: moving fast is a false economy; re-review catches issues Fix introduces
64
65
### 7. Verify (Sonnet agent)
66
- 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
67
- Reports pass/fail
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
68
- **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
69
2150b2 Claude (MCP) 2026-03-16 17:54:31
[mcp] [process] Add mandatory re-review after Fix step — Rule of Two
70
### 8. Report
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
71
- Orchestrator summarizes results and any concerns to the user
72
- User approves
73
- Orchestrator merges and deploys via Ansible
74
75
## Task list structure
76
77
For a task "Foo", create these items:
78
79
```
80
- [ ] Foo: Plan
81
- [ ] Foo: Implement (blocked by Plan)
82
- [ ] Foo: Chico review (blocked by Implement)
83
- [ ] Foo: Zeppo review (blocked by Implement)
84
- [ ] 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
85
- [ ] Foo: Chico re-review (blocked by Fix)
86
- [ ] Foo: Zeppo re-review (blocked by Fix)
87
- [ ] Foo: Verify (blocked by re-reviews)
8ea8b8 Claude (MCP) 2026-03-16 04:04:58
[mcp] Document implementation workflow with Sonnet subagent pipeline
88
```
89
90
Mark each `in_progress` when the agent launches, `completed` when it returns.
91
92
## Agent prompts
93
94
Keep prompts short and specific:
95
- "Read X, change Y, commit to branch Z"
96
- Include the Plan output for implementers
97
- Include the diff for reviewers
98
- Include review findings for fixers
99
- All agents: "Do NOT use git add -A. ALWAYS commit before reporting back. Do NOT push or merge."
100
101
## What NOT to do
102
103
- Don't launch Opus managers that delegate to Sonnet workers (they do the work themselves at Opus cost)
104
- Don't merge without verification
105
- Don't debug VPS issues via SSH mutations
106
- Don't ask the user if they're done