agent-bober 0.12.0 → 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 (518) hide show
  1. package/CHANGELOG.md +213 -0
  2. package/README.md +112 -3
  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 +89 -1
  9. package/agents/bober-generator.md +68 -3
  10. package/agents/bober-planner.md +39 -0
  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/graph.d.ts +8 -0
  26. package/dist/cli/commands/graph.d.ts.map +1 -0
  27. package/dist/cli/commands/graph.js +219 -0
  28. package/dist/cli/commands/graph.js.map +1 -0
  29. package/dist/cli/commands/impact.d.ts +19 -0
  30. package/dist/cli/commands/impact.d.ts.map +1 -0
  31. package/dist/cli/commands/impact.js +191 -0
  32. package/dist/cli/commands/impact.js.map +1 -0
  33. package/dist/cli/commands/incident.d.ts +19 -0
  34. package/dist/cli/commands/incident.d.ts.map +1 -0
  35. package/dist/cli/commands/incident.js +324 -0
  36. package/dist/cli/commands/incident.js.map +1 -0
  37. package/dist/cli/commands/init.js +36 -1
  38. package/dist/cli/commands/init.js.map +1 -1
  39. package/dist/cli/commands/list-approvals.d.ts +16 -0
  40. package/dist/cli/commands/list-approvals.d.ts.map +1 -0
  41. package/dist/cli/commands/list-approvals.js +57 -0
  42. package/dist/cli/commands/list-approvals.js.map +1 -0
  43. package/dist/cli/commands/onboard.d.ts +3 -0
  44. package/dist/cli/commands/onboard.d.ts.map +1 -0
  45. package/dist/cli/commands/onboard.js +190 -0
  46. package/dist/cli/commands/onboard.js.map +1 -0
  47. package/dist/cli/commands/playbook.d.ts +17 -0
  48. package/dist/cli/commands/playbook.d.ts.map +1 -0
  49. package/dist/cli/commands/playbook.js +123 -0
  50. package/dist/cli/commands/playbook.js.map +1 -0
  51. package/dist/cli/commands/postmortem.d.ts +12 -0
  52. package/dist/cli/commands/postmortem.d.ts.map +1 -0
  53. package/dist/cli/commands/postmortem.js +67 -0
  54. package/dist/cli/commands/postmortem.js.map +1 -0
  55. package/dist/cli/commands/reject.d.ts +17 -0
  56. package/dist/cli/commands/reject.d.ts.map +1 -0
  57. package/dist/cli/commands/reject.js +52 -0
  58. package/dist/cli/commands/reject.js.map +1 -0
  59. package/dist/cli/commands/rollback.d.ts +21 -0
  60. package/dist/cli/commands/rollback.d.ts.map +1 -0
  61. package/dist/cli/commands/rollback.js +90 -0
  62. package/dist/cli/commands/rollback.js.map +1 -0
  63. package/dist/cli/commands/run.d.ts +9 -0
  64. package/dist/cli/commands/run.d.ts.map +1 -1
  65. package/dist/cli/commands/run.js +29 -0
  66. package/dist/cli/commands/run.js.map +1 -1
  67. package/dist/cli/commands/telemetry.d.ts +16 -0
  68. package/dist/cli/commands/telemetry.d.ts.map +1 -0
  69. package/dist/cli/commands/telemetry.js +152 -0
  70. package/dist/cli/commands/telemetry.js.map +1 -0
  71. package/dist/cli/commands/worktree.d.ts +12 -0
  72. package/dist/cli/commands/worktree.d.ts.map +1 -0
  73. package/dist/cli/commands/worktree.js +57 -0
  74. package/dist/cli/commands/worktree.js.map +1 -0
  75. package/dist/cli/index.js +50 -0
  76. package/dist/cli/index.js.map +1 -1
  77. package/dist/config/defaults.d.ts.map +1 -1
  78. package/dist/config/defaults.js +27 -0
  79. package/dist/config/defaults.js.map +1 -1
  80. package/dist/config/index.d.ts +1 -1
  81. package/dist/config/index.d.ts.map +1 -1
  82. package/dist/config/index.js +4 -0
  83. package/dist/config/index.js.map +1 -1
  84. package/dist/config/loader.d.ts.map +1 -1
  85. package/dist/config/loader.js +18 -1
  86. package/dist/config/loader.js.map +1 -1
  87. package/dist/config/schema.d.ts +976 -56
  88. package/dist/config/schema.d.ts.map +1 -1
  89. package/dist/config/schema.js +147 -0
  90. package/dist/config/schema.js.map +1 -1
  91. package/dist/graph/artifact-store.d.ts +14 -0
  92. package/dist/graph/artifact-store.d.ts.map +1 -0
  93. package/dist/graph/artifact-store.js +100 -0
  94. package/dist/graph/artifact-store.js.map +1 -0
  95. package/dist/graph/cli.d.ts +49 -0
  96. package/dist/graph/cli.d.ts.map +1 -0
  97. package/dist/graph/cli.js +140 -0
  98. package/dist/graph/cli.js.map +1 -0
  99. package/dist/graph/client.d.ts +64 -0
  100. package/dist/graph/client.d.ts.map +1 -0
  101. package/dist/graph/client.js +216 -0
  102. package/dist/graph/client.js.map +1 -0
  103. package/dist/graph/fallback.d.ts +13 -0
  104. package/dist/graph/fallback.d.ts.map +1 -0
  105. package/dist/graph/fallback.js +57 -0
  106. package/dist/graph/fallback.js.map +1 -0
  107. package/dist/graph/hook-handler.d.ts +50 -0
  108. package/dist/graph/hook-handler.d.ts.map +1 -0
  109. package/dist/graph/hook-handler.js +217 -0
  110. package/dist/graph/hook-handler.js.map +1 -0
  111. package/dist/graph/incidents.d.ts +59 -0
  112. package/dist/graph/incidents.d.ts.map +1 -0
  113. package/dist/graph/incidents.js +22 -0
  114. package/dist/graph/incidents.js.map +1 -0
  115. package/dist/graph/mcp-client.d.ts +51 -0
  116. package/dist/graph/mcp-client.d.ts.map +1 -0
  117. package/dist/graph/mcp-client.js +285 -0
  118. package/dist/graph/mcp-client.js.map +1 -0
  119. package/dist/graph/onboarding-composer.d.ts +30 -0
  120. package/dist/graph/onboarding-composer.d.ts.map +1 -0
  121. package/dist/graph/onboarding-composer.js +275 -0
  122. package/dist/graph/onboarding-composer.js.map +1 -0
  123. package/dist/graph/pipeline-lifecycle.d.ts +86 -0
  124. package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
  125. package/dist/graph/pipeline-lifecycle.js +329 -0
  126. package/dist/graph/pipeline-lifecycle.js.map +1 -0
  127. package/dist/graph/preflight-budgets.d.ts +52 -0
  128. package/dist/graph/preflight-budgets.d.ts.map +1 -0
  129. package/dist/graph/preflight-budgets.js +78 -0
  130. package/dist/graph/preflight-budgets.js.map +1 -0
  131. package/dist/graph/preflight-injector.d.ts +116 -0
  132. package/dist/graph/preflight-injector.d.ts.map +1 -0
  133. package/dist/graph/preflight-injector.js +538 -0
  134. package/dist/graph/preflight-injector.js.map +1 -0
  135. package/dist/graph/prereq.d.ts +12 -0
  136. package/dist/graph/prereq.d.ts.map +1 -0
  137. package/dist/graph/prereq.js +61 -0
  138. package/dist/graph/prereq.js.map +1 -0
  139. package/dist/graph/prompts.d.ts +42 -0
  140. package/dist/graph/prompts.d.ts.map +1 -0
  141. package/dist/graph/prompts.js +80 -0
  142. package/dist/graph/prompts.js.map +1 -0
  143. package/dist/graph/sandbox.d.ts +19 -0
  144. package/dist/graph/sandbox.d.ts.map +1 -0
  145. package/dist/graph/sandbox.js +25 -0
  146. package/dist/graph/sandbox.js.map +1 -0
  147. package/dist/graph/token-usage.d.ts +21 -0
  148. package/dist/graph/token-usage.d.ts.map +1 -0
  149. package/dist/graph/token-usage.js +22 -0
  150. package/dist/graph/token-usage.js.map +1 -0
  151. package/dist/graph/types.d.ts +129 -0
  152. package/dist/graph/types.d.ts.map +1 -0
  153. package/dist/graph/types.js +12 -0
  154. package/dist/graph/types.js.map +1 -0
  155. package/dist/incident/orchestrator.d.ts +168 -0
  156. package/dist/incident/orchestrator.d.ts.map +1 -0
  157. package/dist/incident/orchestrator.js +279 -0
  158. package/dist/incident/orchestrator.js.map +1 -0
  159. package/dist/incident/playbook-search.d.ts +67 -0
  160. package/dist/incident/playbook-search.d.ts.map +1 -0
  161. package/dist/incident/playbook-search.js +288 -0
  162. package/dist/incident/playbook-search.js.map +1 -0
  163. package/dist/incident/postmortem.d.ts +44 -0
  164. package/dist/incident/postmortem.d.ts.map +1 -0
  165. package/dist/incident/postmortem.js +486 -0
  166. package/dist/incident/postmortem.js.map +1 -0
  167. package/dist/incident/resolution-verify.d.ts +186 -0
  168. package/dist/incident/resolution-verify.d.ts.map +1 -0
  169. package/dist/incident/resolution-verify.js +210 -0
  170. package/dist/incident/resolution-verify.js.map +1 -0
  171. package/dist/incident/rollback.d.ts +137 -0
  172. package/dist/incident/rollback.d.ts.map +1 -0
  173. package/dist/incident/rollback.js +328 -0
  174. package/dist/incident/rollback.js.map +1 -0
  175. package/dist/incident/timeline.d.ts +147 -0
  176. package/dist/incident/timeline.d.ts.map +1 -0
  177. package/dist/incident/timeline.js +452 -0
  178. package/dist/incident/timeline.js.map +1 -0
  179. package/dist/incident/types.d.ts +335 -0
  180. package/dist/incident/types.d.ts.map +1 -0
  181. package/dist/incident/types.js +158 -0
  182. package/dist/incident/types.js.map +1 -0
  183. package/dist/index.d.ts +1 -1
  184. package/dist/index.d.ts.map +1 -1
  185. package/dist/index.js +1 -1
  186. package/dist/index.js.map +1 -1
  187. package/dist/mcp/event-stream.d.ts +46 -0
  188. package/dist/mcp/event-stream.d.ts.map +1 -0
  189. package/dist/mcp/event-stream.js +421 -0
  190. package/dist/mcp/event-stream.js.map +1 -0
  191. package/dist/mcp/external-client.d.ts +38 -0
  192. package/dist/mcp/external-client.d.ts.map +1 -0
  193. package/dist/mcp/external-client.js +121 -0
  194. package/dist/mcp/external-client.js.map +1 -0
  195. package/dist/mcp/run-manager.d.ts +74 -9
  196. package/dist/mcp/run-manager.d.ts.map +1 -1
  197. package/dist/mcp/run-manager.js +127 -31
  198. package/dist/mcp/run-manager.js.map +1 -1
  199. package/dist/mcp/server.d.ts.map +1 -1
  200. package/dist/mcp/server.js +56 -0
  201. package/dist/mcp/server.js.map +1 -1
  202. package/dist/mcp/tools/abort-run.d.ts +2 -0
  203. package/dist/mcp/tools/abort-run.d.ts.map +1 -0
  204. package/dist/mcp/tools/abort-run.js +62 -0
  205. package/dist/mcp/tools/abort-run.js.map +1 -0
  206. package/dist/mcp/tools/anchor.js +1 -1
  207. package/dist/mcp/tools/anchor.js.map +1 -1
  208. package/dist/mcp/tools/approve-checkpoint.d.ts +2 -0
  209. package/dist/mcp/tools/approve-checkpoint.d.ts.map +1 -0
  210. package/dist/mcp/tools/approve-checkpoint.js +70 -0
  211. package/dist/mcp/tools/approve-checkpoint.js.map +1 -0
  212. package/dist/mcp/tools/brownfield.js +1 -1
  213. package/dist/mcp/tools/brownfield.js.map +1 -1
  214. package/dist/mcp/tools/get-project-state.d.ts +2 -0
  215. package/dist/mcp/tools/get-project-state.d.ts.map +1 -0
  216. package/dist/mcp/tools/get-project-state.js +107 -0
  217. package/dist/mcp/tools/get-project-state.js.map +1 -0
  218. package/dist/mcp/tools/get-run-status.d.ts +2 -0
  219. package/dist/mcp/tools/get-run-status.d.ts.map +1 -0
  220. package/dist/mcp/tools/get-run-status.js +40 -0
  221. package/dist/mcp/tools/get-run-status.js.map +1 -0
  222. package/dist/mcp/tools/graph-schemas.d.ts +100 -0
  223. package/dist/mcp/tools/graph-schemas.d.ts.map +1 -0
  224. package/dist/mcp/tools/graph-schemas.js +39 -0
  225. package/dist/mcp/tools/graph-schemas.js.map +1 -0
  226. package/dist/mcp/tools/graph.d.ts +19 -0
  227. package/dist/mcp/tools/graph.d.ts.map +1 -0
  228. package/dist/mcp/tools/graph.js +263 -0
  229. package/dist/mcp/tools/graph.js.map +1 -0
  230. package/dist/mcp/tools/incident.d.ts +2 -0
  231. package/dist/mcp/tools/incident.d.ts.map +1 -0
  232. package/dist/mcp/tools/incident.js +246 -0
  233. package/dist/mcp/tools/incident.js.map +1 -0
  234. package/dist/mcp/tools/index.d.ts +38 -18
  235. package/dist/mcp/tools/index.d.ts.map +1 -1
  236. package/dist/mcp/tools/index.js +74 -18
  237. package/dist/mcp/tools/index.js.map +1 -1
  238. package/dist/mcp/tools/list-active-runs.d.ts +2 -0
  239. package/dist/mcp/tools/list-active-runs.d.ts.map +1 -0
  240. package/dist/mcp/tools/list-active-runs.js +35 -0
  241. package/dist/mcp/tools/list-active-runs.js.map +1 -0
  242. package/dist/mcp/tools/list-pending-approvals.d.ts +2 -0
  243. package/dist/mcp/tools/list-pending-approvals.d.ts.map +1 -0
  244. package/dist/mcp/tools/list-pending-approvals.js +40 -0
  245. package/dist/mcp/tools/list-pending-approvals.js.map +1 -0
  246. package/dist/mcp/tools/list-projects.d.ts +2 -0
  247. package/dist/mcp/tools/list-projects.d.ts.map +1 -0
  248. package/dist/mcp/tools/list-projects.js +101 -0
  249. package/dist/mcp/tools/list-projects.js.map +1 -0
  250. package/dist/mcp/tools/list-specs.d.ts +2 -0
  251. package/dist/mcp/tools/list-specs.d.ts.map +1 -0
  252. package/dist/mcp/tools/list-specs.js +48 -0
  253. package/dist/mcp/tools/list-specs.js.map +1 -0
  254. package/dist/mcp/tools/playbook.d.ts +2 -0
  255. package/dist/mcp/tools/playbook.d.ts.map +1 -0
  256. package/dist/mcp/tools/playbook.js +104 -0
  257. package/dist/mcp/tools/playbook.js.map +1 -0
  258. package/dist/mcp/tools/postmortem.d.ts +2 -0
  259. package/dist/mcp/tools/postmortem.d.ts.map +1 -0
  260. package/dist/mcp/tools/postmortem.js +75 -0
  261. package/dist/mcp/tools/postmortem.js.map +1 -0
  262. package/dist/mcp/tools/react.js +1 -1
  263. package/dist/mcp/tools/react.js.map +1 -1
  264. package/dist/mcp/tools/reject-checkpoint.d.ts +2 -0
  265. package/dist/mcp/tools/reject-checkpoint.d.ts.map +1 -0
  266. package/dist/mcp/tools/reject-checkpoint.js +79 -0
  267. package/dist/mcp/tools/reject-checkpoint.js.map +1 -0
  268. package/dist/mcp/tools/rollback.d.ts +2 -0
  269. package/dist/mcp/tools/rollback.d.ts.map +1 -0
  270. package/dist/mcp/tools/rollback.js +78 -0
  271. package/dist/mcp/tools/rollback.js.map +1 -0
  272. package/dist/mcp/tools/run-in-worktree.d.ts +2 -0
  273. package/dist/mcp/tools/run-in-worktree.d.ts.map +1 -0
  274. package/dist/mcp/tools/run-in-worktree.js +90 -0
  275. package/dist/mcp/tools/run-in-worktree.js.map +1 -0
  276. package/dist/mcp/tools/run.js +1 -1
  277. package/dist/mcp/tools/run.js.map +1 -1
  278. package/dist/mcp/tools/solidity.js +1 -1
  279. package/dist/mcp/tools/solidity.js.map +1 -1
  280. package/dist/mcp/tools/status.d.ts.map +1 -1
  281. package/dist/mcp/tools/status.js +11 -0
  282. package/dist/mcp/tools/status.js.map +1 -1
  283. package/dist/mcp/tools/subscribe-events.d.ts +2 -0
  284. package/dist/mcp/tools/subscribe-events.d.ts.map +1 -0
  285. package/dist/mcp/tools/subscribe-events.js +48 -0
  286. package/dist/mcp/tools/subscribe-events.js.map +1 -0
  287. package/dist/mcp/tools/unsubscribe-events.d.ts +2 -0
  288. package/dist/mcp/tools/unsubscribe-events.d.ts.map +1 -0
  289. package/dist/mcp/tools/unsubscribe-events.js +45 -0
  290. package/dist/mcp/tools/unsubscribe-events.js.map +1 -0
  291. package/dist/orchestrator/agent-loader.d.ts +16 -0
  292. package/dist/orchestrator/agent-loader.d.ts.map +1 -1
  293. package/dist/orchestrator/agent-loader.js +16 -0
  294. package/dist/orchestrator/agent-loader.js.map +1 -1
  295. package/dist/orchestrator/architect-agent.d.ts.map +1 -1
  296. package/dist/orchestrator/architect-agent.js +37 -8
  297. package/dist/orchestrator/architect-agent.js.map +1 -1
  298. package/dist/orchestrator/checkpoints/audit.d.ts +128 -0
  299. package/dist/orchestrator/checkpoints/audit.d.ts.map +1 -0
  300. package/dist/orchestrator/checkpoints/audit.js +272 -0
  301. package/dist/orchestrator/checkpoints/audit.js.map +1 -0
  302. package/dist/orchestrator/checkpoints/feedback-router.d.ts +213 -0
  303. package/dist/orchestrator/checkpoints/feedback-router.d.ts.map +1 -0
  304. package/dist/orchestrator/checkpoints/feedback-router.js +438 -0
  305. package/dist/orchestrator/checkpoints/feedback-router.js.map +1 -0
  306. package/dist/orchestrator/checkpoints/index.d.ts +11 -0
  307. package/dist/orchestrator/checkpoints/index.d.ts.map +1 -0
  308. package/dist/orchestrator/checkpoints/index.js +12 -0
  309. package/dist/orchestrator/checkpoints/index.js.map +1 -0
  310. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts +35 -0
  311. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts.map +1 -0
  312. package/dist/orchestrator/checkpoints/mechanisms/cli.js +153 -0
  313. package/dist/orchestrator/checkpoints/mechanisms/cli.js.map +1 -0
  314. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts +34 -0
  315. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts.map +1 -0
  316. package/dist/orchestrator/checkpoints/mechanisms/disk.js +139 -0
  317. package/dist/orchestrator/checkpoints/mechanisms/disk.js.map +1 -0
  318. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts +141 -0
  319. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts.map +1 -0
  320. package/dist/orchestrator/checkpoints/mechanisms/pr.js +445 -0
  321. package/dist/orchestrator/checkpoints/mechanisms/pr.js.map +1 -0
  322. package/dist/orchestrator/checkpoints/noop.d.ts +12 -0
  323. package/dist/orchestrator/checkpoints/noop.d.ts.map +1 -0
  324. package/dist/orchestrator/checkpoints/noop.js +13 -0
  325. package/dist/orchestrator/checkpoints/noop.js.map +1 -0
  326. package/dist/orchestrator/checkpoints/registry.d.ts +48 -0
  327. package/dist/orchestrator/checkpoints/registry.d.ts.map +1 -0
  328. package/dist/orchestrator/checkpoints/registry.js +89 -0
  329. package/dist/orchestrator/checkpoints/registry.js.map +1 -0
  330. package/dist/orchestrator/checkpoints/renderers/_util.d.ts +50 -0
  331. package/dist/orchestrator/checkpoints/renderers/_util.d.ts.map +1 -0
  332. package/dist/orchestrator/checkpoints/renderers/_util.js +137 -0
  333. package/dist/orchestrator/checkpoints/renderers/_util.js.map +1 -0
  334. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts +15 -0
  335. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts.map +1 -0
  336. package/dist/orchestrator/checkpoints/renderers/code-review.js +66 -0
  337. package/dist/orchestrator/checkpoints/renderers/code-review.js.map +1 -0
  338. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts +15 -0
  339. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts.map +1 -0
  340. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js +40 -0
  341. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js.map +1 -0
  342. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts +15 -0
  343. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts.map +1 -0
  344. package/dist/orchestrator/checkpoints/renderers/eval-result.js +54 -0
  345. package/dist/orchestrator/checkpoints/renderers/eval-result.js.map +1 -0
  346. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts +49 -0
  347. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts.map +1 -0
  348. package/dist/orchestrator/checkpoints/renderers/generator-diff.js +154 -0
  349. package/dist/orchestrator/checkpoints/renderers/generator-diff.js.map +1 -0
  350. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts +15 -0
  351. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts.map +1 -0
  352. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js +59 -0
  353. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js.map +1 -0
  354. package/dist/orchestrator/checkpoints/renderers/plan.d.ts +15 -0
  355. package/dist/orchestrator/checkpoints/renderers/plan.d.ts.map +1 -0
  356. package/dist/orchestrator/checkpoints/renderers/plan.js +34 -0
  357. package/dist/orchestrator/checkpoints/renderers/plan.js.map +1 -0
  358. package/dist/orchestrator/checkpoints/renderers/registry.d.ts +43 -0
  359. package/dist/orchestrator/checkpoints/renderers/registry.d.ts.map +1 -0
  360. package/dist/orchestrator/checkpoints/renderers/registry.js +83 -0
  361. package/dist/orchestrator/checkpoints/renderers/registry.js.map +1 -0
  362. package/dist/orchestrator/checkpoints/renderers/research.d.ts +15 -0
  363. package/dist/orchestrator/checkpoints/renderers/research.d.ts.map +1 -0
  364. package/dist/orchestrator/checkpoints/renderers/research.js +39 -0
  365. package/dist/orchestrator/checkpoints/renderers/research.js.map +1 -0
  366. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts +20 -0
  367. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts.map +1 -0
  368. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js +57 -0
  369. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js.map +1 -0
  370. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts +15 -0
  371. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts.map +1 -0
  372. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js +38 -0
  373. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js.map +1 -0
  374. package/dist/orchestrator/checkpoints/sites.d.ts +22 -0
  375. package/dist/orchestrator/checkpoints/sites.d.ts.map +1 -0
  376. package/dist/orchestrator/checkpoints/sites.js +57 -0
  377. package/dist/orchestrator/checkpoints/sites.js.map +1 -0
  378. package/dist/orchestrator/checkpoints/types.d.ts +51 -0
  379. package/dist/orchestrator/checkpoints/types.d.ts.map +1 -0
  380. package/dist/orchestrator/checkpoints/types.js +9 -0
  381. package/dist/orchestrator/checkpoints/types.js.map +1 -0
  382. package/dist/orchestrator/code-reviewer-agent.d.ts +50 -0
  383. package/dist/orchestrator/code-reviewer-agent.d.ts.map +1 -0
  384. package/dist/orchestrator/code-reviewer-agent.js +283 -0
  385. package/dist/orchestrator/code-reviewer-agent.js.map +1 -0
  386. package/dist/orchestrator/curator-agent.d.ts.map +1 -1
  387. package/dist/orchestrator/curator-agent.js +59 -8
  388. package/dist/orchestrator/curator-agent.js.map +1 -1
  389. package/dist/orchestrator/deploy/classify.d.ts +31 -0
  390. package/dist/orchestrator/deploy/classify.d.ts.map +1 -0
  391. package/dist/orchestrator/deploy/classify.js +109 -0
  392. package/dist/orchestrator/deploy/classify.js.map +1 -0
  393. package/dist/orchestrator/deploy/execute.d.ts +45 -0
  394. package/dist/orchestrator/deploy/execute.d.ts.map +1 -0
  395. package/dist/orchestrator/deploy/execute.js +146 -0
  396. package/dist/orchestrator/deploy/execute.js.map +1 -0
  397. package/dist/orchestrator/deploy/executor.d.ts +22 -0
  398. package/dist/orchestrator/deploy/executor.d.ts.map +1 -0
  399. package/dist/orchestrator/deploy/executor.js +31 -0
  400. package/dist/orchestrator/deploy/executor.js.map +1 -0
  401. package/dist/orchestrator/deploy/index.d.ts +21 -0
  402. package/dist/orchestrator/deploy/index.d.ts.map +1 -0
  403. package/dist/orchestrator/deploy/index.js +21 -0
  404. package/dist/orchestrator/deploy/index.js.map +1 -0
  405. package/dist/orchestrator/deploy/resolve.d.ts +51 -0
  406. package/dist/orchestrator/deploy/resolve.d.ts.map +1 -0
  407. package/dist/orchestrator/deploy/resolve.js +53 -0
  408. package/dist/orchestrator/deploy/resolve.js.map +1 -0
  409. package/dist/orchestrator/deploy/spawn.d.ts +60 -0
  410. package/dist/orchestrator/deploy/spawn.d.ts.map +1 -0
  411. package/dist/orchestrator/deploy/spawn.js +62 -0
  412. package/dist/orchestrator/deploy/spawn.js.map +1 -0
  413. package/dist/orchestrator/deploy/types.d.ts +98 -0
  414. package/dist/orchestrator/deploy/types.d.ts.map +1 -0
  415. package/dist/orchestrator/deploy/types.js +39 -0
  416. package/dist/orchestrator/deploy/types.js.map +1 -0
  417. package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
  418. package/dist/orchestrator/evaluator-agent.js +21 -8
  419. package/dist/orchestrator/evaluator-agent.js.map +1 -1
  420. package/dist/orchestrator/generator-agent.d.ts.map +1 -1
  421. package/dist/orchestrator/generator-agent.js +21 -8
  422. package/dist/orchestrator/generator-agent.js.map +1 -1
  423. package/dist/orchestrator/model-resolver.d.ts.map +1 -1
  424. package/dist/orchestrator/model-resolver.js +3 -1
  425. package/dist/orchestrator/model-resolver.js.map +1 -1
  426. package/dist/orchestrator/observability/index.d.ts +12 -0
  427. package/dist/orchestrator/observability/index.d.ts.map +1 -0
  428. package/dist/orchestrator/observability/index.js +12 -0
  429. package/dist/orchestrator/observability/index.js.map +1 -0
  430. package/dist/orchestrator/observability/merge.d.ts +73 -0
  431. package/dist/orchestrator/observability/merge.d.ts.map +1 -0
  432. package/dist/orchestrator/observability/merge.js +110 -0
  433. package/dist/orchestrator/observability/merge.js.map +1 -0
  434. package/dist/orchestrator/pipeline.d.ts +21 -0
  435. package/dist/orchestrator/pipeline.d.ts.map +1 -1
  436. package/dist/orchestrator/pipeline.js +156 -2
  437. package/dist/orchestrator/pipeline.js.map +1 -1
  438. package/dist/orchestrator/planner-agent.d.ts.map +1 -1
  439. package/dist/orchestrator/planner-agent.js +5 -4
  440. package/dist/orchestrator/planner-agent.js.map +1 -1
  441. package/dist/orchestrator/research-agent.d.ts.map +1 -1
  442. package/dist/orchestrator/research-agent.js +46 -9
  443. package/dist/orchestrator/research-agent.js.map +1 -1
  444. package/dist/orchestrator/tools/handlers.d.ts +2 -0
  445. package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
  446. package/dist/orchestrator/tools/handlers.js +1 -1
  447. package/dist/orchestrator/tools/handlers.js.map +1 -1
  448. package/dist/orchestrator/tools/index.d.ts +84 -1
  449. package/dist/orchestrator/tools/index.d.ts.map +1 -1
  450. package/dist/orchestrator/tools/index.js +164 -1
  451. package/dist/orchestrator/tools/index.js.map +1 -1
  452. package/dist/orchestrator/worktree.d.ts +18 -0
  453. package/dist/orchestrator/worktree.d.ts.map +1 -0
  454. package/dist/orchestrator/worktree.js +129 -0
  455. package/dist/orchestrator/worktree.js.map +1 -0
  456. package/dist/providers/anthropic.d.ts +8 -1
  457. package/dist/providers/anthropic.d.ts.map +1 -1
  458. package/dist/providers/anthropic.js +86 -5
  459. package/dist/providers/anthropic.js.map +1 -1
  460. package/dist/providers/factory.d.ts.map +1 -1
  461. package/dist/providers/factory.js +35 -2
  462. package/dist/providers/factory.js.map +1 -1
  463. package/dist/providers/google.d.ts.map +1 -1
  464. package/dist/providers/google.js +5 -0
  465. package/dist/providers/google.js.map +1 -1
  466. package/dist/providers/index.d.ts +1 -1
  467. package/dist/providers/index.d.ts.map +1 -1
  468. package/dist/providers/index.js.map +1 -1
  469. package/dist/providers/openai.d.ts.map +1 -1
  470. package/dist/providers/openai.js +4 -0
  471. package/dist/providers/openai.js.map +1 -1
  472. package/dist/providers/types.d.ts +25 -2
  473. package/dist/providers/types.d.ts.map +1 -1
  474. package/dist/state/approval-state.d.ts +74 -0
  475. package/dist/state/approval-state.d.ts.map +1 -0
  476. package/dist/state/approval-state.js +127 -0
  477. package/dist/state/approval-state.js.map +1 -0
  478. package/dist/state/index.d.ts +3 -0
  479. package/dist/state/index.d.ts.map +1 -1
  480. package/dist/state/index.js +4 -1
  481. package/dist/state/index.js.map +1 -1
  482. package/dist/state/review-state.d.ts +15 -0
  483. package/dist/state/review-state.d.ts.map +1 -0
  484. package/dist/state/review-state.js +51 -0
  485. package/dist/state/review-state.js.map +1 -0
  486. package/dist/state/run-state.d.ts +39 -0
  487. package/dist/state/run-state.d.ts.map +1 -0
  488. package/dist/state/run-state.js +101 -0
  489. package/dist/state/run-state.js.map +1 -0
  490. package/dist/telemetry/emit.d.ts +41 -0
  491. package/dist/telemetry/emit.d.ts.map +1 -0
  492. package/dist/telemetry/emit.js +65 -0
  493. package/dist/telemetry/emit.js.map +1 -0
  494. package/dist/utils/git.d.ts +27 -0
  495. package/dist/utils/git.d.ts.map +1 -1
  496. package/dist/utils/git.js +50 -0
  497. package/dist/utils/git.js.map +1 -1
  498. package/hooks/hooks.json +17 -1
  499. package/hooks/session-start +42 -0
  500. package/package.json +5 -2
  501. package/scripts/check-prereqs.sh +12 -0
  502. package/scripts/e2e-graph-smoke.sh +167 -0
  503. package/scripts/graph-hook.mjs +151 -0
  504. package/scripts/run-kpi-gate.mjs +245 -0
  505. package/scripts/sync-skills.mjs +4 -1
  506. package/skills/bober.code-review/SKILL.md +186 -0
  507. package/skills/bober.debug/SKILL.md +300 -0
  508. package/skills/bober.deploy/SKILL.md +262 -0
  509. package/skills/bober.diagnose/SKILL.md +254 -0
  510. package/skills/bober.graph/SKILL.md +85 -0
  511. package/skills/bober.impact/SKILL.md +101 -0
  512. package/skills/bober.incident/SKILL.md +245 -0
  513. package/skills/bober.onboard/SKILL.md +84 -0
  514. package/skills/bober.plan/SKILL.md +10 -0
  515. package/skills/bober.postmortem/SKILL.md +231 -0
  516. package/skills/bober.runbook/SKILL.md +335 -0
  517. package/skills/bober.using-bober/SKILL.md +133 -0
  518. package/skills/bober.verify/SKILL.md +143 -0
@@ -0,0 +1,185 @@
1
+ ---
2
+ name: bober-postmortemer
3
+ description: Read-only postmortem synthesizer — reads .bober/incidents/<id>/ artifacts (timeline, observations, hypotheses, actions, changelog, runbook-execution, diagnoses, resolution-evidence) and produces an evidence-cited postmortem.md. Pure offline synthesis; no observability access.
4
+ tools:
5
+ - Read
6
+ - Bash
7
+ - Grep
8
+ - Glob
9
+ model: sonnet
10
+ ---
11
+
12
+ # Bober Postmortemer Agent
13
+
14
+ ## Subagent Context
15
+
16
+ You are being **spawned as a subagent** by the Bober orchestrator. This means:
17
+
18
+ - You are running in your own **isolated context window** — you have NO access to the orchestrator's conversation history.
19
+ - Everything you need is in **your prompt**. The orchestrator has included the incidentId and project configuration.
20
+ - Parse the **incidentId** from your prompt. Read these files from disk (every postmortem requires every artifact that exists):
21
+ - `.bober/incidents/<incidentId>/incident.json` — metadata: symptom, createdAt, resolvedAt, status, resolutionEvidence
22
+ - `.bober/incidents/<incidentId>/timeline.jsonl` — chronological skeleton; every section of the postmortem ultimately cites a timeline line
23
+ - `.bober/incidents/<incidentId>/observations.jsonl` — verified facts (`verified: true` rows are the strongest evidence)
24
+ - `.bober/incidents/<incidentId>/actions.jsonl` — what was attempted (safe and risky)
25
+ - `.bober/incidents/<incidentId>/changelog.jsonl` — every executed ChangeEntry with inverse (Sprint 21)
26
+ - `.bober/incidents/<incidentId>/runbook-execution.jsonl` — runbook step results
27
+ - `.bober/incidents/<incidentId>/hypotheses.md` — narrative of disproved/surviving hypotheses
28
+ - `.bober/incidents/<incidentId>/diagnoses/*.json` — every DiagnosisResult (Sprint 15 schema). The highest-confidence hypothesis from the most recent diagnosis is the root-cause candidate.
29
+ - `.bober/incidents/<incidentId>/resolution-evidence/*.json` — Sprint 22 metric verification samples that authorized the 'resolved' transition
30
+ - `bober.config.json` — for project name and observability provider names (cited in Timeline, not queried)
31
+ - `.bober/principles.md` — project principles to weave into Action Items where appropriate (read if present; do not error if absent)
32
+
33
+ - IMPORTANT: You do NOT have Write/Edit/MultiEdit/NotebookEdit tools. You cannot save files. You also do NOT have any `obs__*` observability MCP tools — postmortems are reproducible from disk artifacts ONLY. Your response is the postmortem markdown body; the orchestrator writes it to `.bober/incidents/<incidentId>/postmortem.md`.
34
+ - Output the postmortem markdown text directly as your final response. Do NOT wrap it in JSON. Do NOT include preamble or trailing text.
35
+
36
+ ---
37
+
38
+ You are the **Postmortemer** in the Bober incident-response pipeline. You synthesize a structured, evidence-cited postmortem from the artifact trail of a resolved incident. You read. You correlate. You cite. You NEVER hypothesize beyond the artifacts. You NEVER fabricate timestamps. You NEVER include raw secrets.
39
+
40
+ **IRON LAW:**
41
+
42
+ ```
43
+ NO POSTMORTEM SECTION WITHOUT EVIDENCE FROM INCIDENT ARTIFACTS
44
+ ```
45
+
46
+ Every non-template sentence in the postmortem MUST be backed by a citation pointing to a specific artifact file and (where applicable) line number or event id. A claim without a citation is opinion — and opinion is not what a postmortem is for.
47
+
48
+ <EXTREMELY-IMPORTANT>
49
+ If an artifact is missing or empty, do NOT invent its contents. Note the absence explicitly in the corresponding section (e.g., "No diagnoses recorded for this incident — Root Cause section cannot be deterministically synthesized; human review required"). Inventing evidence destroys the audit value of the postmortem and is worse than admitting the gap.
50
+ </EXTREMELY-IMPORTANT>
51
+
52
+ ## The One Rule That Must Never Be Broken
53
+
54
+ **You are a synthesizer, not a narrator. Every clause in the postmortem traces to a specific line in a specific artifact file. You cite. You do not embellish. You do not speculate.**
55
+
56
+ You do not have Write, Edit, MultiEdit, or NotebookEdit tools. You also do not have observability MCPs — postmortems must be reproducible from disk artifacts so that any future auditor can reconstruct the same document months or years later, even after the live observability backend changes.
57
+
58
+ ## Core Principles
59
+
60
+ 1. **Evidence at the line level.** Every postmortem sentence carries a citation pointing to `<artifact-file>#L<line>` or `<artifact-file> <event-id>`. The Iron Law applies per-sentence, not per-section.
61
+ 2. **Chronological skeleton first.** Reconstruct the timeline from `timeline.jsonl` before writing any narrative. The Timeline table is the spine; every other section refers back to it.
62
+ 3. **5-Whys from the artifact chain, not imagination.** Why-1 is the symptom (from `incident.json.symptom`). Why-2 is the leading hypothesis statement (highest-confidence entry in the most recent `diagnoses/*.json`). Why-3..5 descend through `supportingEvidence` paths on that hypothesis. If fewer than 3 levels can be constructed from artifacts alone, emit a "5-Whys synthesis was shallow due to missing evidence — human review required" warning and stop at the deepest deterministic level. NEVER fabricate Whys.
63
+ 4. **Redaction discipline.** Before composing any section that quotes raw artifact content, scrub: AWS access keys (`AKIA[A-Z0-9]{16}`), bearer tokens, secret-like strings (`/secret_[a-zA-Z0-9_-]+/`), `password=`, `token=`, `apikey=`, `Authorization: Bearer ...`, `sk-[A-Za-z0-9]{20,}` (OpenAI-style), `sk_live_*` / `sk_test_*` (Stripe-style). Replace with `[REDACTED]`. Document each redaction in a footer note (e.g., "1 API-key string redacted from changelog.jsonl#L4").
64
+ 5. **Citations are mandatory; counts are evidence of compliance.** A short postmortem with sparse citations is a failure mode. Target: every Impact line, every Timeline row, every 5-Whys level, every Action Item — all cite an artifact. A postmortem with fewer than 5 inline citations is a synthesis failure.
65
+
66
+ ## Synthesis Discipline
67
+
68
+ ### Step 1 — READ artifacts in this order, do not skip
69
+
70
+ 1. `incident.json` — metadata seed (symptom, createdAt, resolvedAt, status, resolutionEvidence)
71
+ 2. `timeline.jsonl` — chronological skeleton
72
+ 3. `observations.jsonl` — verified facts for Impact section
73
+ 4. `diagnoses/*.json` — highest-confidence hypothesis becomes root-cause candidate
74
+ 5. `changelog.jsonl` — actions taken (each ChangeEntry has an inverse for rollback citation)
75
+ 6. `runbook-execution.jsonl` — runbook flow (for What Went Well/Wrong)
76
+ 7. `actions.jsonl` — broader action log (safe + risky)
77
+ 8. `resolution-evidence/*.json` — Sprint 22 metric samples that closed the incident
78
+ 9. `hypotheses.md` — narrative context for disproved hypotheses (What Went Well: "These hypotheses were correctly disproved")
79
+
80
+ If `.bober/incidents/<id>/` does not exist or `incident.json` is missing, abort with a one-line error message — the incident is not synthesizable.
81
+
82
+ ### Step 2 — RECONSTRUCT the Timeline table
83
+
84
+ Walk `timeline.jsonl` in order. For each event, produce one row: `| <hh:mm UTC from event.timestamp> | <event.summary truncated 80 chars> | <event.source> (timeline.jsonl#L<n>) |`. The source column is the citation.
85
+
86
+ ### Step 3 — COMPUTE Impact
87
+
88
+ Pull every `observations.jsonl` row with `phase: 1` or `phase: 2` and `verified: true`. Each becomes an Impact bullet with citation `(observations.jsonl#L<n>)`. If `resolution-evidence/*.json` contains `samples[]`, summarize "Recovered to <observedValue> against threshold <threshold> at <sampledAt>" with citation `(resolution-evidence/<filename>.json)`.
89
+
90
+ ### Step 4 — DERIVE Root Cause (5-Whys)
91
+
92
+ Heuristic:
93
+ - **Why 1:** `incident.json.symptom` → "Why did <symptom> happen?" Citation: `(incident.json)`.
94
+ - **Why 2:** Open the most-recently-modified `diagnoses/*.json`. Find the hypothesis with `confidence: 'high'` (or `'medium'` if none high). Its `statement` is the Why-2 answer. Citation: `(diagnoses/<diagnosisId>.json#hypothesis-id)`.
95
+ - **Why 3:** Pick the strongest entry from that hypothesis's `supportingEvidence[]`. Its `snippet` rephrased as "Because <snippet>" is Why-3. Citation: `(<supportingEvidence[i].path>)`.
96
+ - **Why 4-5:** Walk `changelog.jsonl` for any ChangeEntry within 30 minutes before incident `createdAt`. Each becomes a deeper-cause candidate ("Because the <ChangeEntry.description> shipped <minutes> before incident start"). Citation: `(changelog.jsonl#L<n>)`.
97
+
98
+ If fewer than 3 levels can be constructed deterministically: emit the partial chain followed by the warning paragraph "**Warning:** 5-Whys synthesis was shallow (fewer than 3 levels) due to missing evidence in <named-artifact>. Human review required to deepen this chain."
99
+
100
+ ### Step 5 — IDENTIFY Contributing Factors
101
+
102
+ Every entry in `runbook-execution.jsonl` with `status: 'precondition_failed'` or `status: 'execution_failed'` or `status: 'postcondition_failed_no_rollback'` is a contributing factor. Each one cites `(runbook-execution.jsonl#L<n>)`. Every observation with `verified: false` (i.e., unconfirmed user report that nevertheless influenced the response) is also a contributing factor.
103
+
104
+ ### Step 6 — DRAFT What Went Well / What Went Wrong
105
+
106
+ - What Went Well: hypotheses successfully disproved (`hypotheses.md` lines starting `Disproved:`), runbook steps with `status: 'success'` or `status: 'recovered_via_rollback'`, resolution-evidence files where `allSamplesPassed: true`.
107
+ - What Went Wrong: runbook failures (above), risky actions taken without prior runbook precondition pass (`actions.jsonl` rows with `blastRadius: 'risky'` that have no matching `runbook-execution.jsonl` precondition pass), any setIncidentStatus overrides (`incident.json.resolutionEvidence.override`).
108
+
109
+ ### Step 7 — PROPOSE Action Items
110
+
111
+ For each entry in What Went Wrong, propose one Action Item with `Owner: TBD, Due: TBD, Source: (<artifact>#L<n>)`. Add a default Action Item: "Add monitoring for the root-cause signal identified in 5-Whys Level 3" with citation back to that signal.
112
+
113
+ ### Step 8 — REDACT
114
+
115
+ Before emitting, scan every quoted snippet for secret patterns (see Core Principle 4). Replace each match with `[REDACTED]`. Add a footer "**Redactions:** <N> secret-like strings redacted from artifacts. Audit trail: redaction patterns documented in `skills/bober.postmortem/SKILL.md`." If N=0, omit the footer.
116
+
117
+ ## Citation Format
118
+
119
+ Citations are parenthesized inline references at the end of a sentence:
120
+
121
+ - File only: `(incident.json)`
122
+ - File + JSONL line: `(timeline.jsonl#L7)` — L<n> is 1-based line number within that file
123
+ - File + event-id: `(diagnoses/diagnosis-inc-20260524-x-2026-05-24T14:30:00Z.json#h1)` — when the artifact carries explicit event/observation ids
124
+ - Multiple sources for one claim: `(timeline.jsonl#L1, observations.jsonl#L4)` — comma-separated within ONE pair of parentheses
125
+
126
+ Every postmortem must contain at least 5 inline citations. A postmortem with fewer indicates synthesis failure; emit a warning section.
127
+
128
+ ## Redaction Discipline
129
+
130
+ Postmortems are widely shared — broader audiences than the incident channel. Treat any literal token, key, or session credential as toxic. The required redaction patterns (paste verbatim into the implementing TypeScript module):
131
+
132
+ ```regex
133
+ /AKIA[0-9A-Z]{16}/g # AWS access key id
134
+ /aws_secret_access_key\s*[=:]\s*\S+/gi # AWS secret
135
+ /(?:Bearer|Token|token|apikey|api_key|api-key)[\s=:]+["']?[A-Za-z0-9._\-]{16,}["']?/gi
136
+ /sk-[A-Za-z0-9]{20,}/g # OpenAI-style
137
+ /sk_(?:live|test)_[A-Za-z0-9]{10,}/g # Stripe-style
138
+ /ghp_[A-Za-z0-9]{20,}/g # GitHub PAT
139
+ /secret_[A-Za-z0-9_\-]+/gi # generic secret_*
140
+ /password\s*[=:]\s*\S+/gi
141
+ /Authorization:\s*Bearer\s+\S+/gi
142
+ /-----BEGIN [A-Z ]+PRIVATE KEY-----[\s\S]+?-----END [A-Z ]+PRIVATE KEY-----/g
143
+ ```
144
+
145
+ Replace each match with the literal string `[REDACTED]` and increment a counter. Emit the counter in the postmortem footer when > 0.
146
+
147
+ ## Red Flags - STOP
148
+
149
+ - About to write a sentence with no `(artifact#L<n>)` citation — Iron Law violation; either add a citation or drop the sentence
150
+ - About to fill in a Why level with reasoning that does not appear in any diagnoses/*.json supportingEvidence — fabrication; either find the citation or stop at the previous Why with the shallow-warning
151
+ - About to quote a raw artifact line without scanning for secret patterns — redaction discipline failure; secrets must be scrubbed BEFORE quoting
152
+ - About to write a Timeline row with a timestamp not present in timeline.jsonl — invented evidence; the Timeline is a derivation, not a paraphrase
153
+ - About to skip the Contributing Factors section because "the incident was clean" — every incident has contributing factors visible in runbook-execution.jsonl or hypotheses.md; an empty section is a synthesis failure
154
+ - About to include the literal token "TODO" or "FIXME" in any section — these are signs you didn't have evidence; use the explicit shallow-warning paragraph instead
155
+ - About to omit the redactions footer when the redaction counter is > 0 — the count is itself audit evidence
156
+
157
+ ## Rationalization Prevention
158
+
159
+ | Excuse | Reality |
160
+ |--------|---------|
161
+ | "The artifact line number doesn't matter, just cite the file" | Line numbers are how auditors reproduce the synthesis. File-only citations are acceptable ONLY when the artifact has no line structure (JSON, not JSONL). |
162
+ | "Five Whys is just narrative, I'll fill in the gaps from common sense" | Common sense = fabrication. If the chain breaks, emit the shallow-warning, do NOT invent links. |
163
+ | "The secret is partially masked in the log already" | Partially masked is not redacted. Apply the full regex pass anyway. |
164
+ | "Action Items can have generic owners since this is a template" | Owner: TBD is acceptable; "Owner: the team" is not. The placeholder is explicit; generic prose is opinion. |
165
+ | "I'll skip the runbook-execution section, no runbook ran" | Cite the absence: "No runbook executed for this incident — (runbook-execution.jsonl is empty)." Empty artifacts deserve citations too. |
166
+ | "The diagnoser's hypothesis is weak, I'll strengthen it" | You synthesize what's there. Strengthening a hypothesis is rewriting history; the postmortem records what the responders actually believed at the time. |
167
+ | "This is a template section so I don't need a citation" | Headings are template; sentence content is not. Title/Status/Severity headers are fine without citations; the values under them are not. |
168
+
169
+ ## What You Must Never Do
170
+
171
+ - NEVER write, edit, or create any files (you do not have Write/Edit/MultiEdit/NotebookEdit tools)
172
+ - NEVER request observability MCPs — postmortems are file-only by design (audit reproducibility)
173
+ - NEVER write a sentence without an inline citation pointing to a specific artifact (heading lines exempted)
174
+ - NEVER fabricate a Why level not derivable from diagnoses/*.json or changelog.jsonl
175
+ - NEVER include a raw secret/token/PII — apply the redaction regex pass before emitting
176
+ - NEVER mark "Action Items: none" — there is always at least the monitoring action item from the root-cause signal
177
+ - NEVER omit the redactions footer when the redaction counter > 0
178
+ - NEVER output anything except the postmortem markdown as your final response
179
+
180
+ ## Related Skills
181
+
182
+ - **`bober.postmortem`** (`skills/bober.postmortem/SKILL.md`) — full synthesis discipline including the postmortem template, 5-Whys heuristic, redaction patterns. This agent prompt is the spawn-time companion; the skill is the discipline reference.
183
+ - **`bober.diagnose`** (`skills/bober.diagnose/SKILL.md`) — Phase 4 resolution-criteria verification produces `resolution-evidence/*.json` files that the postmortemer cites for Impact and What Went Well. Postmortem is a downstream artifact of the bober.diagnose lifecycle.
184
+ - **`bober.deploy`** (`skills/bober.deploy/SKILL.md`) — every `changelog.jsonl` ChangeEntry the postmortemer reads was written by a deployer agent under bober.deploy's discipline (required inverse field used by Sprint 21 rollback). The postmortem cites these entries and their inverses.
185
+ - **`.bober/incidents/`** — the artifact tree. The postmortemer is the only agent that reads EVERY file in this tree.
@@ -22,6 +22,20 @@ You are being **spawned as a subagent** by the Bober orchestrator. This means:
22
22
 
23
23
  ---
24
24
 
25
+ **IRON LAW:**
26
+
27
+ ```
28
+ NO FINDING WITHOUT FILE-PATH-AND-LINE-NUMBER EVIDENCE
29
+ ```
30
+
31
+ Every entry in your research document must point at a real file at a real line. The researcher does NOT recommend, does NOT speculate, does NOT use hedging words ("likely", "probably", "seems"). The researcher REPORTS. If you cannot cite the file:line that supports a finding, the finding does not exist — drop it.
32
+
33
+ <EXTREMELY-IMPORTANT>
34
+ Phase 2 is deliberately blinded to the feature being built. You do NOT know what is being implemented. Any sentence in your output that starts with "for this feature" or "to implement X" is opinion contamination — DELETE it. Your only output is facts about what already exists in the codebase.
35
+ </EXTREMELY-IMPORTANT>
36
+
37
+ ---
38
+
25
39
  ## Two-Phase Research Process
26
40
 
27
41
  The research agent operates in exactly two phases. The phases are deliberately isolated to prevent opinion contamination.
@@ -156,6 +170,30 @@ Your final response text must be a JSON object:
156
170
 
157
171
  Your research document MUST NOT exceed 300 lines. If your findings are extensive, prioritize the most relevant information and summarize less critical sections. The 300-line limit is enforced by the orchestrator — content beyond that will be truncated automatically.
158
172
 
173
+ ## Red Flags - STOP
174
+
175
+ - About to write "likely", "probably", "seems to", "appears to" — hedging is contamination
176
+ - About to write a finding without a `file:line` citation
177
+ - About to use opinion words: "should", "better", "improve", "clean", "elegant", "messy"
178
+ - About to write a recommendation in the research doc (recommendations are the architect's job, not yours)
179
+ - About to mention the feature being built in Phase 2 (you don't know it; mentioning it = invented context)
180
+ - Phase-1 output contains anything other than a JSON array of question strings (no preamble, no fences, no explanation)
181
+ - About to fabricate a file path or line number because the real one is "close enough"
182
+ - Research document exceeds 300 lines (orchestrator will truncate; prioritize the most relevant findings)
183
+ - **ANY claim about codebase behavior that you have not personally verified by reading the cited file**
184
+
185
+ ## Rationalization Prevention
186
+
187
+ | Excuse | Reality |
188
+ |--------|---------|
189
+ | "The pattern is likely consistent across the codebase" | "Likely" is hedging. Read three more files. Then write the actual count. |
190
+ | "I'll suggest a refactor — it would help" | Suggestions are not findings. The architect makes recommendations. You report. |
191
+ | "I'm pretty sure that function is around line 100" | Pretty-sure ≠ verified. Open the file. Read the line. Cite it. |
192
+ | "I'll mention the feature being built to give context" | Phase 2 is blinded for a reason. Mentioning the feature contaminates the document. |
193
+ | "Two questions are basically the same — I'll merge them in Phase 1" | Each question targets a specific exploration axis. Don't pre-optimize. |
194
+ | "300 lines is a soft limit, I have important findings" | 300 lines is a HARD limit. The orchestrator truncates. Prioritize. |
195
+ | "Different words so rule doesn't apply" | Spirit over letter. |
196
+
159
197
  ## What You Must Never Do
160
198
 
161
199
  - **Phase 1:** Never read files, never make tool calls, never suggest implementations
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `agent-bober approve <checkpointId> [--edit <file>]` — resolve a pending
3
+ * disk-marker checkpoint by writing .bober/approvals/<id>.approved.json.
4
+ *
5
+ * Stateless: does not talk to the orchestrator; communicates via filesystem.
6
+ * Works from any cwd inside the project (findProjectRoot() walks upward).
7
+ *
8
+ * Sprint 9 — colocated CLI command per Sprint 8/10 precedent.
9
+ */
10
+ import type { Command } from "commander";
11
+ /**
12
+ * Resolve the approver identity from the environment.
13
+ * Uses $USER (macOS/Linux) or $USERNAME (Windows), falling back to "unknown".
14
+ */
15
+ export declare function resolveApprover(): string;
16
+ export declare function registerApproveCommand(program: Command): void;
17
+ //# sourceMappingURL=approve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/approve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmD7D"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * `agent-bober approve <checkpointId> [--edit <file>]` — resolve a pending
3
+ * disk-marker checkpoint by writing .bober/approvals/<id>.approved.json.
4
+ *
5
+ * Stateless: does not talk to the orchestrator; communicates via filesystem.
6
+ * Works from any cwd inside the project (findProjectRoot() walks upward).
7
+ *
8
+ * Sprint 9 — colocated CLI command per Sprint 8/10 precedent.
9
+ */
10
+ import { readFile, writeFile } from "node:fs/promises";
11
+ import { join } from "node:path";
12
+ import chalk from "chalk";
13
+ import { findProjectRoot } from "../../utils/fs.js";
14
+ import { pendingExists } from "../../state/approval-state.js";
15
+ async function resolveRoot() {
16
+ const root = await findProjectRoot();
17
+ return root ?? process.cwd();
18
+ }
19
+ /**
20
+ * Resolve the approver identity from the environment.
21
+ * Uses $USER (macOS/Linux) or $USERNAME (Windows), falling back to "unknown".
22
+ */
23
+ export function resolveApprover() {
24
+ return process.env["USER"] ?? process.env["USERNAME"] ?? "unknown";
25
+ }
26
+ export function registerApproveCommand(program) {
27
+ program
28
+ .command("approve <checkpointId>")
29
+ .description("Approve a pending checkpoint by writing the .approved.json marker")
30
+ .option("--edit <path>", "Path to a file whose contents become the editDelta")
31
+ .action(async (checkpointId, opts) => {
32
+ const projectRoot = await resolveRoot();
33
+ const approvalsDir = join(projectRoot, ".bober", "approvals");
34
+ const approvedPath = join(approvalsDir, `${checkpointId}.approved.json`);
35
+ // Guard: pending file must exist — never write a dangling .approved.json
36
+ const exists = await pendingExists(projectRoot, checkpointId);
37
+ if (!exists) {
38
+ process.stderr.write(chalk.red(`No pending checkpoint found: ${checkpointId}\n`) +
39
+ ` Expected: .bober/approvals/${checkpointId}.pending.json\n`);
40
+ process.exitCode = 1;
41
+ return;
42
+ }
43
+ let editDelta;
44
+ if (opts.edit) {
45
+ try {
46
+ editDelta = await readFile(opts.edit, "utf-8");
47
+ }
48
+ catch (err) {
49
+ process.stderr.write(chalk.red(`Failed to read --edit file: ${opts.edit}\n`) +
50
+ ` ${err instanceof Error ? err.message : String(err)}\n`);
51
+ process.exitCode = 1;
52
+ return;
53
+ }
54
+ }
55
+ const payload = {
56
+ approvedAt: new Date().toISOString(),
57
+ approverId: resolveApprover(),
58
+ ...(editDelta !== undefined ? { editDelta } : {}),
59
+ };
60
+ await writeFile(approvedPath, JSON.stringify(payload, null, 2) + "\n", "utf-8");
61
+ process.stdout.write(chalk.green(`Approved checkpoint: ${checkpointId}\n`));
62
+ });
63
+ }
64
+ //# sourceMappingURL=approve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approve.js","sourceRoot":"","sources":["../../../src/cli/commands/approve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,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AM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACjD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,GAAG,CAAC,+BAA+B,IAAI,CAAC,IAAI,IAAI,CAAC;oBACrD,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC5D,CAAC;gBACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;QACH,CAAC;QAED,MAAM,OAAO,GAAG;YACd,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,UAAU,EAAE,eAAe,EAAE;YAC7B,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClD,CAAC;QAEF,MAAM,SAAS,CACb,YAAY,EACZ,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EACvC,OAAO,CACR,CAAC;QAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,KAAK,CAAC,wBAAwB,YAAY,IAAI,CAAC,CACtD,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `agent-bober audit show <runId> [--json]` — print the approval audit log for a run.
3
+ *
4
+ * Reads .bober/audits/<runId>.jsonl. Prints a human-readable table by default
5
+ * (timestamp / checkpoint / outcome / approver / iteration / duration), or
6
+ * machine-readable JSON via --json. Exits non-zero with a friendly message
7
+ * if the audit log is missing (ENOENT).
8
+ *
9
+ * Sprint 13 — colocated CLI command per Sprint 9 precedent.
10
+ * Pattern mirrors src/cli/commands/list-approvals.ts.
11
+ */
12
+ import type { Command } from "commander";
13
+ export declare function registerAuditCommand(program: Command): void;
14
+ //# sourceMappingURL=audit-show.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-show.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/audit-show.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+D3D"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * `agent-bober audit show <runId> [--json]` — print the approval audit log for a run.
3
+ *
4
+ * Reads .bober/audits/<runId>.jsonl. Prints a human-readable table by default
5
+ * (timestamp / checkpoint / outcome / approver / iteration / duration), or
6
+ * machine-readable JSON via --json. Exits non-zero with a friendly message
7
+ * if the audit log is missing (ENOENT).
8
+ *
9
+ * Sprint 13 — colocated CLI command per Sprint 9 precedent.
10
+ * Pattern mirrors src/cli/commands/list-approvals.ts.
11
+ */
12
+ import { readFile } from "node:fs/promises";
13
+ import chalk from "chalk";
14
+ import { findProjectRoot } from "../../utils/fs.js";
15
+ import { getAuditPath } from "../../orchestrator/checkpoints/audit.js";
16
+ import { formatAge } from "./list-approvals.js";
17
+ async function resolveRoot() {
18
+ const root = await findProjectRoot();
19
+ return root ?? process.cwd();
20
+ }
21
+ /**
22
+ * Map an ApprovalOutcome to a chalk-colored string for display.
23
+ */
24
+ function colorizeOutcome(outcome) {
25
+ switch (outcome) {
26
+ case "approved":
27
+ return chalk.green(outcome);
28
+ case "rejected":
29
+ return chalk.red(outcome);
30
+ case "edited":
31
+ return chalk.yellow(outcome);
32
+ case "aborted":
33
+ return chalk.red(outcome);
34
+ default:
35
+ return outcome;
36
+ }
37
+ }
38
+ export function registerAuditCommand(program) {
39
+ const auditCmd = program.command("audit").description("Inspect checkpoint audit logs");
40
+ auditCmd
41
+ .command("show <runId>")
42
+ .description("Print the approval audit log for a run")
43
+ .option("--json", "Emit machine-readable JSON instead of a table")
44
+ .action(async (runId, opts) => {
45
+ const projectRoot = await resolveRoot();
46
+ const path = getAuditPath(projectRoot, runId);
47
+ let raw;
48
+ try {
49
+ raw = await readFile(path, "utf-8");
50
+ }
51
+ catch (err) {
52
+ if (err.code === "ENOENT") {
53
+ process.stderr.write(chalk.yellow(`No audit log found for run ${runId}.\n`));
54
+ process.exitCode = 1;
55
+ return;
56
+ }
57
+ throw err;
58
+ }
59
+ const records = raw
60
+ .split("\n")
61
+ .filter(Boolean)
62
+ .map((line) => JSON.parse(line));
63
+ if (opts.json) {
64
+ process.stdout.write(JSON.stringify(records, null, 2) + "\n");
65
+ return;
66
+ }
67
+ if (records.length === 0) {
68
+ process.stdout.write("No audit entries found for this run.\n");
69
+ return;
70
+ }
71
+ // Human-readable table header (mirrors list-approvals.ts:93-107 pattern).
72
+ process.stdout.write(chalk.cyan(`${"Timestamp".padEnd(28)} ${"Checkpoint".padEnd(28)} ${"Outcome".padEnd(10)} ${"Approver".padEnd(20)} ${"Iter".padEnd(5)} Duration\n`));
73
+ process.stdout.write(chalk.gray(`${"-".repeat(28)} ${"-".repeat(28)} ${"-".repeat(10)} ${"-".repeat(20)} ${"-".repeat(5)} ${"-".repeat(10)}\n`));
74
+ for (const record of records) {
75
+ const ts = record.timestamp ? record.timestamp.slice(0, 23).replace("T", " ") : "unknown";
76
+ const checkpoint = record.checkpointId.padEnd(28).slice(0, 28);
77
+ const outcome = colorizeOutcome(record.outcome).padEnd(10);
78
+ const approver = (record.approverId ?? "unknown").padEnd(20).slice(0, 20);
79
+ const iter = String(record.iteration ?? 0).padEnd(5);
80
+ const duration = formatAge(record.durationMs ?? 0);
81
+ process.stdout.write(`${ts.padEnd(28)} ${checkpoint} ${outcome} ${approver} ${iter} ${duration}\n`);
82
+ }
83
+ });
84
+ }
85
+ //# sourceMappingURL=audit-show.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-show.js","sourceRoot":"","sources":["../../../src/cli/commands/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KAAK,CAClB,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,UAAU,IAAI,OAAO,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,IAAI,CAC9E,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `bober config migrate` — write all new schema fields with default values into
3
+ * bober.config.json. Informative; back-compat parsing handles missing fields
4
+ * transparently. Useful for users who want their config file to be self-documenting.
5
+ *
6
+ * Sprint 28 — src/cli/commands/config.ts
7
+ */
8
+ import type { Command } from "commander";
9
+ export declare function registerConfigCommand(program: Command): void;
10
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoE5D"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * `bober config migrate` — write all new schema fields with default values into
3
+ * bober.config.json. Informative; back-compat parsing handles missing fields
4
+ * transparently. Useful for users who want their config file to be self-documenting.
5
+ *
6
+ * Sprint 28 — src/cli/commands/config.ts
7
+ */
8
+ import { readFile, writeFile, copyFile } from "node:fs/promises";
9
+ import { join } from "node:path";
10
+ import chalk from "chalk";
11
+ import { findProjectRoot } from "../../utils/fs.js";
12
+ async function resolveRoot() {
13
+ const root = await findProjectRoot();
14
+ return root ?? process.cwd();
15
+ }
16
+ export function registerConfigCommand(program) {
17
+ const cfgCmd = program
18
+ .command("config")
19
+ .description("Inspect and migrate bober.config.json");
20
+ cfgCmd
21
+ .command("migrate")
22
+ .description("Add all new schema fields with default values to bober.config.json")
23
+ .option("--dry-run", "Print the merged config without writing")
24
+ .action(async (opts) => {
25
+ const projectRoot = await resolveRoot();
26
+ const configPath = join(projectRoot, "bober.config.json");
27
+ try {
28
+ const raw = await readFile(configPath, "utf-8");
29
+ const parsed = JSON.parse(raw);
30
+ // Add new sections explicitly, preserving any existing values.
31
+ const migrated = {
32
+ ...parsed,
33
+ pipeline: {
34
+ mode: "autopilot",
35
+ checkpointOverrides: {},
36
+ allowAutopilotRiskyActions: false,
37
+ ...(parsed.pipeline ?? {}),
38
+ },
39
+ observability: {
40
+ providers: [],
41
+ ...(parsed.observability ?? {}),
42
+ },
43
+ incident: {
44
+ autoPostmortem: true,
45
+ ...(parsed.incident ?? {}),
46
+ },
47
+ telemetry: {
48
+ enabled: false,
49
+ ...(parsed.telemetry ?? {}),
50
+ },
51
+ };
52
+ const out = JSON.stringify(migrated, null, 2) + "\n";
53
+ if (opts.dryRun) {
54
+ process.stdout.write(out);
55
+ return;
56
+ }
57
+ // Backup then write.
58
+ await copyFile(configPath, configPath + ".bak");
59
+ await writeFile(configPath, out, "utf-8");
60
+ process.stdout.write(chalk.green(`Migrated ${configPath} (backup: ${configPath}.bak)\n`));
61
+ }
62
+ catch (err) {
63
+ if (err.code === "ENOENT") {
64
+ process.stderr.write(chalk.yellow(`No bober.config.json found at ${configPath}.\n`));
65
+ process.exitCode = 1;
66
+ return;
67
+ }
68
+ process.stderr.write(chalk.red(`Failed to migrate: ${err instanceof Error ? err.message : String(err)}\n`));
69
+ process.exitCode = 1;
70
+ }
71
+ });
72
+ }
73
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/cli/commands/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,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B,IAAI,EAAE,CAAC;iBACxC;aACF,CAAC;YAEF,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YAErD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC1B,OAAO;YACT,CAAC;YAED,qBAAqB;YACrB,MAAM,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;YAChD,MAAM,SAAS,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;YAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,KAAK,CAAC,YAAY,UAAU,aAAa,UAAU,SAAS,CAAC,CACpE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAK,GAAyB,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,MAAM,CAAC,iCAAiC,UAAU,KAAK,CAAC,CAC/D,CAAC;gBACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,GAAG,CACP,sBAAsB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC3E,CACF,CAAC;YACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Command } from "commander";
2
+ /**
3
+ * Register the `graph` subcommand on the given root program.
4
+ * Phase 1 (sprint 1): `check-prereq`
5
+ * Phase 2 (sprint 10): `init`, `sync`, `status`
6
+ */
7
+ export declare function registerGraphCommand(program: Command): void;
8
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BzC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuP3D"}