@cluesmith/codev 3.2.4 → 3.3.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.
Files changed (394) hide show
  1. package/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
  2. package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-D3XaKpZW.js} +46 -44
  3. package/dashboard-dist/assets/index-D3XaKpZW.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 +154 -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 +34 -0
  40. package/dist/agent-farm/commands/reset.d.ts.map +1 -0
  41. package/dist/agent-farm/commands/reset.js +309 -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/commands/tower.d.ts.map +1 -1
  57. package/dist/agent-farm/commands/tower.js +13 -0
  58. package/dist/agent-farm/commands/tower.js.map +1 -1
  59. package/dist/agent-farm/db/index.d.ts +1 -1
  60. package/dist/agent-farm/db/index.d.ts.map +1 -1
  61. package/dist/agent-farm/db/index.js +80 -1
  62. package/dist/agent-farm/db/index.js.map +1 -1
  63. package/dist/agent-farm/db/mailbox.d.ts +222 -0
  64. package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
  65. package/dist/agent-farm/db/mailbox.js +304 -0
  66. package/dist/agent-farm/db/mailbox.js.map +1 -0
  67. package/dist/agent-farm/db/schema.d.ts +1 -1
  68. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  69. package/dist/agent-farm/db/schema.js +35 -0
  70. package/dist/agent-farm/db/schema.js.map +1 -1
  71. package/dist/agent-farm/db/types.d.ts +45 -0
  72. package/dist/agent-farm/db/types.d.ts.map +1 -1
  73. package/dist/agent-farm/db/types.js.map +1 -1
  74. package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
  75. package/dist/agent-farm/lib/builder-lookup.js +2 -2
  76. package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
  77. package/dist/agent-farm/lib/reconnect-backoff.d.ts +64 -0
  78. package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
  79. package/dist/agent-farm/lib/reconnect-backoff.js +57 -0
  80. package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
  81. package/dist/agent-farm/lib/tower-client.d.ts +16 -6
  82. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  83. package/dist/agent-farm/lib/tower-client.js +37 -6
  84. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  85. package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
  86. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  87. package/dist/agent-farm/lib/tunnel-client.js +225 -30
  88. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  89. package/dist/agent-farm/servers/canvas-relay.d.ts +60 -0
  90. package/dist/agent-farm/servers/canvas-relay.d.ts.map +1 -0
  91. package/dist/agent-farm/servers/canvas-relay.js +376 -0
  92. package/dist/agent-farm/servers/canvas-relay.js.map +1 -0
  93. package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
  94. package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
  95. package/dist/agent-farm/servers/cron-delivery.js +80 -0
  96. package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
  97. package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
  98. package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
  99. package/dist/agent-farm/servers/delayed-send.js +165 -0
  100. package/dist/agent-farm/servers/delayed-send.js.map +1 -0
  101. package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
  102. package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
  103. package/dist/agent-farm/servers/gate-profiles.js +113 -0
  104. package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
  105. package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
  106. package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
  107. package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
  108. package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
  109. package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
  110. package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
  111. package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
  112. package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
  113. package/dist/agent-farm/servers/message-write.d.ts +53 -1
  114. package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
  115. package/dist/agent-farm/servers/message-write.js +63 -0
  116. package/dist/agent-farm/servers/message-write.js.map +1 -1
  117. package/dist/agent-farm/servers/overview.d.ts +19 -0
  118. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  119. package/dist/agent-farm/servers/overview.js +100 -4
  120. package/dist/agent-farm/servers/overview.js.map +1 -1
  121. package/dist/agent-farm/servers/render-gate.d.ts +141 -0
  122. package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
  123. package/dist/agent-farm/servers/render-gate.js +251 -0
  124. package/dist/agent-farm/servers/render-gate.js.map +1 -0
  125. package/dist/agent-farm/servers/session-submit.d.ts +90 -0
  126. package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
  127. package/dist/agent-farm/servers/session-submit.js +127 -0
  128. package/dist/agent-farm/servers/session-submit.js.map +1 -0
  129. package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
  130. package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
  131. package/dist/agent-farm/servers/tower-cron.js +58 -53
  132. package/dist/agent-farm/servers/tower-cron.js.map +1 -1
  133. package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
  134. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  135. package/dist/agent-farm/servers/tower-instances.js +78 -16
  136. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  137. package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
  138. package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
  139. package/dist/agent-farm/servers/tower-messages.js +106 -1
  140. package/dist/agent-farm/servers/tower-messages.js.map +1 -1
  141. package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
  142. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  143. package/dist/agent-farm/servers/tower-routes.js +826 -145
  144. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  145. package/dist/agent-farm/servers/tower-server.js +188 -34
  146. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  147. package/dist/agent-farm/servers/tower-terminals.d.ts +23 -2
  148. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  149. package/dist/agent-farm/servers/tower-terminals.js +134 -127
  150. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  151. package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
  152. package/dist/agent-farm/servers/tower-tunnel.js +63 -4
  153. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
  154. package/dist/agent-farm/servers/tower-types.d.ts +2 -1
  155. package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
  156. package/dist/agent-farm/servers/tower-utils.d.ts +64 -1
  157. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  158. package/dist/agent-farm/servers/tower-utils.js +168 -1
  159. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  160. package/dist/agent-farm/servers/tower-websocket.d.ts +6 -1
  161. package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
  162. package/dist/agent-farm/servers/tower-websocket.js +95 -57
  163. package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
  164. package/dist/agent-farm/servers/write-queue.d.ts +35 -0
  165. package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
  166. package/dist/agent-farm/servers/write-queue.js +56 -0
  167. package/dist/agent-farm/servers/write-queue.js.map +1 -0
  168. package/dist/agent-farm/types.d.ts +39 -0
  169. package/dist/agent-farm/types.d.ts.map +1 -1
  170. package/dist/agent-farm/utils/agent-names.d.ts +2 -2
  171. package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
  172. package/dist/agent-farm/utils/agent-names.js +3 -3
  173. package/dist/agent-farm/utils/agent-names.js.map +1 -1
  174. package/dist/agent-farm/utils/architect-name.d.ts +2 -2
  175. package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
  176. package/dist/agent-farm/utils/architect-name.js +3 -3
  177. package/dist/agent-farm/utils/architect-name.js.map +1 -1
  178. package/dist/agent-farm/utils/config.d.ts +13 -0
  179. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  180. package/dist/agent-farm/utils/config.js +33 -1
  181. package/dist/agent-farm/utils/config.js.map +1 -1
  182. package/dist/agent-farm/utils/harness.d.ts +103 -7
  183. package/dist/agent-farm/utils/harness.d.ts.map +1 -1
  184. package/dist/agent-farm/utils/harness.js +126 -19
  185. package/dist/agent-farm/utils/harness.js.map +1 -1
  186. package/dist/agent-farm/utils/message-format.d.ts +8 -0
  187. package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
  188. package/dist/agent-farm/utils/message-format.js +20 -0
  189. package/dist/agent-farm/utils/message-format.js.map +1 -1
  190. package/dist/agent-farm/utils/server-utils.d.ts +80 -4
  191. package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
  192. package/dist/agent-farm/utils/server-utils.js +286 -5
  193. package/dist/agent-farm/utils/server-utils.js.map +1 -1
  194. package/dist/cli.d.ts.map +1 -1
  195. package/dist/cli.js +6 -32
  196. package/dist/cli.js.map +1 -1
  197. package/dist/commands/consult/cli-options.d.ts +34 -0
  198. package/dist/commands/consult/cli-options.d.ts.map +1 -0
  199. package/dist/commands/consult/cli-options.js +67 -0
  200. package/dist/commands/consult/cli-options.js.map +1 -0
  201. package/dist/commands/consult/index.d.ts +56 -2
  202. package/dist/commands/consult/index.d.ts.map +1 -1
  203. package/dist/commands/consult/index.js +272 -28
  204. package/dist/commands/consult/index.js.map +1 -1
  205. package/dist/commands/consult/metrics.d.ts +42 -0
  206. package/dist/commands/consult/metrics.d.ts.map +1 -1
  207. package/dist/commands/consult/metrics.js +129 -9
  208. package/dist/commands/consult/metrics.js.map +1 -1
  209. package/dist/commands/doctor.d.ts.map +1 -1
  210. package/dist/commands/doctor.js +71 -19
  211. package/dist/commands/doctor.js.map +1 -1
  212. package/dist/commands/porch/checks.d.ts +23 -0
  213. package/dist/commands/porch/checks.d.ts.map +1 -1
  214. package/dist/commands/porch/checks.js +60 -0
  215. package/dist/commands/porch/checks.js.map +1 -1
  216. package/dist/commands/porch/config.d.ts +20 -0
  217. package/dist/commands/porch/config.d.ts.map +1 -1
  218. package/dist/commands/porch/config.js +20 -0
  219. package/dist/commands/porch/config.js.map +1 -1
  220. package/dist/commands/porch/index.js +21 -28
  221. package/dist/commands/porch/index.js.map +1 -1
  222. package/dist/commands/porch/next.d.ts.map +1 -1
  223. package/dist/commands/porch/next.js +2 -41
  224. package/dist/commands/porch/next.js.map +1 -1
  225. package/dist/lib/config.d.ts +69 -3
  226. package/dist/lib/config.d.ts.map +1 -1
  227. package/dist/lib/config.js +67 -3
  228. package/dist/lib/config.js.map +1 -1
  229. package/dist/lib/consult-lanes.d.ts +149 -0
  230. package/dist/lib/consult-lanes.d.ts.map +1 -0
  231. package/dist/lib/consult-lanes.js +360 -0
  232. package/dist/lib/consult-lanes.js.map +1 -0
  233. package/dist/lib/forge-contracts.d.ts +9 -0
  234. package/dist/lib/forge-contracts.d.ts.map +1 -1
  235. package/dist/lib/forge-contracts.js.map +1 -1
  236. package/dist/lib/github.d.ts +15 -1
  237. package/dist/lib/github.d.ts.map +1 -1
  238. package/dist/lib/github.js +18 -1
  239. package/dist/lib/github.js.map +1 -1
  240. package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
  241. package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
  242. package/dist/lib/prompt-behavior-metrics.js +290 -0
  243. package/dist/lib/prompt-behavior-metrics.js.map +1 -0
  244. package/dist/lib/skeleton.d.ts +22 -1
  245. package/dist/lib/skeleton.d.ts.map +1 -1
  246. package/dist/lib/skeleton.js +120 -0
  247. package/dist/lib/skeleton.js.map +1 -1
  248. package/dist/lib/test-env.d.ts +74 -0
  249. package/dist/lib/test-env.d.ts.map +1 -0
  250. package/dist/lib/test-env.js +92 -0
  251. package/dist/lib/test-env.js.map +1 -0
  252. package/dist/terminal/attach-replay.d.ts +39 -0
  253. package/dist/terminal/attach-replay.d.ts.map +1 -0
  254. package/dist/terminal/attach-replay.js +76 -0
  255. package/dist/terminal/attach-replay.js.map +1 -0
  256. package/dist/terminal/pty-manager.d.ts +2 -0
  257. package/dist/terminal/pty-manager.d.ts.map +1 -1
  258. package/dist/terminal/pty-manager.js +51 -23
  259. package/dist/terminal/pty-manager.js.map +1 -1
  260. package/dist/terminal/pty-session.d.ts +201 -1
  261. package/dist/terminal/pty-session.d.ts.map +1 -1
  262. package/dist/terminal/pty-session.js +327 -46
  263. package/dist/terminal/pty-session.js.map +1 -1
  264. package/dist/terminal/ring-buffer.d.ts +39 -6
  265. package/dist/terminal/ring-buffer.d.ts.map +1 -1
  266. package/dist/terminal/ring-buffer.js +74 -6
  267. package/dist/terminal/ring-buffer.js.map +1 -1
  268. package/dist/terminal/session-manager.d.ts +53 -0
  269. package/dist/terminal/session-manager.d.ts.map +1 -1
  270. package/dist/terminal/session-manager.js +94 -9
  271. package/dist/terminal/session-manager.js.map +1 -1
  272. package/dist/terminal/session-screen.d.ts +116 -0
  273. package/dist/terminal/session-screen.d.ts.map +1 -0
  274. package/dist/terminal/session-screen.js +180 -0
  275. package/dist/terminal/session-screen.js.map +1 -0
  276. package/dist/terminal/shellper-main.js +2 -1
  277. package/dist/terminal/shellper-main.js.map +1 -1
  278. package/dist/terminal/shellper-process.d.ts +1 -1
  279. package/dist/terminal/shellper-process.d.ts.map +1 -1
  280. package/dist/terminal/shellper-process.js +17 -8
  281. package/dist/terminal/shellper-process.js.map +1 -1
  282. package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
  283. package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
  284. package/dist/terminal/shellper-replay-buffer.js +167 -31
  285. package/dist/terminal/shellper-replay-buffer.js.map +1 -1
  286. package/package.json +13 -8
  287. package/scripts/forge/gitea/pr-view.sh +4 -1
  288. package/scripts/forge/github/pr-view.sh +1 -1
  289. package/scripts/forge/gitlab/pr-view.sh +4 -1
  290. package/skeleton/.claude/skills/afx/SKILL.md +68 -1
  291. package/skeleton/.claude/skills/arch-init/SKILL.md +22 -9
  292. package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
  293. package/skeleton/.claude/skills/codev/SKILL.md +31 -0
  294. package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
  295. package/skeleton/.codex/skills/afx/SKILL.md +68 -1
  296. package/skeleton/.codex/skills/arch-init/SKILL.md +22 -9
  297. package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
  298. package/skeleton/.codex/skills/codev/SKILL.md +31 -0
  299. package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
  300. package/skeleton/protocols/air/builder-prompt.md +28 -47
  301. package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
  302. package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
  303. package/skeleton/protocols/air/prompts/implement.md +20 -73
  304. package/skeleton/protocols/air/prompts/pr.md +22 -54
  305. package/skeleton/protocols/air/protocol.md +40 -71
  306. package/skeleton/protocols/aspir/builder-prompt.md +29 -66
  307. package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
  308. package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
  309. package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
  310. package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
  311. package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
  312. package/skeleton/protocols/aspir/prompts/implement.md +27 -196
  313. package/skeleton/protocols/aspir/prompts/plan.md +21 -85
  314. package/skeleton/protocols/aspir/prompts/review.md +29 -228
  315. package/skeleton/protocols/aspir/prompts/specify.md +25 -111
  316. package/skeleton/protocols/aspir/protocol.json +10 -0
  317. package/skeleton/protocols/aspir/protocol.md +36 -82
  318. package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
  319. package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
  320. package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
  321. package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
  322. package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
  323. package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
  324. package/skeleton/protocols/bugfix/protocol.md +44 -50
  325. package/skeleton/protocols/experiment/builder-prompt.md +25 -58
  326. package/skeleton/protocols/experiment/protocol.md +22 -188
  327. package/skeleton/protocols/experiment/templates/notes.md +11 -71
  328. package/skeleton/protocols/maintain/builder-prompt.md +24 -45
  329. package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
  330. package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
  331. package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
  332. package/skeleton/protocols/maintain/protocol.md +32 -266
  333. package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
  334. package/skeleton/protocols/pir/builder-prompt.md +31 -64
  335. package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
  336. package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
  337. package/skeleton/protocols/pir/prompts/implement.md +2 -3
  338. package/skeleton/protocols/pir/prompts/plan.md +1 -4
  339. package/skeleton/protocols/pir/prompts/review.md +2 -2
  340. package/skeleton/protocols/pir/protocol.md +54 -177
  341. package/skeleton/protocols/research/builder-prompt.md +27 -58
  342. package/skeleton/protocols/research/protocol.md +28 -153
  343. package/skeleton/protocols/spike/builder-prompt.md +30 -48
  344. package/skeleton/protocols/spike/protocol.md +24 -107
  345. package/skeleton/protocols/spike/templates/findings.md +9 -39
  346. package/skeleton/protocols/spir/builder-prompt.md +33 -62
  347. package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
  348. package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
  349. package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
  350. package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
  351. package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
  352. package/skeleton/protocols/spir/prompts/implement.md +26 -195
  353. package/skeleton/protocols/spir/prompts/plan.md +20 -84
  354. package/skeleton/protocols/spir/prompts/review.md +28 -227
  355. package/skeleton/protocols/spir/prompts/specify.md +24 -110
  356. package/skeleton/protocols/spir/protocol.json +10 -0
  357. package/skeleton/protocols/spir/protocol.md +84 -633
  358. package/skeleton/protocols/spir/templates/plan.md +28 -147
  359. package/skeleton/protocols/spir/templates/review.md +21 -80
  360. package/skeleton/protocols/spir/templates/spec.md +24 -118
  361. package/skeleton/resources/commands/agent-farm.md +262 -0
  362. package/skeleton/resources/commands/consult.md +236 -8
  363. package/skeleton/resources/commands/overview.md +1 -0
  364. package/skeleton/roles/architect.md +67 -317
  365. package/skeleton/roles/builder.md +76 -191
  366. package/skeleton/templates/AGENTS.md +2 -0
  367. package/skeleton/templates/CLAUDE.md +2 -0
  368. package/templates/3d-viewer.html +32 -4
  369. package/templates/open.html +58 -12
  370. package/templates/tower.html +65 -9
  371. package/templates/vendor/three-3MFLoader.js +1478 -0
  372. package/templates/vendor/three-STLLoader.js +410 -0
  373. package/templates/vendor/three-TrackballControls.js +828 -0
  374. package/templates/vendor/three-fflate.module.js +2474 -0
  375. package/templates/vendor/three.module.js +53044 -0
  376. package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
  377. package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
  378. package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
  379. package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
  380. package/dist/agent-farm/servers/send-buffer.js +0 -116
  381. package/dist/agent-farm/servers/send-buffer.js.map +0 -1
  382. package/skeleton/porch/prompts/defend.md +0 -108
  383. package/skeleton/porch/prompts/diagnose.md +0 -70
  384. package/skeleton/porch/prompts/evaluate.md +0 -132
  385. package/skeleton/porch/prompts/fix.md +0 -59
  386. package/skeleton/porch/prompts/implement.md +0 -88
  387. package/skeleton/porch/prompts/plan.md +0 -74
  388. package/skeleton/porch/prompts/pr.md +0 -84
  389. package/skeleton/porch/prompts/review.md +0 -249
  390. package/skeleton/porch/prompts/specify.md +0 -53
  391. package/skeleton/porch/prompts/test.md +0 -63
  392. package/skeleton/protocols/aspir/templates/plan.md +0 -184
  393. package/skeleton/protocols/aspir/templates/review.md +0 -120
  394. package/skeleton/protocols/aspir/templates/spec.md +0 -154
@@ -57,3 +57,34 @@ codev doctor
57
57
  - `codev init` creates a new directory — use `codev adopt` for existing projects
58
58
  - Always run `codev adopt` and `codev update` from the project root
59
59
  - `codev update` only updates framework files — it never touches specs/plans/reviews
60
+
61
+ ## Local build and install (this repository)
62
+
63
+ Test changes locally before publishing. Run from the repository root:
64
+
65
+ ```bash
66
+ pnpm build # builds core first, then codev (including dashboard)
67
+ pnpm -w run local-install # packs both packages, installs globally, restarts Tower
68
+ ```
69
+
70
+ `local-install` (`scripts/local-install.sh`) packs `@cluesmith/codev-core` and
71
+ `@cluesmith/codev`, installs both in a single `npm install -g` (separate installs fail —
72
+ `codev-core` is not on the public registry), restores the executable bit on
73
+ `scripts/forge/**/*.sh` that `pnpm pack` strips, and restarts Tower last. Install runs while
74
+ Tower is up; only the final restart causes downtime. **Do not stop Tower first**, and do not use
75
+ `npm link` / `pnpm link` — it breaks global installs.
76
+
77
+ `pnpm build` also runs `copy-skeleton`, which copies `codev-skeleton/` into
78
+ `packages/codev/skeleton`. **Tests read that copy**, so after editing anything under
79
+ `codev-skeleton/` you must rebuild before the suite reflects your change.
80
+
81
+ ### Where to run things
82
+
83
+ - `pnpm install` — repository root (installs all workspace packages)
84
+ - `pnpm build` / `pnpm test` — `packages/codev/`, or `pnpm --filter @cluesmith/codev build`
85
+ - Unit tests `packages/codev/tests/unit/` · E2E `packages/codev/tests/e2e/`
86
+ - Never run npm commands from the repository root unless told to
87
+
88
+ ### Measuring code size
89
+
90
+ `tokei -e "tests/lib" -e "node_modules" -e ".git" -e ".builders" -e "dist" .`
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: runnable-worktrees
3
+ description: Make builder worktrees runnable — the `.codev/config.json` `worktree` block (symlinks, postSpawn, devCommand), the `afx dev` CLI, VSCode dev controls, and per-stack config recipes. Use when configuring a repo so reviewers can run a builder's branch, when `afx dev` fails to bind or start, when a dev process is orphaned holding a port, or when asked why worktree dev uses the same ports as main.
4
+ ---
5
+
6
+ # Runnable worktrees
7
+
8
+ When configured, each builder worktree (`.builders/<id>/`) becomes runnable: reviewers can run
9
+ whatever your dev command starts — a dev server, `cargo run`, `expo start`, a test watcher, a
10
+ build script — against the builder's branch without `cd`'ing, installing, or hunting for the
11
+ command. Opt-in via `.codev/config.json`; unconfigured repos see zero behavior change.
12
+
13
+ ## Config: the `worktree` block
14
+
15
+ ```jsonc
16
+ {
17
+ "worktree": {
18
+ "symlinks": ["..."], // globs symlinked from the workspace root into each new worktree
19
+ "postSpawn": ["..."], // shell commands run inside each new worktree after createWorktree
20
+ "devCommand": "..." // consumed by `afx dev <builder-id|main>`
21
+ }
22
+ }
23
+ ```
24
+
25
+ - **`symlinks`** — globs resolve from the workspace root and link into the worktree at the same
26
+ relative path. Root `.env` and `.codev/config.json` are *always* symlinked regardless.
27
+ **Symlinks, not copies**, so edits to main's env files reflect instantly in a running dev
28
+ session. A directory match is silently skipped (a glob cannot mask the worktree's own source)
29
+ **unless** the entry ends in a slash: `".local-user-data/"` is treated as a literal path and
30
+ links the directory whole — shared with the parent, not branch-isolated. A dangling link is
31
+ fine if the source does not exist yet.
32
+ - **`postSpawn`** — commands run sequentially with `cwd` = worktree path. A non-zero exit aborts
33
+ the spawn loudly; the half-built worktree stays for inspection.
34
+ - **`devCommand`** — the foreground command that starts your dev process. Required for
35
+ `afx dev`.
36
+
37
+ **Codev does not auto-detect your stack.** Pick a recipe below.
38
+
39
+ ## CLI
40
+
41
+ ```bash
42
+ afx dev <builder-id> # start dev in that builder's worktree
43
+ afx dev main # start dev in the MAIN workspace (Codev-managed)
44
+ afx dev --stop # stop the running dev PTY (builder or main)
45
+ afx setup <builder-id> # re-apply symlinks + postSpawn to an existing worktree (idempotent)
46
+ ```
47
+
48
+ **One dev PTY at a time**, across {main + all builders} — deliberate; see *URLs are
49
+ load-bearing*. `main` is a reserved target running `worktree.devCommand` in the main checkout as
50
+ a Codev-managed, swappable PTY, symmetric with builders. Starting a second target prompts to
51
+ swap; a same-target request prints the existing terminal URL and exits. Dev PTYs are
52
+ **non-persistent** — a Tower restart or crash kills them; re-run to restart.
53
+
54
+ **Start main's dev with `afx dev main`, not a bare `pnpm dev`.** A hand-run `pnpm dev` is
55
+ invisible to Codev (which never kills what it did not spawn), so a builder dev started while it
56
+ holds the ports either fails to bind or — worse — serves main's code under the worktree URL.
57
+ `afx dev main` makes it a managed PTY that swap-detection can stop cleanly. This only helps if
58
+ used consistently.
59
+
60
+ ## VSCode
61
+
62
+ Right-click a builder row in the Codev sidebar (Builders or Needs Attention):
63
+
64
+ - **Open Builder Terminal** — that builder's AI terminal in a tab (same as left-click).
65
+ - **Open Worktree Folder** — `.builders/<id>/` in the OS file manager.
66
+ - **Run Worktree Setup** — re-applies `worktree.symlinks` and `worktree.postSpawn` to an
67
+ existing worktree (the git steps are skipped). Idempotent. Use when the lockfile changed, when
68
+ `symlinks`/`postSpawn` grew after the builder spawned, when a link was deleted, or when the
69
+ original setup aborted. Streams install output in a fresh terminal. CLI: `afx setup <id>`.
70
+ - **View Diff** — unified `main...HEAD` diff for that worktree with a file-list pane.
71
+ - **Run Dev** / **Stop Dev** — spawn or kill the dev PTY as a `Codev: <name> (dev)` tab;
72
+ prompts to swap if another dev is running.
73
+
74
+ The sidebar's **Workspace** view carries a dev control for whatever folder the window is rooted
75
+ at — the main checkout resolves to `main`, a `.builders/<id>/` window resolves to that builder.
76
+ The row tooltip names the resolved target. Commands are also in the palette (Cmd+Shift+P); no
77
+ default keybindings.
78
+
79
+ ## URLs are load-bearing
80
+
81
+ The dev PTY intentionally uses **the same ports and URLs as main**. OAuth callbacks, CORS
82
+ allowlists, cookie scoping, CSP `connect-src` and webhook URLs are all keyed off origin, so
83
+ running a worktree on a different port would break them.
84
+
85
+ Consequence: stop main's dev before starting a builder's, or the spawned dev fails at bind time
86
+ with `EADDRINUSE`.
87
+
88
+ ## Cleanup and orphan recovery
89
+
90
+ `afx dev --stop` and the swap path kill the entire PTY **process group** (SIGTERM, then SIGKILL
91
+ after 5s), which signals every grandchild of a monorepo orchestrator (`pnpm dev`, `turbo dev`,
92
+ `pnpm -r --parallel run dev`) at once. Ports are reclaimed by the OS as a consequence — Codev
93
+ never manipulates ports directly.
94
+
95
+ If Tower hard-crashes mid-dev and a process is left holding a port outside Codev's records:
96
+
97
+ ```bash
98
+ lsof -ti :<port> | xargs kill
99
+ lsof -ti :3000,:3001,:4000 | xargs kill
100
+ ```
101
+
102
+ ## Recipes
103
+
104
+ **pnpm monorepo (Next.js / Turbo)**
105
+ ```json
106
+ {"worktree": {"symlinks": [".env.local", ".env.development.local", "packages/*/.env", "packages/*/.env.local", "turbo.json"], "postSpawn": ["pnpm install --frozen-lockfile"], "devCommand": "pnpm dev"}}
107
+ ```
108
+
109
+ **npm** — `{"symlinks": [".env.local", ".env.development"], "postSpawn": ["npm ci"], "devCommand": "npm run dev"}`
110
+
111
+ **yarn** — `{"symlinks": [".env.local"], "postSpawn": ["yarn install --frozen-lockfile"], "devCommand": "yarn dev"}`
112
+
113
+ **bun** — `{"symlinks": [".env.local"], "postSpawn": ["bun install --frozen-lockfile"], "devCommand": "bun dev"}`
114
+
115
+ **cargo** — `{"symlinks": [".env"], "postSpawn": [], "devCommand": "cargo run"}`
116
+
117
+ **poetry / uv** — `{"symlinks": [".env", ".env.local"], "postSpawn": ["uv sync"], "devCommand": "uv run python -m myapp"}`
118
+
119
+ **go mod** — `{"symlinks": [".env"], "postSpawn": ["go mod download"], "devCommand": "go run ./cmd/server"}`
@@ -4,33 +4,33 @@ You are implementing {{input_description}}.
4
4
 
5
5
  {{#if mode_soft}}
6
6
  ## Mode: SOFT
7
- You are running in SOFT mode. This means:
8
- - You follow the AIR protocol yourself (no porch orchestration)
9
- - The architect monitors your work and verifies you're adhering to the protocol
10
- - Consultation is optional — use your judgement based on complexity
11
- - You have flexibility in execution, but must stay compliant with the protocol
7
+
8
+ You follow the protocol yourself; the architect verifies compliance.
12
9
  {{/if}}
13
10
 
14
11
  {{#if mode_strict}}
15
12
  ## Mode: STRICT
16
- You are running in STRICT mode. This means:
17
- - Porch orchestrates your work
18
- - Run: `porch next` to get your next tasks
19
- - Follow porch signals and gate approvals
20
-
21
- ### ABSOLUTE RESTRICTIONS (STRICT MODE)
22
- - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
23
- - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
13
+
14
+ Porch orchestrates. `porch next` gives you tasks; `porch done` signals completion. Never
15
+ hand-edit `status.yaml` — only porch commands modify project state.
24
16
  {{/if}}
25
17
 
26
18
  ## Protocol
27
- Follow the AIR protocol. Read and internalize the protocol before starting any work. The full protocol text is included below under **## Protocol Reference (full text)**.
19
+
20
+ The full protocol text is inlined below under **## Protocol Reference (full text)** — you do not
21
+ need to fetch it.
28
22
 
29
23
  ## Baked Decisions
30
24
 
31
- If the issue body contains a section named "Baked Decisions" (any heading level, case-insensitive), treat its contents as fixed architectural decisions baked in by the architect. Do not autonomously override them in your spec, plan, or implementation. If you discover a serious reason to question a baked decision, surface that concern to the architect via `afx send` rather than relitigating it inside the spec/plan/review.
25
+ If the issue body contains a section named "Baked Decisions" (any heading level,
26
+ case-insensitive), treat its contents as fixed architectural decisions baked in by the
27
+ architect. Do not autonomously override them in your spec, plan, or implementation. If you
28
+ discover a serious reason to question a baked decision, surface that concern to the architect
29
+ via `afx send` rather than relitigating it inside the spec/plan/review.
32
30
 
33
- If the architect's baked-decisions section contains internal contradictions (e.g., two different language choices), do not pick one — pause, flag the contradiction to the architect via `afx send`, and wait for resolution before proceeding.
31
+ If the architect's baked-decisions section contains internal contradictions (e.g., two different
32
+ language choices), do not pick one — pause, flag the contradiction to the architect via
33
+ `afx send`, and wait for resolution before proceeding.
34
34
 
35
35
  {{#if issue}}
36
36
  ## Issue #{{issue.number}}
@@ -38,44 +38,25 @@ If the architect's baked-decisions section contains internal contradictions (e.g
38
38
 
39
39
  **Description**:
40
40
  {{issue.body}}
41
+ {{/if}}
41
42
 
42
43
  ## Your Mission
43
- 1. Read the issue requirements carefully
44
- 2. Implement the feature (< 300 LOC)
45
- 3. Write tests for the feature
46
- 4. Create PR with review in the PR body (NOT as a separate file)
47
- 5. Notify architect via `afx send architect "PR #N ready for review (implements #{{issue.number}})"`
48
44
 
49
- **IMPORTANT**: AIR produces NO spec, plan, or review files. The review goes in the PR body.
45
+ 1. Implement the feature from the issue (<300 LOC)
46
+ 2. Write tests for it
47
+ 3. Open a PR with the review **in the PR body**, not as a separate file
48
+ 4. Notify: `afx send architect "PR #N ready for review (implements #{{issue.number}})"`
49
+
50
+ **AIR produces no spec, plan, or review files.** That is the whole economy of the protocol.
51
+
52
+ If the feature turns out larger than AIR fits (>300 LOC, or an architectural decision the issue
53
+ does not make), stop and say so rather than growing it quietly:
50
54
 
51
- If the feature is too complex (> 300 LOC or architectural changes), notify the Architect via:
52
55
  ```bash
53
56
  afx send architect "Issue #{{issue.number}} is more complex than expected. [Reason]. Recommend escalating to ASPIR."
54
57
  ```
55
58
 
56
59
  ## Notifications
57
- Always use `afx send architect "..."` to notify the architect at key moments:
58
- - **PR ready**: `afx send architect "PR #N ready for review (implements #{{issue.number}})"`
59
- - **PR merged**: `afx send architect "PR #N merged for issue #{{issue.number}}. Ready for cleanup."`
60
- - **Blocked**: `afx send architect "Blocked on issue #{{issue.number}}: [reason]"`
61
- {{/if}}
62
-
63
- ## Handling Flaky Tests
64
-
65
- If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
66
- 1. **DO NOT** edit `status.yaml` to bypass checks
67
- 2. **DO NOT** skip porch checks or use any workaround to avoid the failure
68
- 3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
69
- 4. **DO** document each skipped flaky test in the PR body under a "Flaky Tests" section
70
- 5. Commit the skip and continue with your work
71
-
72
- ## Getting Started
73
- 1. Read the AIR protocol
74
- 2. Review the issue details
75
- 3. Implement the feature
76
-
77
- ---
78
-
79
- ## Protocol Reference (full text)
80
60
 
81
- {{protocol_reference}}
61
+ The architect is not watching. `afx send architect "..."` at each of: gate reached, PR ready, PR
62
+ merged, blocked.
@@ -1,43 +1,32 @@
1
1
  # Implementation Review Prompt
2
2
 
3
3
  ## Context
4
- You are reviewing implementation work for a small feature built under the AIR protocol. The builder implemented directly from a GitHub issue — there is no spec or plan document. Your job is to verify the implementation matches the issue requirements and follows good practices.
5
4
 
6
- ## CRITICAL: Verify Before Flagging
5
+ You are reviewing implementation work built under the AIR protocol — a small feature implemented directly from a GitHub issue, with no spec or plan document. Verify it matches the issue and follows good practice; review against the issue, not against artifacts AIR does not produce.
7
6
 
8
- Before requesting changes for missing configuration, incorrect patterns, or framework issues:
9
- 1. **Check `package.json`** for actual dependency versions — framework conventions change between major versions
10
- 2. **Read the actual config files** (or confirm their deliberate absence) before flagging missing configs
11
- 3. **Do not assume** your training data reflects the version in use — verify against project files
7
+ ## Verify before flagging
8
+
9
+ Before requesting changes for missing configuration, wrong patterns, or framework issues, confirm the claim against the project rather than your training data:
10
+
11
+ - Check `package.json` for the actual dependency versions — framework conventions change between major versions.
12
+ - Read the actual config files (or confirm their deliberate absence) before flagging a missing config.
12
13
 
13
14
  ## Baked Decisions
14
15
 
15
16
  If the issue body includes content under a "Baked Decisions" heading, the architect has marked those choices as fixed. Do not autonomously challenge them: do not propose alternative languages, frameworks, deployment shapes, or dependencies that contradict a baked decision. You may `COMMENT` with concerns about a baked decision (the architect decides whether to rescind it); reserve `REQUEST_CHANGES` for the case where the implementation **fails to honor** a stated baked decision — that is a real defect.
16
17
 
17
- If the baked decisions themselves contain contradictions, do not pick one — `REQUEST_CHANGES` and ask the architect to clarify before proceeding.
18
+ If the baked decisions themselves contradict each other, do not pick one — `REQUEST_CHANGES` and ask the architect to clarify before proceeding.
18
19
 
19
20
  ## Focus Areas
20
21
 
21
- 1. **Issue Adherence**
22
- - Does the implementation fulfill the issue requirements?
23
- - Are the described acceptance criteria met?
24
-
25
- 2. **Code Quality**
26
- - Is the code readable and maintainable?
27
- - Are there obvious bugs or issues?
28
- - Are error cases handled appropriately?
29
-
30
- 3. **Test Coverage**
31
- - Are the tests adequate?
32
- - Do tests cover the main paths AND edge cases?
33
-
34
- 4. **Scope**
35
- - Is the change under 300 LOC? If not, should this be escalated to ASPIR?
36
- - Does the implementation stay focused on the issue, or does it include unrelated changes?
22
+ - **Issue Adherence** — the implementation fulfills the issue's requirements and acceptance criteria.
23
+ - **Code Quality** — readable and maintainable; no obvious bugs; error cases handled.
24
+ - **Test Coverage** — tests are adequate and cover main paths and edge cases.
25
+ - **Scope** — the change stays focused on the issue and under ~300 LOC; if larger, it should escalate to ASPIR.
37
26
 
38
27
  ## Verdict Format
39
28
 
40
- After your review, provide your verdict in exactly this format:
29
+ Provide your verdict in exactly this format — `consult` parses it:
41
30
 
42
31
  ```
43
32
  ---
@@ -51,14 +40,8 @@ KEY_ISSUES:
51
40
  ...
52
41
  ```
53
42
 
54
- **Verdict meanings:**
55
- - `APPROVE`: Implementation looks good, ready for PR
56
- - `REQUEST_CHANGES`: Issues that must be fixed
57
- - `COMMENT`: Minor suggestions, can proceed but note feedback
58
-
59
- ## Notes
43
+ - `APPROVE`: implementation looks good, ready for PR.
44
+ - `REQUEST_CHANGES`: issues that must be fixed.
45
+ - `COMMENT`: minor suggestions; can proceed but note the feedback.
60
46
 
61
- - AIR has no spec or plan — review against the GitHub issue
62
- - Focus on "does this feature work correctly" not "is this architecturally perfect"
63
- - If referencing line numbers, use `file:line` format
64
- - The builder needs actionable feedback
47
+ AIR has no spec or plan — review against the GitHub issue, and judge "does this feature work correctly", not "is this architecturally perfect".
@@ -1,48 +1,30 @@
1
1
  # PR Ready Review Prompt
2
2
 
3
3
  ## Context
4
- You are performing a review of a pull request created under the AIR protocol. The builder implemented a small feature directly from a GitHub issue — there are no spec, plan, or review files. The review is embedded in the PR body.
4
+
5
+ You are reviewing a pull request created under the AIR protocol — a small feature implemented directly from a GitHub issue, with no spec, plan, or review file. The review is embedded in the PR body.
5
6
 
6
7
  ## Baked Decisions
7
8
 
8
9
  If the issue body includes content under a "Baked Decisions" heading, the architect has marked those choices as fixed. Do not autonomously challenge them: do not propose alternative languages, frameworks, deployment shapes, or dependencies that contradict a baked decision. You may `COMMENT` with concerns about a baked decision (the architect decides whether to rescind it); reserve `REQUEST_CHANGES` for the case where the code **fails to honor** a stated baked decision — that is a real defect.
9
10
 
10
- If the baked decisions themselves contain contradictions, do not pick one — `REQUEST_CHANGES` and ask the architect to clarify before proceeding.
11
+ If the baked decisions themselves contradict each other, do not pick one — `REQUEST_CHANGES` and ask the architect to clarify before proceeding.
11
12
 
12
13
  ## Focus Areas
13
14
 
14
- 1. **Completeness**
15
- - Are the issue requirements implemented?
16
- - Is the PR body review section filled out (summary, key decisions, test plan)?
17
- - Are commits properly formatted?
18
-
19
- 2. **Test Status**
20
- - Do all tests pass?
21
- - Is test coverage adequate for the changes?
22
- - Are there any skipped or flaky tests?
23
-
24
- 3. **Code Cleanliness**
25
- - Is there any debug code left in?
26
- - Are there any TODO comments that should be resolved?
27
- - Is the code properly formatted?
28
-
29
- 4. **Scope**
30
- - Is the change under 300 LOC?
31
- - Does the implementation stay focused on the issue?
32
- - Are there unrelated changes bundled in?
33
-
34
- 5. **PR Quality**
35
- - Does the PR link to the issue?
36
- - Is the PR body review section informative?
37
- - Is the branch up to date with its base (the integration branch the PR targets)?
15
+ - **Completeness** — the issue's requirements are implemented and the PR body's review section (summary, key decisions, test plan) is filled out.
16
+ - **Test Status** — all tests pass, coverage is adequate, and any skipped/flaky tests are accounted for.
17
+ - **Code Cleanliness** — no debug code, no stray `TODO`, code properly formatted.
18
+ - **Scope** — the change stays under ~300 LOC and focused on the issue, with no unrelated changes bundled in.
19
+ - **PR Quality** — the PR links to the issue, the body's review section is informative, and the branch is up to date with its base (the integration branch the PR targets).
38
20
 
39
21
  ## Scope
40
22
 
41
- - **DO NOT** flag the syntax of `git diff` examples that appear in review-file prose (e.g., `git diff ci..HEAD` inside a "Files Changed" caption or "How to Test Locally" section). Quoted diff syntax is documentation, not a command. Apply two-dot/three-dot scrutiny only to diffs you compute yourself.
23
+ Do not flag the syntax of `git diff` examples that appear in review-file prose (e.g. `git diff ci..HEAD` inside a "Files Changed" caption) — quoted diff syntax is documentation, not a command. Apply two-dot/three-dot scrutiny only to diffs you compute yourself.
42
24
 
43
25
  ## Verdict Format
44
26
 
45
- After your review, provide your verdict in exactly this format:
27
+ Provide your verdict in exactly this format — `consult` parses it:
46
28
 
47
29
  ```
48
30
  ---
@@ -56,13 +38,8 @@ KEY_ISSUES:
56
38
  ...
57
39
  ```
58
40
 
59
- **Verdict meanings:**
60
- - `APPROVE`: Ready for architect review
61
- - `REQUEST_CHANGES`: Issues to fix before review
62
- - `COMMENT`: Minor items, can proceed but note feedback
63
-
64
- ## Notes
41
+ - `APPROVE`: ready for architect review.
42
+ - `REQUEST_CHANGES`: issues to fix before review.
43
+ - `COMMENT`: minor items; can proceed but note the feedback.
65
44
 
66
- - AIR has no spec, plan, or review files — review the PR body and code diff
67
- - Focus on "is this ready for someone else to review" not "is this perfect"
68
- - Any issues found here are cheaper to fix than during integration review
45
+ AIR has no spec, plan, or review files — review the PR body and the code diff.
@@ -2,9 +2,9 @@
2
2
 
3
3
  You are executing the **IMPLEMENT** phase of the AIR protocol.
4
4
 
5
- ## Your Goal
5
+ ## Goal
6
6
 
7
- Read the GitHub issue, implement the feature, and add tests. Keep it focused and under 300 LOC.
7
+ Implement the feature described in the issue, with tests, as a focused change under ~300 LOC. AIR produces no `codev/specs/` or `codev/plans/` artifacts.
8
8
 
9
9
  ## Baked Decisions
10
10
 
@@ -17,79 +17,26 @@ If two baked decisions contradict each other, do not pick one — pause, flag th
17
17
  - **Issue**: #{{issue.number}} — {{issue.title}}
18
18
  - **Current State**: {{current_state}}
19
19
 
20
- ## Process
20
+ ## What must be true when you finish
21
21
 
22
- ### 1. Read the Issue
22
+ - **The feature matches the issue.** You have read it fully — desired behavior, acceptance criteria, any examples — and implemented exactly what it describes: no refactoring of surrounding code, no features beyond the issue, no unrelated bug fixes (file separate issues for those). Self-documenting code, no debug or commented-out code, existing project conventions.
23
+ - **Tests exist.** They cover the happy path and the key edge cases, and are deterministic. (Purely declarative changes — config only — may not need them; say so.)
24
+ - **Build and tests pass.** Confirm the real project commands (check `package.json` if unsure) and run them; fix failures before signaling.
25
+ - **The change stays within AIR scope.** If it grows past ~300 LOC or turns architectural, signal `TOO_COMPLEX` rather than pressing on.
23
26
 
24
- Read the full issue description. Identify:
25
- - What is the desired behavior?
26
- - What are the acceptance criteria?
27
- - Are there examples or mockups?
28
- - What files/modules are likely affected?
29
-
30
- ### 2. Implement the Feature
31
-
32
- Apply a focused implementation:
33
- - Implement what the issue describes — no more, no less
34
- - Do NOT refactor surrounding code
35
- - Do NOT add features beyond what's described in the issue
36
- - Do NOT fix unrelated bugs you happen to notice (file separate issues)
37
-
38
- **Code Quality**:
39
- - Self-documenting code (clear names, obvious structure)
40
- - No commented-out code or debug prints
41
- - Follow existing project conventions
42
-
43
- ### 3. Add Tests
44
-
45
- Write tests that:
46
- - Cover the main happy path
47
- - Cover key edge cases
48
- - Are deterministic (not flaky)
49
-
50
- Place tests following project conventions (`__tests__/`, `*.test.ts`, etc.).
51
-
52
- ### 4. Verify the Build
53
-
54
- Run build and tests:
55
-
56
- ```bash
57
- npm run build # Must pass
58
- npm test # Must pass
59
- ```
60
-
61
- Fix any failures before proceeding. If build/test commands don't exist, check `package.json`.
62
-
63
- ### 5. Commit
64
-
65
- Stage and commit your changes:
66
- - Use explicit file paths (never `git add -A` or `git add .`)
67
- - Commit message: `[Air #{{issue.number}}] feat: <brief description>`
27
+ Commit with an explicit staged path and the message `[Air #{{issue.number}}] feat: <brief description>`.
68
28
 
69
29
  ## Signals
70
30
 
71
- When implementation and tests are complete and passing:
72
-
73
- ```
74
- <signal>PHASE_COMPLETE</signal>
75
- ```
76
-
77
- If the feature is too complex for AIR (> 300 LOC or architectural):
78
-
79
- ```
80
- <signal>TOO_COMPLEX</signal>
81
- ```
82
-
83
- If you're blocked (missing context, unclear requirements, etc.):
84
-
85
- ```
86
- <signal>BLOCKED:reason goes here</signal>
87
- ```
88
-
89
- ## Important Notes
90
-
91
- 1. **Stay focused** — Implement what the issue describes, nothing else
92
- 2. **Tests are expected** — Add tests unless the change is purely declarative (e.g., config only)
93
- 3. **Build AND tests must pass** — Don't signal complete until both pass
94
- 4. **Stay under 300 LOC** — If the feature grows beyond this, signal `TOO_COMPLEX`
95
- 5. **No spec/plan artifacts** — AIR does not create files in `codev/specs/` or `codev/plans/`
31
+ - Implementation and tests complete and passing:
32
+ ```
33
+ <signal>PHASE_COMPLETE</signal>
34
+ ```
35
+ - Too complex for AIR (> ~300 LOC or architectural):
36
+ ```
37
+ <signal>TOO_COMPLEX</signal>
38
+ ```
39
+ - Blocked (missing context, unclear requirements):
40
+ ```
41
+ <signal>BLOCKED:reason goes here</signal>
42
+ ```
@@ -2,32 +2,20 @@
2
2
 
3
3
  You are executing the **PR** phase of the AIR protocol.
4
4
 
5
- ## Your Goal
5
+ ## Goal
6
6
 
7
- Create a pull request with the review embedded in the PR body, optionally run CMAP, and notify the architect.
7
+ Open the PR with the review embedded in its body, optionally run CMAP, and notify the architect.
8
8
 
9
9
  ## Context
10
10
 
11
11
  - **Issue**: #{{issue.number}} — {{issue.title}}
12
12
  - **Current State**: {{current_state}}
13
13
 
14
- ## Process
14
+ ## Create the PR
15
15
 
16
- ### 1. Create the Pull Request
16
+ **The PR body IS the review for AIR** — do not create a file in `codev/reviews/`. Include a summary, the key decisions, and a test plan in the body itself.
17
17
 
18
- Create a PR that links to the issue. The PR body IS the review — include a summary, key decisions, and test plan.
19
-
20
- **PR body requirements**: The PR body MUST include `Closes #<N>` (where `<N>` is
21
- the driving issue number) so GitHub auto-closes the issue on merge. If the PR
22
- closes multiple issues (e.g. duplicates consolidated), include one `Closes #<N>`
23
- per issue. Without this, GitHub will not auto-close the issue.
24
-
25
- **Exception**: if this PR only partially addresses the issue, use `Refs #<N>`
26
- or `Part of #<N>` instead of `Closes` — the issue stays open until a
27
- follow-up PR closes it.
28
-
29
- **Note**: substitute the real issue number for `<N>` — do not leave the
30
- placeholder or any `{{...}}` template tag in the committed PR body.
18
+ The body must carry `Closes #<N>` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a partial fix uses `Refs #<N>` or `Part of #<N>` instead. Substitute the real number for `<N>`; leave no `{{...}}` tag or `<N>` placeholder in the committed body.
31
19
 
32
20
  ```bash
33
21
  gh pr create --title "[Air #<N>] feat: <brief description>" --body "$(cat <<'EOF'
@@ -35,15 +23,15 @@ gh pr create --title "[Air #<N>] feat: <brief description>" --body "$(cat <<'EOF
35
23
 
36
24
  <1-2 sentence description of the feature>
37
25
 
38
- Closes #<N> <!-- Substitute <N> with the real issue number -->
26
+ Closes #<N> <!-- Substitute <N>; use "Refs #<N>" for a partial fix -->
39
27
 
40
28
  ## What Changed
41
29
 
42
- <Brief explanation of the implementation approach>
30
+ <the implementation approach>
43
31
 
44
32
  ## Key Decisions
45
33
 
46
- <Any notable decisions made during implementation, or "None — straightforward implementation">
34
+ <notable decisions, or "None — straightforward implementation">
47
35
 
48
36
  ## Test Plan
49
37
 
@@ -53,16 +41,14 @@ Closes #<N> <!-- Substitute <N> with the real issue number -->
53
41
 
54
42
  ## Review Notes
55
43
 
56
- <Anything the reviewer should pay special attention to, or "Standard implementation — no special concerns">
44
+ <anything the reviewer should focus on, or "Standard implementation — no special concerns">
57
45
  EOF
58
46
  )"
59
47
  ```
60
48
 
61
- **IMPORTANT**: Do NOT create a review file in `codev/reviews/`. The PR body IS the review for AIR.
49
+ ## Optional CMAP review
62
50
 
63
- ### 2. Optional CMAP Review
64
-
65
- If the implementation is non-trivial, run 3-way consultation:
51
+ CMAP is your judgement call for AIR. Skip it for simple changes (config, small UI); run it for features touching core logic or several modules:
66
52
 
67
53
  ```bash
68
54
  consult -m gemini --protocol air --type pr &
@@ -70,41 +56,23 @@ consult -m codex --protocol air --type pr &
70
56
  consult -m claude --protocol air --type pr &
71
57
  ```
72
58
 
73
- All three should run in the background (`run_in_background: true`).
74
-
75
- **This is optional** — use your judgement. For simple features (config changes, small UI additions), you may skip consultation. For features touching core logic or multiple modules, run it.
59
+ If you run it, wait for all three, record each verdict, fix real issues, and push.
76
60
 
77
- ### 3. Address Feedback (if CMAP was run)
78
-
79
- If you ran CMAP:
80
- - Wait for all consultations to complete
81
- - Record each model's verdict
82
- - Fix any issues identified
83
- - Push updates to the PR branch
84
-
85
- ### 4. Notify Architect
86
-
87
- Send notification with PR link:
61
+ ## Notify the architect
88
62
 
89
63
  ```bash
90
64
  afx send architect "PR #<number> ready for review (implements issue #{{issue.number}})"
91
65
  ```
92
66
 
93
- If CMAP was run, include verdicts:
94
- ```bash
95
- afx send architect "PR #<number> ready for review (implements issue #{{issue.number}}). CMAP: gemini=<verdict>, codex=<verdict>, claude=<verdict>"
96
- ```
67
+ If you ran CMAP, include the verdicts: `CMAP: gemini=<verdict>, codex=<verdict>, claude=<verdict>`.
97
68
 
98
69
  ## Signals
99
70
 
100
- When PR is created and ready for review:
101
-
102
- ```
103
- <signal>PHASE_COMPLETE</signal>
104
- ```
105
-
106
- If you're blocked:
107
-
108
- ```
109
- <signal>BLOCKED:reason goes here</signal>
110
- ```
71
+ - PR created and ready for review:
72
+ ```
73
+ <signal>PHASE_COMPLETE</signal>
74
+ ```
75
+ - Blocked:
76
+ ```
77
+ <signal>BLOCKED:reason goes here</signal>
78
+ ```