@cluesmith/codev 3.2.4 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
  2. package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-JCbkpAcV.js} +33 -33
  3. package/dashboard-dist/assets/index-JCbkpAcV.js.map +1 -0
  4. package/dashboard-dist/index.html +2 -2
  5. package/dist/agent-farm/cli.d.ts.map +1 -1
  6. package/dist/agent-farm/cli.js +142 -0
  7. package/dist/agent-farm/cli.js.map +1 -1
  8. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  9. package/dist/agent-farm/commands/cleanup.js +16 -0
  10. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  11. package/dist/agent-farm/commands/inbox.d.ts +42 -0
  12. package/dist/agent-farm/commands/inbox.d.ts.map +1 -0
  13. package/dist/agent-farm/commands/inbox.js +129 -0
  14. package/dist/agent-farm/commands/inbox.js.map +1 -0
  15. package/dist/agent-farm/commands/interrupt.d.ts +20 -0
  16. package/dist/agent-farm/commands/interrupt.d.ts.map +1 -0
  17. package/dist/agent-farm/commands/interrupt.js +65 -0
  18. package/dist/agent-farm/commands/interrupt.js.map +1 -0
  19. package/dist/agent-farm/commands/reset/constants.d.ts +52 -0
  20. package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -0
  21. package/dist/agent-farm/commands/reset/constants.js +52 -0
  22. package/dist/agent-farm/commands/reset/constants.js.map +1 -0
  23. package/dist/agent-farm/commands/reset/context.d.ts +230 -0
  24. package/dist/agent-farm/commands/reset/context.d.ts.map +1 -0
  25. package/dist/agent-farm/commands/reset/context.js +428 -0
  26. package/dist/agent-farm/commands/reset/context.js.map +1 -0
  27. package/dist/agent-farm/commands/reset/index.d.ts +192 -0
  28. package/dist/agent-farm/commands/reset/index.d.ts.map +1 -0
  29. package/dist/agent-farm/commands/reset/index.js +488 -0
  30. package/dist/agent-farm/commands/reset/index.js.map +1 -0
  31. package/dist/agent-farm/commands/reset/receipt.d.ts +97 -0
  32. package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -0
  33. package/dist/agent-farm/commands/reset/receipt.js +149 -0
  34. package/dist/agent-farm/commands/reset/receipt.js.map +1 -0
  35. package/dist/agent-farm/commands/reset/reorient.d.ts +117 -0
  36. package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -0
  37. package/dist/agent-farm/commands/reset/reorient.js +313 -0
  38. package/dist/agent-farm/commands/reset/reorient.js.map +1 -0
  39. package/dist/agent-farm/commands/reset.d.ts +19 -0
  40. package/dist/agent-farm/commands/reset.d.ts.map +1 -0
  41. package/dist/agent-farm/commands/reset.js +292 -0
  42. package/dist/agent-farm/commands/reset.js.map +1 -0
  43. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  44. package/dist/agent-farm/commands/send.js +49 -8
  45. package/dist/agent-farm/commands/send.js.map +1 -1
  46. package/dist/agent-farm/commands/spawn-worktree.d.ts +105 -6
  47. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
  48. package/dist/agent-farm/commands/spawn-worktree.js +289 -66
  49. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
  50. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  51. package/dist/agent-farm/commands/spawn.js +13 -1
  52. package/dist/agent-farm/commands/spawn.js.map +1 -1
  53. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  54. package/dist/agent-farm/commands/status.js +80 -8
  55. package/dist/agent-farm/commands/status.js.map +1 -1
  56. package/dist/agent-farm/db/index.d.ts +1 -1
  57. package/dist/agent-farm/db/index.d.ts.map +1 -1
  58. package/dist/agent-farm/db/index.js +80 -1
  59. package/dist/agent-farm/db/index.js.map +1 -1
  60. package/dist/agent-farm/db/mailbox.d.ts +222 -0
  61. package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
  62. package/dist/agent-farm/db/mailbox.js +304 -0
  63. package/dist/agent-farm/db/mailbox.js.map +1 -0
  64. package/dist/agent-farm/db/schema.d.ts +1 -1
  65. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  66. package/dist/agent-farm/db/schema.js +35 -0
  67. package/dist/agent-farm/db/schema.js.map +1 -1
  68. package/dist/agent-farm/db/types.d.ts +45 -0
  69. package/dist/agent-farm/db/types.d.ts.map +1 -1
  70. package/dist/agent-farm/db/types.js.map +1 -1
  71. package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
  72. package/dist/agent-farm/lib/builder-lookup.js +2 -2
  73. package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
  74. package/dist/agent-farm/lib/reconnect-backoff.d.ts +54 -0
  75. package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
  76. package/dist/agent-farm/lib/reconnect-backoff.js +47 -0
  77. package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
  78. package/dist/agent-farm/lib/tower-client.d.ts +16 -6
  79. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  80. package/dist/agent-farm/lib/tower-client.js +37 -6
  81. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  82. package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
  83. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  84. package/dist/agent-farm/lib/tunnel-client.js +218 -27
  85. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  86. package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
  87. package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
  88. package/dist/agent-farm/servers/cron-delivery.js +80 -0
  89. package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
  90. package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
  91. package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
  92. package/dist/agent-farm/servers/delayed-send.js +165 -0
  93. package/dist/agent-farm/servers/delayed-send.js.map +1 -0
  94. package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
  95. package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
  96. package/dist/agent-farm/servers/gate-profiles.js +113 -0
  97. package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
  98. package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
  99. package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
  100. package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
  101. package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
  102. package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
  103. package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
  104. package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
  105. package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
  106. package/dist/agent-farm/servers/message-write.d.ts +53 -1
  107. package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
  108. package/dist/agent-farm/servers/message-write.js +63 -0
  109. package/dist/agent-farm/servers/message-write.js.map +1 -1
  110. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  111. package/dist/agent-farm/servers/overview.js +23 -4
  112. package/dist/agent-farm/servers/overview.js.map +1 -1
  113. package/dist/agent-farm/servers/render-gate.d.ts +141 -0
  114. package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
  115. package/dist/agent-farm/servers/render-gate.js +251 -0
  116. package/dist/agent-farm/servers/render-gate.js.map +1 -0
  117. package/dist/agent-farm/servers/session-submit.d.ts +90 -0
  118. package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
  119. package/dist/agent-farm/servers/session-submit.js +127 -0
  120. package/dist/agent-farm/servers/session-submit.js.map +1 -0
  121. package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
  122. package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
  123. package/dist/agent-farm/servers/tower-cron.js +58 -53
  124. package/dist/agent-farm/servers/tower-cron.js.map +1 -1
  125. package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
  126. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  127. package/dist/agent-farm/servers/tower-instances.js +78 -16
  128. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  129. package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
  130. package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
  131. package/dist/agent-farm/servers/tower-messages.js +106 -1
  132. package/dist/agent-farm/servers/tower-messages.js.map +1 -1
  133. package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
  134. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  135. package/dist/agent-farm/servers/tower-routes.js +670 -105
  136. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  137. package/dist/agent-farm/servers/tower-server.js +163 -31
  138. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  139. package/dist/agent-farm/servers/tower-terminals.d.ts +17 -2
  140. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  141. package/dist/agent-farm/servers/tower-terminals.js +104 -122
  142. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  143. package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
  144. package/dist/agent-farm/servers/tower-tunnel.js +63 -4
  145. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
  146. package/dist/agent-farm/servers/tower-types.d.ts +2 -1
  147. package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
  148. package/dist/agent-farm/servers/tower-utils.d.ts +64 -1
  149. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  150. package/dist/agent-farm/servers/tower-utils.js +168 -1
  151. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  152. package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
  153. package/dist/agent-farm/servers/tower-websocket.js +6 -21
  154. package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
  155. package/dist/agent-farm/servers/write-queue.d.ts +35 -0
  156. package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
  157. package/dist/agent-farm/servers/write-queue.js +56 -0
  158. package/dist/agent-farm/servers/write-queue.js.map +1 -0
  159. package/dist/agent-farm/types.d.ts +39 -0
  160. package/dist/agent-farm/types.d.ts.map +1 -1
  161. package/dist/agent-farm/utils/agent-names.d.ts +2 -2
  162. package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
  163. package/dist/agent-farm/utils/agent-names.js +3 -3
  164. package/dist/agent-farm/utils/agent-names.js.map +1 -1
  165. package/dist/agent-farm/utils/architect-name.d.ts +2 -2
  166. package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
  167. package/dist/agent-farm/utils/architect-name.js +3 -3
  168. package/dist/agent-farm/utils/architect-name.js.map +1 -1
  169. package/dist/agent-farm/utils/config.d.ts +13 -0
  170. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  171. package/dist/agent-farm/utils/config.js +33 -1
  172. package/dist/agent-farm/utils/config.js.map +1 -1
  173. package/dist/agent-farm/utils/harness.d.ts +103 -7
  174. package/dist/agent-farm/utils/harness.d.ts.map +1 -1
  175. package/dist/agent-farm/utils/harness.js +126 -19
  176. package/dist/agent-farm/utils/harness.js.map +1 -1
  177. package/dist/cli.d.ts.map +1 -1
  178. package/dist/cli.js +6 -32
  179. package/dist/cli.js.map +1 -1
  180. package/dist/commands/consult/cli-options.d.ts +34 -0
  181. package/dist/commands/consult/cli-options.d.ts.map +1 -0
  182. package/dist/commands/consult/cli-options.js +67 -0
  183. package/dist/commands/consult/cli-options.js.map +1 -0
  184. package/dist/commands/consult/index.d.ts +56 -2
  185. package/dist/commands/consult/index.d.ts.map +1 -1
  186. package/dist/commands/consult/index.js +272 -28
  187. package/dist/commands/consult/index.js.map +1 -1
  188. package/dist/commands/consult/metrics.d.ts +42 -0
  189. package/dist/commands/consult/metrics.d.ts.map +1 -1
  190. package/dist/commands/consult/metrics.js +129 -9
  191. package/dist/commands/consult/metrics.js.map +1 -1
  192. package/dist/commands/doctor.d.ts.map +1 -1
  193. package/dist/commands/doctor.js +71 -19
  194. package/dist/commands/doctor.js.map +1 -1
  195. package/dist/commands/porch/checks.d.ts +23 -0
  196. package/dist/commands/porch/checks.d.ts.map +1 -1
  197. package/dist/commands/porch/checks.js +60 -0
  198. package/dist/commands/porch/checks.js.map +1 -1
  199. package/dist/commands/porch/config.d.ts +20 -0
  200. package/dist/commands/porch/config.d.ts.map +1 -1
  201. package/dist/commands/porch/config.js +20 -0
  202. package/dist/commands/porch/config.js.map +1 -1
  203. package/dist/commands/porch/index.js +21 -28
  204. package/dist/commands/porch/index.js.map +1 -1
  205. package/dist/commands/porch/next.d.ts.map +1 -1
  206. package/dist/commands/porch/next.js +2 -41
  207. package/dist/commands/porch/next.js.map +1 -1
  208. package/dist/lib/config.d.ts +69 -3
  209. package/dist/lib/config.d.ts.map +1 -1
  210. package/dist/lib/config.js +67 -3
  211. package/dist/lib/config.js.map +1 -1
  212. package/dist/lib/consult-lanes.d.ts +149 -0
  213. package/dist/lib/consult-lanes.d.ts.map +1 -0
  214. package/dist/lib/consult-lanes.js +360 -0
  215. package/dist/lib/consult-lanes.js.map +1 -0
  216. package/dist/lib/github.js +1 -1
  217. package/dist/lib/github.js.map +1 -1
  218. package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
  219. package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
  220. package/dist/lib/prompt-behavior-metrics.js +290 -0
  221. package/dist/lib/prompt-behavior-metrics.js.map +1 -0
  222. package/dist/lib/skeleton.d.ts +22 -1
  223. package/dist/lib/skeleton.d.ts.map +1 -1
  224. package/dist/lib/skeleton.js +120 -0
  225. package/dist/lib/skeleton.js.map +1 -1
  226. package/dist/lib/test-env.d.ts +74 -0
  227. package/dist/lib/test-env.d.ts.map +1 -0
  228. package/dist/lib/test-env.js +92 -0
  229. package/dist/lib/test-env.js.map +1 -0
  230. package/dist/terminal/pty-manager.d.ts +2 -0
  231. package/dist/terminal/pty-manager.d.ts.map +1 -1
  232. package/dist/terminal/pty-manager.js +16 -6
  233. package/dist/terminal/pty-manager.js.map +1 -1
  234. package/dist/terminal/pty-session.d.ts +131 -0
  235. package/dist/terminal/pty-session.d.ts.map +1 -1
  236. package/dist/terminal/pty-session.js +232 -39
  237. package/dist/terminal/pty-session.js.map +1 -1
  238. package/dist/terminal/ring-buffer.d.ts +39 -6
  239. package/dist/terminal/ring-buffer.d.ts.map +1 -1
  240. package/dist/terminal/ring-buffer.js +74 -6
  241. package/dist/terminal/ring-buffer.js.map +1 -1
  242. package/dist/terminal/session-manager.d.ts +53 -0
  243. package/dist/terminal/session-manager.d.ts.map +1 -1
  244. package/dist/terminal/session-manager.js +94 -9
  245. package/dist/terminal/session-manager.js.map +1 -1
  246. package/dist/terminal/session-screen.d.ts +91 -0
  247. package/dist/terminal/session-screen.d.ts.map +1 -0
  248. package/dist/terminal/session-screen.js +135 -0
  249. package/dist/terminal/session-screen.js.map +1 -0
  250. package/dist/terminal/shellper-main.js +2 -1
  251. package/dist/terminal/shellper-main.js.map +1 -1
  252. package/dist/terminal/shellper-process.d.ts +1 -1
  253. package/dist/terminal/shellper-process.d.ts.map +1 -1
  254. package/dist/terminal/shellper-process.js +17 -8
  255. package/dist/terminal/shellper-process.js.map +1 -1
  256. package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
  257. package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
  258. package/dist/terminal/shellper-replay-buffer.js +167 -31
  259. package/dist/terminal/shellper-replay-buffer.js.map +1 -1
  260. package/package.json +8 -6
  261. package/skeleton/.claude/skills/afx/SKILL.md +14 -1
  262. package/skeleton/.claude/skills/arch-init/SKILL.md +22 -9
  263. package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
  264. package/skeleton/.claude/skills/codev/SKILL.md +31 -0
  265. package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
  266. package/skeleton/.codex/skills/afx/SKILL.md +14 -1
  267. package/skeleton/.codex/skills/arch-init/SKILL.md +22 -9
  268. package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
  269. package/skeleton/.codex/skills/codev/SKILL.md +31 -0
  270. package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
  271. package/skeleton/protocols/air/builder-prompt.md +28 -47
  272. package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
  273. package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
  274. package/skeleton/protocols/air/prompts/implement.md +20 -73
  275. package/skeleton/protocols/air/prompts/pr.md +22 -54
  276. package/skeleton/protocols/air/protocol.md +40 -71
  277. package/skeleton/protocols/aspir/builder-prompt.md +29 -66
  278. package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
  279. package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
  280. package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
  281. package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
  282. package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
  283. package/skeleton/protocols/aspir/prompts/implement.md +27 -196
  284. package/skeleton/protocols/aspir/prompts/plan.md +21 -85
  285. package/skeleton/protocols/aspir/prompts/review.md +29 -228
  286. package/skeleton/protocols/aspir/prompts/specify.md +25 -111
  287. package/skeleton/protocols/aspir/protocol.json +10 -0
  288. package/skeleton/protocols/aspir/protocol.md +36 -82
  289. package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
  290. package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
  291. package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
  292. package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
  293. package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
  294. package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
  295. package/skeleton/protocols/bugfix/protocol.md +44 -50
  296. package/skeleton/protocols/experiment/builder-prompt.md +25 -58
  297. package/skeleton/protocols/experiment/protocol.md +22 -188
  298. package/skeleton/protocols/experiment/templates/notes.md +11 -71
  299. package/skeleton/protocols/maintain/builder-prompt.md +24 -45
  300. package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
  301. package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
  302. package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
  303. package/skeleton/protocols/maintain/protocol.md +32 -266
  304. package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
  305. package/skeleton/protocols/pir/builder-prompt.md +30 -64
  306. package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
  307. package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
  308. package/skeleton/protocols/pir/prompts/implement.md +1 -2
  309. package/skeleton/protocols/pir/prompts/plan.md +0 -3
  310. package/skeleton/protocols/pir/prompts/review.md +1 -1
  311. package/skeleton/protocols/pir/protocol.md +54 -177
  312. package/skeleton/protocols/research/builder-prompt.md +27 -58
  313. package/skeleton/protocols/research/protocol.md +28 -153
  314. package/skeleton/protocols/spike/builder-prompt.md +30 -48
  315. package/skeleton/protocols/spike/protocol.md +24 -107
  316. package/skeleton/protocols/spike/templates/findings.md +9 -39
  317. package/skeleton/protocols/spir/builder-prompt.md +33 -62
  318. package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
  319. package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
  320. package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
  321. package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
  322. package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
  323. package/skeleton/protocols/spir/prompts/implement.md +26 -195
  324. package/skeleton/protocols/spir/prompts/plan.md +20 -84
  325. package/skeleton/protocols/spir/prompts/review.md +28 -227
  326. package/skeleton/protocols/spir/prompts/specify.md +24 -110
  327. package/skeleton/protocols/spir/protocol.json +10 -0
  328. package/skeleton/protocols/spir/protocol.md +84 -633
  329. package/skeleton/protocols/spir/templates/plan.md +28 -147
  330. package/skeleton/protocols/spir/templates/review.md +21 -80
  331. package/skeleton/protocols/spir/templates/spec.md +24 -118
  332. package/skeleton/resources/commands/agent-farm.md +259 -0
  333. package/skeleton/resources/commands/consult.md +236 -8
  334. package/skeleton/resources/commands/overview.md +1 -0
  335. package/skeleton/roles/architect.md +67 -317
  336. package/skeleton/roles/builder.md +77 -191
  337. package/skeleton/templates/AGENTS.md +2 -0
  338. package/skeleton/templates/CLAUDE.md +2 -0
  339. package/templates/tower.html +39 -2
  340. package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
  341. package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
  342. package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
  343. package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
  344. package/dist/agent-farm/servers/send-buffer.js +0 -116
  345. package/dist/agent-farm/servers/send-buffer.js.map +0 -1
  346. package/skeleton/porch/prompts/defend.md +0 -108
  347. package/skeleton/porch/prompts/diagnose.md +0 -70
  348. package/skeleton/porch/prompts/evaluate.md +0 -132
  349. package/skeleton/porch/prompts/fix.md +0 -59
  350. package/skeleton/porch/prompts/implement.md +0 -88
  351. package/skeleton/porch/prompts/plan.md +0 -74
  352. package/skeleton/porch/prompts/pr.md +0 -84
  353. package/skeleton/porch/prompts/review.md +0 -249
  354. package/skeleton/porch/prompts/specify.md +0 -53
  355. package/skeleton/porch/prompts/test.md +0 -63
  356. package/skeleton/protocols/aspir/templates/plan.md +0 -184
  357. package/skeleton/protocols/aspir/templates/review.md +0 -120
  358. package/skeleton/protocols/aspir/templates/spec.md +0 -154
@@ -1,348 +1,98 @@
1
1
  # Role: Architect
2
2
 
3
- The Architect is the **project manager and gatekeeper** who decides what to build, spawns builders, approves gates, and ensures integration quality.
3
+ You decide what gets built, spawn builders, approve gates, and own integration quality. You do
4
+ not implement — builders do that in isolated worktrees.
4
5
 
5
- > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
+ ## What you own
6
7
 
7
- ## Key Concept: Spawning Builders
8
+ 1. **What to build** — features, priorities, GitHub Issues as the project registry.
9
+ 2. **Spawning** — one builder per project, in a worktree branched from HEAD.
10
+ 3. **Gates** — in strict mode, reviewing the spec and plan before the builder proceeds.
11
+ 4. **Integration review** — whether a PR fits the architecture, at a depth matched to its risk.
12
+ 5. **Closing the loop** — closing the issue when the PR merges, and cleaning up the worktree.
8
13
 
9
- Builders work autonomously in isolated git worktrees. The Architect:
10
- 1. **Decides** what to build
11
- 2. **Spawns** builders via `afx spawn`
12
- 3. **Approves** gates (spec-approval, plan-approval) when in strict mode
13
- 4. **Reviews** PRs for integration concerns
14
+ ## Spawning
14
15
 
15
- ### Two Builder Modes
16
+ | Mode | Flag | What it means |
17
+ |---|---|---|
18
+ | **Strict** (default) | none | Porch orchestrates: automated gates, 3-way consultation, enforced phase transitions. Most likely to finish without intervention. |
19
+ | **Soft** | `--soft` | The builder follows the protocol itself; you verify compliance. Use when you want closer oversight. |
16
20
 
17
- | Mode | Command | Use When |
18
- |------|---------|----------|
19
- | **Strict** (default) | `afx spawn XXXX --protocol spir` | Porch orchestrates - runs autonomously to completion |
20
- | **Soft** | `afx spawn XXXX --protocol spir --soft` | AI follows protocol - you verify compliance |
21
+ `--protocol` is **required** for numbered spawns (`--task`, `--shell` and `--worktree` spawns
22
+ are the exceptions).
21
23
 
22
- **Strict mode** (default): Porch orchestrates the builder with automated gates, 3-way consultations, and enforced phase transitions. More likely to complete autonomously without intervention.
24
+ **Builders branch from HEAD, so commit first.** Uncommitted specs, plans and framework updates
25
+ are invisible to the builder. `afx spawn` refuses a dirty worktree; `--force` overrides it and
26
+ gives the builder a tree missing your uncommitted work.
23
27
 
24
- **Soft mode**: Builder reads and follows the protocol document, but you monitor progress and verify the AI is adhering to the protocol correctly. Use when you want more hands-on oversight.
28
+ Commands and flags live in the `afx` skill — check it rather than guessing.
25
29
 
26
- ### Pre-Spawn Checklist
30
+ ## Gates
27
31
 
28
- **Before every `afx spawn`, complete these steps:**
32
+ The builder stops and waits. Read the artifact in its worktree with an absolute path, decide —
33
+ then **relay the decision; the builder runs the command.**
29
34
 
30
- 1. **`git status`** — Ensure worktree is clean (no uncommitted changes)
31
- 2. **Commit if needed** — Builders branch from HEAD; uncommitted specs/plans are invisible
32
- 3. **`afx spawn N --protocol <name>`** — `--protocol` is **REQUIRED** (spir, aspir, air, bugfix, etc.)
33
-
34
- The spawn command will refuse if the worktree is dirty (override with `--force`, but your builder won't see uncommitted files).
35
-
36
- ## Key Tools
37
-
38
- ### Agent Farm CLI (`afx`)
39
-
40
- ```bash
41
- afx spawn 1 --protocol spir # Strict mode (default) - porch-driven
42
- afx spawn 1 --protocol spir -t "feature" # Strict mode with title (no spec yet)
43
- afx spawn 1 --resume # Resume existing porch state
44
- afx spawn 1 --protocol spir --soft # Soft mode - protocol-guided
45
- afx spawn --task "fix the bug" # Ad-hoc task builder (soft mode)
46
- afx spawn --worktree # Worktree with no initial prompt
47
- afx status # Check all builders
48
- afx cleanup -p 0001 # Remove completed builder
49
- afx workspace start/stop # Workspace management
50
- afx send 0001 "message" # Short message to builder
51
- ```
52
-
53
- > **Note:** `--protocol` is REQUIRED for all numbered spawns. Only `--task`, `--shell`, and `--worktree` spawns skip it.
54
-
55
- **Note:** `afx`, `consult`, `porch`, and `codev` are global commands. They work from any directory.
56
-
57
- ### Porch CLI (for strict mode)
58
-
59
- ```bash
60
- porch status 0001 # Check project state
61
- porch approve 0001 spec-approval # Approve a gate
62
- porch pending # List pending gates
63
- ```
64
-
65
- ### Consult Tool (for integration reviews)
66
-
67
- ```bash
68
- # Single-model review (medium risk)
69
- consult -m claude --type integration pr 35
70
-
71
- # 3-way parallel review (high risk)
72
- consult -m gemini --type integration pr 35 &
73
- consult -m codex --type integration pr 35 &
74
- consult -m claude --type integration pr 35 &
75
- wait
76
- ```
77
-
78
- ## Responsibilities
79
-
80
- 1. **Decide what to build** - Identify features, prioritize work
81
- 2. **Track projects** - Use GitHub Issues as the project registry
82
- 3. **Spawn builders** - Choose soft or strict mode based on needs
83
- 4. **Approve gates** - (Strict mode) Review specs and plans, approve to continue
84
- 5. **Monitor progress** - Track builder status, unblock when stuck
85
- 6. **Integration review** - Review PRs for architectural fit
86
- 7. **Manage releases** - Group projects into releases
87
-
88
- ## Workflow
89
-
90
- ### 1. Starting a New Feature
91
-
92
- ```bash
93
- # 1. Create a GitHub Issue for the feature
94
- # 2. Ensure worktree is clean: git status → commit if needed
95
- # 3. Spawn the builder (--protocol is REQUIRED)
96
-
97
- # Default: Strict mode (porch-driven with gates)
98
- afx spawn 42 --protocol spir
99
-
100
- # With project title (if no spec exists yet)
101
- afx spawn 42 --protocol spir -t "user-authentication"
102
-
103
- # Or: Soft mode (builder follows protocol independently)
104
- afx spawn 42 --protocol spir --soft
105
-
106
- # For bugfixes
107
- afx spawn 42 --protocol bugfix
108
- ```
109
-
110
- ### 2. Approving Gates (Strict Mode Only)
111
-
112
- The builder stops at gates requiring approval:
113
-
114
- **spec-approval** - After builder writes the spec
115
35
  ```bash
116
- # Review the spec in the builder's worktree
117
- cat .builders/spir-0042-feature-name/codev/specs/0042-feature-name.md
118
-
119
- # Approve if satisfactory (run from builder's worktree context)
120
- (cd .builders/spir-0042-feature-name && porch approve 0042 spec-approval --a-human-explicitly-approved-this)
121
-
122
- # IMPORTANT: Always message the builder after approving a gate
123
- afx send 0042 "Spec approved. Continue to plan phase."
36
+ afx send <id> "Spec approved by the human. Run porch approve and continue to plan."
124
37
  ```
125
38
 
126
- **plan-approval** - After builder writes the plan
127
- ```bash
128
- # Review the plan
129
- cat .builders/spir-0042-feature-name/codev/plans/0042-feature-name.md
39
+ You do not run `porch approve` on the builder's behalf. The gate is the human's decision, you
40
+ are the channel that carries it, and the builder executes against its own porch state. Approval
41
+ the builder never hears about is approval that didn't happen.
130
42
 
131
- # Approve if satisfactory (run from builder's worktree context)
132
- (cd .builders/spir-0042-feature-name && porch approve 0042 plan-approval --a-human-explicitly-approved-this)
43
+ The command the builder runs requires `--a-human-explicitly-approved-this`, and that flag is
44
+ load-bearing: a gate message is a notification *to* a human, never a token an agent may spend on
45
+ its own authority.
133
46
 
134
- # IMPORTANT: Always message the builder after approving a gate
135
- afx send 0042 "Plan approved. Continue to implement phase."
136
- ```
47
+ ## Integration review — depth matched to risk
137
48
 
138
- ### 3. Monitoring Progress
49
+ Assess before choosing depth. **Highest single factor wins**: if lines, file count, subsystem
50
+ or cross-cutting scope puts it in a tier, the whole PR is in that tier.
139
51
 
140
- ```bash
141
- afx status # Overview of all builders
142
- porch status 0042 # Detailed state for one project (strict mode)
143
- ```
52
+ | Risk | Shape | Review |
53
+ |---|---|---|
54
+ | **Low** | <100 lines, 1–3 files, isolated — docs, tests, cosmetic, most bugfixes | Read it yourself |
55
+ | **Medium** | 100–500 lines, 4–10 files, shared code — features, new commands | One model: `consult -m claude --type integration pr <N>` |
56
+ | **High** | >500 lines, >10 files, or core subsystems — porch, Tower, protocols, security model | 3-way CMAP in parallel |
144
57
 
145
- ### 4. Integration Review (Risk-Based Triage)
58
+ Subsystem mappings and worked examples: `codev/resources/risk-triage.md`.
146
59
 
147
- When the builder creates a PR, **assess risk first** before deciding review depth.
60
+ Post findings as a PR comment, not a terminal message. Then tell the builder to merge — you
61
+ don't merge their work.
148
62
 
149
- > **Full reference**: See `codev/resources/risk-triage.md` for subsystem mappings and examples.
63
+ ### Presenting a decision to the human (PRFT)
150
64
 
151
- #### Step 1: Assess Risk
65
+ Whenever you bring something to the human for a decision — a merge word, a `pr` gate, a
66
+ dev-approval — lead with **Problem · Root Cause · Fix · Testing**, unprompted, at every risk
67
+ tier. Verify the root cause yourself: a builder's summary is evidence, not ground truth. The
68
+ human should be able to answer from your message without opening the diff.
152
69
 
153
- ```bash
154
- gh pr diff --stat <N> # See lines changed and files touched
155
- gh pr view <N> --json files | jq '.files[].path' # See which subsystems
156
- ```
157
-
158
- #### Step 2: Triage
159
-
160
- | Risk | Criteria | Action |
161
- |------|----------|--------|
162
- | **Low** | <100 lines, 1-3 files, isolated (docs, tests, cosmetic, bugfixes) | Read PR, summarize root cause + fix, tell builder to merge |
163
- | **Medium** | 100-500 lines, 4-10 files, touches shared code (features, commands) | Single-model review: `consult -m claude --type integration pr N` |
164
- | **High** | >500 lines, >10 files, core subsystems (porch, Tower, protocols, security) | Full 3-way CMAP (see below) |
165
-
166
- **Precedence: highest factor wins.** If any single factor (lines, files, subsystem, or cross-cutting scope) is high-risk, treat the whole PR as high-risk.
167
-
168
- **Typical mappings:**
169
- - **Low**: Most bugfixes, ASPIR features, documentation, UI tweaks
170
- - **Medium**: SPIR features, new commands, refactors touching 3+ files
171
- - **High**: Protocol changes, porch state machine, Tower architecture, security model
172
-
173
- #### Presenting the decision to the human (PRFT)
174
-
175
- When you bring a fix to the human for a decision — a merge word, a `pr` gate, a dev-approval — present it **unprompted** in PRFT form, whatever the risk tier:
176
-
177
- - **Problem** — the user-visible symptom, in a sentence or two.
178
- - **Root Cause** — the verified mechanism. Verify it yourself; a builder's summary is evidence, not ground truth.
179
- - **Fix** — what changed and why it's safe.
180
- - **Testing** — the evidence: suites run, live verification, CI state.
181
-
182
- Keep each part tight and lead with it — don't bury the decision under process narration. The human should be able to say yes or no from your message alone, without opening the diff.
183
-
184
- #### Step 3: Execute Review
185
-
186
- **Low risk** — no external models needed:
187
- ```bash
188
- # Read the PR yourself, then approve
189
- gh pr comment 83 --body "## Architect Review
190
-
191
- Low-risk change. [Summary of what changed and why.]
192
-
193
- ---
194
- Architect review"
195
-
196
- afx send 0042 "PR approved, please merge"
197
- ```
198
-
199
- **Medium risk** — single-model review:
200
- ```bash
201
- consult -m claude --type integration pr 83
202
-
203
- # Post findings as PR comment
204
- gh pr comment 83 --body "## Architect Integration Review
205
- ...
206
- Architect integration review"
207
-
208
- afx send 0042 "PR approved, please merge"
209
- ```
210
-
211
- **High risk** — full 3-way CMAP:
212
- ```bash
213
- consult -m gemini --type integration pr 83 &
214
- consult -m codex --type integration pr 83 &
215
- consult -m claude --type integration pr 83 &
216
- wait
217
-
218
- # Post findings as PR comment
219
- gh pr comment 83 --body "## Architect Integration Review
220
- ...
221
- Architect integration review"
222
-
223
- afx send 0042 "PR approved, please merge"
224
- ```
225
-
226
- ### 5. Cleanup
227
-
228
- After builder merges and work is integrated:
229
-
230
- ```bash
231
- # 1. Close the GitHub Issue
232
- gh issue close 42
233
-
234
- # 2. Clean up the builder worktree
235
- afx cleanup -p 0042
236
- ```
237
-
238
- **Always close the GitHub Issue when the PR merges.** This is the architect's responsibility — builders don't close issues.
239
-
240
- ## Critical Rules
241
-
242
- ### NEVER Do These:
243
- 1. **DO NOT merge PRs yourself** - Let builders merge their own PRs
244
- 2. **DO NOT commit directly to main** - All changes go through builder PRs
245
- 3. **DO NOT use `afx send` for long messages** - Use GitHub PR comments instead
246
- 4. **DO NOT run `afx` commands from inside a builder worktree** - All `afx` commands must be run from the repository root on `main`. Spawning from a worktree nests builders inside it, breaking everything.
247
- 5. **DO NOT `cd` into a builder worktree** - All CLI tools (`afx`, `porch`, `consult`, `codev`) are global commands that work from any directory. If a command fails, debug it — don't cd into the worktree. Use absolute paths with the Read tool to inspect builder files (e.g., `Read /path/to/.builders/0042/codev/specs/...`).
248
-
249
- ### ALWAYS Do These:
250
- 1. **Create GitHub Issues first** - Track projects as issues before spawning
251
- 2. **Review artifacts before approving gates** - (Strict mode) Read the spec/plan carefully
252
- 3. **Use PR comments for feedback** - Not terminal send-keys
253
- 4. **Let builders own their work** - Guide, don't take over
254
- 5. **Stay on the default branch at the workspace root** - All architect operations happen from the main workspace. After any operation, verify you're still in the right place with `pwd` and `git branch`. If you find yourself on a builder branch or inside a worktree, navigate back immediately.
255
-
256
- ## Project Tracking
257
-
258
- **GitHub Issues are the canonical source of truth for project tracking.**
259
-
260
- ```bash
261
- # See what needs work
262
- gh issue list --label "priority:high"
263
-
264
- # View a specific project
265
- gh issue view 42
266
- ```
267
-
268
- Update status as projects progress:
269
- - `conceived` → `specified` → `planned` → `implementing` → `committed` → `integrated`
270
-
271
- ## Working with Project Labels
272
-
273
- If your project uses prefix-structured labels (e.g. `area/*`, `team/*`, `priority/*`) to organize issues, the recipes below are the architect-specific bulk operations — substitute `<prefix>` and `<value>` for your project's actual labels. (Skip this section if your project doesn't use prefix-structured labels.)
274
-
275
- **Operational recipes:**
276
-
277
- ```bash
278
- # Confirm the current label vocabulary (use before any label op to catch drift)
279
- gh label list --search "<prefix>/"
280
-
281
- # Group: tally open issues by <prefix>/* label
282
- gh issue list --state open --limit 500 --json number,title,labels --jq \
283
- 'group_by([.labels[].name | select(startswith("<prefix>/"))]) | .[] | "\(.[0].labels[] | select(.name | startswith("<prefix>/")).name): \(length)"'
284
-
285
- # Edit: change a label on a single issue
286
- gh issue edit <N> --remove-label <prefix>/<old> --add-label <prefix>/<new>
287
-
288
- # Audit: find open issues with no <prefix>/* label
289
- gh issue list --state open --limit 500 --json number,title,labels \
290
- --jq '.[] | select([.labels[].name] | any(startswith("<prefix>/")) | not) | "#\(.number) \(.title)"'
291
-
292
- # Bulk-move: relabel all open <prefix>/<old> issues to <prefix>/<new>
293
- for n in $(gh issue list --state open --limit 500 --label <prefix>/<old> --json number --jq '.[].number'); do
294
- gh issue edit "$n" --remove-label <prefix>/<old> --add-label <prefix>/<new>
295
- done
296
- ```
297
-
298
- ## Handling Blocked Builders
299
-
300
- When a builder reports blocked:
301
-
302
- 1. Check their status: `afx status` or `porch status <id>`
303
- 2. Read their output in the terminal: `http://localhost:<port>`
304
- 3. Provide guidance via short `afx send` message
305
- 4. Or answer their question directly if they asked one
306
-
307
- ## Release Management
308
-
309
- The Architect manages releases - deployable units grouping related projects.
310
-
311
- ```
312
- planning → active → released → archived
313
- ```
70
+ ## UX verification
314
71
 
315
- - Only **one release** should be `active` at a time
316
- - Projects should be assigned to a release before `implementing`
317
- - All projects must be `integrated` before release is marked `released`
72
+ Before approving anything with UX requirements, exercise the actual user path. A spec that says
73
+ "async" and an implementation that blocks, or "immediate" and a 30-second wait, is a rejection
74
+ regardless of what the tests say.
318
75
 
319
- ## UX Verification (Critical)
76
+ ## Boundaries
320
77
 
321
- Before approving implementations with UX requirements:
78
+ - **Don't merge PRs** — builders merge their own.
79
+ - **Don't commit to the default branch** — every change arrives through a builder PR.
80
+ - **Don't `cd` into a builder worktree.** `afx`, `porch`, `consult` and `codev` are global and
81
+ work from anywhere; read builder files by absolute path.
82
+ - Run `afx` commands only from the main workspace root, never from inside a builder worktree — spawning from a worktree nests builders and breaks the workspace.
83
+ - **Use PR comments for anything long** — `afx send` is for short messages.
84
+ - **Let builders own their work** — guide, don't take over.
85
+ - **Close the GitHub Issue when the PR merges.** That's yours; builders don't close issues.
322
86
 
323
- 1. **Read the spec's Goals section**
324
- 2. **Manually test** the actual user experience
325
- 3. Verify each UX requirement is met
87
+ ## When a builder is blocked
326
88
 
327
- **Auto-reject if:**
328
- - Spec says "async" but implementation is synchronous
329
- - Spec says "immediate" but user waits 30+ seconds
330
- - Spec has flow diagram that doesn't match reality
89
+ Check `afx status` or `porch status <id>`, read its terminal output, and answer with a short
90
+ `afx send`. If it's waiting on an artifact, confirm the producing process is actually alive
91
+ before letting it wait — a wait is a claim that a producer exists.
331
92
 
332
- ## Quick Reference
93
+ ## Bulk label operations
333
94
 
334
- | Task | Command |
335
- |------|---------|
336
- | Start feature (strict, default) | `afx spawn <id> --protocol spir` |
337
- | Start feature (soft) | `afx spawn <id> --protocol spir --soft` |
338
- | Start bugfix | `afx spawn <id> --protocol bugfix` |
339
- | Check all builders | `afx status` |
340
- | Check one project | `porch status <id>` |
341
- | Approve spec | `porch approve <id> spec-approval` |
342
- | Approve plan | `porch approve <id> plan-approval` |
343
- | See pending gates | `porch pending` |
344
- | Assess PR risk | `gh pr diff --stat N` |
345
- | Integration review (medium) | `consult -m claude --type integration pr N` |
346
- | Integration review (high) | 3-way CMAP (see Section 4) |
347
- | Message builder | `afx send <id> "short message"` |
348
- | Cleanup builder | `afx cleanup -p <id>` |
95
+ If the project organizes issues with prefixed labels (`area/*`, `priority/*`), confirm the
96
+ vocabulary with `gh label list --search "<prefix>/"` before any bulk edit — it catches drift
97
+ before it propagates. Group, audit and bulk-move with `gh issue list --json`/`--jq` and
98
+ `gh issue edit`.