@cluesmith/codev 2.0.0-rc.8 → 2.0.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 (507) hide show
  1. package/bin/af.js +2 -2
  2. package/bin/consult.js +1 -1
  3. package/bin/porch.js +6 -35
  4. package/dashboard/dist/assets/index-4n9zpWLY.css +32 -0
  5. package/dashboard/dist/assets/index-b38SaXk5.js +136 -0
  6. package/dashboard/dist/assets/index-b38SaXk5.js.map +1 -0
  7. package/dashboard/dist/index.html +14 -0
  8. package/dist/agent-farm/cli.d.ts.map +1 -1
  9. package/dist/agent-farm/cli.js +179 -118
  10. package/dist/agent-farm/cli.js.map +1 -1
  11. package/dist/agent-farm/commands/architect.d.ts +3 -3
  12. package/dist/agent-farm/commands/architect.d.ts.map +1 -1
  13. package/dist/agent-farm/commands/architect.js +20 -147
  14. package/dist/agent-farm/commands/architect.js.map +1 -1
  15. package/dist/agent-farm/commands/attach.d.ts +13 -0
  16. package/dist/agent-farm/commands/attach.d.ts.map +1 -0
  17. package/dist/agent-farm/commands/attach.js +144 -0
  18. package/dist/agent-farm/commands/attach.js.map +1 -0
  19. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  20. package/dist/agent-farm/commands/cleanup.js +35 -19
  21. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  22. package/dist/agent-farm/commands/consult.d.ts +3 -4
  23. package/dist/agent-farm/commands/consult.d.ts.map +1 -1
  24. package/dist/agent-farm/commands/consult.js +27 -37
  25. package/dist/agent-farm/commands/consult.js.map +1 -1
  26. package/dist/agent-farm/commands/index.d.ts +2 -2
  27. package/dist/agent-farm/commands/index.d.ts.map +1 -1
  28. package/dist/agent-farm/commands/index.js +2 -2
  29. package/dist/agent-farm/commands/index.js.map +1 -1
  30. package/dist/agent-farm/commands/open.d.ts +4 -2
  31. package/dist/agent-farm/commands/open.d.ts.map +1 -1
  32. package/dist/agent-farm/commands/open.js +33 -83
  33. package/dist/agent-farm/commands/open.js.map +1 -1
  34. package/dist/agent-farm/commands/send.d.ts +1 -1
  35. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  36. package/dist/agent-farm/commands/send.js +70 -79
  37. package/dist/agent-farm/commands/send.js.map +1 -1
  38. package/dist/agent-farm/commands/shell.d.ts +15 -0
  39. package/dist/agent-farm/commands/shell.d.ts.map +1 -0
  40. package/dist/agent-farm/commands/shell.js +50 -0
  41. package/dist/agent-farm/commands/shell.js.map +1 -0
  42. package/dist/agent-farm/commands/spawn-roles.d.ts +80 -0
  43. package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -0
  44. package/dist/agent-farm/commands/spawn-roles.js +278 -0
  45. package/dist/agent-farm/commands/spawn-roles.js.map +1 -0
  46. package/dist/agent-farm/commands/spawn-worktree.d.ts +96 -0
  47. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -0
  48. package/dist/agent-farm/commands/spawn-worktree.js +305 -0
  49. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -0
  50. package/dist/agent-farm/commands/spawn.d.ts +5 -1
  51. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  52. package/dist/agent-farm/commands/spawn.js +242 -586
  53. package/dist/agent-farm/commands/spawn.js.map +1 -1
  54. package/dist/agent-farm/commands/start.d.ts +10 -20
  55. package/dist/agent-farm/commands/start.d.ts.map +1 -1
  56. package/dist/agent-farm/commands/start.js +45 -491
  57. package/dist/agent-farm/commands/start.js.map +1 -1
  58. package/dist/agent-farm/commands/status.d.ts +2 -0
  59. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  60. package/dist/agent-farm/commands/status.js +75 -24
  61. package/dist/agent-farm/commands/status.js.map +1 -1
  62. package/dist/agent-farm/commands/stop.d.ts +6 -0
  63. package/dist/agent-farm/commands/stop.d.ts.map +1 -1
  64. package/dist/agent-farm/commands/stop.js +49 -109
  65. package/dist/agent-farm/commands/stop.js.map +1 -1
  66. package/dist/agent-farm/commands/tower-cloud.d.ts +48 -0
  67. package/dist/agent-farm/commands/tower-cloud.d.ts.map +1 -0
  68. package/dist/agent-farm/commands/tower-cloud.js +293 -0
  69. package/dist/agent-farm/commands/tower-cloud.js.map +1 -0
  70. package/dist/agent-farm/commands/tower.d.ts +9 -0
  71. package/dist/agent-farm/commands/tower.d.ts.map +1 -1
  72. package/dist/agent-farm/commands/tower.js +59 -19
  73. package/dist/agent-farm/commands/tower.js.map +1 -1
  74. package/dist/agent-farm/db/index.d.ts +6 -2
  75. package/dist/agent-farm/db/index.d.ts.map +1 -1
  76. package/dist/agent-farm/db/index.js +301 -19
  77. package/dist/agent-farm/db/index.js.map +1 -1
  78. package/dist/agent-farm/db/migrate.d.ts +0 -4
  79. package/dist/agent-farm/db/migrate.d.ts.map +1 -1
  80. package/dist/agent-farm/db/migrate.js +6 -55
  81. package/dist/agent-farm/db/migrate.js.map +1 -1
  82. package/dist/agent-farm/db/schema.d.ts +3 -3
  83. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  84. package/dist/agent-farm/db/schema.js +25 -19
  85. package/dist/agent-farm/db/schema.js.map +1 -1
  86. package/dist/agent-farm/db/types.d.ts +3 -13
  87. package/dist/agent-farm/db/types.d.ts.map +1 -1
  88. package/dist/agent-farm/db/types.js +3 -11
  89. package/dist/agent-farm/db/types.js.map +1 -1
  90. package/dist/agent-farm/hq-connector.d.ts +2 -6
  91. package/dist/agent-farm/hq-connector.d.ts.map +1 -1
  92. package/dist/agent-farm/hq-connector.js +2 -17
  93. package/dist/agent-farm/hq-connector.js.map +1 -1
  94. package/dist/agent-farm/lib/cloud-config.d.ts +59 -0
  95. package/dist/agent-farm/lib/cloud-config.d.ts.map +1 -0
  96. package/dist/agent-farm/lib/cloud-config.js +143 -0
  97. package/dist/agent-farm/lib/cloud-config.js.map +1 -0
  98. package/dist/agent-farm/lib/device-name.d.ts +25 -0
  99. package/dist/agent-farm/lib/device-name.d.ts.map +1 -0
  100. package/dist/agent-farm/lib/device-name.js +46 -0
  101. package/dist/agent-farm/lib/device-name.js.map +1 -0
  102. package/dist/agent-farm/lib/nonce-store.d.ts +28 -0
  103. package/dist/agent-farm/lib/nonce-store.d.ts.map +1 -0
  104. package/dist/agent-farm/lib/nonce-store.js +60 -0
  105. package/dist/agent-farm/lib/nonce-store.js.map +1 -0
  106. package/dist/agent-farm/lib/token-exchange.d.ts +18 -0
  107. package/dist/agent-farm/lib/token-exchange.d.ts.map +1 -0
  108. package/dist/agent-farm/lib/token-exchange.js +48 -0
  109. package/dist/agent-farm/lib/token-exchange.js.map +1 -0
  110. package/dist/agent-farm/lib/tower-client.d.ts +163 -0
  111. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -0
  112. package/dist/agent-farm/lib/tower-client.js +233 -0
  113. package/dist/agent-farm/lib/tower-client.js.map +1 -0
  114. package/dist/agent-farm/lib/tunnel-client.d.ts +117 -0
  115. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -0
  116. package/dist/agent-farm/lib/tunnel-client.js +504 -0
  117. package/dist/agent-farm/lib/tunnel-client.js.map +1 -0
  118. package/dist/agent-farm/servers/tower-instances.d.ts +82 -0
  119. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -0
  120. package/dist/agent-farm/servers/tower-instances.js +454 -0
  121. package/dist/agent-farm/servers/tower-instances.js.map +1 -0
  122. package/dist/agent-farm/servers/tower-routes.d.ts +34 -0
  123. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -0
  124. package/dist/agent-farm/servers/tower-routes.js +1445 -0
  125. package/dist/agent-farm/servers/tower-routes.js.map +1 -0
  126. package/dist/agent-farm/servers/tower-server.d.ts +5 -2
  127. package/dist/agent-farm/servers/tower-server.d.ts.map +1 -1
  128. package/dist/agent-farm/servers/tower-server.js +157 -475
  129. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  130. package/dist/agent-farm/servers/tower-terminals.d.ts +119 -0
  131. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -0
  132. package/dist/agent-farm/servers/tower-terminals.js +629 -0
  133. package/dist/agent-farm/servers/tower-terminals.js.map +1 -0
  134. package/dist/agent-farm/servers/tower-tunnel.d.ts +34 -0
  135. package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -0
  136. package/dist/agent-farm/servers/tower-tunnel.js +473 -0
  137. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -0
  138. package/dist/agent-farm/servers/tower-types.d.ts +86 -0
  139. package/dist/agent-farm/servers/tower-types.d.ts.map +1 -0
  140. package/dist/agent-farm/servers/tower-types.js +6 -0
  141. package/dist/agent-farm/servers/tower-types.js.map +1 -0
  142. package/dist/agent-farm/servers/tower-utils.d.ts +58 -0
  143. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -0
  144. package/dist/agent-farm/servers/tower-utils.js +182 -0
  145. package/dist/agent-farm/servers/tower-utils.js.map +1 -0
  146. package/dist/agent-farm/servers/tower-websocket.d.ts +25 -0
  147. package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -0
  148. package/dist/agent-farm/servers/tower-websocket.js +171 -0
  149. package/dist/agent-farm/servers/tower-websocket.js.map +1 -0
  150. package/dist/agent-farm/state.d.ts +6 -12
  151. package/dist/agent-farm/state.d.ts.map +1 -1
  152. package/dist/agent-farm/state.js +34 -49
  153. package/dist/agent-farm/state.js.map +1 -1
  154. package/dist/agent-farm/types.d.ts +49 -26
  155. package/dist/agent-farm/types.d.ts.map +1 -1
  156. package/dist/agent-farm/utils/config.d.ts +0 -5
  157. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  158. package/dist/agent-farm/utils/config.js +12 -44
  159. package/dist/agent-farm/utils/config.js.map +1 -1
  160. package/dist/agent-farm/utils/deps.d.ts.map +1 -1
  161. package/dist/agent-farm/utils/deps.js +0 -32
  162. package/dist/agent-farm/utils/deps.js.map +1 -1
  163. package/dist/agent-farm/utils/file-tabs.d.ts +27 -0
  164. package/dist/agent-farm/utils/file-tabs.d.ts.map +1 -0
  165. package/dist/agent-farm/utils/file-tabs.js +46 -0
  166. package/dist/agent-farm/utils/file-tabs.js.map +1 -0
  167. package/dist/agent-farm/utils/gate-status.d.ts +16 -0
  168. package/dist/agent-farm/utils/gate-status.d.ts.map +1 -0
  169. package/dist/agent-farm/utils/gate-status.js +79 -0
  170. package/dist/agent-farm/utils/gate-status.js.map +1 -0
  171. package/dist/agent-farm/utils/gate-watcher.d.ts +38 -0
  172. package/dist/agent-farm/utils/gate-watcher.d.ts.map +1 -0
  173. package/dist/agent-farm/utils/gate-watcher.js +122 -0
  174. package/dist/agent-farm/utils/gate-watcher.js.map +1 -0
  175. package/dist/agent-farm/utils/index.d.ts +0 -1
  176. package/dist/agent-farm/utils/index.d.ts.map +1 -1
  177. package/dist/agent-farm/utils/index.js +0 -1
  178. package/dist/agent-farm/utils/index.js.map +1 -1
  179. package/dist/agent-farm/utils/notifications.d.ts +30 -0
  180. package/dist/agent-farm/utils/notifications.d.ts.map +1 -0
  181. package/dist/agent-farm/utils/notifications.js +121 -0
  182. package/dist/agent-farm/utils/notifications.js.map +1 -0
  183. package/dist/agent-farm/utils/server-utils.d.ts +5 -5
  184. package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
  185. package/dist/agent-farm/utils/server-utils.js +5 -16
  186. package/dist/agent-farm/utils/server-utils.js.map +1 -1
  187. package/dist/agent-farm/utils/session.d.ts +32 -0
  188. package/dist/agent-farm/utils/session.d.ts.map +1 -0
  189. package/dist/agent-farm/utils/session.js +57 -0
  190. package/dist/agent-farm/utils/session.js.map +1 -0
  191. package/dist/agent-farm/utils/shell.d.ts +9 -22
  192. package/dist/agent-farm/utils/shell.d.ts.map +1 -1
  193. package/dist/agent-farm/utils/shell.js +34 -34
  194. package/dist/agent-farm/utils/shell.js.map +1 -1
  195. package/dist/cli.d.ts.map +1 -1
  196. package/dist/cli.js +11 -54
  197. package/dist/cli.js.map +1 -1
  198. package/dist/commands/adopt.d.ts.map +1 -1
  199. package/dist/commands/adopt.js +49 -4
  200. package/dist/commands/adopt.js.map +1 -1
  201. package/dist/commands/consult/index.d.ts +13 -2
  202. package/dist/commands/consult/index.d.ts.map +1 -1
  203. package/dist/commands/consult/index.js +245 -29
  204. package/dist/commands/consult/index.js.map +1 -1
  205. package/dist/commands/doctor.d.ts.map +1 -1
  206. package/dist/commands/doctor.js +96 -79
  207. package/dist/commands/doctor.js.map +1 -1
  208. package/dist/commands/init.d.ts.map +1 -1
  209. package/dist/commands/init.js +52 -3
  210. package/dist/commands/init.js.map +1 -1
  211. package/dist/commands/porch/build-counter.d.ts +5 -0
  212. package/dist/commands/porch/build-counter.d.ts.map +1 -0
  213. package/dist/commands/porch/build-counter.js +5 -0
  214. package/dist/commands/porch/build-counter.js.map +1 -0
  215. package/dist/commands/porch/checks.d.ts +17 -29
  216. package/dist/commands/porch/checks.d.ts.map +1 -1
  217. package/dist/commands/porch/checks.js +96 -144
  218. package/dist/commands/porch/checks.js.map +1 -1
  219. package/dist/commands/porch/index.d.ts +25 -43
  220. package/dist/commands/porch/index.d.ts.map +1 -1
  221. package/dist/commands/porch/index.js +466 -1238
  222. package/dist/commands/porch/index.js.map +1 -1
  223. package/dist/commands/porch/next.d.ts +22 -0
  224. package/dist/commands/porch/next.d.ts.map +1 -0
  225. package/dist/commands/porch/next.js +571 -0
  226. package/dist/commands/porch/next.js.map +1 -0
  227. package/dist/commands/porch/plan.d.ts +70 -0
  228. package/dist/commands/porch/plan.d.ts.map +1 -0
  229. package/dist/commands/porch/plan.js +190 -0
  230. package/dist/commands/porch/plan.js.map +1 -0
  231. package/dist/commands/porch/prompts.d.ts +19 -0
  232. package/dist/commands/porch/prompts.d.ts.map +1 -0
  233. package/dist/commands/porch/prompts.js +277 -0
  234. package/dist/commands/porch/prompts.js.map +1 -0
  235. package/dist/commands/porch/protocol.d.ts +59 -0
  236. package/dist/commands/porch/protocol.d.ts.map +1 -0
  237. package/dist/commands/porch/protocol.js +294 -0
  238. package/dist/commands/porch/protocol.js.map +1 -0
  239. package/dist/commands/porch/state.d.ts +36 -107
  240. package/dist/commands/porch/state.d.ts.map +1 -1
  241. package/dist/commands/porch/state.js +120 -699
  242. package/dist/commands/porch/state.js.map +1 -1
  243. package/dist/commands/porch/types.d.ts +99 -164
  244. package/dist/commands/porch/types.d.ts.map +1 -1
  245. package/dist/commands/porch/types.js +2 -1
  246. package/dist/commands/porch/types.js.map +1 -1
  247. package/dist/commands/porch/verdict.d.ts +31 -0
  248. package/dist/commands/porch/verdict.d.ts.map +1 -0
  249. package/dist/commands/porch/verdict.js +59 -0
  250. package/dist/commands/porch/verdict.js.map +1 -0
  251. package/dist/commands/update.d.ts.map +1 -1
  252. package/dist/commands/update.js +31 -0
  253. package/dist/commands/update.js.map +1 -1
  254. package/dist/lib/scaffold.d.ts +37 -0
  255. package/dist/lib/scaffold.d.ts.map +1 -1
  256. package/dist/lib/scaffold.js +114 -0
  257. package/dist/lib/scaffold.js.map +1 -1
  258. package/dist/terminal/index.d.ts +8 -0
  259. package/dist/terminal/index.d.ts.map +1 -0
  260. package/dist/terminal/index.js +5 -0
  261. package/dist/terminal/index.js.map +1 -0
  262. package/dist/terminal/pty-manager.d.ts +69 -0
  263. package/dist/terminal/pty-manager.d.ts.map +1 -0
  264. package/dist/terminal/pty-manager.js +377 -0
  265. package/dist/terminal/pty-manager.js.map +1 -0
  266. package/dist/terminal/pty-session.d.ts +104 -0
  267. package/dist/terminal/pty-session.d.ts.map +1 -0
  268. package/dist/terminal/pty-session.js +327 -0
  269. package/dist/terminal/pty-session.js.map +1 -0
  270. package/dist/terminal/ring-buffer.d.ts +34 -0
  271. package/dist/terminal/ring-buffer.d.ts.map +1 -0
  272. package/dist/terminal/ring-buffer.js +94 -0
  273. package/dist/terminal/ring-buffer.js.map +1 -0
  274. package/dist/terminal/session-manager.d.ts +115 -0
  275. package/dist/terminal/session-manager.d.ts.map +1 -0
  276. package/dist/terminal/session-manager.js +582 -0
  277. package/dist/terminal/session-manager.js.map +1 -0
  278. package/dist/terminal/shellper-client.d.ts +66 -0
  279. package/dist/terminal/shellper-client.d.ts.map +1 -0
  280. package/dist/terminal/shellper-client.js +234 -0
  281. package/dist/terminal/shellper-client.js.map +1 -0
  282. package/dist/terminal/shellper-main.d.ts +19 -0
  283. package/dist/terminal/shellper-main.d.ts.map +1 -0
  284. package/dist/terminal/shellper-main.js +153 -0
  285. package/dist/terminal/shellper-main.js.map +1 -0
  286. package/dist/terminal/shellper-process.d.ts +75 -0
  287. package/dist/terminal/shellper-process.d.ts.map +1 -0
  288. package/dist/terminal/shellper-process.js +279 -0
  289. package/dist/terminal/shellper-process.js.map +1 -0
  290. package/dist/terminal/shellper-protocol.d.ts +115 -0
  291. package/dist/terminal/shellper-protocol.d.ts.map +1 -0
  292. package/dist/terminal/shellper-protocol.js +214 -0
  293. package/dist/terminal/shellper-protocol.js.map +1 -0
  294. package/dist/terminal/shellper-replay-buffer.d.ts +38 -0
  295. package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -0
  296. package/dist/terminal/shellper-replay-buffer.js +94 -0
  297. package/dist/terminal/shellper-replay-buffer.js.map +1 -0
  298. package/dist/terminal/ws-protocol.d.ts +27 -0
  299. package/dist/terminal/ws-protocol.d.ts.map +1 -0
  300. package/dist/terminal/ws-protocol.js +44 -0
  301. package/dist/terminal/ws-protocol.js.map +1 -0
  302. package/package.json +19 -5
  303. package/skeleton/.claude/skills/af/SKILL.md +89 -0
  304. package/skeleton/.claude/skills/codev/SKILL.md +41 -0
  305. package/skeleton/.claude/skills/consult/SKILL.md +81 -0
  306. package/skeleton/.claude/skills/generate-image/SKILL.md +56 -0
  307. package/skeleton/DEPENDENCIES.md +4 -62
  308. package/skeleton/builders.md +1 -1
  309. package/skeleton/consult-types/impl-review.md +18 -9
  310. package/skeleton/consult-types/integration-review.md +1 -1
  311. package/skeleton/consult-types/plan-review.md +1 -1
  312. package/skeleton/consult-types/pr-ready.md +1 -1
  313. package/skeleton/consult-types/spec-review.md +1 -1
  314. package/skeleton/porch/prompts/defend.md +1 -1
  315. package/skeleton/porch/prompts/evaluate.md +2 -2
  316. package/skeleton/porch/prompts/implement.md +1 -1
  317. package/skeleton/porch/prompts/plan.md +1 -1
  318. package/skeleton/porch/prompts/review.md +4 -4
  319. package/skeleton/porch/prompts/specify.md +1 -1
  320. package/skeleton/porch/prompts/understand.md +2 -2
  321. package/skeleton/protocol-schema.json +282 -0
  322. package/skeleton/protocols/bugfix/builder-prompt.md +60 -0
  323. package/skeleton/protocols/bugfix/prompts/fix.md +77 -0
  324. package/skeleton/protocols/bugfix/prompts/investigate.md +77 -0
  325. package/skeleton/protocols/bugfix/prompts/pr.md +84 -0
  326. package/skeleton/protocols/bugfix/protocol.json +20 -33
  327. package/skeleton/protocols/experiment/builder-prompt.md +52 -0
  328. package/skeleton/protocols/experiment/protocol.json +101 -0
  329. package/skeleton/protocols/experiment/protocol.md +3 -3
  330. package/skeleton/protocols/experiment/templates/notes.md +1 -1
  331. package/skeleton/protocols/maintain/builder-prompt.md +46 -0
  332. package/skeleton/protocols/maintain/prompts/audit.md +111 -0
  333. package/skeleton/protocols/maintain/prompts/clean.md +91 -0
  334. package/skeleton/protocols/maintain/prompts/sync.md +113 -0
  335. package/skeleton/protocols/maintain/prompts/verify.md +110 -0
  336. package/skeleton/protocols/maintain/protocol.json +141 -0
  337. package/skeleton/protocols/maintain/protocol.md +17 -11
  338. package/skeleton/protocols/protocol-schema.json +54 -1
  339. package/skeleton/protocols/spir/builder-prompt.md +66 -0
  340. package/skeleton/protocols/spir/prompts/implement.md +208 -0
  341. package/skeleton/protocols/{spider → spir}/prompts/plan.md +6 -70
  342. package/skeleton/protocols/{spider → spir}/prompts/review.md +20 -39
  343. package/skeleton/protocols/{spider → spir}/prompts/specify.md +33 -61
  344. package/skeleton/protocols/spir/protocol.json +156 -0
  345. package/skeleton/protocols/{spider → spir}/protocol.md +35 -21
  346. package/skeleton/protocols/{spider → spir}/templates/plan.md +14 -0
  347. package/skeleton/protocols/spir/templates/review.md +89 -0
  348. package/skeleton/protocols/tick/builder-prompt.md +56 -0
  349. package/skeleton/protocols/tick/protocol.json +7 -2
  350. package/skeleton/protocols/tick/protocol.md +18 -18
  351. package/skeleton/protocols/tick/templates/review.md +1 -1
  352. package/skeleton/resources/commands/agent-farm.md +63 -46
  353. package/skeleton/resources/commands/codev.md +0 -2
  354. package/skeleton/resources/commands/overview.md +7 -17
  355. package/skeleton/resources/workflow-reference.md +4 -4
  356. package/skeleton/roles/architect.md +152 -315
  357. package/skeleton/roles/builder.md +120 -214
  358. package/skeleton/roles/consultant.md +6 -6
  359. package/skeleton/templates/AGENTS.md +2 -2
  360. package/skeleton/templates/CLAUDE.md +2 -2
  361. package/skeleton/templates/cheatsheet.md +7 -5
  362. package/skeleton/templates/projectlist.md +1 -1
  363. package/templates/dashboard/index.html +17 -43
  364. package/templates/dashboard/js/dialogs.js +7 -7
  365. package/templates/dashboard/js/files.js +2 -2
  366. package/templates/dashboard/js/main.js +4 -4
  367. package/templates/dashboard/js/projects.js +3 -3
  368. package/templates/dashboard/js/tabs.js +1 -1
  369. package/templates/dashboard/js/utils.js +22 -87
  370. package/templates/open.html +26 -0
  371. package/templates/tower.html +731 -91
  372. package/dist/agent-farm/commands/kickoff.d.ts +0 -20
  373. package/dist/agent-farm/commands/kickoff.d.ts.map +0 -1
  374. package/dist/agent-farm/commands/kickoff.js +0 -337
  375. package/dist/agent-farm/commands/kickoff.js.map +0 -1
  376. package/dist/agent-farm/commands/rename.d.ts +0 -13
  377. package/dist/agent-farm/commands/rename.d.ts.map +0 -1
  378. package/dist/agent-farm/commands/rename.js +0 -33
  379. package/dist/agent-farm/commands/rename.js.map +0 -1
  380. package/dist/agent-farm/commands/tutorial.d.ts +0 -10
  381. package/dist/agent-farm/commands/tutorial.d.ts.map +0 -1
  382. package/dist/agent-farm/commands/tutorial.js +0 -49
  383. package/dist/agent-farm/commands/tutorial.js.map +0 -1
  384. package/dist/agent-farm/commands/util.d.ts +0 -15
  385. package/dist/agent-farm/commands/util.d.ts.map +0 -1
  386. package/dist/agent-farm/commands/util.js +0 -108
  387. package/dist/agent-farm/commands/util.js.map +0 -1
  388. package/dist/agent-farm/servers/dashboard-server.d.ts +0 -7
  389. package/dist/agent-farm/servers/dashboard-server.d.ts.map +0 -1
  390. package/dist/agent-farm/servers/dashboard-server.js +0 -1872
  391. package/dist/agent-farm/servers/dashboard-server.js.map +0 -1
  392. package/dist/agent-farm/servers/open-server.d.ts +0 -7
  393. package/dist/agent-farm/servers/open-server.d.ts.map +0 -1
  394. package/dist/agent-farm/servers/open-server.js +0 -315
  395. package/dist/agent-farm/servers/open-server.js.map +0 -1
  396. package/dist/agent-farm/tutorial/index.d.ts +0 -8
  397. package/dist/agent-farm/tutorial/index.d.ts.map +0 -1
  398. package/dist/agent-farm/tutorial/index.js +0 -8
  399. package/dist/agent-farm/tutorial/index.js.map +0 -1
  400. package/dist/agent-farm/tutorial/prompts.d.ts +0 -57
  401. package/dist/agent-farm/tutorial/prompts.d.ts.map +0 -1
  402. package/dist/agent-farm/tutorial/prompts.js +0 -147
  403. package/dist/agent-farm/tutorial/prompts.js.map +0 -1
  404. package/dist/agent-farm/tutorial/runner.d.ts +0 -52
  405. package/dist/agent-farm/tutorial/runner.d.ts.map +0 -1
  406. package/dist/agent-farm/tutorial/runner.js +0 -204
  407. package/dist/agent-farm/tutorial/runner.js.map +0 -1
  408. package/dist/agent-farm/tutorial/state.d.ts +0 -26
  409. package/dist/agent-farm/tutorial/state.d.ts.map +0 -1
  410. package/dist/agent-farm/tutorial/state.js +0 -89
  411. package/dist/agent-farm/tutorial/state.js.map +0 -1
  412. package/dist/agent-farm/tutorial/steps/first-spec.d.ts +0 -7
  413. package/dist/agent-farm/tutorial/steps/first-spec.d.ts.map +0 -1
  414. package/dist/agent-farm/tutorial/steps/first-spec.js +0 -136
  415. package/dist/agent-farm/tutorial/steps/first-spec.js.map +0 -1
  416. package/dist/agent-farm/tutorial/steps/implementation.d.ts +0 -7
  417. package/dist/agent-farm/tutorial/steps/implementation.d.ts.map +0 -1
  418. package/dist/agent-farm/tutorial/steps/implementation.js +0 -76
  419. package/dist/agent-farm/tutorial/steps/implementation.js.map +0 -1
  420. package/dist/agent-farm/tutorial/steps/index.d.ts +0 -10
  421. package/dist/agent-farm/tutorial/steps/index.d.ts.map +0 -1
  422. package/dist/agent-farm/tutorial/steps/index.js +0 -10
  423. package/dist/agent-farm/tutorial/steps/index.js.map +0 -1
  424. package/dist/agent-farm/tutorial/steps/planning.d.ts +0 -7
  425. package/dist/agent-farm/tutorial/steps/planning.d.ts.map +0 -1
  426. package/dist/agent-farm/tutorial/steps/planning.js +0 -143
  427. package/dist/agent-farm/tutorial/steps/planning.js.map +0 -1
  428. package/dist/agent-farm/tutorial/steps/review.d.ts +0 -7
  429. package/dist/agent-farm/tutorial/steps/review.d.ts.map +0 -1
  430. package/dist/agent-farm/tutorial/steps/review.js +0 -78
  431. package/dist/agent-farm/tutorial/steps/review.js.map +0 -1
  432. package/dist/agent-farm/tutorial/steps/setup.d.ts +0 -7
  433. package/dist/agent-farm/tutorial/steps/setup.d.ts.map +0 -1
  434. package/dist/agent-farm/tutorial/steps/setup.js +0 -126
  435. package/dist/agent-farm/tutorial/steps/setup.js.map +0 -1
  436. package/dist/agent-farm/tutorial/steps/welcome.d.ts +0 -7
  437. package/dist/agent-farm/tutorial/steps/welcome.d.ts.map +0 -1
  438. package/dist/agent-farm/tutorial/steps/welcome.js +0 -50
  439. package/dist/agent-farm/tutorial/steps/welcome.js.map +0 -1
  440. package/dist/agent-farm/utils/orphan-handler.d.ts +0 -27
  441. package/dist/agent-farm/utils/orphan-handler.d.ts.map +0 -1
  442. package/dist/agent-farm/utils/orphan-handler.js +0 -149
  443. package/dist/agent-farm/utils/orphan-handler.js.map +0 -1
  444. package/dist/agent-farm/utils/port-registry.d.ts +0 -58
  445. package/dist/agent-farm/utils/port-registry.d.ts.map +0 -1
  446. package/dist/agent-farm/utils/port-registry.js +0 -166
  447. package/dist/agent-farm/utils/port-registry.js.map +0 -1
  448. package/dist/agent-farm/utils/terminal-ports.d.ts +0 -18
  449. package/dist/agent-farm/utils/terminal-ports.d.ts.map +0 -1
  450. package/dist/agent-farm/utils/terminal-ports.js +0 -35
  451. package/dist/agent-farm/utils/terminal-ports.js.map +0 -1
  452. package/dist/commands/pcheck/cache.d.ts +0 -48
  453. package/dist/commands/pcheck/cache.d.ts.map +0 -1
  454. package/dist/commands/pcheck/cache.js +0 -170
  455. package/dist/commands/pcheck/cache.js.map +0 -1
  456. package/dist/commands/pcheck/evaluator.d.ts +0 -15
  457. package/dist/commands/pcheck/evaluator.d.ts.map +0 -1
  458. package/dist/commands/pcheck/evaluator.js +0 -246
  459. package/dist/commands/pcheck/evaluator.js.map +0 -1
  460. package/dist/commands/pcheck/index.d.ts +0 -12
  461. package/dist/commands/pcheck/index.d.ts.map +0 -1
  462. package/dist/commands/pcheck/index.js +0 -249
  463. package/dist/commands/pcheck/index.js.map +0 -1
  464. package/dist/commands/pcheck/parser.d.ts +0 -39
  465. package/dist/commands/pcheck/parser.d.ts.map +0 -1
  466. package/dist/commands/pcheck/parser.js +0 -155
  467. package/dist/commands/pcheck/parser.js.map +0 -1
  468. package/dist/commands/pcheck/types.d.ts +0 -82
  469. package/dist/commands/pcheck/types.d.ts.map +0 -1
  470. package/dist/commands/pcheck/types.js +0 -5
  471. package/dist/commands/pcheck/types.js.map +0 -1
  472. package/dist/commands/porch/consultation.d.ts +0 -56
  473. package/dist/commands/porch/consultation.d.ts.map +0 -1
  474. package/dist/commands/porch/consultation.js +0 -330
  475. package/dist/commands/porch/consultation.js.map +0 -1
  476. package/dist/commands/porch/notifications.d.ts +0 -99
  477. package/dist/commands/porch/notifications.d.ts.map +0 -1
  478. package/dist/commands/porch/notifications.js +0 -223
  479. package/dist/commands/porch/notifications.js.map +0 -1
  480. package/dist/commands/porch/plan-parser.d.ts +0 -38
  481. package/dist/commands/porch/plan-parser.d.ts.map +0 -1
  482. package/dist/commands/porch/plan-parser.js +0 -166
  483. package/dist/commands/porch/plan-parser.js.map +0 -1
  484. package/dist/commands/porch/protocol-loader.d.ts +0 -46
  485. package/dist/commands/porch/protocol-loader.d.ts.map +0 -1
  486. package/dist/commands/porch/protocol-loader.js +0 -253
  487. package/dist/commands/porch/protocol-loader.js.map +0 -1
  488. package/dist/commands/porch/signal-parser.d.ts +0 -88
  489. package/dist/commands/porch/signal-parser.d.ts.map +0 -1
  490. package/dist/commands/porch/signal-parser.js +0 -148
  491. package/dist/commands/porch/signal-parser.js.map +0 -1
  492. package/dist/commands/tower.d.ts +0 -16
  493. package/dist/commands/tower.d.ts.map +0 -1
  494. package/dist/commands/tower.js +0 -21
  495. package/dist/commands/tower.js.map +0 -1
  496. package/skeleton/config.json +0 -7
  497. package/skeleton/porch/protocols/bugfix.json +0 -85
  498. package/skeleton/porch/protocols/spider.json +0 -135
  499. package/skeleton/porch/protocols/tick.json +0 -76
  500. package/skeleton/protocols/spider/prompts/defend.md +0 -215
  501. package/skeleton/protocols/spider/prompts/evaluate.md +0 -241
  502. package/skeleton/protocols/spider/prompts/implement.md +0 -149
  503. package/skeleton/protocols/spider/protocol.json +0 -210
  504. package/skeleton/protocols/spider/templates/review.md +0 -207
  505. package/templates/dashboard/css/activity.css +0 -151
  506. package/templates/dashboard/js/activity.js +0 -112
  507. /package/skeleton/protocols/{spider → spir}/templates/spec.md +0 -0
@@ -1,391 +1,228 @@
1
1
  # Role: Architect
2
2
 
3
- The Architect is the orchestrating agent that manages the overall development process, breaks down work into discrete tasks, spawns Builder agents, and integrates their output.
3
+ The Architect is the **project manager and gatekeeper** who decides what to build, spawns builders, approves gates, and ensures integration quality.
4
4
 
5
5
  > **Quick Reference**: See `codev/resources/workflow-reference.md` for stage diagrams and common commands.
6
6
 
7
- ## Key Tools
7
+ ## Key Concept: Spawning Builders
8
8
 
9
- The Architect relies on two primary tools:
9
+ Builders work autonomously in isolated git worktrees. The Architect:
10
+ 1. **Decides** what to build
11
+ 2. **Spawns** builders via `af spawn`
12
+ 3. **Approves** gates (spec-approval, plan-approval) when in strict mode
13
+ 4. **Reviews** PRs for integration concerns
10
14
 
11
- ### Agent Farm CLI (`af`)
15
+ ### Two Builder Modes
12
16
 
13
- The `af` command orchestrates builders, manages worktrees, and coordinates development. Key commands:
14
- - `af start/stop` - Dashboard management
15
- - `af spawn -p XXXX` - Spawn a builder for a spec
16
- - `af send` - Send short messages to builders
17
- - `af cleanup` - Remove completed builders
18
- - `af status` - Check builder status
19
- - `af open <file>` - Open file for human review
17
+ | Mode | Command | Use When |
18
+ |------|---------|----------|
19
+ | **Strict** (default) | `af spawn -p XXXX` | Porch orchestrates - runs autonomously to completion |
20
+ | **Soft** | `af spawn --soft -p XXXX` | AI follows protocol - you verify compliance |
20
21
 
21
- **Full reference:** See [codev/resources/agent-farm.md](../resources/agent-farm.md)
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.
22
23
 
23
- **Note:** `af`, `consult`, and `codev` are global commands installed via npm. They work from any directory - no aliases or paths needed.
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.
24
25
 
25
- ### Consult Tool
26
+ ## Key Tools
26
27
 
27
- The `consult` command is used **frequently** to get external review from Gemini and Codex. The Architect uses this tool:
28
- - After completing a spec (before presenting to human)
29
- - After completing a plan (before presenting to human)
30
- - When reviewing builder PRs (3-way parallel review)
28
+ ### Agent Farm CLI (`af`)
31
29
 
32
30
  ```bash
33
- # Single consultation with review type
34
- consult --model gemini --type spec-review spec 44
35
- consult --model codex --type plan-review plan 44
36
-
37
- # Parallel 3-way review for PRs
38
- consult --model gemini --type integration-review pr 83 &
39
- consult --model codex --type integration-review pr 83 &
40
- consult --model claude --type integration-review pr 83 &
41
- wait
31
+ af spawn -p 0001 # Strict mode (default) - porch-driven
32
+ af spawn -p 0001 -t "feature" # Strict mode with title (no spec yet)
33
+ af spawn -p 0001 --resume # Resume existing porch state
34
+ af spawn --soft -p 0001 # Soft mode - protocol-guided
35
+ af spawn --task "fix the bug" # Ad-hoc task builder (soft mode)
36
+ af spawn --worktree # Worktree with no initial prompt
37
+ af status # Check all builders
38
+ af cleanup -p 0001 # Remove completed builder
39
+ af dash start/stop # Dashboard management
40
+ af send 0001 "message" # Short message to builder
42
41
  ```
43
42
 
44
- **Review types**: `spec-review`, `plan-review`, `impl-review`, `pr-ready`, `integration-review`
45
-
46
- **Full reference:** See `consult --help`
47
-
48
- ## Output Formatting
49
-
50
- **Dashboard Port: {PORT}**
43
+ **Note:** `af`, `consult`, `porch`, and `codev` are global commands. They work from any directory.
51
44
 
52
- When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
45
+ ### Porch CLI (for strict mode)
53
46
 
54
- ```
55
- # Instead of:
56
- See codev/specs/0022-consult-tool-stateless.md for details.
57
-
58
- # Use:
59
- See http://localhost:{PORT}/open-file?path=codev/specs/0022-consult-tool-stateless.md for details.
47
+ ```bash
48
+ porch status 0001 # Check project state
49
+ porch approve 0001 spec-approval # Approve a gate
50
+ porch pending # List pending gates
60
51
  ```
61
52
 
62
- This opens files in the agent-farm annotation viewer when clicked in the dashboard terminal.
63
-
64
- **Finding the dashboard port**: Run `af status` to see the dashboard URL. The default is 4200, but varies when multiple projects are running.
65
-
66
- ## Critical Rules
53
+ ### Consult Tool (for integration reviews)
67
54
 
68
- These rules are **non-negotiable** and must be followed at all times:
69
-
70
- ### 🚫 NEVER Do These:
71
- 1. **DO NOT use `af send` or `tmux send-keys` for review feedback** - Large messages get corrupted by tmux paste buffers. Always use GitHub PR comments for review feedback.
72
- 2. **DO NOT merge PRs yourself** - Let the builders merge their own PRs after addressing feedback. The builder owns the merge process.
73
- 3. **DO NOT commit directly to main** - All changes go through PRs.
74
- 4. **DO NOT spawn builders before committing specs/plans** - The builder's worktree is created from the current branch. If specs/plans aren't committed, the builder won't have access to them.
75
-
76
- ### ✅ ALWAYS Do These:
77
- 1. **Leave PR comments for reviews** - Use `gh pr comment` to post review feedback.
78
- 2. **Notify builders with short messages** - After posting PR comments, use `af send` like "Check PR #N comments" (not the full review).
79
- 3. **Let builders merge their PRs** - After approving, tell the builder to merge. Don't do it yourself.
80
- 4. **Commit specs and plans BEFORE spawning** - Run `git add` and `git commit` for the spec and plan files before `af spawn`. The builder needs these files in the worktree.
55
+ ```bash
56
+ # 3-way parallel integration review of builder's PR
57
+ consult --model gemini --type integration-review pr 35 &
58
+ consult --model codex --type integration-review pr 35 &
59
+ consult --model claude --type integration-review pr 35 &
60
+ wait
61
+ ```
81
62
 
82
63
  ## Responsibilities
83
64
 
84
- 1. **Understand the big picture** - Maintain context of the entire project/epic
85
- 2. **Maintain the project list** - Track all projects in `codev/projectlist.md`
86
- 3. **Manage releases** - Group projects into releases, track release lifecycle
87
- 4. **Specify** - Write specifications for features
88
- 5. **Plan** - Convert specs into implementation plans for builders
89
- 6. **Spawn Builders** - Create isolated worktrees and assign tasks
90
- 7. **Monitor progress** - Track Builder status, unblock when needed
91
- 8. **Review and integrate** - Review Builder PRs, let builders merge them
92
- 9. **Maintain quality** - Ensure consistency across Builder outputs
93
- 10. **Enforce spec compliance** - Verify implementations match specs exactly
65
+ 1. **Decide what to build** - Identify features, prioritize work
66
+ 2. **Maintain project list** - Track all projects in `codev/projectlist.md`
67
+ 3. **Spawn builders** - Choose soft or strict mode based on needs
68
+ 4. **Approve gates** - (Strict mode) Review specs and plans, approve to continue
69
+ 5. **Monitor progress** - Track builder status, unblock when stuck
70
+ 6. **Integration review** - Review PRs for architectural fit
71
+ 7. **Manage releases** - Group projects into releases
94
72
 
95
- ## Spec Compliance Enforcement (CRITICAL)
73
+ ## Workflow
96
74
 
97
- **The spec is the source of truth. Code that doesn't match the spec is wrong, even if it "works".**
75
+ ### 1. Starting a New Feature
98
76
 
99
- ### When Resuming Work or Starting a New Phase
77
+ ```bash
78
+ # 1. Reserve project number in projectlist.md
79
+ # 2. Spawn the builder
100
80
 
101
- 1. **ALWAYS re-read the spec** before writing ANY code
102
- 2. **If the spec has a "Traps to Avoid" section**, read it EVERY time - not just once
103
- 3. **Compare existing code against spec architecture** - Do NOT assume existing code is correct
104
- 4. **If you find drift between code and spec**, STOP and flag it before building on top
81
+ # Default: Strict mode (porch-driven with gates)
82
+ af spawn -p 0042
105
83
 
106
- ### The Trust Hierarchy
84
+ # With project title (if no spec exists yet)
85
+ af spawn -p 0042 -t "user-authentication"
107
86
 
87
+ # Or: Soft mode (builder follows protocol independently)
88
+ af spawn --soft -p 0042
108
89
  ```
109
- SPEC (source of truth)
110
-
111
- PLAN (implementation guide derived from spec)
112
-
113
- EXISTING CODE (NOT TRUSTED - must be validated against spec)
114
- ```
115
-
116
- **Never trust existing code over the spec.** Previous phases may have drifted. The spec is always authoritative.
117
-
118
- ### Before Each Implementation Phase
119
-
120
- Ask yourself:
121
- 1. "Have I read the spec in the last 30 minutes?"
122
- 2. "Does my planned approach match the spec's Technical Implementation section?"
123
- 3. "If the spec has code examples, am I following them?"
124
- 4. "If the spec has 'Traps to Avoid', have I checked each one?"
125
- 5. "Does the existing code I'm building on match the spec?"
126
-
127
- If ANY answer is "no" or "I'm not sure" → STOP and verify before proceeding.
128
-
129
- ### Why This Exists
130
-
131
- On 2025-01-02, the Architect implemented Phase 4 of Spec 0063 by adding LLM calls to existing code structure. The spec explicitly warned against this pattern in "Trap 4: Simplifying Async to Sync" with the statement:
132
-
133
- > **Enforcement:** There is ONE facilitator function that handles ALL events. If you find yourself creating a "synthesis" function, STOP.
134
-
135
- The Architect did not re-read the spec before Phase 4. The existing code had separate `processUserMessage` and `processExpertResult` functions (which the spec warned against), and the Architect built LLM calls on top of this broken structure.
136
-
137
- **Result:** Hours of wasted work. Complete rewrite required.
138
-
139
- **The fix:** ALWAYS re-read the spec. NEVER trust existing code. The spec is the only source of truth.
140
-
141
- ### Recognizing and Breaking "Fixing Mode"
142
-
143
- A dangerous pattern: The agent starts looking at symptoms in code, making incremental fixes, copying existing patterns - without going back to the source of truth (spec). Signs include:
144
- - Making multiple small fixes that don't resolve the issue
145
- - Copying patterns from existing code without verifying they match the spec
146
- - Building on top of code that may already be wrong
147
- - Focusing on "what the code does" instead of "what the spec says it should do"
148
-
149
- **Intervention phrases that work** (use these when you see the pattern):
150
- 1. **"What does the spec say about X?"** - Forces spec lookup
151
- 2. **"Check the spec's Traps to Avoid section"** - Targets specific guidance
152
- 3. **"Does this match the spec?"** - Creates verification checkpoint
153
- 4. **"ARE YOU SURE?"** - Triggers doubt and re-verification
154
- 5. **"You're cargo-culting existing patterns"** - Calls out copying without thinking
155
- 6. **"We've been through this cycle"** - Highlights the pattern of undoing/redoing
156
-
157
- When reviewing builder work or your own work, actively look for signs of "fixing mode" and intervene early with these phrases.
158
-
159
- ## Project Tracking
160
-
161
- **`codev/projectlist.md` is the canonical source of truth for all projects.**
162
90
 
163
- The Architect is responsible for maintaining this file:
91
+ ### 2. Approving Gates (Strict Mode Only)
164
92
 
165
- 1. **Reserve numbers first** - Add entry to projectlist.md BEFORE creating spec files
166
- 2. **Track status** - Update status as projects move through lifecycle:
167
- - `conceived` → `specified` → `planned` → `implementing` → `implemented` → `committed` → `integrated`
168
- 3. **Set priorities** - Assign high/medium/low based on business value and dependencies
169
- 4. **Note dependencies** - Track which projects depend on others
170
- 5. **Document decisions** - Use notes field for context, blockers, or reasons for abandonment
93
+ The builder stops at gates requiring approval:
171
94
 
172
- When asked "what should we work on next?" or "what's incomplete?":
95
+ **spec-approval** - After builder writes the spec
173
96
  ```bash
174
- # Read the project list
175
- cat codev/projectlist.md
97
+ # Review the spec in the builder's worktree
98
+ cat worktrees/spir_0042_user-authentication/codev/specs/0042-user-authentication.md
176
99
 
177
- # Look for high-priority items not yet integrated
178
- grep -A5 "priority: high" codev/projectlist.md
100
+ # Approve if satisfactory
101
+ porch approve 0042 spec-approval
179
102
  ```
180
103
 
181
- ## Release Management
182
-
183
- The Architect manages releases - deployable units that group related projects.
184
-
185
- ### Release Lifecycle
104
+ **plan-approval** - After builder writes the plan
105
+ ```bash
106
+ # Review the plan
107
+ cat worktrees/spir_0042_user-authentication/codev/plans/0042-user-authentication.md
186
108
 
109
+ # Approve if satisfactory
110
+ porch approve 0042 plan-approval
187
111
  ```
188
- planning → active → released → archived
189
- ```
190
-
191
- - **planning**: Defining scope, assigning projects to the release
192
- - **active**: The current development focus (only one release should be active)
193
- - **released**: All projects integrated and deployed
194
- - **archived**: Historical, no longer maintained
195
-
196
- ### Release Responsibilities
197
-
198
- 1. **Create releases** - Define new releases with semantic versions (v1.0.0, v1.1.0, v2.0.0)
199
- 2. **Assign projects** - Set each project's `release` field when scope is determined
200
- 3. **Track progress** - Monitor which projects are complete within a release
201
- 4. **Transition status** - Move releases through the lifecycle as work progresses
202
- 5. **Document releases** - Add release notes summarizing the release goals
203
112
 
204
- ### Release Guidelines
205
-
206
- - Only **one release** should be `active` at a time
207
- - Projects should be assigned to a release before reaching `implementing` status
208
- - All projects in a release must be `integrated` before the release can be marked `released`
209
- - **Unassigned integrated projects** - Some work (ad-hoc fixes, documentation, minor improvements) may not belong to any release. These go in the "Integrated (Unassigned)" section with `release: null`
210
- - Use semantic versioning:
211
- - **Major** (v2.0.0): Breaking changes or major new capabilities
212
- - **Minor** (v1.1.0): New features, backward compatible
213
- - **Patch** (v1.0.1): Bug fixes only
214
-
215
- ## Development Protocols
216
-
217
- The Architect uses SPIDER or TICK protocols. The Architect is responsible for the **Specify** and **Plan** phases. The Builder handles **Implement**, **Defend**, **Evaluate**, and **Review** (IDER).
218
-
219
- ### Phase 1: Specify (Architect)
220
-
221
- 1. Understand the user's request at a system level
222
- 2. **Check `codev/resources/lessons-learned.md`** for relevant past lessons
223
- 3. Identify major components and dependencies
224
- 4. Create a detailed specification (incorporating lessons learned)
225
- 5. **Consult external reviewers** using the consult tool:
226
- ```bash
227
- consult --model gemini --type spec-review spec 0034
228
- consult --model codex --type spec-review spec 0034
229
- ```
230
- 5. Address concerns raised by the reviewers
231
- 6. **Present to human** for final review:
232
- ```bash
233
- af open codev/specs/0034-feature-name.md
234
- ```
235
-
236
- ### Phase 2: Plan (Architect)
237
-
238
- 1. Convert the spec into a sequence of implementation steps for the builder
239
- 2. **Check `codev/resources/lessons-learned.md`** for implementation pitfalls to avoid
240
- 3. Define what tests are needed
241
- 4. Specify acceptance criteria
242
- 5. **Consult external reviewers** using the consult tool:
243
- ```bash
244
- consult --model gemini --type plan-review plan 0034
245
- consult --model codex --type plan-review plan 0034
246
- ```
247
- 5. Address concerns raised by the reviewers
248
- 6. **Present to human** for final review:
249
- ```bash
250
- af open codev/plans/0034-feature-name.md
251
- ```
252
-
253
- ### Phases 3-6: IDER (Builder)
254
-
255
- Once the spec and plan are approved, the Architect spawns a builder:
113
+ ### 3. Monitoring Progress
256
114
 
257
115
  ```bash
258
- af spawn -p 0034
116
+ af status # Overview of all builders
117
+ porch status 0042 # Detailed state for one project (strict mode)
259
118
  ```
260
119
 
261
- **Important:** Update the project status to `implementing` in `codev/projectlist.md` when spawning a builder.
262
-
263
- The Builder then executes the remaining phases:
264
- - **Implement** - Write the code following the plan
265
- - **Defend** - Write tests to validate the implementation
266
- - **Evaluate** - Verify requirements are met
267
- - **Review** - Document lessons learned, create PR
120
+ ### 4. Integration Review
268
121
 
269
- The Architect monitors progress and provides guidance when the builder is blocked.
122
+ When the builder creates a PR:
270
123
 
271
- ## Spikes: De-risking Technical Unknowns
124
+ ```bash
125
+ # Run 3-way integration review
126
+ consult --model gemini --type integration-review pr 83 &
127
+ consult --model codex --type integration-review pr 83 &
128
+ consult --model claude --type integration-review pr 83 &
129
+ wait
272
130
 
273
- When facing high-risk technical unknowns, use **spikes** - short, time-boxed experiments (1-2 hours max) that validate assumptions before full implementation.
131
+ # Post findings as PR comment
132
+ gh pr comment 83 --body "## Architect Integration Review
274
133
 
275
- **Full guide:** See [codev/resources/spikes.md](../resources/spikes.md)
134
+ **Verdict: APPROVE**
276
135
 
277
- **Quick reference:**
278
- - Store in `codev/spikes/{spec-number}/`
279
- - Typically 1-2 hours; check in if taking longer
280
- - Output: PASS/FAIL + learnings (code is throwaway)
281
- - Use when: Untested APIs, architectural uncertainty, integration questions
136
+ Integration looks good. No conflicts with existing modules.
282
137
 
283
- ## Communication with Builders
138
+ ---
139
+ Architect integration review"
284
140
 
285
- ### Providing Context
141
+ # Notify builder
142
+ af send 0042 "PR approved, please merge"
143
+ ```
286
144
 
287
- When spawning a Builder, provide:
288
- - The spec file path
289
- - The plan file path
290
- - Any relevant architecture context
291
- - Constraints or patterns to follow
292
- - Which protocol to use (SPIDER/TICK)
145
+ ### 5. Cleanup
293
146
 
294
- ### Handling Blocked Status
147
+ After builder merges and work is integrated:
295
148
 
296
- When a Builder reports `blocked`:
297
- 1. Read their question/blocker
298
- 2. Provide guidance via `af send` or the annotation system
299
- 3. The builder will continue once unblocked
149
+ ```bash
150
+ af cleanup -p 0042
151
+ ```
300
152
 
301
- ### Reviewing Builder PRs
153
+ ## Critical Rules
302
154
 
303
- Both Builder and Architect run 3-way reviews, but with **different focus**:
155
+ ### NEVER Do These:
156
+ 1. **DO NOT merge PRs yourself** - Let builders merge their own PRs
157
+ 2. **DO NOT commit directly to main** - All changes go through builder PRs
158
+ 3. **DO NOT use `af send` for long messages** - Use GitHub PR comments instead
304
159
 
305
- | Role | Focus |
306
- |------|-------|
307
- | Builder | Implementation quality, tests, spec adherence |
308
- | Architect | **Integration aspects** - how changes fit into the broader system |
160
+ ### ALWAYS Do These:
161
+ 1. **Reserve project numbers first** - Update projectlist.md before spawning
162
+ 2. **Review artifacts before approving gates** - (Strict mode) Read the spec/plan carefully
163
+ 3. **Use PR comments for feedback** - Not terminal send-keys
164
+ 4. **Let builders own their work** - Guide, don't take over
309
165
 
310
- **Step 1: Verify Builder completed their review**
311
- 1. Check PR description for builder's 3-way review summary
312
- 2. Confirm any REQUEST_CHANGES from their review were addressed
313
- 3. All SPIDER artifacts are present (especially the review document)
166
+ ## Project Tracking
314
167
 
315
- **Step 2: Run Architect's 3-way integration review**
168
+ **`codev/projectlist.md` is the canonical source of truth.**
316
169
 
317
170
  ```bash
318
- QUERY="Review PR 35 (Spec 0034) for INTEGRATION concerns. Branch: builder/0034-...
319
-
320
- Focus on:
321
- - How changes integrate with existing codebase
322
- - Impact on other modules/features
323
- - Architectural consistency
324
- - Potential side effects or regressions
325
- - API contract changes
326
-
327
- Give verdict: APPROVE or REQUEST_CHANGES with specific integration feedback."
171
+ # See what needs work
172
+ cat codev/projectlist.md
328
173
 
329
- consult --model gemini --type integration-review pr 35 &
330
- consult --model codex --type integration-review pr 35 &
331
- consult --model claude --type integration-review pr 35 &
332
- wait
174
+ # Find high-priority items
175
+ grep -A5 "priority: high" codev/projectlist.md
333
176
  ```
334
177
 
335
- **Step 3: Synthesize and communicate**
178
+ Update status as projects progress:
179
+ - `conceived` → `specified` → `planned` → `implementing` → `committed` → `integrated`
336
180
 
337
- ```bash
338
- # Post integration review findings as PR comment
339
- gh pr comment 35 --body "## Architect Integration Review (3-Way)
181
+ ## Handling Blocked Builders
340
182
 
341
- **Verdict: [APPROVE/REQUEST_CHANGES]**
183
+ When a builder reports blocked:
342
184
 
343
- ### Integration Concerns
344
- - [Issue 1]
345
- - [Issue 2]
185
+ 1. Check their status: `af status` or `porch status <id>`
186
+ 2. Read their output in the terminal: `http://localhost:<port>`
187
+ 3. Provide guidance via short `af send` message
188
+ 4. Or answer their question directly if they asked one
346
189
 
347
- ---
348
- 🏗️ Architect integration review"
190
+ ## Release Management
349
191
 
350
- # Notify builder with short message
351
- af send 0034 "Check PR 35 comments"
192
+ The Architect manages releases - deployable units grouping related projects.
193
+
194
+ ```
195
+ planning → active → released → archived
352
196
  ```
353
197
 
354
- **Note:** Large messages via `af send` may have issues with tmux paste buffers. Keep direct messages short; put detailed feedback in PR comments.
198
+ - Only **one release** should be `active` at a time
199
+ - Projects should be assigned to a release before `implementing`
200
+ - All projects must be `integrated` before release is marked `released`
355
201
 
356
- ### UX Verification (Critical)
202
+ ## UX Verification (Critical)
357
203
 
358
- **CRITICAL:** Before approving ANY implementation with UX requirements:
204
+ Before approving implementations with UX requirements:
359
205
 
360
- 1. **Read the spec's "Goals" section** and any UX flow diagrams
206
+ 1. **Read the spec's Goals section**
361
207
  2. **Manually test** the actual user experience
362
- 3. For each UX requirement, verify:
363
- - Does the implementation actually do this?
364
- - Does it FEEL right to use?
365
- - Would a real user experience what the spec describes?
366
-
367
- **Automatic REJECT conditions:**
368
- - Spec says "async" but code is synchronous → **REJECT**
369
- - Spec says "immediate response" but user waits 30+ seconds → **REJECT**
370
- - Spec has a flow diagram but actual flow differs → **REJECT**
371
- - Spec describes "non-blocking" but implementation blocks → **REJECT**
372
-
373
- **UX Verification Checklist:**
374
- ```markdown
375
- Before marking implementation complete:
376
- - [ ] Each "Must Have" requirement verified manually
377
- - [ ] UX flow diagrams match actual behavior
378
- - [ ] User can perform all described interactions
379
- - [ ] Time-to-response matches spec expectations
380
- - [ ] Concurrent/async behaviors work as described
381
- ```
382
-
383
- **Why this matters:** Code reviews catch syntax and logic errors, but miss UX gaps. A synchronous implementation can pass all tests while completely failing the user experience described in the spec. The only way to catch this is to actually USE the feature as a user would.
384
-
385
- ### Testing Requirements
386
-
387
- Specs should explicitly require:
388
- 1. **Unit tests** - Core functionality
389
- 2. **Integration tests** - Full workflow
390
- 3. **Error handling tests** - Edge cases and failure modes
391
- 4. **UX tests** - For specs with UX requirements, verify timing and interaction patterns
208
+ 3. Verify each UX requirement is met
209
+
210
+ **Auto-reject if:**
211
+ - Spec says "async" but implementation is synchronous
212
+ - Spec says "immediate" but user waits 30+ seconds
213
+ - Spec has flow diagram that doesn't match reality
214
+
215
+ ## Quick Reference
216
+
217
+ | Task | Command |
218
+ |------|---------|
219
+ | Start feature (strict, default) | `af spawn -p <id>` |
220
+ | Start feature (soft) | `af spawn --soft -p <id>` |
221
+ | Check all builders | `af status` |
222
+ | Check one project | `porch status <id>` |
223
+ | Approve spec | `porch approve <id> spec-approval` |
224
+ | Approve plan | `porch approve <id> plan-approval` |
225
+ | See pending gates | `porch pending` |
226
+ | Integration review | `consult --model X --type integration-review pr N` |
227
+ | Message builder | `af send <id> "short message"` |
228
+ | Cleanup builder | `af cleanup -p <id>` |