@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
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# TICK Protocol
|
|
2
|
+
**T**ask **I**dentification, **C**oding, **K**ickout
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
TICK is an **amendment workflow** for existing SPIDER specifications. Rather than creating new standalone specs, TICK modifies existing spec and plan documents in-place, tracking changes in an "Amendments" section.
|
|
7
|
+
|
|
8
|
+
**Core Principle**: TICK is for *refining* existing specs. SPIDER is for *creating* new specs.
|
|
9
|
+
|
|
10
|
+
**Key Insight**: TICKs are not small SPIDERs - they're amendments to existing SPIDERs. This eliminates the "TICK vs SPIDER" decision problem and keeps related work together.
|
|
11
|
+
|
|
12
|
+
## When to Use TICK
|
|
13
|
+
|
|
14
|
+
### Use TICK when:
|
|
15
|
+
- Making **amendments to an existing SPIDER spec** that is already `integrated`
|
|
16
|
+
- Small scope (< 300 lines of new/changed code)
|
|
17
|
+
- Requirements are clear and well-defined
|
|
18
|
+
- No fundamental architecture changes
|
|
19
|
+
- Examples:
|
|
20
|
+
- Adding a feature to an existing system (e.g., "add password reset to user auth")
|
|
21
|
+
- Bug fixes that extend existing functionality
|
|
22
|
+
- Configuration changes with logic
|
|
23
|
+
- Utility function additions to existing modules
|
|
24
|
+
- Refactoring within an existing feature
|
|
25
|
+
|
|
26
|
+
### Use SPIDER instead when:
|
|
27
|
+
- Creating a **new feature from scratch** (no existing spec to amend)
|
|
28
|
+
- Major architecture changes (scope too large for amendment)
|
|
29
|
+
- Unclear requirements needing exploration
|
|
30
|
+
- > 300 lines of code
|
|
31
|
+
- Multiple stakeholders need alignment
|
|
32
|
+
|
|
33
|
+
### Cannot Use TICK when:
|
|
34
|
+
- No relevant SPIDER spec exists (create a new SPIDER spec instead)
|
|
35
|
+
- Target spec is not yet `integrated` (complete the SPIDER cycle first)
|
|
36
|
+
|
|
37
|
+
## Amendment Workflow
|
|
38
|
+
|
|
39
|
+
### Phase 1: Identify Target Spec
|
|
40
|
+
|
|
41
|
+
**Input**: User describes the amendment needed
|
|
42
|
+
|
|
43
|
+
**Agent Actions**:
|
|
44
|
+
1. Analyze the amendment requirements
|
|
45
|
+
2. Search for the relevant existing spec to amend
|
|
46
|
+
3. Verify the spec exists and is `integrated`
|
|
47
|
+
4. Load current spec and plan documents
|
|
48
|
+
5. Determine next TICK number (count existing TICK entries + 1)
|
|
49
|
+
|
|
50
|
+
**Example**:
|
|
51
|
+
```
|
|
52
|
+
User: "Use TICK to add password reset to the auth system"
|
|
53
|
+
Agent finds: specs/0002-user-authentication.md (status: integrated)
|
|
54
|
+
Agent determines: Next TICK is TICK-001 (first amendment)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Phase 2: Specification Amendment (Autonomous)
|
|
58
|
+
|
|
59
|
+
**Agent Actions**:
|
|
60
|
+
1. Analyze what needs to change in the spec
|
|
61
|
+
2. Update relevant sections of `specs/####-name.md`:
|
|
62
|
+
- Problem Statement (if scope expands)
|
|
63
|
+
- Success Criteria (if new criteria added)
|
|
64
|
+
- Solution Approaches (if design changes)
|
|
65
|
+
- Any other section that needs updating
|
|
66
|
+
3. Add entry to "Amendments" section at bottom:
|
|
67
|
+
```markdown
|
|
68
|
+
### TICK-001: [Title] (YYYY-MM-DD)
|
|
69
|
+
|
|
70
|
+
**Summary**: [One-line description]
|
|
71
|
+
|
|
72
|
+
**Problem Addressed**:
|
|
73
|
+
[Why this amendment was needed]
|
|
74
|
+
|
|
75
|
+
**Spec Changes**:
|
|
76
|
+
- [Section]: [What changed]
|
|
77
|
+
|
|
78
|
+
**Plan Changes**:
|
|
79
|
+
- [Phase/steps]: [What was added/modified]
|
|
80
|
+
|
|
81
|
+
**Review**: See `reviews/####-name-tick-001.md`
|
|
82
|
+
```
|
|
83
|
+
4. **COMMIT**: `[TICK ####-NNN] Spec: [description]`
|
|
84
|
+
|
|
85
|
+
### Phase 3: Planning Amendment (Autonomous)
|
|
86
|
+
|
|
87
|
+
**Agent Actions**:
|
|
88
|
+
1. Update `plans/####-name.md` with new implementation steps
|
|
89
|
+
2. Add/modify phases as needed
|
|
90
|
+
3. Add entry to "Amendment History" section at bottom:
|
|
91
|
+
```markdown
|
|
92
|
+
### TICK-001: [Title] (YYYY-MM-DD)
|
|
93
|
+
|
|
94
|
+
**Changes**:
|
|
95
|
+
- [Phase added]: [Description]
|
|
96
|
+
- [Implementation steps]: [What was updated]
|
|
97
|
+
|
|
98
|
+
**Review**: See `reviews/####-name-tick-001.md`
|
|
99
|
+
```
|
|
100
|
+
4. **COMMIT**: `[TICK ####-NNN] Plan: [description]`
|
|
101
|
+
|
|
102
|
+
### Phase 4: Implementation (Autonomous)
|
|
103
|
+
|
|
104
|
+
**Agent Actions**:
|
|
105
|
+
1. Execute implementation steps from the plan
|
|
106
|
+
2. Write code following fail-fast principles
|
|
107
|
+
3. Test functionality
|
|
108
|
+
4. **COMMIT**: `[TICK ####-NNN] Impl: [description]`
|
|
109
|
+
|
|
110
|
+
### Phase 5: Review (User Checkpoint)
|
|
111
|
+
|
|
112
|
+
**Agent Actions**:
|
|
113
|
+
1. Create review document: `reviews/####-name-tick-NNN.md`
|
|
114
|
+
- What was amended and why
|
|
115
|
+
- Changes made to spec and plan
|
|
116
|
+
- Implementation challenges
|
|
117
|
+
- Lessons learned
|
|
118
|
+
2. **Multi-Agent Consultation** (MANDATORY):
|
|
119
|
+
- Consult GPT-5 AND Gemini Pro
|
|
120
|
+
- Focus: Code quality, missed issues, improvements
|
|
121
|
+
- Update review with consultation feedback
|
|
122
|
+
3. **Update Architecture Documentation** (if applicable)
|
|
123
|
+
4. **COMMIT**: `[TICK ####-NNN] Review: [description]`
|
|
124
|
+
5. **PRESENT TO USER**: Show summary with consultation insights
|
|
125
|
+
|
|
126
|
+
**User Actions**:
|
|
127
|
+
- Review completed work
|
|
128
|
+
- Provide feedback
|
|
129
|
+
- Request changes OR approve
|
|
130
|
+
|
|
131
|
+
**If Changes Requested**:
|
|
132
|
+
- Agent makes changes
|
|
133
|
+
- Commits: `[TICK ####-NNN] Fixes: [description]`
|
|
134
|
+
- Updates review document
|
|
135
|
+
- Repeats until user approval
|
|
136
|
+
|
|
137
|
+
## File Naming Convention
|
|
138
|
+
|
|
139
|
+
TICK amendments modify existing files and create new review files:
|
|
140
|
+
|
|
141
|
+
| File Type | Pattern | Example |
|
|
142
|
+
|-----------|---------|---------|
|
|
143
|
+
| Spec (modified) | `specs/####-name.md` | `specs/0002-user-authentication.md` |
|
|
144
|
+
| Plan (modified) | `plans/####-name.md` | `plans/0002-user-authentication.md` |
|
|
145
|
+
| Review (new) | `reviews/####-name-tick-NNN.md` | `reviews/0002-user-authentication-tick-001.md` |
|
|
146
|
+
|
|
147
|
+
**Note**: Spec and plan files are modified in-place. Only the review file is new.
|
|
148
|
+
|
|
149
|
+
## Git Commit Strategy
|
|
150
|
+
|
|
151
|
+
**TICK commits reference the parent spec and TICK number**:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
[TICK 0002-001] Spec: Add password reset feature
|
|
155
|
+
[TICK 0002-001] Plan: Add password reset implementation
|
|
156
|
+
[TICK 0002-001] Impl: Add password reset feature
|
|
157
|
+
[TICK 0002-001] Review: Password reset implementation
|
|
158
|
+
[TICK 0002-001] Fixes: Address review feedback
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The format `[TICK ####-NNN]` identifies:
|
|
162
|
+
- `####`: Parent spec number (e.g., 0002)
|
|
163
|
+
- `NNN`: TICK amendment number (e.g., 001, 002, 003)
|
|
164
|
+
|
|
165
|
+
## Key Differences from SPIDER
|
|
166
|
+
|
|
167
|
+
| Aspect | SPIDER | TICK |
|
|
168
|
+
|--------|--------|------|
|
|
169
|
+
| Purpose | Create new features | Amend existing features |
|
|
170
|
+
| File creation | Creates new spec/plan/review | Modifies spec/plan, creates review |
|
|
171
|
+
| Sequential numbering | Gets new number (0001, 0002) | Uses parent's number (0002-001) |
|
|
172
|
+
| Scope | Any size | < 300 lines typically |
|
|
173
|
+
| Prerequisites | None | Existing integrated spec required |
|
|
174
|
+
| User checkpoints | Multiple (spec, plan, phases) | Two (start, end) |
|
|
175
|
+
| Multi-agent consultation | Throughout | End only (review) |
|
|
176
|
+
|
|
177
|
+
## Protocol Selection Guide
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Is there an existing spec to amend?
|
|
181
|
+
├── NO → Use SPIDER (create new spec)
|
|
182
|
+
└── YES → Is it integrated?
|
|
183
|
+
├── NO → Complete SPIDER cycle first
|
|
184
|
+
└── YES → Is the change small (<300 LOC)?
|
|
185
|
+
├── YES → Use TICK (amend existing spec)
|
|
186
|
+
└── NO → Use SPIDER (scope too large)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Mental Model**:
|
|
190
|
+
- SPIDER = Create new feature from scratch
|
|
191
|
+
- TICK = Refine/extend existing feature
|
|
192
|
+
|
|
193
|
+
## Example TICK Workflow
|
|
194
|
+
|
|
195
|
+
**User**: "Add password reset to the user authentication system"
|
|
196
|
+
|
|
197
|
+
**Agent**:
|
|
198
|
+
1. **Identify**: Finds `specs/0002-user-authentication.md` (integrated)
|
|
199
|
+
2. **Amend Spec** (30 seconds):
|
|
200
|
+
- Updates Success Criteria with password reset requirements
|
|
201
|
+
- Adds TICK-001 entry to Amendments section
|
|
202
|
+
- Commit: `[TICK 0002-001] Spec: Add password reset feature`
|
|
203
|
+
3. **Amend Plan** (30 seconds):
|
|
204
|
+
- Adds Phase 4: Password Reset Email Service
|
|
205
|
+
- Adds TICK-001 entry to Amendment History
|
|
206
|
+
- Commit: `[TICK 0002-001] Plan: Add password reset implementation`
|
|
207
|
+
4. **Implement** (2 minutes):
|
|
208
|
+
- Creates password reset endpoint
|
|
209
|
+
- Implements email service
|
|
210
|
+
- Tests functionality
|
|
211
|
+
- Commit: `[TICK 0002-001] Impl: Add password reset feature`
|
|
212
|
+
5. **Review** (1 minute):
|
|
213
|
+
- Creates `reviews/0002-user-authentication-tick-001.md`
|
|
214
|
+
- Runs 3-way consultation (Gemini, Codex, Claude)
|
|
215
|
+
- Commit: `[TICK 0002-001] Review: Password reset implementation`
|
|
216
|
+
- Shows user the completed work
|
|
217
|
+
|
|
218
|
+
**Total Time**: ~4 minutes for simple amendment
|
|
219
|
+
|
|
220
|
+
## Multiple TICKs per Spec
|
|
221
|
+
|
|
222
|
+
A single spec can have multiple TICK amendments over its lifetime:
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
## Amendments
|
|
226
|
+
|
|
227
|
+
### TICK-003: Add MFA support (2025-03-15)
|
|
228
|
+
...
|
|
229
|
+
|
|
230
|
+
### TICK-002: Add session timeout (2025-02-01)
|
|
231
|
+
...
|
|
232
|
+
|
|
233
|
+
### TICK-001: Add password reset (2025-01-15)
|
|
234
|
+
...
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
TICKs are listed in reverse chronological order (newest first). Each TICK builds on the previous state of the spec.
|
|
238
|
+
|
|
239
|
+
## Migration from Standalone TICK
|
|
240
|
+
|
|
241
|
+
Existing standalone TICK projects (created before this protocol change) are grandfathered in. No migration required.
|
|
242
|
+
|
|
243
|
+
**Optional Migration** (if desired):
|
|
244
|
+
1. Identify the "parent spec" the TICK logically extends
|
|
245
|
+
2. Move TICK content into an amendment entry in the parent spec
|
|
246
|
+
3. Archive the standalone files with a note: "Migrated to spec #### as TICK-NNN"
|
|
247
|
+
4. Update projectlist.md to reflect the change
|
|
248
|
+
|
|
249
|
+
## Benefits
|
|
250
|
+
|
|
251
|
+
1. **Single source of truth**: Spec file shows complete feature evolution
|
|
252
|
+
2. **Clear history**: Amendments section documents all changes chronologically
|
|
253
|
+
3. **Reduced fragmentation**: Related work stays together
|
|
254
|
+
4. **Simpler mental model**: "New vs amendment" is clearer than "SPIDER vs TICK"
|
|
255
|
+
5. **Preserved context**: Looking at a spec shows all refinements
|
|
256
|
+
|
|
257
|
+
## Limitations
|
|
258
|
+
|
|
259
|
+
1. **Requires existing spec**: Cannot use TICK for greenfield work
|
|
260
|
+
2. **Spec can grow large**: Many TICKs add content (consider: >5 TICKs suggests need for new spec)
|
|
261
|
+
3. **Merge conflicts**: Multiple TICKs on same spec may conflict
|
|
262
|
+
4. **No course correction**: Can't adjust mid-implementation
|
|
263
|
+
|
|
264
|
+
## Best Practices
|
|
265
|
+
|
|
266
|
+
1. **Verify spec is integrated**: Never TICK a spec that isn't complete
|
|
267
|
+
2. **Keep TICKs small**: If scope grows, consider new SPIDER spec
|
|
268
|
+
3. **Clear summaries**: Amendment entries should be self-explanatory
|
|
269
|
+
4. **Test before review**: Always test functionality before presenting
|
|
270
|
+
5. **Honest documentation**: Document all deviations in review
|
|
271
|
+
|
|
272
|
+
## Templates
|
|
273
|
+
|
|
274
|
+
TICK uses the standard SPIDER templates with amendments sections:
|
|
275
|
+
- Spec template: `codev/protocols/spider/templates/spec.md` (includes Amendments section)
|
|
276
|
+
- Plan template: `codev/protocols/spider/templates/plan.md` (includes Amendment History section)
|
|
277
|
+
- Review template: `codev/protocols/tick/templates/review.md` (TICK-specific)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Lessons Learned
|
|
2
|
+
|
|
3
|
+
Consolidated wisdom extracted from review documents. Updated during MAINTAIN protocol runs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Testing
|
|
8
|
+
|
|
9
|
+
<!-- Add lessons about testing practices -->
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
<!-- Add lessons about architectural decisions -->
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
<!-- Add lessons about development process -->
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
<!-- Add lessons about documentation practices -->
|
|
22
|
+
|
|
23
|
+
## Tools
|
|
24
|
+
|
|
25
|
+
<!-- Add lessons about tooling -->
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
*Last updated: YYYY-MM-DD*
|
|
30
|
+
*Source: codev/reviews/*
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Architect-Builder Workflow Reference
|
|
2
|
+
|
|
3
|
+
Quick reference for the 7-stage project workflow. For protocol details, see `codev/protocols/spider/protocol.md`.
|
|
4
|
+
|
|
5
|
+
## Workflow Overview
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
CONCEPTION PLANNING EXECUTION
|
|
9
|
+
┌─────────────────────────────────────────────────────────────────────────────────────┐
|
|
10
|
+
│ │
|
|
11
|
+
│ → 1. CONCEIVED │
|
|
12
|
+
│ User describes project concept │
|
|
13
|
+
│ Architect adds to projectlist, writes spec │
|
|
14
|
+
│ Architect does 3-way spec review │
|
|
15
|
+
│ ⏸️ HUMAN GATE: Approve spec │
|
|
16
|
+
│ │
|
|
17
|
+
│ → 2. SPECIFIED │
|
|
18
|
+
│ Human approves spec │
|
|
19
|
+
│ Architect writes plan │
|
|
20
|
+
│ Architect does 3-way plan review │
|
|
21
|
+
│ Human reviews and approves plan │
|
|
22
|
+
│ │
|
|
23
|
+
│ → 3. PLANNED │
|
|
24
|
+
│ Architect commits spec + plan to main │
|
|
25
|
+
├─────────────────────────────────────────────────────────────────────────────────────┤
|
|
26
|
+
│ IMPLEMENTATION │
|
|
27
|
+
├─────────────────────────────────────────────────────────────────────────────────────┤
|
|
28
|
+
│ → 4. IMPLEMENTING │
|
|
29
|
+
│ Architect spawns builder: af spawn -p XXXX │
|
|
30
|
+
│ Builder reads spec and plan │
|
|
31
|
+
│ For each phase: Implement → Defend → Evaluate │
|
|
32
|
+
│ Builder commits after each phase │
|
|
33
|
+
│ │
|
|
34
|
+
│ → 5. IMPLEMENTED │
|
|
35
|
+
│ Builder writes review doc │
|
|
36
|
+
│ Builder creates PR, notifies architect │
|
|
37
|
+
├─────────────────────────────────────────────────────────────────────────────────────┤
|
|
38
|
+
│ HANDOFF / INTEGRATION │
|
|
39
|
+
├─────────────────────────────────────────────────────────────────────────────────────┤
|
|
40
|
+
│ → 6. COMMITTED │
|
|
41
|
+
│ Architect does 3-way integration review │
|
|
42
|
+
│ Architect iterates with builder via PR comments │
|
|
43
|
+
│ Architect tells builder to merge │
|
|
44
|
+
│ Builder merges PR (NO --delete-branch flag) │
|
|
45
|
+
│ Architect cleans up builder │
|
|
46
|
+
│ │
|
|
47
|
+
│ ⏸️ HUMAN GATE: Validate in production │
|
|
48
|
+
│ → 7. INTEGRATED │
|
|
49
|
+
│ Human validates and marks as integrated │
|
|
50
|
+
└─────────────────────────────────────────────────────────────────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Stage Quick Reference
|
|
54
|
+
|
|
55
|
+
| Stage | Status | Actor | Key Action | Exit Condition |
|
|
56
|
+
|-------|--------|-------|------------|----------------|
|
|
57
|
+
| 1 | conceived | Architect | Write spec, 3-way review | Human approves spec |
|
|
58
|
+
| 2 | specified | Human + Architect | Write plan, 3-way review | Human approves plan |
|
|
59
|
+
| 3 | planned | Architect | Commit spec + plan | Committed to main |
|
|
60
|
+
| 4 | implementing | Builder | IDE loop per phase | All phases complete |
|
|
61
|
+
| 5 | implemented | Builder | Write review, create PR | PR created |
|
|
62
|
+
| 6 | committed | Architect + Builder | Integration review, merge | PR merged |
|
|
63
|
+
| 7 | integrated | Human | Validate production | Human confirms |
|
|
64
|
+
|
|
65
|
+
## Human Gates
|
|
66
|
+
|
|
67
|
+
There are **two points where only a human can advance the workflow**:
|
|
68
|
+
|
|
69
|
+
1. **conceived → specified**: Human must approve the specification
|
|
70
|
+
2. **committed → integrated**: Human must validate production deployment
|
|
71
|
+
|
|
72
|
+
AI agents must stop and wait for human action at these gates.
|
|
73
|
+
|
|
74
|
+
## Common Commands
|
|
75
|
+
|
|
76
|
+
### Architect Commands
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Start the dashboard
|
|
80
|
+
af start
|
|
81
|
+
|
|
82
|
+
# Spawn a builder for a project
|
|
83
|
+
af spawn -p 0044
|
|
84
|
+
|
|
85
|
+
# Check all builder statuses
|
|
86
|
+
af status
|
|
87
|
+
|
|
88
|
+
# Send message to builder
|
|
89
|
+
af send 0044 "Check PR comments and address feedback"
|
|
90
|
+
|
|
91
|
+
# Open a file for review
|
|
92
|
+
af open codev/specs/0044-name.md
|
|
93
|
+
|
|
94
|
+
# Clean up after merge
|
|
95
|
+
af cleanup -p 0044
|
|
96
|
+
|
|
97
|
+
# Stop everything
|
|
98
|
+
af stop
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Builder Commands
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Check your own status
|
|
105
|
+
af status
|
|
106
|
+
|
|
107
|
+
# Send message to architect
|
|
108
|
+
af send architect "Question about the spec..."
|
|
109
|
+
|
|
110
|
+
# Open a file in the annotation viewer
|
|
111
|
+
af open src/path/to/file.ts
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Consultation Commands
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Spec review (during Stage 1)
|
|
118
|
+
consult --model gemini --type spec-review spec 0044
|
|
119
|
+
consult --model codex --type spec-review spec 0044
|
|
120
|
+
|
|
121
|
+
# Plan review (during Stage 2)
|
|
122
|
+
consult --model gemini --type plan-review plan 0044
|
|
123
|
+
consult --model codex --type plan-review plan 0044
|
|
124
|
+
|
|
125
|
+
# Implementation review (during Stage 4, after each phase)
|
|
126
|
+
consult --model gemini --type impl-review spec 0044
|
|
127
|
+
consult --model codex --type impl-review spec 0044
|
|
128
|
+
|
|
129
|
+
# PR ready review (during Stage 5)
|
|
130
|
+
consult --model gemini --type pr-ready pr 88
|
|
131
|
+
consult --model codex --type pr-ready pr 88
|
|
132
|
+
|
|
133
|
+
# Integration review (during Stage 6)
|
|
134
|
+
consult --model gemini --type integration-review pr 88
|
|
135
|
+
consult --model codex --type integration-review pr 88
|
|
136
|
+
|
|
137
|
+
# Parallel 3-way reviews (run all three concurrently)
|
|
138
|
+
consult --model gemini --type spec-review spec 0044 &
|
|
139
|
+
consult --model codex --type spec-review spec 0044 &
|
|
140
|
+
consult --model claude --type spec-review spec 0044 &
|
|
141
|
+
wait
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Review Types
|
|
145
|
+
|
|
146
|
+
| Type | When Used | Focus |
|
|
147
|
+
|------|-----------|-------|
|
|
148
|
+
| `spec-review` | Stage 1 | Requirements clarity, completeness, feasibility |
|
|
149
|
+
| `plan-review` | Stage 2 | Implementation approach, phase breakdown, risk assessment |
|
|
150
|
+
| `impl-review` | Stage 4 | Code quality, test coverage, spec adherence |
|
|
151
|
+
| `pr-ready` | Stage 5 | Final self-check before PR creation |
|
|
152
|
+
| `integration-review` | Stage 6 | System fit, architectural consistency, side effects |
|
|
153
|
+
|
|
154
|
+
## Builder Lifecycle
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
spawning → implementing → blocked → implementing → pr-ready → complete
|
|
158
|
+
↑______________|
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Status | Meaning |
|
|
162
|
+
|--------|---------|
|
|
163
|
+
| `spawning` | Worktree created, builder starting up |
|
|
164
|
+
| `implementing` | Actively working on the spec |
|
|
165
|
+
| `blocked` | Stuck, needs architect help |
|
|
166
|
+
| `pr-ready` | Implementation complete, ready for review |
|
|
167
|
+
| `complete` | Merged, worktree can be cleaned up |
|
|
168
|
+
|
|
169
|
+
## Git Workflow
|
|
170
|
+
|
|
171
|
+
### Branch Naming
|
|
172
|
+
```
|
|
173
|
+
builder/XXXX-spec-name
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Commit Messages
|
|
177
|
+
```
|
|
178
|
+
[Spec XXXX][Implement] Phase description
|
|
179
|
+
[Spec XXXX][Defend] Add tests for phase
|
|
180
|
+
[Spec XXXX][Review] Add lessons learned
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### PR Merge (Builder)
|
|
184
|
+
```bash
|
|
185
|
+
# CORRECT - preserves branch for worktree
|
|
186
|
+
gh pr merge N --merge
|
|
187
|
+
|
|
188
|
+
# WRONG - breaks worktree
|
|
189
|
+
gh pr merge N --merge --delete-branch
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Post-Merge Cleanup (Architect)
|
|
193
|
+
```bash
|
|
194
|
+
git pull # Get merged changes
|
|
195
|
+
af cleanup -p XXXX # Clean up builder worktree
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Troubleshooting
|
|
199
|
+
|
|
200
|
+
### Builder Reports Blocked
|
|
201
|
+
|
|
202
|
+
1. Check builder terminal for blocker message
|
|
203
|
+
2. Review any `// REVIEW(@architect):` comments in code
|
|
204
|
+
3. Provide guidance via `af send XXXX "guidance here"`
|
|
205
|
+
4. Builder will resume work after receiving help
|
|
206
|
+
|
|
207
|
+
### PR Has Conflicts
|
|
208
|
+
|
|
209
|
+
1. Architect: `git pull` on main
|
|
210
|
+
2. Architect: Resolve conflicts or instruct builder
|
|
211
|
+
3. Builder: Rebase or merge main into branch
|
|
212
|
+
4. Builder: Force push if needed
|
|
213
|
+
|
|
214
|
+
### Builder Worktree Broken
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Check worktree status
|
|
218
|
+
git worktree list
|
|
219
|
+
|
|
220
|
+
# Force cleanup (only if work is committed/pushed)
|
|
221
|
+
af cleanup -p XXXX --force
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Related Documentation
|
|
225
|
+
|
|
226
|
+
- Full SPIDER protocol: `codev/protocols/spider/protocol.md`
|
|
227
|
+
- Builder role: `codev/roles/builder.md`
|
|
228
|
+
- Architect role: `codev/roles/architect.md`
|
|
229
|
+
- Consultant role: `codev/roles/consultant.md`
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
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
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:
|
|
@@ -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
|