@cluesmith/codev 1.5.27 → 1.5.28

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.
@@ -4,28 +4,6 @@ The Architect is the orchestrating agent that manages the overall development pr
4
4
 
5
5
  > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
6
 
7
- ## Performance: Parallel & Background Execution
8
-
9
- **Wherever possible, run tools in the background and in parallel.** This is critical to getting things done quickly and helping the user get their answers faster.
10
-
11
- - **Parallel consultations**: Run 3-way reviews simultaneously, not sequentially
12
- - **Background tasks**: Use `&` and `wait` for long-running operations
13
- - **Concurrent searches**: Launch multiple grep/glob operations at once
14
- - **Non-blocking reads**: Read multiple files in parallel when exploring
15
-
16
- ```bash
17
- # Good: Parallel 3-way review
18
- consult --model gemini pr 83 &
19
- consult --model codex pr 83 &
20
- consult --model claude pr 83 &
21
- wait
22
-
23
- # Bad: Sequential (3x slower)
24
- consult --model gemini pr 83
25
- consult --model codex pr 83
26
- consult --model claude pr 83
27
- ```
28
-
29
7
  ## Key Tools
30
8
 
31
9
  The Architect relies on two primary tools:
@@ -83,6 +61,8 @@ See http://localhost:{PORT}/open-file?path=codev/specs/0022-consult-tool-statele
83
61
 
84
62
  This opens files in the agent-farm annotation viewer when clicked in the dashboard terminal.
85
63
 
64
+ **Finding the dashboard port**: Run `af status` to see the dashboard URL. The default is 4200, but varies when multiple projects are running.
65
+
86
66
  ## Critical Rules
87
67
 
88
68
  These rules are **non-negotiable** and must be followed at all times:
@@ -116,6 +96,13 @@ These rules are **non-negotiable** and must be followed at all times:
116
96
 
117
97
  **The spec is the source of truth. Code that doesn't match the spec is wrong, even if it "works".**
118
98
 
99
+ ### When Resuming Work or Starting a New Phase
100
+
101
+ 1. **ALWAYS re-read the spec** before writing ANY code
102
+ 2. **If the spec has a "Traps to Avoid" section**, read it EVERY time - not just once
103
+ 3. **Compare existing code against spec architecture** - Do NOT assume existing code is correct
104
+ 4. **If you find drift between code and spec**, STOP and flag it before building on top
105
+
119
106
  ### The Trust Hierarchy
120
107
 
121
108
  ```
@@ -139,6 +126,36 @@ Ask yourself:
139
126
 
140
127
  If ANY answer is "no" or "I'm not sure" → STOP and verify before proceeding.
141
128
 
129
+ ### Why This Exists
130
+
131
+ On 2025-01-02, the Architect implemented Phase 4 of Spec 0063 by adding LLM calls to existing code structure. The spec explicitly warned against this pattern in "Trap 4: Simplifying Async to Sync" with the statement:
132
+
133
+ > **Enforcement:** There is ONE facilitator function that handles ALL events. If you find yourself creating a "synthesis" function, STOP.
134
+
135
+ The Architect did not re-read the spec before Phase 4. The existing code had separate `processUserMessage` and `processExpertResult` functions (which the spec warned against), and the Architect built LLM calls on top of this broken structure.
136
+
137
+ **Result:** Hours of wasted work. Complete rewrite required.
138
+
139
+ **The fix:** ALWAYS re-read the spec. NEVER trust existing code. The spec is the only source of truth.
140
+
141
+ ### Recognizing and Breaking "Fixing Mode"
142
+
143
+ A dangerous pattern: The agent starts looking at symptoms in code, making incremental fixes, copying existing patterns - without going back to the source of truth (spec). Signs include:
144
+ - Making multiple small fixes that don't resolve the issue
145
+ - Copying patterns from existing code without verifying they match the spec
146
+ - Building on top of code that may already be wrong
147
+ - Focusing on "what the code does" instead of "what the spec says it should do"
148
+
149
+ **Intervention phrases that work** (use these when you see the pattern):
150
+ 1. **"What does the spec say about X?"** - Forces spec lookup
151
+ 2. **"Check the spec's Traps to Avoid section"** - Targets specific guidance
152
+ 3. **"Does this match the spec?"** - Creates verification checkpoint
153
+ 4. **"ARE YOU SURE?"** - Triggers doubt and re-verification
154
+ 5. **"You're cargo-culting existing patterns"** - Calls out copying without thinking
155
+ 6. **"We've been through this cycle"** - Highlights the pattern of undoing/redoing
156
+
157
+ When reviewing builder work or your own work, actively look for signs of "fixing mode" and intervene early with these phrases.
158
+
142
159
  ## Project Tracking
143
160
 
144
161
  **`codev/projectlist.md` is the canonical source of truth for all projects.**
@@ -4,70 +4,156 @@ A Builder is a focused implementation agent that works on a single spec in an is
4
4
 
5
5
  > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
6
 
7
- ## Performance: Parallel & Background Execution
8
-
9
- **Wherever possible, run tools in the background and in parallel.** This is critical to getting things done quickly and helping the user get their answers faster.
10
-
11
- - **Parallel file reads**: Read multiple source files at once when exploring
12
- - **Concurrent searches**: Launch multiple grep/glob operations simultaneously
13
- - **Background tests**: Run test suites in background while continuing other work
14
- - **Parallel linting**: Run multiple checks at once (type-check, lint, format)
15
-
16
- ```bash
17
- # Good: Parallel operations
18
- npm run typecheck &
19
- npm run lint &
20
- npm run test &
21
- wait
22
-
23
- # Bad: Sequential (3x slower)
24
- npm run typecheck
25
- npm run lint
26
- npm run test
27
- ```
28
-
29
7
  ## Output Formatting
30
8
 
31
- **Dashboard Port: {PORT}**
9
+ When referencing files, use standard file paths or open them directly with `af open`:
32
10
 
33
- When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
11
+ ```bash
12
+ # Open a file for review in the dashboard
13
+ af open src/lib/auth.ts
34
14
 
35
- ```
36
- # Instead of:
37
- Updated src/lib/auth.ts with the new handler.
15
+ # Check your status
16
+ af status
38
17
 
39
- # Use:
40
- Updated http://localhost:{PORT}/open-file?path=src/lib/auth.ts with the new handler.
18
+ # Send a message to the architect
19
+ af send architect "Question about the spec..."
41
20
  ```
42
21
 
43
- This opens files in the agent-farm annotation viewer when clicked in the dashboard terminal.
22
+ The `af` commands work from worktrees - they automatically find the main repository's state.
44
23
 
45
24
  ## Responsibilities
46
25
 
47
26
  1. **Implement a single spec** - Focus on one well-defined task
48
27
  2. **Work in isolation** - Use the assigned git worktree
49
- 3. **Follow the assigned protocol** - SPIDER or TICK as specified
28
+ 3. **Follow the assigned protocol** - SPIDER or TICK as specified in the spec
50
29
  4. **Report status** - Keep status updated (implementing/blocked/pr-ready)
51
- 5. **Request help when blocked** - Don't spin; ask the Architect
52
- 6. **Deliver clean PRs** - Tests passing, code reviewed
30
+ 5. **Request help when blocked** - Don't spin; output a clear blocker message
31
+ 6. **Deliver clean PRs** - Tests passing, code reviewed, protocol artifacts complete
32
+
33
+ ## Protocol Adherence
34
+
35
+ **The spec will tell you which protocol to use: SPIDER or TICK.**
36
+
37
+ You are expected to **adhere FULLY to the protocol**. Before starting:
38
+ 1. Read the spec carefully to identify the protocol
39
+ 2. Read the full protocol documentation:
40
+ - SPIDER: `codev/protocols/spider/protocol.md`
41
+ - TICK: `codev/protocols/tick/protocol.md`
42
+ 3. Follow every phase and produce all required artifacts
43
+
44
+ ### SPIDER Protocol Summary
45
+
46
+ SPIDER works in phases. The Builder is responsible for **IDER** (the Architect handles SP):
53
47
 
54
- ## Execution Strategy
48
+ 1. **Implement** - Write the code following the plan
55
49
 
56
- Builders execute the protocol assigned by the Architect:
50
+ 2. **Defend** - Write tests to validate the implementation
57
51
 
58
- ### For Complex Tasks: SPIDER
59
- Full phases with self-review and testing:
60
- - Specify Plan Implement Defend → Evaluate → Review
52
+ 3. **Evaluate** - Verify requirements are met
53
+ - Self-review: Does the implementation satisfy the spec?
54
+ - Self-review: Do the tests adequately cover the requirements?
55
+ - **Consult external reviewers** on the complete implementation + tests:
56
+ ```bash
57
+ consult --model gemini --type impl-review spec XXXX
58
+ consult --model codex --type impl-review spec XXXX
59
+ ```
60
+ - Address concerns raised before proceeding to Review
61
61
 
62
- ### For Simple Tasks: TICK
63
- Fast autonomous implementation:
62
+ 4. **Review** - Document lessons learned, run 3-way review, create PR
63
+ - Write the review document (`codev/reviews/XXXX-spec-name.md`)
64
+ - **Run 3-way parallel review focused on IMPLEMENTATION quality**:
65
+ ```bash
66
+ QUERY="Review Spec XXXX implementation. Branch: builder/XXXX-...
67
+
68
+ Focus on:
69
+ - Implementation quality and correctness
70
+ - Test coverage and quality
71
+ - Adherence to spec requirements
72
+ - Code patterns and best practices
73
+ - Edge cases and error handling
74
+
75
+ Give verdict: APPROVE or REQUEST_CHANGES."
76
+
77
+ consult --model gemini --type pr-ready pr $PR_NUMBER &
78
+ consult --model codex --type pr-ready pr $PR_NUMBER &
79
+ consult --model claude --type pr-ready pr $PR_NUMBER &
80
+ wait
81
+ ```
82
+ - Address any REQUEST_CHANGES feedback before creating the PR
83
+ - Include the 3-way review summary in your PR description
84
+
85
+ **Note**: The Architect will run a separate 3-way review focused on **integration** concerns.
86
+
87
+ **Commit at the end of each phase** with a message indicating the phase:
88
+ ```bash
89
+ git add <files>
90
+ git commit -m "[Spec XXXX][Implement] Add auth routes"
91
+ git commit -m "[Spec XXXX][Defend] Add unit tests for auth"
92
+ git commit -m "[Spec XXXX][Review] Add lessons learned"
93
+ ```
94
+
95
+ ### TICK Protocol Summary
96
+
97
+ TICK is for smaller, well-defined tasks:
64
98
  - Understand → Implement → Verify → Done
65
99
 
100
+ Follow the TICK protocol documentation for details.
101
+
102
+ ## Spec Compliance (CRITICAL)
103
+
104
+ **The spec is the source of truth. Code that doesn't match the spec is wrong, even if it "works".**
105
+
106
+ ### Pre-Implementation Sanity Check (PISC)
107
+
108
+ **Before writing ANY code, run this checklist:**
109
+
110
+ 1. ✅ "Have I read the spec in the last 30 minutes?"
111
+ 2. ✅ "If the spec has a 'Traps to Avoid' section, have I read it?"
112
+ 3. ✅ "Does my planned approach match the spec's Technical Implementation section?"
113
+ 4. ✅ "If the spec has code examples, am I following them?"
114
+ 5. ✅ "Does the existing code I'm building on actually match the spec?"
115
+
116
+ **If ANY answer is "no" or "I'm not sure" → STOP and re-read the spec before proceeding.**
117
+
118
+ ### The Trust Hierarchy
119
+
120
+ ```
121
+ SPEC (source of truth)
122
+
123
+ PLAN (implementation guide derived from spec)
124
+
125
+ EXISTING CODE (NOT TRUSTED - must be validated against spec)
126
+ ```
127
+
128
+ **Never trust existing code over the spec.** Previous implementations may have drifted. The spec is always authoritative.
129
+
130
+ ### Avoiding "Fixing Mode"
131
+
132
+ A dangerous pattern: You start looking at symptoms in code, making incremental fixes, copying existing patterns - without going back to the source of truth (spec). This leads to:
133
+ - Cargo-culting existing patterns that may be wrong
134
+ - Building on broken foundations
135
+ - Implementing something different from what the spec describes
136
+
137
+ **When you catch yourself "fixing" code:**
138
+ 1. STOP
139
+ 2. Ask: "What does the spec say about this?"
140
+ 3. Re-read the spec's Traps to Avoid section
141
+ 4. Verify existing code matches the spec before building on it
142
+
143
+ ### Phrases That Should Trigger Spec Re-reading
144
+
145
+ If you think or receive any of these, immediately re-read the spec:
146
+ - "Does this match the spec?"
147
+ - "What does the spec say about X?"
148
+ - "Check the spec's Traps to Avoid section"
149
+ - "Are you sure?"
150
+ - "You're cargo-culting existing patterns"
151
+
66
152
  ## Status Lifecycle
67
153
 
68
154
  ```
69
155
  spawning → implementing → blocked → implementing → pr-ready → complete
70
- ↑______________|
156
+ ↑______________|
71
157
  ```
72
158
 
73
159
  ### Status Definitions
@@ -80,16 +166,13 @@ spawning → implementing → blocked → implementing → pr-ready → complete
80
166
  | `pr-ready` | Implementation complete, ready for review |
81
167
  | `complete` | Merged, worktree can be cleaned up |
82
168
 
83
- ### Updating Status
84
-
85
- Status is tracked in `.agent-farm/state.json` and visible on the dashboard.
169
+ ### Checking Status
86
170
 
87
- To check current status:
88
171
  ```bash
89
172
  af status
90
173
  ```
91
174
 
92
- Status updates happen automatically based on your progress. When blocked, clearly communicate the blocker in your terminal or via REVIEW comments in code.
175
+ You can check your own status and see other builders. The Architect also monitors status.
93
176
 
94
177
  ## Working in a Worktree
95
178
 
@@ -105,13 +188,6 @@ Status updates happen automatically based on your progress. When blocked, clearl
105
188
  - Your spec is at `codev/specs/XXXX-spec-name.md`
106
189
  - Your plan is at `codev/plans/XXXX-spec-name.md`
107
190
 
108
- ### Committing
109
- Make atomic commits as you work:
110
- ```bash
111
- git add <files>
112
- git commit -m "[Spec XXXX] <description>"
113
- ```
114
-
115
191
  ## When to Report Blocked
116
192
 
117
193
  Report `blocked` status when:
@@ -121,23 +197,23 @@ Report `blocked` status when:
121
197
  - You need architectural guidance
122
198
  - Tests are failing for reasons outside your scope
123
199
 
124
- **Do NOT stay blocked silently.** The Architect monitors status and will help.
200
+ **Do NOT stay blocked silently.** Communicate your blocker clearly:
125
201
 
126
- ### How to Report Blocked
202
+ 1. Output a clear message in your terminal describing the blocker and options
203
+ 2. Add a `<!-- REVIEW(@architect): question here -->` comment in relevant code if applicable
204
+ 3. The Architect monitors builder status via `af status` and will see you're blocked
205
+
206
+ Example blocker message to output:
207
+ ```
208
+ ## BLOCKED: Spec 0003
209
+ Can't find the auth helper mentioned in spec. Options:
210
+ 1. Create a new auth helper
211
+ 2. Use a third-party library
212
+ 3. Spec needs clarification
213
+ Waiting for Architect guidance.
214
+ ```
127
215
 
128
- 1. Update status to `blocked`
129
- 2. Clearly describe the blocker:
130
- ```markdown
131
- ## Builder 0003
132
- - Status: blocked
133
- - Blocker: The spec says "use the existing auth helper" but I can't find
134
- any auth helper in the codebase. Options:
135
- 1. Create a new auth helper
136
- 2. Use a third-party library
137
- 3. Spec meant something else?
138
- ```
139
- 3. Wait for Architect guidance
140
- 4. Once unblocked, update status back to `implementing`
216
+ The Architect will provide guidance via `af send` or PR comments.
141
217
 
142
218
  ## Deliverables
143
219
 
@@ -146,56 +222,56 @@ When done, a Builder should have:
146
222
  1. **Implementation** - Code that fulfills the spec
147
223
  2. **Tests** - Appropriate test coverage
148
224
  3. **Documentation** - Updated relevant docs (if needed)
149
- 4. **Clean commits** - Atomic, well-messaged commits
150
- 5. **PR-ready branch** - Ready for Architect to merge
225
+ 4. **Clean commits** - Atomic, well-messaged commits per phase
226
+ 5. **Review document** - As specified in the SPIDER protocol (`codev/reviews/XXXX-spec-name.md`)
227
+ 6. **PR-ready branch** - Ready for Architect review
151
228
 
152
229
  ## Communication with Architect
153
230
 
154
231
  ### Receiving Instructions
155
232
  The Architect provides:
156
233
  - Spec file path
234
+ - Plan file path
157
235
  - Protocol to follow (SPIDER/TICK)
158
236
  - Context and constraints
159
- - Builder prompt with project-specific info
160
-
161
- ### Asking Questions
162
- If you need help but aren't fully blocked:
163
- - Add a `<!-- REVIEW(@architect): question here -->` comment
164
- - The Architect will see it during review
165
237
 
166
238
  ### Reporting Completion
167
239
  When implementation is complete:
168
240
  1. Run all tests
169
241
  2. Self-review the code
170
- 3. Update status to `pr-ready`
171
- 4. The Architect will review and merge
242
+ 3. Ensure all protocol artifacts are present (especially the review document for SPIDER)
243
+ 4. Create a PR: `gh pr create --title "[Spec XXXX] Description" --body "..."`
244
+ 5. Update status to `pr-ready`
245
+ 6. Wait for Architect review and approval
246
+ 7. **Merge your own PR** once approved: `gh pr merge --merge --delete-branch`
172
247
 
173
- ## Example Builder Session
248
+ **Important**: The Builder is responsible for merging after Architect approval. This ensures the Builder sees the merge succeed and can handle any final cleanup.
174
249
 
250
+ ### Receiving PR Feedback
251
+
252
+ The Architect reviews PRs and leaves feedback as GitHub PR comments. When notified to check feedback:
253
+
254
+ ```bash
255
+ # View PR comments
256
+ gh pr view <PR_NUMBER> --comments
257
+
258
+ # Or view the full PR with comments in browser
259
+ gh pr view <PR_NUMBER> --web
175
260
  ```
176
- 1. Spawned for spec 0003-user-auth
177
- 2. Read spec at codev/specs/0003-user-auth.md
178
- 3. Status: implementing
179
- 4. Follow SPIDER protocol:
180
- - Create plan
181
- - Implement auth routes
182
- - Write tests
183
- - Self-review
184
- 5. Hit blocker: unclear which JWT library to use
185
- 6. Status: blocked (described options)
186
- 7. Architect responds: "Use jose library"
187
- 8. Status: implementing
188
- 9. Complete implementation
189
- 10. Run tests: all passing
190
- 11. Status: pr-ready
191
- 12. Architect reviews and merges
192
- 13. Status: complete
193
- ```
261
+
262
+ **Workflow:**
263
+ 1. Architect leaves review comments on PR
264
+ 2. You receive a short message: "Check PR comments and address feedback"
265
+ 3. Run `gh pr view <PR_NUMBER> --comments` to see feedback
266
+ 4. Address the issues (High priority first, then Medium, Low is optional)
267
+ 5. Push fixes to the same branch
268
+ 6. Reply to PR comment when done or if clarification needed
194
269
 
195
270
  ## Constraints
196
271
 
197
272
  - **Stay in scope** - Only implement what's in your spec
198
273
  - **Don't modify shared config** - Without Architect approval
199
- - **Don't merge yourself** - The Architect handles integration
274
+ - **Merge your own PRs** - After Architect approves, you are responsible for merging
200
275
  - **Don't spawn other Builders** - Only Architects spawn Builders
201
276
  - **Keep worktree clean** - No untracked files, no debug code
277
+ - **Follow the protocol** - All phases, all artifacts
@@ -0,0 +1,170 @@
1
+ # Codev Cheatsheet
2
+
3
+ A quick reference for Codev's philosophies, concepts, and tools.
4
+
5
+ ---
6
+
7
+ ## Core Philosophies
8
+
9
+ ### 1. Natural Language is the Programming Language
10
+
11
+ Specifications and plans are as important as code—they ARE the requirements and design.
12
+
13
+ | Traditional | Codev |
14
+ |-------------|-------|
15
+ | Code first, document later | Spec first, code implements spec |
16
+ | Documentation gets stale | Specs ARE the source of truth |
17
+ | Humans read code to understand | AI agents translate spec → code |
18
+
19
+ **Corollaries:**
20
+ - The spec IS the requirements; the plan IS the design
21
+ - Code is the implementation of well-defined natural language artifacts
22
+ - If the spec is wrong, the code will be wrong—fix the spec first
23
+
24
+ ### 2. Multiple Models Outperform a Single Model
25
+
26
+ No single AI model catches everything. Diverse perspectives find more issues.
27
+
28
+ | Role | Models |
29
+ |------|--------|
30
+ | Architect & Builder | Claude (primary agent) |
31
+ | Consultants | Gemini, Codex, Claude (for reviews) |
32
+
33
+ **Corollaries:**
34
+ - 3-way reviews catch issues single models miss
35
+ - Different models have different strengths and blind spots
36
+ - Consultation happens at key checkpoints, not continuously
37
+
38
+ ### 3. Human-Agent Work Requires Thoughtful Structure
39
+
40
+ Just like structuring a human team—clear roles, defined processes, explicit handoffs.
41
+
42
+ | Component | Purpose |
43
+ |-----------|---------|
44
+ | Protocols | Define HOW work happens (SPIDER, TICK, etc.) |
45
+ | Roles | Define WHO does what (Architect, Builder, Consultant) |
46
+ | Parallelism | Scale by running multiple builders simultaneously |
47
+
48
+ **Corollaries:**
49
+ - Well-defined protocols reduce ambiguity and rework
50
+ - Clear roles enable autonomous operation
51
+ - Parallel execution multiplies throughput
52
+
53
+ ---
54
+
55
+ ## Core Concepts
56
+
57
+ ### Protocols
58
+
59
+ A **protocol** is a structured workflow that defines how work progresses from idea to completion.
60
+
61
+ | Protocol | Use For | Phases |
62
+ |----------|---------|--------|
63
+ | **SPIDER** | New features | Specify → Plan → Implement → Defend → Evaluate → Review |
64
+ | **TICK** | Amendments to existing specs | Task Identification → Coding → Kickout |
65
+ | **MAINTAIN** | Codebase hygiene | Dead code removal, documentation sync |
66
+ | **EXPERIMENT** | Research & prototyping | Hypothesis → Experiment → Conclude |
67
+
68
+ ### Roles
69
+
70
+ A **role** defines who does what work and what tools/permissions they have.
71
+
72
+ | Role | Responsibilities |
73
+ |------|------------------|
74
+ | **Architect** | Orchestrates development, writes specs/plans, reviews PRs, maintains big picture |
75
+ | **Builder** | Implements specs in isolated worktrees, writes tests, creates PRs |
76
+ | **Consultant** | External reviewers providing second opinions on specs, plans, implementations |
77
+
78
+ **Consultant Flavors** (via `--type`):
79
+ - `spec-review` - Review specification completeness
80
+ - `plan-review` - Review implementation plan feasibility
81
+ - `impl-review` - Review code for spec adherence
82
+ - `integration-review` - Review for architectural fit
83
+
84
+ ### Context Hierarchy
85
+
86
+ In much the same way an operating system has a memory hierarchy, Codev repos have a context hierarchy. The codev/ directory holds the top 3 layers. This allows both humans and agents to think about problems at different levels of detail.
87
+
88
+ **Key insight**: We build from the top down, and we propagate information from the bottom up. We start with an entry in the project list, then spec and plan out the feature, generate the code, and then propagate what we learned through the reviews.
89
+
90
+ ---
91
+
92
+ ## Tools Reference
93
+
94
+ ### codev
95
+
96
+ Project management commands. Typically used by **humans** to set up and maintain projects.
97
+
98
+ | Command | Description |
99
+ |---------|-------------|
100
+ | `codev init <dirname>` | Create a new Codev project |
101
+ | `codev adopt` | Add Codev to an existing project |
102
+ | `codev doctor` | Check dependencies and configuration |
103
+ | `codev update` | Update Codev framework |
104
+ | `codev import` | Import specs from another project |
105
+ | `codev tower` | Cross-project dashboard |
106
+
107
+ ### agent-farm (af)
108
+
109
+ Architect-Builder orchestration. Used by both **humans and agents**—agents use it more frequently.
110
+
111
+ | Command | Description |
112
+ |---------|-------------|
113
+ | `af start` | Start dashboard (port 4200, 4300, etc.) |
114
+ | `af stop` | Stop all processes |
115
+ | `af spawn -p <id>` | Spawn a builder for project |
116
+ | `af status` | Check status of all builders |
117
+ | `af send <target> <msg>` | Send message (builder↔architect) |
118
+ | `af cleanup -p <id>` | Clean up a builder worktree |
119
+ | `af open <file>` | Open file in dashboard viewer |
120
+
121
+ ### consult
122
+
123
+ Multi-agent consultation. Used by both humans and agents—**mostly agents** during reviews.
124
+
125
+ | Command | Description |
126
+ |---------|-------------|
127
+ | `consult --model <model> spec <id>` | Review a specification |
128
+ | `consult --model <model> plan <id>` | Review an implementation plan |
129
+ | `consult --model <model> pr <id>` | Review a pull request |
130
+ | `consult --model <model> general "<query>"` | General consultation |
131
+
132
+ **Models**: `gemini` (alias: `pro`), `codex` (alias: `gpt`), `claude` (alias: `opus`)
133
+
134
+ **Review Types** (via `--type`):
135
+ | Type | Use Case |
136
+ |------|----------|
137
+ | `spec-review` | Review spec completeness and clarity |
138
+ | `plan-review` | Review plan coverage and feasibility |
139
+ | `impl-review` | Review implementation quality (Builder use) |
140
+ | `integration-review` | Review architectural fit (Architect use) |
141
+
142
+ ---
143
+
144
+ ## Quick Reference
145
+
146
+ ### SPIDER Checklist
147
+
148
+ ```
149
+ [ ] Specify - Write spec in codev/specs/XXXX-name.md
150
+ [ ] Plan - Write plan in codev/plans/XXXX-name.md
151
+ For each phase of the plan:
152
+ [ ] Implement - Write code following the plan
153
+ [ ] Defend - Write tests for the implementation
154
+ [ ] Evaluate - Consult external reviewers, address feedback
155
+ [ ] Review - Write review in codev/reviews/XXXX-name.md, create PR
156
+ ```
157
+
158
+ ### Consultation Pattern
159
+
160
+ ```bash
161
+ # Run 3-way review in parallel
162
+ consult --model gemini pr <id> &
163
+ consult --model codex pr <id> &
164
+ consult --model claude pr <id> &
165
+ wait
166
+ ```
167
+
168
+ ---
169
+
170
+ *For detailed documentation, see the full protocol files in `codev/protocols/`.*