@cluesmith/codev 1.1.0 → 1.1.1
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.
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +19 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +18 -1
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/consult.d.ts +16 -0
- package/dist/agent-farm/commands/consult.d.ts.map +1 -0
- package/dist/agent-farm/commands/consult.js +51 -0
- package/dist/agent-farm/commands/consult.js.map +1 -0
- package/dist/agent-farm/commands/open.js +6 -6
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +48 -42
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +8 -14
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/commands/util.js +2 -2
- package/dist/agent-farm/commands/util.js.map +1 -1
- package/dist/agent-farm/db/errors.d.ts +4 -0
- package/dist/agent-farm/db/errors.d.ts.map +1 -1
- package/dist/agent-farm/db/errors.js +8 -0
- package/dist/agent-farm/db/errors.js.map +1 -1
- package/dist/agent-farm/servers/dashboard-server.js +113 -71
- package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
- package/dist/agent-farm/servers/open-server.d.ts +9 -0
- package/dist/agent-farm/servers/open-server.d.ts.map +1 -0
- package/dist/agent-farm/servers/{annotate-server.js → open-server.js} +17 -15
- package/dist/agent-farm/servers/open-server.js.map +1 -0
- package/dist/agent-farm/servers/tower-server.js +4 -7
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/state.d.ts +5 -0
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +17 -0
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +1 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +13 -7
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
- package/dist/agent-farm/utils/port-registry.js +1 -1
- package/dist/agent-farm/utils/port-registry.js.map +1 -1
- package/dist/agent-farm/utils/shell.d.ts +19 -0
- package/dist/agent-farm/utils/shell.d.ts.map +1 -1
- package/dist/agent-farm/utils/shell.js +28 -0
- package/dist/agent-farm/utils/shell.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +3 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +31 -25
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +3 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +128 -54
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +30 -34
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/eject.d.ts +18 -0
- package/dist/commands/eject.d.ts.map +1 -0
- package/dist/commands/eject.js +149 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +32 -27
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/projectlist-parser.d.ts +70 -0
- package/dist/lib/projectlist-parser.d.ts.map +1 -0
- package/dist/lib/projectlist-parser.js +200 -0
- package/dist/lib/projectlist-parser.js.map +1 -0
- package/dist/lib/skeleton.d.ts +41 -0
- package/dist/lib/skeleton.d.ts.map +1 -0
- package/dist/lib/skeleton.js +110 -0
- package/dist/lib/skeleton.js.map +1 -0
- package/dist/lib/templates.d.ts +2 -1
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +11 -10
- package/dist/lib/templates.js.map +1 -1
- package/package.json +4 -3
- package/{templates → skeleton}/DEPENDENCIES.md +2 -48
- package/{templates → skeleton}/agents/codev-updater.md +4 -3
- package/skeleton/bin/agent-farm +7 -0
- package/skeleton/docs/commands/agent-farm.md +469 -0
- package/skeleton/docs/commands/codev.md +253 -0
- package/skeleton/docs/commands/consult.md +286 -0
- package/skeleton/docs/commands/overview.md +107 -0
- package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
- package/{templates → skeleton}/protocols/spider/protocol.md +7 -7
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/plan.md +22 -1
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/spec.md +30 -1
- package/skeleton/protocols/tick/protocol.md +277 -0
- package/skeleton/resources/lessons-learned.md +30 -0
- package/skeleton/resources/workflow-reference.md +229 -0
- package/{templates → skeleton}/roles/architect.md +2 -0
- package/{templates → skeleton}/roles/builder.md +2 -0
- package/skeleton/roles/review-types/impl-review.md +56 -0
- package/skeleton/roles/review-types/integration-review.md +68 -0
- package/skeleton/roles/review-types/plan-review.md +59 -0
- package/skeleton/roles/review-types/pr-ready.md +72 -0
- package/skeleton/roles/review-types/spec-review.md +55 -0
- package/{templates → skeleton}/templates/projectlist.md +17 -16
- package/dist/agent-farm/servers/annotate-server.d.ts +0 -9
- package/dist/agent-farm/servers/annotate-server.d.ts.map +0 -1
- package/dist/agent-farm/servers/annotate-server.js.map +0 -1
- package/templates/annotate.html +0 -903
- package/templates/bin/agent-farm +0 -18
- package/templates/bin/annotate-server.js +0 -140
- package/templates/dashboard-split.html +0 -1679
- package/templates/dashboard.html +0 -149
- package/templates/protocols/spider/templates/plan.md +0 -169
- package/templates/protocols/spider/templates/review.md +0 -207
- package/templates/protocols/spider/templates/spec.md +0 -140
- package/templates/protocols/spider-solo/protocol.md +0 -619
- package/templates/protocols/tick/protocol.md +0 -250
- package/templates/tower.html +0 -1032
- /package/{templates/AGENTS.md → skeleton/AGENTS.md.template} +0 -0
- /package/{templates/CLAUDE.md → skeleton/CLAUDE.md.template} +0 -0
- /package/{templates → skeleton}/agents/architecture-documenter.md +0 -0
- /package/{templates → skeleton}/agents/spider-protocol-updater.md +0 -0
- /package/{templates → skeleton}/bin/codev-doctor +0 -0
- /package/{templates → skeleton}/builders.md +0 -0
- /package/{templates → skeleton}/config.json +0 -0
- /package/{templates → skeleton}/plans/.gitkeep +0 -0
- /package/{templates → skeleton}/protocols/experiment/templates/notes.md +0 -0
- /package/{templates → skeleton}/protocols/maintain/protocol.md +0 -0
- /package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/plan.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/spec.md +0 -0
- /package/{templates → skeleton}/reviews/.gitkeep +0 -0
- /package/{templates → skeleton}/roles/consultant.md +0 -0
- /package/{templates → skeleton}/specs/.gitkeep +0 -0
|
@@ -1,619 +0,0 @@
|
|
|
1
|
-
# SPIDER-SOLO Protocol
|
|
2
|
-
|
|
3
|
-
## Prerequisites
|
|
4
|
-
|
|
5
|
-
**No External Dependencies Required**:
|
|
6
|
-
- SPIDER-SOLO is a single-agent variant that doesn't require Zen MCP
|
|
7
|
-
- All review and validation is done through self-review
|
|
8
|
-
- Ideal when multi-agent infrastructure is not available
|
|
9
|
-
|
|
10
|
-
## Protocol Configuration
|
|
11
|
-
|
|
12
|
-
### Self-Review Only (NO MULTI-AGENT CONSULTATION)
|
|
13
|
-
|
|
14
|
-
**DEFAULT BEHAVIOR:**
|
|
15
|
-
SPIDER-SOLO uses self-review and human approval only.
|
|
16
|
-
|
|
17
|
-
**KEY DIFFERENCE FROM SPIDER:**
|
|
18
|
-
- No multi-agent consultation at any checkpoint
|
|
19
|
-
- All review is done through careful self-examination
|
|
20
|
-
- Emphasis on thorough self-validation before presenting to user
|
|
21
|
-
|
|
22
|
-
**REVIEW APPROACH:**
|
|
23
|
-
- Self-review at each checkpoint where SPIDER would consult agents
|
|
24
|
-
- Use critical thinking to identify gaps and issues
|
|
25
|
-
- Document self-review findings transparently
|
|
26
|
-
- Rely on human feedback for validation
|
|
27
|
-
|
|
28
|
-
## Overview
|
|
29
|
-
SPIDER-SOLO is a single-agent variant of the SPIDER protocol that emphasizes specification-driven development with iterative implementation and continuous self-review. It maintains the same structured approach but without multi-agent collaboration.
|
|
30
|
-
|
|
31
|
-
**Core Principle**: Each feature is tracked through exactly THREE documents - a specification, a plan, and a review with lessons learned - all sharing the same filename and sequential identifier.
|
|
32
|
-
|
|
33
|
-
## When to Use SPIDER-SOLO
|
|
34
|
-
|
|
35
|
-
### Use SPIDER-SOLO for:
|
|
36
|
-
- New feature development (when Zen MCP is not available)
|
|
37
|
-
- Architecture changes (single-agent review)
|
|
38
|
-
- Complex refactoring (self-validated)
|
|
39
|
-
- System design decisions (human-approved)
|
|
40
|
-
- API design and implementation
|
|
41
|
-
- Performance optimization initiatives
|
|
42
|
-
|
|
43
|
-
### Skip SPIDER-SOLO for:
|
|
44
|
-
- Simple bug fixes (< 10 lines)
|
|
45
|
-
- Documentation updates
|
|
46
|
-
- Configuration changes
|
|
47
|
-
- Dependency updates
|
|
48
|
-
- Emergency hotfixes (but do a lightweight retrospective after)
|
|
49
|
-
|
|
50
|
-
## Protocol Phases
|
|
51
|
-
|
|
52
|
-
### S - Specify (Design Exploration with Self-Review)
|
|
53
|
-
|
|
54
|
-
**Purpose**: Thoroughly explore the problem space and solution options before committing to an approach.
|
|
55
|
-
|
|
56
|
-
**Workflow Overview**:
|
|
57
|
-
1. User provides a prompt describing what they want built
|
|
58
|
-
2. Agent generates initial specification document
|
|
59
|
-
3. **COMMIT**: "Initial specification draft"
|
|
60
|
-
4. Self-review the specification critically
|
|
61
|
-
5. Agent updates spec based on self-review
|
|
62
|
-
6. **COMMIT**: "Specification after self-review"
|
|
63
|
-
7. Human reviews and provides comments for changes
|
|
64
|
-
8. Agent makes changes and lists what was modified
|
|
65
|
-
9. **COMMIT**: "Specification with user feedback"
|
|
66
|
-
10. Final self-review of updated document
|
|
67
|
-
11. Final updates based on self-review
|
|
68
|
-
12. **COMMIT**: "Final approved specification"
|
|
69
|
-
13. Iterate steps 7-12 until user approves and says to proceed to planning
|
|
70
|
-
|
|
71
|
-
**Important**: Keep documentation minimal - use only THREE core files with the same name:
|
|
72
|
-
- `specs/####-descriptive-name.md` - The specification
|
|
73
|
-
- `plans/####-descriptive-name.md` - The implementation plan
|
|
74
|
-
- `reviews/####-descriptive-name.md` - Review and lessons learned (created during Review phase)
|
|
75
|
-
|
|
76
|
-
**Process**:
|
|
77
|
-
1. **Clarifying Questions** (ALWAYS START HERE)
|
|
78
|
-
- Ask the user/stakeholder questions to understand the problem
|
|
79
|
-
- Probe for hidden requirements and constraints
|
|
80
|
-
- Understand the business context and goals
|
|
81
|
-
- Identify what's in scope and out of scope
|
|
82
|
-
- Continue asking until the problem is crystal clear
|
|
83
|
-
|
|
84
|
-
2. **Problem Analysis**
|
|
85
|
-
- Clearly articulate the problem being solved
|
|
86
|
-
- Identify stakeholders and their needs
|
|
87
|
-
- Document current state and desired state
|
|
88
|
-
- List assumptions and constraints
|
|
89
|
-
|
|
90
|
-
3. **Solution Exploration**
|
|
91
|
-
- Generate multiple solution approaches (as many as appropriate)
|
|
92
|
-
- For each approach, document:
|
|
93
|
-
- Technical design
|
|
94
|
-
- Trade-offs (pros/cons)
|
|
95
|
-
- Estimated complexity
|
|
96
|
-
- Risk assessment
|
|
97
|
-
|
|
98
|
-
4. **Open Questions**
|
|
99
|
-
- List all uncertainties that need resolution
|
|
100
|
-
- Categorize as:
|
|
101
|
-
- Critical (blocks progress)
|
|
102
|
-
- Important (affects design)
|
|
103
|
-
- Nice-to-know (optimization)
|
|
104
|
-
|
|
105
|
-
5. **Success Criteria**
|
|
106
|
-
- Define measurable acceptance criteria
|
|
107
|
-
- Include performance requirements
|
|
108
|
-
- Specify quality metrics
|
|
109
|
-
- Document test scenarios
|
|
110
|
-
|
|
111
|
-
6. **Self-Review Process**
|
|
112
|
-
- **First Self-Review** (after initial draft):
|
|
113
|
-
- Critically examine problem clarity and solution completeness
|
|
114
|
-
- Look for missing requirements or edge cases
|
|
115
|
-
- Document self-identified improvements
|
|
116
|
-
- Update specification based on self-review
|
|
117
|
-
- **Second Self-Review** (after human comments):
|
|
118
|
-
- Validate changes align with feedback
|
|
119
|
-
- Ensure specification is comprehensive
|
|
120
|
-
- Final specification refinement
|
|
121
|
-
|
|
122
|
-
**Note**: Self-review only - no multi-agent consultation in SOLO variant
|
|
123
|
-
|
|
124
|
-
**⚠️ IMPORTANT**: Thorough self-review is critical before proceeding
|
|
125
|
-
|
|
126
|
-
**Output**: Single specification document in `codev/specs/####-descriptive-name.md`
|
|
127
|
-
- All self-review findings incorporated directly into this document
|
|
128
|
-
- Include a "Self-Review Notes" section summarizing identified improvements
|
|
129
|
-
- Version control captures evolution through commits
|
|
130
|
-
**Template**: `templates/spec.md`
|
|
131
|
-
**Review Required**: Yes - Human approval AFTER self-review
|
|
132
|
-
|
|
133
|
-
### P - Plan (Structured Decomposition)
|
|
134
|
-
|
|
135
|
-
**Purpose**: Transform the approved specification into an executable roadmap with clear phases.
|
|
136
|
-
|
|
137
|
-
**⚠️ CRITICAL: No Time Estimates in the AI Age**
|
|
138
|
-
- **NEVER include time estimates** (hours, days, weeks, story points)
|
|
139
|
-
- AI-driven development makes traditional time estimates meaningless
|
|
140
|
-
- Delivery speed depends on iteration cycles, not calendar time
|
|
141
|
-
- Focus on logical dependencies and phase ordering instead
|
|
142
|
-
- Measure progress by completed phases, not elapsed time
|
|
143
|
-
- The only valid metrics are: "done" or "not done"
|
|
144
|
-
|
|
145
|
-
**Workflow Overview**:
|
|
146
|
-
1. Agent creates initial plan document
|
|
147
|
-
2. **COMMIT**: "Initial plan draft"
|
|
148
|
-
3. Self-review the plan thoroughly
|
|
149
|
-
4. Agent updates plan with self-review findings
|
|
150
|
-
5. **COMMIT**: "Plan after self-review"
|
|
151
|
-
6. User reviews and requests modifications
|
|
152
|
-
7. Agent updates plan based on user feedback
|
|
153
|
-
8. **COMMIT**: "Plan with user feedback"
|
|
154
|
-
9. Final self-review of updated plan
|
|
155
|
-
10. Final updates based on self-review
|
|
156
|
-
11. **COMMIT**: "Final approved plan"
|
|
157
|
-
12. Iterate steps 6-11 until agreement is reached
|
|
158
|
-
|
|
159
|
-
**Phase Design Goals**:
|
|
160
|
-
Each phase should be:
|
|
161
|
-
- A separate piece of work that can be checked in as a unit
|
|
162
|
-
- A complete set of functionality
|
|
163
|
-
- Self-contained and independently valuable
|
|
164
|
-
|
|
165
|
-
**Process**:
|
|
166
|
-
1. **Phase Definition**
|
|
167
|
-
- Break work into logical phases
|
|
168
|
-
- Each phase must:
|
|
169
|
-
- Have a clear, single objective
|
|
170
|
-
- Be independently testable
|
|
171
|
-
- Deliver observable value
|
|
172
|
-
- Be a complete unit that can be committed
|
|
173
|
-
- End with evaluation discussion and single commit
|
|
174
|
-
- Note dependencies inline, for example:
|
|
175
|
-
```markdown
|
|
176
|
-
Phase 2: API Endpoints
|
|
177
|
-
- Depends on: Phase 1 (Database Schema)
|
|
178
|
-
- Objective: Create /users and /todos endpoints
|
|
179
|
-
- Evaluation: Test coverage, API design review, performance check
|
|
180
|
-
- Commit: Will create single commit after user approval
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
2. **Success Metrics**
|
|
184
|
-
- Define "done" for each phase
|
|
185
|
-
- Include test coverage requirements
|
|
186
|
-
- Specify performance benchmarks
|
|
187
|
-
- Document acceptance tests
|
|
188
|
-
|
|
189
|
-
3. **Self-Review Process**
|
|
190
|
-
- **First Self-Review** (after plan creation):
|
|
191
|
-
- Assess feasibility and phase breakdown
|
|
192
|
-
- Verify completeness of planned approach
|
|
193
|
-
- Update plan based on self-identified gaps
|
|
194
|
-
- **Second Self-Review** (after human review):
|
|
195
|
-
- Validate adjustments align with feedback
|
|
196
|
-
- Confirm approach is sound
|
|
197
|
-
- Final plan refinement
|
|
198
|
-
|
|
199
|
-
**Note**: Self-review only - no multi-agent consultation in SOLO variant
|
|
200
|
-
|
|
201
|
-
**⚠️ IMPORTANT**: Comprehensive self-review required before proceeding
|
|
202
|
-
|
|
203
|
-
**Output**: Single plan document in `codev/plans/####-descriptive-name.md`
|
|
204
|
-
- Same filename as specification, different directory
|
|
205
|
-
- All self-review findings incorporated directly
|
|
206
|
-
- Include phase status tracking within this document
|
|
207
|
-
- **DO NOT include time estimates** - Focus on deliverables and dependencies, not hours/days
|
|
208
|
-
- Version control captures evolution through commits
|
|
209
|
-
**Template**: `templates/plan.md`
|
|
210
|
-
**Review Required**: Yes - Technical lead approval AFTER self-review
|
|
211
|
-
|
|
212
|
-
### (IDE) - Implementation Loop
|
|
213
|
-
|
|
214
|
-
Execute for each phase in the plan. This is a strict cycle that must be completed in order.
|
|
215
|
-
|
|
216
|
-
**⚠️ MANDATORY**: The I-D-E cycle MUST be completed for EACH PHASE, not just at the end of all phases. Skipping D (Defend) or E (Evaluate) for any phase is a PROTOCOL VIOLATION.
|
|
217
|
-
|
|
218
|
-
**CRITICAL PRECONDITION**: Before starting any phase, verify the previous phase was committed to git. No phase can begin without the prior phase's commit.
|
|
219
|
-
|
|
220
|
-
**Phase Completion Process**:
|
|
221
|
-
1. **Implement** - Build the code for this phase
|
|
222
|
-
2. **Defend** - Write comprehensive tests that guard functionality
|
|
223
|
-
3. **Evaluate** - Assess and discuss with user
|
|
224
|
-
4. **Commit** - Single atomic commit for the phase (MANDATORY before next phase)
|
|
225
|
-
5. **Proceed** - Move to next phase only after commit
|
|
226
|
-
|
|
227
|
-
**Handling Failures**:
|
|
228
|
-
- If **Defend** phase reveals gaps → return to **Implement** to fix
|
|
229
|
-
- If **Evaluation** reveals unmet criteria → return to **Implement**
|
|
230
|
-
- If user requests changes → return to **Implement**
|
|
231
|
-
- If fundamental plan flaws found → mark phase as `blocked` and revise plan
|
|
232
|
-
|
|
233
|
-
**Commit Requirements**:
|
|
234
|
-
- Each phase MUST end with a git commit before proceeding
|
|
235
|
-
- Commit message format: `[Spec ####][Phase: name] type: Description`
|
|
236
|
-
- No work on the next phase until current phase is committed
|
|
237
|
-
- If changes are needed after commit, create a new commit with fixes
|
|
238
|
-
|
|
239
|
-
#### I - Implement (Build with Discipline)
|
|
240
|
-
|
|
241
|
-
**Purpose**: Transform the plan into working code with high quality standards.
|
|
242
|
-
|
|
243
|
-
**Precondition**: Previous phase must be committed (verify with `git log`)
|
|
244
|
-
|
|
245
|
-
**Requirements**:
|
|
246
|
-
1. **Pre-Implementation**
|
|
247
|
-
- Verify previous phase is committed to git
|
|
248
|
-
- Review the phase plan and success criteria
|
|
249
|
-
- Set up the development environment
|
|
250
|
-
- Create feature branch following naming convention
|
|
251
|
-
- Document any plan deviations immediately
|
|
252
|
-
|
|
253
|
-
2. **During Implementation**
|
|
254
|
-
- Write self-documenting code
|
|
255
|
-
- Follow project style guide strictly
|
|
256
|
-
- Implement incrementally with frequent commits
|
|
257
|
-
- Each commit must:
|
|
258
|
-
- Be atomic (single logical change)
|
|
259
|
-
- Include descriptive message
|
|
260
|
-
- Reference the phase
|
|
261
|
-
- Pass basic syntax checks
|
|
262
|
-
|
|
263
|
-
3. **Code Quality Standards**
|
|
264
|
-
- No commented-out code
|
|
265
|
-
- No debug prints in final code
|
|
266
|
-
- Handle all error cases explicitly
|
|
267
|
-
- Include necessary logging
|
|
268
|
-
- Follow security best practices
|
|
269
|
-
|
|
270
|
-
4. **Documentation Requirements**
|
|
271
|
-
- Update API documentation
|
|
272
|
-
- Add inline comments for complex logic
|
|
273
|
-
- Update README if needed
|
|
274
|
-
- Document configuration changes
|
|
275
|
-
|
|
276
|
-
**Evidence Required**:
|
|
277
|
-
- Link to commits
|
|
278
|
-
- Code review approval (if applicable)
|
|
279
|
-
- No linting errors
|
|
280
|
-
- CI pipeline pass link (build/test/lint)
|
|
281
|
-
|
|
282
|
-
**Self-Review Process**:
|
|
283
|
-
- Critically review code quality, patterns, security, best practices
|
|
284
|
-
- Look for potential improvements and issues
|
|
285
|
-
- Update code based on self-identified concerns before proceeding
|
|
286
|
-
|
|
287
|
-
#### D - Defend (Write Comprehensive Tests)
|
|
288
|
-
|
|
289
|
-
**Purpose**: Create comprehensive automated tests that safeguard intended behavior and prevent regressions.
|
|
290
|
-
|
|
291
|
-
**CRITICAL**: Tests must be written IMMEDIATELY after implementation, NOT retroactively at the end of all phases. This is MANDATORY.
|
|
292
|
-
|
|
293
|
-
**Requirements**:
|
|
294
|
-
1. **Defensive Test Creation**
|
|
295
|
-
- Write unit tests for all new functions
|
|
296
|
-
- Create integration tests for feature flows
|
|
297
|
-
- Develop edge case coverage
|
|
298
|
-
- Build error condition tests
|
|
299
|
-
- Establish performance benchmarks
|
|
300
|
-
|
|
301
|
-
2. **Test Validation** (ALL MANDATORY)
|
|
302
|
-
- All new tests must pass
|
|
303
|
-
- All existing tests must pass
|
|
304
|
-
- No reduction in overall coverage
|
|
305
|
-
- Performance benchmarks met
|
|
306
|
-
- Security scans pass
|
|
307
|
-
- **Avoid Overmocking**:
|
|
308
|
-
- Test behavior, not implementation details
|
|
309
|
-
- Prefer integration tests over unit tests with heavy mocking
|
|
310
|
-
- Only mock external dependencies (APIs, databases, file systems)
|
|
311
|
-
- Never mock the system under test itself
|
|
312
|
-
- Use real implementations for internal module boundaries
|
|
313
|
-
|
|
314
|
-
3. **Test Suite Documentation**
|
|
315
|
-
- Document test scenarios
|
|
316
|
-
- Explain complex test setups
|
|
317
|
-
- Note any flaky tests
|
|
318
|
-
- Record performance baselines
|
|
319
|
-
|
|
320
|
-
**Evidence Required**:
|
|
321
|
-
- Test execution logs
|
|
322
|
-
- Coverage report (show no reduction)
|
|
323
|
-
- Performance test results (if applicable per spec)
|
|
324
|
-
- Security scan results (if configured)
|
|
325
|
-
- CI test run link with artifacts
|
|
326
|
-
|
|
327
|
-
**Self-Review Process**:
|
|
328
|
-
- Review test coverage completeness and edge cases
|
|
329
|
-
- Assess defensive patterns and test strategy
|
|
330
|
-
- Write additional tests based on self-identified gaps
|
|
331
|
-
- Document review findings for evaluation discussion
|
|
332
|
-
|
|
333
|
-
#### E - Evaluate (Assess Objectively)
|
|
334
|
-
|
|
335
|
-
**Purpose**: Verify the implementation fully satisfies the phase requirements and maintains system quality. This is where the critical discussion happens before committing the phase.
|
|
336
|
-
|
|
337
|
-
**Requirements**:
|
|
338
|
-
1. **Functional Evaluation**
|
|
339
|
-
- All acceptance criteria met
|
|
340
|
-
- User scenarios work as expected
|
|
341
|
-
- Edge cases handled properly
|
|
342
|
-
- Error messages are helpful
|
|
343
|
-
|
|
344
|
-
2. **Non-Functional Evaluation**
|
|
345
|
-
- Performance requirements satisfied
|
|
346
|
-
- Security standards maintained
|
|
347
|
-
- Code maintainability assessed
|
|
348
|
-
- Technical debt documented
|
|
349
|
-
|
|
350
|
-
3. **Deviation Analysis**
|
|
351
|
-
- Document any changes from plan
|
|
352
|
-
- Explain reasoning for changes
|
|
353
|
-
- Assess impact on other phases
|
|
354
|
-
- Update future phases if needed
|
|
355
|
-
- **Overmocking Check** (MANDATORY):
|
|
356
|
-
- Verify tests focus on behavior, not implementation
|
|
357
|
-
- Ensure at least one integration test per critical path
|
|
358
|
-
- Check that internal module boundaries use real implementations
|
|
359
|
-
- Confirm mocks are only used for external dependencies
|
|
360
|
-
- Tests should survive refactoring that preserves behavior
|
|
361
|
-
|
|
362
|
-
4. **Final Self-Review Before User Evaluation**
|
|
363
|
-
- Perform thorough self-assessment of the phase
|
|
364
|
-
- Identify and fix any remaining issues
|
|
365
|
-
- **CRITICAL**: Ensure high confidence in the implementation
|
|
366
|
-
- Only proceed to user evaluation after thorough self-validation
|
|
367
|
-
- If any doubts remain, address them FIRST
|
|
368
|
-
|
|
369
|
-
5. **Evaluation Discussion with User**
|
|
370
|
-
- Present to user: "Phase X complete. Here's what was built: [summary]"
|
|
371
|
-
- Share test results and coverage metrics
|
|
372
|
-
- Share self-review findings and confidence level
|
|
373
|
-
- Ask: "Any changes needed before I commit this phase?"
|
|
374
|
-
- Incorporate user feedback if requested
|
|
375
|
-
- Get explicit approval to proceed
|
|
376
|
-
|
|
377
|
-
6. **Phase Commit** (MANDATORY - NO EXCEPTIONS)
|
|
378
|
-
- Create single atomic commit for the entire phase
|
|
379
|
-
- Commit message: `[Spec ####][Phase: name] type: Description`
|
|
380
|
-
- Update the plan document marking this phase as complete
|
|
381
|
-
- Push all changes to version control
|
|
382
|
-
- Document any deviations or decisions in the plan
|
|
383
|
-
- **CRITICAL**: Next phase CANNOT begin until this commit is complete
|
|
384
|
-
- Verify commit with `git log` before proceeding
|
|
385
|
-
|
|
386
|
-
7. **Final Verification**
|
|
387
|
-
- Confirm all self-review findings were addressed
|
|
388
|
-
- Verify all tests pass
|
|
389
|
-
- Check that documentation is updated
|
|
390
|
-
- Ensure no outstanding concerns from user
|
|
391
|
-
|
|
392
|
-
**Evidence Required**:
|
|
393
|
-
- Evaluation checklist completed
|
|
394
|
-
- Test results and coverage report
|
|
395
|
-
- Self-review notes and findings
|
|
396
|
-
- User approval from evaluation discussion
|
|
397
|
-
- Updated plan document with:
|
|
398
|
-
- Phase marked complete
|
|
399
|
-
- Evaluation discussion summary
|
|
400
|
-
- Any deviations noted
|
|
401
|
-
- Git commit for this phase
|
|
402
|
-
- Final CI run link after all fixes
|
|
403
|
-
|
|
404
|
-
## 📋 PHASE COMPLETION CHECKLIST (MANDATORY BEFORE NEXT PHASE)
|
|
405
|
-
|
|
406
|
-
**⚠️ STOP: DO NOT PROCEED TO NEXT PHASE UNTIL ALL ITEMS ARE ✅**
|
|
407
|
-
|
|
408
|
-
### Before Starting ANY Phase:
|
|
409
|
-
- [ ] Previous phase is committed to git (verify with `git log`)
|
|
410
|
-
- [ ] Plan document shows previous phase as `completed`
|
|
411
|
-
- [ ] No outstanding issues from previous phase
|
|
412
|
-
|
|
413
|
-
### After Implement Phase:
|
|
414
|
-
- [ ] All code for this phase is complete
|
|
415
|
-
- [ ] Code follows project style guide
|
|
416
|
-
- [ ] No commented-out code or debug prints
|
|
417
|
-
- [ ] Error handling is implemented
|
|
418
|
-
- [ ] Documentation is updated (if needed)
|
|
419
|
-
- [ ] Self-review completed (critical examination)
|
|
420
|
-
- [ ] Self-identified issues have been fixed
|
|
421
|
-
|
|
422
|
-
### After Defend Phase:
|
|
423
|
-
- [ ] Unit tests written for all new functions
|
|
424
|
-
- [ ] Integration tests written for critical paths
|
|
425
|
-
- [ ] Edge cases have test coverage
|
|
426
|
-
- [ ] All new tests are passing
|
|
427
|
-
- [ ] All existing tests still pass
|
|
428
|
-
- [ ] No reduction in code coverage
|
|
429
|
-
- [ ] Overmocking check completed (tests focus on behavior)
|
|
430
|
-
- [ ] Self-review of test coverage completed
|
|
431
|
-
- [ ] Test gaps identified and addressed
|
|
432
|
-
|
|
433
|
-
### After Evaluate Phase:
|
|
434
|
-
- [ ] All acceptance criteria from spec are met
|
|
435
|
-
- [ ] Performance requirements satisfied
|
|
436
|
-
- [ ] Security standards maintained
|
|
437
|
-
- [ ] Thorough self-assessment completed
|
|
438
|
-
- [ ] High confidence in implementation achieved
|
|
439
|
-
- [ ] User evaluation discussion completed
|
|
440
|
-
- [ ] User has given explicit approval to proceed
|
|
441
|
-
- [ ] Plan document updated with phase status
|
|
442
|
-
- [ ] Phase commit created with proper message format
|
|
443
|
-
- [ ] Commit pushed to version control
|
|
444
|
-
- [ ] Commit verified with `git log`
|
|
445
|
-
|
|
446
|
-
### ❌ PHASE BLOCKERS (Fix Before Proceeding):
|
|
447
|
-
- Any failing tests
|
|
448
|
-
- Unresolved self-review concerns
|
|
449
|
-
- Missing user approval
|
|
450
|
-
- Uncommitted changes
|
|
451
|
-
- Incomplete documentation
|
|
452
|
-
- Coverage reduction
|
|
453
|
-
- Low confidence in implementation
|
|
454
|
-
|
|
455
|
-
**REMINDER**: Each phase is atomic. You cannot start the next phase until the current phase is fully complete, tested, evaluated, and committed.
|
|
456
|
-
|
|
457
|
-
### R - Review/Refine/Revise (Continuous Improvement)
|
|
458
|
-
|
|
459
|
-
**Purpose**: Ensure overall coherence, capture learnings, and improve the methodology.
|
|
460
|
-
|
|
461
|
-
**Precondition**: All implementation phases must be committed (verify with `git log --oneline | grep "\[Phase"`)
|
|
462
|
-
|
|
463
|
-
**Process**:
|
|
464
|
-
1. **Comprehensive Review**
|
|
465
|
-
- Verify all phases have been committed to git
|
|
466
|
-
- Compare final implementation to original specification
|
|
467
|
-
- Assess overall architecture impact
|
|
468
|
-
- Review code quality across all changes
|
|
469
|
-
- Validate documentation completeness
|
|
470
|
-
|
|
471
|
-
2. **Refinement Actions**
|
|
472
|
-
- Refactor code for clarity if needed
|
|
473
|
-
- Optimize performance bottlenecks
|
|
474
|
-
- Improve test coverage gaps
|
|
475
|
-
- Enhance documentation
|
|
476
|
-
|
|
477
|
-
3. **Revision Requirements** (MANDATORY)
|
|
478
|
-
- Update README.md with any new features or changes
|
|
479
|
-
- Update AGENTS.md and CLAUDE.md with protocol improvements from lessons learned
|
|
480
|
-
- Update specification and plan documents with final status
|
|
481
|
-
- Revise architectural diagrams if needed
|
|
482
|
-
- Update API documentation
|
|
483
|
-
- Modify deployment guides as necessary
|
|
484
|
-
- **CRITICAL**: Update this protocol document based on lessons learned
|
|
485
|
-
|
|
486
|
-
4. **Systematic Issue Review** (MANDATORY)
|
|
487
|
-
- Review entire project for systematic issues:
|
|
488
|
-
- Repeated problems across phases
|
|
489
|
-
- Process bottlenecks or inefficiencies
|
|
490
|
-
- Missing documentation patterns
|
|
491
|
-
- Technical debt accumulation
|
|
492
|
-
- Testing gaps or quality issues
|
|
493
|
-
- Document systematic findings in lessons learned
|
|
494
|
-
- Create action items for addressing systematic issues
|
|
495
|
-
|
|
496
|
-
5. **Lessons Learned** (MANDATORY)
|
|
497
|
-
- What went well?
|
|
498
|
-
- What was challenging?
|
|
499
|
-
- What would you do differently?
|
|
500
|
-
- What methodology improvements are needed?
|
|
501
|
-
- What systematic issues were identified?
|
|
502
|
-
|
|
503
|
-
6. **Methodology Evolution**
|
|
504
|
-
- Propose process improvements based on lessons
|
|
505
|
-
- Update protocol documents with improvements
|
|
506
|
-
- Update templates if needed
|
|
507
|
-
- Share learnings with team
|
|
508
|
-
- Document in `codev/reviews/`
|
|
509
|
-
- **Important**: This protocol should evolve based on each project's learnings
|
|
510
|
-
|
|
511
|
-
**Output**:
|
|
512
|
-
- Single review document in `codev/reviews/####-descriptive-name.md`
|
|
513
|
-
- Same filename as spec/plan, captures review and learnings from this feature
|
|
514
|
-
- Methodology improvement proposals (update protocol if needed)
|
|
515
|
-
|
|
516
|
-
**Review Required**: Yes - Team retrospective recommended
|
|
517
|
-
|
|
518
|
-
## File Naming Conventions
|
|
519
|
-
|
|
520
|
-
### Specifications and Plans
|
|
521
|
-
Format: `####-descriptive-name.md`
|
|
522
|
-
- Use sequential numbering (0001, 0002, etc.)
|
|
523
|
-
- Same filename in both `specs/` and `plans/` directories
|
|
524
|
-
- Example: `0001-user-authentication.md`
|
|
525
|
-
|
|
526
|
-
## Status Tracking
|
|
527
|
-
|
|
528
|
-
Status is tracked at the **phase level** within plan documents, not at the document level.
|
|
529
|
-
|
|
530
|
-
Each phase in a plan should have a status:
|
|
531
|
-
- `pending`: Not started
|
|
532
|
-
- `in-progress`: Currently being worked on
|
|
533
|
-
- `completed`: Phase finished and tested
|
|
534
|
-
- `blocked`: Cannot proceed due to external factors
|
|
535
|
-
|
|
536
|
-
## Git Integration
|
|
537
|
-
|
|
538
|
-
### Commit Message Format
|
|
539
|
-
|
|
540
|
-
For specification/plan documents:
|
|
541
|
-
```
|
|
542
|
-
[Spec ####] <stage>: <description>
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
Examples:
|
|
546
|
-
```
|
|
547
|
-
[Spec 0001] Initial specification draft
|
|
548
|
-
[Spec 0001] Specification after self-review
|
|
549
|
-
[Spec 0001] Specification with user feedback
|
|
550
|
-
[Spec 0001] Final approved specification
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
For implementation:
|
|
554
|
-
```
|
|
555
|
-
[Spec ####][Phase: <phase-name>] <type>: <description>
|
|
556
|
-
|
|
557
|
-
<optional detailed description>
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
Example:
|
|
561
|
-
```
|
|
562
|
-
[Spec 0001][Phase: user-auth] feat: Add password hashing service
|
|
563
|
-
|
|
564
|
-
Implements bcrypt-based password hashing with configurable rounds
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
### Branch Naming
|
|
568
|
-
```
|
|
569
|
-
spider/####-<spec-name>/<phase-name>
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
Example:
|
|
573
|
-
```
|
|
574
|
-
spider/0001-user-authentication/database-schema
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
## Best Practices
|
|
579
|
-
|
|
580
|
-
### During Specification
|
|
581
|
-
- Use clear, unambiguous language
|
|
582
|
-
- Include concrete examples
|
|
583
|
-
- Define measurable success criteria
|
|
584
|
-
- Link to relevant references
|
|
585
|
-
|
|
586
|
-
### During Planning
|
|
587
|
-
- Keep phases small and focused
|
|
588
|
-
- Ensure each phase delivers value
|
|
589
|
-
- Note phase dependencies inline (no formal dependency mapping needed)
|
|
590
|
-
- Include rollback strategies
|
|
591
|
-
|
|
592
|
-
### During Implementation
|
|
593
|
-
- Follow the plan but document deviations
|
|
594
|
-
- Maintain test coverage
|
|
595
|
-
- Keep commits atomic and well-described
|
|
596
|
-
- Update documentation as you go
|
|
597
|
-
|
|
598
|
-
### During Review
|
|
599
|
-
- Check against original specification
|
|
600
|
-
- Document lessons learned
|
|
601
|
-
- Propose methodology improvements
|
|
602
|
-
- Update estimates for future work
|
|
603
|
-
|
|
604
|
-
## Templates
|
|
605
|
-
|
|
606
|
-
Templates for each phase are available in the `templates/` directory:
|
|
607
|
-
- `spec.md` - Specification template
|
|
608
|
-
- `plan.md` - Planning template (includes phase status tracking)
|
|
609
|
-
- `review.md` - Review and lessons learned template
|
|
610
|
-
|
|
611
|
-
**Remember**: Only create THREE documents per feature - spec, plan, and review with the same filename in different directories.
|
|
612
|
-
|
|
613
|
-
## Protocol Evolution
|
|
614
|
-
|
|
615
|
-
This protocol can be customized per project:
|
|
616
|
-
1. Fork the protocol directory
|
|
617
|
-
2. Modify templates and processes
|
|
618
|
-
3. Document changes in `protocol-changes.md`
|
|
619
|
-
4. Share improvements back to the community
|