@cluesmith/codev 3.2.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
  2. package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-JCbkpAcV.js} +33 -33
  3. package/dashboard-dist/assets/index-JCbkpAcV.js.map +1 -0
  4. package/dashboard-dist/index.html +2 -2
  5. package/dist/agent-farm/cli.d.ts.map +1 -1
  6. package/dist/agent-farm/cli.js +173 -0
  7. package/dist/agent-farm/cli.js.map +1 -1
  8. package/dist/agent-farm/commands/attach.js +2 -2
  9. package/dist/agent-farm/commands/attach.js.map +1 -1
  10. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  11. package/dist/agent-farm/commands/cleanup.js +16 -0
  12. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  13. package/dist/agent-farm/commands/inbox.d.ts +42 -0
  14. package/dist/agent-farm/commands/inbox.d.ts.map +1 -0
  15. package/dist/agent-farm/commands/inbox.js +129 -0
  16. package/dist/agent-farm/commands/inbox.js.map +1 -0
  17. package/dist/agent-farm/commands/interrupt.d.ts +20 -0
  18. package/dist/agent-farm/commands/interrupt.d.ts.map +1 -0
  19. package/dist/agent-farm/commands/interrupt.js +65 -0
  20. package/dist/agent-farm/commands/interrupt.js.map +1 -0
  21. package/dist/agent-farm/commands/reset/constants.d.ts +52 -0
  22. package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -0
  23. package/dist/agent-farm/commands/reset/constants.js +52 -0
  24. package/dist/agent-farm/commands/reset/constants.js.map +1 -0
  25. package/dist/agent-farm/commands/reset/context.d.ts +230 -0
  26. package/dist/agent-farm/commands/reset/context.d.ts.map +1 -0
  27. package/dist/agent-farm/commands/reset/context.js +428 -0
  28. package/dist/agent-farm/commands/reset/context.js.map +1 -0
  29. package/dist/agent-farm/commands/reset/index.d.ts +192 -0
  30. package/dist/agent-farm/commands/reset/index.d.ts.map +1 -0
  31. package/dist/agent-farm/commands/reset/index.js +488 -0
  32. package/dist/agent-farm/commands/reset/index.js.map +1 -0
  33. package/dist/agent-farm/commands/reset/receipt.d.ts +97 -0
  34. package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -0
  35. package/dist/agent-farm/commands/reset/receipt.js +149 -0
  36. package/dist/agent-farm/commands/reset/receipt.js.map +1 -0
  37. package/dist/agent-farm/commands/reset/reorient.d.ts +117 -0
  38. package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -0
  39. package/dist/agent-farm/commands/reset/reorient.js +313 -0
  40. package/dist/agent-farm/commands/reset/reorient.js.map +1 -0
  41. package/dist/agent-farm/commands/reset.d.ts +19 -0
  42. package/dist/agent-farm/commands/reset.d.ts.map +1 -0
  43. package/dist/agent-farm/commands/reset.js +292 -0
  44. package/dist/agent-farm/commands/reset.js.map +1 -0
  45. package/dist/agent-farm/commands/send.d.ts +2 -2
  46. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  47. package/dist/agent-farm/commands/send.js +52 -11
  48. package/dist/agent-farm/commands/send.js.map +1 -1
  49. package/dist/agent-farm/commands/setup.d.ts +4 -1
  50. package/dist/agent-farm/commands/setup.d.ts.map +1 -1
  51. package/dist/agent-farm/commands/setup.js +8 -4
  52. package/dist/agent-farm/commands/setup.js.map +1 -1
  53. package/dist/agent-farm/commands/spawn-worktree.d.ts +116 -6
  54. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
  55. package/dist/agent-farm/commands/spawn-worktree.js +345 -74
  56. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
  57. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  58. package/dist/agent-farm/commands/spawn.js +13 -1
  59. package/dist/agent-farm/commands/spawn.js.map +1 -1
  60. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  61. package/dist/agent-farm/commands/status.js +105 -9
  62. package/dist/agent-farm/commands/status.js.map +1 -1
  63. package/dist/agent-farm/commands/tower-sweep-husks.d.ts +6 -0
  64. package/dist/agent-farm/commands/tower-sweep-husks.d.ts.map +1 -0
  65. package/dist/agent-farm/commands/tower-sweep-husks.js +77 -0
  66. package/dist/agent-farm/commands/tower-sweep-husks.js.map +1 -0
  67. package/dist/agent-farm/commands/tower.d.ts.map +1 -1
  68. package/dist/agent-farm/commands/tower.js +34 -0
  69. package/dist/agent-farm/commands/tower.js.map +1 -1
  70. package/dist/agent-farm/commands/whoami.d.ts +65 -0
  71. package/dist/agent-farm/commands/whoami.d.ts.map +1 -0
  72. package/dist/agent-farm/commands/whoami.js +196 -0
  73. package/dist/agent-farm/commands/whoami.js.map +1 -0
  74. package/dist/agent-farm/db/index.d.ts +1 -1
  75. package/dist/agent-farm/db/index.d.ts.map +1 -1
  76. package/dist/agent-farm/db/index.js +80 -1
  77. package/dist/agent-farm/db/index.js.map +1 -1
  78. package/dist/agent-farm/db/mailbox.d.ts +222 -0
  79. package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
  80. package/dist/agent-farm/db/mailbox.js +304 -0
  81. package/dist/agent-farm/db/mailbox.js.map +1 -0
  82. package/dist/agent-farm/db/schema.d.ts +1 -1
  83. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  84. package/dist/agent-farm/db/schema.js +35 -0
  85. package/dist/agent-farm/db/schema.js.map +1 -1
  86. package/dist/agent-farm/db/types.d.ts +45 -0
  87. package/dist/agent-farm/db/types.d.ts.map +1 -1
  88. package/dist/agent-farm/db/types.js.map +1 -1
  89. package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
  90. package/dist/agent-farm/lib/builder-lookup.js +2 -2
  91. package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
  92. package/dist/agent-farm/lib/reconnect-backoff.d.ts +54 -0
  93. package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
  94. package/dist/agent-farm/lib/reconnect-backoff.js +47 -0
  95. package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
  96. package/dist/agent-farm/lib/tower-client.d.ts +16 -6
  97. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  98. package/dist/agent-farm/lib/tower-client.js +37 -6
  99. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  100. package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
  101. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  102. package/dist/agent-farm/lib/tunnel-client.js +218 -27
  103. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  104. package/dist/agent-farm/servers/architect-session-holder.d.ts +133 -0
  105. package/dist/agent-farm/servers/architect-session-holder.d.ts.map +1 -0
  106. package/dist/agent-farm/servers/architect-session-holder.js +268 -0
  107. package/dist/agent-farm/servers/architect-session-holder.js.map +1 -0
  108. package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
  109. package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
  110. package/dist/agent-farm/servers/cron-delivery.js +80 -0
  111. package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
  112. package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
  113. package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
  114. package/dist/agent-farm/servers/delayed-send.js +165 -0
  115. package/dist/agent-farm/servers/delayed-send.js.map +1 -0
  116. package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
  117. package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
  118. package/dist/agent-farm/servers/gate-profiles.js +113 -0
  119. package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
  120. package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
  121. package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
  122. package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
  123. package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
  124. package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
  125. package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
  126. package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
  127. package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
  128. package/dist/agent-farm/servers/message-write.d.ts +53 -1
  129. package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
  130. package/dist/agent-farm/servers/message-write.js +63 -0
  131. package/dist/agent-farm/servers/message-write.js.map +1 -1
  132. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  133. package/dist/agent-farm/servers/overview.js +23 -4
  134. package/dist/agent-farm/servers/overview.js.map +1 -1
  135. package/dist/agent-farm/servers/process-census.d.ts +41 -0
  136. package/dist/agent-farm/servers/process-census.d.ts.map +1 -0
  137. package/dist/agent-farm/servers/process-census.js +62 -0
  138. package/dist/agent-farm/servers/process-census.js.map +1 -0
  139. package/dist/agent-farm/servers/render-gate.d.ts +141 -0
  140. package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
  141. package/dist/agent-farm/servers/render-gate.js +251 -0
  142. package/dist/agent-farm/servers/render-gate.js.map +1 -0
  143. package/dist/agent-farm/servers/session-log-sweep.d.ts +93 -0
  144. package/dist/agent-farm/servers/session-log-sweep.d.ts.map +1 -0
  145. package/dist/agent-farm/servers/session-log-sweep.js +165 -0
  146. package/dist/agent-farm/servers/session-log-sweep.js.map +1 -0
  147. package/dist/agent-farm/servers/session-submit.d.ts +90 -0
  148. package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
  149. package/dist/agent-farm/servers/session-submit.js +127 -0
  150. package/dist/agent-farm/servers/session-submit.js.map +1 -0
  151. package/dist/agent-farm/servers/shellper-husk-sweep.d.ts +87 -0
  152. package/dist/agent-farm/servers/shellper-husk-sweep.d.ts.map +1 -0
  153. package/dist/agent-farm/servers/shellper-husk-sweep.js +129 -0
  154. package/dist/agent-farm/servers/shellper-husk-sweep.js.map +1 -0
  155. package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
  156. package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
  157. package/dist/agent-farm/servers/tower-cron.js +58 -53
  158. package/dist/agent-farm/servers/tower-cron.js.map +1 -1
  159. package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
  160. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  161. package/dist/agent-farm/servers/tower-instances.js +128 -19
  162. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  163. package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
  164. package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
  165. package/dist/agent-farm/servers/tower-messages.js +106 -1
  166. package/dist/agent-farm/servers/tower-messages.js.map +1 -1
  167. package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
  168. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  169. package/dist/agent-farm/servers/tower-routes.js +807 -99
  170. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  171. package/dist/agent-farm/servers/tower-server.js +241 -15
  172. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  173. package/dist/agent-farm/servers/tower-terminals.d.ts +17 -2
  174. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  175. package/dist/agent-farm/servers/tower-terminals.js +139 -124
  176. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  177. package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
  178. package/dist/agent-farm/servers/tower-tunnel.js +63 -4
  179. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
  180. package/dist/agent-farm/servers/tower-types.d.ts +2 -1
  181. package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
  182. package/dist/agent-farm/servers/tower-utils.d.ts +99 -1
  183. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  184. package/dist/agent-farm/servers/tower-utils.js +242 -6
  185. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  186. package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
  187. package/dist/agent-farm/servers/tower-websocket.js +6 -21
  188. package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
  189. package/dist/agent-farm/servers/write-queue.d.ts +35 -0
  190. package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
  191. package/dist/agent-farm/servers/write-queue.js +56 -0
  192. package/dist/agent-farm/servers/write-queue.js.map +1 -0
  193. package/dist/agent-farm/state.d.ts +6 -1
  194. package/dist/agent-farm/state.d.ts.map +1 -1
  195. package/dist/agent-farm/state.js +5 -2
  196. package/dist/agent-farm/state.js.map +1 -1
  197. package/dist/agent-farm/types.d.ts +39 -0
  198. package/dist/agent-farm/types.d.ts.map +1 -1
  199. package/dist/agent-farm/utils/agent-names.d.ts +2 -2
  200. package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
  201. package/dist/agent-farm/utils/agent-names.js +3 -3
  202. package/dist/agent-farm/utils/agent-names.js.map +1 -1
  203. package/dist/agent-farm/utils/architect-name.d.ts +2 -2
  204. package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
  205. package/dist/agent-farm/utils/architect-name.js +3 -3
  206. package/dist/agent-farm/utils/architect-name.js.map +1 -1
  207. package/dist/agent-farm/utils/config.d.ts +13 -0
  208. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  209. package/dist/agent-farm/utils/config.js +33 -1
  210. package/dist/agent-farm/utils/config.js.map +1 -1
  211. package/dist/agent-farm/utils/harness.d.ts +103 -7
  212. package/dist/agent-farm/utils/harness.d.ts.map +1 -1
  213. package/dist/agent-farm/utils/harness.js +126 -19
  214. package/dist/agent-farm/utils/harness.js.map +1 -1
  215. package/dist/cli.d.ts.map +1 -1
  216. package/dist/cli.js +6 -32
  217. package/dist/cli.js.map +1 -1
  218. package/dist/commands/adopt.d.ts +3 -2
  219. package/dist/commands/adopt.d.ts.map +1 -1
  220. package/dist/commands/adopt.js +7 -6
  221. package/dist/commands/adopt.js.map +1 -1
  222. package/dist/commands/consult/agy-auth-cache.d.ts +97 -0
  223. package/dist/commands/consult/agy-auth-cache.d.ts.map +1 -0
  224. package/dist/commands/consult/agy-auth-cache.js +320 -0
  225. package/dist/commands/consult/agy-auth-cache.js.map +1 -0
  226. package/dist/commands/consult/cli-options.d.ts +34 -0
  227. package/dist/commands/consult/cli-options.d.ts.map +1 -0
  228. package/dist/commands/consult/cli-options.js +67 -0
  229. package/dist/commands/consult/cli-options.js.map +1 -0
  230. package/dist/commands/consult/index.d.ts +56 -2
  231. package/dist/commands/consult/index.d.ts.map +1 -1
  232. package/dist/commands/consult/index.js +330 -27
  233. package/dist/commands/consult/index.js.map +1 -1
  234. package/dist/commands/consult/metrics.d.ts +42 -0
  235. package/dist/commands/consult/metrics.d.ts.map +1 -1
  236. package/dist/commands/consult/metrics.js +129 -9
  237. package/dist/commands/consult/metrics.js.map +1 -1
  238. package/dist/commands/doctor.d.ts +28 -0
  239. package/dist/commands/doctor.d.ts.map +1 -1
  240. package/dist/commands/doctor.js +258 -22
  241. package/dist/commands/doctor.js.map +1 -1
  242. package/dist/commands/init.d.ts +3 -2
  243. package/dist/commands/init.d.ts.map +1 -1
  244. package/dist/commands/init.js +7 -6
  245. package/dist/commands/init.js.map +1 -1
  246. package/dist/commands/porch/checks.d.ts +23 -0
  247. package/dist/commands/porch/checks.d.ts.map +1 -1
  248. package/dist/commands/porch/checks.js +60 -0
  249. package/dist/commands/porch/checks.js.map +1 -1
  250. package/dist/commands/porch/config.d.ts +20 -0
  251. package/dist/commands/porch/config.d.ts.map +1 -1
  252. package/dist/commands/porch/config.js +20 -0
  253. package/dist/commands/porch/config.js.map +1 -1
  254. package/dist/commands/porch/index.d.ts.map +1 -1
  255. package/dist/commands/porch/index.js +32 -36
  256. package/dist/commands/porch/index.js.map +1 -1
  257. package/dist/commands/porch/next.d.ts.map +1 -1
  258. package/dist/commands/porch/next.js +2 -41
  259. package/dist/commands/porch/next.js.map +1 -1
  260. package/dist/commands/update.d.ts +4 -4
  261. package/dist/commands/update.d.ts.map +1 -1
  262. package/dist/commands/update.js +9 -11
  263. package/dist/commands/update.js.map +1 -1
  264. package/dist/lib/config.d.ts +70 -3
  265. package/dist/lib/config.d.ts.map +1 -1
  266. package/dist/lib/config.js +67 -3
  267. package/dist/lib/config.js.map +1 -1
  268. package/dist/lib/consult-lanes.d.ts +149 -0
  269. package/dist/lib/consult-lanes.d.ts.map +1 -0
  270. package/dist/lib/consult-lanes.js +360 -0
  271. package/dist/lib/consult-lanes.js.map +1 -0
  272. package/dist/lib/default-branch.d.ts +1 -1
  273. package/dist/lib/default-branch.js +1 -1
  274. package/dist/lib/github.js +1 -1
  275. package/dist/lib/github.js.map +1 -1
  276. package/dist/lib/gitignore.d.ts +25 -2
  277. package/dist/lib/gitignore.d.ts.map +1 -1
  278. package/dist/lib/gitignore.js +70 -0
  279. package/dist/lib/gitignore.js.map +1 -1
  280. package/dist/lib/migration-backup-audit.d.ts +64 -0
  281. package/dist/lib/migration-backup-audit.d.ts.map +1 -0
  282. package/dist/lib/migration-backup-audit.js +145 -0
  283. package/dist/lib/migration-backup-audit.js.map +1 -0
  284. package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
  285. package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
  286. package/dist/lib/prompt-behavior-metrics.js +290 -0
  287. package/dist/lib/prompt-behavior-metrics.js.map +1 -0
  288. package/dist/lib/protocol-drift-audit.d.ts +118 -0
  289. package/dist/lib/protocol-drift-audit.d.ts.map +1 -0
  290. package/dist/lib/protocol-drift-audit.js +217 -0
  291. package/dist/lib/protocol-drift-audit.js.map +1 -0
  292. package/dist/lib/scaffold.d.ts +10 -3
  293. package/dist/lib/scaffold.d.ts.map +1 -1
  294. package/dist/lib/scaffold.js +29 -26
  295. package/dist/lib/scaffold.js.map +1 -1
  296. package/dist/lib/skeleton.d.ts +22 -1
  297. package/dist/lib/skeleton.d.ts.map +1 -1
  298. package/dist/lib/skeleton.js +120 -0
  299. package/dist/lib/skeleton.js.map +1 -1
  300. package/dist/lib/test-env.d.ts +74 -0
  301. package/dist/lib/test-env.d.ts.map +1 -0
  302. package/dist/lib/test-env.js +92 -0
  303. package/dist/lib/test-env.js.map +1 -0
  304. package/dist/terminal/pty-manager.d.ts +9 -0
  305. package/dist/terminal/pty-manager.d.ts.map +1 -1
  306. package/dist/terminal/pty-manager.js +32 -6
  307. package/dist/terminal/pty-manager.js.map +1 -1
  308. package/dist/terminal/pty-session.d.ts +156 -4
  309. package/dist/terminal/pty-session.d.ts.map +1 -1
  310. package/dist/terminal/pty-session.js +307 -42
  311. package/dist/terminal/pty-session.js.map +1 -1
  312. package/dist/terminal/ring-buffer.d.ts +39 -6
  313. package/dist/terminal/ring-buffer.d.ts.map +1 -1
  314. package/dist/terminal/ring-buffer.js +74 -6
  315. package/dist/terminal/ring-buffer.js.map +1 -1
  316. package/dist/terminal/session-manager.d.ts +129 -0
  317. package/dist/terminal/session-manager.d.ts.map +1 -1
  318. package/dist/terminal/session-manager.js +337 -44
  319. package/dist/terminal/session-manager.js.map +1 -1
  320. package/dist/terminal/session-screen.d.ts +91 -0
  321. package/dist/terminal/session-screen.d.ts.map +1 -0
  322. package/dist/terminal/session-screen.js +135 -0
  323. package/dist/terminal/session-screen.js.map +1 -0
  324. package/dist/terminal/shellper-client.d.ts +19 -4
  325. package/dist/terminal/shellper-client.d.ts.map +1 -1
  326. package/dist/terminal/shellper-client.js +70 -8
  327. package/dist/terminal/shellper-client.js.map +1 -1
  328. package/dist/terminal/shellper-main.js +2 -1
  329. package/dist/terminal/shellper-main.js.map +1 -1
  330. package/dist/terminal/shellper-process.d.ts +1 -1
  331. package/dist/terminal/shellper-process.d.ts.map +1 -1
  332. package/dist/terminal/shellper-process.js +33 -9
  333. package/dist/terminal/shellper-process.js.map +1 -1
  334. package/dist/terminal/shellper-protocol.d.ts +40 -2
  335. package/dist/terminal/shellper-protocol.d.ts.map +1 -1
  336. package/dist/terminal/shellper-protocol.js +72 -5
  337. package/dist/terminal/shellper-protocol.js.map +1 -1
  338. package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
  339. package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
  340. package/dist/terminal/shellper-replay-buffer.js +167 -31
  341. package/dist/terminal/shellper-replay-buffer.js.map +1 -1
  342. package/package.json +11 -9
  343. package/skeleton/.claude/skills/afx/SKILL.md +27 -1
  344. package/skeleton/.claude/skills/arch-init/SKILL.md +135 -0
  345. package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
  346. package/skeleton/.claude/skills/codev/SKILL.md +33 -2
  347. package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
  348. package/skeleton/.codex/skills/afx/SKILL.md +170 -0
  349. package/skeleton/.codex/skills/arch-init/SKILL.md +135 -0
  350. package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
  351. package/skeleton/.codex/skills/codev/SKILL.md +90 -0
  352. package/skeleton/.codex/skills/consult/SKILL.md +96 -0
  353. package/skeleton/.codex/skills/generate-image/SKILL.md +45 -0
  354. package/skeleton/.codex/skills/porch/SKILL.md +60 -0
  355. package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
  356. package/skeleton/.codex/skills/update-arch-docs/SKILL.md +132 -0
  357. package/skeleton/protocols/air/builder-prompt.md +28 -47
  358. package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
  359. package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
  360. package/skeleton/protocols/air/prompts/implement.md +20 -73
  361. package/skeleton/protocols/air/prompts/pr.md +22 -54
  362. package/skeleton/protocols/air/protocol.md +40 -71
  363. package/skeleton/protocols/aspir/builder-prompt.md +29 -66
  364. package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
  365. package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
  366. package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
  367. package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
  368. package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
  369. package/skeleton/protocols/aspir/prompts/implement.md +27 -196
  370. package/skeleton/protocols/aspir/prompts/plan.md +21 -85
  371. package/skeleton/protocols/aspir/prompts/review.md +29 -228
  372. package/skeleton/protocols/aspir/prompts/specify.md +25 -111
  373. package/skeleton/protocols/aspir/protocol.json +10 -0
  374. package/skeleton/protocols/aspir/protocol.md +36 -82
  375. package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
  376. package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
  377. package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
  378. package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
  379. package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
  380. package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
  381. package/skeleton/protocols/bugfix/protocol.md +44 -50
  382. package/skeleton/protocols/experiment/builder-prompt.md +25 -58
  383. package/skeleton/protocols/experiment/protocol.md +22 -188
  384. package/skeleton/protocols/experiment/templates/notes.md +11 -71
  385. package/skeleton/protocols/maintain/builder-prompt.md +24 -45
  386. package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
  387. package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
  388. package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
  389. package/skeleton/protocols/maintain/protocol.md +32 -266
  390. package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
  391. package/skeleton/protocols/pir/builder-prompt.md +30 -64
  392. package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
  393. package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
  394. package/skeleton/protocols/pir/prompts/implement.md +1 -2
  395. package/skeleton/protocols/pir/prompts/plan.md +0 -3
  396. package/skeleton/protocols/pir/prompts/review.md +1 -1
  397. package/skeleton/protocols/pir/protocol.md +54 -177
  398. package/skeleton/protocols/research/builder-prompt.md +27 -58
  399. package/skeleton/protocols/research/protocol.md +28 -153
  400. package/skeleton/protocols/spike/builder-prompt.md +30 -48
  401. package/skeleton/protocols/spike/protocol.md +24 -107
  402. package/skeleton/protocols/spike/templates/findings.md +9 -39
  403. package/skeleton/protocols/spir/builder-prompt.md +33 -62
  404. package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
  405. package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
  406. package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
  407. package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
  408. package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
  409. package/skeleton/protocols/spir/prompts/implement.md +26 -195
  410. package/skeleton/protocols/spir/prompts/plan.md +20 -84
  411. package/skeleton/protocols/spir/prompts/review.md +28 -227
  412. package/skeleton/protocols/spir/prompts/specify.md +24 -110
  413. package/skeleton/protocols/spir/protocol.json +10 -0
  414. package/skeleton/protocols/spir/protocol.md +84 -633
  415. package/skeleton/protocols/spir/templates/plan.md +28 -147
  416. package/skeleton/protocols/spir/templates/review.md +21 -80
  417. package/skeleton/protocols/spir/templates/spec.md +24 -118
  418. package/skeleton/resources/commands/agent-farm.md +348 -0
  419. package/skeleton/resources/commands/codev.md +5 -0
  420. package/skeleton/resources/commands/consult.md +262 -8
  421. package/skeleton/resources/commands/overview.md +1 -0
  422. package/skeleton/roles/architect.md +67 -306
  423. package/skeleton/roles/builder.md +77 -191
  424. package/skeleton/templates/AGENTS.md +2 -0
  425. package/skeleton/templates/CLAUDE.md +2 -0
  426. package/templates/tower.html +39 -2
  427. package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
  428. package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
  429. package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
  430. package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
  431. package/dist/agent-farm/servers/send-buffer.js +0 -103
  432. package/dist/agent-farm/servers/send-buffer.js.map +0 -1
  433. package/skeleton/porch/prompts/defend.md +0 -108
  434. package/skeleton/porch/prompts/diagnose.md +0 -70
  435. package/skeleton/porch/prompts/evaluate.md +0 -132
  436. package/skeleton/porch/prompts/fix.md +0 -59
  437. package/skeleton/porch/prompts/implement.md +0 -88
  438. package/skeleton/porch/prompts/plan.md +0 -74
  439. package/skeleton/porch/prompts/pr.md +0 -84
  440. package/skeleton/porch/prompts/review.md +0 -249
  441. package/skeleton/porch/prompts/specify.md +0 -53
  442. package/skeleton/porch/prompts/test.md +0 -63
  443. package/skeleton/protocols/aspir/templates/plan.md +0 -184
  444. package/skeleton/protocols/aspir/templates/review.md +0 -120
  445. package/skeleton/protocols/aspir/templates/spec.md +0 -154
@@ -1,78 +1,72 @@
1
1
  # BUGFIX Protocol
2
2
 
3
- > Lightweight, issue-driven protocol for minor bug fixes. **Investigate → Fix → PR**, with a single `pr` gate before merge. No spec or plan artifacts: the GitHub issue is the spec, and the review goes in the PR body.
3
+ Investigate → Fix → PR, driven by a GitHub issue. No spec, no plan, no artifact files: the issue
4
+ is the specification and the PR body carries the reasoning.
4
5
 
5
- ## When to Use
6
+ Use it for a defect whose fix is isolated. For a small *feature* use AIR; for anything needing a
7
+ design decision use SPIR.
6
8
 
7
- Use BUGFIX when a bug is reported as a GitHub Issue and:
9
+ ## The state machine
8
10
 
9
- - The reproduction is clear (or inferable) and the root cause is isolated
10
- - The fix is small (guideline: < 300 LOC net diff) and contained to one area
11
- - No architectural changes or new design decisions are needed
12
-
13
- Escalate to **SPIR** (or another heavier protocol) instead when:
14
-
15
- - It is actually a feature request, not a bug
16
- - The root cause reveals a deeper architectural issue
17
- - The fix needs design review, spans multiple components, or clearly exceeds ~300 LOC
18
-
19
- ## Phases
20
-
21
- ```
22
- investigate → fix → pr
11
+ ```json
12
+ {{> protocols/bugfix/protocol.json}}
23
13
  ```
24
14
 
25
- ### Investigate
26
-
27
- Read the issue, reproduce the bug, and identify the root cause. Confirm the fix fits BUGFIX scope. If it does not, signal `BLOCKED` and recommend escalation to the architect (`afx send architect "..."`). No code in this phase.
28
-
29
- ### Fix
15
+ ## Phases
30
16
 
31
- Apply the minimal change that resolves the root cause, and add a regression test that fails without the fix and passes with it. Keep it focused: do not refactor surrounding code, do not fix unrelated bugs (file separate issues), do not add features. Run the build and tests (porch's `checks` block runs `npm run build` and `npm test`).
17
+ **Investigate** — reproduce the bug and identify the root cause. **No code in this phase.**
18
+ Confirm the fix fits BUGFIX scope; if it does not, signal `BLOCKED` and recommend escalation
19
+ rather than growing the project quietly.
32
20
 
33
- Commit with the issue-driven format:
21
+ **Fix** — the minimal change that resolves the root cause, plus a regression test that **fails
22
+ without the fix and passes with it**. A test that passes either way documents nothing. Do not
23
+ refactor surrounding code, fix unrelated bugs (file separate issues), or add features.
34
24
 
35
25
  ```
36
- [Bugfix #<N>] Fix: <what was fixed>
37
- [Bugfix #<N>] Test: <regression test added>
26
+ [Bugfix #42] Fix: URL-encode username before API call
27
+ [Bugfix #42] Test: regression for unencoded username
38
28
  ```
39
29
 
40
- ### PR (gated by `pr`)
30
+ **PR** — open with `gh pr create`, body carrying Summary, Root Cause, Fix and Test Plan plus
31
+ `Fixes #<N>` so the issue closes on merge. Run one CMAP pass (Gemini, Codex, Claude), record
32
+ each verdict, and address or rebut every `REQUEST_CHANGES`. Notify the architect with the
33
+ verdicts, then `porch done <id>` and wait.
41
34
 
42
- 1. Push the branch and open a PR with `gh pr create`. The body includes Summary, Root Cause, Fix, and Test Plan, plus `Fixes #<N>` so the issue auto-closes on merge.
43
- 2. Run a multi-agent CMAP review on the PR (Gemini, Codex, Claude) and record each verdict. Address or rebut any `REQUEST_CHANGES`; add a regression test if a real defect surfaced.
44
- 3. Notify the architect: `afx send architect "PR #<M> ready for review (fixes #<N>). CMAP: gemini=..., codex=..., claude=..."`.
45
- 4. Run `porch done <id>` to request the `pr` gate, then wait. **The merge is gated by porch state, never by typed prose in your pane.**
46
- 5. The human reviews the PR and the CMAP results on GitHub, then approves the gate: `porch approve <id> pr --a-human-explicitly-approved-this`.
47
- 6. porch wakes the builder with a merge task. Merge with `gh pr merge --merge` (do **not** pass `--delete-branch`: the builder is checked out on this branch in a worktree), then run `porch done <id>` and notify the architect that it is merged and ready for cleanup.
35
+ Merge with `gh pr merge --merge`. **Do not pass `--delete-branch`** — the builder is checked out
36
+ on that branch in a worktree, and deleting it out from under them breaks the worktree.
48
37
 
49
- ## Gate
38
+ ## The gate exists to make merge authorization structural
50
39
 
51
- BUGFIX has one human gate, `pr`, on the merge step. It exists so the merge trigger is structured porch state (approved or not), not free-text typed into the builder's pane. This eliminates the self-merge bug class: a builder cannot infer authorization from ambiguous input.
40
+ BUGFIX has one human gate, `pr`. Its purpose is that the merge trigger is **porch state** —
41
+ approved or not — rather than free text typed into the builder's pane. That closes the
42
+ self-merge bug class: a builder cannot infer authorization from ambiguous prose.
52
43
 
53
- ## Multi-Agent Consultation
44
+ ## Consultation
54
45
 
55
- A single CMAP pass at the PR (Gemini, Codex, Claude). There is no per-phase consultation: the issue is the spec and the fix is small, so review effort concentrates on the final PR.
46
+ One CMAP pass at the PR. No per-phase consultation: the issue is the spec and the fix is small,
47
+ so review effort concentrates where it can still change the outcome.
56
48
 
57
49
  ## Scope
58
50
 
59
- The < 300 LOC threshold is a **guideline**, measured as net diff (additions + deletions) anchored at the merge-base with the default branch. A well-contained 350-LOC fix is fine; a 200-LOC fix smeared across ten files may warrant escalation.
51
+ The <300 LOC threshold is a **guideline**, measured as net diff (additions + deletions) against
52
+ the merge-base with the default branch. A well-contained 350-line fix is fine; a 200-line fix
53
+ smeared across ten files probably warrants escalation.
60
54
 
61
55
  ## Escalation
62
56
 
63
- If, mid-fix, the change outgrows BUGFIX (architectural impact, multiple components, unclear root cause after investigation, or more than ~300 LOC), notify the architect with specifics and recommend escalating to SPIR. Do not silently expand scope.
64
-
65
- ## Branch Naming
57
+ If the change outgrows BUGFIX mid-flight — architectural impact, multiple components, unclear
58
+ root cause after investigation — notify the architect with specifics and recommend SPIR. **Do
59
+ not silently expand scope.**
66
60
 
67
- ```
68
- builder/bugfix-<issue-number>-<slug>
69
- ```
70
-
71
- ## Edge Cases
61
+ ## Edge cases
72
62
 
73
63
  | Scenario | Action |
74
64
  |---|---|
75
- | Cannot reproduce | Document the attempts in an issue comment, ask the reporter for detail, notify the architect |
76
- | Fix outgrows scope (architectural / multi-component / > ~300 LOC) | Notify the architect, recommend escalation; do not proceed |
77
- | Unrelated test failures | Out of scope: note them for the architect, do not fix them here |
78
- | Multiple bugs in one issue | Fix only the primary bug; file separate issues for the rest |
65
+ | Cannot reproduce | Document the attempts on the issue, ask the reporter for detail, notify the architect |
66
+ | Fix outgrows scope | Notify the architect and recommend escalation; do not proceed |
67
+ | Unrelated test failures | Out of scope — note them for the architect, do not fix here |
68
+ | Multiple bugs in one issue | Fix the primary one; file separate issues for the rest |
69
+
70
+ ## Branch naming
71
+
72
+ `builder/bugfix-<issue>-<slug>`
@@ -1,82 +1,49 @@
1
1
  # {{protocol_name}} Builder ({{mode}} mode)
2
2
 
3
- You are executing a disciplined experiment.
3
+ You are implementing {{input_description}}.
4
4
 
5
5
  {{#if mode_soft}}
6
6
  ## Mode: SOFT
7
- You are running in SOFT mode. This means:
8
- - You follow the EXPERIMENT protocol yourself (no porch orchestration)
9
- - The architect monitors your work and verifies you're adhering to the protocol
10
- - Document your findings thoroughly
7
+
8
+ You follow the protocol yourself; the architect verifies compliance.
11
9
  {{/if}}
12
10
 
13
11
  {{#if mode_strict}}
14
12
  ## Mode: STRICT
15
- You are running in STRICT mode. This means:
16
- - Porch orchestrates your work
17
- - Run: `porch next` to get your next tasks
18
- - Follow porch signals and gate approvals
19
-
20
- ### ABSOLUTE RESTRICTIONS (STRICT MODE)
21
- - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
22
- - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
23
- - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
13
+
14
+ Porch orchestrates. `porch next` gives you tasks; `porch done` signals completion. Never
15
+ hand-edit `status.yaml` — only porch commands modify project state.
24
16
  {{/if}}
25
17
 
26
18
  ## Protocol
27
- Follow the EXPERIMENT protocol. Read and internalize the protocol before starting any work. The full protocol text is included below under **## Protocol Reference (full text)**.
28
-
29
- ## EXPERIMENT Overview
30
- The EXPERIMENT protocol ensures disciplined experimentation:
31
19
 
32
- 1. **Hypothesis Phase**: Define what you're testing and success criteria
33
- 2. **Design Phase**: Plan the experiment approach
34
- 3. **Execute Phase**: Run the experiment and gather data
35
- 4. **Analyze Phase**: Evaluate results and draw conclusions
20
+ The full protocol text is inlined below under **## Protocol Reference (full text)** — you do not
21
+ need to fetch it.
36
22
 
37
- {{#if task}}
38
23
  ## Experiment Focus
24
+
39
25
  {{task_text}}
40
- {{/if}}
41
26
 
42
27
  ## Key Principles
43
- - Start with a clear, falsifiable hypothesis
44
- - Define success/failure criteria upfront
45
- - Keep scope minimal for quick iteration
46
- - Document findings regardless of outcome
47
- - Separate experiment artifacts from production code
48
28
 
49
- ## If You Open a PR
29
+ - Start with a **clear, falsifiable hypothesis** and define success/failure criteria **upfront** —
30
+ an experiment scored after the fact always succeeds
31
+ - Keep scope minimal for fast iteration
32
+ - **Document findings regardless of outcome.** A directory containing only successes has been
33
+ curated, not run
34
+ - Keep experiment artifacts separate from production code
50
35
 
51
- Most experiments are committed to a branch without a PR, but if you do open one
52
- to integrate findings and the experiment was triggered by a GitHub issue:
53
-
54
- **PR body requirements**: The PR body MUST include `Closes #<N>` (for feature
55
- issues) or `Fixes #<N>` (for bug issues) for the driving issue so GitHub
56
- auto-closes it on merge. If the PR closes multiple issues, include one keyword
57
- per issue.
58
-
59
- **Exception**: if this PR only partially addresses the issue (e.g. experiment
60
- validates an approach but production implementation is deferred), use
61
- `Refs #<N>` or `Part of #<N>` instead — the issue stays open until a follow-up
62
- PR closes it.
63
-
64
- ## Handling Flaky Tests
65
-
66
- If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
67
- 1. **DO NOT** edit `status.yaml` to bypass checks
68
- 2. **DO NOT** skip porch checks or use any workaround to avoid the failure
69
- 3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
70
- 4. **DO** document each skipped flaky test in your review under a `## Flaky Tests` section
71
- 5. Commit the skip and continue with your work
36
+ ## If You Open a PR
72
37
 
73
- ## Getting Started
74
- 1. Read the EXPERIMENT protocol document
75
- 2. Define your hypothesis clearly
76
- 3. Follow the phases in order
38
+ Most experiments are committed to a branch without a PR. If you do open one and the experiment
39
+ came from a GitHub issue, the body **must** carry `Closes #<N>` (feature) or `Fixes #<N>` (bug)
40
+ so GitHub auto-closes it on merge — one keyword per issue if several.
77
41
 
78
- ---
42
+ **Exception**: if the PR only *partially* addresses the issue (the experiment validates an
43
+ approach but the production implementation is deferred), use `Refs #<N>` or `Part of #<N>` so
44
+ the issue stays open for the follow-up.
79
45
 
80
- ## Protocol Reference (full text)
46
+ ## Notifications
81
47
 
82
- {{protocol_reference}}
48
+ The architect is not watching. `afx send architect "..."` at each of: gate reached, PR ready, PR
49
+ merged, blocked.
@@ -1,203 +1,37 @@
1
1
  # EXPERIMENT Protocol
2
2
 
3
- ## Overview
3
+ A disciplined experiment: state the hypothesis before running it, record what actually happened,
4
+ and keep the result whichever way it goes.
4
5
 
5
- Disciplined experimentation: Each experiment gets its own directory with `notes.md` tracking goals, code, and results.
6
+ Use it for evaluating models or libraries, proof-of-concept work, and technique comparisons —
7
+ questions that should be settled by evidence rather than by argument.
6
8
 
7
- **Core Principle**: Document what you're trying, what you did, and what you learned.
8
-
9
- ## When to Use
10
-
11
- **Use for**: Testing approaches, evaluating models, prototyping, proof-of-concept work, research spikes
12
-
13
- **Skip for**: Production code (use SPIR), simple one-off scripts
14
-
15
- ## Structure
16
-
17
- ```
18
- experiments/
19
- ├── 1_descriptive_name/
20
- │ ├── notes.md # Goal, code, results
21
- │ ├── experiment.py # Your experiment code
22
- │ └── data/
23
- │ ├── input/ # Input data
24
- │ └── output/ # Results, plots, etc.
25
- └── 2_another_experiment/
26
- ├── notes.md
27
- └── ...
28
- ```
29
-
30
- ## Workflow
31
-
32
- ### 1. Create Experiment Directory
33
-
34
- ```bash
35
- # Create numbered directory
36
- mkdir -p experiments/1_experiment_name
37
- cd experiments/1_experiment_name
38
-
39
- # Initialize notes.md from template
40
- touch notes.md # then fill it from the embedded template at the end of this protocol
41
- ```
42
-
43
- Or ask your AI assistant: "Create a new experiment for [goal]"
44
-
45
- ### 2. Document the Goal
46
-
47
- Before writing code, clearly state what you're trying to learn in `notes.md`:
48
-
49
- ```markdown
50
- ## Goal
51
-
52
- What specific question are you trying to answer?
53
- What hypothesis are you testing?
54
- ```
55
-
56
- ### 3. Write Experiment Code
57
-
58
- - Keep it simple - experiments don't need production polish
59
- - Reuse existing project modules where possible
60
- - Any structure is fine - focus on learning, not architecture
61
-
62
- **Dependencies**: If your experiment requires libraries not in the main project:
63
- 1. Do NOT add them to the main project's `requirements.txt` or `pyproject.toml`
64
- 2. Create a `requirements.txt` inside your experiment folder
65
- 3. Document installation in `notes.md`
66
-
67
- ### 4. Run and Observe
68
-
69
- Execute your experiment and capture results:
70
- - Save output files to `data/output/`
71
- - Take screenshots of visualizations
72
- - Log key metrics
73
-
74
- ### 5. Document Results
75
-
76
- Update `notes.md` with:
77
- - What happened (actual results)
78
- - What you learned (insights)
79
- - What's next (follow-up actions)
80
-
81
- ### 6. Commit
82
-
83
- ```bash
84
- git add experiments/1_experiment_name/
85
- git commit -m "[Experiment 1] Brief description of findings"
86
- ```
87
-
88
- ## Best Practices
89
-
90
- ### Keep It Simple
91
- - Experiments don't need production polish
92
- - Skip comprehensive error handling
93
- - Focus on answering the question
94
-
95
- ### Document Honestly
96
- - Include failures - they're valuable learnings
97
- - Note dead ends and why they didn't work
98
- - Be specific about what surprised you
99
-
100
- ### Track Time Investment
101
- - Wall clock time: Total elapsed time
102
- - Developer time: Active working time (excluding waiting)
103
- - Helps estimate future similar work
104
-
105
- ### Use Project Modules
106
- - Don't duplicate existing code
107
- - Import from your `src/` directory
108
- - Experiments validate approaches, not reimplement them
109
-
110
- ### Commit Progress
111
- - Use `[Experiment ####]` commit prefix
112
- - Commit intermediate results
113
- - Include output files when reasonable
114
-
115
- ## Integration with Other Protocols
116
-
117
- ### Experiment → SPIR
118
- When an experiment validates an approach for production use:
119
-
120
- 1. Create a specification referencing the experiment
121
- 2. Link to experiment results as evidence
122
- 3. Use experiment code as reference implementation
123
-
124
- Example spec reference:
125
- ```markdown
126
- ## Background
127
-
128
- Experiment 5 validated that [approach] achieves [results].
129
- See: experiments/5_validation_test/notes.md
130
- ```
131
-
132
- ## Numbering Convention
133
-
134
- Use four-digit sequential numbering (consistent with project list):
135
- - `1_`, `2_`, `3_`...
136
- - Shared sequence across all experiments
137
- - Descriptive name after the number (snake_case)
138
-
139
- Examples:
140
- - `1_api_response_caching`
141
- - `2_model_comparison`
142
- - `3_performance_baseline`
143
-
144
- ## Git Workflow
145
-
146
- ### Commits
147
- ```
148
- [Experiment 1] Initial setup and goal
149
- [Experiment 1] Add baseline measurements
150
- [Experiment 1] Complete - caching improves latency 40%
151
- ```
152
-
153
- ### When to Commit
154
- - After setting up the experiment
155
- - After significant findings
156
- - When completing the experiment
157
-
158
- **Data Management**:
159
- - Include `data/output/` ONLY if files are small (summary metrics, small plots)
160
- - Do NOT commit large datasets, binary model checkpoints, or heavy artifacts
161
- - Add appropriate entries to `.gitignore` for large files
162
- - Consider storing large outputs externally and linking in notes
163
-
164
- ## Example Experiment
9
+ ## The state machine
165
10
 
166
- ```
167
- experiments/1_caching_strategy/
168
- ├── notes.md
169
- ├── benchmark.py
170
- ├── cache_test.py
171
- └── data/
172
- ├── input/
173
- │ └── sample_requests.json
174
- └── output/
175
- ├── results.csv
176
- └── latency_chart.png
11
+ ```json
12
+ {{> protocols/experiment/protocol.json}}
177
13
  ```
178
14
 
179
- **notes.md excerpt:**
180
- ```markdown
181
- # Experiment 1: Caching Strategy Evaluation
15
+ ## Structure
182
16
 
183
- **Status**: Complete
17
+ Each experiment gets a numbered directory under `codev/experiments/` with a `notes.md` recording
18
+ the hypothesis, method, results and conclusion.
184
19
 
185
- **Date**: 2024-01-15
20
+ ## Notes structure
186
21
 
187
- ## Goal
188
- Determine if Redis caching improves API response times for repeated queries.
22
+ `notes.md` uses this structure:
189
23
 
190
- ## Results
191
- - 40% latency reduction for cached queries
192
- - Cache hit rate: 73% after warm-up
193
- - Memory usage: 50MB for 10k cached responses
24
+ {{> protocols/experiment/templates/notes.md}}
194
25
 
195
- ## Next Steps
196
- Create SPIR spec for production caching implementation.
197
- ```
26
+ ## The discipline that makes it worth doing
198
27
 
199
- ## Template: notes.md
28
+ **Write the hypothesis and the success criteria before running anything.** An experiment scored
29
+ after the fact always succeeds — you discover the criterion the result happens to meet.
200
30
 
201
- Create `notes.md` with the following content:
31
+ **Record negative results.** "We tried X and it did not work, here is why" is the output that
32
+ saves the next person a week. An experiment directory containing only successes is a directory
33
+ that has been curated rather than run.
202
34
 
203
- {{> protocols/experiment/templates/notes.md}}
35
+ **Keep the experiment separate from production code.** Experimental code answers a question; it
36
+ has not earned the standards production code is held to, and promoting it silently is how a
37
+ proof of concept becomes a maintenance burden nobody chose.
@@ -1,97 +1,37 @@
1
1
  # Experiment ####: Name
2
2
 
3
- **Status**: In Progress | Complete | Disproved | Aborted
4
-
5
- **Date**: YYYY-MM-DD
3
+ **Status**: In Progress | Complete | Disproved | Aborted · **Date**: YYYY-MM-DD
6
4
 
7
5
  ## Goal
8
6
 
9
- What are you trying to learn or test? Be specific about:
10
- - The question you're answering
11
- - The hypothesis you're testing
12
- - Success criteria (how will you know if it worked?)
13
-
14
- ## Effort
15
-
16
- **Approximate time spent**: [e.g., "4 hours"]
17
-
18
- *(Optional: Break down into setup, coding, analysis if helpful)*
7
+ The question you are answering, the hypothesis you are testing, and the success criteria — how you will know if it worked.
19
8
 
20
9
  ## Approach
21
10
 
22
- Brief description of the approach being tested:
23
- - Key technique or method
24
- - Why this approach was chosen
25
- - Any alternatives considered
11
+ The technique being tested, why it was chosen, and any alternatives considered.
26
12
 
27
13
  ## Environment & Reproduction
28
14
 
29
- **How to run**:
30
- ```bash
31
- # Command to reproduce results
32
- python experiment.py --input data/input/sample.json
33
- ```
34
-
35
- **Dependencies** (if different from main project):
36
- - List any additional packages required
37
- - Or reference: `pip install -r requirements.txt`
38
-
39
- **Environment notes**:
40
- - Python version, key library versions if relevant
41
- - Any seeds or configuration needed for reproducibility
15
+ How to run it (the exact command), any dependencies beyond the main project, and the version/seed/config notes needed to reproduce the result.
42
16
 
43
17
  ## Code
44
18
 
45
- List your experiment files:
46
- - [`experiment.py`](experiment.py) - Brief description
47
- - [Other files as needed]
19
+ The experiment files, each with a one-line description.
48
20
 
49
21
  ## Results
50
22
 
51
- ### Summary
52
-
53
- One-paragraph summary of key findings.
54
-
55
- ### Key Findings
56
-
57
- 1. **Finding one**: Description and significance
58
- 2. **Finding two**: Description and significance
59
- 3. **Finding three**: Description and significance
60
-
61
- ### Metrics
23
+ A one-paragraph summary, then the key findings and the metrics that support them.
62
24
 
63
25
  | Metric | Value | Notes |
64
26
  |--------|-------|-------|
65
- | Metric 1 | Value | Context |
66
- | Metric 2 | Value | Context |
67
-
68
- ### Output Files
69
-
70
- - `data/output/results.csv` - Raw results data
71
- - `data/output/chart.png` - Visualization of findings
27
+ | | | |
72
28
 
73
- ## What Worked
29
+ Output artifacts (data, charts) with their paths.
74
30
 
75
- - List things that went well
76
- - Approaches that proved effective
77
- - Useful discoveries
31
+ ## What Worked / What Didn't
78
32
 
79
- ## What Didn't Work
80
-
81
- - Failed approaches (and why)
82
- - Dead ends encountered
83
- - Surprising obstacles
33
+ What proved effective, and the failed approaches or dead ends (with why).
84
34
 
85
35
  ## Next Steps
86
36
 
87
- Based on these findings:
88
-
89
- 1. **Immediate**: What should happen right after this experiment?
90
- 2. **Follow-up experiments**: What new questions emerged?
91
- 3. **Production path**: If validated, what's needed for production? (SPIR spec?)
92
-
93
- ## References
94
-
95
- - Links to relevant documentation
96
- - Related experiments
97
- - External resources consulted
37
+ The immediate next action, any follow-up experiments the findings raised, and — if validated — the production path (e.g. a SPIR spec).
@@ -1,62 +1,41 @@
1
1
  # {{protocol_name}} Builder ({{mode}} mode)
2
2
 
3
- You are executing the MAINTAIN protocol to clean up and synchronize the codebase.
3
+ You are implementing {{input_description}}.
4
4
 
5
5
  {{#if mode_soft}}
6
6
  ## Mode: SOFT
7
- You are running in SOFT mode. This means:
8
- - You follow the MAINTAIN protocol yourself (no porch orchestration)
9
- - The architect monitors your work and verifies you're adhering to the protocol
10
- - Work through each step methodically
7
+
8
+ You follow the protocol yourself; the architect verifies compliance.
11
9
  {{/if}}
12
10
 
13
11
  {{#if mode_strict}}
14
12
  ## Mode: STRICT
15
- You are running in STRICT mode. This means:
16
- - Porch orchestrates your work
17
- - Run: `porch next` to get your next tasks
18
- - Follow porch signals and gate approvals
19
-
20
- ### ABSOLUTE RESTRICTIONS (STRICT MODE)
21
- - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
22
- - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
13
+
14
+ Porch orchestrates. `porch next` gives you tasks; `porch done` signals completion. Never
15
+ hand-edit `status.yaml` — only porch commands modify project state.
23
16
  {{/if}}
24
17
 
25
18
  ## Protocol
26
- Follow the MAINTAIN protocol. Read and internalize the protocol before starting any work. The full protocol text is included below under **## Protocol Reference (full text)**.
19
+
20
+ The full protocol text is inlined below under **## Protocol Reference (full text)** — you do not
21
+ need to fetch it.
27
22
 
28
23
  ## MAINTAIN Overview
29
24
 
30
- Two phases:
31
- 1. **Maintain**: Single pass — audit findings, clean dead code, sync docs, verify build
32
- 2. **Review**: Create PR with 3-way consultation
25
+ Two phases: **Maintain** (one pass — audit, clean, sync docs, verify build) then **Review**
26
+ (PR with 3-way consultation).
33
27
 
34
28
  ## Key Rules
35
- - Use soft deletion (move to `codev/maintain/.trash/`)
36
- - Verify build passes after each removal (`cd packages/codev && pnpm build && pnpm test`)
37
- - Update documentation to match current architecture
38
- - Don't remove anything actively used
39
- - One removal at a time — commit after each
40
- - Document every deletion with justification
41
- - Never use `git add -A` or `git add .`
42
-
43
- ## Handling Flaky Tests
44
-
45
- If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
46
- 1. **DO NOT** edit `status.yaml` to bypass checks
47
- 2. **DO NOT** skip porch checks or use any workaround to avoid the failure
48
- 3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
49
- 4. **DO** document each skipped flaky test in your maintenance run file
50
- 5. Commit the skip and continue with your work
51
-
52
- ## Getting Started
53
- 1. Read the MAINTAIN protocol document
54
- 2. Run `porch next` to get your first task
55
- 3. Work through audit → clean → sync → verify in a single pass
56
- 4. Document everything in the maintenance run file
57
-
58
- ---
59
-
60
- ## Protocol Reference (full text)
61
-
62
- {{protocol_reference}}
29
+
30
+ - **Soft-delete**: move removals to `codev/maintain/.trash/`, do not delete outright
31
+ - Verify the build after each removal (`cd packages/codev && pnpm build && pnpm test`)
32
+ - **One removal at a time, commit after each** — a bundled cleanup commit cannot be bisected
33
+ - Treat every audit hit as a *candidate*: a detector cannot tell "vestigial" from "used by a
34
+ path you did not search". Confirm with a targeted grep before removing
35
+ - Don't remove anything actively used; document every deletion with its justification
36
+ - Never `git add -A` / `--all` / `.` — stage each file explicitly by path
37
+
38
+ ## Notifications
39
+
40
+ The architect is not watching. `afx send architect "..."` at each of: gate reached, PR ready, PR
41
+ merged, blocked.