@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,469 @@
|
|
|
1
|
+
# af - Agent Farm CLI
|
|
2
|
+
|
|
3
|
+
The `af` (agent-farm) command manages multi-agent orchestration for software development. It spawns and manages builders in isolated git worktrees.
|
|
4
|
+
|
|
5
|
+
## Synopsis
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
af <command> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Global Options
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
--architect-cmd <command> Override architect command
|
|
15
|
+
--builder-cmd <command> Override builder command
|
|
16
|
+
--shell-cmd <command> Override shell command
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
### af start
|
|
22
|
+
|
|
23
|
+
Start the architect dashboard.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
af start [options]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Options:**
|
|
30
|
+
- `-c, --cmd <command>` - Command to run in architect terminal
|
|
31
|
+
- `-p, --port <port>` - Port for architect terminal
|
|
32
|
+
- `--no-role` - Skip loading architect role prompt
|
|
33
|
+
|
|
34
|
+
**Description:**
|
|
35
|
+
|
|
36
|
+
Starts the agent-farm dashboard with:
|
|
37
|
+
- Architect terminal (Claude session with architect role)
|
|
38
|
+
- Web-based UI for monitoring builders
|
|
39
|
+
- tmux session management
|
|
40
|
+
|
|
41
|
+
The dashboard is accessible via browser at `http://localhost:<port>`.
|
|
42
|
+
|
|
43
|
+
**Examples:**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Start with defaults
|
|
47
|
+
af start
|
|
48
|
+
|
|
49
|
+
# Start with custom port
|
|
50
|
+
af start -p 4300
|
|
51
|
+
|
|
52
|
+
# Start with specific command
|
|
53
|
+
af start -c "claude --model opus"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### af stop
|
|
59
|
+
|
|
60
|
+
Stop all agent farm processes.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
af stop
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Description:**
|
|
67
|
+
|
|
68
|
+
Stops all running agent-farm processes including:
|
|
69
|
+
- tmux sessions
|
|
70
|
+
- ttyd processes
|
|
71
|
+
- Dashboard servers
|
|
72
|
+
|
|
73
|
+
Does NOT clean up worktrees - use `af cleanup` for that.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### af spawn
|
|
78
|
+
|
|
79
|
+
Spawn a new builder.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
af spawn [options]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Options:**
|
|
86
|
+
- `-p, --project <id>` - Spawn builder for a spec (e.g., `0042`)
|
|
87
|
+
- `--task <text>` - Spawn builder with a task description
|
|
88
|
+
- `--protocol <name>` - Spawn builder to run a protocol
|
|
89
|
+
- `--shell` - Spawn a bare Claude session
|
|
90
|
+
- `--worktree` - Spawn worktree session
|
|
91
|
+
- `--files <files>` - Context files (comma-separated)
|
|
92
|
+
- `--no-role` - Skip loading role prompt
|
|
93
|
+
|
|
94
|
+
**Description:**
|
|
95
|
+
|
|
96
|
+
Creates a new builder in an isolated git worktree. The builder gets:
|
|
97
|
+
- Its own branch (`builder/<project>-<name>`)
|
|
98
|
+
- A dedicated terminal in the dashboard
|
|
99
|
+
- The builder role prompt loaded automatically
|
|
100
|
+
|
|
101
|
+
**Examples:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Spawn builder for spec 0042
|
|
105
|
+
af spawn -p 0042
|
|
106
|
+
|
|
107
|
+
# Spawn with task description
|
|
108
|
+
af spawn --task "Fix login bug in auth module"
|
|
109
|
+
|
|
110
|
+
# Spawn bare Claude session
|
|
111
|
+
af spawn --shell
|
|
112
|
+
|
|
113
|
+
# Spawn with context files
|
|
114
|
+
af spawn -p 0042 --files "src/auth.ts,tests/auth.test.ts"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### af status
|
|
120
|
+
|
|
121
|
+
Show status of all agents.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
af status
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Description:**
|
|
128
|
+
|
|
129
|
+
Displays the current state of all builders and the architect:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
┌────────┬──────────────┬─────────────┬─────────┐
|
|
133
|
+
│ ID │ Name │ Status │ Branch │
|
|
134
|
+
├────────┼──────────────┼─────────────┼─────────┤
|
|
135
|
+
│ arch │ Architect │ running │ main │
|
|
136
|
+
│ 0042 │ auth-feature │ implementing│ builder/0042-auth │
|
|
137
|
+
│ 0043 │ api-refactor │ pr-ready │ builder/0043-api │
|
|
138
|
+
└────────┴──────────────┴─────────────┴─────────┘
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Status values:
|
|
142
|
+
- `spawning` - Worktree created, builder starting
|
|
143
|
+
- `implementing` - Actively working
|
|
144
|
+
- `blocked` - Stuck, needs architect help
|
|
145
|
+
- `pr-ready` - Implementation complete
|
|
146
|
+
- `complete` - Merged, can be cleaned up
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### af cleanup
|
|
151
|
+
|
|
152
|
+
Clean up a builder worktree and branch.
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
af cleanup -p <id> [options]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Options:**
|
|
159
|
+
- `-p, --project <id>` - Builder ID to clean up (required)
|
|
160
|
+
- `-f, --force` - Force cleanup even if branch not merged
|
|
161
|
+
|
|
162
|
+
**Description:**
|
|
163
|
+
|
|
164
|
+
Removes a builder's worktree and associated resources. By default, refuses to delete worktrees with uncommitted changes or unmerged branches.
|
|
165
|
+
|
|
166
|
+
**Examples:**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Clean up completed builder
|
|
170
|
+
af cleanup -p 0042
|
|
171
|
+
|
|
172
|
+
# Force cleanup (may lose work)
|
|
173
|
+
af cleanup -p 0042 --force
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### af send
|
|
179
|
+
|
|
180
|
+
Send instructions to a running builder.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
af send [builder] [message] [options]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Arguments:**
|
|
187
|
+
- `builder` - Builder ID (e.g., `0042`)
|
|
188
|
+
- `message` - Message to send
|
|
189
|
+
|
|
190
|
+
**Options:**
|
|
191
|
+
- `--all` - Send to all builders
|
|
192
|
+
- `--file <path>` - Include file content in message
|
|
193
|
+
- `--interrupt` - Send Ctrl+C first
|
|
194
|
+
- `--raw` - Skip structured message formatting
|
|
195
|
+
- `--no-enter` - Do not send Enter after message
|
|
196
|
+
|
|
197
|
+
**Description:**
|
|
198
|
+
|
|
199
|
+
Sends text to a builder's terminal. Useful for:
|
|
200
|
+
- Providing guidance when builder is blocked
|
|
201
|
+
- Interrupting long-running processes
|
|
202
|
+
- Sending instructions or context
|
|
203
|
+
|
|
204
|
+
**Examples:**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Send message to builder
|
|
208
|
+
af send 0042 "Focus on the auth module first"
|
|
209
|
+
|
|
210
|
+
# Interrupt and send new instructions
|
|
211
|
+
af send 0042 --interrupt "Stop that. Try a different approach."
|
|
212
|
+
|
|
213
|
+
# Send to all builders
|
|
214
|
+
af send --all "Time to wrap up, create PRs"
|
|
215
|
+
|
|
216
|
+
# Include file content
|
|
217
|
+
af send 0042 --file src/api.ts "Review this implementation"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### af open
|
|
223
|
+
|
|
224
|
+
Open file annotation viewer.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
af open <file>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Arguments:**
|
|
231
|
+
- `file` - Path to file to open
|
|
232
|
+
|
|
233
|
+
**Description:**
|
|
234
|
+
|
|
235
|
+
Opens a web-based viewer for annotating files with review comments. Comments use the `// REVIEW:` format and are stored directly in the source file.
|
|
236
|
+
|
|
237
|
+
**Example:**
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
af open src/auth/login.ts
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### af util
|
|
246
|
+
|
|
247
|
+
Spawn a utility shell terminal.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
af util [options]
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Aliases:** `af shell`
|
|
254
|
+
|
|
255
|
+
**Options:**
|
|
256
|
+
- `-n, --name <name>` - Name for the shell terminal
|
|
257
|
+
|
|
258
|
+
**Description:**
|
|
259
|
+
|
|
260
|
+
Opens a general-purpose shell terminal in the dashboard. Useful for:
|
|
261
|
+
- Running tests
|
|
262
|
+
- Git operations
|
|
263
|
+
- Manual debugging
|
|
264
|
+
|
|
265
|
+
**Examples:**
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# Open utility shell
|
|
269
|
+
af util
|
|
270
|
+
|
|
271
|
+
# Open with custom name
|
|
272
|
+
af util -n "test-runner"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### af rename
|
|
278
|
+
|
|
279
|
+
Rename a builder or utility terminal.
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
af rename <id> <name>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**Arguments:**
|
|
286
|
+
- `id` - Builder or terminal ID
|
|
287
|
+
- `name` - New name
|
|
288
|
+
|
|
289
|
+
**Example:**
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
af rename 0042 "auth-rework"
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
### af tutorial
|
|
298
|
+
|
|
299
|
+
Interactive tutorial for new users.
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
af tutorial [options]
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Options:**
|
|
306
|
+
- `--reset` - Start tutorial fresh
|
|
307
|
+
- `--skip` - Skip current step
|
|
308
|
+
- `--status` - Show tutorial progress
|
|
309
|
+
|
|
310
|
+
**Description:**
|
|
311
|
+
|
|
312
|
+
Walks through the basics of using agent-farm with guided steps.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
### af ports
|
|
317
|
+
|
|
318
|
+
Manage global port registry.
|
|
319
|
+
|
|
320
|
+
#### af ports list
|
|
321
|
+
|
|
322
|
+
List all port allocations.
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
af ports list
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Shows port blocks allocated to different projects:
|
|
329
|
+
```
|
|
330
|
+
Port Allocations
|
|
331
|
+
4200-4299: /Users/me/project-a
|
|
332
|
+
4300-4399: /Users/me/project-b
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
#### af ports cleanup
|
|
336
|
+
|
|
337
|
+
Remove stale port allocations.
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
af ports cleanup
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Removes entries for projects that no longer exist.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
### af tower
|
|
348
|
+
|
|
349
|
+
Manage the tower dashboard.
|
|
350
|
+
|
|
351
|
+
#### af tower start
|
|
352
|
+
|
|
353
|
+
Start the tower dashboard.
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
af tower start [options]
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Options:**
|
|
360
|
+
- `-p, --port <port>` - Port to run on (default: 4100)
|
|
361
|
+
|
|
362
|
+
#### af tower stop
|
|
363
|
+
|
|
364
|
+
Stop the tower dashboard.
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
af tower stop [options]
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Options:**
|
|
371
|
+
- `-p, --port <port>` - Port to stop (default: 4100)
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
### af db
|
|
376
|
+
|
|
377
|
+
Database debugging and maintenance commands.
|
|
378
|
+
|
|
379
|
+
#### af db dump
|
|
380
|
+
|
|
381
|
+
Export all tables to JSON.
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
af db dump [options]
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**Options:**
|
|
388
|
+
- `--global` - Dump global.db instead of project db
|
|
389
|
+
|
|
390
|
+
#### af db query
|
|
391
|
+
|
|
392
|
+
Run a SELECT query.
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
af db query <sql> [options]
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Options:**
|
|
399
|
+
- `--global` - Query global.db
|
|
400
|
+
|
|
401
|
+
**Example:**
|
|
402
|
+
|
|
403
|
+
```bash
|
|
404
|
+
af db query "SELECT * FROM builders WHERE status = 'implementing'"
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
#### af db reset
|
|
408
|
+
|
|
409
|
+
Delete database and start fresh.
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
af db reset [options]
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Options:**
|
|
416
|
+
- `--global` - Reset global.db
|
|
417
|
+
- `--force` - Skip confirmation
|
|
418
|
+
|
|
419
|
+
#### af db stats
|
|
420
|
+
|
|
421
|
+
Show database statistics.
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
af db stats [options]
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**Options:**
|
|
428
|
+
- `--global` - Show stats for global.db
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Configuration
|
|
433
|
+
|
|
434
|
+
Customize commands via `codev/config.json`:
|
|
435
|
+
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"shell": {
|
|
439
|
+
"architect": "claude --model opus",
|
|
440
|
+
"builder": "claude --model sonnet",
|
|
441
|
+
"shell": "bash"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Or override via CLI flags:
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
af start --architect-cmd "claude --model opus"
|
|
450
|
+
af spawn -p 0042 --builder-cmd "claude --model haiku"
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## Files
|
|
456
|
+
|
|
457
|
+
| File | Description |
|
|
458
|
+
|------|-------------|
|
|
459
|
+
| `.agent-farm/state.json` | Project runtime state |
|
|
460
|
+
| `~/.agent-farm/ports.json` | Global port registry |
|
|
461
|
+
| `codev/config.json` | Project configuration |
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## See Also
|
|
466
|
+
|
|
467
|
+
- [codev](codev.md) - Project management commands
|
|
468
|
+
- [consult](consult.md) - AI consultation
|
|
469
|
+
- [overview](overview.md) - CLI overview
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# codev - Project Management CLI
|
|
2
|
+
|
|
3
|
+
The `codev` command manages project setup, maintenance, and framework-level operations.
|
|
4
|
+
|
|
5
|
+
## Synopsis
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
codev <command> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
### codev init
|
|
14
|
+
|
|
15
|
+
Create a new codev project.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
codev init [project-name] [options]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Arguments:**
|
|
22
|
+
- `project-name` - Name of the project (optional, prompts if not provided)
|
|
23
|
+
|
|
24
|
+
**Options:**
|
|
25
|
+
- `-y, --yes` - Use defaults without prompting
|
|
26
|
+
|
|
27
|
+
**Description:**
|
|
28
|
+
|
|
29
|
+
Creates a minimal codev project structure:
|
|
30
|
+
- `codev/specs/` - Specification files
|
|
31
|
+
- `codev/plans/` - Implementation plans
|
|
32
|
+
- `codev/reviews/` - Review documents
|
|
33
|
+
- `codev/projectlist.md` - Project tracking
|
|
34
|
+
- `CLAUDE.md` / `AGENTS.md` - AI agent instructions
|
|
35
|
+
- `.gitignore` - Standard ignores
|
|
36
|
+
|
|
37
|
+
Framework files (protocols, roles) are provided by the embedded skeleton at runtime, not copied to the project.
|
|
38
|
+
|
|
39
|
+
**Examples:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Interactive creation
|
|
43
|
+
codev init
|
|
44
|
+
|
|
45
|
+
# Create with name
|
|
46
|
+
codev init my-app
|
|
47
|
+
|
|
48
|
+
# Non-interactive with defaults
|
|
49
|
+
codev init my-app -y
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### codev adopt
|
|
55
|
+
|
|
56
|
+
Add codev to an existing project.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
codev adopt [options]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Options:**
|
|
63
|
+
- `-y, --yes` - Skip conflict prompts
|
|
64
|
+
|
|
65
|
+
**Description:**
|
|
66
|
+
|
|
67
|
+
Adds codev structure to the current directory. Detects existing files (CLAUDE.md, AGENTS.md) and prompts before overwriting.
|
|
68
|
+
|
|
69
|
+
Use this when you want to add codev to a project that already has code.
|
|
70
|
+
|
|
71
|
+
**Examples:**
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Add to current project
|
|
75
|
+
cd existing-project
|
|
76
|
+
codev adopt
|
|
77
|
+
|
|
78
|
+
# Skip prompts for conflicts
|
|
79
|
+
codev adopt -y
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### codev doctor
|
|
85
|
+
|
|
86
|
+
Check system dependencies.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
codev doctor
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Description:**
|
|
93
|
+
|
|
94
|
+
Verifies that all required dependencies are installed and properly configured:
|
|
95
|
+
|
|
96
|
+
**Core Dependencies (required):**
|
|
97
|
+
- Node.js (>= 18.0.0)
|
|
98
|
+
- tmux (>= 3.0)
|
|
99
|
+
- ttyd (>= 1.7.0)
|
|
100
|
+
- git (>= 2.5.0)
|
|
101
|
+
- gh (GitHub CLI, authenticated)
|
|
102
|
+
|
|
103
|
+
**AI CLI Dependencies (at least one required):**
|
|
104
|
+
- Claude (`@anthropic-ai/claude-code`)
|
|
105
|
+
- Gemini (`gemini-cli`)
|
|
106
|
+
- Codex (`@openai/codex`)
|
|
107
|
+
|
|
108
|
+
**Exit Codes:**
|
|
109
|
+
- `0` - All OK or warnings only
|
|
110
|
+
- `1` - Required dependencies missing
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
codev doctor
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Output:
|
|
119
|
+
```
|
|
120
|
+
Codev Doctor - Checking your environment
|
|
121
|
+
============================================
|
|
122
|
+
|
|
123
|
+
Core Dependencies (required for Agent Farm)
|
|
124
|
+
|
|
125
|
+
✓ Node.js 20.10.0
|
|
126
|
+
✓ tmux 3.4
|
|
127
|
+
✓ ttyd 1.7.4
|
|
128
|
+
✓ git 2.42.0
|
|
129
|
+
✓ gh authenticated
|
|
130
|
+
✓ @cluesmith/codev 1.0.0
|
|
131
|
+
|
|
132
|
+
AI CLI Dependencies (at least one required)
|
|
133
|
+
|
|
134
|
+
✓ Claude working
|
|
135
|
+
✓ Gemini working
|
|
136
|
+
○ Codex not installed (npm i -g @openai/codex)
|
|
137
|
+
|
|
138
|
+
============================================
|
|
139
|
+
ALL OK - Your environment is ready for Codev!
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### codev update
|
|
145
|
+
|
|
146
|
+
Update codev templates and protocols.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
codev update [options]
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Options:**
|
|
153
|
+
- `-n, --dry-run` - Show changes without applying
|
|
154
|
+
- `-f, --force` - Force update, overwrite all files
|
|
155
|
+
|
|
156
|
+
**Description:**
|
|
157
|
+
|
|
158
|
+
Updates framework files (protocols, roles, agents) from the installed `@cluesmith/codev` package. User data (specs, plans, reviews) is never modified.
|
|
159
|
+
|
|
160
|
+
If you've customized a file locally, the update creates a `.codev-new` file with the new version so you can merge changes manually.
|
|
161
|
+
|
|
162
|
+
**Examples:**
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Preview changes
|
|
166
|
+
codev update --dry-run
|
|
167
|
+
|
|
168
|
+
# Apply updates
|
|
169
|
+
codev update
|
|
170
|
+
|
|
171
|
+
# Force overwrite (discard local changes)
|
|
172
|
+
codev update --force
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### codev eject
|
|
178
|
+
|
|
179
|
+
Copy embedded skeleton files locally for customization.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
codev eject [path] [options]
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Arguments:**
|
|
186
|
+
- `path` - File or directory to eject (e.g., `protocols/spider`)
|
|
187
|
+
|
|
188
|
+
**Options:**
|
|
189
|
+
- `-l, --list` - List available files to eject
|
|
190
|
+
- `-f, --force` - Overwrite existing files
|
|
191
|
+
|
|
192
|
+
**Description:**
|
|
193
|
+
|
|
194
|
+
Copies embedded framework files to your local `codev/` directory so you can customize them. Ejected files become "local overrides" and won't be changed by `codev update`.
|
|
195
|
+
|
|
196
|
+
Use this when you want to modify protocols, roles, or templates for your specific project.
|
|
197
|
+
|
|
198
|
+
**Examples:**
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# List available files
|
|
202
|
+
codev eject --list
|
|
203
|
+
|
|
204
|
+
# Eject a single file
|
|
205
|
+
codev eject roles/consultant.md
|
|
206
|
+
|
|
207
|
+
# Eject entire protocol directory
|
|
208
|
+
codev eject protocols/spider
|
|
209
|
+
|
|
210
|
+
# Force overwrite existing
|
|
211
|
+
codev eject protocols/spider --force
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### codev tower
|
|
217
|
+
|
|
218
|
+
Cross-project dashboard showing all agent-farm instances.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
codev tower [options]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Options:**
|
|
225
|
+
- `-p, --port <port>` - Port to run on (default: 4100)
|
|
226
|
+
- `--stop` - Stop the tower dashboard
|
|
227
|
+
|
|
228
|
+
**Description:**
|
|
229
|
+
|
|
230
|
+
Starts a web-based dashboard that shows all running agent-farm instances across different projects. Useful when working on multiple codev projects simultaneously.
|
|
231
|
+
|
|
232
|
+
The tower aggregates status from the global port registry at `~/.agent-farm/ports.json`.
|
|
233
|
+
|
|
234
|
+
**Examples:**
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Start tower dashboard
|
|
238
|
+
codev tower
|
|
239
|
+
|
|
240
|
+
# Start on custom port
|
|
241
|
+
codev tower -p 4200
|
|
242
|
+
|
|
243
|
+
# Stop the dashboard
|
|
244
|
+
codev tower --stop
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## See Also
|
|
250
|
+
|
|
251
|
+
- [af](agent-farm.md) - Agent Farm commands
|
|
252
|
+
- [consult](consult.md) - AI consultation
|
|
253
|
+
- [overview](overview.md) - CLI overview
|