@cluesmith/codev 2.0.0-rc.7 → 2.0.0-rc.71

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 (456) 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-C7FtNK6Y.css +32 -0
  5. package/dashboard/dist/assets/index-CDAINZKT.js +131 -0
  6. package/dashboard/dist/assets/index-CDAINZKT.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 +173 -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 +60 -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.d.ts.map +1 -1
  43. package/dist/agent-farm/commands/spawn.js +597 -281
  44. package/dist/agent-farm/commands/spawn.js.map +1 -1
  45. package/dist/agent-farm/commands/start.d.ts +10 -20
  46. package/dist/agent-farm/commands/start.d.ts.map +1 -1
  47. package/dist/agent-farm/commands/start.js +45 -491
  48. package/dist/agent-farm/commands/start.js.map +1 -1
  49. package/dist/agent-farm/commands/status.d.ts +2 -0
  50. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  51. package/dist/agent-farm/commands/status.js +75 -24
  52. package/dist/agent-farm/commands/status.js.map +1 -1
  53. package/dist/agent-farm/commands/stop.d.ts +6 -0
  54. package/dist/agent-farm/commands/stop.d.ts.map +1 -1
  55. package/dist/agent-farm/commands/stop.js +49 -109
  56. package/dist/agent-farm/commands/stop.js.map +1 -1
  57. package/dist/agent-farm/commands/tower-cloud.d.ts +48 -0
  58. package/dist/agent-farm/commands/tower-cloud.d.ts.map +1 -0
  59. package/dist/agent-farm/commands/tower-cloud.js +329 -0
  60. package/dist/agent-farm/commands/tower-cloud.js.map +1 -0
  61. package/dist/agent-farm/commands/tower.d.ts +9 -0
  62. package/dist/agent-farm/commands/tower.d.ts.map +1 -1
  63. package/dist/agent-farm/commands/tower.js +59 -19
  64. package/dist/agent-farm/commands/tower.js.map +1 -1
  65. package/dist/agent-farm/db/index.d.ts +6 -2
  66. package/dist/agent-farm/db/index.d.ts.map +1 -1
  67. package/dist/agent-farm/db/index.js +246 -18
  68. package/dist/agent-farm/db/index.js.map +1 -1
  69. package/dist/agent-farm/db/migrate.d.ts +0 -4
  70. package/dist/agent-farm/db/migrate.d.ts.map +1 -1
  71. package/dist/agent-farm/db/migrate.js +6 -55
  72. package/dist/agent-farm/db/migrate.js.map +1 -1
  73. package/dist/agent-farm/db/schema.d.ts +3 -3
  74. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  75. package/dist/agent-farm/db/schema.js +25 -19
  76. package/dist/agent-farm/db/schema.js.map +1 -1
  77. package/dist/agent-farm/db/types.d.ts +3 -13
  78. package/dist/agent-farm/db/types.d.ts.map +1 -1
  79. package/dist/agent-farm/db/types.js +3 -11
  80. package/dist/agent-farm/db/types.js.map +1 -1
  81. package/dist/agent-farm/hq-connector.d.ts +2 -6
  82. package/dist/agent-farm/hq-connector.d.ts.map +1 -1
  83. package/dist/agent-farm/hq-connector.js +2 -17
  84. package/dist/agent-farm/hq-connector.js.map +1 -1
  85. package/dist/agent-farm/lib/cloud-config.d.ts +59 -0
  86. package/dist/agent-farm/lib/cloud-config.d.ts.map +1 -0
  87. package/dist/agent-farm/lib/cloud-config.js +143 -0
  88. package/dist/agent-farm/lib/cloud-config.js.map +1 -0
  89. package/dist/agent-farm/lib/tower-client.d.ts +163 -0
  90. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -0
  91. package/dist/agent-farm/lib/tower-client.js +233 -0
  92. package/dist/agent-farm/lib/tower-client.js.map +1 -0
  93. package/dist/agent-farm/lib/tunnel-client.d.ts +117 -0
  94. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -0
  95. package/dist/agent-farm/lib/tunnel-client.js +504 -0
  96. package/dist/agent-farm/lib/tunnel-client.js.map +1 -0
  97. package/dist/agent-farm/servers/tower-server.js +2653 -185
  98. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  99. package/dist/agent-farm/state.d.ts +6 -12
  100. package/dist/agent-farm/state.d.ts.map +1 -1
  101. package/dist/agent-farm/state.js +34 -49
  102. package/dist/agent-farm/state.js.map +1 -1
  103. package/dist/agent-farm/types.d.ts +49 -26
  104. package/dist/agent-farm/types.d.ts.map +1 -1
  105. package/dist/agent-farm/utils/config.d.ts +0 -5
  106. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  107. package/dist/agent-farm/utils/config.js +12 -44
  108. package/dist/agent-farm/utils/config.js.map +1 -1
  109. package/dist/agent-farm/utils/deps.d.ts.map +1 -1
  110. package/dist/agent-farm/utils/deps.js +0 -32
  111. package/dist/agent-farm/utils/deps.js.map +1 -1
  112. package/dist/agent-farm/utils/file-tabs.d.ts +27 -0
  113. package/dist/agent-farm/utils/file-tabs.d.ts.map +1 -0
  114. package/dist/agent-farm/utils/file-tabs.js +46 -0
  115. package/dist/agent-farm/utils/file-tabs.js.map +1 -0
  116. package/dist/agent-farm/utils/gate-status.d.ts +16 -0
  117. package/dist/agent-farm/utils/gate-status.d.ts.map +1 -0
  118. package/dist/agent-farm/utils/gate-status.js +79 -0
  119. package/dist/agent-farm/utils/gate-status.js.map +1 -0
  120. package/dist/agent-farm/utils/gate-watcher.d.ts +38 -0
  121. package/dist/agent-farm/utils/gate-watcher.d.ts.map +1 -0
  122. package/dist/agent-farm/utils/gate-watcher.js +122 -0
  123. package/dist/agent-farm/utils/gate-watcher.js.map +1 -0
  124. package/dist/agent-farm/utils/index.d.ts +0 -1
  125. package/dist/agent-farm/utils/index.d.ts.map +1 -1
  126. package/dist/agent-farm/utils/index.js +0 -1
  127. package/dist/agent-farm/utils/index.js.map +1 -1
  128. package/dist/agent-farm/utils/notifications.d.ts +30 -0
  129. package/dist/agent-farm/utils/notifications.d.ts.map +1 -0
  130. package/dist/agent-farm/utils/notifications.js +121 -0
  131. package/dist/agent-farm/utils/notifications.js.map +1 -0
  132. package/dist/agent-farm/utils/server-utils.d.ts +5 -5
  133. package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
  134. package/dist/agent-farm/utils/server-utils.js +5 -16
  135. package/dist/agent-farm/utils/server-utils.js.map +1 -1
  136. package/dist/agent-farm/utils/session.d.ts +32 -0
  137. package/dist/agent-farm/utils/session.d.ts.map +1 -0
  138. package/dist/agent-farm/utils/session.js +57 -0
  139. package/dist/agent-farm/utils/session.js.map +1 -0
  140. package/dist/agent-farm/utils/shell.d.ts +9 -22
  141. package/dist/agent-farm/utils/shell.d.ts.map +1 -1
  142. package/dist/agent-farm/utils/shell.js +34 -34
  143. package/dist/agent-farm/utils/shell.js.map +1 -1
  144. package/dist/cli.d.ts.map +1 -1
  145. package/dist/cli.js +11 -54
  146. package/dist/cli.js.map +1 -1
  147. package/dist/commands/adopt.d.ts.map +1 -1
  148. package/dist/commands/adopt.js +49 -4
  149. package/dist/commands/adopt.js.map +1 -1
  150. package/dist/commands/consult/index.d.ts +13 -2
  151. package/dist/commands/consult/index.d.ts.map +1 -1
  152. package/dist/commands/consult/index.js +245 -29
  153. package/dist/commands/consult/index.js.map +1 -1
  154. package/dist/commands/doctor.d.ts.map +1 -1
  155. package/dist/commands/doctor.js +96 -79
  156. package/dist/commands/doctor.js.map +1 -1
  157. package/dist/commands/init.d.ts.map +1 -1
  158. package/dist/commands/init.js +41 -2
  159. package/dist/commands/init.js.map +1 -1
  160. package/dist/commands/porch/build-counter.d.ts +5 -0
  161. package/dist/commands/porch/build-counter.d.ts.map +1 -0
  162. package/dist/commands/porch/build-counter.js +5 -0
  163. package/dist/commands/porch/build-counter.js.map +1 -0
  164. package/dist/commands/porch/checks.d.ts +17 -29
  165. package/dist/commands/porch/checks.d.ts.map +1 -1
  166. package/dist/commands/porch/checks.js +96 -144
  167. package/dist/commands/porch/checks.js.map +1 -1
  168. package/dist/commands/porch/index.d.ts +25 -43
  169. package/dist/commands/porch/index.d.ts.map +1 -1
  170. package/dist/commands/porch/index.js +463 -1116
  171. package/dist/commands/porch/index.js.map +1 -1
  172. package/dist/commands/porch/next.d.ts +22 -0
  173. package/dist/commands/porch/next.d.ts.map +1 -0
  174. package/dist/commands/porch/next.js +571 -0
  175. package/dist/commands/porch/next.js.map +1 -0
  176. package/dist/commands/porch/plan.d.ts +70 -0
  177. package/dist/commands/porch/plan.d.ts.map +1 -0
  178. package/dist/commands/porch/plan.js +190 -0
  179. package/dist/commands/porch/plan.js.map +1 -0
  180. package/dist/commands/porch/prompts.d.ts +19 -0
  181. package/dist/commands/porch/prompts.d.ts.map +1 -0
  182. package/dist/commands/porch/prompts.js +277 -0
  183. package/dist/commands/porch/prompts.js.map +1 -0
  184. package/dist/commands/porch/protocol.d.ts +59 -0
  185. package/dist/commands/porch/protocol.d.ts.map +1 -0
  186. package/dist/commands/porch/protocol.js +294 -0
  187. package/dist/commands/porch/protocol.js.map +1 -0
  188. package/dist/commands/porch/state.d.ts +36 -107
  189. package/dist/commands/porch/state.d.ts.map +1 -1
  190. package/dist/commands/porch/state.js +120 -699
  191. package/dist/commands/porch/state.js.map +1 -1
  192. package/dist/commands/porch/types.d.ts +99 -164
  193. package/dist/commands/porch/types.d.ts.map +1 -1
  194. package/dist/commands/porch/types.js +2 -1
  195. package/dist/commands/porch/types.js.map +1 -1
  196. package/dist/commands/porch/verdict.d.ts +31 -0
  197. package/dist/commands/porch/verdict.d.ts.map +1 -0
  198. package/dist/commands/porch/verdict.js +59 -0
  199. package/dist/commands/porch/verdict.js.map +1 -0
  200. package/dist/commands/update.d.ts.map +1 -1
  201. package/dist/commands/update.js +31 -0
  202. package/dist/commands/update.js.map +1 -1
  203. package/dist/lib/scaffold.d.ts +37 -0
  204. package/dist/lib/scaffold.d.ts.map +1 -1
  205. package/dist/lib/scaffold.js +114 -0
  206. package/dist/lib/scaffold.js.map +1 -1
  207. package/dist/terminal/index.d.ts +8 -0
  208. package/dist/terminal/index.d.ts.map +1 -0
  209. package/dist/terminal/index.js +5 -0
  210. package/dist/terminal/index.js.map +1 -0
  211. package/dist/terminal/pty-manager.d.ts +69 -0
  212. package/dist/terminal/pty-manager.d.ts.map +1 -0
  213. package/dist/terminal/pty-manager.js +377 -0
  214. package/dist/terminal/pty-manager.js.map +1 -0
  215. package/dist/terminal/pty-session.d.ts +104 -0
  216. package/dist/terminal/pty-session.d.ts.map +1 -0
  217. package/dist/terminal/pty-session.js +327 -0
  218. package/dist/terminal/pty-session.js.map +1 -0
  219. package/dist/terminal/ring-buffer.d.ts +34 -0
  220. package/dist/terminal/ring-buffer.d.ts.map +1 -0
  221. package/dist/terminal/ring-buffer.js +94 -0
  222. package/dist/terminal/ring-buffer.js.map +1 -0
  223. package/dist/terminal/session-manager.d.ts +115 -0
  224. package/dist/terminal/session-manager.d.ts.map +1 -0
  225. package/dist/terminal/session-manager.js +582 -0
  226. package/dist/terminal/session-manager.js.map +1 -0
  227. package/dist/terminal/shepherd-client.d.ts +66 -0
  228. package/dist/terminal/shepherd-client.d.ts.map +1 -0
  229. package/dist/terminal/shepherd-client.js +234 -0
  230. package/dist/terminal/shepherd-client.js.map +1 -0
  231. package/dist/terminal/shepherd-main.d.ts +19 -0
  232. package/dist/terminal/shepherd-main.d.ts.map +1 -0
  233. package/dist/terminal/shepherd-main.js +153 -0
  234. package/dist/terminal/shepherd-main.js.map +1 -0
  235. package/dist/terminal/shepherd-process.d.ts +75 -0
  236. package/dist/terminal/shepherd-process.d.ts.map +1 -0
  237. package/dist/terminal/shepherd-process.js +279 -0
  238. package/dist/terminal/shepherd-process.js.map +1 -0
  239. package/dist/terminal/shepherd-protocol.d.ts +115 -0
  240. package/dist/terminal/shepherd-protocol.d.ts.map +1 -0
  241. package/dist/terminal/shepherd-protocol.js +214 -0
  242. package/dist/terminal/shepherd-protocol.js.map +1 -0
  243. package/dist/terminal/shepherd-replay-buffer.d.ts +38 -0
  244. package/dist/terminal/shepherd-replay-buffer.d.ts.map +1 -0
  245. package/dist/terminal/shepherd-replay-buffer.js +94 -0
  246. package/dist/terminal/shepherd-replay-buffer.js.map +1 -0
  247. package/dist/terminal/ws-protocol.d.ts +27 -0
  248. package/dist/terminal/ws-protocol.d.ts.map +1 -0
  249. package/dist/terminal/ws-protocol.js +44 -0
  250. package/dist/terminal/ws-protocol.js.map +1 -0
  251. package/package.json +19 -5
  252. package/skeleton/.claude/skills/af/SKILL.md +89 -0
  253. package/skeleton/.claude/skills/codev/SKILL.md +41 -0
  254. package/skeleton/.claude/skills/consult/SKILL.md +81 -0
  255. package/skeleton/.claude/skills/generate-image/SKILL.md +56 -0
  256. package/skeleton/DEPENDENCIES.md +4 -62
  257. package/skeleton/builders.md +1 -1
  258. package/skeleton/consult-types/impl-review.md +18 -9
  259. package/skeleton/consult-types/integration-review.md +1 -1
  260. package/skeleton/consult-types/plan-review.md +1 -1
  261. package/skeleton/consult-types/pr-ready.md +1 -1
  262. package/skeleton/consult-types/spec-review.md +1 -1
  263. package/skeleton/porch/prompts/defend.md +1 -1
  264. package/skeleton/porch/prompts/evaluate.md +2 -2
  265. package/skeleton/porch/prompts/implement.md +1 -1
  266. package/skeleton/porch/prompts/plan.md +1 -1
  267. package/skeleton/porch/prompts/review.md +4 -4
  268. package/skeleton/porch/prompts/specify.md +1 -1
  269. package/skeleton/porch/prompts/understand.md +2 -2
  270. package/skeleton/protocol-schema.json +282 -0
  271. package/skeleton/protocols/bugfix/builder-prompt.md +54 -0
  272. package/skeleton/protocols/bugfix/prompts/fix.md +77 -0
  273. package/skeleton/protocols/bugfix/prompts/investigate.md +77 -0
  274. package/skeleton/protocols/bugfix/prompts/pr.md +84 -0
  275. package/skeleton/protocols/bugfix/protocol.json +20 -33
  276. package/skeleton/protocols/experiment/builder-prompt.md +52 -0
  277. package/skeleton/protocols/experiment/protocol.json +101 -0
  278. package/skeleton/protocols/experiment/protocol.md +3 -3
  279. package/skeleton/protocols/experiment/templates/notes.md +1 -1
  280. package/skeleton/protocols/maintain/builder-prompt.md +46 -0
  281. package/skeleton/protocols/maintain/prompts/audit.md +111 -0
  282. package/skeleton/protocols/maintain/prompts/clean.md +91 -0
  283. package/skeleton/protocols/maintain/prompts/sync.md +113 -0
  284. package/skeleton/protocols/maintain/prompts/verify.md +110 -0
  285. package/skeleton/protocols/maintain/protocol.json +141 -0
  286. package/skeleton/protocols/maintain/protocol.md +17 -11
  287. package/skeleton/protocols/protocol-schema.json +54 -1
  288. package/skeleton/protocols/spir/builder-prompt.md +59 -0
  289. package/skeleton/protocols/spir/prompts/implement.md +208 -0
  290. package/skeleton/protocols/{spider → spir}/prompts/plan.md +6 -70
  291. package/skeleton/protocols/{spider → spir}/prompts/review.md +20 -39
  292. package/skeleton/protocols/{spider → spir}/prompts/specify.md +33 -61
  293. package/skeleton/protocols/spir/protocol.json +156 -0
  294. package/skeleton/protocols/{spider → spir}/protocol.md +35 -21
  295. package/skeleton/protocols/{spider → spir}/templates/plan.md +14 -0
  296. package/skeleton/protocols/spir/templates/review.md +89 -0
  297. package/skeleton/protocols/tick/builder-prompt.md +56 -0
  298. package/skeleton/protocols/tick/protocol.json +7 -2
  299. package/skeleton/protocols/tick/protocol.md +18 -18
  300. package/skeleton/protocols/tick/templates/review.md +1 -1
  301. package/skeleton/resources/commands/agent-farm.md +63 -46
  302. package/skeleton/resources/commands/codev.md +0 -2
  303. package/skeleton/resources/commands/overview.md +7 -17
  304. package/skeleton/resources/workflow-reference.md +4 -4
  305. package/skeleton/roles/architect.md +152 -315
  306. package/skeleton/roles/builder.md +110 -218
  307. package/skeleton/roles/consultant.md +6 -6
  308. package/skeleton/templates/AGENTS.md +2 -2
  309. package/skeleton/templates/CLAUDE.md +2 -2
  310. package/skeleton/templates/cheatsheet.md +7 -5
  311. package/skeleton/templates/projectlist.md +1 -1
  312. package/templates/dashboard/index.html +17 -43
  313. package/templates/dashboard/js/dialogs.js +7 -7
  314. package/templates/dashboard/js/files.js +2 -2
  315. package/templates/dashboard/js/main.js +4 -4
  316. package/templates/dashboard/js/projects.js +3 -3
  317. package/templates/dashboard/js/tabs.js +1 -1
  318. package/templates/dashboard/js/utils.js +22 -87
  319. package/templates/open.html +26 -0
  320. package/templates/tower.html +642 -36
  321. package/dist/agent-farm/commands/kickoff.d.ts +0 -20
  322. package/dist/agent-farm/commands/kickoff.d.ts.map +0 -1
  323. package/dist/agent-farm/commands/kickoff.js +0 -337
  324. package/dist/agent-farm/commands/kickoff.js.map +0 -1
  325. package/dist/agent-farm/commands/rename.d.ts +0 -13
  326. package/dist/agent-farm/commands/rename.d.ts.map +0 -1
  327. package/dist/agent-farm/commands/rename.js +0 -33
  328. package/dist/agent-farm/commands/rename.js.map +0 -1
  329. package/dist/agent-farm/commands/tutorial.d.ts +0 -10
  330. package/dist/agent-farm/commands/tutorial.d.ts.map +0 -1
  331. package/dist/agent-farm/commands/tutorial.js +0 -49
  332. package/dist/agent-farm/commands/tutorial.js.map +0 -1
  333. package/dist/agent-farm/commands/util.d.ts +0 -15
  334. package/dist/agent-farm/commands/util.d.ts.map +0 -1
  335. package/dist/agent-farm/commands/util.js +0 -108
  336. package/dist/agent-farm/commands/util.js.map +0 -1
  337. package/dist/agent-farm/servers/dashboard-server.d.ts +0 -7
  338. package/dist/agent-farm/servers/dashboard-server.d.ts.map +0 -1
  339. package/dist/agent-farm/servers/dashboard-server.js +0 -1872
  340. package/dist/agent-farm/servers/dashboard-server.js.map +0 -1
  341. package/dist/agent-farm/servers/open-server.d.ts +0 -7
  342. package/dist/agent-farm/servers/open-server.d.ts.map +0 -1
  343. package/dist/agent-farm/servers/open-server.js +0 -315
  344. package/dist/agent-farm/servers/open-server.js.map +0 -1
  345. package/dist/agent-farm/tutorial/index.d.ts +0 -8
  346. package/dist/agent-farm/tutorial/index.d.ts.map +0 -1
  347. package/dist/agent-farm/tutorial/index.js +0 -8
  348. package/dist/agent-farm/tutorial/index.js.map +0 -1
  349. package/dist/agent-farm/tutorial/prompts.d.ts +0 -57
  350. package/dist/agent-farm/tutorial/prompts.d.ts.map +0 -1
  351. package/dist/agent-farm/tutorial/prompts.js +0 -147
  352. package/dist/agent-farm/tutorial/prompts.js.map +0 -1
  353. package/dist/agent-farm/tutorial/runner.d.ts +0 -52
  354. package/dist/agent-farm/tutorial/runner.d.ts.map +0 -1
  355. package/dist/agent-farm/tutorial/runner.js +0 -204
  356. package/dist/agent-farm/tutorial/runner.js.map +0 -1
  357. package/dist/agent-farm/tutorial/state.d.ts +0 -26
  358. package/dist/agent-farm/tutorial/state.d.ts.map +0 -1
  359. package/dist/agent-farm/tutorial/state.js +0 -89
  360. package/dist/agent-farm/tutorial/state.js.map +0 -1
  361. package/dist/agent-farm/tutorial/steps/first-spec.d.ts +0 -7
  362. package/dist/agent-farm/tutorial/steps/first-spec.d.ts.map +0 -1
  363. package/dist/agent-farm/tutorial/steps/first-spec.js +0 -136
  364. package/dist/agent-farm/tutorial/steps/first-spec.js.map +0 -1
  365. package/dist/agent-farm/tutorial/steps/implementation.d.ts +0 -7
  366. package/dist/agent-farm/tutorial/steps/implementation.d.ts.map +0 -1
  367. package/dist/agent-farm/tutorial/steps/implementation.js +0 -76
  368. package/dist/agent-farm/tutorial/steps/implementation.js.map +0 -1
  369. package/dist/agent-farm/tutorial/steps/index.d.ts +0 -10
  370. package/dist/agent-farm/tutorial/steps/index.d.ts.map +0 -1
  371. package/dist/agent-farm/tutorial/steps/index.js +0 -10
  372. package/dist/agent-farm/tutorial/steps/index.js.map +0 -1
  373. package/dist/agent-farm/tutorial/steps/planning.d.ts +0 -7
  374. package/dist/agent-farm/tutorial/steps/planning.d.ts.map +0 -1
  375. package/dist/agent-farm/tutorial/steps/planning.js +0 -143
  376. package/dist/agent-farm/tutorial/steps/planning.js.map +0 -1
  377. package/dist/agent-farm/tutorial/steps/review.d.ts +0 -7
  378. package/dist/agent-farm/tutorial/steps/review.d.ts.map +0 -1
  379. package/dist/agent-farm/tutorial/steps/review.js +0 -78
  380. package/dist/agent-farm/tutorial/steps/review.js.map +0 -1
  381. package/dist/agent-farm/tutorial/steps/setup.d.ts +0 -7
  382. package/dist/agent-farm/tutorial/steps/setup.d.ts.map +0 -1
  383. package/dist/agent-farm/tutorial/steps/setup.js +0 -126
  384. package/dist/agent-farm/tutorial/steps/setup.js.map +0 -1
  385. package/dist/agent-farm/tutorial/steps/welcome.d.ts +0 -7
  386. package/dist/agent-farm/tutorial/steps/welcome.d.ts.map +0 -1
  387. package/dist/agent-farm/tutorial/steps/welcome.js +0 -50
  388. package/dist/agent-farm/tutorial/steps/welcome.js.map +0 -1
  389. package/dist/agent-farm/utils/orphan-handler.d.ts +0 -27
  390. package/dist/agent-farm/utils/orphan-handler.d.ts.map +0 -1
  391. package/dist/agent-farm/utils/orphan-handler.js +0 -149
  392. package/dist/agent-farm/utils/orphan-handler.js.map +0 -1
  393. package/dist/agent-farm/utils/port-registry.d.ts +0 -58
  394. package/dist/agent-farm/utils/port-registry.d.ts.map +0 -1
  395. package/dist/agent-farm/utils/port-registry.js +0 -166
  396. package/dist/agent-farm/utils/port-registry.js.map +0 -1
  397. package/dist/agent-farm/utils/terminal-ports.d.ts +0 -18
  398. package/dist/agent-farm/utils/terminal-ports.d.ts.map +0 -1
  399. package/dist/agent-farm/utils/terminal-ports.js +0 -35
  400. package/dist/agent-farm/utils/terminal-ports.js.map +0 -1
  401. package/dist/commands/pcheck/cache.d.ts +0 -48
  402. package/dist/commands/pcheck/cache.d.ts.map +0 -1
  403. package/dist/commands/pcheck/cache.js +0 -170
  404. package/dist/commands/pcheck/cache.js.map +0 -1
  405. package/dist/commands/pcheck/evaluator.d.ts +0 -15
  406. package/dist/commands/pcheck/evaluator.d.ts.map +0 -1
  407. package/dist/commands/pcheck/evaluator.js +0 -246
  408. package/dist/commands/pcheck/evaluator.js.map +0 -1
  409. package/dist/commands/pcheck/index.d.ts +0 -12
  410. package/dist/commands/pcheck/index.d.ts.map +0 -1
  411. package/dist/commands/pcheck/index.js +0 -249
  412. package/dist/commands/pcheck/index.js.map +0 -1
  413. package/dist/commands/pcheck/parser.d.ts +0 -39
  414. package/dist/commands/pcheck/parser.d.ts.map +0 -1
  415. package/dist/commands/pcheck/parser.js +0 -155
  416. package/dist/commands/pcheck/parser.js.map +0 -1
  417. package/dist/commands/pcheck/types.d.ts +0 -82
  418. package/dist/commands/pcheck/types.d.ts.map +0 -1
  419. package/dist/commands/pcheck/types.js +0 -5
  420. package/dist/commands/pcheck/types.js.map +0 -1
  421. package/dist/commands/porch/consultation.d.ts +0 -56
  422. package/dist/commands/porch/consultation.d.ts.map +0 -1
  423. package/dist/commands/porch/consultation.js +0 -330
  424. package/dist/commands/porch/consultation.js.map +0 -1
  425. package/dist/commands/porch/notifications.d.ts +0 -99
  426. package/dist/commands/porch/notifications.d.ts.map +0 -1
  427. package/dist/commands/porch/notifications.js +0 -223
  428. package/dist/commands/porch/notifications.js.map +0 -1
  429. package/dist/commands/porch/plan-parser.d.ts +0 -38
  430. package/dist/commands/porch/plan-parser.d.ts.map +0 -1
  431. package/dist/commands/porch/plan-parser.js +0 -166
  432. package/dist/commands/porch/plan-parser.js.map +0 -1
  433. package/dist/commands/porch/protocol-loader.d.ts +0 -46
  434. package/dist/commands/porch/protocol-loader.d.ts.map +0 -1
  435. package/dist/commands/porch/protocol-loader.js +0 -253
  436. package/dist/commands/porch/protocol-loader.js.map +0 -1
  437. package/dist/commands/porch/signal-parser.d.ts +0 -88
  438. package/dist/commands/porch/signal-parser.d.ts.map +0 -1
  439. package/dist/commands/porch/signal-parser.js +0 -148
  440. package/dist/commands/porch/signal-parser.js.map +0 -1
  441. package/dist/commands/tower.d.ts +0 -16
  442. package/dist/commands/tower.d.ts.map +0 -1
  443. package/dist/commands/tower.js +0 -21
  444. package/dist/commands/tower.js.map +0 -1
  445. package/skeleton/config.json +0 -7
  446. package/skeleton/porch/protocols/bugfix.json +0 -85
  447. package/skeleton/porch/protocols/spider.json +0 -135
  448. package/skeleton/porch/protocols/tick.json +0 -76
  449. package/skeleton/protocols/spider/prompts/defend.md +0 -215
  450. package/skeleton/protocols/spider/prompts/evaluate.md +0 -241
  451. package/skeleton/protocols/spider/prompts/implement.md +0 -149
  452. package/skeleton/protocols/spider/protocol.json +0 -210
  453. package/skeleton/protocols/spider/templates/review.md +0 -207
  454. package/templates/dashboard/css/activity.css +0 -151
  455. package/templates/dashboard/js/activity.js +0 -112
  456. /package/skeleton/protocols/{spider → spir}/templates/spec.md +0 -0
@@ -1,215 +0,0 @@
1
- # DEFEND Phase Prompt
2
-
3
- You are executing the **DEFEND** phase of the SPIDER protocol.
4
-
5
- ## Your Goal
6
-
7
- Write comprehensive tests that guard the implementation against regressions and verify correct behavior.
8
-
9
- ## Context
10
-
11
- - **Project ID**: {{project_id}}
12
- - **Project Title**: {{title}}
13
- - **Current State**: {{current_state}}
14
- - **Plan Phase**: {{plan_phase}} (if applicable)
15
- - **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
16
- - **Plan File**: `codev/plans/{{project_id}}-{{title}}.md`
17
-
18
- ## Consultation Context
19
-
20
- **Defend is the last phase before consultation.** After tests pass:
21
- - You will proceed to Evaluate
22
- - Evaluate will run multi-agent consultation (GPT-5 Codex + Gemini Pro)
23
- - Only after consultation approval will the phase be committed
24
-
25
- Write thorough tests knowing they will be reviewed.
26
-
27
- ## Prerequisites
28
-
29
- Before writing tests, verify:
30
- 1. Implementation phase is complete
31
- 2. Build passes
32
- 3. You understand what the code is supposed to do
33
- 4. You know the success criteria from the spec
34
-
35
- ## Process
36
-
37
- ### 1. Analyze What to Test
38
-
39
- Review the implementation and identify:
40
- - **Core functionality** - The main purpose of the code
41
- - **Edge cases** - Boundary conditions, empty inputs, etc.
42
- - **Error conditions** - Invalid inputs, failure scenarios
43
- - **Integration points** - How components work together
44
-
45
- ### 2. Write Unit Tests
46
-
47
- For each function/method:
48
- - Test the happy path (normal operation)
49
- - Test edge cases (empty, null, boundary values)
50
- - Test error conditions (invalid input, failures)
51
-
52
- **Unit Test Principles**:
53
- - Test behavior, not implementation details
54
- - One assertion focus per test (can have multiple asserts if related)
55
- - Clear test names that describe what's being tested
56
- - Fast execution (no external dependencies)
57
-
58
- ### 3. Write Integration Tests
59
-
60
- For feature flows:
61
- - Test components working together
62
- - Test realistic usage scenarios
63
- - Test the success criteria from the spec
64
-
65
- **Integration Test Principles**:
66
- - Use real implementations for internal boundaries
67
- - Only mock external dependencies (APIs, databases, file system)
68
- - Cover critical user paths
69
- - Test end-to-end scenarios where possible
70
-
71
- ### 4. Avoid Overmocking
72
-
73
- **DO**:
74
- - Mock external APIs and services
75
- - Mock file system for isolation
76
- - Mock time-dependent operations
77
- - Use real implementations for internal modules
78
-
79
- **DON'T**:
80
- - Mock the system under test
81
- - Mock internal function calls
82
- - Create mocks that mirror implementation details
83
- - Write tests that break when you refactor
84
-
85
- ### 5. Test Environment Isolation (CRITICAL)
86
-
87
- **NEVER touch real $HOME directories in tests.** Use XDG sandboxing:
88
-
89
- ```bash
90
- # In test setup
91
- export XDG_CONFIG_HOME="$TEST_PROJECT/.xdg/config"
92
- export XDG_DATA_HOME="$TEST_PROJECT/.xdg/data"
93
- export XDG_CACHE_HOME="$TEST_PROJECT/.xdg/cache"
94
- export HOME="$TEST_PROJECT/.xdg/home"
95
- ```
96
-
97
- **Test Isolation Principles**:
98
- - Each test should be hermetic (no side effects on user environment)
99
- - Use temporary directories that are cleaned up after tests
100
- - Use failing shims instead of removing tools from PATH
101
- - Never write to actual config directories (~/.config, etc.)
102
-
103
- ### 6. Run All Tests
104
-
105
- ```bash
106
- npm test # Run all tests
107
- npm test -- --coverage # With coverage report
108
- ```
109
-
110
- Verify:
111
- - All new tests pass
112
- - All existing tests still pass
113
- - Coverage hasn't decreased
114
-
115
- ### 6. Fix Failing Tests
116
-
117
- If tests fail:
118
- 1. Determine if it's a test bug or implementation bug
119
- 2. If implementation bug → return to Implement phase
120
- 3. If test bug → fix the test
121
- 4. Re-run all tests
122
-
123
- ## Output
124
-
125
- - Test files covering the implementation
126
- - All tests passing
127
- - No reduction in code coverage
128
-
129
- ## Signals
130
-
131
- Emit appropriate signals based on your progress:
132
-
133
- - After tests are written and passing:
134
- ```
135
- <signal>TESTS_WRITTEN</signal>
136
- ```
137
-
138
- - If implementation bugs are found:
139
- ```
140
- <signal>IMPLEMENTATION_BUG:description</signal>
141
- ```
142
- (This signals return to Implement phase)
143
-
144
- - If blocked:
145
- ```
146
- <signal>BLOCKED:reason</signal>
147
- ```
148
-
149
- ## Test File Organization
150
-
151
- Follow project conventions. Common patterns:
152
-
153
- ```
154
- src/
155
- auth/
156
- login.ts
157
- tests/
158
- auth/
159
- login.test.ts
160
- ```
161
-
162
- or
163
-
164
- ```
165
- src/
166
- auth/
167
- login.ts
168
- login.test.ts (co-located)
169
- ```
170
-
171
- ## Test Naming Convention
172
-
173
- Use descriptive names that explain the scenario:
174
-
175
- ```typescript
176
- // Good
177
- describe('login', () => {
178
- it('returns user data on valid credentials', () => {...})
179
- it('throws AuthError on invalid password', () => {...})
180
- it('locks account after 5 failed attempts', () => {...})
181
- })
182
-
183
- // Bad
184
- describe('login', () => {
185
- it('works', () => {...})
186
- it('test1', () => {...})
187
- it('should work correctly', () => {...})
188
- })
189
- ```
190
-
191
- ## Important Notes
192
-
193
- 1. **Tests are documentation** - They show how code should be used
194
- 2. **Test behavior, not implementation** - Tests should survive refactoring
195
- 3. **Prefer integration over unit** - When testing complex flows
196
- 4. **Keep tests fast** - Slow tests get skipped
197
- 5. **One test file per source file** - Easy to find related tests
198
-
199
- ## What NOT to Do
200
-
201
- - Don't skip edge cases ("I'll test that later")
202
- - Don't mock everything (leads to brittle tests)
203
- - Don't test private implementation details
204
- - Don't write tests that pass for wrong reasons
205
- - Don't leave commented-out tests
206
- - Don't touch real $HOME or user config directories in tests
207
- - Don't use `git add .` or `git add -A` when you do commit (security risk)
208
-
209
- ## Coverage Guidelines
210
-
211
- Aim for:
212
- - 80%+ line coverage for new code
213
- - 100% coverage of critical paths (auth, payments, etc.)
214
- - Every public function has at least one test
215
- - Every error condition has a test
@@ -1,241 +0,0 @@
1
- # EVALUATE Phase Prompt
2
-
3
- You are executing the **EVALUATE** phase of the SPIDER protocol.
4
-
5
- ## Your Goal
6
-
7
- Verify the implementation fully satisfies the phase requirements, run mandatory multi-agent consultation, and then commit the completed phase.
8
-
9
- ## CRITICAL: Multi-Agent Consultation is MANDATORY
10
-
11
- **DO NOT COMMIT without consultation approval.** This is a BLOCKING requirement.
12
-
13
- The evaluation process is:
14
- 1. Verify implementation and tests
15
- 2. Run multi-agent consultation (GPT-5 Codex + Gemini Pro)
16
- 3. Address any feedback
17
- 4. Get human approval
18
- 5. ONLY THEN commit
19
-
20
- ## Context
21
-
22
- - **Project ID**: {{project_id}}
23
- - **Project Title**: {{title}}
24
- - **Current State**: {{current_state}}
25
- - **Plan Phase**: {{plan_phase}} (if applicable)
26
- - **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
27
- - **Plan File**: `codev/plans/{{project_id}}-{{title}}.md`
28
-
29
- ## Prerequisites
30
-
31
- Before evaluating, verify:
32
- 1. Implementation is complete
33
- 2. Tests are written and passing
34
- 3. Build passes
35
- 4. Lint passes (if configured)
36
-
37
- ## Process
38
-
39
- ### 1. Functional Evaluation
40
-
41
- Check against the spec's success criteria:
42
-
43
- - [ ] All acceptance criteria met?
44
- - [ ] User scenarios work as expected?
45
- - [ ] Edge cases handled properly?
46
- - [ ] Error messages are helpful?
47
-
48
- ### 2. Non-Functional Evaluation
49
-
50
- Assess quality attributes:
51
-
52
- - [ ] Performance acceptable?
53
- - [ ] Security standards maintained?
54
- - [ ] Code is maintainable?
55
- - [ ] No unnecessary complexity?
56
-
57
- ### 3. Spec Compliance Check
58
-
59
- Compare implementation to specification:
60
-
61
- - [ ] Does exactly what spec says (no more, no less)?
62
- - [ ] Handles all scenarios mentioned in spec?
63
- - [ ] Matches the expected behavior described?
64
-
65
- ### 4. Test Quality Check
66
-
67
- Verify test coverage:
68
-
69
- - [ ] All new code has tests?
70
- - [ ] Tests cover happy path AND error cases?
71
- - [ ] No overmocking (tests use real implementations where possible)?
72
- - [ ] Tests would catch regressions?
73
-
74
- ### 5. Deviation Analysis
75
-
76
- If implementation differs from plan:
77
-
78
- - Document what changed and why
79
- - Assess impact on other phases
80
- - Update plan if needed
81
-
82
- ### 6. MANDATORY: Multi-Agent Consultation
83
-
84
- **Before committing, run consultation:**
85
-
86
- ```bash
87
- # Run consultations in parallel (REQUIRED)
88
- consult --model gemini --type impl-review spec {{project_id}} &
89
- consult --model codex --type impl-review spec {{project_id}} &
90
- wait
91
- ```
92
-
93
- - Review ALL feedback from both models
94
- - Address any issues raised
95
- - Document feedback in the phase evaluation notes
96
-
97
- **If consultants identify issues:**
98
- - Return to Implement or Defend as needed
99
- - Fix the issues
100
- - Re-run consultation
101
- - Do NOT commit until consultation passes
102
-
103
- ### 7. Human Review
104
-
105
- After consultation feedback is incorporated:
106
- - Present evaluation summary for human review
107
- - Wait for approval to commit
108
- - If changes requested, address them and re-consult if significant
109
-
110
- ### 8. Phase Commit (After Approval Only)
111
-
112
- **CRITICAL**: Only commit after consultation and human approval.
113
-
114
- ```bash
115
- # Stage all changes for this phase - NEVER use git add . or git add -A
116
- git add <specific-files>
117
-
118
- # Commit with proper format
119
- git commit -m "[Spec {{project_id}}][Phase: {{plan_phase}}] feat: <description>"
120
- ```
121
-
122
- Commit message format:
123
- - `[Spec XXXX][Phase: name] feat:` for new features
124
- - `[Spec XXXX][Phase: name] fix:` for bug fixes
125
- - `[Spec XXXX][Phase: name] refactor:` for refactoring
126
-
127
- ### 9. Update Plan Status
128
-
129
- Mark this phase as complete in the plan document.
130
-
131
- ## Output
132
-
133
- - Completed evaluation checklist
134
- - Phase committed to git
135
- - Plan updated with phase status
136
-
137
- ## Signals
138
-
139
- Emit appropriate signals based on your progress:
140
-
141
- - After initial evaluation passes (before consultation):
142
- ```
143
- <signal>EVALUATION_PASSED</signal>
144
- ```
145
-
146
- - After consultation feedback is incorporated:
147
- ```
148
- <signal>CONSULTATION_INCORPORATED</signal>
149
- ```
150
-
151
- - After human approves and commit is complete:
152
- ```
153
- <signal>EVALUATION_COMPLETE</signal>
154
- ```
155
-
156
- - If evaluation reveals spec non-compliance:
157
- ```
158
- <signal>SPEC_VIOLATION:description</signal>
159
- ```
160
- (Signals return to Implement)
161
-
162
- - If tests reveal bugs:
163
- ```
164
- <signal>IMPLEMENTATION_BUG:description</signal>
165
- ```
166
- (Signals return to Implement)
167
-
168
- - If consultation identifies issues:
169
- ```
170
- <signal>CONSULTATION_ISSUES:description</signal>
171
- ```
172
- (Signals return to Implement or Defend)
173
-
174
- - If all plan phases are complete:
175
- ```
176
- <signal>ALL_PHASES_COMPLETE</signal>
177
- ```
178
- (Signals transition to Review)
179
-
180
- ## Evaluation Checklist Template
181
-
182
- ```markdown
183
- ## Phase Evaluation: {{plan_phase}}
184
-
185
- ### Functional
186
- - [ ] Acceptance criteria 1: [status]
187
- - [ ] Acceptance criteria 2: [status]
188
- - [ ] Edge cases handled: [status]
189
-
190
- ### Non-Functional
191
- - [ ] Performance: [acceptable/needs work]
192
- - [ ] Security: [reviewed/concerns]
193
- - [ ] Maintainability: [good/needs refactor]
194
-
195
- ### Tests
196
- - [ ] Coverage: [X%]
197
- - [ ] All tests passing: [yes/no]
198
- - [ ] Overmocking check: [passed/failed]
199
-
200
- ### Spec Compliance
201
- - [ ] Matches spec requirements: [yes/no]
202
- - [ ] Deviations: [none/list them]
203
-
204
- ### Commit
205
- - [ ] Changes staged
206
- - [ ] Commit created: [hash]
207
- - [ ] Plan updated
208
- ```
209
-
210
- ## Important Notes
211
-
212
- 1. **Consultation is MANDATORY** - Cannot skip GPT-5 + Gemini reviews
213
- 2. **Be honest** - If something isn't right, fix it before committing
214
- 3. **Don't skip the checklist** - It catches issues before they compound
215
- 4. **Atomic commits** - One commit per phase, not multiple
216
- 5. **Update the plan** - Mark phase status after commit
217
- 6. **Verify the commit** - `git log --oneline -1` should show your commit
218
-
219
- ## What NOT to Do
220
-
221
- - Don't commit without consultation approval (BLOCKING)
222
- - Don't commit if tests are failing
223
- - Don't commit if build is broken
224
- - Don't skip the spec compliance check
225
- - Don't commit multiple phases together
226
- - Don't proceed to next phase without committing
227
- - Don't use `git add .` or `git add -A` (security risk)
228
-
229
- ## Handling Failures
230
-
231
- **If spec compliance fails**:
232
- Return to Implement, fix the issue, re-run Defend, then Evaluate again.
233
-
234
- **If tests fail**:
235
- Return to Implement to fix bugs, or Defend to fix tests.
236
-
237
- **If build fails**:
238
- Return to Implement to fix build errors.
239
-
240
- **If you discover a spec problem**:
241
- Signal `BLOCKED` and describe the spec issue. The Architect may need to update the spec.
@@ -1,149 +0,0 @@
1
- # IMPLEMENT Phase Prompt
2
-
3
- You are executing the **IMPLEMENT** phase of the SPIDER protocol.
4
-
5
- ## Your Goal
6
-
7
- Write clean, well-structured code that implements the current plan phase.
8
-
9
- ## Context
10
-
11
- - **Project ID**: {{project_id}}
12
- - **Project Title**: {{title}}
13
- - **Current State**: {{current_state}}
14
- - **Plan Phase**: {{plan_phase}} (if applicable)
15
- - **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
16
- - **Plan File**: `codev/plans/{{project_id}}-{{title}}.md`
17
-
18
- ## Consultation Context
19
-
20
- **Implementation does NOT require consultation checkpoints** - that happens after Defend.
21
-
22
- However, you should be aware:
23
- - Spec and Plan have already been reviewed by GPT-5 Codex and Gemini Pro
24
- - After you complete Implement + Defend, your work will be reviewed
25
- - Implementation must strictly follow the approved spec and plan
26
-
27
- ## Prerequisites
28
-
29
- Before implementing, verify:
30
- 1. Previous phase (if any) is committed to git
31
- 2. You've read the plan phase you're implementing
32
- 3. You understand the success criteria for this phase
33
- 4. Dependencies from earlier phases are available
34
-
35
- ## Process
36
-
37
- ### 1. Review the Plan Phase
38
-
39
- Read the current phase in the plan:
40
- - What is the objective?
41
- - What files need to be created/modified?
42
- - What are the success criteria?
43
- - What dependencies exist?
44
-
45
- ### 2. Set Up
46
-
47
- - Verify you're on the correct branch
48
- - Check that previous phase is committed: `git log --oneline -5`
49
- - Ensure build passes before starting: `npm run build` (or equivalent)
50
-
51
- ### 3. Implement
52
-
53
- Write the code following these principles:
54
-
55
- **Code Quality Standards**:
56
- - Self-documenting code (clear names, obvious structure)
57
- - No commented-out code
58
- - No debug prints in final code
59
- - Explicit error handling
60
- - Follow project style guide
61
-
62
- **Implementation Approach**:
63
- - Work on one file at a time
64
- - Make small, incremental changes
65
- - Test as you go (manual verification is fine here)
66
- - Document complex logic with comments
67
-
68
- ### 4. Self-Review
69
-
70
- Before signaling completion:
71
- - Read through all changes
72
- - Check for obvious bugs
73
- - Verify code matches the spec requirements
74
- - Ensure no accidental debug code
75
-
76
- ### 5. Build Verification
77
-
78
- Run build checks using **project-specific commands**:
79
-
80
- ```bash
81
- # Check package.json scripts or Makefile for actual commands
82
- # Common patterns:
83
- npm run build # Node.js/TypeScript projects
84
- npm run typecheck # TypeScript type checking
85
- npm run lint # Linting (ESLint, etc.)
86
- cargo build # Rust projects
87
- go build ./... # Go projects
88
- make build # Projects using Makefiles
89
- ```
90
-
91
- **Important**: Don't assume `npm run build` exists. Check `package.json` or equivalent first.
92
-
93
- Fix any errors before proceeding.
94
-
95
- ## Output
96
-
97
- - Modified/created source files as specified in the plan phase
98
- - All build checks passing
99
- - Code ready for the Defend (testing) phase
100
-
101
- ## Signals
102
-
103
- Emit appropriate signals based on your progress:
104
-
105
- - After implementation is complete and builds pass:
106
- ```
107
- <signal>PHASE_IMPLEMENTED</signal>
108
- ```
109
-
110
- - If you encounter a blocker:
111
- ```
112
- <signal>BLOCKED:reason goes here</signal>
113
- ```
114
-
115
- - If you need spec/plan clarification:
116
- ```
117
- <signal>NEEDS_CLARIFICATION:specific question</signal>
118
- ```
119
-
120
- ## Important Notes
121
-
122
- 1. **Follow the plan** - Implement what's specified, not more
123
- 2. **Don't over-engineer** - Simplest solution that works
124
- 3. **Don't skip error handling** - But don't go overboard either
125
- 4. **Keep changes focused** - Only touch files in this phase
126
- 5. **Build must pass** - Don't proceed if build fails
127
-
128
- ## What NOT to Do
129
-
130
- - Don't write tests yet (that's Defend phase)
131
- - Don't modify files outside this phase's scope
132
- - Don't add features not in the spec
133
- - Don't leave TODO comments for later (fix now or note as blocker)
134
- - Don't commit yet (that happens after Defend + Evaluate)
135
- - Don't use `git add .` or `git add -A` when you do commit (security risk)
136
-
137
- ## Handling Problems
138
-
139
- **If the plan is unclear**:
140
- Signal `NEEDS_CLARIFICATION` with your specific question.
141
-
142
- **If you discover the spec is wrong**:
143
- Signal `BLOCKED` and explain the issue. The Architect may need to update the spec.
144
-
145
- **If a dependency is missing**:
146
- Signal `BLOCKED` with details about what's missing.
147
-
148
- **If build fails and you can't fix it**:
149
- Signal `BLOCKED` with the error message.