@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.
- 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 +51 -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 +9 -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 +125 -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 +33 -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 +88 -36
- 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/import.d.ts +16 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +278 -0
- package/dist/commands/import.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 +5 -4
- package/{templates → skeleton}/DEPENDENCIES.md +3 -48
- 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 +108 -0
- package/skeleton/maintain/.gitkeep +2 -0
- package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
- package/skeleton/protocols/maintain/protocol.md +502 -0
- package/skeleton/protocols/maintain/templates/maintenance-run.md +64 -0
- package/{templates → skeleton}/protocols/spider/protocol.md +9 -9
- 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 +242 -0
- package/skeleton/roles/architect.md +283 -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/skeleton/templates/lessons-learned.md +28 -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/agents/architecture-documenter.md +0 -189
- package/templates/agents/codev-updater.md +0 -276
- package/templates/agents/spider-protocol-updater.md +0 -118
- 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/maintain/protocol.md +0 -235
- 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/roles/architect.md +0 -230
- 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}/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/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,250 +0,0 @@
|
|
|
1
|
-
# TICK Protocol
|
|
2
|
-
**T**ask **I**dentification, **C**oding, **K**ickout
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
TICK is a streamlined development protocol for rapid, autonomous implementation. Unlike SPIDER's multi-phase approach with intermediate reviews, TICK runs in a single autonomous step from specification to implementation, with multi-agent consultation only at the review phase.
|
|
6
|
-
|
|
7
|
-
**Core Principle**: Fast iteration for simple tasks - spec, plan, implement, review. No intermediate checkpoints. Multi-agent validation at the end.
|
|
8
|
-
|
|
9
|
-
## When to Use TICK
|
|
10
|
-
|
|
11
|
-
### Use TICK for:
|
|
12
|
-
- Small features (< 300 lines of code)
|
|
13
|
-
- Well-defined tasks with clear requirements
|
|
14
|
-
- Bug fixes with known solutions
|
|
15
|
-
- Straightforward refactoring
|
|
16
|
-
- Configuration changes with logic
|
|
17
|
-
- Simple API endpoints
|
|
18
|
-
- Utility function additions
|
|
19
|
-
|
|
20
|
-
### Use SPIDER instead for:
|
|
21
|
-
- Complex features requiring multiple phases
|
|
22
|
-
- Architecture changes
|
|
23
|
-
- Unclear requirements needing exploration
|
|
24
|
-
- Performance optimization initiatives
|
|
25
|
-
- System design decisions
|
|
26
|
-
- Features requiring stakeholder alignment
|
|
27
|
-
|
|
28
|
-
## Protocol Workflow
|
|
29
|
-
|
|
30
|
-
### Single Autonomous Step
|
|
31
|
-
|
|
32
|
-
**Total Duration**: One continuous execution from start to finish
|
|
33
|
-
|
|
34
|
-
**Phases** (executed sequentially without user intervention):
|
|
35
|
-
1. **Specification** - Define what needs to be built
|
|
36
|
-
2. **Planning** - Create single-phase implementation plan
|
|
37
|
-
3. **Implementation** - Execute the plan
|
|
38
|
-
4. **Review** - Document what was done and lessons learned
|
|
39
|
-
|
|
40
|
-
**User Checkpoints**:
|
|
41
|
-
- **Start**: User provides task description
|
|
42
|
-
- **End**: User reviews completed work and provides feedback
|
|
43
|
-
|
|
44
|
-
## Detailed Workflow
|
|
45
|
-
|
|
46
|
-
### 1. Specification (Autonomous)
|
|
47
|
-
|
|
48
|
-
**Input**: User task description
|
|
49
|
-
|
|
50
|
-
**Agent Actions**:
|
|
51
|
-
1. Analyze the task requirements
|
|
52
|
-
2. Identify scope and constraints
|
|
53
|
-
3. Define success criteria
|
|
54
|
-
4. Generate specification document
|
|
55
|
-
5. **COMMIT**: "TICK Spec: [descriptive-name]"
|
|
56
|
-
|
|
57
|
-
**Output**: `codev/specs/####-descriptive-name.md`
|
|
58
|
-
|
|
59
|
-
**Template**: `templates/spec.md`
|
|
60
|
-
|
|
61
|
-
**Key Sections**:
|
|
62
|
-
- Problem statement
|
|
63
|
-
- Scope (in/out)
|
|
64
|
-
- Success criteria
|
|
65
|
-
- Assumptions
|
|
66
|
-
- No multi-agent consultation
|
|
67
|
-
- No user review at this stage
|
|
68
|
-
|
|
69
|
-
### 2. Planning (Autonomous)
|
|
70
|
-
|
|
71
|
-
**Input**: Generated specification
|
|
72
|
-
|
|
73
|
-
**Agent Actions**:
|
|
74
|
-
1. Break work into logical steps (NOT phases)
|
|
75
|
-
2. Identify file changes needed
|
|
76
|
-
3. Define implementation order
|
|
77
|
-
4. Generate plan document
|
|
78
|
-
5. **COMMIT**: "TICK Plan: [descriptive-name]"
|
|
79
|
-
|
|
80
|
-
**Output**: `codev/plans/####-descriptive-name.md`
|
|
81
|
-
|
|
82
|
-
**Template**: `templates/plan.md`
|
|
83
|
-
|
|
84
|
-
**Key Sections**:
|
|
85
|
-
- Implementation steps (sequential)
|
|
86
|
-
- Files to create/modify
|
|
87
|
-
- Testing approach
|
|
88
|
-
- Single-phase execution (no breaking into phases)
|
|
89
|
-
- No time estimates
|
|
90
|
-
- No user review at this stage
|
|
91
|
-
|
|
92
|
-
### 3. Implementation (Autonomous)
|
|
93
|
-
|
|
94
|
-
**Input**: Generated plan
|
|
95
|
-
|
|
96
|
-
**Agent Actions**:
|
|
97
|
-
1. Execute implementation steps in order
|
|
98
|
-
2. Write code following plan
|
|
99
|
-
3. Test functionality
|
|
100
|
-
4. **COMMIT**: "TICK Impl: [descriptive-name]"
|
|
101
|
-
|
|
102
|
-
**Output**: Working code committed to repository
|
|
103
|
-
|
|
104
|
-
**Notes**:
|
|
105
|
-
- Follow fail-fast principles from AGENTS.md/CLAUDE.md
|
|
106
|
-
- Test before committing
|
|
107
|
-
- No user approval needed during implementation
|
|
108
|
-
- Single commit for all changes
|
|
109
|
-
|
|
110
|
-
### 4. Review (User Checkpoint)
|
|
111
|
-
|
|
112
|
-
**Input**: Completed implementation
|
|
113
|
-
|
|
114
|
-
**Agent Actions**:
|
|
115
|
-
1. Generate review document with:
|
|
116
|
-
- What was implemented
|
|
117
|
-
- Challenges encountered
|
|
118
|
-
- Deviations from plan
|
|
119
|
-
- Lessons learned
|
|
120
|
-
2. **Multi-Agent Consultation** (DEFAULT - MANDATORY):
|
|
121
|
-
- Consult GPT-5 AND Gemini Pro
|
|
122
|
-
- Focus: Code quality, missed issues, improvements
|
|
123
|
-
- Update review with consultation feedback
|
|
124
|
-
3. **Update Architecture Documentation**:
|
|
125
|
-
- Use architecture-documenter agent to update `codev/resources/arch.md`
|
|
126
|
-
- Document new modules, utilities, or architectural changes
|
|
127
|
-
- Ensure arch.md reflects current codebase state
|
|
128
|
-
4. **COMMIT**: "TICK Review: [descriptive-name]" (includes consultation findings and arch.md updates)
|
|
129
|
-
5. **PRESENT TO USER**: Show summary with consultation insights and ask for feedback
|
|
130
|
-
|
|
131
|
-
**Output**: `codev/reviews/####-descriptive-name.md`
|
|
132
|
-
|
|
133
|
-
**Template**: `templates/review.md`
|
|
134
|
-
|
|
135
|
-
**⚠️ BLOCKING**: Cannot present to user without consultation (unless explicitly disabled)
|
|
136
|
-
|
|
137
|
-
**User Actions**:
|
|
138
|
-
- Review completed work
|
|
139
|
-
- Provide feedback
|
|
140
|
-
- Request changes OR approve
|
|
141
|
-
|
|
142
|
-
**If Changes Requested**:
|
|
143
|
-
- Agent makes changes
|
|
144
|
-
- Commits: "TICK Fixes: [descriptive-name]"
|
|
145
|
-
- Updates review document
|
|
146
|
-
- Repeats until user approval
|
|
147
|
-
|
|
148
|
-
## File Naming Convention
|
|
149
|
-
|
|
150
|
-
All three files share the same sequential identifier and name:
|
|
151
|
-
- `specs/0001-feature-name.md`
|
|
152
|
-
- `plans/0001-feature-name.md`
|
|
153
|
-
- `reviews/0001-feature-name.md`
|
|
154
|
-
|
|
155
|
-
Sequential numbering continues across SPIDER and TICK protocols.
|
|
156
|
-
|
|
157
|
-
## Git Commit Strategy
|
|
158
|
-
|
|
159
|
-
**TICK uses 4 commits per task**:
|
|
160
|
-
1. Specification: `TICK Spec: Add user authentication`
|
|
161
|
-
2. Plan: `TICK Plan: Add user authentication`
|
|
162
|
-
3. Implementation: `TICK Impl: Add user authentication`
|
|
163
|
-
4. Review (includes multi-agent consultation): `TICK Review: Add user authentication`
|
|
164
|
-
|
|
165
|
-
Additional commits if changes requested:
|
|
166
|
-
- `TICK Fixes: Add user authentication` (can be multiple)
|
|
167
|
-
|
|
168
|
-
## Key Differences from SPIDER
|
|
169
|
-
|
|
170
|
-
| Aspect | SPIDER | TICK |
|
|
171
|
-
|--------|--------|------|
|
|
172
|
-
| User checkpoints | Multiple (after spec, plan, each phase) | Two (start, end) |
|
|
173
|
-
| Multi-agent consultation | Throughout (spec, plan, implementation, review) | End only (review) |
|
|
174
|
-
| Implementation phases | Multiple | Single |
|
|
175
|
-
| Review timing | Continuous | End only |
|
|
176
|
-
| Complexity | High | Low |
|
|
177
|
-
| Speed | Slower, thorough | Fast, autonomous |
|
|
178
|
-
|
|
179
|
-
## Protocol Selection Guide
|
|
180
|
-
|
|
181
|
-
**Choose TICK when**:
|
|
182
|
-
- Task is well-defined
|
|
183
|
-
- < 300 lines of code
|
|
184
|
-
- Low risk of errors
|
|
185
|
-
- Fast iteration needed
|
|
186
|
-
- Requirements are clear
|
|
187
|
-
|
|
188
|
-
**Choose SPIDER when**:
|
|
189
|
-
- Requirements unclear
|
|
190
|
-
- > 300 lines of code
|
|
191
|
-
- High complexity
|
|
192
|
-
- Stakeholder alignment needed
|
|
193
|
-
- Architecture changes
|
|
194
|
-
|
|
195
|
-
## Example TICK Workflow
|
|
196
|
-
|
|
197
|
-
**User**: "Add a health check endpoint to the API"
|
|
198
|
-
|
|
199
|
-
**Agent**:
|
|
200
|
-
1. Generates spec (30 seconds)
|
|
201
|
-
- `specs/0002-api-health-check.md`
|
|
202
|
-
- Commit: "TICK Spec: API health check"
|
|
203
|
-
2. Generates plan (30 seconds)
|
|
204
|
-
- `plans/0002-api-health-check.md`
|
|
205
|
-
- Commit: "TICK Plan: API health check"
|
|
206
|
-
3. Implements (2 minutes)
|
|
207
|
-
- Creates `/api/health` endpoint
|
|
208
|
-
- Tests endpoint
|
|
209
|
-
- Commit: "TICK Impl: API health check"
|
|
210
|
-
4. Reviews and presents (1 minute)
|
|
211
|
-
- `reviews/0002-api-health-check.md`
|
|
212
|
-
- Commit: "TICK Review: API health check"
|
|
213
|
-
- Shows user the working endpoint
|
|
214
|
-
|
|
215
|
-
**User**: Reviews, approves or requests changes
|
|
216
|
-
|
|
217
|
-
**Total Time**: ~4 minutes for simple task
|
|
218
|
-
|
|
219
|
-
## Benefits
|
|
220
|
-
|
|
221
|
-
1. **Speed**: No intermediate approvals means faster delivery
|
|
222
|
-
2. **Simplicity**: Straightforward workflow, easy to understand
|
|
223
|
-
3. **Autonomy**: Agent executes without constant human intervention
|
|
224
|
-
4. **Documentation**: Still maintains spec, plan, review for reference
|
|
225
|
-
5. **Lightweight**: Minimal overhead for simple tasks
|
|
226
|
-
|
|
227
|
-
## Limitations
|
|
228
|
-
|
|
229
|
-
1. **No course correction**: Can't adjust mid-implementation
|
|
230
|
-
2. **No multi-perspective**: Single agent viewpoint only
|
|
231
|
-
3. **Risk**: May implement wrong solution if spec unclear
|
|
232
|
-
4. **Scope creep**: Easy to go beyond intended scope
|
|
233
|
-
5. **No validation**: No intermediate checks until end
|
|
234
|
-
|
|
235
|
-
## Best Practices
|
|
236
|
-
|
|
237
|
-
1. **Clear Task Description**: User provides detailed initial description
|
|
238
|
-
2. **Test Before Review**: Agent must test functionality before presenting
|
|
239
|
-
3. **Honest Review**: Document all issues and deviations in review
|
|
240
|
-
4. **Quick Iterations**: If changes needed, make them fast
|
|
241
|
-
5. **Know When to Switch**: If task becomes complex, switch to SPIDER
|
|
242
|
-
|
|
243
|
-
## Template Usage
|
|
244
|
-
|
|
245
|
-
All templates are located in `codev/protocols/tick/templates/`:
|
|
246
|
-
- `spec.md` - Specification template
|
|
247
|
-
- `plan.md` - Plan template
|
|
248
|
-
- `review.md` - Review template
|
|
249
|
-
|
|
250
|
-
These are simplified versions of SPIDER templates without consultation sections.
|
|
@@ -1,230 +0,0 @@
|
|
|
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
|
-
## Output Formatting
|
|
6
|
-
|
|
7
|
-
When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
# Instead of:
|
|
11
|
-
See codev/specs/0022-consult-tool-stateless.md for details.
|
|
12
|
-
|
|
13
|
-
# Use:
|
|
14
|
-
See http://localhost:{PORT}/open-file?path=codev/specs/0022-consult-tool-stateless.md for details.
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Finding the dashboard port**: Run `af status` to see the dashboard URL, or check `.agent-farm/state.json` for the `dashboardPort` value. The default is 4200, but varies when multiple projects are running.
|
|
18
|
-
|
|
19
|
-
This opens files in the agent-farm annotation viewer when clicked in the dashboard terminal.
|
|
20
|
-
|
|
21
|
-
## Critical Rules
|
|
22
|
-
|
|
23
|
-
These rules are **non-negotiable** and must be followed at all times:
|
|
24
|
-
|
|
25
|
-
### NEVER Do These:
|
|
26
|
-
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.
|
|
27
|
-
2. **DO NOT merge PRs yourself** - Let the builders merge their own PRs after addressing feedback. The builder owns the merge process.
|
|
28
|
-
3. **DO NOT commit directly to main** - All changes go through PRs.
|
|
29
|
-
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.
|
|
30
|
-
|
|
31
|
-
### ALWAYS Do These:
|
|
32
|
-
1. **Leave PR comments for reviews** - Use `gh pr comment` to post review feedback.
|
|
33
|
-
2. **Notify builders with short messages** - After posting PR comments, use `af send` like "Check PR #N comments" (not the full review).
|
|
34
|
-
3. **Let builders merge their PRs** - After approving, tell the builder to merge. Don't do it yourself.
|
|
35
|
-
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.
|
|
36
|
-
|
|
37
|
-
## Responsibilities
|
|
38
|
-
|
|
39
|
-
1. **Understand the big picture** - Maintain context of the entire project/epic
|
|
40
|
-
2. **Maintain the project list** - Track all projects in `codev/projectlist.md`
|
|
41
|
-
3. **Decompose work** - Break large features into spec-sized tasks for Builders
|
|
42
|
-
4. **Spawn Builders** - Create isolated worktrees and assign tasks
|
|
43
|
-
5. **Monitor progress** - Track Builder status, unblock when needed
|
|
44
|
-
6. **Review and integrate** - Merge Builder PRs, run integration tests
|
|
45
|
-
7. **Maintain quality** - Ensure consistency across Builder outputs
|
|
46
|
-
|
|
47
|
-
## Project Tracking
|
|
48
|
-
|
|
49
|
-
**`codev/projectlist.md` is the canonical source of truth for all projects.**
|
|
50
|
-
|
|
51
|
-
The Architect is responsible for maintaining this file:
|
|
52
|
-
|
|
53
|
-
1. **Reserve numbers first** - Add entry to projectlist.md BEFORE creating spec files
|
|
54
|
-
2. **Track status** - Update status as projects move through lifecycle:
|
|
55
|
-
- `conceived` → `specified` → `planned` → `implementing` → `implemented` → `committed` → `integrated`
|
|
56
|
-
3. **Set priorities** - Assign high/medium/low based on business value and dependencies
|
|
57
|
-
4. **Note dependencies** - Track which projects depend on others
|
|
58
|
-
5. **Document decisions** - Use notes field for context, blockers, or reasons for abandonment
|
|
59
|
-
|
|
60
|
-
When asked "what should we work on next?" or "what's incomplete?":
|
|
61
|
-
```bash
|
|
62
|
-
# Read the project list
|
|
63
|
-
cat codev/projectlist.md
|
|
64
|
-
|
|
65
|
-
# Look for high-priority items not yet integrated
|
|
66
|
-
grep -A5 "priority: high" codev/projectlist.md
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Execution Strategy: SPIDER
|
|
70
|
-
|
|
71
|
-
The Architect follows the SPIDER protocol but modifies the Implementation phase to delegate rather than code directly.
|
|
72
|
-
|
|
73
|
-
### Phase 1: Specify
|
|
74
|
-
- Understand the user's request at a system level
|
|
75
|
-
- Identify major components and dependencies
|
|
76
|
-
- Create high-level specifications
|
|
77
|
-
- Break into Builder-sized specs (each spec = one Builder task)
|
|
78
|
-
|
|
79
|
-
### Phase 2: Plan
|
|
80
|
-
- Determine which specs can be parallelized
|
|
81
|
-
- Identify dependencies between specs
|
|
82
|
-
- Plan the spawn order for Builders
|
|
83
|
-
- Prepare Builder prompts with context
|
|
84
|
-
|
|
85
|
-
### Phase 3: Implement (Modified)
|
|
86
|
-
|
|
87
|
-
**The Architect does NOT write code directly.** Instead:
|
|
88
|
-
|
|
89
|
-
1. **Instantiate** - Create isolated git worktrees for each task
|
|
90
|
-
```bash
|
|
91
|
-
af spawn --project XXXX
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
2. **Delegate** - Spawn a Builder agent for each worktree
|
|
95
|
-
- Pass the specific spec
|
|
96
|
-
- Assign a protocol (SPIDER or TICK based on complexity)
|
|
97
|
-
- Provide necessary context
|
|
98
|
-
|
|
99
|
-
3. **Orchestrate** - Monitor the Builder pool
|
|
100
|
-
- Check status periodically
|
|
101
|
-
- If a Builder is `blocked`, intervene with guidance
|
|
102
|
-
- If a Builder fails, rollback or reassign
|
|
103
|
-
- Answer Builder questions
|
|
104
|
-
|
|
105
|
-
4. **Consolidate** - Do not modify code manually
|
|
106
|
-
- Only merge completed worktrees
|
|
107
|
-
- Resolve merge conflicts at integration time
|
|
108
|
-
|
|
109
|
-
### Phase 4: Defend
|
|
110
|
-
- Review Builder test coverage
|
|
111
|
-
- Run integration tests across merged code
|
|
112
|
-
- Identify gaps in testing
|
|
113
|
-
|
|
114
|
-
### Phase 5: Evaluate
|
|
115
|
-
- Verify all specs are implemented
|
|
116
|
-
- Check for consistency across Builder outputs
|
|
117
|
-
- Validate the integrated system works
|
|
118
|
-
|
|
119
|
-
### Phase 6: Review
|
|
120
|
-
- Document lessons learned
|
|
121
|
-
- Update specs/plans based on implementation
|
|
122
|
-
- Clean up worktrees
|
|
123
|
-
|
|
124
|
-
## When to Spawn Builders
|
|
125
|
-
|
|
126
|
-
Spawn a Builder when:
|
|
127
|
-
- A spec is well-defined and self-contained
|
|
128
|
-
- The task can be done in isolation (git worktree)
|
|
129
|
-
- Parallelization would speed up delivery
|
|
130
|
-
- The task is implementation-focused (not research/exploration)
|
|
131
|
-
|
|
132
|
-
Do NOT spawn a Builder when:
|
|
133
|
-
- The task requires cross-cutting changes
|
|
134
|
-
- You need to explore/understand the codebase first
|
|
135
|
-
- The task is trivial (do it yourself with TICK)
|
|
136
|
-
- The spec is unclear (clarify first)
|
|
137
|
-
|
|
138
|
-
## Communication with Builders
|
|
139
|
-
|
|
140
|
-
### Providing Context
|
|
141
|
-
When spawning a Builder, provide:
|
|
142
|
-
- The spec file path
|
|
143
|
-
- Any relevant architecture context
|
|
144
|
-
- Constraints or patterns to follow
|
|
145
|
-
- Which protocol to use (SPIDER/TICK)
|
|
146
|
-
|
|
147
|
-
### Handling Blocked Status
|
|
148
|
-
When a Builder reports `blocked`:
|
|
149
|
-
1. Read their question/blocker
|
|
150
|
-
2. Provide guidance via the annotation system or direct message
|
|
151
|
-
3. Update their status to `implementing` when unblocked
|
|
152
|
-
|
|
153
|
-
### Reviewing Output
|
|
154
|
-
Before merging a Builder's work:
|
|
155
|
-
1. Review the PR/diff
|
|
156
|
-
2. Check test coverage
|
|
157
|
-
3. Verify it matches the spec
|
|
158
|
-
4. Run integration tests
|
|
159
|
-
|
|
160
|
-
## State Management
|
|
161
|
-
|
|
162
|
-
The Architect maintains state in:
|
|
163
|
-
- `.agent-farm/state.json` - Current architect/builder/util status
|
|
164
|
-
- Dashboard - Visual overview (run `af status` to see URL)
|
|
165
|
-
|
|
166
|
-
## Tools
|
|
167
|
-
|
|
168
|
-
The Architect uses `agent-farm` CLI. We recommend setting up an alias:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Add to ~/.bashrc or ~/.zshrc
|
|
172
|
-
alias af='./codev/bin/agent-farm'
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Agent Farm Commands
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# Starting/stopping
|
|
179
|
-
af start # Start architect dashboard
|
|
180
|
-
af stop # Stop all agent-farm processes
|
|
181
|
-
|
|
182
|
-
# Managing builders
|
|
183
|
-
af spawn --project 0003 # Spawn a builder for spec 0003
|
|
184
|
-
af spawn -p 0003 # Short form
|
|
185
|
-
af status # Check all agent status
|
|
186
|
-
af cleanup --project 0003 # Clean up builder (checks for uncommitted work)
|
|
187
|
-
af cleanup -p 0003 --force # Force cleanup (lose uncommitted work)
|
|
188
|
-
|
|
189
|
-
# Utilities
|
|
190
|
-
af util # Open a utility shell terminal
|
|
191
|
-
af open src/file.ts # Open file annotation viewer
|
|
192
|
-
|
|
193
|
-
# Port management (for multi-project support)
|
|
194
|
-
af ports list # List port allocations
|
|
195
|
-
af ports cleanup # Remove stale allocations
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Configuration
|
|
199
|
-
|
|
200
|
-
Customize commands via `codev/config.json`:
|
|
201
|
-
```json
|
|
202
|
-
{
|
|
203
|
-
"shell": {
|
|
204
|
-
"architect": "claude --model opus",
|
|
205
|
-
"builder": "claude --model sonnet",
|
|
206
|
-
"shell": "bash"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
Override via CLI: `af start --architect-cmd "claude --model opus"`
|
|
212
|
-
|
|
213
|
-
## Example Session
|
|
214
|
-
|
|
215
|
-
```
|
|
216
|
-
1. User: "Implement user authentication"
|
|
217
|
-
2. Architect (Specify): Creates specs 0010-auth-backend.md, 0011-auth-frontend.md
|
|
218
|
-
3. Architect (Plan): Backend first, then frontend (dependency)
|
|
219
|
-
4. Architect (Implement):
|
|
220
|
-
- `af spawn -p 0010` → Builder starts backend
|
|
221
|
-
- `af status` → Check progress
|
|
222
|
-
- Waits for 0010 to reach pr-ready
|
|
223
|
-
- Reviews and merges 0010
|
|
224
|
-
- `af spawn -p 0011` → Builder starts frontend
|
|
225
|
-
- Reviews and merges 0011
|
|
226
|
-
- `af cleanup -p 0010` → Clean up backend builder
|
|
227
|
-
- `af cleanup -p 0011` → Clean up frontend builder
|
|
228
|
-
5. Architect (Defend): Runs full auth integration tests
|
|
229
|
-
6. Architect (Review): Documents the auth system in arch.md
|
|
230
|
-
```
|