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.
- package/CHANGELOG.md +213 -0
- package/README.md +112 -3
- package/agents/bober-architect.md +38 -0
- package/agents/bober-code-reviewer.md +236 -0
- package/agents/bober-curator.md +37 -0
- package/agents/bober-deployer.md +267 -0
- package/agents/bober-diagnoser.md +289 -0
- package/agents/bober-evaluator.md +89 -1
- package/agents/bober-generator.md +68 -3
- package/agents/bober-planner.md +39 -0
- package/agents/bober-postmortemer.md +185 -0
- package/agents/bober-researcher.md +38 -0
- package/dist/cli/commands/approve.d.ts +17 -0
- package/dist/cli/commands/approve.d.ts.map +1 -0
- package/dist/cli/commands/approve.js +64 -0
- package/dist/cli/commands/approve.js.map +1 -0
- package/dist/cli/commands/audit-show.d.ts +14 -0
- package/dist/cli/commands/audit-show.d.ts.map +1 -0
- package/dist/cli/commands/audit-show.js +85 -0
- package/dist/cli/commands/audit-show.js.map +1 -0
- package/dist/cli/commands/config.d.ts +10 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +73 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/graph.d.ts +8 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +219 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +19 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +191 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/incident.d.ts +19 -0
- package/dist/cli/commands/incident.d.ts.map +1 -0
- package/dist/cli/commands/incident.js +324 -0
- package/dist/cli/commands/incident.js.map +1 -0
- package/dist/cli/commands/init.js +36 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list-approvals.d.ts +16 -0
- package/dist/cli/commands/list-approvals.d.ts.map +1 -0
- package/dist/cli/commands/list-approvals.js +57 -0
- package/dist/cli/commands/list-approvals.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +3 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/onboard.js +190 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/playbook.d.ts +17 -0
- package/dist/cli/commands/playbook.d.ts.map +1 -0
- package/dist/cli/commands/playbook.js +123 -0
- package/dist/cli/commands/playbook.js.map +1 -0
- package/dist/cli/commands/postmortem.d.ts +12 -0
- package/dist/cli/commands/postmortem.d.ts.map +1 -0
- package/dist/cli/commands/postmortem.js +67 -0
- package/dist/cli/commands/postmortem.js.map +1 -0
- package/dist/cli/commands/reject.d.ts +17 -0
- package/dist/cli/commands/reject.d.ts.map +1 -0
- package/dist/cli/commands/reject.js +52 -0
- package/dist/cli/commands/reject.js.map +1 -0
- package/dist/cli/commands/rollback.d.ts +21 -0
- package/dist/cli/commands/rollback.d.ts.map +1 -0
- package/dist/cli/commands/rollback.js +90 -0
- package/dist/cli/commands/rollback.js.map +1 -0
- package/dist/cli/commands/run.d.ts +9 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +29 -0
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +16 -0
- package/dist/cli/commands/telemetry.d.ts.map +1 -0
- package/dist/cli/commands/telemetry.js +152 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/commands/worktree.d.ts +12 -0
- package/dist/cli/commands/worktree.d.ts.map +1 -0
- package/dist/cli/commands/worktree.js +57 -0
- package/dist/cli/commands/worktree.js.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +27 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +18 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +976 -56
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +147 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/graph/artifact-store.d.ts +14 -0
- package/dist/graph/artifact-store.d.ts.map +1 -0
- package/dist/graph/artifact-store.js +100 -0
- package/dist/graph/artifact-store.js.map +1 -0
- package/dist/graph/cli.d.ts +49 -0
- package/dist/graph/cli.d.ts.map +1 -0
- package/dist/graph/cli.js +140 -0
- package/dist/graph/cli.js.map +1 -0
- package/dist/graph/client.d.ts +64 -0
- package/dist/graph/client.d.ts.map +1 -0
- package/dist/graph/client.js +216 -0
- package/dist/graph/client.js.map +1 -0
- package/dist/graph/fallback.d.ts +13 -0
- package/dist/graph/fallback.d.ts.map +1 -0
- package/dist/graph/fallback.js +57 -0
- package/dist/graph/fallback.js.map +1 -0
- package/dist/graph/hook-handler.d.ts +50 -0
- package/dist/graph/hook-handler.d.ts.map +1 -0
- package/dist/graph/hook-handler.js +217 -0
- package/dist/graph/hook-handler.js.map +1 -0
- package/dist/graph/incidents.d.ts +59 -0
- package/dist/graph/incidents.d.ts.map +1 -0
- package/dist/graph/incidents.js +22 -0
- package/dist/graph/incidents.js.map +1 -0
- package/dist/graph/mcp-client.d.ts +51 -0
- package/dist/graph/mcp-client.d.ts.map +1 -0
- package/dist/graph/mcp-client.js +285 -0
- package/dist/graph/mcp-client.js.map +1 -0
- package/dist/graph/onboarding-composer.d.ts +30 -0
- package/dist/graph/onboarding-composer.d.ts.map +1 -0
- package/dist/graph/onboarding-composer.js +275 -0
- package/dist/graph/onboarding-composer.js.map +1 -0
- package/dist/graph/pipeline-lifecycle.d.ts +86 -0
- package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
- package/dist/graph/pipeline-lifecycle.js +329 -0
- package/dist/graph/pipeline-lifecycle.js.map +1 -0
- package/dist/graph/preflight-budgets.d.ts +52 -0
- package/dist/graph/preflight-budgets.d.ts.map +1 -0
- package/dist/graph/preflight-budgets.js +78 -0
- package/dist/graph/preflight-budgets.js.map +1 -0
- package/dist/graph/preflight-injector.d.ts +116 -0
- package/dist/graph/preflight-injector.d.ts.map +1 -0
- package/dist/graph/preflight-injector.js +538 -0
- package/dist/graph/preflight-injector.js.map +1 -0
- package/dist/graph/prereq.d.ts +12 -0
- package/dist/graph/prereq.d.ts.map +1 -0
- package/dist/graph/prereq.js +61 -0
- package/dist/graph/prereq.js.map +1 -0
- package/dist/graph/prompts.d.ts +42 -0
- package/dist/graph/prompts.d.ts.map +1 -0
- package/dist/graph/prompts.js +80 -0
- package/dist/graph/prompts.js.map +1 -0
- package/dist/graph/sandbox.d.ts +19 -0
- package/dist/graph/sandbox.d.ts.map +1 -0
- package/dist/graph/sandbox.js +25 -0
- package/dist/graph/sandbox.js.map +1 -0
- package/dist/graph/token-usage.d.ts +21 -0
- package/dist/graph/token-usage.d.ts.map +1 -0
- package/dist/graph/token-usage.js +22 -0
- package/dist/graph/token-usage.js.map +1 -0
- package/dist/graph/types.d.ts +129 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +12 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/incident/orchestrator.d.ts +168 -0
- package/dist/incident/orchestrator.d.ts.map +1 -0
- package/dist/incident/orchestrator.js +279 -0
- package/dist/incident/orchestrator.js.map +1 -0
- package/dist/incident/playbook-search.d.ts +67 -0
- package/dist/incident/playbook-search.d.ts.map +1 -0
- package/dist/incident/playbook-search.js +288 -0
- package/dist/incident/playbook-search.js.map +1 -0
- package/dist/incident/postmortem.d.ts +44 -0
- package/dist/incident/postmortem.d.ts.map +1 -0
- package/dist/incident/postmortem.js +486 -0
- package/dist/incident/postmortem.js.map +1 -0
- package/dist/incident/resolution-verify.d.ts +186 -0
- package/dist/incident/resolution-verify.d.ts.map +1 -0
- package/dist/incident/resolution-verify.js +210 -0
- package/dist/incident/resolution-verify.js.map +1 -0
- package/dist/incident/rollback.d.ts +137 -0
- package/dist/incident/rollback.d.ts.map +1 -0
- package/dist/incident/rollback.js +328 -0
- package/dist/incident/rollback.js.map +1 -0
- package/dist/incident/timeline.d.ts +147 -0
- package/dist/incident/timeline.d.ts.map +1 -0
- package/dist/incident/timeline.js +452 -0
- package/dist/incident/timeline.js.map +1 -0
- package/dist/incident/types.d.ts +335 -0
- package/dist/incident/types.d.ts.map +1 -0
- package/dist/incident/types.js +158 -0
- package/dist/incident/types.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/event-stream.d.ts +46 -0
- package/dist/mcp/event-stream.d.ts.map +1 -0
- package/dist/mcp/event-stream.js +421 -0
- package/dist/mcp/event-stream.js.map +1 -0
- package/dist/mcp/external-client.d.ts +38 -0
- package/dist/mcp/external-client.d.ts.map +1 -0
- package/dist/mcp/external-client.js +121 -0
- package/dist/mcp/external-client.js.map +1 -0
- package/dist/mcp/run-manager.d.ts +74 -9
- package/dist/mcp/run-manager.d.ts.map +1 -1
- package/dist/mcp/run-manager.js +127 -31
- package/dist/mcp/run-manager.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +56 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/abort-run.d.ts +2 -0
- package/dist/mcp/tools/abort-run.d.ts.map +1 -0
- package/dist/mcp/tools/abort-run.js +62 -0
- package/dist/mcp/tools/abort-run.js.map +1 -0
- package/dist/mcp/tools/anchor.js +1 -1
- package/dist/mcp/tools/anchor.js.map +1 -1
- package/dist/mcp/tools/approve-checkpoint.d.ts +2 -0
- package/dist/mcp/tools/approve-checkpoint.d.ts.map +1 -0
- package/dist/mcp/tools/approve-checkpoint.js +70 -0
- package/dist/mcp/tools/approve-checkpoint.js.map +1 -0
- package/dist/mcp/tools/brownfield.js +1 -1
- package/dist/mcp/tools/brownfield.js.map +1 -1
- package/dist/mcp/tools/get-project-state.d.ts +2 -0
- package/dist/mcp/tools/get-project-state.d.ts.map +1 -0
- package/dist/mcp/tools/get-project-state.js +107 -0
- package/dist/mcp/tools/get-project-state.js.map +1 -0
- package/dist/mcp/tools/get-run-status.d.ts +2 -0
- package/dist/mcp/tools/get-run-status.d.ts.map +1 -0
- package/dist/mcp/tools/get-run-status.js +40 -0
- package/dist/mcp/tools/get-run-status.js.map +1 -0
- package/dist/mcp/tools/graph-schemas.d.ts +100 -0
- package/dist/mcp/tools/graph-schemas.d.ts.map +1 -0
- package/dist/mcp/tools/graph-schemas.js +39 -0
- package/dist/mcp/tools/graph-schemas.js.map +1 -0
- package/dist/mcp/tools/graph.d.ts +19 -0
- package/dist/mcp/tools/graph.d.ts.map +1 -0
- package/dist/mcp/tools/graph.js +263 -0
- package/dist/mcp/tools/graph.js.map +1 -0
- package/dist/mcp/tools/incident.d.ts +2 -0
- package/dist/mcp/tools/incident.d.ts.map +1 -0
- package/dist/mcp/tools/incident.js +246 -0
- package/dist/mcp/tools/incident.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +38 -18
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +74 -18
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/list-active-runs.d.ts +2 -0
- package/dist/mcp/tools/list-active-runs.d.ts.map +1 -0
- package/dist/mcp/tools/list-active-runs.js +35 -0
- package/dist/mcp/tools/list-active-runs.js.map +1 -0
- package/dist/mcp/tools/list-pending-approvals.d.ts +2 -0
- package/dist/mcp/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/mcp/tools/list-pending-approvals.js +40 -0
- package/dist/mcp/tools/list-pending-approvals.js.map +1 -0
- package/dist/mcp/tools/list-projects.d.ts +2 -0
- package/dist/mcp/tools/list-projects.d.ts.map +1 -0
- package/dist/mcp/tools/list-projects.js +101 -0
- package/dist/mcp/tools/list-projects.js.map +1 -0
- package/dist/mcp/tools/list-specs.d.ts +2 -0
- package/dist/mcp/tools/list-specs.d.ts.map +1 -0
- package/dist/mcp/tools/list-specs.js +48 -0
- package/dist/mcp/tools/list-specs.js.map +1 -0
- package/dist/mcp/tools/playbook.d.ts +2 -0
- package/dist/mcp/tools/playbook.d.ts.map +1 -0
- package/dist/mcp/tools/playbook.js +104 -0
- package/dist/mcp/tools/playbook.js.map +1 -0
- package/dist/mcp/tools/postmortem.d.ts +2 -0
- package/dist/mcp/tools/postmortem.d.ts.map +1 -0
- package/dist/mcp/tools/postmortem.js +75 -0
- package/dist/mcp/tools/postmortem.js.map +1 -0
- package/dist/mcp/tools/react.js +1 -1
- package/dist/mcp/tools/react.js.map +1 -1
- package/dist/mcp/tools/reject-checkpoint.d.ts +2 -0
- package/dist/mcp/tools/reject-checkpoint.d.ts.map +1 -0
- package/dist/mcp/tools/reject-checkpoint.js +79 -0
- package/dist/mcp/tools/reject-checkpoint.js.map +1 -0
- package/dist/mcp/tools/rollback.d.ts +2 -0
- package/dist/mcp/tools/rollback.d.ts.map +1 -0
- package/dist/mcp/tools/rollback.js +78 -0
- package/dist/mcp/tools/rollback.js.map +1 -0
- package/dist/mcp/tools/run-in-worktree.d.ts +2 -0
- package/dist/mcp/tools/run-in-worktree.d.ts.map +1 -0
- package/dist/mcp/tools/run-in-worktree.js +90 -0
- package/dist/mcp/tools/run-in-worktree.js.map +1 -0
- package/dist/mcp/tools/run.js +1 -1
- package/dist/mcp/tools/run.js.map +1 -1
- package/dist/mcp/tools/solidity.js +1 -1
- package/dist/mcp/tools/solidity.js.map +1 -1
- package/dist/mcp/tools/status.d.ts.map +1 -1
- package/dist/mcp/tools/status.js +11 -0
- package/dist/mcp/tools/status.js.map +1 -1
- package/dist/mcp/tools/subscribe-events.d.ts +2 -0
- package/dist/mcp/tools/subscribe-events.d.ts.map +1 -0
- package/dist/mcp/tools/subscribe-events.js +48 -0
- package/dist/mcp/tools/subscribe-events.js.map +1 -0
- package/dist/mcp/tools/unsubscribe-events.d.ts +2 -0
- package/dist/mcp/tools/unsubscribe-events.d.ts.map +1 -0
- package/dist/mcp/tools/unsubscribe-events.js +45 -0
- package/dist/mcp/tools/unsubscribe-events.js.map +1 -0
- package/dist/orchestrator/agent-loader.d.ts +16 -0
- package/dist/orchestrator/agent-loader.d.ts.map +1 -1
- package/dist/orchestrator/agent-loader.js +16 -0
- package/dist/orchestrator/agent-loader.js.map +1 -1
- package/dist/orchestrator/architect-agent.d.ts.map +1 -1
- package/dist/orchestrator/architect-agent.js +37 -8
- package/dist/orchestrator/architect-agent.js.map +1 -1
- package/dist/orchestrator/checkpoints/audit.d.ts +128 -0
- package/dist/orchestrator/checkpoints/audit.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/audit.js +272 -0
- package/dist/orchestrator/checkpoints/audit.js.map +1 -0
- package/dist/orchestrator/checkpoints/feedback-router.d.ts +213 -0
- package/dist/orchestrator/checkpoints/feedback-router.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/feedback-router.js +438 -0
- package/dist/orchestrator/checkpoints/feedback-router.js.map +1 -0
- package/dist/orchestrator/checkpoints/index.d.ts +11 -0
- package/dist/orchestrator/checkpoints/index.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/index.js +12 -0
- package/dist/orchestrator/checkpoints/index.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts +35 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.js +153 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts +34 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.js +139 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts +141 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.js +445 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.js.map +1 -0
- package/dist/orchestrator/checkpoints/noop.d.ts +12 -0
- package/dist/orchestrator/checkpoints/noop.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/noop.js +13 -0
- package/dist/orchestrator/checkpoints/noop.js.map +1 -0
- package/dist/orchestrator/checkpoints/registry.d.ts +48 -0
- package/dist/orchestrator/checkpoints/registry.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/registry.js +89 -0
- package/dist/orchestrator/checkpoints/registry.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/_util.d.ts +50 -0
- package/dist/orchestrator/checkpoints/renderers/_util.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/_util.js +137 -0
- package/dist/orchestrator/checkpoints/renderers/_util.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.js +66 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.js +40 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.js +54 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts +49 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.js +154 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js +59 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/plan.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/plan.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/plan.js +34 -0
- package/dist/orchestrator/checkpoints/renderers/plan.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/registry.d.ts +43 -0
- package/dist/orchestrator/checkpoints/renderers/registry.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/registry.js +83 -0
- package/dist/orchestrator/checkpoints/renderers/registry.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/research.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/research.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/research.js +39 -0
- package/dist/orchestrator/checkpoints/renderers/research.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts +20 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.js +57 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.js +38 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.js.map +1 -0
- package/dist/orchestrator/checkpoints/sites.d.ts +22 -0
- package/dist/orchestrator/checkpoints/sites.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/sites.js +57 -0
- package/dist/orchestrator/checkpoints/sites.js.map +1 -0
- package/dist/orchestrator/checkpoints/types.d.ts +51 -0
- package/dist/orchestrator/checkpoints/types.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/types.js +9 -0
- package/dist/orchestrator/checkpoints/types.js.map +1 -0
- package/dist/orchestrator/code-reviewer-agent.d.ts +50 -0
- package/dist/orchestrator/code-reviewer-agent.d.ts.map +1 -0
- package/dist/orchestrator/code-reviewer-agent.js +283 -0
- package/dist/orchestrator/code-reviewer-agent.js.map +1 -0
- package/dist/orchestrator/curator-agent.d.ts.map +1 -1
- package/dist/orchestrator/curator-agent.js +59 -8
- package/dist/orchestrator/curator-agent.js.map +1 -1
- package/dist/orchestrator/deploy/classify.d.ts +31 -0
- package/dist/orchestrator/deploy/classify.d.ts.map +1 -0
- package/dist/orchestrator/deploy/classify.js +109 -0
- package/dist/orchestrator/deploy/classify.js.map +1 -0
- package/dist/orchestrator/deploy/execute.d.ts +45 -0
- package/dist/orchestrator/deploy/execute.d.ts.map +1 -0
- package/dist/orchestrator/deploy/execute.js +146 -0
- package/dist/orchestrator/deploy/execute.js.map +1 -0
- package/dist/orchestrator/deploy/executor.d.ts +22 -0
- package/dist/orchestrator/deploy/executor.d.ts.map +1 -0
- package/dist/orchestrator/deploy/executor.js +31 -0
- package/dist/orchestrator/deploy/executor.js.map +1 -0
- package/dist/orchestrator/deploy/index.d.ts +21 -0
- package/dist/orchestrator/deploy/index.d.ts.map +1 -0
- package/dist/orchestrator/deploy/index.js +21 -0
- package/dist/orchestrator/deploy/index.js.map +1 -0
- package/dist/orchestrator/deploy/resolve.d.ts +51 -0
- package/dist/orchestrator/deploy/resolve.d.ts.map +1 -0
- package/dist/orchestrator/deploy/resolve.js +53 -0
- package/dist/orchestrator/deploy/resolve.js.map +1 -0
- package/dist/orchestrator/deploy/spawn.d.ts +60 -0
- package/dist/orchestrator/deploy/spawn.d.ts.map +1 -0
- package/dist/orchestrator/deploy/spawn.js +62 -0
- package/dist/orchestrator/deploy/spawn.js.map +1 -0
- package/dist/orchestrator/deploy/types.d.ts +98 -0
- package/dist/orchestrator/deploy/types.d.ts.map +1 -0
- package/dist/orchestrator/deploy/types.js +39 -0
- package/dist/orchestrator/deploy/types.js.map +1 -0
- package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
- package/dist/orchestrator/evaluator-agent.js +21 -8
- package/dist/orchestrator/evaluator-agent.js.map +1 -1
- package/dist/orchestrator/generator-agent.d.ts.map +1 -1
- package/dist/orchestrator/generator-agent.js +21 -8
- package/dist/orchestrator/generator-agent.js.map +1 -1
- package/dist/orchestrator/model-resolver.d.ts.map +1 -1
- package/dist/orchestrator/model-resolver.js +3 -1
- package/dist/orchestrator/model-resolver.js.map +1 -1
- package/dist/orchestrator/observability/index.d.ts +12 -0
- package/dist/orchestrator/observability/index.d.ts.map +1 -0
- package/dist/orchestrator/observability/index.js +12 -0
- package/dist/orchestrator/observability/index.js.map +1 -0
- package/dist/orchestrator/observability/merge.d.ts +73 -0
- package/dist/orchestrator/observability/merge.d.ts.map +1 -0
- package/dist/orchestrator/observability/merge.js +110 -0
- package/dist/orchestrator/observability/merge.js.map +1 -0
- package/dist/orchestrator/pipeline.d.ts +21 -0
- package/dist/orchestrator/pipeline.d.ts.map +1 -1
- package/dist/orchestrator/pipeline.js +156 -2
- package/dist/orchestrator/pipeline.js.map +1 -1
- package/dist/orchestrator/planner-agent.d.ts.map +1 -1
- package/dist/orchestrator/planner-agent.js +5 -4
- package/dist/orchestrator/planner-agent.js.map +1 -1
- package/dist/orchestrator/research-agent.d.ts.map +1 -1
- package/dist/orchestrator/research-agent.js +46 -9
- package/dist/orchestrator/research-agent.js.map +1 -1
- package/dist/orchestrator/tools/handlers.d.ts +2 -0
- package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
- package/dist/orchestrator/tools/handlers.js +1 -1
- package/dist/orchestrator/tools/handlers.js.map +1 -1
- package/dist/orchestrator/tools/index.d.ts +84 -1
- package/dist/orchestrator/tools/index.d.ts.map +1 -1
- package/dist/orchestrator/tools/index.js +164 -1
- package/dist/orchestrator/tools/index.js.map +1 -1
- package/dist/orchestrator/worktree.d.ts +18 -0
- package/dist/orchestrator/worktree.d.ts.map +1 -0
- package/dist/orchestrator/worktree.js +129 -0
- package/dist/orchestrator/worktree.js.map +1 -0
- package/dist/providers/anthropic.d.ts +8 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +86 -5
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +35 -2
- package/dist/providers/factory.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +5 -0
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +4 -0
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/types.d.ts +25 -2
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/state/approval-state.d.ts +74 -0
- package/dist/state/approval-state.d.ts.map +1 -0
- package/dist/state/approval-state.js +127 -0
- package/dist/state/approval-state.js.map +1 -0
- package/dist/state/index.d.ts +3 -0
- package/dist/state/index.d.ts.map +1 -1
- package/dist/state/index.js +4 -1
- package/dist/state/index.js.map +1 -1
- package/dist/state/review-state.d.ts +15 -0
- package/dist/state/review-state.d.ts.map +1 -0
- package/dist/state/review-state.js +51 -0
- package/dist/state/review-state.js.map +1 -0
- package/dist/state/run-state.d.ts +39 -0
- package/dist/state/run-state.d.ts.map +1 -0
- package/dist/state/run-state.js +101 -0
- package/dist/state/run-state.js.map +1 -0
- package/dist/telemetry/emit.d.ts +41 -0
- package/dist/telemetry/emit.d.ts.map +1 -0
- package/dist/telemetry/emit.js +65 -0
- package/dist/telemetry/emit.js.map +1 -0
- package/dist/utils/git.d.ts +27 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +50 -0
- package/dist/utils/git.js.map +1 -1
- package/hooks/hooks.json +17 -1
- package/hooks/session-start +42 -0
- package/package.json +5 -2
- package/scripts/check-prereqs.sh +12 -0
- package/scripts/e2e-graph-smoke.sh +167 -0
- package/scripts/graph-hook.mjs +151 -0
- package/scripts/run-kpi-gate.mjs +245 -0
- package/scripts/sync-skills.mjs +4 -1
- package/skills/bober.code-review/SKILL.md +186 -0
- package/skills/bober.debug/SKILL.md +300 -0
- package/skills/bober.deploy/SKILL.md +262 -0
- package/skills/bober.diagnose/SKILL.md +254 -0
- package/skills/bober.graph/SKILL.md +85 -0
- package/skills/bober.impact/SKILL.md +101 -0
- package/skills/bober.incident/SKILL.md +245 -0
- package/skills/bober.onboard/SKILL.md +84 -0
- package/skills/bober.plan/SKILL.md +10 -0
- package/skills/bober.postmortem/SKILL.md +231 -0
- package/skills/bober.runbook/SKILL.md +335 -0
- package/skills/bober.using-bober/SKILL.md +133 -0
- package/skills/bober.verify/SKILL.md +143 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postmortem synthesis (Sprint 23).
|
|
3
|
+
*
|
|
4
|
+
* Deterministic, programmatic synthesizer. Reads ALL artifacts under
|
|
5
|
+
* .bober/incidents/<id>/ and assembles an evidence-cited postmortem.md.
|
|
6
|
+
* Does NOT spawn an LLM subagent — postmortems must be reproducible from
|
|
7
|
+
* disk artifacts alone for audit purposes (mirrors resolution-verify.ts).
|
|
8
|
+
*
|
|
9
|
+
* Citation format: per-sentence inline (artifact#L<n>) references. The
|
|
10
|
+
* synthesizer enforces a minimum citation floor; below it, a synthesis-
|
|
11
|
+
* failure warning is appended to the document.
|
|
12
|
+
*
|
|
13
|
+
* Redaction: every quoted artifact snippet is scanned against the secret-
|
|
14
|
+
* pattern regex set BEFORE inclusion. Matches are replaced with [REDACTED]
|
|
15
|
+
* and counted; the count is emitted in the footer.
|
|
16
|
+
*
|
|
17
|
+
* Sprint 23 — src/incident/postmortem.ts
|
|
18
|
+
*/
|
|
19
|
+
import { type IncidentId } from "./types.js";
|
|
20
|
+
export interface PostmortemResult {
|
|
21
|
+
/** Absolute path to the written postmortem.md */
|
|
22
|
+
path: string;
|
|
23
|
+
/** The full markdown content (caller can stream to stdout for CLI show) */
|
|
24
|
+
content: string;
|
|
25
|
+
/** Number of secret-like strings redacted from artifacts during synthesis */
|
|
26
|
+
redactionCount: number;
|
|
27
|
+
/** True if 5-Whys synthesis produced fewer than 3 deterministic levels */
|
|
28
|
+
shallowWarning: boolean;
|
|
29
|
+
/** Number of inline citations in the generated markdown */
|
|
30
|
+
citationCount: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Synthesize a postmortem document from incident artifacts.
|
|
34
|
+
*
|
|
35
|
+
* Reads all artifact files under .bober/incidents/<incidentId>/ and assembles
|
|
36
|
+
* a structured, evidence-cited postmortem.md. Pure offline — no LLM calls.
|
|
37
|
+
* Every claim cites a specific artifact path (and line number where applicable).
|
|
38
|
+
*
|
|
39
|
+
* @param projectRoot Absolute path to the project root.
|
|
40
|
+
* @param incidentId The incident ID (e.g. 'inc-20260524-500-errors-on').
|
|
41
|
+
* @returns PostmortemResult with path, content, redactionCount, shallowWarning, citationCount.
|
|
42
|
+
*/
|
|
43
|
+
export declare function generatePostmortem(projectRoot: string, incidentId: IncidentId): Promise<PostmortemResult>;
|
|
44
|
+
//# sourceMappingURL=postmortem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postmortem.d.ts","sourceRoot":"","sources":["../../src/incident/postmortem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAEL,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,cAAc,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,cAAc,EAAE,OAAO,CAAC;IACxB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;CACvB;AA6jBD;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,gBAAgB,CAAC,CA2G3B"}
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postmortem synthesis (Sprint 23).
|
|
3
|
+
*
|
|
4
|
+
* Deterministic, programmatic synthesizer. Reads ALL artifacts under
|
|
5
|
+
* .bober/incidents/<id>/ and assembles an evidence-cited postmortem.md.
|
|
6
|
+
* Does NOT spawn an LLM subagent — postmortems must be reproducible from
|
|
7
|
+
* disk artifacts alone for audit purposes (mirrors resolution-verify.ts).
|
|
8
|
+
*
|
|
9
|
+
* Citation format: per-sentence inline (artifact#L<n>) references. The
|
|
10
|
+
* synthesizer enforces a minimum citation floor; below it, a synthesis-
|
|
11
|
+
* failure warning is appended to the document.
|
|
12
|
+
*
|
|
13
|
+
* Redaction: every quoted artifact snippet is scanned against the secret-
|
|
14
|
+
* pattern regex set BEFORE inclusion. Matches are replaced with [REDACTED]
|
|
15
|
+
* and counted; the count is emitted in the footer.
|
|
16
|
+
*
|
|
17
|
+
* Sprint 23 — src/incident/postmortem.ts
|
|
18
|
+
*/
|
|
19
|
+
import { readFile, writeFile, readdir, stat } from "node:fs/promises";
|
|
20
|
+
import { join } from "node:path";
|
|
21
|
+
import { IncidentMetadataSchema, } from "./types.js";
|
|
22
|
+
// ── Redaction patterns (mirror skills/bober.postmortem/SKILL.md) ──────────────
|
|
23
|
+
// These exact regexes are the canonical set — SKILL.md documents them.
|
|
24
|
+
const REDACTION_PATTERNS = [
|
|
25
|
+
/AKIA[0-9A-Z]{16}/g,
|
|
26
|
+
/aws_secret_access_key\s*[=:]\s*\S+/gi,
|
|
27
|
+
/(?:Bearer|Token|token|apikey|api_key|api-key)[\s=:]+["']?[A-Za-z0-9._-]{16,}["']?/gi,
|
|
28
|
+
/sk-[A-Za-z0-9]{20,}/g,
|
|
29
|
+
/sk_(?:live|test)_[A-Za-z0-9]{10,}/g,
|
|
30
|
+
/ghp_[A-Za-z0-9]{20,}/g,
|
|
31
|
+
/secret_[A-Za-z0-9_-]+/gi,
|
|
32
|
+
/password\s*[=:]\s*\S+/gi,
|
|
33
|
+
/Authorization:\s*Bearer\s+\S+/gi,
|
|
34
|
+
/-----BEGIN [A-Z ]+PRIVATE KEY-----[\s\S]+?-----END [A-Z ]+PRIVATE KEY-----/g,
|
|
35
|
+
];
|
|
36
|
+
const REDACTION_PLACEHOLDER = "[REDACTED]";
|
|
37
|
+
function redact(text) {
|
|
38
|
+
let count = 0;
|
|
39
|
+
let out = text;
|
|
40
|
+
for (const re of REDACTION_PATTERNS) {
|
|
41
|
+
// Reset lastIndex on each application (global flag requires it).
|
|
42
|
+
re.lastIndex = 0;
|
|
43
|
+
out = out.replace(re, () => {
|
|
44
|
+
count++;
|
|
45
|
+
return REDACTION_PLACEHOLDER;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return { redacted: out, count };
|
|
49
|
+
}
|
|
50
|
+
async function readJsonlWithLineNo(path) {
|
|
51
|
+
try {
|
|
52
|
+
const raw = await readFile(path, "utf-8");
|
|
53
|
+
const results = [];
|
|
54
|
+
const lines = raw.split("\n");
|
|
55
|
+
for (let i = 0; i < lines.length; i++) {
|
|
56
|
+
const line = lines[i].trim();
|
|
57
|
+
if (line) {
|
|
58
|
+
results.push({ record: JSON.parse(line), lineNo: i + 1 });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return results;
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
if (err.code === "ENOENT")
|
|
65
|
+
return [];
|
|
66
|
+
throw err;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// ── Artifact readers ───────────────────────────────────────────────────────────
|
|
70
|
+
async function readDiagnoses(dir) {
|
|
71
|
+
try {
|
|
72
|
+
const entries = await readdir(dir);
|
|
73
|
+
const jsonFiles = entries.filter((e) => e.endsWith(".json"));
|
|
74
|
+
const results = [];
|
|
75
|
+
for (const fname of jsonFiles) {
|
|
76
|
+
try {
|
|
77
|
+
const raw = await readFile(join(dir, fname), "utf-8");
|
|
78
|
+
const parsed = JSON.parse(raw);
|
|
79
|
+
const s = await stat(join(dir, fname));
|
|
80
|
+
parsed._mtime = s.mtimeMs;
|
|
81
|
+
results.push(parsed);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Skip malformed files — log nothing here, we mention gaps in output
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Sort by mtime descending — most recent first.
|
|
88
|
+
results.sort((a, b) => (b._mtime ?? 0) - (a._mtime ?? 0));
|
|
89
|
+
return results;
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
if (err.code === "ENOENT")
|
|
93
|
+
return [];
|
|
94
|
+
throw err;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function readResolutionEvidence(dir) {
|
|
98
|
+
try {
|
|
99
|
+
const entries = await readdir(dir);
|
|
100
|
+
const jsonFiles = entries.filter((e) => e.endsWith(".json"));
|
|
101
|
+
const results = [];
|
|
102
|
+
for (const fname of jsonFiles) {
|
|
103
|
+
try {
|
|
104
|
+
const raw = await readFile(join(dir, fname), "utf-8");
|
|
105
|
+
const parsed = JSON.parse(raw);
|
|
106
|
+
parsed._filename = fname;
|
|
107
|
+
results.push(parsed);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
// Skip malformed files
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return results;
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
if (err.code === "ENOENT")
|
|
117
|
+
return [];
|
|
118
|
+
throw err;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// ── Duration formatter ────────────────────────────────────────────────────────
|
|
122
|
+
function formatDuration(createdAt, resolvedAt) {
|
|
123
|
+
if (!resolvedAt)
|
|
124
|
+
return "ongoing";
|
|
125
|
+
const ms = Date.parse(resolvedAt) - Date.parse(createdAt);
|
|
126
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
127
|
+
return "unknown";
|
|
128
|
+
const h = Math.floor(ms / 3600000);
|
|
129
|
+
const m = Math.floor((ms % 3600000) / 60000);
|
|
130
|
+
return `${h}h${String(m).padStart(2, "0")}m`;
|
|
131
|
+
}
|
|
132
|
+
function utcHHMM(isoTimestamp) {
|
|
133
|
+
const d = new Date(isoTimestamp);
|
|
134
|
+
if (isNaN(d.getTime()))
|
|
135
|
+
return isoTimestamp;
|
|
136
|
+
return `${String(d.getUTCHours()).padStart(2, "0")}:${String(d.getUTCMinutes()).padStart(2, "0")} UTC`;
|
|
137
|
+
}
|
|
138
|
+
// ── Section composers ──────────────────────────────────────────────────────────
|
|
139
|
+
function composeHeader(meta) {
|
|
140
|
+
const duration = formatDuration(meta.createdAt, meta.resolvedAt);
|
|
141
|
+
const titleSymptom = meta.symptom.length > 80 ? meta.symptom.slice(0, 80) + "..." : meta.symptom;
|
|
142
|
+
const lines = [
|
|
143
|
+
`# Postmortem: ${titleSymptom}`,
|
|
144
|
+
"",
|
|
145
|
+
`**Incident ID:** ${meta.incidentId} (incident.json)`,
|
|
146
|
+
`**Status:** Resolved`,
|
|
147
|
+
`**Severity:** S3 *(default — derive from observation count and impact magnitude)*`,
|
|
148
|
+
`**Date:** ${meta.createdAt} → ${meta.resolvedAt ?? "ongoing"} (incident.json)`,
|
|
149
|
+
`**Duration:** ${duration}`,
|
|
150
|
+
];
|
|
151
|
+
return lines.join("\n");
|
|
152
|
+
}
|
|
153
|
+
function composeTldr(meta, diagnoses, changelog, tally) {
|
|
154
|
+
const symptom = tally(meta.symptom);
|
|
155
|
+
const topDiag = diagnoses[0];
|
|
156
|
+
const topHyp = topDiag?.hypotheses?.sort((a, b) => {
|
|
157
|
+
const order = { high: 3, medium: 2, low: 1 };
|
|
158
|
+
return (order[b.confidence] - order[a.confidence]) ||
|
|
159
|
+
(b.supportingEvidence.length - a.supportingEvidence.length);
|
|
160
|
+
})[0];
|
|
161
|
+
// Find the last change entry.
|
|
162
|
+
const lastChange = changelog.length > 0 ? changelog[changelog.length - 1] : null;
|
|
163
|
+
let summary = `Symptom: ${symptom} (incident.json). `;
|
|
164
|
+
if (topHyp && topDiag) {
|
|
165
|
+
summary += `Root cause candidate: ${tally(topHyp.statement)} (diagnoses/${topDiag.diagnosisId}.json#${topHyp.id}). `;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
summary += "Root cause: no diagnosis recorded — human review required. ";
|
|
169
|
+
}
|
|
170
|
+
if (lastChange) {
|
|
171
|
+
summary += `Resolving action: ${tally(lastChange.record.description)} (changelog.jsonl#L${lastChange.lineNo}).`;
|
|
172
|
+
}
|
|
173
|
+
else if (meta.resolutionEvidence?.verified) {
|
|
174
|
+
summary += `Resolution verified via metric check (incident.json).`;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
summary += `Resolution method: see incident.json for details.`;
|
|
178
|
+
}
|
|
179
|
+
return summary;
|
|
180
|
+
}
|
|
181
|
+
function composeImpact(observations, resolutionEvidence, tally) {
|
|
182
|
+
const lines = [];
|
|
183
|
+
const verifiedObs = observations.filter((o) => o.record.verified && (o.record.phase === 1 || o.record.phase === 2));
|
|
184
|
+
if (verifiedObs.length === 0) {
|
|
185
|
+
lines.push("- No verified observations recorded for this incident — (observations.jsonl is empty or unverified).");
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
for (const o of verifiedObs) {
|
|
189
|
+
lines.push(`- ${tally(o.record.observation)} (observations.jsonl#L${o.lineNo})`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const passed = resolutionEvidence.filter((e) => e.allSamplesPassed);
|
|
193
|
+
if (passed.length > 0) {
|
|
194
|
+
const ev = passed[0];
|
|
195
|
+
const sample = ev.samples?.[0];
|
|
196
|
+
if (sample && ev.criteria) {
|
|
197
|
+
lines.push(`- Resolution sample: observed ${sample.value} against threshold ${ev.criteria.threshold} ` +
|
|
198
|
+
`(${ev.criteria.comparison}) at ${sample.timestamp} ` +
|
|
199
|
+
`(resolution-evidence/${ev._filename ?? "evidence.json"})`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return lines.join("\n");
|
|
203
|
+
}
|
|
204
|
+
function composeTimelineTable(timeline, tally) {
|
|
205
|
+
const header = [
|
|
206
|
+
"| Time (UTC) | Event | Source |",
|
|
207
|
+
"|------------|-------|--------|",
|
|
208
|
+
];
|
|
209
|
+
if (timeline.length === 0) {
|
|
210
|
+
return header.join("\n") + "\n| — | No timeline events recorded | (timeline.jsonl is empty) |";
|
|
211
|
+
}
|
|
212
|
+
const rows = timeline.map((t) => {
|
|
213
|
+
const time = utcHHMM(t.record.timestamp);
|
|
214
|
+
const summary = tally(t.record.summary.slice(0, 80));
|
|
215
|
+
const source = `${t.record.source} (timeline.jsonl#L${t.lineNo})`;
|
|
216
|
+
return `| ${time} | ${summary} | ${source} |`;
|
|
217
|
+
});
|
|
218
|
+
return [...header, ...rows].join("\n");
|
|
219
|
+
}
|
|
220
|
+
function composeRootCause(meta, diagnoses, changelog, tally) {
|
|
221
|
+
const whys = [];
|
|
222
|
+
// Why 1: symptom from incident.json.
|
|
223
|
+
whys.push(`1. Why did ${tally(meta.symptom)} happen? (incident.json)`);
|
|
224
|
+
// Why 2: highest-confidence hypothesis from most-recent diagnosis.
|
|
225
|
+
if (diagnoses.length > 0) {
|
|
226
|
+
const d = diagnoses[0];
|
|
227
|
+
const order = { high: 3, medium: 2, low: 1 };
|
|
228
|
+
const top = [...(d.hypotheses ?? [])].sort((a, b) => (order[b.confidence] - order[a.confidence]) ||
|
|
229
|
+
(b.supportingEvidence.length - a.supportingEvidence.length))[0];
|
|
230
|
+
if (top) {
|
|
231
|
+
whys.push(`2. Because ${tally(top.statement)}. (diagnoses/${d.diagnosisId}.json#${top.id})`);
|
|
232
|
+
// Why 3: strongest supporting evidence on that hypothesis.
|
|
233
|
+
if (top.supportingEvidence && top.supportingEvidence.length > 0) {
|
|
234
|
+
const ev = top.supportingEvidence[0];
|
|
235
|
+
whys.push(`3. Because ${tally(ev.snippet)}. (${ev.path})`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// Why 4 + 5: changes within 30 min before incident.createdAt, sorted by executedAt desc.
|
|
240
|
+
const created = Date.parse(meta.createdAt);
|
|
241
|
+
const preChanges = changelog
|
|
242
|
+
.filter((c) => {
|
|
243
|
+
const t = Date.parse(c.record.executedAt);
|
|
244
|
+
return Number.isFinite(t) && created - t > 0 && created - t < 30 * 60 * 1000;
|
|
245
|
+
})
|
|
246
|
+
.sort((a, b) => (a.record.executedAt < b.record.executedAt ? 1 : -1));
|
|
247
|
+
if (preChanges[0] && whys.length >= 3) {
|
|
248
|
+
const minutes = Math.round((created - Date.parse(preChanges[0].record.executedAt)) / 60000);
|
|
249
|
+
whys.push(`4. Because ${tally(preChanges[0].record.description)} shipped ${minutes}m before symptom onset. ` +
|
|
250
|
+
`(changelog.jsonl#L${preChanges[0].lineNo})`);
|
|
251
|
+
}
|
|
252
|
+
if (preChanges[1] && whys.length >= 4) {
|
|
253
|
+
const minutes = Math.round((created - Date.parse(preChanges[1].record.executedAt)) / 60000);
|
|
254
|
+
whys.push(`5. Because ${tally(preChanges[1].record.description)} (preceding change ${minutes}m before symptom onset). ` +
|
|
255
|
+
`(changelog.jsonl#L${preChanges[1].lineNo})`);
|
|
256
|
+
}
|
|
257
|
+
const shallowWarning = whys.length < 3;
|
|
258
|
+
let markdown = whys.join("\n");
|
|
259
|
+
if (shallowWarning) {
|
|
260
|
+
const missingArtifact = diagnoses.length === 0 ? "diagnoses/" : "supportingEvidence";
|
|
261
|
+
markdown +=
|
|
262
|
+
"\n\n**Warning:** 5-Whys synthesis was shallow due to missing evidence — only " +
|
|
263
|
+
`${whys.length} level(s) derivable from artifacts (missing evidence in ${missingArtifact}). ` +
|
|
264
|
+
"Human review required to deepen this chain.";
|
|
265
|
+
}
|
|
266
|
+
return { markdown, shallowWarning };
|
|
267
|
+
}
|
|
268
|
+
function composeContributingFactors(runbookExec, observations, tally) {
|
|
269
|
+
const lines = [];
|
|
270
|
+
const FAILED_STATUSES = new Set([
|
|
271
|
+
"precondition_failed",
|
|
272
|
+
"execution_failed",
|
|
273
|
+
"postcondition_failed_no_rollback",
|
|
274
|
+
"rollback_failed",
|
|
275
|
+
]);
|
|
276
|
+
const failedSteps = runbookExec.filter((r) => FAILED_STATUSES.has(r.record.status));
|
|
277
|
+
for (const step of failedSteps) {
|
|
278
|
+
lines.push(`- Runbook failure: ${tally(step.record.runbookName)} step ${step.record.stepNumber} ` +
|
|
279
|
+
`status=${step.record.status} (runbook-execution.jsonl#L${step.lineNo})`);
|
|
280
|
+
}
|
|
281
|
+
const unverifiedObs = observations.filter((o) => !o.record.verified);
|
|
282
|
+
for (const o of unverifiedObs) {
|
|
283
|
+
lines.push(`- Unverified observation influenced response: ${tally(o.record.observation.slice(0, 120))} ` +
|
|
284
|
+
`(observations.jsonl#L${o.lineNo})`);
|
|
285
|
+
}
|
|
286
|
+
if (lines.length === 0) {
|
|
287
|
+
if (runbookExec.length === 0) {
|
|
288
|
+
lines.push("- No runbook executed for this incident — (runbook-execution.jsonl is empty).");
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
lines.push("- No failed runbook steps or unverified observations recorded (runbook-execution.jsonl).");
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return lines.join("\n");
|
|
295
|
+
}
|
|
296
|
+
function composeWentWell(runbookExec, resolutionEvidence, tally) {
|
|
297
|
+
const lines = [];
|
|
298
|
+
const successStatuses = new Set(["success", "recovered_via_rollback"]);
|
|
299
|
+
const successSteps = runbookExec.filter((r) => successStatuses.has(r.record.status));
|
|
300
|
+
for (const step of successSteps) {
|
|
301
|
+
lines.push(`- Runbook success: ${tally(step.record.runbookName)} step ${step.record.stepNumber} ` +
|
|
302
|
+
`completed with status=${step.record.status} (runbook-execution.jsonl#L${step.lineNo})`);
|
|
303
|
+
}
|
|
304
|
+
const verifiedResolution = resolutionEvidence.filter((e) => e.allSamplesPassed);
|
|
305
|
+
for (const ev of verifiedResolution) {
|
|
306
|
+
if (ev.criteria) {
|
|
307
|
+
lines.push(`- Resolution metric verified: ${ev.criteria.metricName} ${ev.criteria.comparison} ${ev.criteria.threshold} ` +
|
|
308
|
+
`for ${ev.criteria.windowMinutes}m sustained (resolution-evidence/${ev._filename ?? "evidence.json"})`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if (lines.length === 0) {
|
|
312
|
+
lines.push("- No explicitly successful runbook steps recorded — (runbook-execution.jsonl has no success entries).");
|
|
313
|
+
}
|
|
314
|
+
return lines.join("\n");
|
|
315
|
+
}
|
|
316
|
+
function composeWentWrong(runbookExec, actions, meta, tally) {
|
|
317
|
+
const lines = [];
|
|
318
|
+
const FAILED_STATUSES = new Set([
|
|
319
|
+
"precondition_failed",
|
|
320
|
+
"execution_failed",
|
|
321
|
+
"postcondition_failed_no_rollback",
|
|
322
|
+
"rollback_failed",
|
|
323
|
+
]);
|
|
324
|
+
const failedSteps = runbookExec.filter((r) => FAILED_STATUSES.has(r.record.status));
|
|
325
|
+
for (const step of failedSteps) {
|
|
326
|
+
lines.push(`- Runbook execution failure: ${tally(step.record.runbookName)} step ${step.record.stepNumber} ` +
|
|
327
|
+
`failed with status=${step.record.status} (runbook-execution.jsonl#L${step.lineNo})`);
|
|
328
|
+
}
|
|
329
|
+
// Risky actions taken without a preceding precondition pass.
|
|
330
|
+
const precondPassTimes = new Set(runbookExec
|
|
331
|
+
.filter((r) => r.record.preconditionResult === "pass")
|
|
332
|
+
.map((r) => r.record.timestamp));
|
|
333
|
+
const riskyActionsWithoutPrecondition = actions.filter((a) => a.record.blastRadius === "risky" && !precondPassTimes.has(a.record.timestamp));
|
|
334
|
+
for (const a of riskyActionsWithoutPrecondition) {
|
|
335
|
+
lines.push(`- Risky action taken without preceding precondition pass: ${tally(a.record.action.slice(0, 120))} ` +
|
|
336
|
+
`(actions.jsonl#L${a.lineNo})`);
|
|
337
|
+
}
|
|
338
|
+
// Override resolution.
|
|
339
|
+
if (meta.resolutionEvidence?.override) {
|
|
340
|
+
lines.push(`- Incident resolved via override (not metric verification): ${tally(meta.resolutionEvidence.override.reason)} ` +
|
|
341
|
+
`at ${meta.resolutionEvidence.override.at} (incident.json)`);
|
|
342
|
+
}
|
|
343
|
+
if (lines.length === 0) {
|
|
344
|
+
lines.push("- No runbook failures or unguarded risky actions recorded for this incident.");
|
|
345
|
+
}
|
|
346
|
+
return lines.join("\n");
|
|
347
|
+
}
|
|
348
|
+
function composeActionItems(runbookExec, actions) {
|
|
349
|
+
const header = [
|
|
350
|
+
"| Item | Owner | Due | Source |",
|
|
351
|
+
"|------|-------|-----|--------|",
|
|
352
|
+
];
|
|
353
|
+
const rows = [];
|
|
354
|
+
const FAILED_STATUSES = new Set([
|
|
355
|
+
"precondition_failed",
|
|
356
|
+
"execution_failed",
|
|
357
|
+
"postcondition_failed_no_rollback",
|
|
358
|
+
"rollback_failed",
|
|
359
|
+
]);
|
|
360
|
+
const failedSteps = runbookExec.filter((r) => FAILED_STATUSES.has(r.record.status));
|
|
361
|
+
for (const step of failedSteps) {
|
|
362
|
+
rows.push(`| Investigate and fix ${step.record.runbookName} step ${step.record.stepNumber} failure | TBD | TBD | (runbook-execution.jsonl#L${step.lineNo}) |`);
|
|
363
|
+
}
|
|
364
|
+
// Risky actions without precondition pass.
|
|
365
|
+
const precondPassTimes = new Set(runbookExec
|
|
366
|
+
.filter((r) => r.record.preconditionResult === "pass")
|
|
367
|
+
.map((r) => r.record.timestamp));
|
|
368
|
+
const riskyActions = actions.filter((a) => a.record.blastRadius === "risky" && !precondPassTimes.has(a.record.timestamp));
|
|
369
|
+
for (const a of riskyActions) {
|
|
370
|
+
rows.push(`| Add precondition gate before: ${a.record.action.slice(0, 60)} | TBD | TBD | (actions.jsonl#L${a.lineNo}) |`);
|
|
371
|
+
}
|
|
372
|
+
// Default monitoring action item — always present.
|
|
373
|
+
rows.push("| Add monitoring for the root-cause signal identified in 5-Whys Level 3 | TBD | TBD | (5-whys-3) |");
|
|
374
|
+
return [...header, ...rows].join("\n");
|
|
375
|
+
}
|
|
376
|
+
// ── Citation counter ───────────────────────────────────────────────────────────
|
|
377
|
+
function countCitations(content) {
|
|
378
|
+
// Match parenthesized references like (incident.json), (timeline.jsonl#L7),
|
|
379
|
+
// (diagnoses/xxx.json#h1), (5-whys-3), (resolution-evidence/file.json)
|
|
380
|
+
const matches = content.match(/\([a-z0-9_./-]+(?:#(?:L?\d+|[a-z0-9-]+))?(?:,\s*[a-z0-9_./-]+(?:#(?:L?\d+|[a-z0-9-]+))?)?\)/gi);
|
|
381
|
+
return matches ? matches.length : 0;
|
|
382
|
+
}
|
|
383
|
+
// ── Main entry point ───────────────────────────────────────────────────────────
|
|
384
|
+
/**
|
|
385
|
+
* Synthesize a postmortem document from incident artifacts.
|
|
386
|
+
*
|
|
387
|
+
* Reads all artifact files under .bober/incidents/<incidentId>/ and assembles
|
|
388
|
+
* a structured, evidence-cited postmortem.md. Pure offline — no LLM calls.
|
|
389
|
+
* Every claim cites a specific artifact path (and line number where applicable).
|
|
390
|
+
*
|
|
391
|
+
* @param projectRoot Absolute path to the project root.
|
|
392
|
+
* @param incidentId The incident ID (e.g. 'inc-20260524-500-errors-on').
|
|
393
|
+
* @returns PostmortemResult with path, content, redactionCount, shallowWarning, citationCount.
|
|
394
|
+
*/
|
|
395
|
+
export async function generatePostmortem(projectRoot, incidentId) {
|
|
396
|
+
const dir = join(projectRoot, ".bober", "incidents", incidentId);
|
|
397
|
+
// 1. Read incident.json (required — throws ENOENT if missing).
|
|
398
|
+
const metaRaw = await readFile(join(dir, "incident.json"), "utf-8");
|
|
399
|
+
const meta = IncidentMetadataSchema.parse(JSON.parse(metaRaw));
|
|
400
|
+
// 2. Read JSONL artifacts with line numbers (graceful: missing = empty).
|
|
401
|
+
const timeline = await readJsonlWithLineNo(join(dir, "timeline.jsonl"));
|
|
402
|
+
const observations = await readJsonlWithLineNo(join(dir, "observations.jsonl"));
|
|
403
|
+
const changelog = await readJsonlWithLineNo(join(dir, "changelog.jsonl"));
|
|
404
|
+
const runbookExec = await readJsonlWithLineNo(join(dir, "runbook-execution.jsonl"));
|
|
405
|
+
const actions = await readJsonlWithLineNo(join(dir, "actions.jsonl"));
|
|
406
|
+
// 3. Read diagnoses/ (sort by mtime descending — most recent first).
|
|
407
|
+
const diagnoses = await readDiagnoses(join(dir, "diagnoses"));
|
|
408
|
+
// 4. Read resolution-evidence/*.json.
|
|
409
|
+
const resolutionEvidence = await readResolutionEvidence(join(dir, "resolution-evidence"));
|
|
410
|
+
// 5. Compose each section. The tally() wrapper redacts snippets at extraction time.
|
|
411
|
+
let totalRedactions = 0;
|
|
412
|
+
const tally = (s) => {
|
|
413
|
+
const { redacted, count } = redact(s);
|
|
414
|
+
totalRedactions += count;
|
|
415
|
+
return redacted;
|
|
416
|
+
};
|
|
417
|
+
const header = composeHeader(meta);
|
|
418
|
+
const tldr = composeTldr(meta, diagnoses, changelog, tally);
|
|
419
|
+
const impact = composeImpact(observations, resolutionEvidence, tally);
|
|
420
|
+
const timelineTable = composeTimelineTable(timeline, tally);
|
|
421
|
+
const { markdown: rootCause, shallowWarning } = composeRootCause(meta, diagnoses, changelog, tally);
|
|
422
|
+
const contribFactors = composeContributingFactors(runbookExec, observations, tally);
|
|
423
|
+
const wentWell = composeWentWell(runbookExec, resolutionEvidence, tally);
|
|
424
|
+
const wentWrong = composeWentWrong(runbookExec, actions, meta, tally);
|
|
425
|
+
const actionItems = composeActionItems(runbookExec, actions);
|
|
426
|
+
// 6. Assemble document.
|
|
427
|
+
const parts = [
|
|
428
|
+
header,
|
|
429
|
+
"",
|
|
430
|
+
"## TL;DR",
|
|
431
|
+
"",
|
|
432
|
+
tldr,
|
|
433
|
+
"",
|
|
434
|
+
"## Impact",
|
|
435
|
+
"",
|
|
436
|
+
impact,
|
|
437
|
+
"",
|
|
438
|
+
"## Timeline",
|
|
439
|
+
"",
|
|
440
|
+
timelineTable,
|
|
441
|
+
"",
|
|
442
|
+
"## Root Cause (5-Whys)",
|
|
443
|
+
"",
|
|
444
|
+
rootCause,
|
|
445
|
+
"",
|
|
446
|
+
"## Contributing Factors",
|
|
447
|
+
"",
|
|
448
|
+
contribFactors,
|
|
449
|
+
"",
|
|
450
|
+
"## What Went Well",
|
|
451
|
+
"",
|
|
452
|
+
wentWell,
|
|
453
|
+
"",
|
|
454
|
+
"## What Went Wrong",
|
|
455
|
+
"",
|
|
456
|
+
wentWrong,
|
|
457
|
+
"",
|
|
458
|
+
"## Action Items",
|
|
459
|
+
"",
|
|
460
|
+
actionItems,
|
|
461
|
+
"",
|
|
462
|
+
];
|
|
463
|
+
if (totalRedactions > 0) {
|
|
464
|
+
parts.push("---", "", `**Redactions:** ${totalRedactions} secret-like string(s) redacted from artifacts. ` +
|
|
465
|
+
"Audit trail: redaction patterns documented in `skills/bober.postmortem/SKILL.md`.", "");
|
|
466
|
+
}
|
|
467
|
+
parts.push(`*Generated by \`bober postmortem generate ${incidentId}\` (Sprint 23).*`, "");
|
|
468
|
+
const content = parts.join("\n");
|
|
469
|
+
// 7. Citation count.
|
|
470
|
+
const citationCount = countCitations(content);
|
|
471
|
+
// 8. Write postmortem.md.
|
|
472
|
+
// The incident directory must already exist (incident.json was read above).
|
|
473
|
+
// We do NOT call mkdir here — if the directory was removed between read and
|
|
474
|
+
// write (e.g., test cleanup race), writeFile throws ENOENT which is caught by
|
|
475
|
+
// the caller's fire-and-forget wrapper in timeline.ts (logs a warn, moves on).
|
|
476
|
+
const outputPath = join(dir, "postmortem.md");
|
|
477
|
+
await writeFile(outputPath, content, { encoding: "utf-8", mode: 0o600 });
|
|
478
|
+
return {
|
|
479
|
+
path: outputPath,
|
|
480
|
+
content,
|
|
481
|
+
redactionCount: totalRedactions,
|
|
482
|
+
shallowWarning,
|
|
483
|
+
citationCount,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
//# sourceMappingURL=postmortem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postmortem.js","sourceRoot":"","sources":["../../src/incident/postmortem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,sBAAsB,GAGvB,MAAM,YAAY,CAAC;AAiBpB,iFAAiF;AACjF,uEAAuE;AAEvE,MAAM,kBAAkB,GAAa;IACnC,mBAAmB;IACnB,sCAAsC;IACtC,qFAAqF;IACrF,sBAAsB;IACtB,oCAAoC;IACpC,uBAAuB;IACvB,yBAAyB;IACzB,yBAAyB;IACzB,iCAAiC;IACjC,6EAA6E;CAC9E,CAAC;AAEF,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,IAAY;IAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,KAAK,MAAM,EAAE,IAAI,kBAAkB,EAAE,CAAC;QACpC,iEAAiE;QACjE,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC;QACjB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE;YACzB,KAAK,EAAE,CAAC;YACR,OAAO,qBAAqB,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AAClC,CAAC;AASD,KAAK,UAAU,mBAAmB,CAAI,IAAY;IAChD,IAAI,CAA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