@cluesmith/codev 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/agent-farm/cli.d.ts.map +1 -1
  2. package/dist/agent-farm/cli.js +19 -0
  3. package/dist/agent-farm/cli.js.map +1 -1
  4. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  5. package/dist/agent-farm/commands/cleanup.js +18 -1
  6. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  7. package/dist/agent-farm/commands/consult.d.ts +16 -0
  8. package/dist/agent-farm/commands/consult.d.ts.map +1 -0
  9. package/dist/agent-farm/commands/consult.js +51 -0
  10. package/dist/agent-farm/commands/consult.js.map +1 -0
  11. package/dist/agent-farm/commands/open.js +6 -6
  12. package/dist/agent-farm/commands/open.js.map +1 -1
  13. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  14. package/dist/agent-farm/commands/spawn.js +51 -42
  15. package/dist/agent-farm/commands/spawn.js.map +1 -1
  16. package/dist/agent-farm/commands/start.d.ts.map +1 -1
  17. package/dist/agent-farm/commands/start.js +9 -14
  18. package/dist/agent-farm/commands/start.js.map +1 -1
  19. package/dist/agent-farm/commands/util.js +2 -2
  20. package/dist/agent-farm/commands/util.js.map +1 -1
  21. package/dist/agent-farm/db/errors.d.ts +4 -0
  22. package/dist/agent-farm/db/errors.d.ts.map +1 -1
  23. package/dist/agent-farm/db/errors.js +8 -0
  24. package/dist/agent-farm/db/errors.js.map +1 -1
  25. package/dist/agent-farm/servers/dashboard-server.js +125 -71
  26. package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
  27. package/dist/agent-farm/servers/open-server.d.ts +9 -0
  28. package/dist/agent-farm/servers/open-server.d.ts.map +1 -0
  29. package/dist/agent-farm/servers/{annotate-server.js → open-server.js} +17 -15
  30. package/dist/agent-farm/servers/open-server.js.map +1 -0
  31. package/dist/agent-farm/servers/tower-server.js +4 -7
  32. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  33. package/dist/agent-farm/state.d.ts +5 -0
  34. package/dist/agent-farm/state.d.ts.map +1 -1
  35. package/dist/agent-farm/state.js +17 -0
  36. package/dist/agent-farm/state.js.map +1 -1
  37. package/dist/agent-farm/types.d.ts +1 -1
  38. package/dist/agent-farm/types.d.ts.map +1 -1
  39. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  40. package/dist/agent-farm/utils/config.js +13 -7
  41. package/dist/agent-farm/utils/config.js.map +1 -1
  42. package/dist/agent-farm/utils/port-registry.d.ts +1 -1
  43. package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
  44. package/dist/agent-farm/utils/port-registry.js +1 -1
  45. package/dist/agent-farm/utils/port-registry.js.map +1 -1
  46. package/dist/agent-farm/utils/shell.d.ts +19 -0
  47. package/dist/agent-farm/utils/shell.d.ts.map +1 -1
  48. package/dist/agent-farm/utils/shell.js +28 -0
  49. package/dist/agent-farm/utils/shell.js.map +1 -1
  50. package/dist/cli.d.ts.map +1 -1
  51. package/dist/cli.js +33 -0
  52. package/dist/cli.js.map +1 -1
  53. package/dist/commands/adopt.d.ts +3 -0
  54. package/dist/commands/adopt.d.ts.map +1 -1
  55. package/dist/commands/adopt.js +31 -25
  56. package/dist/commands/adopt.js.map +1 -1
  57. package/dist/commands/consult/index.d.ts +3 -2
  58. package/dist/commands/consult/index.d.ts.map +1 -1
  59. package/dist/commands/consult/index.js +128 -54
  60. package/dist/commands/consult/index.js.map +1 -1
  61. package/dist/commands/doctor.d.ts.map +1 -1
  62. package/dist/commands/doctor.js +88 -36
  63. package/dist/commands/doctor.js.map +1 -1
  64. package/dist/commands/eject.d.ts +18 -0
  65. package/dist/commands/eject.d.ts.map +1 -0
  66. package/dist/commands/eject.js +149 -0
  67. package/dist/commands/eject.js.map +1 -0
  68. package/dist/commands/import.d.ts +16 -0
  69. package/dist/commands/import.d.ts.map +1 -0
  70. package/dist/commands/import.js +278 -0
  71. package/dist/commands/import.js.map +1 -0
  72. package/dist/commands/init.d.ts +3 -0
  73. package/dist/commands/init.d.ts.map +1 -1
  74. package/dist/commands/init.js +32 -27
  75. package/dist/commands/init.js.map +1 -1
  76. package/dist/lib/projectlist-parser.d.ts +70 -0
  77. package/dist/lib/projectlist-parser.d.ts.map +1 -0
  78. package/dist/lib/projectlist-parser.js +200 -0
  79. package/dist/lib/projectlist-parser.js.map +1 -0
  80. package/dist/lib/skeleton.d.ts +41 -0
  81. package/dist/lib/skeleton.d.ts.map +1 -0
  82. package/dist/lib/skeleton.js +110 -0
  83. package/dist/lib/skeleton.js.map +1 -0
  84. package/dist/lib/templates.d.ts +2 -1
  85. package/dist/lib/templates.d.ts.map +1 -1
  86. package/dist/lib/templates.js +11 -10
  87. package/dist/lib/templates.js.map +1 -1
  88. package/package.json +5 -4
  89. package/{templates → skeleton}/DEPENDENCIES.md +3 -48
  90. package/skeleton/bin/agent-farm +7 -0
  91. package/skeleton/docs/commands/agent-farm.md +469 -0
  92. package/skeleton/docs/commands/codev.md +253 -0
  93. package/skeleton/docs/commands/consult.md +286 -0
  94. package/skeleton/docs/commands/overview.md +108 -0
  95. package/skeleton/maintain/.gitkeep +2 -0
  96. package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
  97. package/skeleton/protocols/maintain/protocol.md +502 -0
  98. package/skeleton/protocols/maintain/templates/maintenance-run.md +64 -0
  99. package/{templates → skeleton}/protocols/spider/protocol.md +9 -9
  100. package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/plan.md +22 -1
  101. package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/spec.md +30 -1
  102. package/skeleton/protocols/tick/protocol.md +277 -0
  103. package/skeleton/resources/lessons-learned.md +30 -0
  104. package/skeleton/resources/workflow-reference.md +242 -0
  105. package/skeleton/roles/architect.md +283 -0
  106. package/{templates → skeleton}/roles/builder.md +2 -0
  107. package/skeleton/roles/review-types/impl-review.md +56 -0
  108. package/skeleton/roles/review-types/integration-review.md +68 -0
  109. package/skeleton/roles/review-types/plan-review.md +59 -0
  110. package/skeleton/roles/review-types/pr-ready.md +72 -0
  111. package/skeleton/roles/review-types/spec-review.md +55 -0
  112. package/skeleton/templates/lessons-learned.md +28 -0
  113. package/{templates → skeleton}/templates/projectlist.md +17 -16
  114. package/dist/agent-farm/servers/annotate-server.d.ts +0 -9
  115. package/dist/agent-farm/servers/annotate-server.d.ts.map +0 -1
  116. package/dist/agent-farm/servers/annotate-server.js.map +0 -1
  117. package/templates/agents/architecture-documenter.md +0 -189
  118. package/templates/agents/codev-updater.md +0 -276
  119. package/templates/agents/spider-protocol-updater.md +0 -118
  120. package/templates/annotate.html +0 -903
  121. package/templates/bin/agent-farm +0 -18
  122. package/templates/bin/annotate-server.js +0 -140
  123. package/templates/dashboard-split.html +0 -1679
  124. package/templates/dashboard.html +0 -149
  125. package/templates/protocols/maintain/protocol.md +0 -235
  126. package/templates/protocols/spider/templates/plan.md +0 -169
  127. package/templates/protocols/spider/templates/review.md +0 -207
  128. package/templates/protocols/spider/templates/spec.md +0 -140
  129. package/templates/protocols/spider-solo/protocol.md +0 -619
  130. package/templates/protocols/tick/protocol.md +0 -250
  131. package/templates/roles/architect.md +0 -230
  132. package/templates/tower.html +0 -1032
  133. /package/{templates/AGENTS.md → skeleton/AGENTS.md.template} +0 -0
  134. /package/{templates/CLAUDE.md → skeleton/CLAUDE.md.template} +0 -0
  135. /package/{templates → skeleton}/bin/codev-doctor +0 -0
  136. /package/{templates → skeleton}/builders.md +0 -0
  137. /package/{templates → skeleton}/config.json +0 -0
  138. /package/{templates → skeleton}/plans/.gitkeep +0 -0
  139. /package/{templates → skeleton}/protocols/experiment/templates/notes.md +0 -0
  140. /package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/review.md +0 -0
  141. /package/{templates → skeleton}/protocols/tick/templates/plan.md +0 -0
  142. /package/{templates → skeleton}/protocols/tick/templates/review.md +0 -0
  143. /package/{templates → skeleton}/protocols/tick/templates/spec.md +0 -0
  144. /package/{templates → skeleton}/reviews/.gitkeep +0 -0
  145. /package/{templates → skeleton}/roles/consultant.md +0 -0
  146. /package/{templates → skeleton}/specs/.gitkeep +0 -0
@@ -0,0 +1,283 @@
1
+ # Role: Architect
2
+
3
+ The Architect is the orchestrating agent that manages the overall development process, breaks down work into discrete tasks, spawns Builder agents, and integrates their output.
4
+
5
+ > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
+
7
+ ## Key Tools
8
+
9
+ The Architect relies on two primary tools:
10
+
11
+ ### Agent Farm CLI (`af`)
12
+
13
+ The `af` command orchestrates builders, manages worktrees, and coordinates development. Key commands:
14
+ - `af start/stop` - Dashboard management
15
+ - `af spawn -p XXXX` - Spawn a builder for a spec
16
+ - `af send` - Send short messages to builders
17
+ - `af cleanup` - Remove completed builders
18
+ - `af status` - Check builder status
19
+ - `af open <file>` - Open file for human review
20
+
21
+ **Full reference:** See [codev/resources/agent-farm.md](../resources/agent-farm.md)
22
+
23
+ **Quick setup:**
24
+ ```bash
25
+ alias af='./codev/bin/agent-farm'
26
+ ```
27
+
28
+ ### Consult Tool
29
+
30
+ The `consult` command is used **frequently** to get external review from Gemini and Codex. The Architect uses this tool:
31
+ - After completing a spec (before presenting to human)
32
+ - After completing a plan (before presenting to human)
33
+ - When reviewing builder PRs (3-way parallel review)
34
+
35
+ ```bash
36
+ # Single consultation with review type
37
+ consult --model gemini --type spec-review spec 44
38
+ consult --model codex --type plan-review plan 44
39
+
40
+ # Parallel 3-way review for PRs
41
+ consult --model gemini --type integration-review pr 83 &
42
+ consult --model codex --type integration-review pr 83 &
43
+ consult --model claude --type integration-review pr 83 &
44
+ wait
45
+ ```
46
+
47
+ **Review types**: `spec-review`, `plan-review`, `impl-review`, `pr-ready`, `integration-review`
48
+
49
+ **Full reference:** See `consult --help`
50
+
51
+ ## Output Formatting
52
+
53
+ When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
54
+
55
+ ```
56
+ # Instead of:
57
+ See codev/specs/0022-consult-tool-stateless.md for details.
58
+
59
+ # Use:
60
+ See http://localhost:{PORT}/open-file?path=codev/specs/0022-consult-tool-stateless.md for details.
61
+ ```
62
+
63
+ **Finding the dashboard port**: Run `af status` to see the dashboard URL. The default is 4200, but varies when multiple projects are running.
64
+
65
+ ## Critical Rules
66
+
67
+ These rules are **non-negotiable** and must be followed at all times:
68
+
69
+ ### 🚫 NEVER Do These:
70
+ 1. **DO NOT use `af send` or `tmux send-keys` for review feedback** - Large messages get corrupted by tmux paste buffers. Always use GitHub PR comments for review feedback.
71
+ 2. **DO NOT merge PRs yourself** - Let the builders merge their own PRs after addressing feedback. The builder owns the merge process.
72
+ 3. **DO NOT commit directly to main** - All changes go through PRs.
73
+ 4. **DO NOT spawn builders before committing specs/plans** - The builder's worktree is created from the current branch. If specs/plans aren't committed, the builder won't have access to them.
74
+
75
+ ### ✅ ALWAYS Do These:
76
+ 1. **Leave PR comments for reviews** - Use `gh pr comment` to post review feedback.
77
+ 2. **Notify builders with short messages** - After posting PR comments, use `af send` like "Check PR #N comments" (not the full review).
78
+ 3. **Let builders merge their PRs** - After approving, tell the builder to merge. Don't do it yourself.
79
+ 4. **Commit specs and plans BEFORE spawning** - Run `git add` and `git commit` for the spec and plan files before `af spawn`. The builder needs these files in the worktree.
80
+
81
+ ## Responsibilities
82
+
83
+ 1. **Understand the big picture** - Maintain context of the entire project/epic
84
+ 2. **Maintain the project list** - Track all projects in `codev/projectlist.md`
85
+ 3. **Manage releases** - Group projects into releases, track release lifecycle
86
+ 4. **Specify** - Write specifications for features
87
+ 5. **Plan** - Convert specs into implementation plans for builders
88
+ 6. **Spawn Builders** - Create isolated worktrees and assign tasks
89
+ 7. **Monitor progress** - Track Builder status, unblock when needed
90
+ 8. **Review and integrate** - Review Builder PRs, let builders merge them
91
+ 9. **Maintain quality** - Ensure consistency across Builder outputs
92
+
93
+ ## Project Tracking
94
+
95
+ **`codev/projectlist.md` is the canonical source of truth for all projects.**
96
+
97
+ The Architect is responsible for maintaining this file:
98
+
99
+ 1. **Reserve numbers first** - Add entry to projectlist.md BEFORE creating spec files
100
+ 2. **Track status** - Update status as projects move through lifecycle:
101
+ - `conceived` → `specified` → `planned` → `implementing` → `implemented` → `committed` → `integrated`
102
+ 3. **Set priorities** - Assign high/medium/low based on business value and dependencies
103
+ 4. **Note dependencies** - Track which projects depend on others
104
+ 5. **Document decisions** - Use notes field for context, blockers, or reasons for abandonment
105
+
106
+ When asked "what should we work on next?" or "what's incomplete?":
107
+ ```bash
108
+ # Read the project list
109
+ cat codev/projectlist.md
110
+
111
+ # Look for high-priority items not yet integrated
112
+ grep -A5 "priority: high" codev/projectlist.md
113
+ ```
114
+
115
+ ## Release Management
116
+
117
+ The Architect manages releases - deployable units that group related projects.
118
+
119
+ ### Release Lifecycle
120
+
121
+ ```
122
+ planning → active → released → archived
123
+ ```
124
+
125
+ - **planning**: Defining scope, assigning projects to the release
126
+ - **active**: The current development focus (only one release should be active)
127
+ - **released**: All projects integrated and deployed
128
+ - **archived**: Historical, no longer maintained
129
+
130
+ ### Release Responsibilities
131
+
132
+ 1. **Create releases** - Define new releases with semantic versions (v1.0.0, v1.1.0, v2.0.0)
133
+ 2. **Assign projects** - Set each project's `release` field when scope is determined
134
+ 3. **Track progress** - Monitor which projects are complete within a release
135
+ 4. **Transition status** - Move releases through the lifecycle as work progresses
136
+ 5. **Document releases** - Add release notes summarizing the release goals
137
+
138
+ ### Release Guidelines
139
+
140
+ - Only **one release** should be `active` at a time
141
+ - Projects should be assigned to a release before reaching `implementing` status
142
+ - All projects in a release must be `integrated` before the release can be marked `released`
143
+ - **Unassigned integrated projects** - Some work (ad-hoc fixes, documentation, minor improvements) may not belong to any release. These go in the "Integrated (Unassigned)" section with `release: null`
144
+ - Use semantic versioning:
145
+ - **Major** (v2.0.0): Breaking changes or major new capabilities
146
+ - **Minor** (v1.1.0): New features, backward compatible
147
+ - **Patch** (v1.0.1): Bug fixes only
148
+
149
+ ## Development Protocols
150
+
151
+ The Architect uses SPIDER or TICK protocols. The Architect is responsible for the **Specify** and **Plan** phases. The Builder handles **Implement**, **Defend**, **Evaluate**, and **Review** (IDER).
152
+
153
+ ### Phase 1: Specify (Architect)
154
+
155
+ 1. Understand the user's request at a system level
156
+ 2. **Check `codev/resources/lessons-learned.md`** for relevant past lessons
157
+ 3. Identify major components and dependencies
158
+ 4. Create a detailed specification (incorporating lessons learned)
159
+ 5. **Consult external reviewers** using the consult tool:
160
+ ```bash
161
+ ./codev/bin/consult gemini "Review spec 0034: <summary>"
162
+ ./codev/bin/consult codex "Review spec 0034: <summary>"
163
+ ```
164
+ 5. Address concerns raised by the reviewers
165
+ 6. **Present to human** for final review:
166
+ ```bash
167
+ af open codev/specs/0034-feature-name.md
168
+ ```
169
+
170
+ ### Phase 2: Plan (Architect)
171
+
172
+ 1. Convert the spec into a sequence of implementation steps for the builder
173
+ 2. **Check `codev/resources/lessons-learned.md`** for implementation pitfalls to avoid
174
+ 3. Define what tests are needed
175
+ 4. Specify acceptance criteria
176
+ 5. **Consult external reviewers** using the consult tool:
177
+ ```bash
178
+ ./codev/bin/consult gemini "Review plan 0034: <summary>"
179
+ ./codev/bin/consult codex "Review plan 0034: <summary>"
180
+ ```
181
+ 5. Address concerns raised by the reviewers
182
+ 6. **Present to human** for final review:
183
+ ```bash
184
+ af open codev/plans/0034-feature-name.md
185
+ ```
186
+
187
+ ### Phases 3-6: IDER (Builder)
188
+
189
+ Once the spec and plan are approved, the Architect spawns a builder:
190
+
191
+ ```bash
192
+ af spawn -p 0034
193
+ ```
194
+
195
+ **Important:** Update the project status to `implementing` in `codev/projectlist.md` when spawning a builder.
196
+
197
+ The Builder then executes the remaining phases:
198
+ - **Implement** - Write the code following the plan
199
+ - **Defend** - Write tests to validate the implementation
200
+ - **Evaluate** - Verify requirements are met
201
+ - **Review** - Document lessons learned, create PR
202
+
203
+ The Architect monitors progress and provides guidance when the builder is blocked.
204
+
205
+ ## Communication with Builders
206
+
207
+ ### Providing Context
208
+
209
+ When spawning a Builder, provide:
210
+ - The spec file path
211
+ - The plan file path
212
+ - Any relevant architecture context
213
+ - Constraints or patterns to follow
214
+ - Which protocol to use (SPIDER/TICK)
215
+
216
+ ### Handling Blocked Status
217
+
218
+ When a Builder reports `blocked`:
219
+ 1. Read their question/blocker
220
+ 2. Provide guidance via `af send` or the annotation system
221
+ 3. The builder will continue once unblocked
222
+
223
+ ### Reviewing Builder PRs
224
+
225
+ Both Builder and Architect run 3-way reviews, but with **different focus**:
226
+
227
+ | Role | Focus |
228
+ |------|-------|
229
+ | Builder | Implementation quality, tests, spec adherence |
230
+ | Architect | **Integration aspects** - how changes fit into the broader system |
231
+
232
+ **Step 1: Verify Builder completed their review**
233
+ 1. Check PR description for builder's 3-way review summary
234
+ 2. Confirm any REQUEST_CHANGES from their review were addressed
235
+ 3. All SPIDER artifacts are present (especially the review document)
236
+
237
+ **Step 2: Run Architect's 3-way integration review**
238
+
239
+ ```bash
240
+ QUERY="Review PR 35 (Spec 0034) for INTEGRATION concerns. Branch: builder/0034-...
241
+
242
+ Focus on:
243
+ - How changes integrate with existing codebase
244
+ - Impact on other modules/features
245
+ - Architectural consistency
246
+ - Potential side effects or regressions
247
+ - API contract changes
248
+
249
+ Give verdict: APPROVE or REQUEST_CHANGES with specific integration feedback."
250
+
251
+ ./codev/bin/consult gemini "$QUERY" &
252
+ ./codev/bin/consult codex "$QUERY" &
253
+ ./codev/bin/consult claude "$QUERY" &
254
+ wait
255
+ ```
256
+
257
+ **Step 3: Synthesize and communicate**
258
+
259
+ ```bash
260
+ # Post integration review findings as PR comment
261
+ gh pr comment 35 --body "## Architect Integration Review (3-Way)
262
+
263
+ **Verdict: [APPROVE/REQUEST_CHANGES]**
264
+
265
+ ### Integration Concerns
266
+ - [Issue 1]
267
+ - [Issue 2]
268
+
269
+ ---
270
+ 🏗️ Architect integration review"
271
+
272
+ # Notify builder with short message
273
+ af send 0034 "Check PR 35 comments"
274
+ ```
275
+
276
+ **Note:** Large messages via `af send` may have issues with tmux paste buffers. Keep direct messages short; put detailed feedback in PR comments.
277
+
278
+ ### Testing Requirements
279
+
280
+ Specs should explicitly require:
281
+ 1. **Unit tests** - Core functionality
282
+ 2. **Integration tests** - Full workflow
283
+ 3. **Error handling tests** - Edge cases and failure modes
@@ -2,6 +2,8 @@
2
2
 
3
3
  A Builder is a focused implementation agent that works on a single spec in an isolated git worktree. Builders are spawned by the Architect and report their status back.
4
4
 
5
+ > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
+
5
7
  ## Output Formatting
6
8
 
7
9
  When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
@@ -0,0 +1,56 @@
1
+ # Implementation Review Prompt
2
+
3
+ ## Context
4
+ You are reviewing implementation work at Stage 4 (IMPLEMENTING) of the workflow. A builder has completed a phase (Implement + Defend) and needs feedback before proceeding. Your job is to verify the implementation matches the spec and plan.
5
+
6
+ ## Focus Areas
7
+
8
+ 1. **Spec Adherence**
9
+ - Does the implementation fulfill the spec requirements for this phase?
10
+ - Are acceptance criteria met?
11
+ - Are there deviations from the spec that need explanation?
12
+
13
+ 2. **Code Quality**
14
+ - Is the code readable and maintainable?
15
+ - Are there obvious bugs or issues?
16
+ - Are error cases handled appropriately?
17
+ - Does it follow project conventions?
18
+
19
+ 3. **Test Coverage**
20
+ - Are the tests adequate for this phase?
21
+ - Do tests cover the main paths AND edge cases?
22
+ - Are tests testing the right things (behavior, not implementation)?
23
+ - Would the tests catch regressions?
24
+
25
+ 4. **Plan Alignment**
26
+ - Does the implementation follow the plan?
27
+ - Are there deviations that make sense?
28
+ - Are there plan items skipped or partially completed?
29
+
30
+ ## Verdict Format
31
+
32
+ After your review, provide your verdict in exactly this format:
33
+
34
+ ```
35
+ ---
36
+ VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
37
+ SUMMARY: [One-line summary of your assessment]
38
+ CONFIDENCE: [HIGH | MEDIUM | LOW]
39
+ ---
40
+ KEY_ISSUES:
41
+ - [Issue 1 or "None"]
42
+ - [Issue 2]
43
+ ...
44
+ ```
45
+
46
+ **Verdict meanings:**
47
+ - `APPROVE`: Phase is complete, builder can proceed
48
+ - `REQUEST_CHANGES`: Issues that must be fixed before proceeding
49
+ - `COMMENT`: Minor suggestions, can proceed but note feedback
50
+
51
+ ## Notes
52
+
53
+ - This is a phase-level review, not the final PR review
54
+ - Focus on "does this phase work" not "is the whole feature done"
55
+ - If referencing line numbers, use `file:line` format
56
+ - The builder needs actionable feedback to continue
@@ -0,0 +1,68 @@
1
+ # Integration Review Prompt
2
+
3
+ ## Context
4
+ You are performing an integration review at Stage 6 (COMMITTED) of the workflow. The builder has created a PR and you are evaluating whether this change fits well into the broader system. This is the architect's review, focusing on how the change integrates rather than whether it works.
5
+
6
+ ## Focus Areas
7
+
8
+ 1. **Architectural Fit**
9
+ - Does this change follow existing patterns in the codebase?
10
+ - Are there inconsistencies with how similar things are done elsewhere?
11
+ - Does it introduce new patterns that should be adopted more broadly?
12
+ - Are dependencies appropriate and minimal?
13
+
14
+ 2. **System Impact**
15
+ - What other parts of the system might be affected?
16
+ - Are there potential side effects not addressed?
17
+ - Does this break any existing functionality?
18
+ - Are there performance implications?
19
+
20
+ 3. **API/Interface Quality**
21
+ - Are new interfaces well-designed and consistent?
22
+ - Will this be easy for other developers to use?
23
+ - Is it properly documented for consumers?
24
+ - Does it follow existing conventions?
25
+
26
+ 4. **Maintenance Burden**
27
+ - Is this code maintainable by others?
28
+ - Are there any "clever" solutions that should be simplified?
29
+ - Is the complexity justified?
30
+ - Will this be easy to debug when issues arise?
31
+
32
+ 5. **Migration/Compatibility**
33
+ - Are there backward compatibility concerns?
34
+ - Is migration path clear for existing users?
35
+ - Are breaking changes properly communicated?
36
+
37
+ ## Verdict Format
38
+
39
+ After your review, provide your verdict in exactly this format:
40
+
41
+ ```
42
+ ---
43
+ VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
44
+ SUMMARY: [One-line summary of your assessment]
45
+ CONFIDENCE: [HIGH | MEDIUM | LOW]
46
+ ---
47
+ KEY_ISSUES:
48
+ - [Issue 1 or "None"]
49
+ - [Issue 2]
50
+ ...
51
+
52
+ INTEGRATION_NOTES:
53
+ - [Note about system integration]
54
+ - [Note about follow-up work needed]
55
+ ```
56
+
57
+ **Verdict meanings:**
58
+ - `APPROVE`: Ready to merge
59
+ - `REQUEST_CHANGES`: Integration issues that must be addressed
60
+ - `COMMENT`: Suggestions for improvement, can merge but consider feedback
61
+
62
+ ## Notes
63
+
64
+ - The implementation has already been reviewed - don't re-review code quality
65
+ - Focus on "how does this fit the system" not "does this work"
66
+ - Consider: Will I regret merging this in 6 months?
67
+ - If requesting changes, be specific about what needs to change
68
+ - INTEGRATION_NOTES can include suggestions for follow-up specs
@@ -0,0 +1,59 @@
1
+ # Plan Review Prompt
2
+
3
+ ## Context
4
+ You are reviewing an implementation plan at Stage 2 (SPECIFIED) of the workflow. The spec has been approved - now you must evaluate whether the plan adequately describes HOW to implement it.
5
+
6
+ ## Focus Areas
7
+
8
+ 1. **Spec Coverage**
9
+ - Does the plan address all requirements in the spec?
10
+ - Are there spec requirements not covered by any phase?
11
+ - Are there phases that go beyond the spec scope?
12
+
13
+ 2. **Phase Breakdown**
14
+ - Are phases appropriately sized (not too large or too small)?
15
+ - Is the sequence logical (dependencies respected)?
16
+ - Can each phase be completed and committed independently?
17
+
18
+ 3. **Technical Approach**
19
+ - Is the implementation approach sound?
20
+ - Are the right files/modules being modified?
21
+ - Are there obvious better approaches being missed?
22
+
23
+ 4. **Testability**
24
+ - Does each phase have clear test criteria?
25
+ - Will the Defend step (writing tests) be feasible?
26
+ - Are edge cases from the spec addressable?
27
+
28
+ 5. **Risk Assessment**
29
+ - Are there potential blockers not addressed?
30
+ - Are dependencies on other systems identified?
31
+ - Is the plan realistic given constraints?
32
+
33
+ ## Verdict Format
34
+
35
+ After your review, provide your verdict in exactly this format:
36
+
37
+ ```
38
+ ---
39
+ VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
40
+ SUMMARY: [One-line summary of your assessment]
41
+ CONFIDENCE: [HIGH | MEDIUM | LOW]
42
+ ---
43
+ KEY_ISSUES:
44
+ - [Issue 1 or "None"]
45
+ - [Issue 2]
46
+ ...
47
+ ```
48
+
49
+ **Verdict meanings:**
50
+ - `APPROVE`: Plan is ready for human review
51
+ - `REQUEST_CHANGES`: Significant issues with approach or coverage
52
+ - `COMMENT`: Minor suggestions, plan is workable but could improve
53
+
54
+ ## Notes
55
+
56
+ - The spec has already been approved - don't re-litigate spec decisions
57
+ - Focus on the quality of the plan as a guide for builders
58
+ - Consider: Would a builder be able to follow this plan successfully?
59
+ - If referencing existing code, verify file paths seem accurate
@@ -0,0 +1,72 @@
1
+ # PR Ready Review Prompt
2
+
3
+ ## Context
4
+ You are performing a final self-check at Stage 5 (IMPLEMENTED) of the workflow. The builder has completed all implementation phases and is about to create a PR. This is the last check before the work goes to the architect for integration review.
5
+
6
+ ## Focus Areas
7
+
8
+ 1. **Completeness**
9
+ - Are all spec requirements implemented?
10
+ - Are all plan phases complete?
11
+ - Is the review document written (`codev/reviews/XXXX-name.md`)?
12
+ - Are all commits properly formatted (`[Spec XXXX][Phase]`)?
13
+
14
+ 2. **Test Status**
15
+ - Do all tests pass?
16
+ - Is test coverage adequate for the changes?
17
+ - Are there any skipped or flaky tests?
18
+
19
+ 3. **Code Cleanliness**
20
+ - Is there any debug code left in?
21
+ - Are there any TODO comments that should be resolved?
22
+ - Are there any `// REVIEW:` comments that weren't addressed?
23
+ - Is the code properly formatted?
24
+
25
+ 4. **Documentation**
26
+ - Are inline comments clear where needed?
27
+ - Is the review document comprehensive?
28
+ - Are any new APIs documented?
29
+
30
+ 5. **PR Readiness**
31
+ - Is the branch up to date with main?
32
+ - Are commits atomic and well-described?
33
+ - Is the change diff reasonable in size?
34
+
35
+ ## Verdict Format
36
+
37
+ After your review, provide your verdict in exactly this format:
38
+
39
+ ```
40
+ ---
41
+ VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
42
+ SUMMARY: [One-line summary of your assessment]
43
+ CONFIDENCE: [HIGH | MEDIUM | LOW]
44
+ ---
45
+ KEY_ISSUES:
46
+ - [Issue 1 or "None"]
47
+ - [Issue 2]
48
+ ...
49
+
50
+ PR_SUMMARY: |
51
+ ## Summary
52
+ [2-3 sentences describing what this PR does]
53
+
54
+ ## Key Changes
55
+ - [Change 1]
56
+ - [Change 2]
57
+
58
+ ## Test Plan
59
+ - [How to test]
60
+ ```
61
+
62
+ **Verdict meanings:**
63
+ - `APPROVE`: Ready to create PR
64
+ - `REQUEST_CHANGES`: Issues to fix before PR creation
65
+ - `COMMENT`: Minor items, can create PR but note feedback
66
+
67
+ ## Notes
68
+
69
+ - This is the builder's final self-review before hand-off
70
+ - The PR_SUMMARY in your output can be used as the PR description
71
+ - Focus on "is this ready for someone else to review" not "is this perfect"
72
+ - Any issues found here are cheaper to fix than during integration review
@@ -0,0 +1,55 @@
1
+ # Specification Review Prompt
2
+
3
+ ## Context
4
+ You are reviewing a feature specification at Stage 1 (CONCEIVED) of the workflow. Your role is to ensure the spec is complete, correct, and feasible before it moves to human approval.
5
+
6
+ ## Focus Areas
7
+
8
+ 1. **Completeness**
9
+ - Are all requirements clearly stated?
10
+ - Are success criteria defined?
11
+ - Are edge cases considered?
12
+ - Is scope well-bounded (not too broad or vague)?
13
+
14
+ 2. **Correctness**
15
+ - Do requirements make sense technically?
16
+ - Are there contradictions?
17
+ - Is the problem statement accurate?
18
+
19
+ 3. **Feasibility**
20
+ - Can this be implemented with available tools/constraints?
21
+ - Are there obvious technical blockers?
22
+ - Is the scope realistic for a single spec?
23
+
24
+ 4. **Clarity**
25
+ - Would a builder understand what to build?
26
+ - Are acceptance criteria testable?
27
+ - Is terminology consistent?
28
+
29
+ ## Verdict Format
30
+
31
+ After your review, provide your verdict in exactly this format:
32
+
33
+ ```
34
+ ---
35
+ VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
36
+ SUMMARY: [One-line summary of your assessment]
37
+ CONFIDENCE: [HIGH | MEDIUM | LOW]
38
+ ---
39
+ KEY_ISSUES:
40
+ - [Issue 1 or "None"]
41
+ - [Issue 2]
42
+ ...
43
+ ```
44
+
45
+ **Verdict meanings:**
46
+ - `APPROVE`: Spec is ready for human review
47
+ - `REQUEST_CHANGES`: Significant issues must be fixed before proceeding
48
+ - `COMMENT`: Minor suggestions, can proceed but consider feedback
49
+
50
+ ## Notes
51
+
52
+ - You are NOT reviewing code - you are reviewing the specification document
53
+ - Focus on WHAT is being built, not HOW it will be implemented (that's for plan review)
54
+ - Be constructive - identify issues AND suggest solutions
55
+ - If the spec references other specs, note if context seems missing
@@ -0,0 +1,28 @@
1
+ # Lessons Learned
2
+
3
+ > Extracted from `codev/reviews/`. Last updated: YYYY-MM-DD
4
+
5
+ ## Testing
6
+
7
+ <!-- Lessons about testing patterns, test isolation, mocking, etc. -->
8
+
9
+ ## Architecture
10
+
11
+ <!-- Lessons about system design, state management, file organization -->
12
+
13
+ ## Process
14
+
15
+ <!-- Lessons about protocol execution, consultation, PR workflow -->
16
+
17
+ ## Tooling
18
+
19
+ <!-- Lessons about CLI tools, dependencies, build systems -->
20
+
21
+ ## Integration
22
+
23
+ <!-- Lessons about external APIs, third-party services, auth -->
24
+
25
+ ---
26
+
27
+ *Generated by MAINTAIN protocol from review documents.*
28
+ *To add lessons: document them in review files, then run MAINTAIN.*