@cluesmith/codev 3.0.0-rc.1 → 3.0.0-rc.11

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.
Files changed (328) hide show
  1. package/LICENSE +201 -0
  2. package/bin/af.js +2 -2
  3. package/bin/afx.js +8 -0
  4. package/bin/consult.js +2 -1
  5. package/bin/team.js +2 -1
  6. package/{dashboard/dist/assets/index-nr0cXxtf.css → dashboard-dist/assets/index-Bs8I7N2s.css} +1 -1
  7. package/dashboard-dist/assets/index-CkNo2z6t.js +195 -0
  8. package/dashboard-dist/assets/index-CkNo2z6t.js.map +1 -0
  9. package/dashboard-dist/dist/assets/index-Bs8I7N2s.css +32 -0
  10. package/dashboard-dist/dist/assets/index-CkNo2z6t.js +195 -0
  11. package/dashboard-dist/dist/assets/index-CkNo2z6t.js.map +1 -0
  12. package/{dashboard → dashboard-dist}/dist/index.html +2 -2
  13. package/dashboard-dist/index.html +14 -0
  14. package/dist/agent-farm/cli.d.ts.map +1 -1
  15. package/dist/agent-farm/cli.js +17 -14
  16. package/dist/agent-farm/cli.js.map +1 -1
  17. package/dist/agent-farm/commands/architect.d.ts +4 -4
  18. package/dist/agent-farm/commands/architect.d.ts.map +1 -1
  19. package/dist/agent-farm/commands/architect.js +23 -12
  20. package/dist/agent-farm/commands/architect.js.map +1 -1
  21. package/dist/agent-farm/commands/attach.js +8 -8
  22. package/dist/agent-farm/commands/attach.js.map +1 -1
  23. package/dist/agent-farm/commands/bench.d.ts +1 -1
  24. package/dist/agent-farm/commands/bench.js +1 -1
  25. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  26. package/dist/agent-farm/commands/cleanup.js +10 -5
  27. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  28. package/dist/agent-farm/commands/cron.js +1 -1
  29. package/dist/agent-farm/commands/cron.js.map +1 -1
  30. package/dist/agent-farm/commands/db.d.ts +3 -3
  31. package/dist/agent-farm/commands/db.js +4 -4
  32. package/dist/agent-farm/commands/db.js.map +1 -1
  33. package/dist/agent-farm/commands/open.js +2 -2
  34. package/dist/agent-farm/commands/open.js.map +1 -1
  35. package/dist/agent-farm/commands/rename.js +1 -1
  36. package/dist/agent-farm/commands/rename.js.map +1 -1
  37. package/dist/agent-farm/commands/send.d.ts +4 -1
  38. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  39. package/dist/agent-farm/commands/send.js +8 -5
  40. package/dist/agent-farm/commands/send.js.map +1 -1
  41. package/dist/agent-farm/commands/shell.js +3 -3
  42. package/dist/agent-farm/commands/shell.js.map +1 -1
  43. package/dist/agent-farm/commands/spawn-roles.d.ts +2 -1
  44. package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
  45. package/dist/agent-farm/commands/spawn-roles.js +1 -1
  46. package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
  47. package/dist/agent-farm/commands/spawn-worktree.d.ts +49 -10
  48. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
  49. package/dist/agent-farm/commands/spawn-worktree.js +356 -51
  50. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
  51. package/dist/agent-farm/commands/spawn.d.ts +6 -6
  52. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  53. package/dist/agent-farm/commands/spawn.js +182 -74
  54. package/dist/agent-farm/commands/spawn.js.map +1 -1
  55. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  56. package/dist/agent-farm/commands/status.js +48 -3
  57. package/dist/agent-farm/commands/status.js.map +1 -1
  58. package/dist/agent-farm/commands/team-update.d.ts +1 -1
  59. package/dist/agent-farm/commands/team-update.d.ts.map +1 -1
  60. package/dist/agent-farm/commands/team-update.js +8 -5
  61. package/dist/agent-farm/commands/team-update.js.map +1 -1
  62. package/dist/agent-farm/commands/team.d.ts +1 -1
  63. package/dist/agent-farm/commands/team.d.ts.map +1 -1
  64. package/dist/agent-farm/commands/team.js +7 -3
  65. package/dist/agent-farm/commands/team.js.map +1 -1
  66. package/dist/agent-farm/commands/tower-cloud.d.ts +2 -2
  67. package/dist/agent-farm/commands/tower-cloud.js +3 -3
  68. package/dist/agent-farm/commands/tower-cloud.js.map +1 -1
  69. package/dist/agent-farm/commands/tower.js +2 -2
  70. package/dist/agent-farm/commands/tower.js.map +1 -1
  71. package/dist/agent-farm/lib/cloud-config.js +2 -2
  72. package/dist/agent-farm/lib/cloud-config.js.map +1 -1
  73. package/dist/agent-farm/lib/tower-client.d.ts +6 -230
  74. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  75. package/dist/agent-farm/lib/tower-client.js +6 -293
  76. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  77. package/dist/agent-farm/lib/tunnel-client.js +1 -1
  78. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  79. package/dist/agent-farm/servers/message-write.d.ts +24 -0
  80. package/dist/agent-farm/servers/message-write.d.ts.map +1 -0
  81. package/dist/agent-farm/servers/message-write.js +63 -0
  82. package/dist/agent-farm/servers/message-write.js.map +1 -0
  83. package/dist/agent-farm/servers/overview.d.ts +10 -8
  84. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  85. package/dist/agent-farm/servers/overview.js +78 -38
  86. package/dist/agent-farm/servers/overview.js.map +1 -1
  87. package/dist/agent-farm/servers/send-buffer.d.ts +4 -3
  88. package/dist/agent-farm/servers/send-buffer.d.ts.map +1 -1
  89. package/dist/agent-farm/servers/send-buffer.js +7 -4
  90. package/dist/agent-farm/servers/send-buffer.js.map +1 -1
  91. package/dist/agent-farm/servers/tower-cron-parser.js +1 -1
  92. package/dist/agent-farm/servers/tower-cron-parser.js.map +1 -1
  93. package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
  94. package/dist/agent-farm/servers/tower-cron.js +4 -5
  95. package/dist/agent-farm/servers/tower-cron.js.map +1 -1
  96. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  97. package/dist/agent-farm/servers/tower-instances.js +15 -13
  98. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  99. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  100. package/dist/agent-farm/servers/tower-routes.js +9 -16
  101. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  102. package/dist/agent-farm/servers/tower-server.js +1 -1
  103. package/dist/agent-farm/servers/tower-terminals.d.ts +2 -2
  104. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  105. package/dist/agent-farm/servers/tower-terminals.js +64 -36
  106. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  107. package/dist/agent-farm/servers/tower-tunnel.js +2 -2
  108. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
  109. package/dist/agent-farm/servers/tower-utils.d.ts +9 -6
  110. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  111. package/dist/agent-farm/servers/tower-utils.js +13 -7
  112. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  113. package/dist/agent-farm/types.d.ts +13 -0
  114. package/dist/agent-farm/types.d.ts.map +1 -1
  115. package/dist/agent-farm/utils/config.d.ts +11 -0
  116. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  117. package/dist/agent-farm/utils/config.js +39 -17
  118. package/dist/agent-farm/utils/config.js.map +1 -1
  119. package/dist/agent-farm/utils/harness.d.ts +85 -0
  120. package/dist/agent-farm/utils/harness.d.ts.map +1 -0
  121. package/dist/agent-farm/utils/harness.js +212 -0
  122. package/dist/agent-farm/utils/harness.js.map +1 -0
  123. package/dist/agent-farm/utils/roles.d.ts +11 -4
  124. package/dist/agent-farm/utils/roles.d.ts.map +1 -1
  125. package/dist/agent-farm/utils/roles.js +21 -6
  126. package/dist/agent-farm/utils/roles.js.map +1 -1
  127. package/dist/cli.d.ts +1 -1
  128. package/dist/cli.d.ts.map +1 -1
  129. package/dist/cli.js +40 -5
  130. package/dist/cli.js.map +1 -1
  131. package/dist/commands/adopt.d.ts.map +1 -1
  132. package/dist/commands/adopt.js +16 -45
  133. package/dist/commands/adopt.js.map +1 -1
  134. package/dist/commands/consult/index.d.ts +37 -3
  135. package/dist/commands/consult/index.d.ts.map +1 -1
  136. package/dist/commands/consult/index.js +281 -194
  137. package/dist/commands/consult/index.js.map +1 -1
  138. package/dist/commands/doctor.d.ts.map +1 -1
  139. package/dist/commands/doctor.js +121 -31
  140. package/dist/commands/doctor.js.map +1 -1
  141. package/dist/commands/init.d.ts.map +1 -1
  142. package/dist/commands/init.js +13 -43
  143. package/dist/commands/init.js.map +1 -1
  144. package/dist/commands/porch/artifacts.d.ts +69 -0
  145. package/dist/commands/porch/artifacts.d.ts.map +1 -0
  146. package/dist/commands/porch/artifacts.js +368 -0
  147. package/dist/commands/porch/artifacts.js.map +1 -0
  148. package/dist/commands/porch/checks.d.ts +14 -3
  149. package/dist/commands/porch/checks.d.ts.map +1 -1
  150. package/dist/commands/porch/checks.js +150 -4
  151. package/dist/commands/porch/checks.js.map +1 -1
  152. package/dist/commands/porch/config.d.ts +6 -9
  153. package/dist/commands/porch/config.d.ts.map +1 -1
  154. package/dist/commands/porch/config.js +12 -37
  155. package/dist/commands/porch/config.js.map +1 -1
  156. package/dist/commands/porch/index.d.ts +12 -7
  157. package/dist/commands/porch/index.d.ts.map +1 -1
  158. package/dist/commands/porch/index.js +273 -82
  159. package/dist/commands/porch/index.js.map +1 -1
  160. package/dist/commands/porch/next.d.ts.map +1 -1
  161. package/dist/commands/porch/next.js +142 -75
  162. package/dist/commands/porch/next.js.map +1 -1
  163. package/dist/commands/porch/notify.d.ts +2 -2
  164. package/dist/commands/porch/notify.js +5 -5
  165. package/dist/commands/porch/notify.js.map +1 -1
  166. package/dist/commands/porch/prompts.d.ts +2 -1
  167. package/dist/commands/porch/prompts.d.ts.map +1 -1
  168. package/dist/commands/porch/prompts.js +34 -38
  169. package/dist/commands/porch/prompts.js.map +1 -1
  170. package/dist/commands/porch/protocol.d.ts +4 -3
  171. package/dist/commands/porch/protocol.d.ts.map +1 -1
  172. package/dist/commands/porch/protocol.js +21 -21
  173. package/dist/commands/porch/protocol.js.map +1 -1
  174. package/dist/commands/porch/state.d.ts +27 -2
  175. package/dist/commands/porch/state.d.ts.map +1 -1
  176. package/dist/commands/porch/state.js +100 -9
  177. package/dist/commands/porch/state.js.map +1 -1
  178. package/dist/commands/porch/types.d.ts +10 -2
  179. package/dist/commands/porch/types.d.ts.map +1 -1
  180. package/dist/commands/sync.d.ts +26 -0
  181. package/dist/commands/sync.d.ts.map +1 -0
  182. package/dist/commands/sync.js +207 -0
  183. package/dist/commands/sync.js.map +1 -0
  184. package/dist/commands/update.d.ts +15 -2
  185. package/dist/commands/update.d.ts.map +1 -1
  186. package/dist/commands/update.js +159 -202
  187. package/dist/commands/update.js.map +1 -1
  188. package/dist/lib/config.d.ts +96 -0
  189. package/dist/lib/config.d.ts.map +1 -0
  190. package/dist/lib/config.js +165 -0
  191. package/dist/lib/config.js.map +1 -0
  192. package/dist/lib/forge-contracts.d.ts +100 -0
  193. package/dist/lib/forge-contracts.d.ts.map +1 -0
  194. package/dist/lib/forge-contracts.js +35 -0
  195. package/dist/lib/forge-contracts.js.map +1 -0
  196. package/dist/lib/forge.d.ts +102 -0
  197. package/dist/lib/forge.d.ts.map +1 -0
  198. package/dist/lib/forge.js +376 -0
  199. package/dist/lib/forge.js.map +1 -0
  200. package/dist/lib/github.d.ts +68 -60
  201. package/dist/lib/github.d.ts.map +1 -1
  202. package/dist/lib/github.js +160 -169
  203. package/dist/lib/github.js.map +1 -1
  204. package/dist/lib/skeleton.d.ts +15 -5
  205. package/dist/lib/skeleton.d.ts.map +1 -1
  206. package/dist/lib/skeleton.js +82 -7
  207. package/dist/lib/skeleton.js.map +1 -1
  208. package/dist/lib/team-github.d.ts +7 -3
  209. package/dist/lib/team-github.d.ts.map +1 -1
  210. package/dist/lib/team-github.js +29 -19
  211. package/dist/lib/team-github.js.map +1 -1
  212. package/dist/terminal/pty-manager.d.ts.map +1 -1
  213. package/dist/terminal/pty-manager.js +2 -0
  214. package/dist/terminal/pty-manager.js.map +1 -1
  215. package/dist/terminal/ws-protocol.d.ts +10 -8
  216. package/dist/terminal/ws-protocol.d.ts.map +1 -1
  217. package/dist/terminal/ws-protocol.js +3 -0
  218. package/dist/terminal/ws-protocol.js.map +1 -1
  219. package/package.json +27 -24
  220. package/scripts/forge/gitea/auth-status.sh +3 -0
  221. package/scripts/forge/gitea/issue-comment.sh +3 -0
  222. package/scripts/forge/gitea/issue-list.sh +3 -0
  223. package/scripts/forge/gitea/issue-view.sh +3 -0
  224. package/scripts/forge/gitea/pr-exists.sh +6 -0
  225. package/scripts/forge/gitea/pr-list.sh +3 -0
  226. package/scripts/forge/gitea/pr-merge.sh +3 -0
  227. package/scripts/forge/gitea/pr-view.sh +3 -0
  228. package/scripts/forge/gitea/recently-closed.sh +3 -0
  229. package/scripts/forge/gitea/recently-merged.sh +3 -0
  230. package/scripts/forge/gitea/repo-archive.sh +11 -0
  231. package/scripts/forge/gitea/user-identity.sh +3 -0
  232. package/scripts/forge/github/auth-status.sh +4 -0
  233. package/scripts/forge/github/issue-comment.sh +5 -0
  234. package/scripts/forge/github/issue-list.sh +4 -0
  235. package/scripts/forge/github/issue-view.sh +5 -0
  236. package/scripts/forge/github/on-it-timestamps.sh +8 -0
  237. package/scripts/forge/github/pr-diff.sh +10 -0
  238. package/scripts/forge/github/pr-exists.sh +7 -0
  239. package/scripts/forge/github/pr-list.sh +4 -0
  240. package/scripts/forge/github/pr-merge.sh +5 -0
  241. package/scripts/forge/github/pr-search.sh +5 -0
  242. package/scripts/forge/github/pr-view.sh +11 -0
  243. package/scripts/forge/github/recently-closed.sh +15 -0
  244. package/scripts/forge/github/recently-merged.sh +15 -0
  245. package/scripts/forge/github/repo-archive.sh +10 -0
  246. package/scripts/forge/github/team-activity.sh +5 -0
  247. package/scripts/forge/github/user-identity.sh +4 -0
  248. package/scripts/forge/gitlab/auth-status.sh +3 -0
  249. package/scripts/forge/gitlab/issue-comment.sh +3 -0
  250. package/scripts/forge/gitlab/issue-list.sh +3 -0
  251. package/scripts/forge/gitlab/issue-view.sh +3 -0
  252. package/scripts/forge/gitlab/pr-diff.sh +3 -0
  253. package/scripts/forge/gitlab/pr-exists.sh +5 -0
  254. package/scripts/forge/gitlab/pr-list.sh +3 -0
  255. package/scripts/forge/gitlab/pr-merge.sh +3 -0
  256. package/scripts/forge/gitlab/pr-search.sh +3 -0
  257. package/scripts/forge/gitlab/pr-view.sh +3 -0
  258. package/scripts/forge/gitlab/recently-closed.sh +3 -0
  259. package/scripts/forge/gitlab/recently-merged.sh +3 -0
  260. package/scripts/forge/gitlab/repo-archive.sh +12 -0
  261. package/scripts/forge/gitlab/user-identity.sh +3 -0
  262. package/skeleton/.claude/skills/afx/SKILL.md +144 -0
  263. package/skeleton/.claude/skills/codev/SKILL.md +3 -3
  264. package/skeleton/.claude/skills/consult/SKILL.md +1 -1
  265. package/skeleton/.claude/skills/porch/SKILL.md +2 -2
  266. package/skeleton/DEPENDENCIES.md +1 -1
  267. package/skeleton/builders.md +4 -4
  268. package/skeleton/protocol-schema.json +2 -2
  269. package/skeleton/protocols/air/builder-prompt.md +6 -6
  270. package/skeleton/protocols/air/prompts/pr.md +17 -5
  271. package/skeleton/protocols/air/protocol.md +1 -2
  272. package/skeleton/protocols/aspir/builder-prompt.md +28 -6
  273. package/skeleton/protocols/aspir/prompts/review.md +11 -0
  274. package/skeleton/protocols/aspir/protocol.json +9 -1
  275. package/skeleton/protocols/aspir/protocol.md +1 -1
  276. package/skeleton/protocols/aspir/templates/plan.md +0 -20
  277. package/skeleton/protocols/aspir/templates/spec.md +0 -28
  278. package/skeleton/protocols/bugfix/builder-prompt.md +6 -6
  279. package/skeleton/protocols/bugfix/prompts/pr.md +16 -4
  280. package/skeleton/protocols/experiment/builder-prompt.md +15 -0
  281. package/skeleton/protocols/experiment/protocol.md +1 -6
  282. package/skeleton/protocols/maintain/builder-prompt.md +12 -11
  283. package/skeleton/protocols/maintain/prompts/maintain.md +88 -0
  284. package/skeleton/protocols/maintain/prompts/review.md +84 -0
  285. package/skeleton/protocols/maintain/protocol.json +14 -68
  286. package/skeleton/protocols/maintain/protocol.md +111 -409
  287. package/skeleton/protocols/maintain/templates/maintenance-run.md +18 -49
  288. package/skeleton/protocols/protocol-schema.json +1 -1
  289. package/skeleton/protocols/spike/builder-prompt.md +1 -1
  290. package/skeleton/protocols/spike/protocol.md +4 -4
  291. package/skeleton/protocols/spir/builder-prompt.md +28 -5
  292. package/skeleton/protocols/spir/prompts/review.md +11 -0
  293. package/skeleton/protocols/spir/protocol.json +9 -1
  294. package/skeleton/protocols/spir/protocol.md +2 -2
  295. package/skeleton/protocols/spir/templates/plan.md +0 -20
  296. package/skeleton/protocols/spir/templates/spec.md +0 -28
  297. package/skeleton/resources/commands/agent-farm.md +84 -84
  298. package/skeleton/resources/commands/codev.md +1 -1
  299. package/skeleton/resources/commands/consult.md +16 -7
  300. package/skeleton/resources/commands/overview.md +14 -15
  301. package/skeleton/resources/risk-triage.md +1 -1
  302. package/skeleton/resources/workflow-reference.md +14 -14
  303. package/skeleton/roles/architect.md +55 -43
  304. package/skeleton/roles/builder.md +22 -14
  305. package/skeleton/templates/AGENTS.md +4 -3
  306. package/skeleton/templates/CLAUDE.md +4 -3
  307. package/skeleton/templates/cheatsheet.md +11 -12
  308. package/templates/3d-viewer.html +16 -18
  309. package/templates/tower.html +1 -1
  310. package/dashboard/dist/assets/index-CiIBsixF.js +0 -194
  311. package/dashboard/dist/assets/index-CiIBsixF.js.map +0 -1
  312. package/skeleton/.claude/skills/af/SKILL.md +0 -146
  313. package/skeleton/porch/prompts/understand.md +0 -61
  314. package/skeleton/porch/prompts/verify.md +0 -58
  315. package/skeleton/protocols/maintain/prompts/audit.md +0 -111
  316. package/skeleton/protocols/maintain/prompts/clean.md +0 -91
  317. package/skeleton/protocols/maintain/prompts/sync.md +0 -113
  318. package/skeleton/protocols/maintain/prompts/verify.md +0 -110
  319. package/skeleton/protocols/tick/builder-prompt.md +0 -65
  320. package/skeleton/protocols/tick/consult-types/impl-review.md +0 -72
  321. package/skeleton/protocols/tick/consult-types/plan-review.md +0 -59
  322. package/skeleton/protocols/tick/consult-types/pr-review.md +0 -72
  323. package/skeleton/protocols/tick/consult-types/spec-review.md +0 -55
  324. package/skeleton/protocols/tick/protocol.json +0 -151
  325. package/skeleton/protocols/tick/protocol.md +0 -277
  326. package/skeleton/protocols/tick/templates/plan.md +0 -67
  327. package/skeleton/protocols/tick/templates/review.md +0 -89
  328. package/skeleton/protocols/tick/templates/spec.md +0 -61
@@ -1,146 +0,0 @@
1
- ---
2
- name: af
3
- description: Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks. ALWAYS consult this skill BEFORE running any `af` command to get the exact syntax. This prevents wasting time guessing flags that don't exist. Use this whenever you need to spawn a builder, check status, send messages, clean up worktrees, manage Tower, or run cron tasks. If you're about to type `af` followed by anything, check here first.
4
- ---
5
-
6
- # Agent Farm CLI
7
-
8
- ## af spawn
9
-
10
- Spawns a new builder in an isolated git worktree.
11
-
12
- ```
13
- af spawn [number] [options]
14
- ```
15
-
16
- **The ONLY flags that exist:**
17
-
18
- | Flag | Description |
19
- |------|-------------|
20
- | `--protocol <name>` | Protocol: spir, aspir, air, bugfix, tick, maintain, experiment. **Required for numbered spawns.** |
21
- | `--task <text>` | Ad-hoc task (no issue number needed) |
22
- | `--shell` | Bare Claude session |
23
- | `--worktree` | Bare worktree session |
24
- | `--amends <number>` | Original spec number (TICK only) |
25
- | `--files <files>` | Context files, comma-separated. **Requires `--task`.** |
26
- | `--no-comment` | Skip commenting on the GitHub issue |
27
- | `--force` | Skip dirty-worktree and collision checks |
28
- | `--soft` | Soft mode (AI follows protocol, you verify) |
29
- | `--strict` | Strict mode (porch orchestrates) — this is the default |
30
- | `--resume` | Resume builder in existing worktree |
31
- | `--no-role` | Skip loading role prompt |
32
-
33
- **There is NO `-t`, `--title`, `--name`, or `--branch` flag.** The branch name is auto-generated from the issue title.
34
-
35
- **Examples:**
36
- ```bash
37
- af spawn 42 --protocol spir # SPIR builder for issue #42
38
- af spawn 42 --protocol aspir # ASPIR (autonomous, no human gates)
39
- af spawn 42 --protocol air # AIR (small features)
40
- af spawn 42 --protocol bugfix # Bugfix
41
- af spawn 42 --protocol tick --amends 30 # TICK amendment to spec 30
42
- af spawn 42 --protocol spir --soft # Soft mode
43
- af spawn 42 --resume # Resume existing builder
44
- af spawn --task "fix the flaky test" # Ad-hoc task (no issue)
45
- af spawn 42 --protocol spir --force # Skip dirty-worktree check
46
- ```
47
-
48
- **Pre-spawn checklist:**
49
- 1. `git status` — worktree must be clean (or use `--force`)
50
- 2. Commit specs/plans first — builders branch from HEAD and can't see uncommitted files
51
- 3. `--protocol` is required for numbered spawns
52
-
53
- ## af send
54
-
55
- Sends a message to a running builder.
56
-
57
- ```
58
- af send [builder] [message]
59
- ```
60
-
61
- | Flag | Description |
62
- |------|-------------|
63
- | `--all` | Send to all builders |
64
- | `--file <path>` | Include file content |
65
- | `--interrupt` | Send Ctrl+C first |
66
- | `--raw` | Skip structured formatting |
67
- | `--no-enter` | Don't press Enter after message |
68
-
69
- ```bash
70
- af send 0042 "PR approved, please merge"
71
- af send 0585 "check the test output" --file /tmp/test-results.txt
72
- ```
73
-
74
- ## af cleanup
75
-
76
- Removes a builder's worktree and branch after work is done.
77
-
78
- ```
79
- af cleanup [options]
80
- ```
81
-
82
- | Flag | Description |
83
- |------|-------------|
84
- | `-p, --project <id>` | Builder project ID (no leading zeros: `585` not `0585`) |
85
- | `-i, --issue <number>` | Cleanup bugfix builder by issue number |
86
- | `-t, --task <id>` | Cleanup task builder (e.g., `task-bEPd`) |
87
- | `-f, --force` | Force cleanup even if branch not merged |
88
-
89
- ```bash
90
- af cleanup -p 585 # Clean up project 585
91
- af cleanup -p 585 -f # Force (unmerged branch)
92
- ```
93
-
94
- **Note:** `af cleanup` uses plain numbers (`585`), not zero-padded (`0585`). But `af send` uses zero-padded IDs (`0585`).
95
-
96
- ## af status
97
-
98
- ```bash
99
- af status # Show all builders and workspace status
100
- ```
101
-
102
- No flags needed. Shows Tower status, workspace, and all active builders.
103
-
104
- ## af tower
105
-
106
- ```bash
107
- af tower start # Start Tower on port 4100
108
- af tower stop # Stop Tower
109
- af tower log # Tail Tower logs
110
- af tower status # Check daemon and cloud connection status
111
- af tower connect # Connect to Codev Cloud
112
- af tower disconnect # Disconnect from Codev Cloud
113
- ```
114
-
115
- There is NO `af tower restart` — use `af tower stop && af tower start`.
116
-
117
- ## af workspace
118
-
119
- ```bash
120
- af workspace start # Start workspace for current project
121
- af workspace stop # Stop workspace processes
122
- ```
123
-
124
- `af dash` is a deprecated alias — use `af workspace` instead.
125
-
126
- ## af cron
127
-
128
- ```bash
129
- af cron list # List all cron tasks
130
- af cron status <name> # Check task status
131
- af cron run <name> # Run immediately
132
- af cron enable <name> # Enable
133
- af cron disable <name> # Disable
134
- ```
135
-
136
- There is NO `af cron add` — create YAML files in `.af-cron/` directly.
137
-
138
- ## Other commands
139
-
140
- ```bash
141
- af open <file> # Open file in annotation viewer (NOT system open)
142
- af shell # Spawn utility shell
143
- af attach # Attach to running builder terminal
144
- af rename <name> # Rename current shell session
145
- af architect # Start architect session in current terminal
146
- ```
@@ -1,61 +0,0 @@
1
- # Understand Phase Prompt (TICK)
2
-
3
- You are working in a TICK protocol - fast autonomous implementation for amendments.
4
-
5
- ## Your Mission
6
-
7
- Understand the existing spec and what amendment is being requested. TICK is for small changes to existing, integrated features.
8
-
9
- ## Input Context
10
-
11
- Read these files:
12
- 1. `codev/specs/{project-id}-*.md` - The existing spec (being amended)
13
- 2. `codev/plans/{project-id}-*.md` - The existing plan
14
- 3. `codev/status/{project-id}-*.md` - Current state and amendment description
15
-
16
- ## Workflow
17
-
18
- ### 1. Identify the Amendment
19
-
20
- From the status file, understand:
21
- - What change is being requested?
22
- - What's the scope? (Should be < 300 LOC)
23
- - What existing code will be affected?
24
-
25
- ### 2. Verify TICK is Appropriate
26
-
27
- TICK is appropriate when:
28
- - [ ] Feature already has an integrated spec
29
- - [ ] Change is small (< 300 LOC)
30
- - [ ] Requirements are clear
31
- - [ ] No architectural changes needed
32
-
33
- If NOT appropriate, signal: `<signal>NEEDS_SPIR</signal>`
34
-
35
- ### 3. Document Understanding
36
-
37
- Update status file with:
38
- ```markdown
39
- ## Amendment Understanding
40
-
41
- **Existing Spec**: {spec-id}
42
- **Amendment Request**: {description}
43
- **Scope**: {estimated LOC}
44
- **Files to Change**:
45
- - file1.ts
46
- - file2.ts
47
-
48
- **Approach**: {brief description of how to implement}
49
- ```
50
-
51
- ### 4. Signal Completion
52
-
53
- When understanding is complete:
54
- 1. Update status file
55
- 2. Output: `<signal>UNDERSTOOD</signal>`
56
-
57
- ## Constraints
58
-
59
- - DO NOT start implementing
60
- - DO NOT create new spec files (amend existing)
61
- - Keep scope small - if > 300 LOC, recommend SPIR instead
@@ -1,58 +0,0 @@
1
- # Verify Phase Prompt (TICK)
2
-
3
- You are in the Verify phase of TICK protocol.
4
-
5
- ## Your Mission
6
-
7
- Verify that the amendment implementation is complete and correct. Run tests and build to ensure nothing is broken.
8
-
9
- ## Input Context
10
-
11
- Read these files:
12
- 1. `codev/specs/{project-id}-*.md` - Spec with amendment
13
- 2. `codev/status/{project-id}-*.md` - Implementation notes
14
-
15
- ## Workflow
16
-
17
- ### 1. Run Build
18
-
19
- ```bash
20
- npm run build
21
- ```
22
-
23
- If build fails:
24
- - Output: `<signal>VERIFICATION_FAILED</signal>`
25
- - Include error details in output
26
-
27
- ### 2. Run Tests
28
-
29
- ```bash
30
- npm test
31
- ```
32
-
33
- If tests fail:
34
- - Output: `<signal>VERIFICATION_FAILED</signal>`
35
- - Include which tests failed
36
-
37
- ### 3. Quick Manual Check
38
-
39
- Verify:
40
- - [ ] Amendment matches the request
41
- - [ ] No unintended side effects
42
- - [ ] Code follows project conventions
43
-
44
- ### 4. Signal Completion
45
-
46
- When all checks pass:
47
- 1. Update status file with verification results
48
- 2. Output: `<signal>VERIFIED</signal>`
49
-
50
- ## Backpressure
51
-
52
- Both build AND tests must pass before VERIFIED can be signaled. This is non-negotiable.
53
-
54
- ## Constraints
55
-
56
- - DO NOT add new features
57
- - DO NOT refactor unrelated code
58
- - Keep verification focused on the amendment
@@ -1,111 +0,0 @@
1
- # AUDIT Phase Prompt
2
-
3
- You are executing the **AUDIT** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Analyze the codebase to identify dead code, unused dependencies, and stale documentation.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Determine Base Commit
16
-
17
- Find the last maintenance run:
18
- ```bash
19
- ls codev/maintain/
20
- ```
21
-
22
- If previous runs exist, note the base commit to focus on changes since then.
23
-
24
- ### 2. Scan for Dead Code
25
-
26
- Run static analysis tools:
27
-
28
- ```bash
29
- # TypeScript/JavaScript
30
- npx ts-prune 2>/dev/null || echo "ts-prune not available"
31
- npx depcheck 2>/dev/null || echo "depcheck not available"
32
-
33
- # Check for unused exports
34
- grep -r "export " --include="*.ts" --include="*.tsx" | head -50
35
- ```
36
-
37
- ### 3. Scan for Unused Dependencies
38
-
39
- Check package.json for unused dependencies:
40
- ```bash
41
- cat package.json | grep -A100 '"dependencies"' | head -50
42
- ```
43
-
44
- Cross-reference with actual imports in the codebase.
45
-
46
- ### 4. Scan for Stale Documentation
47
-
48
- Check for references to deleted files/functions:
49
- ```bash
50
- # Recent changes
51
- git log --oneline -20
52
-
53
- # Check if arch.md references exist
54
- grep -E "src/|packages/" codev/resources/arch.md | head -20
55
- ```
56
-
57
- ### 5. Create Audit Report
58
-
59
- Create a maintenance run file: `codev/maintain/NNN.md`
60
-
61
- Document:
62
- - Dead code identified (with file paths)
63
- - Unused dependencies
64
- - Stale documentation references
65
- - Recommended actions
66
-
67
- Use the template structure:
68
- ```markdown
69
- # Maintenance Run NNN
70
-
71
- **Date**: YYYY-MM-DD
72
- **Base Commit**: <commit-hash>
73
-
74
- ## Dead Code Identified
75
-
76
- | File | Item | Reason |
77
- |------|------|--------|
78
- | path/to/file.ts | unusedFunction() | Not imported anywhere |
79
-
80
- ## Unused Dependencies
81
-
82
- | Package | Reason |
83
- |---------|--------|
84
- | some-pkg | Not imported |
85
-
86
- ## Stale Documentation
87
-
88
- | Document | Issue |
89
- |----------|-------|
90
- | arch.md | References deleted module |
91
-
92
- ## Recommended Actions
93
-
94
- 1. Remove X
95
- 2. Update Y
96
- 3. ...
97
- ```
98
-
99
- ## Signals
100
-
101
- When audit report is complete:
102
-
103
- ```
104
- <signal>PHASE_COMPLETE</signal>
105
- ```
106
-
107
- If blocked:
108
-
109
- ```
110
- <signal>BLOCKED:reason</signal>
111
- ```
@@ -1,91 +0,0 @@
1
- # CLEAN Phase Prompt
2
-
3
- You are executing the **CLEAN** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Remove the dead code and unused dependencies identified in the audit phase.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Prerequisites
14
-
15
- Read the audit report from the previous phase:
16
- ```bash
17
- ls -la codev/maintain/
18
- cat codev/maintain/*.md | tail -100
19
- ```
20
-
21
- ## Process
22
-
23
- ### 1. Remove Dead Code
24
-
25
- For each item identified in the audit:
26
-
27
- 1. Verify it's truly unused (double-check with grep)
28
- 2. Use `git rm` for tracked files
29
- 3. For untracked files, move to `.trash/` before deleting
30
-
31
- **CRITICAL**: Use soft deletion first:
32
- ```bash
33
- mkdir -p codev/maintain/.trash/$(date +%Y-%m-%d)
34
- mv path/to/file codev/maintain/.trash/$(date +%Y-%m-%d)/
35
- ```
36
-
37
- ### 2. Remove Unused Dependencies
38
-
39
- ```bash
40
- # Remove from package.json
41
- npm uninstall <package-name>
42
- ```
43
-
44
- ### 3. Verify Build After Each Removal
45
-
46
- After each significant removal:
47
- ```bash
48
- npm run build
49
- npm test -- --exclude='**/e2e/**'
50
- ```
51
-
52
- If build fails, revert the change and investigate.
53
-
54
- ### 4. Commit Changes
55
-
56
- Make atomic commits for each logical change:
57
- ```bash
58
- git add <specific-files>
59
- git commit -m "[Maintain] Remove unused X"
60
- ```
61
-
62
- **NEVER use `git add -A` or `git add .`**
63
-
64
- ## Important Rules
65
-
66
- 1. **One removal at a time** - Don't batch unrelated changes
67
- 2. **Verify after each removal** - Build must pass
68
- 3. **Document what was removed** - Update the maintenance run file
69
- 4. **Soft delete first** - Move to .trash/ before permanent deletion
70
- 5. **Check for side effects** - Grep for references before removing
71
-
72
- ## Output
73
-
74
- Update the maintenance run file with:
75
- - What was removed
76
- - Build/test status after removal
77
- - Any issues encountered
78
-
79
- ## Signals
80
-
81
- When all dead code is removed and build passes:
82
-
83
- ```
84
- <signal>PHASE_COMPLETE</signal>
85
- ```
86
-
87
- If blocked:
88
-
89
- ```
90
- <signal>BLOCKED:reason</signal>
91
- ```
@@ -1,113 +0,0 @@
1
- # SYNC Phase Prompt
2
-
3
- You are executing the **SYNC** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Update documentation to match the current state of the codebase.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Update arch.md
16
-
17
- Read the current architecture doc and compare with actual codebase:
18
-
19
- ```bash
20
- cat codev/resources/arch.md
21
- ls -la packages/ src/ 2>/dev/null
22
- ```
23
-
24
- Update:
25
- - Directory structure (if changed)
26
- - Component descriptions
27
- - Key files and their purposes
28
- - Remove references to deleted code
29
- - Add new utilities/components
30
-
31
- **arch.md must explain HOW things work, not just WHAT they are.**
32
-
33
- ### 2. Generate/Update lessons-learned.md
34
-
35
- Scan review documents for lessons:
36
-
37
- ```bash
38
- ls codev/reviews/
39
- ```
40
-
41
- Extract actionable lessons:
42
- - Testing practices
43
- - Architecture decisions
44
- - Process improvements
45
- - Patterns to follow/avoid
46
-
47
- Format:
48
- ```markdown
49
- ## [Topic]
50
- - [From NNN] Lesson description
51
- ```
52
-
53
- ### 3. Sync CLAUDE.md with AGENTS.md
54
-
55
- Compare the two files:
56
- ```bash
57
- diff CLAUDE.md AGENTS.md | head -50
58
- ```
59
-
60
- They must be identical. Update the stale one to match.
61
-
62
- ### 4. Prune Documentation
63
-
64
- Check document sizes:
65
- ```bash
66
- wc -l CLAUDE.md AGENTS.md README.md
67
- ```
68
-
69
- Target ~400 lines for CLAUDE.md/README.md (guideline, not mandate).
70
-
71
- For any content removed, document:
72
- - WHAT was removed
73
- - WHY it was removed (OBSOLETE, DUPLICATIVE, MOVED, VERBOSE)
74
- - WHERE it moved (if applicable)
75
-
76
- ### 5. Commit Documentation Changes
77
-
78
- ```bash
79
- git add codev/resources/arch.md codev/resources/lessons-learned.md
80
- git commit -m "[Maintain] Update arch.md and lessons-learned.md"
81
-
82
- git add CLAUDE.md AGENTS.md
83
- git commit -m "[Maintain] Sync CLAUDE.md with AGENTS.md"
84
- ```
85
-
86
- ## Important Rules
87
-
88
- 1. **Never invent structure** - Only document what exists
89
- 2. **Verify file paths** - Check that referenced files exist
90
- 3. **Keep it current** - Remove obsolete references
91
- 4. **Preserve important content** - Don't delete patterns/best practices
92
- 5. **Document deletions** - Every removal needs justification
93
-
94
- ## Output
95
-
96
- Update the maintenance run file with:
97
- - Documents updated
98
- - What was added/removed/changed
99
- - Any issues encountered
100
-
101
- ## Signals
102
-
103
- When documentation is synchronized:
104
-
105
- ```
106
- <signal>PHASE_COMPLETE</signal>
107
- ```
108
-
109
- If blocked:
110
-
111
- ```
112
- <signal>BLOCKED:reason</signal>
113
- ```
@@ -1,110 +0,0 @@
1
- # VERIFY Phase Prompt
2
-
3
- You are executing the **VERIFY** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Run final validation and prepare for PR creation.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Run Full Test Suite
16
-
17
- ```bash
18
- npm run build
19
- npm test
20
- ```
21
-
22
- Both must pass. If either fails, go back and fix the issue.
23
-
24
- ### 2. Run Linting
25
-
26
- ```bash
27
- npm run lint 2>/dev/null || echo "No lint script"
28
- ```
29
-
30
- Fix any linting errors.
31
-
32
- ### 3. Verify Documentation Links
33
-
34
- Check that documentation references resolve:
35
- ```bash
36
- # Check arch.md file references
37
- grep -oE 'src/[^ ]+|packages/[^ ]+' codev/resources/arch.md | while read f; do
38
- [ -e "$f" ] || echo "Missing: $f"
39
- done
40
- ```
41
-
42
- ### 4. Update Maintenance Run Summary
43
-
44
- Finalize the maintenance run file with:
45
-
46
- ```markdown
47
- ## Summary
48
-
49
- - **Dead code removed**: X files, Y functions
50
- - **Dependencies removed**: Z packages
51
- - **Documentation updated**: arch.md, lessons-learned.md
52
- - **All tests passing**: Yes/No
53
- - **Build status**: Success/Failure
54
-
55
- ## Next Maintenance
56
-
57
- Recommended focus areas for next run:
58
- - ...
59
- ```
60
-
61
- ### 5. Create PR
62
-
63
- ```bash
64
- git push origin HEAD
65
-
66
- gh pr create --title "[Maintain] Codebase maintenance run NNN" --body "$(cat <<'EOF'
67
- ## Summary
68
-
69
- - Dead code removal
70
- - Documentation sync
71
- - Dependency cleanup
72
-
73
- ## Changes
74
-
75
- [List key changes]
76
-
77
- ## Verification
78
-
79
- - [x] Build passes
80
- - [x] Tests pass
81
- - [x] Documentation updated
82
- EOF
83
- )"
84
- ```
85
-
86
- ## Validation Checklist
87
-
88
- Before signaling complete:
89
-
90
- - [ ] All tests pass
91
- - [ ] Build succeeds
92
- - [ ] No import/module errors
93
- - [ ] Documentation links resolve
94
- - [ ] Linter passes (if configured)
95
- - [ ] Maintenance run file is complete
96
- - [ ] PR is created
97
-
98
- ## Signals
99
-
100
- When validation passes and PR is ready:
101
-
102
- ```
103
- <signal>PHASE_COMPLETE</signal>
104
- ```
105
-
106
- If blocked:
107
-
108
- ```
109
- <signal>BLOCKED:reason</signal>
110
- ```