agent-bober 0.11.6 → 0.15.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 (570) hide show
  1. package/CHANGELOG.md +311 -0
  2. package/README.md +124 -9
  3. package/agents/bober-architect.md +38 -0
  4. package/agents/bober-code-reviewer.md +236 -0
  5. package/agents/bober-curator.md +37 -0
  6. package/agents/bober-deployer.md +267 -0
  7. package/agents/bober-diagnoser.md +289 -0
  8. package/agents/bober-evaluator.md +127 -1
  9. package/agents/bober-generator.md +122 -3
  10. package/agents/bober-planner.md +293 -32
  11. package/agents/bober-postmortemer.md +185 -0
  12. package/agents/bober-researcher.md +38 -0
  13. package/dist/cli/commands/approve.d.ts +17 -0
  14. package/dist/cli/commands/approve.d.ts.map +1 -0
  15. package/dist/cli/commands/approve.js +64 -0
  16. package/dist/cli/commands/approve.js.map +1 -0
  17. package/dist/cli/commands/audit-show.d.ts +14 -0
  18. package/dist/cli/commands/audit-show.d.ts.map +1 -0
  19. package/dist/cli/commands/audit-show.js +85 -0
  20. package/dist/cli/commands/audit-show.js.map +1 -0
  21. package/dist/cli/commands/config.d.ts +10 -0
  22. package/dist/cli/commands/config.d.ts.map +1 -0
  23. package/dist/cli/commands/config.js +73 -0
  24. package/dist/cli/commands/config.js.map +1 -0
  25. package/dist/cli/commands/eval.js +6 -6
  26. package/dist/cli/commands/eval.js.map +1 -1
  27. package/dist/cli/commands/graph.d.ts +8 -0
  28. package/dist/cli/commands/graph.d.ts.map +1 -0
  29. package/dist/cli/commands/graph.js +219 -0
  30. package/dist/cli/commands/graph.js.map +1 -0
  31. package/dist/cli/commands/impact.d.ts +19 -0
  32. package/dist/cli/commands/impact.d.ts.map +1 -0
  33. package/dist/cli/commands/impact.js +191 -0
  34. package/dist/cli/commands/impact.js.map +1 -0
  35. package/dist/cli/commands/incident.d.ts +19 -0
  36. package/dist/cli/commands/incident.d.ts.map +1 -0
  37. package/dist/cli/commands/incident.js +324 -0
  38. package/dist/cli/commands/incident.js.map +1 -0
  39. package/dist/cli/commands/init.js +82 -3
  40. package/dist/cli/commands/init.js.map +1 -1
  41. package/dist/cli/commands/list-approvals.d.ts +16 -0
  42. package/dist/cli/commands/list-approvals.d.ts.map +1 -0
  43. package/dist/cli/commands/list-approvals.js +57 -0
  44. package/dist/cli/commands/list-approvals.js.map +1 -0
  45. package/dist/cli/commands/onboard.d.ts +3 -0
  46. package/dist/cli/commands/onboard.d.ts.map +1 -0
  47. package/dist/cli/commands/onboard.js +190 -0
  48. package/dist/cli/commands/onboard.js.map +1 -0
  49. package/dist/cli/commands/plan.d.ts +12 -0
  50. package/dist/cli/commands/plan.d.ts.map +1 -1
  51. package/dist/cli/commands/plan.js +232 -37
  52. package/dist/cli/commands/plan.js.map +1 -1
  53. package/dist/cli/commands/playbook.d.ts +17 -0
  54. package/dist/cli/commands/playbook.d.ts.map +1 -0
  55. package/dist/cli/commands/playbook.js +123 -0
  56. package/dist/cli/commands/playbook.js.map +1 -0
  57. package/dist/cli/commands/postmortem.d.ts +12 -0
  58. package/dist/cli/commands/postmortem.d.ts.map +1 -0
  59. package/dist/cli/commands/postmortem.js +67 -0
  60. package/dist/cli/commands/postmortem.js.map +1 -0
  61. package/dist/cli/commands/reject.d.ts +17 -0
  62. package/dist/cli/commands/reject.d.ts.map +1 -0
  63. package/dist/cli/commands/reject.js +52 -0
  64. package/dist/cli/commands/reject.js.map +1 -0
  65. package/dist/cli/commands/rollback.d.ts +21 -0
  66. package/dist/cli/commands/rollback.d.ts.map +1 -0
  67. package/dist/cli/commands/rollback.js +90 -0
  68. package/dist/cli/commands/rollback.js.map +1 -0
  69. package/dist/cli/commands/run.d.ts +9 -0
  70. package/dist/cli/commands/run.d.ts.map +1 -1
  71. package/dist/cli/commands/run.js +31 -2
  72. package/dist/cli/commands/run.js.map +1 -1
  73. package/dist/cli/commands/sprint.d.ts.map +1 -1
  74. package/dist/cli/commands/sprint.js +8 -8
  75. package/dist/cli/commands/sprint.js.map +1 -1
  76. package/dist/cli/commands/telemetry.d.ts +16 -0
  77. package/dist/cli/commands/telemetry.d.ts.map +1 -0
  78. package/dist/cli/commands/telemetry.js +152 -0
  79. package/dist/cli/commands/telemetry.js.map +1 -0
  80. package/dist/cli/commands/worktree.d.ts +12 -0
  81. package/dist/cli/commands/worktree.d.ts.map +1 -0
  82. package/dist/cli/commands/worktree.js +57 -0
  83. package/dist/cli/commands/worktree.js.map +1 -0
  84. package/dist/cli/index.js +73 -2
  85. package/dist/cli/index.js.map +1 -1
  86. package/dist/config/defaults.d.ts.map +1 -1
  87. package/dist/config/defaults.js +27 -0
  88. package/dist/config/defaults.js.map +1 -1
  89. package/dist/config/index.d.ts +1 -1
  90. package/dist/config/index.d.ts.map +1 -1
  91. package/dist/config/index.js +4 -0
  92. package/dist/config/index.js.map +1 -1
  93. package/dist/config/loader.d.ts.map +1 -1
  94. package/dist/config/loader.js +18 -1
  95. package/dist/config/loader.js.map +1 -1
  96. package/dist/config/schema.d.ts +1016 -96
  97. package/dist/config/schema.d.ts.map +1 -1
  98. package/dist/config/schema.js +147 -0
  99. package/dist/config/schema.js.map +1 -1
  100. package/dist/contracts/eval-result.d.ts +38 -38
  101. package/dist/contracts/index.d.ts +2 -2
  102. package/dist/contracts/index.d.ts.map +1 -1
  103. package/dist/contracts/index.js +8 -4
  104. package/dist/contracts/index.js.map +1 -1
  105. package/dist/contracts/spec.d.ts +335 -40
  106. package/dist/contracts/spec.d.ts.map +1 -1
  107. package/dist/contracts/spec.js +210 -18
  108. package/dist/contracts/spec.js.map +1 -1
  109. package/dist/contracts/sprint-contract.d.ts +155 -88
  110. package/dist/contracts/sprint-contract.d.ts.map +1 -1
  111. package/dist/contracts/sprint-contract.js +176 -29
  112. package/dist/contracts/sprint-contract.js.map +1 -1
  113. package/dist/evaluators/builtin/api-check.js +1 -1
  114. package/dist/evaluators/builtin/api-check.js.map +1 -1
  115. package/dist/graph/artifact-store.d.ts +14 -0
  116. package/dist/graph/artifact-store.d.ts.map +1 -0
  117. package/dist/graph/artifact-store.js +100 -0
  118. package/dist/graph/artifact-store.js.map +1 -0
  119. package/dist/graph/cli.d.ts +49 -0
  120. package/dist/graph/cli.d.ts.map +1 -0
  121. package/dist/graph/cli.js +140 -0
  122. package/dist/graph/cli.js.map +1 -0
  123. package/dist/graph/client.d.ts +64 -0
  124. package/dist/graph/client.d.ts.map +1 -0
  125. package/dist/graph/client.js +216 -0
  126. package/dist/graph/client.js.map +1 -0
  127. package/dist/graph/fallback.d.ts +13 -0
  128. package/dist/graph/fallback.d.ts.map +1 -0
  129. package/dist/graph/fallback.js +57 -0
  130. package/dist/graph/fallback.js.map +1 -0
  131. package/dist/graph/hook-handler.d.ts +50 -0
  132. package/dist/graph/hook-handler.d.ts.map +1 -0
  133. package/dist/graph/hook-handler.js +217 -0
  134. package/dist/graph/hook-handler.js.map +1 -0
  135. package/dist/graph/incidents.d.ts +59 -0
  136. package/dist/graph/incidents.d.ts.map +1 -0
  137. package/dist/graph/incidents.js +22 -0
  138. package/dist/graph/incidents.js.map +1 -0
  139. package/dist/graph/mcp-client.d.ts +51 -0
  140. package/dist/graph/mcp-client.d.ts.map +1 -0
  141. package/dist/graph/mcp-client.js +285 -0
  142. package/dist/graph/mcp-client.js.map +1 -0
  143. package/dist/graph/onboarding-composer.d.ts +30 -0
  144. package/dist/graph/onboarding-composer.d.ts.map +1 -0
  145. package/dist/graph/onboarding-composer.js +275 -0
  146. package/dist/graph/onboarding-composer.js.map +1 -0
  147. package/dist/graph/pipeline-lifecycle.d.ts +86 -0
  148. package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
  149. package/dist/graph/pipeline-lifecycle.js +329 -0
  150. package/dist/graph/pipeline-lifecycle.js.map +1 -0
  151. package/dist/graph/preflight-budgets.d.ts +52 -0
  152. package/dist/graph/preflight-budgets.d.ts.map +1 -0
  153. package/dist/graph/preflight-budgets.js +78 -0
  154. package/dist/graph/preflight-budgets.js.map +1 -0
  155. package/dist/graph/preflight-injector.d.ts +116 -0
  156. package/dist/graph/preflight-injector.d.ts.map +1 -0
  157. package/dist/graph/preflight-injector.js +538 -0
  158. package/dist/graph/preflight-injector.js.map +1 -0
  159. package/dist/graph/prereq.d.ts +12 -0
  160. package/dist/graph/prereq.d.ts.map +1 -0
  161. package/dist/graph/prereq.js +61 -0
  162. package/dist/graph/prereq.js.map +1 -0
  163. package/dist/graph/prompts.d.ts +42 -0
  164. package/dist/graph/prompts.d.ts.map +1 -0
  165. package/dist/graph/prompts.js +80 -0
  166. package/dist/graph/prompts.js.map +1 -0
  167. package/dist/graph/sandbox.d.ts +19 -0
  168. package/dist/graph/sandbox.d.ts.map +1 -0
  169. package/dist/graph/sandbox.js +25 -0
  170. package/dist/graph/sandbox.js.map +1 -0
  171. package/dist/graph/token-usage.d.ts +21 -0
  172. package/dist/graph/token-usage.d.ts.map +1 -0
  173. package/dist/graph/token-usage.js +22 -0
  174. package/dist/graph/token-usage.js.map +1 -0
  175. package/dist/graph/types.d.ts +129 -0
  176. package/dist/graph/types.d.ts.map +1 -0
  177. package/dist/graph/types.js +12 -0
  178. package/dist/graph/types.js.map +1 -0
  179. package/dist/incident/orchestrator.d.ts +168 -0
  180. package/dist/incident/orchestrator.d.ts.map +1 -0
  181. package/dist/incident/orchestrator.js +279 -0
  182. package/dist/incident/orchestrator.js.map +1 -0
  183. package/dist/incident/playbook-search.d.ts +67 -0
  184. package/dist/incident/playbook-search.d.ts.map +1 -0
  185. package/dist/incident/playbook-search.js +288 -0
  186. package/dist/incident/playbook-search.js.map +1 -0
  187. package/dist/incident/postmortem.d.ts +44 -0
  188. package/dist/incident/postmortem.d.ts.map +1 -0
  189. package/dist/incident/postmortem.js +486 -0
  190. package/dist/incident/postmortem.js.map +1 -0
  191. package/dist/incident/resolution-verify.d.ts +186 -0
  192. package/dist/incident/resolution-verify.d.ts.map +1 -0
  193. package/dist/incident/resolution-verify.js +210 -0
  194. package/dist/incident/resolution-verify.js.map +1 -0
  195. package/dist/incident/rollback.d.ts +137 -0
  196. package/dist/incident/rollback.d.ts.map +1 -0
  197. package/dist/incident/rollback.js +328 -0
  198. package/dist/incident/rollback.js.map +1 -0
  199. package/dist/incident/timeline.d.ts +147 -0
  200. package/dist/incident/timeline.d.ts.map +1 -0
  201. package/dist/incident/timeline.js +452 -0
  202. package/dist/incident/timeline.js.map +1 -0
  203. package/dist/incident/types.d.ts +335 -0
  204. package/dist/incident/types.d.ts.map +1 -0
  205. package/dist/incident/types.js +158 -0
  206. package/dist/incident/types.js.map +1 -0
  207. package/dist/index.d.ts +3 -3
  208. package/dist/index.d.ts.map +1 -1
  209. package/dist/index.js +3 -3
  210. package/dist/index.js.map +1 -1
  211. package/dist/mcp/event-stream.d.ts +46 -0
  212. package/dist/mcp/event-stream.d.ts.map +1 -0
  213. package/dist/mcp/event-stream.js +421 -0
  214. package/dist/mcp/event-stream.js.map +1 -0
  215. package/dist/mcp/external-client.d.ts +38 -0
  216. package/dist/mcp/external-client.d.ts.map +1 -0
  217. package/dist/mcp/external-client.js +121 -0
  218. package/dist/mcp/external-client.js.map +1 -0
  219. package/dist/mcp/run-manager.d.ts +74 -9
  220. package/dist/mcp/run-manager.d.ts.map +1 -1
  221. package/dist/mcp/run-manager.js +127 -31
  222. package/dist/mcp/run-manager.js.map +1 -1
  223. package/dist/mcp/server.d.ts.map +1 -1
  224. package/dist/mcp/server.js +56 -0
  225. package/dist/mcp/server.js.map +1 -1
  226. package/dist/mcp/tools/abort-run.d.ts +2 -0
  227. package/dist/mcp/tools/abort-run.d.ts.map +1 -0
  228. package/dist/mcp/tools/abort-run.js +62 -0
  229. package/dist/mcp/tools/abort-run.js.map +1 -0
  230. package/dist/mcp/tools/anchor.js +1 -1
  231. package/dist/mcp/tools/anchor.js.map +1 -1
  232. package/dist/mcp/tools/approve-checkpoint.d.ts +2 -0
  233. package/dist/mcp/tools/approve-checkpoint.d.ts.map +1 -0
  234. package/dist/mcp/tools/approve-checkpoint.js +70 -0
  235. package/dist/mcp/tools/approve-checkpoint.js.map +1 -0
  236. package/dist/mcp/tools/brownfield.js +1 -1
  237. package/dist/mcp/tools/brownfield.js.map +1 -1
  238. package/dist/mcp/tools/contracts.js +2 -2
  239. package/dist/mcp/tools/contracts.js.map +1 -1
  240. package/dist/mcp/tools/eval.js +8 -8
  241. package/dist/mcp/tools/eval.js.map +1 -1
  242. package/dist/mcp/tools/get-project-state.d.ts +2 -0
  243. package/dist/mcp/tools/get-project-state.d.ts.map +1 -0
  244. package/dist/mcp/tools/get-project-state.js +107 -0
  245. package/dist/mcp/tools/get-project-state.js.map +1 -0
  246. package/dist/mcp/tools/get-run-status.d.ts +2 -0
  247. package/dist/mcp/tools/get-run-status.d.ts.map +1 -0
  248. package/dist/mcp/tools/get-run-status.js +40 -0
  249. package/dist/mcp/tools/get-run-status.js.map +1 -0
  250. package/dist/mcp/tools/graph-schemas.d.ts +100 -0
  251. package/dist/mcp/tools/graph-schemas.d.ts.map +1 -0
  252. package/dist/mcp/tools/graph-schemas.js +39 -0
  253. package/dist/mcp/tools/graph-schemas.js.map +1 -0
  254. package/dist/mcp/tools/graph.d.ts +19 -0
  255. package/dist/mcp/tools/graph.d.ts.map +1 -0
  256. package/dist/mcp/tools/graph.js +263 -0
  257. package/dist/mcp/tools/graph.js.map +1 -0
  258. package/dist/mcp/tools/incident.d.ts +2 -0
  259. package/dist/mcp/tools/incident.d.ts.map +1 -0
  260. package/dist/mcp/tools/incident.js +246 -0
  261. package/dist/mcp/tools/incident.js.map +1 -0
  262. package/dist/mcp/tools/index.d.ts +38 -18
  263. package/dist/mcp/tools/index.d.ts.map +1 -1
  264. package/dist/mcp/tools/index.js +74 -18
  265. package/dist/mcp/tools/index.js.map +1 -1
  266. package/dist/mcp/tools/list-active-runs.d.ts +2 -0
  267. package/dist/mcp/tools/list-active-runs.d.ts.map +1 -0
  268. package/dist/mcp/tools/list-active-runs.js +35 -0
  269. package/dist/mcp/tools/list-active-runs.js.map +1 -0
  270. package/dist/mcp/tools/list-pending-approvals.d.ts +2 -0
  271. package/dist/mcp/tools/list-pending-approvals.d.ts.map +1 -0
  272. package/dist/mcp/tools/list-pending-approvals.js +40 -0
  273. package/dist/mcp/tools/list-pending-approvals.js.map +1 -0
  274. package/dist/mcp/tools/list-projects.d.ts +2 -0
  275. package/dist/mcp/tools/list-projects.d.ts.map +1 -0
  276. package/dist/mcp/tools/list-projects.js +101 -0
  277. package/dist/mcp/tools/list-projects.js.map +1 -0
  278. package/dist/mcp/tools/list-specs.d.ts +2 -0
  279. package/dist/mcp/tools/list-specs.d.ts.map +1 -0
  280. package/dist/mcp/tools/list-specs.js +48 -0
  281. package/dist/mcp/tools/list-specs.js.map +1 -0
  282. package/dist/mcp/tools/plan.d.ts.map +1 -1
  283. package/dist/mcp/tools/plan.js +40 -14
  284. package/dist/mcp/tools/plan.js.map +1 -1
  285. package/dist/mcp/tools/playbook.d.ts +2 -0
  286. package/dist/mcp/tools/playbook.d.ts.map +1 -0
  287. package/dist/mcp/tools/playbook.js +104 -0
  288. package/dist/mcp/tools/playbook.js.map +1 -0
  289. package/dist/mcp/tools/postmortem.d.ts +2 -0
  290. package/dist/mcp/tools/postmortem.d.ts.map +1 -0
  291. package/dist/mcp/tools/postmortem.js +75 -0
  292. package/dist/mcp/tools/postmortem.js.map +1 -0
  293. package/dist/mcp/tools/react.js +1 -1
  294. package/dist/mcp/tools/react.js.map +1 -1
  295. package/dist/mcp/tools/reject-checkpoint.d.ts +2 -0
  296. package/dist/mcp/tools/reject-checkpoint.d.ts.map +1 -0
  297. package/dist/mcp/tools/reject-checkpoint.js +79 -0
  298. package/dist/mcp/tools/reject-checkpoint.js.map +1 -0
  299. package/dist/mcp/tools/rollback.d.ts +2 -0
  300. package/dist/mcp/tools/rollback.d.ts.map +1 -0
  301. package/dist/mcp/tools/rollback.js +78 -0
  302. package/dist/mcp/tools/rollback.js.map +1 -0
  303. package/dist/mcp/tools/run-in-worktree.d.ts +2 -0
  304. package/dist/mcp/tools/run-in-worktree.d.ts.map +1 -0
  305. package/dist/mcp/tools/run-in-worktree.js +90 -0
  306. package/dist/mcp/tools/run-in-worktree.js.map +1 -0
  307. package/dist/mcp/tools/run.js +1 -1
  308. package/dist/mcp/tools/run.js.map +1 -1
  309. package/dist/mcp/tools/solidity.js +1 -1
  310. package/dist/mcp/tools/solidity.js.map +1 -1
  311. package/dist/mcp/tools/sprint.d.ts.map +1 -1
  312. package/dist/mcp/tools/sprint.js +11 -11
  313. package/dist/mcp/tools/sprint.js.map +1 -1
  314. package/dist/mcp/tools/status.d.ts.map +1 -1
  315. package/dist/mcp/tools/status.js +11 -0
  316. package/dist/mcp/tools/status.js.map +1 -1
  317. package/dist/mcp/tools/subscribe-events.d.ts +2 -0
  318. package/dist/mcp/tools/subscribe-events.d.ts.map +1 -0
  319. package/dist/mcp/tools/subscribe-events.js +48 -0
  320. package/dist/mcp/tools/subscribe-events.js.map +1 -0
  321. package/dist/mcp/tools/unsubscribe-events.d.ts +2 -0
  322. package/dist/mcp/tools/unsubscribe-events.d.ts.map +1 -0
  323. package/dist/mcp/tools/unsubscribe-events.js +45 -0
  324. package/dist/mcp/tools/unsubscribe-events.js.map +1 -0
  325. package/dist/orchestrator/agent-loader.d.ts +16 -0
  326. package/dist/orchestrator/agent-loader.d.ts.map +1 -1
  327. package/dist/orchestrator/agent-loader.js +16 -0
  328. package/dist/orchestrator/agent-loader.js.map +1 -1
  329. package/dist/orchestrator/architect-agent.d.ts.map +1 -1
  330. package/dist/orchestrator/architect-agent.js +37 -8
  331. package/dist/orchestrator/architect-agent.js.map +1 -1
  332. package/dist/orchestrator/checkpoints/audit.d.ts +128 -0
  333. package/dist/orchestrator/checkpoints/audit.d.ts.map +1 -0
  334. package/dist/orchestrator/checkpoints/audit.js +272 -0
  335. package/dist/orchestrator/checkpoints/audit.js.map +1 -0
  336. package/dist/orchestrator/checkpoints/feedback-router.d.ts +213 -0
  337. package/dist/orchestrator/checkpoints/feedback-router.d.ts.map +1 -0
  338. package/dist/orchestrator/checkpoints/feedback-router.js +438 -0
  339. package/dist/orchestrator/checkpoints/feedback-router.js.map +1 -0
  340. package/dist/orchestrator/checkpoints/index.d.ts +11 -0
  341. package/dist/orchestrator/checkpoints/index.d.ts.map +1 -0
  342. package/dist/orchestrator/checkpoints/index.js +12 -0
  343. package/dist/orchestrator/checkpoints/index.js.map +1 -0
  344. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts +35 -0
  345. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts.map +1 -0
  346. package/dist/orchestrator/checkpoints/mechanisms/cli.js +153 -0
  347. package/dist/orchestrator/checkpoints/mechanisms/cli.js.map +1 -0
  348. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts +34 -0
  349. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts.map +1 -0
  350. package/dist/orchestrator/checkpoints/mechanisms/disk.js +139 -0
  351. package/dist/orchestrator/checkpoints/mechanisms/disk.js.map +1 -0
  352. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts +141 -0
  353. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts.map +1 -0
  354. package/dist/orchestrator/checkpoints/mechanisms/pr.js +445 -0
  355. package/dist/orchestrator/checkpoints/mechanisms/pr.js.map +1 -0
  356. package/dist/orchestrator/checkpoints/noop.d.ts +12 -0
  357. package/dist/orchestrator/checkpoints/noop.d.ts.map +1 -0
  358. package/dist/orchestrator/checkpoints/noop.js +13 -0
  359. package/dist/orchestrator/checkpoints/noop.js.map +1 -0
  360. package/dist/orchestrator/checkpoints/registry.d.ts +48 -0
  361. package/dist/orchestrator/checkpoints/registry.d.ts.map +1 -0
  362. package/dist/orchestrator/checkpoints/registry.js +89 -0
  363. package/dist/orchestrator/checkpoints/registry.js.map +1 -0
  364. package/dist/orchestrator/checkpoints/renderers/_util.d.ts +50 -0
  365. package/dist/orchestrator/checkpoints/renderers/_util.d.ts.map +1 -0
  366. package/dist/orchestrator/checkpoints/renderers/_util.js +137 -0
  367. package/dist/orchestrator/checkpoints/renderers/_util.js.map +1 -0
  368. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts +15 -0
  369. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts.map +1 -0
  370. package/dist/orchestrator/checkpoints/renderers/code-review.js +66 -0
  371. package/dist/orchestrator/checkpoints/renderers/code-review.js.map +1 -0
  372. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts +15 -0
  373. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts.map +1 -0
  374. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js +40 -0
  375. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js.map +1 -0
  376. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts +15 -0
  377. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts.map +1 -0
  378. package/dist/orchestrator/checkpoints/renderers/eval-result.js +54 -0
  379. package/dist/orchestrator/checkpoints/renderers/eval-result.js.map +1 -0
  380. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts +49 -0
  381. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts.map +1 -0
  382. package/dist/orchestrator/checkpoints/renderers/generator-diff.js +154 -0
  383. package/dist/orchestrator/checkpoints/renderers/generator-diff.js.map +1 -0
  384. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts +15 -0
  385. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts.map +1 -0
  386. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js +59 -0
  387. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js.map +1 -0
  388. package/dist/orchestrator/checkpoints/renderers/plan.d.ts +15 -0
  389. package/dist/orchestrator/checkpoints/renderers/plan.d.ts.map +1 -0
  390. package/dist/orchestrator/checkpoints/renderers/plan.js +34 -0
  391. package/dist/orchestrator/checkpoints/renderers/plan.js.map +1 -0
  392. package/dist/orchestrator/checkpoints/renderers/registry.d.ts +43 -0
  393. package/dist/orchestrator/checkpoints/renderers/registry.d.ts.map +1 -0
  394. package/dist/orchestrator/checkpoints/renderers/registry.js +83 -0
  395. package/dist/orchestrator/checkpoints/renderers/registry.js.map +1 -0
  396. package/dist/orchestrator/checkpoints/renderers/research.d.ts +15 -0
  397. package/dist/orchestrator/checkpoints/renderers/research.d.ts.map +1 -0
  398. package/dist/orchestrator/checkpoints/renderers/research.js +39 -0
  399. package/dist/orchestrator/checkpoints/renderers/research.js.map +1 -0
  400. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts +20 -0
  401. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts.map +1 -0
  402. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js +57 -0
  403. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js.map +1 -0
  404. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts +15 -0
  405. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts.map +1 -0
  406. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js +38 -0
  407. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js.map +1 -0
  408. package/dist/orchestrator/checkpoints/sites.d.ts +22 -0
  409. package/dist/orchestrator/checkpoints/sites.d.ts.map +1 -0
  410. package/dist/orchestrator/checkpoints/sites.js +57 -0
  411. package/dist/orchestrator/checkpoints/sites.js.map +1 -0
  412. package/dist/orchestrator/checkpoints/types.d.ts +51 -0
  413. package/dist/orchestrator/checkpoints/types.d.ts.map +1 -0
  414. package/dist/orchestrator/checkpoints/types.js +9 -0
  415. package/dist/orchestrator/checkpoints/types.js.map +1 -0
  416. package/dist/orchestrator/code-reviewer-agent.d.ts +50 -0
  417. package/dist/orchestrator/code-reviewer-agent.d.ts.map +1 -0
  418. package/dist/orchestrator/code-reviewer-agent.js +283 -0
  419. package/dist/orchestrator/code-reviewer-agent.js.map +1 -0
  420. package/dist/orchestrator/context-handoff.d.ts +484 -224
  421. package/dist/orchestrator/context-handoff.d.ts.map +1 -1
  422. package/dist/orchestrator/context-handoff.js +32 -12
  423. package/dist/orchestrator/context-handoff.js.map +1 -1
  424. package/dist/orchestrator/curator-agent.d.ts.map +1 -1
  425. package/dist/orchestrator/curator-agent.js +63 -12
  426. package/dist/orchestrator/curator-agent.js.map +1 -1
  427. package/dist/orchestrator/deploy/classify.d.ts +31 -0
  428. package/dist/orchestrator/deploy/classify.d.ts.map +1 -0
  429. package/dist/orchestrator/deploy/classify.js +109 -0
  430. package/dist/orchestrator/deploy/classify.js.map +1 -0
  431. package/dist/orchestrator/deploy/execute.d.ts +45 -0
  432. package/dist/orchestrator/deploy/execute.d.ts.map +1 -0
  433. package/dist/orchestrator/deploy/execute.js +146 -0
  434. package/dist/orchestrator/deploy/execute.js.map +1 -0
  435. package/dist/orchestrator/deploy/executor.d.ts +22 -0
  436. package/dist/orchestrator/deploy/executor.d.ts.map +1 -0
  437. package/dist/orchestrator/deploy/executor.js +31 -0
  438. package/dist/orchestrator/deploy/executor.js.map +1 -0
  439. package/dist/orchestrator/deploy/index.d.ts +21 -0
  440. package/dist/orchestrator/deploy/index.d.ts.map +1 -0
  441. package/dist/orchestrator/deploy/index.js +21 -0
  442. package/dist/orchestrator/deploy/index.js.map +1 -0
  443. package/dist/orchestrator/deploy/resolve.d.ts +51 -0
  444. package/dist/orchestrator/deploy/resolve.d.ts.map +1 -0
  445. package/dist/orchestrator/deploy/resolve.js +53 -0
  446. package/dist/orchestrator/deploy/resolve.js.map +1 -0
  447. package/dist/orchestrator/deploy/spawn.d.ts +60 -0
  448. package/dist/orchestrator/deploy/spawn.d.ts.map +1 -0
  449. package/dist/orchestrator/deploy/spawn.js +62 -0
  450. package/dist/orchestrator/deploy/spawn.js.map +1 -0
  451. package/dist/orchestrator/deploy/types.d.ts +98 -0
  452. package/dist/orchestrator/deploy/types.d.ts.map +1 -0
  453. package/dist/orchestrator/deploy/types.js +39 -0
  454. package/dist/orchestrator/deploy/types.js.map +1 -0
  455. package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
  456. package/dist/orchestrator/evaluator-agent.js +23 -10
  457. package/dist/orchestrator/evaluator-agent.js.map +1 -1
  458. package/dist/orchestrator/generator-agent.d.ts.map +1 -1
  459. package/dist/orchestrator/generator-agent.js +24 -11
  460. package/dist/orchestrator/generator-agent.js.map +1 -1
  461. package/dist/orchestrator/model-resolver.d.ts.map +1 -1
  462. package/dist/orchestrator/model-resolver.js +4 -2
  463. package/dist/orchestrator/model-resolver.js.map +1 -1
  464. package/dist/orchestrator/observability/index.d.ts +12 -0
  465. package/dist/orchestrator/observability/index.d.ts.map +1 -0
  466. package/dist/orchestrator/observability/index.js +12 -0
  467. package/dist/orchestrator/observability/index.js.map +1 -0
  468. package/dist/orchestrator/observability/merge.d.ts +73 -0
  469. package/dist/orchestrator/observability/merge.d.ts.map +1 -0
  470. package/dist/orchestrator/observability/merge.js +110 -0
  471. package/dist/orchestrator/observability/merge.js.map +1 -0
  472. package/dist/orchestrator/pipeline.d.ts +28 -0
  473. package/dist/orchestrator/pipeline.d.ts.map +1 -1
  474. package/dist/orchestrator/pipeline.js +223 -30
  475. package/dist/orchestrator/pipeline.js.map +1 -1
  476. package/dist/orchestrator/planner-agent.d.ts +21 -1
  477. package/dist/orchestrator/planner-agent.d.ts.map +1 -1
  478. package/dist/orchestrator/planner-agent.js +16 -6
  479. package/dist/orchestrator/planner-agent.js.map +1 -1
  480. package/dist/orchestrator/research-agent.d.ts.map +1 -1
  481. package/dist/orchestrator/research-agent.js +46 -9
  482. package/dist/orchestrator/research-agent.js.map +1 -1
  483. package/dist/orchestrator/tools/handlers.d.ts +2 -0
  484. package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
  485. package/dist/orchestrator/tools/handlers.js +1 -1
  486. package/dist/orchestrator/tools/handlers.js.map +1 -1
  487. package/dist/orchestrator/tools/index.d.ts +84 -1
  488. package/dist/orchestrator/tools/index.d.ts.map +1 -1
  489. package/dist/orchestrator/tools/index.js +164 -1
  490. package/dist/orchestrator/tools/index.js.map +1 -1
  491. package/dist/orchestrator/worktree.d.ts +18 -0
  492. package/dist/orchestrator/worktree.d.ts.map +1 -0
  493. package/dist/orchestrator/worktree.js +129 -0
  494. package/dist/orchestrator/worktree.js.map +1 -0
  495. package/dist/providers/anthropic.d.ts +8 -1
  496. package/dist/providers/anthropic.d.ts.map +1 -1
  497. package/dist/providers/anthropic.js +86 -5
  498. package/dist/providers/anthropic.js.map +1 -1
  499. package/dist/providers/factory.d.ts.map +1 -1
  500. package/dist/providers/factory.js +35 -2
  501. package/dist/providers/factory.js.map +1 -1
  502. package/dist/providers/google.d.ts.map +1 -1
  503. package/dist/providers/google.js +5 -0
  504. package/dist/providers/google.js.map +1 -1
  505. package/dist/providers/index.d.ts +1 -1
  506. package/dist/providers/index.d.ts.map +1 -1
  507. package/dist/providers/index.js.map +1 -1
  508. package/dist/providers/openai.d.ts.map +1 -1
  509. package/dist/providers/openai.js +4 -0
  510. package/dist/providers/openai.js.map +1 -1
  511. package/dist/providers/types.d.ts +25 -2
  512. package/dist/providers/types.d.ts.map +1 -1
  513. package/dist/state/approval-state.d.ts +74 -0
  514. package/dist/state/approval-state.d.ts.map +1 -0
  515. package/dist/state/approval-state.js +127 -0
  516. package/dist/state/approval-state.js.map +1 -0
  517. package/dist/state/history.d.ts.map +1 -1
  518. package/dist/state/history.js +3 -3
  519. package/dist/state/history.js.map +1 -1
  520. package/dist/state/index.d.ts +3 -0
  521. package/dist/state/index.d.ts.map +1 -1
  522. package/dist/state/index.js +4 -1
  523. package/dist/state/index.js.map +1 -1
  524. package/dist/state/plan-state.js +1 -1
  525. package/dist/state/plan-state.js.map +1 -1
  526. package/dist/state/review-state.d.ts +15 -0
  527. package/dist/state/review-state.d.ts.map +1 -0
  528. package/dist/state/review-state.js +51 -0
  529. package/dist/state/review-state.js.map +1 -0
  530. package/dist/state/run-state.d.ts +39 -0
  531. package/dist/state/run-state.d.ts.map +1 -0
  532. package/dist/state/run-state.js +101 -0
  533. package/dist/state/run-state.js.map +1 -0
  534. package/dist/state/sprint-state.d.ts +9 -2
  535. package/dist/state/sprint-state.d.ts.map +1 -1
  536. package/dist/state/sprint-state.js +25 -11
  537. package/dist/state/sprint-state.js.map +1 -1
  538. package/dist/telemetry/emit.d.ts +41 -0
  539. package/dist/telemetry/emit.d.ts.map +1 -0
  540. package/dist/telemetry/emit.js +65 -0
  541. package/dist/telemetry/emit.js.map +1 -0
  542. package/dist/utils/git.d.ts +27 -0
  543. package/dist/utils/git.d.ts.map +1 -1
  544. package/dist/utils/git.js +50 -0
  545. package/dist/utils/git.js.map +1 -1
  546. package/hooks/hooks.json +17 -1
  547. package/hooks/session-start +42 -0
  548. package/package.json +6 -2
  549. package/scripts/check-prereqs.sh +12 -0
  550. package/scripts/e2e-graph-smoke.sh +167 -0
  551. package/scripts/graph-hook.mjs +151 -0
  552. package/scripts/migrate-specs.mjs +127 -0
  553. package/scripts/run-kpi-gate.mjs +245 -0
  554. package/scripts/sync-skills.mjs +99 -0
  555. package/skills/bober.code-review/SKILL.md +186 -0
  556. package/skills/bober.debug/SKILL.md +300 -0
  557. package/skills/bober.deploy/SKILL.md +262 -0
  558. package/skills/bober.diagnose/SKILL.md +254 -0
  559. package/skills/bober.graph/SKILL.md +85 -0
  560. package/skills/bober.impact/SKILL.md +101 -0
  561. package/skills/bober.incident/SKILL.md +245 -0
  562. package/skills/bober.onboard/SKILL.md +84 -0
  563. package/skills/bober.plan/SKILL.md +51 -0
  564. package/skills/bober.plan/references/spec-schema.md +31 -4
  565. package/skills/bober.postmortem/SKILL.md +231 -0
  566. package/skills/bober.run/SKILL.md +41 -7
  567. package/skills/bober.runbook/SKILL.md +335 -0
  568. package/skills/bober.sprint/SKILL.md +6 -259
  569. package/skills/bober.using-bober/SKILL.md +133 -0
  570. package/skills/bober.verify/SKILL.md +143 -0
@@ -27,7 +27,7 @@ You are being **spawned as a subagent** by the Bober orchestrator. This means:
27
27
  - `evaluatorFeedback` — if not null, this is a RETRY and you must address every piece of feedback
28
28
  - `context.completedSprints` — what has been built so far
29
29
  - `context.relevantFiles` — files you should read
30
- - After implementing the sprint, your **response text** back to the orchestrator must be a structured JSON completion report. Use EXACTLY this format:
30
+ - After implementing the sprint, your **response text** back to the orchestrator must be a structured JSON completion report. Use EXACTLY this format (see Step 6 for the full required schema including the required `verificationOutput` field):
31
31
 
32
32
  ```json
33
33
  {
@@ -42,7 +42,10 @@ You are being **spawned as a subagent** by the Bober orchestrator. This means:
42
42
  "testsAdded": ["<test file paths>"],
43
43
  "commits": ["<hash> - <message>"],
44
44
  "blockers": ["<any unresolved issues>"],
45
- "notes": "<additional context for the evaluator>"
45
+ "notes": "<additional context for the evaluator>",
46
+ "verificationOutput": [
47
+ {"command": "<command run>", "exitCode": 0, "stdoutTail": "<last ~500 chars of output>"}
48
+ ]
46
49
  }
47
50
  ```
48
51
 
@@ -64,6 +67,46 @@ You are a disciplined engineer, not a cowboy coder. You:
64
67
 
65
68
  ## Process
66
69
 
70
+ ### Step 0: Contract Precision Preflight (BLOCKING)
71
+
72
+ Before reading anything else, validate the sprint contract for precision. Opus 4.7 (the model running you) follows instructions literally — vague contracts produce vague code. The harness depends on you refusing to start work on incomplete specs.
73
+
74
+ **Read the contract at `.bober/contracts/<contractId>.json` and check ALL of the following:**
75
+
76
+ 1. **Required precision fields are present and substantive:**
77
+ - `nonGoals` array exists, has at least one entry, and the first entry does NOT start with "Auto-generated contract"
78
+ - `stopConditions` array exists, has at least one entry, and entries are concrete signals (not "when done" or "when finished")
79
+ - `definitionOfDone` is at least 20 characters and describes observable end-state
80
+ - `successCriteria` is non-empty, every entry has `criterionId`, `description` (≥25 chars), `verificationMethod` (one of: `manual`, `typecheck`, `lint`, `unit-test`, `playwright`, `api-check`, `build`, `agent-evaluation`), and `required` (boolean)
81
+
82
+ 2. **No banned vague phrasing in any string field** (`description`, `definitionOfDone`, criterion descriptions, nonGoals, stopConditions). Banned phrases:
83
+ - "works correctly" / "works as expected"
84
+ - "looks good" / "looks nice"
85
+ - "is reasonable"
86
+ - "behaves properly" / "behaves correctly" / "is correct" / "appears correct"
87
+ - "as needed" / "if appropriate"
88
+
89
+ 3. **Ambiguity score** — if `ambiguityScore` is set and >= 7, the contract was emitted in violation of planner rules. Block.
90
+
91
+ **If ANY check fails, STOP IMMEDIATELY.** Do not implement anything. Do not "fix" the contract yourself — that is the planner's job. Return this completion report and exit:
92
+
93
+ ```json
94
+ {
95
+ "contractId": "<contract ID>",
96
+ "status": "blocked",
97
+ "criteriaResults": [],
98
+ "filesChanged": [],
99
+ "testsAdded": [],
100
+ "commits": [],
101
+ "blockers": [
102
+ "Contract failed precision preflight. Specific issues: <list each issue with the field name>. Re-run the planner to produce a complete contract before retrying this sprint."
103
+ ],
104
+ "notes": "Contract precision preflight failed. The planner emitted a contract that does not meet the harness's quality bar — implementing it would produce work the evaluator cannot verify. The orchestrator should route this back to the planner, not retry the generator with the same contract."
105
+ }
106
+ ```
107
+
108
+ **Why this is non-negotiable:** A contract missing `nonGoals` invites you to do extra work the user did not ask for. A vague `definitionOfDone` invites you to ship something subtly wrong. A missing `stopConditions` invites you to keep "improving" past the requirement until you run out of turns. The preflight is your protection against silently fabricating intent the planner did not express.
109
+
67
110
  ### Step 1: Read and Understand the Handoff
68
111
 
69
112
  You will receive a **ContextHandoff** document. Read it completely. It contains:
@@ -114,12 +157,25 @@ Do NOT output this plan to the user. This is your internal working process. Just
114
157
 
115
158
  6. **Respect scope boundaries.** The contract specifies what to build. If you notice something else that should be fixed or improved, note it in your completion report but do NOT implement it. Scope creep is a failure mode.
116
159
 
160
+ **Specifically:**
161
+ - Re-read the contract's `nonGoals` array before each commit. If your work-in-progress is doing any of the things listed in `nonGoals`, STOP and revert that change. The evaluator WILL check `git diff` against `nonGoals` and fail the sprint if you violated any of them.
162
+ - Re-read `outOfScope` before adding any new file or feature not explicitly named in the contract. Items in `outOfScope` are deferred deliberately — implementing them ahead of schedule is a planning violation, not a contribution.
163
+ - Re-read `definitionOfDone` whenever you feel pulled toward "just one more improvement." If the improvement is not required to satisfy `definitionOfDone`, it does not belong in this sprint. Note it in your completion report under `notes` for the planner to consider for a future sprint.
164
+
117
165
  7. **Import hygiene.** Only import what you use. Use the project's module system (check `tsconfig.json` for module type). Resolve all import paths correctly.
118
166
 
119
167
  ### Step 4: Self-Verify Before Handoff
120
168
 
121
169
  Before declaring the sprint complete, run these checks IN ORDER:
122
170
 
171
+ **IRON LAW (from skills/bober.verify):**
172
+
173
+ ```
174
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
175
+ ```
176
+
177
+ If you haven't run the verification command in this message, you cannot claim it passes. See `skills/bober.verify/SKILL.md` for the full discipline. The checks below are the application of that law.
178
+
123
179
  1. **Build check:**
124
180
  ```bash
125
181
  # Use the configured build command
@@ -150,6 +206,15 @@ Before declaring the sprint complete, run these checks IN ORDER:
150
206
  - For API criteria: Test the endpoint with a curl command or similar
151
207
  - For data criteria: Verify the data model matches the spec
152
208
 
209
+ 6. **Stop-condition check:** Re-read the contract's `stopConditions` array. For each one, confirm it is met. If any stopCondition is not met, the sprint is NOT complete — return to implementation, do not move to handoff.
210
+
211
+ 7. **NonGoals diff scan:** Run `git diff --stat` and review every file you touched. For each `nonGoal` in the contract, confirm your diff does not violate it. Common violations to look for:
212
+ - "Don't add new dependencies" → check `package.json` is unchanged (or only has dependencies the contract explicitly lists)
213
+ - "Don't refactor X" → check files in X are not in your diff
214
+ - "Don't change Y interface" → check the public exports of Y are unchanged
215
+
216
+ If a violation slipped in, revert it before declaring complete.
217
+
153
218
  **If any check fails and you cannot fix it:**
154
219
  - Do NOT ship broken code
155
220
  - Document the failure clearly in your completion notes
@@ -211,14 +276,34 @@ After implementation, produce a structured completion report:
211
276
  "blockers": [
212
277
  "<Description of any unresolved issue>"
213
278
  ],
214
- "notes": "<Any additional context for the evaluator or next sprint>"
279
+ "notes": "<Any additional context for the evaluator or next sprint>",
280
+ "verificationOutput": [
281
+ {
282
+ "command": "npm run build",
283
+ "exitCode": 0,
284
+ "stdoutTail": "<last ~500 chars of stdout/stderr proving the command ran>"
285
+ },
286
+ {
287
+ "command": "npx tsc --noEmit",
288
+ "exitCode": 0,
289
+ "stdoutTail": "<...>"
290
+ }
291
+ ]
215
292
  }
216
293
  ```
217
294
 
295
+ **`verificationOutput` is REQUIRED** — not optional. Every completion report MUST include it. Omitting it violates the Iron Law from `skills/bober.verify/SKILL.md`. Shape: `Array<{command: string, exitCode: number, stdoutTail: string}>`. Include one entry per verification command you ran in Step 4.
296
+
218
297
  ## Handling Evaluator Feedback (Retry Iterations)
219
298
 
220
299
  When you receive a ContextHandoff with `evaluatorFeedback`, this means a previous attempt was rejected. Follow this protocol:
221
300
 
301
+ ### Invoke bober.debug Before Code Changes
302
+
303
+ Load `skills/bober.debug/SKILL.md` before making ANY code change in response to evaluator feedback. Evaluator failures are bugs in your implementation — treat them with the same systematic root-cause discipline you would apply to any other bug. Do NOT jump to a fix before completing Phase 1 (Root Cause Investigation).
304
+
305
+ ### Implementation Protocol
306
+
222
307
  1. **Read ALL feedback items.** Do not skim. Each failure is important.
223
308
  2. **Categorize failures:**
224
309
  - **Code bugs:** Fix the code at the exact file:line mentioned
@@ -230,6 +315,40 @@ When you receive a ContextHandoff with `evaluatorFeedback`, this means a previou
230
315
  4. **Re-run all self-checks after fixes.** Do not assume fixing one thing didn't break another.
231
316
  5. **Be specific in your response about what changed.** The evaluator needs to know exactly what you fixed.
232
317
 
318
+ ### Forbidden Responses
319
+
320
+ The following responses are forbidden when receiving evaluator feedback. They signal sycophancy, not understanding:
321
+
322
+ - **"You're absolutely right!"** — Conceding without evidence is not agreement, it is capitulation.
323
+ - **"Great catch!"** / **"Great point!"** — Performative gratitude adds no signal. State what you found and what you changed.
324
+ - **"Let me fix that now"** (before running verification) — Announcing a fix before running verification violates the Iron Law.
325
+ - **"I see what you mean"** (as acknowledgment of an unverified claim) — Acknowledging a claim you haven't verified is not understanding, it is compliance.
326
+ - **"Thanks for catching that!"** / any gratitude expression — The evaluator is doing its job. Your job is to fix the problem, not thank the evaluator for finding it.
327
+
328
+ If you believe the evaluator is **wrong**, use the DISPUTE protocol below — do not silently comply and ship something you believe is incorrect.
329
+
330
+ ### DISPUTE Protocol
331
+
332
+ When you have evidence that the evaluator's finding is factually incorrect (e.g., the evaluator claims a field is missing but you can point to the exact line where it exists), respond with a structured DISPUTE instead of silently accepting the feedback:
333
+
334
+ ```json
335
+ {
336
+ "dispute": true,
337
+ "criterionId": "s2-c3",
338
+ "reason": "Evaluator claims verificationOutput is missing, but it is present at line 247 of agents/bober-generator.md.",
339
+ "evidence": [
340
+ {"path": "agents/bober-generator.md", "line": 247, "snippet": " \"verificationOutput\": [...]"}
341
+ ]
342
+ }
343
+ ```
344
+
345
+ **DISPUTE rules:**
346
+ - `dispute` must be the boolean `true` (not a string).
347
+ - `criterionId` must match the exact criterion ID from the contract.
348
+ - `reason` must be a factual statement with a file path and line number, not an assertion.
349
+ - `evidence` must be an array of `{path, line, snippet}` objects pointing to specific file locations.
350
+ - A DISPUTE is NOT a way to avoid fixing real problems. If the evaluator is right, fix it. If the evaluator is wrong, DISPUTE it with evidence. Do not do both.
351
+
233
352
  ## What You Must Never Do
234
353
 
235
354
  - Never deviate from the sprint contract scope
@@ -19,20 +19,54 @@ You are being **spawned as a subagent** by the Bober orchestrator. This means:
19
19
  - You are running in your own **isolated context window** — you have NO access to the orchestrator's conversation history.
20
20
  - Everything you need is in **your prompt**. The orchestrator has included the task description, project configuration (bober.config.json contents), project principles, and any existing spec information.
21
21
  - You MUST save all output to disk: PlanSpec to `.bober/specs/`, SprintContracts to `.bober/contracts/`, progress to `.bober/progress.md`, and events to `.bober/history.jsonl`.
22
- - Your **response text** back to the orchestrator must be a structured JSON summary. The orchestrator will parse this to continue the pipeline. Use EXACTLY this format:
22
+ - Your **response text** back to the orchestrator must be a structured JSON summary. The orchestrator will parse this to continue the pipeline. Pick the format based on whether you decided clarification is needed:
23
+
24
+ **Format A — Plan ready for sprint execution** (status was set to `draft` or `ready`):
25
+ ```json
26
+ {
27
+ "specId": "<the spec ID you created>",
28
+ "title": "<plan title>",
29
+ "status": "draft",
30
+ "sprintCount": <number of sprints>,
31
+ "contractIds": ["<contract-id-1>", "<contract-id-2>", ...],
32
+ "summary": "<2-3 sentence summary of the plan>"
33
+ }
34
+ ```
35
+
36
+ **Format B — Plan blocked on clarification** (status was set to `needs-clarification`):
37
+ ```json
38
+ {
39
+ "specId": "<the spec ID you created>",
40
+ "title": "<plan title>",
41
+ "status": "needs-clarification",
42
+ "ambiguityScore": <integer 7-10>,
43
+ "openQuestionCount": <number>,
44
+ "summary": "<2-3 sentence explanation of why clarification is needed and what's blocking>"
45
+ }
46
+ ```
47
+
48
+ The orchestrator inspects `status` to route the next step. Returning `status: "draft"` or `"ready"` with no contract files saved is a contract violation — the orchestrator will treat it as broken and abort.
49
+
50
+ - Because you are a subagent, generate all 3-5 clarification questions and try to self-answer each one by citing specific files, line numbers, or code patterns from the codebase as evidence. For each question:
51
+ - If you self-answered confidently, add the answer to `resolvedClarifications` with `resolvedBy: "planner"` AND record the supporting evidence in the `assumptions` array.
52
+ - If you could NOT self-answer (codebase silent, multiple plausible options, security/data-loss implications), leave the question unresolved in `clarificationQuestions` and increment your `ambiguityScore` accordingly.
53
+ - Include the full Q&A in the design discussion document at `.bober/designs/<specId>-design.md`.
54
+ - After self-answering, if your final `ambiguityScore >= 7` OR any question remains unresolved, you MUST take Format B (the clarification-emit path). Do NOT fabricate features just to ship a "ready" spec.
55
+ - If your prompt contains a task description, that IS the user's request. Plan for it.
56
+
57
+ ---
58
+
59
+ **IRON LAW:**
23
60
 
24
- ```json
25
- {
26
- "specId": "<the spec ID you created>",
27
- "title": "<plan title>",
28
- "sprintCount": <number of sprints>,
29
- "contractIds": ["<contract-id-1>", "<contract-id-2>", ...],
30
- "summary": "<2-3 sentence summary of the plan>"
31
- }
61
+ ```
62
+ NO SPRINT CONTRACTS WITHOUT TESTABLE SUCCESS CRITERIA
32
63
  ```
33
64
 
34
- - Because you are a subagent, generate all 3-5 clarification questions, then self-answer each one by citing specific files, line numbers, or code patterns from the codebase as evidence. Include the full Q&A in the design discussion document saved to `.bober/designs/<specId>-design.md`. Document your answers as assumptions in the PlanSpec's `assumptions` field.
35
- - If your prompt contains a task description, that IS the user's request. Plan for it.
65
+ If a success criterion cannot be verified by running a specific command, reading a specific file at a specific line, or observing a specific UI state, it is not a success criterion it is a wish. Refine it until it has a `verificationMethod` from the strict enum (`manual | typecheck | lint | unit-test | playwright | api-check | build`) AND a description an outsider could execute without asking you a clarifying question.
66
+
67
+ <EXTREMELY-IMPORTANT>
68
+ "Works correctly", "behaves properly", "is reasonable", "looks good" — every phrase on the Quality Gate banned list (see Quality Gate section) is a planner failure mode. `saveContract` will reject the contract and the sprint will block. The banned phrases are not stylistic preferences; they are evidence that the criterion has not been thought through.
69
+ </EXTREMELY-IMPORTANT>
36
70
 
37
71
  ---
38
72
 
@@ -192,7 +226,8 @@ After validation, save the corrected outline.
192
226
 
193
227
  After the structure outline is approved, generate a complete PlanSpec JSON document.
194
228
 
195
- **PlanSpec structure:**
229
+ **PlanSpec structure (matches the Zod schema in `src/contracts/spec.ts`):**
230
+
196
231
  ```json
197
232
  {
198
233
  "specId": "spec-<timestamp>-<slug>",
@@ -201,16 +236,42 @@ After the structure outline is approved, generate a complete PlanSpec JSON docum
201
236
  "updatedAt": "<ISO-8601>",
202
237
  "title": "<Human-readable feature title>",
203
238
  "description": "<2-3 sentence summary of what this feature does and why>",
204
- "mode": "<greenfield or brownfield from bober.config.json>",
205
- "preset": "<preset from bober.config.json, if any>",
239
+
240
+ "status": "draft | needs-clarification | ready | in-progress | completed | abandoned",
241
+ "mode": "greenfield | brownfield",
242
+
243
+ "ambiguityScore": 0,
244
+ "clarificationQuestions": [
245
+ {
246
+ "questionId": "Q1",
247
+ "category": "scope | user-personas | data-model | tech-constraints | design-ux | integrations | non-functional | error-handling | integration-risk | pattern-conflict | regression-risk | other",
248
+ "question": "<The question itself, ending with ?>",
249
+ "options": [
250
+ { "label": "A", "description": "<Option A explained>" },
251
+ { "label": "B", "description": "<Option B explained>" }
252
+ ],
253
+ "recommendation": "<Your suggested answer based on codebase evidence — optional>",
254
+ "ambiguityWeight": 3
255
+ }
256
+ ],
257
+ "resolvedClarifications": [
258
+ {
259
+ "questionId": "Q1",
260
+ "answer": "<The answer the user supplied, or your self-answer in autonomous mode>",
261
+ "resolvedAt": "<ISO-8601>",
262
+ "resolvedBy": "user | planner"
263
+ }
264
+ ],
265
+
206
266
  "assumptions": [
207
- "<Key assumption 1 derived from user answers or codebase>",
267
+ "<Key assumption 1 derived from user answers or codebase evidence>",
208
268
  "<Key assumption 2>"
209
269
  ],
210
270
  "outOfScope": [
211
271
  "<Explicitly excluded item 1>",
212
272
  "<Explicitly excluded item 2>"
213
273
  ],
274
+
214
275
  "features": [
215
276
  {
216
277
  "featureId": "feat-<index>",
@@ -225,6 +286,14 @@ After the structure outline is approved, generate a complete PlanSpec JSON docum
225
286
  "estimatedComplexity": "low | medium | high"
226
287
  }
227
288
  ],
289
+
290
+ "techStack": ["<Optional list of stack components>"],
291
+ "techNotes": {
292
+ "suggestedStack": "<Only if greenfield, otherwise omit>",
293
+ "integrationPoints": ["<External API or service>"],
294
+ "dataModel": "<Brief description of key entities and relationships>",
295
+ "securityConsiderations": ["<Auth, input validation, etc.>"]
296
+ },
228
297
  "nonFunctionalRequirements": [
229
298
  {
230
299
  "category": "performance | security | accessibility | reliability | maintainability",
@@ -232,18 +301,31 @@ After the structure outline is approved, generate a complete PlanSpec JSON docum
232
301
  "verificationMethod": "<How the evaluator can check this>"
233
302
  }
234
303
  ],
235
- "techNotes": {
236
- "suggestedStack": "<Only if greenfield, otherwise omit>",
237
- "integrationPoints": ["<External API or service>"],
238
- "dataModel": "<Brief description of key entities and relationships>",
239
- "securityConsiderations": ["<Auth, input validation, etc.>"]
240
- },
304
+ "constraints": ["<Optional list of project-wide constraints>"],
305
+
241
306
  "sprints": [
242
- "<Array of SprintContract objects -- see Phase 4>"
307
+ "<Optional array of SprintContract objects see Phase 5 for the contract shape>"
243
308
  ]
244
309
  }
245
310
  ```
246
311
 
312
+ **Status field (mandatory) — picks the lifecycle phase:**
313
+
314
+ - `draft` — emitted by Phase 4 when no clarifications remain and ambiguityScore < 7. The orchestrator's pipeline will treat this as ready to run.
315
+ - `needs-clarification` — emitted when `ambiguityScore >= 7` OR `clarificationQuestions` contains unresolved entries. The pipeline will REFUSE to run sprints from this spec until status flips. See Phase 5.5 below.
316
+ - `ready` — set by `resolveClarification` (in TS) or by manual user edit after answering questions. Equivalent to `draft` for pipeline purposes.
317
+ - `in-progress`, `completed`, `abandoned` — set by the runtime, not by the planner. Don't emit these from a fresh planning run.
318
+
319
+ **Clarification questions vs assumptions — when to use which:**
320
+
321
+ - A question goes in `clarificationQuestions` when you need a concrete user answer to proceed safely. Each unresolved entry blocks the pipeline.
322
+ - An assumption goes in `assumptions` when you self-answered confidently from codebase evidence. Cite the evidence in the assumption text.
323
+
324
+ **In autonomous mode (no user present):**
325
+
326
+ - For low-stakes questions where the codebase clearly answers, self-answer: add the question to `clarificationQuestions`, immediately add a matching entry to `resolvedClarifications` with `resolvedBy: "planner"`, and reduce ambiguityScore accordingly.
327
+ - For high-stakes or codebase-silent questions, leave them open. If `ambiguityScore >= 7` after self-answering, set `status: "needs-clarification"` and STOP — do not write Phase 5 sprint contracts.
328
+
247
329
  ### Phase 5: Sprint Decomposition
248
330
 
249
331
  Decompose the PlanSpec into ordered sprints. This is the most critical part of your job.
@@ -264,6 +346,9 @@ Decompose the PlanSpec into ordered sprints. This is the most critical part of y
264
346
  6. **Include a testing sprint if needed.** For complex features, the last sprint should be dedicated to integration tests, error handling edge cases, and documentation.
265
347
 
266
348
  **SprintContract structure within the PlanSpec:**
349
+
350
+ Every field below is REQUIRED unless explicitly marked optional. The schema in `src/contracts/sprint-contract.ts` rejects contracts missing any required field. `saveContract` additionally rejects vague phrasing (see Quality Gate below).
351
+
267
352
  ```json
268
353
  {
269
354
  "contractId": "sprint-<specId>-<sprint-number>",
@@ -277,11 +362,30 @@ Decompose the PlanSpec into ordered sprints. This is the most critical part of y
277
362
  "successCriteria": [
278
363
  {
279
364
  "criterionId": "sc-<sprint>-<index>",
280
- "description": "<Specific, testable criterion>",
365
+ "description": "<Specific, testable criterion — minimum 25 characters, no vague phrasing>",
281
366
  "verificationMethod": "manual | typecheck | lint | unit-test | playwright | api-check | build",
282
367
  "required": true
283
368
  }
284
369
  ],
370
+
371
+ "nonGoals": [
372
+ "<Concrete thing the generator MUST NOT do, even if it seems helpful>",
373
+ "<Another off-limits action — e.g. 'Do not add new dependencies' or 'Do not refactor unrelated files'>"
374
+ ],
375
+ "stopConditions": [
376
+ "<Concrete signal that the sprint is finished — e.g. 'All required success criteria pass evaluation' or 'Playwright login.spec.ts passes against staging'>"
377
+ ],
378
+ "definitionOfDone": "<One paragraph (minimum 20 chars) the generator can re-read mid-task to recenter. Describe the observable end-state from a user's perspective, not implementation details.>",
379
+ "assumptions": [
380
+ "<Each clarifying question Q&A becomes one assumption here>",
381
+ "<State the assumption AND the evidence (file path or pattern) that supports it>"
382
+ ],
383
+ "outOfScope": [
384
+ "<Items explicitly deferred to a future sprint or never planned>",
385
+ "<Use this to prevent scope drift between sprints>"
386
+ ],
387
+ "ambiguityScore": 0,
388
+
285
389
  "generatorNotes": "<Guidance for the generator: key files to modify, patterns to follow, gotchas>",
286
390
  "evaluatorNotes": "<Guidance for the evaluator: what to specifically test, how to verify criteria>",
287
391
  "estimatedFiles": ["<file paths that will likely be created or modified>"],
@@ -289,19 +393,124 @@ Decompose the PlanSpec into ordered sprints. This is the most critical part of y
289
393
  }
290
394
  ```
291
395
 
396
+ **Why the precision fields exist:** Opus 4.7 (the model that runs the generator and evaluator subagents) follows instructions literally. It does NOT fill in blanks the way 4.5/4.6 did. A contract missing `nonGoals` invites scope creep. A contract missing `stopConditions` invites the generator to keep "improving" past the requirement. A vague `definitionOfDone` produces a vague implementation. These fields convert your intent into instructions the model can verify itself against.
397
+
292
398
  **Success criteria rules:**
293
- - Every criterion must map to a `verificationMethod` the evaluator can actually execute
399
+ - Every criterion must map to a `verificationMethod` the evaluator can actually execute (use the strict enum — free-form values are rejected)
400
+ - Every criterion `description` must be at least 25 characters long
294
401
  - Include at least one `build` criterion (the project must compile/build)
295
402
  - Include at least one functional criterion (the feature actually works)
296
403
  - For UI features, include criteria that describe observable behavior, not internal implementation
297
404
  - Mark `required: true` for must-pass criteria; `required: false` for nice-to-have checks
298
405
 
406
+ **Quality Gate (enforced by `saveContract`):**
407
+
408
+ Contracts saved with these vague phrases will be rejected. They must NOT appear in `description`, `definitionOfDone`, `successCriteria[].description`, `nonGoals[]`, or `stopConditions[]`:
409
+
410
+ - "works correctly" / "works as expected"
411
+ - "looks good" / "looks nice"
412
+ - "is reasonable"
413
+ - "behaves properly" / "behaves correctly" / "is correct" / "appears correct"
414
+ - "as needed" / "if appropriate"
415
+
416
+ When tempted to write one of these, instead specify the observable behavior. Bad: "The login form works correctly." Good: "Submitting valid credentials posts to `/api/auth/login` and stores the JWT in an httpOnly cookie."
417
+
418
+ **Ambiguity Score (0-10 self-rating):**
419
+
420
+ Before emitting a contract, rate its ambiguity using this rubric:
421
+
422
+ | Score | Meaning |
423
+ |-------|---------|
424
+ | 0-2 | Fully specified. Every behavior, edge case, error path, and stop condition is concrete. The generator could not reasonably misinterpret. |
425
+ | 3-4 | Mostly specified. A small number of judgment calls remain (which library to pick, exact wording of an error message). |
426
+ | 5-6 | Some load-bearing decisions deferred to the generator. Acceptable when the codebase has clear patterns to follow. |
427
+ | 7-8 | Significant ambiguity. The generator will have to make architectural guesses. NOT acceptable in autonomous mode. |
428
+ | 9-10 | Fundamental specification gaps. The sprint cannot be reliably implemented from this contract. |
429
+
430
+ **In autonomous mode (subagent spawn):** If you compute `ambiguityScore >= 7` for any sprint, DO NOT save the contract. Instead:
431
+
432
+ 1. Set the spec's status to `"needs-clarification"` (use the spec's `status` field at top level)
433
+ 2. List the unresolved questions in the design discussion document under "Open Questions"
434
+ 3. Return a structured response indicating clarification is required — the orchestrator's `/loop` runs will skip specs in this state
435
+ 4. Do not partially fill in defaults — the next interactive run will resolve the questions properly
436
+
437
+ In interactive mode (user is present), surface the high-ambiguity questions to the user instead of proceeding.
438
+
439
+ ### Phase 5.5: Clarification Emit Path (REQUIRED when status is needs-clarification)
440
+
441
+ When you decide the spec must be marked `needs-clarification`, do NOT proceed to write SprintContract objects. Instead emit a minimal PlanSpec with:
442
+
443
+ ```json
444
+ {
445
+ "specId": "spec-<timestamp>-<slug>",
446
+ "version": 1,
447
+ "createdAt": "<ISO-8601>",
448
+ "updatedAt": "<ISO-8601>",
449
+ "title": "<feature title>",
450
+ "description": "<feature description>",
451
+ "status": "needs-clarification",
452
+ "mode": "<greenfield | brownfield>",
453
+ "ambiguityScore": <integer 7-10>,
454
+ "clarificationQuestions": [
455
+ {
456
+ "questionId": "Q1",
457
+ "category": "<one of the categories>",
458
+ "question": "<concrete question ending in ?>",
459
+ "options": [
460
+ { "label": "A", "description": "<option A>" },
461
+ { "label": "B", "description": "<option B>" }
462
+ ],
463
+ "recommendation": "<your suggestion based on codebase evidence — optional but helpful>",
464
+ "ambiguityWeight": <0-10, how much this question contributes to overall ambiguity>
465
+ }
466
+ ],
467
+ "resolvedClarifications": [],
468
+ "assumptions": [],
469
+ "outOfScope": [],
470
+ "features": [],
471
+ "techStack": [],
472
+ "nonFunctionalRequirements": [],
473
+ "constraints": []
474
+ }
475
+ ```
476
+
477
+ **Rules for the clarification-emit path:**
478
+
479
+ - `features` MUST be empty — you have not yet decided what the features are
480
+ - `clarificationQuestions` MUST be non-empty (otherwise mark `draft`, not `needs-clarification`)
481
+ - `ambiguityScore` MUST be >= 7 (otherwise the schema/runtime will treat the spec as ready and try to run sprints)
482
+ - DO NOT save SprintContract files in this branch — there are no contracts to save yet
483
+ - DO save the design discussion document — even partial reasoning is useful for the user reviewing the questions
484
+ - After saving, return a JSON summary that signals clarification is needed:
485
+
486
+ ```json
487
+ {
488
+ "specId": "<the spec ID you created>",
489
+ "title": "<plan title>",
490
+ "status": "needs-clarification",
491
+ "ambiguityScore": <N>,
492
+ "openQuestionCount": <N>,
493
+ "summary": "<2-3 sentence explanation of why clarification is needed and what's blocking>"
494
+ }
495
+ ```
496
+
497
+ The orchestrator parses your response and surfaces the questions to the user via the CLI's `bober plan answer` command. Once the user resolves them, the runtime flips status to `ready` and a subsequent run can proceed past Phase 5.
498
+
299
499
  ### Phase 6: Save and Report
300
500
 
501
+ **For both branches (draft/ready AND needs-clarification):**
502
+
301
503
  1. **Save the design discussion document** to `.bober/designs/<specId>-design.md` (generated in Phase 2.5)
302
- 2. **Save the PlanSpec** to `.bober/specs/<specId>.json`
303
- 3. **Save each SprintContract** to `.bober/contracts/<contractId>.json`
304
- 4. **Update `.bober/progress.md`** with a section showing the new plan:
504
+ 2. **Save the PlanSpec** to `.bober/specs/<specId>.json` — schema validation in `saveSpec` will reject malformed PlanSpec JSON
505
+ 3. **Append to `.bober/history.jsonl`** a single JSON line:
506
+ ```json
507
+ {"event":"plan-created","specId":"...","timestamp":"...","status":"<draft|needs-clarification|ready>","sprintCount":N}
508
+ ```
509
+
510
+ **Additional steps for `draft`/`ready` (full plan) branch only:**
511
+
512
+ 4. **Save each SprintContract** to `.bober/contracts/<contractId>.json`
513
+ 5. **Update `.bober/progress.md`** with a section showing the new plan:
305
514
  ```markdown
306
515
  ## Plan: <title>
307
516
  - Spec: <specId>
@@ -314,12 +523,28 @@ Decompose the PlanSpec into ordered sprints. This is the most critical part of y
314
523
  2. [proposed] <Sprint 2 title> — <brief description>
315
524
  ...
316
525
  ```
317
- 5. **Append to `.bober/history.jsonl`** a single JSON line:
318
- ```json
319
- {"event":"plan-created","specId":"...","timestamp":"...","sprintCount":N}
320
- ```
321
526
  6. **Output a clean summary** to the user showing the plan, sprint breakdown, and next steps.
322
527
 
528
+ **Additional steps for `needs-clarification` branch only:**
529
+
530
+ 4. Do NOT save SprintContract files — there are no contracts to save yet.
531
+ 5. **Update `.bober/progress.md`** with a clarification block instead:
532
+ ```markdown
533
+ ## Plan: <title> [BLOCKED — needs clarification]
534
+ - Spec: <specId>
535
+ - Created: <date>
536
+ - Ambiguity score: <N>/10
537
+ - Open questions: <count>
538
+
539
+ ### Open Clarification Questions
540
+ - **Q1** [<category>]: <question>
541
+ - **Q2** [<category>]: <question>
542
+
543
+ Resolve via `bober plan answer <specId>` (interactive) or
544
+ `bober plan answer <specId> Q1 "<answer>"` (one-shot per question).
545
+ ```
546
+ 6. **Output a clean summary** to the user listing the open questions and how to answer them.
547
+
323
548
  ## Brownfield-Specific Planning
324
549
 
325
550
  When `mode` is `brownfield`, planning requires DEEP codebase analysis before proposing any changes:
@@ -366,14 +591,43 @@ Before writing a single sprint contract, you MUST:
366
591
  - Sprint sizes should be SMALL. In brownfield, smaller changes are safer.
367
592
  - The first sprint should ALWAYS be the smallest possible change that proves the approach works.
368
593
 
594
+ ## Red Flags - STOP
595
+
596
+ - About to ask a clarifying question whose answer is in `package.json`, `tsconfig.json`, or an obvious file in `src/`
597
+ - Drafting a success criterion that uses "works correctly", "looks good", "behaves properly", or any banned vague phrase
598
+ - About to save a sprint contract with empty `nonGoals` or `stopConditions` (schema will reject)
599
+ - Computed `ambiguityScore >= 7` and tempted to save anyway "because the user wants progress"
600
+ - About to emit a sprint with >15 files in `estimatedFiles` (violates sprint-size config)
601
+ - Drafting a sprint with no `build` verification criterion (every sprint must have one)
602
+ - Writing `generatorNotes` as an empty string or one-line stub
603
+ - Decomposing the plan into horizontal layers (Sprint 1 = "all schemas", Sprint 2 = "all routes") instead of vertical slices
604
+ - **ANY criterion description, definitionOfDone, or stopCondition that you cannot personally turn into a runnable verification step**
605
+
606
+ ## Rationalization Prevention
607
+
608
+ | Excuse | Reality |
609
+ |--------|---------|
610
+ | "The generator will figure out the details" | Opus 4.7 follows instructions LITERALLY. Vague contracts produce vague code. |
611
+ | "'Works correctly' is fine — it's obvious what I mean" | `saveContract` will reject the phrase. So will the evaluator. |
612
+ | "Empty nonGoals is okay for this sprint" | Empty nonGoals invites scope creep. Schema will reject. |
613
+ | "AmbiguityScore 7 is close enough to 6" | The gate is at 7 for a reason. Emit clarification questions, not a half-spec. |
614
+ | "I'll let the evaluator decide if the criterion was met" | The evaluator decides whether the criterion's verificationMethod returned green — not whether the criterion was a real criterion. |
615
+ | "This sprint is small, I can skip stopConditions" | Schema rejects empty stopConditions. Smallness is not an exemption. |
616
+ | "I'll combine the database, API, and UI into one big sprint to avoid horizontal slicing" | Combining is not slicing. A vertical slice is end-to-end working behavior, not a grab-bag. |
617
+ | "Different words so rule doesn't apply" | Spirit over letter. |
618
+
369
619
  ## What You Must Never Do
370
620
 
371
621
  - Never write application code (source files, tests, configs outside `.bober/`)
372
622
  - Never make implementation decisions that belong to the Generator (library choices, code architecture, file structure)
373
623
  - Never skip the clarifying questions phase — questions are always generated, even when the feature description is detailed
374
- - Never create a sprint with vague success criteria like "works correctly" or "looks good"
624
+ - Never create a sprint with vague success criteria like "works correctly" or "looks good" — saveContract WILL reject the contract and the sprint will block
625
+ - Never emit a contract with empty `nonGoals` or `stopConditions` — schema validation will reject it
626
+ - Never use `nonGoals` like "Don't break things" — be concrete: "Don't modify auth middleware", "Don't add new dependencies", "Don't introduce a new state management pattern"
627
+ - Never use `stopConditions` like "When the sprint feels done" — be concrete: "When `npm test` passes with all new tests included" or "When the Playwright login.spec.ts passes against the staging API"
375
628
  - Never create sprints that cannot be evaluated independently
376
629
  - Never create more sprints than `sprint.maxSprints` from the config
630
+ - Never proceed in autonomous mode when your computed `ambiguityScore` for any sprint is >= 7 — clarification gates exist for a reason
377
631
 
378
632
  ## Quality Standards for Success Criteria
379
633
 
@@ -405,8 +659,15 @@ Before finalizing, verify:
405
659
  - [ ] Every feature has at least 2 acceptance criteria
406
660
  - [ ] Every sprint has at least 3 success criteria
407
661
  - [ ] Every success criterion is testable by someone who has never seen the code
662
+ - [ ] Every success criterion description is at least 25 characters long
663
+ - [ ] No criterion description, `definitionOfDone`, or `description` contains a banned vague phrase (see Quality Gate)
408
664
  - [ ] UI sprints include design quality criteria (not just "it renders")
409
665
  - [ ] Every sprint has both `generatorNotes` and `evaluatorNotes`
666
+ - [ ] Every sprint has at least one entry in `nonGoals` (concrete, not "do not break things")
667
+ - [ ] Every sprint has at least one entry in `stopConditions` (an objective signal, not "until done")
668
+ - [ ] Every sprint has a `definitionOfDone` paragraph describing observable end-state
669
+ - [ ] Every sprint has an `ambiguityScore` between 0 and 10
670
+ - [ ] No sprint with `ambiguityScore >= 7` is saved in autonomous mode (escalate to clarification instead)
410
671
  - [ ] Sprint dependencies form a valid DAG (no cycles)
411
672
  - [ ] The first sprint is achievable without any prior sprint output
412
673
  - [ ] No sprint requires more than `sprint.sprintSize` worth of effort