codecartographer-pi 0.16.0 → 0.17.1

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 (77) hide show
  1. package/.codecarto/GUIDE.md +16 -3
  2. package/.codecarto/README.md +3 -0
  3. package/.codecarto/broadside/SKILL.md +143 -0
  4. package/.codecarto/broadside/config.yaml +104 -0
  5. package/.codecarto/findings/architecture/SKILL.md +1 -0
  6. package/.codecarto/findings/broadside-scout/README.md +20 -0
  7. package/.codecarto/findings/broadside-scout/SKILL.md +101 -0
  8. package/.codecarto/findings/contracts/SKILL.md +1 -0
  9. package/.codecarto/findings/defect-scan/SKILL.md +15 -1
  10. package/.codecarto/findings/defect-scan/passes/01-logic-and-correctness.md +1 -1
  11. package/.codecarto/findings/defect-scan/passes/02-error-handling.md +1 -1
  12. package/.codecarto/findings/defect-scan/passes/03-concurrency-and-resources.md +1 -1
  13. package/.codecarto/findings/defect-scan/passes/04-security-and-trust.md +1 -1
  14. package/.codecarto/findings/defect-scan/passes/05-api-contract-violations.md +2 -1
  15. package/.codecarto/findings/defect-scan/passes/06-config-and-environment.md +1 -1
  16. package/.codecarto/findings/defect-scan-mechanical/SKILL.md +3 -2
  17. package/.codecarto/findings/defect-scan-semantic/SKILL.md +2 -0
  18. package/.codecarto/findings/porting/SKILL.md +2 -1
  19. package/.codecarto/findings/protocols/SKILL.md +1 -0
  20. package/.codecarto/findings/reimplementation-spec/SKILL.md +1 -1
  21. package/.codecarto/skills/spec-delta-application/SKILL.md +3 -1
  22. package/.codecarto/templates/architecture-map.md +1 -1
  23. package/.codecarto/templates/backlog-project.md +51 -0
  24. package/.codecarto/templates/broadside-scout-brief.md +97 -0
  25. package/.codecarto/templates/defect-report.md +23 -0
  26. package/.codecarto/templates/mechanical-defects.md +22 -0
  27. package/.codecarto/templates/reverse-engineering-bundle.md +2 -2
  28. package/.codecarto/templates/semantic-defects.md +26 -0
  29. package/.codecarto/{THREAD_LOG.md → templates/thread-log.md} +2 -5
  30. package/.codecarto/workflow/VALIDATE.md +1 -1
  31. package/.codecarto/workflow/pipeline-defect-scan.yaml +2 -0
  32. package/.codecarto/workflow/pipeline-full-with-audit.yaml +3 -1
  33. package/.codecarto/workflow/pipeline-full-with-deep-audit.yaml +5 -1
  34. package/.codecarto/workflow/pipeline-scout-first.yaml +275 -0
  35. package/.codecarto/workflow/scaffold-version.yaml +1 -1
  36. package/README.md +51 -6
  37. package/agent-skill/codecartographer/SKILL.md +3 -1
  38. package/agent-skill/codecartographer/references/broadside.md +115 -0
  39. package/agent-skill/codecartographer/references/deep-audit-synthesis.md +4 -1
  40. package/agent-skill/codecartographer/references/library.md +2 -2
  41. package/agent-skill/codecartographer/references/orchestration.md +1 -1
  42. package/agent-skill/codecartographer/references/pipeline-selection.md +14 -0
  43. package/dist/core/amendment.js +2 -2
  44. package/dist/core/broadside.d.ts +421 -0
  45. package/dist/core/broadside.js +2349 -0
  46. package/dist/core/completion.d.ts +5 -0
  47. package/dist/core/completion.js +38 -6
  48. package/dist/core/dashboard.js +5 -3
  49. package/dist/core/findings.d.ts +59 -0
  50. package/dist/core/findings.js +145 -0
  51. package/dist/core/index.d.ts +2 -0
  52. package/dist/core/index.js +2 -0
  53. package/dist/core/library.d.ts +88 -1
  54. package/dist/core/library.js +260 -7
  55. package/dist/core/orchestrator-config.js +5 -2
  56. package/dist/core/pipeline.js +16 -0
  57. package/dist/core/prompts.js +1 -1
  58. package/dist/core/status.js +23 -7
  59. package/dist/core/types.d.ts +6 -0
  60. package/dist/core/utils.d.ts +14 -0
  61. package/dist/core/utils.js +37 -1
  62. package/dist/core/workspace.d.ts +17 -0
  63. package/dist/core/workspace.js +79 -20
  64. package/dist/core/yaml.js +19 -4
  65. package/dist/extensions/codecarto/agent-runner.js +6 -0
  66. package/dist/extensions/codecarto/auto-runner.d.ts +2 -0
  67. package/dist/extensions/codecarto/broadside-flags.d.ts +26 -0
  68. package/dist/extensions/codecarto/broadside-flags.js +129 -0
  69. package/dist/extensions/codecarto/dashboard-narrator.js +1 -1
  70. package/dist/extensions/codecarto/index.js +270 -18
  71. package/dist/extensions/codecarto/phase-compaction.js +4 -0
  72. package/dist/mcp-server/server.d.ts +22 -0
  73. package/dist/mcp-server/server.js +282 -17
  74. package/package.json +11 -2
  75. package/.codecarto/BACKLOG.md +0 -184
  76. package/.codecarto/CHANGELOG-2026-05-02-feedback-pass.md +0 -118
  77. package/.codecarto/closeouts/2026-05-02-framework-feedback-pass.md +0 -111
@@ -17,7 +17,7 @@ CodeCartographer distinguishes two roles. They are different jobs — but they a
17
17
  **Orchestrator.** The persistent chat driving the run — normally the very session reading this guide. The role is defined by its **duties**, not by who executes phases:
18
18
 
19
19
  - **Curate `CONVENTIONS.md` and `DECISIONS.md`**: promote patterns when they recur; append cross-cutting decisions as they land.
20
- - **Re-triage open questions at every phase boundary.** A question's `kind` label is itself a claim that needs evidence: before accepting `needs-maintainer-decision` or `needs-runtime-test`, re-test whether the question has become answerable by reading. A mislabeled question suppresses verification for every later phase (the `orchestration` guide topic records a real four-phase failure).
20
+ - **Re-triage open questions at every phase boundary.** A question's `kind` label is itself a claim that needs evidence: before accepting `needs-maintainer-decision` or `needs-runtime-test`, re-test whether the question has become answerable by reading. A mislabeled question suppresses verification for every later phase (the `orchestration` guide topic records a real four-phase failure). The duty has a counterpart: when re-triage concludes a question genuinely still needs a runtime test, no finding in the next phase may assert one of that question's candidate answers with a settled action (`fix before porting`, `fix now`) — it inherits the question's uncertainty (`verify at runtime`) until runtime evidence closes the question.
21
21
  - **Sweep for contradictions** between the incoming phase's required reads and earlier phases' `owner_notes`. A measured fact that contradicts a summarized claim is a gap to route, not a nuance to smooth over.
22
22
  - **Route gaps**: confirm each completed phase's declared secondary outputs were written or explicitly routed, and that handoff `decisions` deferring work landed somewhere a later phase will actually see.
23
23
  - **Gate strategic forks** with the user: pipeline switches, opinionated-vs-agnostic specs, scope changes.
@@ -57,6 +57,7 @@ Read these files in order before doing any analysis:
57
57
  4. `scratch/checkpoints/<phase>.md`, if present, to resume durable in-phase progress after compaction or interruption.
58
58
  5. The current phase's `SKILL.md` for detailed instructions on what to analyze and produce.
59
59
  6. The output template from `templates/` for the current phase (if starting a new output).
60
+ 7. `broadside/synthesis.md`, if a Broad-Side batch reconnaissance run has completed — it carries unverified scouting leads (see `broadside/SKILL.md`) that tell you where the interactive phases should spend attention.
60
61
 
61
62
  All paths in this guide are relative to `.codecarto/` unless stated otherwise.
62
63
 
@@ -71,7 +72,7 @@ Some files in this workspace are **read-only instructions** and must not be modi
71
72
  | Category | Files | Access |
72
73
  |---|---|---|
73
74
  | Orchestration (read-only) | `GUIDE.md`, `CONTRIBUTING.md`, `LICENSE` | Read only. Never modify. |
74
- | Skills (read-only) | `findings/*/SKILL.md`, `findings/defect-scan/passes/*.md`, `skills/*/SKILL.md` | Read only. Never modify. |
75
+ | Skills (read-only) | `findings/*/SKILL.md`, `findings/defect-scan/passes/*.md`, `skills/*/SKILL.md`, `broadside/SKILL.md` | Read only. Never modify. |
75
76
  | Templates (read-only) | `templates/*.md` | Read only. Never modify. |
76
77
  | Pipeline definitions (read-only) | `workflow/pipeline*.yaml`, `workflow/VALIDATE.md` | Read only. Never modify. |
77
78
  | Source code (read-only) | `../` (everything outside `.codecarto/`) | Read only. Analyze but never modify. |
@@ -83,11 +84,17 @@ Some files in this workspace are **read-only instructions** and must not be modi
83
84
  | Closeouts (framework-owned) | `closeouts/<date>-<phase-or-module>.md`, `THREAD_LOG.md` | Completion writes or updates one canonical closeout and one idempotent index entry. |
84
85
  | Conventions (orchestrator-maintained) | `CONVENTIONS.md` | Cross-cutting patterns promoted to project-wide invariants. Phase executors propose; the orchestrator promotes at the phase boundary — in inline runs, the same chat changing hats. |
85
86
  | Decisions (orchestrator-maintained, append-only) | `DECISIONS.md` | Numbered log of decisions that diverge from spec, prompt, or obvious-default. Completion appends each handoff's `decisions` under `## Completion log`; the orchestrator may re-file entries into categories. |
86
- | Backlog (read-write) | `BACKLOG.md` | Deferred items with rationale. |
87
+ | Backlog (orchestrator-maintained) | `BACKLOG.md` | Work this project decided to **defer**, with the reasoning, the preconditions for revisiting, and the smallest viable form. Seeded from `templates/backlog-project.md` at init. |
87
88
  | Scratch (read-write) | `scratch/*` | Working notes; `scratch/checkpoints/<phase>.md` is the durable in-phase continuation checkpoint until the phase validates; `scratch/spikes/<spike-id>/<scenario>.md` holds spike reports (`templates/spike-report.md`); `scratch/amendments/<slug>.yaml` holds post-pipeline amendments (`templates/amendment.yaml`). |
88
89
 
89
90
  If you are uncertain whether a file should be modified, treat it as read-only.
90
91
 
92
+ ### Two things named "backlog", and neither is the other
93
+
94
+ - **`BACKLOG.md` in this workspace** is *this project's* deferrals: work the project chose not to do yet. `DECISIONS.md` records what the project decided to **do**; `BACKLOG.md` records what it decided to **defer**. Deferrals get no `D` number. When a deferred item is later picked up, remove its entry here and record the decision in `DECISIONS.md`.
95
+ - **`status.yaml`'s `post_pipeline` list** is framework-owned lifecycle state, not this file. Items there are retired by `codecarto_amend`, never by hand.
96
+ - **CodeCartographer's own backlog** — deferred improvements to the *framework* — lives in the CodeCartographer repository, not in your workspace. If a phase prompt misled you or a validation criterion did not fit, that is feedback to the framework; it does not belong in this file.
97
+
91
98
  ## Pipeline Selection
92
99
 
93
100
  Seven pipeline variants are available. Check the `pipeline` field in `workflow/status.yaml` to see which is active.
@@ -98,6 +105,7 @@ Seven pipeline variants are available. Check the `pipeline` field in `workflow/s
98
105
  | Variant | File | Phases | When to use |
99
106
  |---|---|---|---|
100
107
  | Full with deep audit (default) | `workflow/pipeline-full-with-deep-audit.yaml` | architecture → defect-scan-mechanical → contracts → protocols → defect-scan-semantic → porting → reimplementation-spec | Complete analysis with defect scan split into an early mechanical pass and a deep semantic pass; reimplementation designs around defects with full context |
108
+ | Scout first | `workflow/pipeline-scout-first.yaml` | broadside-scout → architecture → defect-scan-mechanical → contracts → protocols → defect-scan-semantic → porting → reimplementation-spec | The deep-audit run behind a Broad-Side routing brief: the scout phase distills an existing batch reconnaissance run into leads addressed to later phases, each of which must confirm, dismiss, or carry them forward. Leads are never evidence |
101
109
  | Full with audit | `workflow/pipeline-full-with-audit.yaml` | architecture → defect-scan → contracts → protocols → porting → reimplementation-spec | Single early defect scan; cheaper than the deep variant when you do not need contracts/protocols-grounded defect findings |
102
110
  | Full | `workflow/pipeline.yaml` | architecture → contracts → protocols → porting → reimplementation-spec | Porting bundle without defect scan |
103
111
  | Defect scan | `workflow/pipeline-defect-scan.yaml` | architecture → defect-scan | Maintenance audit to surface latent problems |
@@ -303,6 +311,7 @@ your-repo/
303
311
  SKILL.md
304
312
  workflow/
305
313
  pipeline-full-with-deep-audit.yaml # 7-phase pipeline with split defect scan (default).
314
+ pipeline-scout-first.yaml # 8-phase: deep audit behind a broadside-scout routing brief.
306
315
  pipeline-full-with-audit.yaml # 6-phase pipeline with single early defect scan.
307
316
  pipeline.yaml # 5-phase (no defect scan).
308
317
  pipeline-defect-scan.yaml # 2-phase (architecture + defect scan).
@@ -313,6 +322,10 @@ your-repo/
313
322
  VALIDATE.md # Validation protocol. Run after every phase.
314
323
  closeouts/ # Per-session closeout files (replaces monolithic THREAD_LOG body).
315
324
  <YYYY-MM-DD>-<phase-or-module>.md
325
+ broadside/ # Batch reconnaissance state and results (see broadside/SKILL.md).
326
+ SKILL.md # How to read Broad-Side scouting leads (unverified, not evidence).
327
+ config.yaml # Broad-Side model/key/lens configuration.
328
+ <run-id>/ # Per-run JSON + markdown findings, run-meta.json, synthesis report.
316
329
  CONVENTIONS.md # (Optional, project-grown) Cross-cutting invariants. Orchestrator-maintained.
317
330
  DECISIONS.md # (Optional, project-grown) Numbered decisions log. Orchestrator-maintained.
318
331
  BACKLOG.md # (Optional) Deferred items with rationale.
@@ -31,6 +31,7 @@ The default is the 7-phase **full-with-deep-audit** pipeline, which splits the d
31
31
 
32
32
  ```yaml
33
33
  pipeline: workflow/pipeline-full-with-deep-audit.yaml # 7-phase with split defect scan (default; depth-first)
34
+ pipeline: workflow/pipeline-scout-first.yaml # 8-phase: the deep-audit run behind a broadside-scout brief (Pi/MCP only)
34
35
  pipeline: workflow/pipeline-full-with-audit.yaml # 6-phase with single early defect scan — adjust phases to use one defect-scan
35
36
  pipeline: workflow/pipeline.yaml # 5-phase without defect scan — remove defect-scan phases
36
37
  pipeline: workflow/pipeline-defect-scan.yaml # 2-phase defect audit — remove contracts through reimplementation-spec
@@ -39,4 +40,6 @@ pipeline: workflow/pipeline-architecture-only.yaml # 1-phase quick overview
39
40
  pipeline: workflow/pipeline-synthesis.yaml # 4-phase forward synthesis — vision + confirmed library specs → project plan (Pi/MCP only)
40
41
  ```
41
42
 
43
+ The scout-first pipeline is the deep-audit run with one phase in front of it: `broadside-scout` distills a completed Broad-Side batch reconnaissance run into `findings/broadside-scout/scout-brief.md`, and the six phases after it read that brief and must account for the leads routed to them. Firing the reconnaissance run itself needs Pi or MCP; the scout phase only reads what a run already wrote, so with no run on disk it produces an explicitly empty brief and the pipeline proceeds.
44
+
42
45
  The synthesis pipeline is different from the analysis variants: it requires Pi or MCP, a configured non-empty CodeCartographer library, and a completed `inputs/vision.md`. It pauses after proposing candidate specs and will not merge or finalize until the user changes at least one proposal checkbox from `[ ]` to `[x]`.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: broadside
3
+ description: Interpret a Broad-Side batch reconnaissance run. Use after codecarto_broadside collect has produced .codecarto/broadside/<run>/ results, to triage scouting signals before or during an interactive CodeCartographer pipeline run.
4
+ ---
5
+
6
+ # Broad-Side
7
+
8
+ Broad-Side is CodeCartographer's batch reconnaissance pass. It fires six
9
+ analysis lenses — architecture, API surface, security, mechanical defect scan,
10
+ convention extraction, and porting — at the repository as single-turn prompts
11
+ over the OpenRouter Batch API (~50% of sync pricing, asynchronous, unattended),
12
+ then synthesizes one cross-lens report. Results live under
13
+ `.codecarto/broadside/<run>/` alongside this file.
14
+
15
+ ## What Broad-Side findings are — and are not
16
+
17
+ Broad-Side findings are **unverified scouting signals**, not validated claims.
18
+ Every lens is one shot: no cross-file traversal, no runtime verification, no
19
+ builds, no tests, no follow-up questions. The batch model is cheap, not strong.
20
+ Treat every finding as a lead with a file:line pointer that the interactive
21
+ pipeline — or you — must confirm before it is a fact.
22
+
23
+ This is the division of labor: Broad-Side is cheap enough to run on any repo to
24
+ decide where the expensive interactive run should spend its attention. It does
25
+ not replace any phase; it tells phases where to look.
26
+
27
+ ## Reading a Broad-Side run
28
+
29
+ 1. Read `synthesis.md` first. It carries the executive summary, severity counts,
30
+ the top cross-lens findings, and per-module risk levels.
31
+ 2. Read `triage.md` for the work order: each lead scored by impact ×
32
+ difficulty with a P0–P3 priority and an effort estimate. It is a starting
33
+ point for re-verification, not a commitment — every item still needs
34
+ confirmation against the source before work begins.
35
+ 3. Read the per-lens files behind anything that matters to your current phase:
36
+ - `architecture-*.json` → the architecture phase's seed of prior knowledge
37
+ - `api-*.json` → endpoints and data types (contracts/protocols phases)
38
+ - `security-*.json` → auth, trust boundaries (defect-scan-semantic pass 5)
39
+ - `defect-*.json` → mechanical defect leads (defect-scan-mechanical)
40
+ - `conventions-*.json` → naming/idiom candidates for CONVENTIONS.md
41
+ - `porting-*.json` → platform coupling (porting phase)
42
+ 4. `run-meta.json` records scope: which lenses ran, at what cost, with what
43
+ coverage caps.
44
+
45
+ ## How to use the leads
46
+
47
+ - **A finding that matches your phase's scope is a starting point, not an answer.**
48
+ Re-derive it from the source yourself; cite the source, not the Broad-Side
49
+ report. Broad-Side output is not evidence.
50
+ - **Route, don't believe.** A Broad-Side "high" that your phase can neither
51
+ confirm nor dismiss becomes an open question with `needs-runtime-test` or
52
+ `needs-maintainer-decision` — never a finding.
53
+ - **Promotable conventions are candidates only.** CONVENTIONS.md promotions
54
+ still require the orchestrator's review against the code, per the usual
55
+ promotion rules.
56
+ - **Coverage caps are real.** Directory-sliced lenses cap each slice's input;
57
+ `run-meta.json` and the synthesis `coverage` field say what was scanned.
58
+ Everything outside that is unscouted, not clean.
59
+
60
+ ## Running Broad-Side
61
+
62
+ Broad-Side is an executable-surface feature. On the Pi extension:
63
+
64
+ ```
65
+ /codecarto-broadside submit [lenses…] # prices the run, asks, then fires
66
+ /codecarto-broadside collect # poll, save, synthesize
67
+ /codecarto-broadside status # show recorded runs
68
+ /codecarto-broadside models # compare batch models
69
+ ```
70
+
71
+ On the MCP server:
72
+
73
+ ```
74
+ codecarto_broadside {cwd, action: "submit", lenses: [...]} # fire the batches
75
+ codecarto_broadside {cwd, action: "collect"} # poll, save, synthesize
76
+ codecarto_broadside {cwd, action: "status"} # show recorded runs
77
+ codecarto_broadside {cwd, action: "models"} # compare batch models
78
+ ```
79
+
80
+ The `models` action lists every `:batch` variant on OpenRouter — pricing per
81
+ million tokens, context window, output ceiling, structured-output support, and
82
+ (optionally) Artificial Analysis coding indices — cheapest first, with the
83
+ configured model marked. Use it before switching models in `config.yaml`.
84
+ Submits pre-flight the chosen model: pricing comes from the live catalog
85
+ (cached 24h), requests clamp to the provider's completion ceiling, and a
86
+ model that does not advertise structured-output support is refused outright,
87
+ because every lens depends on `json_schema` response_format.
88
+
89
+ Collect runs two cross-lens post-passes by default: **synthesis** (the
90
+ executive report) and **triage** (the prioritized work order). Pass
91
+ `include_synthesis: false` or `include_triage: false` on collect to skip one.
92
+
93
+ Lenses do not all have to run on the same model. `lens_models` in `config.yaml`
94
+ routes individual lenses to their own batch model — the usual reason being that
95
+ a stronger model changes security and defect findings more than it changes an
96
+ architecture map. Each override is priced, capability-checked, and clamped like
97
+ the default, the submit estimate breaks cost out per lens, and `run-meta.json`
98
+ records which lens ran on what. No stronger default is shipped: which model is
99
+ worth the money depends on the repository and the budget, so compare with the
100
+ `models` action and decide.
101
+
102
+ Every run knob — `incremental`, `retry_truncated`, `include_synthesis`,
103
+ `include_triage`, `wait_seconds` — also has a repository default under the same
104
+ name in this directory's `config.yaml`, alongside `model`, `api_key`,
105
+ `default_lenses`, `max_cost`, and the `pricing` overrides. An explicit
106
+ parameter on the call always wins over the file.
107
+
108
+ This file is also served directly: `codecarto_skill {cwd, name: "broadside"}`
109
+ returns it. Unlike the post-pipeline skills under `.codecarto/skills/`, it is
110
+ not gated on a completed pipeline — a scout run is meant to be read before the
111
+ pipeline starts and while it runs.
112
+
113
+ It works on any git repository — no initialized workspace required — and needs
114
+ an OpenRouter API key via the `api_key` parameter, the `OPENROUTER_API_KEY`
115
+ environment variable, or `api_key` in this directory's `config.yaml`.
116
+
117
+ Submits are priced before they fire: Broad-Side estimates the run from the
118
+ collected file sizes against the model's live per-token pricing and refuses
119
+ when the estimate exceeds `max_cost` (`config.yaml` or the tool parameter)
120
+ unless `force` is passed. See `config.yaml` for the model, limit, and manual
121
+ pricing-override keys.
122
+
123
+ The `max_cost` guardrail is an **estimate-based pre-flight limit**, distinct
124
+ from OpenRouter's runtime cost tracking: it predicts from file sizes before
125
+ spend, it does not stop a batch mid-flight. Actual spend appears in
126
+ `run-meta.json` after collect.
127
+
128
+ ## Resilience notes
129
+
130
+ - **Truncation is spoken.** A lens output whose JSON does not parse — even
131
+ after code-fence stripping — is saved verbatim but marked `truncated`:
132
+ the collect summary counts it, `run-meta.json` records it, and the
133
+ synthesis prompt is told its module is unrepresented, not clean.
134
+ - **Resubmission is always safe.** Batch requests are pure (no tools, no
135
+ filesystem, no side effects), so a failed or truncated slice can be
136
+ resubmitted freely. This is the same retry-safety rule OpenRouter's
137
+ headless-agent scaffold enforces for tool-using agents ("retry only
138
+ before tool calls"); Broad-Side satisfies it by construction. If
139
+ Broad-Side ever gains server tools, this invariant becomes load-bearing.
140
+ - **Field shapes** for the model catalog and benchmarks endpoints follow
141
+ the official OpenRouter skills (`OpenRouterTeam/skills`:
142
+ `openrouter-models`, `openrouter-benchmarks`) — consult them when
143
+ extending catalog parsing.
@@ -0,0 +1,104 @@
1
+ # Broad-Side batch reconnaissance configuration. Optional.
2
+ # Missing keys fall back to the defaults listed below.
3
+
4
+ # OpenRouter model to use for batch requests. The default is Google Gemini
5
+ # 3.7 Flash (batch) — the cheapest batch model with tool-calling support and
6
+ # a 1M-token context window. Change this to another OpenRouter batch model
7
+ # if you need a different cost/capability trade-off. To compare what's
8
+ # available, run codecarto_broadside with action "models" — it lists every
9
+ # :batch variant with pricing, context, output caps, structured-output
10
+ # support, and optional coding benchmarks. Beware the expensive end of that
11
+ # list — some batch models exceed $80 per million output tokens — and note
12
+ # that every lens requires structured-output (json_schema) support, which
13
+ # submit refuses to proceed without.
14
+ #
15
+ # model: google/gemini-3.7-flash:batch
16
+
17
+ # OpenRouter API key. Prefer the OPENROUTER_API_KEY environment variable —
18
+ # keys in this file are committed if you track .codecarto/ after init.
19
+ # The codecarto_broadside tool also accepts api_key as a parameter.
20
+ #
21
+ # api_key: ""
22
+
23
+ # Default lens set for codecarto_broadside submit when no lenses are
24
+ # specified. All six lenses are on by default. Remove a lens id to skip it
25
+ # globally, or pass an explicit lenses array on the submit call to override.
26
+ #
27
+ # default_lenses:
28
+ # - architecture
29
+ # - api
30
+ # - security
31
+ # - defect
32
+ # - conventions
33
+ # - porting
34
+
35
+ # Per-lens model overrides. A lens listed here runs on its own model; every
36
+ # other lens uses the `model` above. This is how you spend more where it pays:
37
+ # the cheap default is right for architecture and conventions, while security
38
+ # and defect findings are the ones a stronger model most changes. Each override
39
+ # is pre-flighted like the default — priced from the live catalog, refused
40
+ # without structured-output support, and clamped to its own completion ceiling
41
+ # — and the submit estimate breaks the cost out per lens so a mixed-model run
42
+ # cannot be approved without seeing which lens costs what.
43
+ #
44
+ # There is deliberately no stronger default shipped here: which model is worth
45
+ # the money for the semantic lenses depends on your repository and your budget,
46
+ # and picking one for you would spend your money on our guess. Compare
47
+ # candidates with the `models` action first.
48
+ #
49
+ # lens_models:
50
+ # security: anthropic/claude-opus-4.5:batch
51
+ # defect: anthropic/claude-opus-4.5:batch
52
+
53
+ # Approximate run expense limit in USD (0 = no limit). Before submitting,
54
+ # Broad-Side estimates the run cost from the collected file sizes and the
55
+ # model's per-token pricing — fetched live from OpenRouter's model catalog
56
+ # and cached for 24h. If the estimate exceeds max_cost, submit refuses and
57
+ # prints the per-lens breakdown; pass force: true to override, or set a
58
+ # value here so every run is guarded by default.
59
+ #
60
+ # This is a pre-flight estimate guardrail, not a runtime stop: OpenRouter
61
+ # bills actual usage, which may differ from the estimate either direction.
62
+ # Actual cost lands in each run's run-meta.json after collect.
63
+ #
64
+ # max_cost: 1.00
65
+
66
+ # Manual pricing overrides in USD per MILLION tokens. Normally Broad-Side
67
+ # looks the model's pricing up automatically; set both fields only when the
68
+ # lookup fails (offline, private model) or you want to assert a ceiling.
69
+ #
70
+ # pricing:
71
+ # input_per_m: 0.1875
72
+ # output_per_m: 0.9375
73
+ # ---------------------------------------------------------------------------
74
+ # Run defaults. Each key below mirrors a codecarto_broadside parameter of the
75
+ # same name and sets this repository's default for it; an explicit parameter on
76
+ # the call always wins. Set them here when a repo's scouting policy is stable,
77
+ # so it does not have to be restated on every submit and collect.
78
+
79
+ # Scan only the modules whose files changed since the previous run's git HEAD.
80
+ # Falls back to a full scan on a dirty tree or when no prior run exists.
81
+ #
82
+ # incremental: false
83
+
84
+ # Re-submit lens results that came back truncated at the output token limit,
85
+ # once, with a doubled output cap. Truncation is always reported either way.
86
+ #
87
+ # retry_truncated: true
88
+
89
+ # Run the cross-lens synthesis pass (synthesis.md, the executive report) once
90
+ # every lens batch completes.
91
+ #
92
+ # include_synthesis: true
93
+
94
+ # Run the triage pass (triage.md, the P0-P3 work order) once every lens batch
95
+ # completes.
96
+ #
97
+ # include_triage: true
98
+
99
+ # Default poll budget in seconds. 0 returns as soon as the batches are
100
+ # submitted or the recorded state is read; a positive value polls that long
101
+ # before returning with whatever is done. Batch jobs routinely take tens of
102
+ # minutes, so a submit-then-collect-later rhythm is normal.
103
+ #
104
+ # wait_seconds: 0
@@ -84,6 +84,7 @@ Write the output in seven sections:
84
84
  Mark every conclusion with one of these evidence levels:
85
85
  - `observed fact`: direct statement from docs, tests, schemas, types, or code.
86
86
  - `strong inference`: architectural conclusion drawn from multiple facts.
87
+ - `external-behavior claim`: a claim about what a system outside this source tree does (a server, engine, driver, third-party API, OS); unverifiable by reading this code, so it stays unsettled until a runtime probe or that system's own source confirms it.
87
88
  - `portability hazard`: assumption tied to the source language, runtime, terminal, OS, or third-party SDKs.
88
89
  - `open question`: missing or conflicting behavior that still needs evidence.
89
90
 
@@ -0,0 +1,20 @@
1
+ # Broad-Side Scout
2
+
3
+ Distills a completed Broad-Side batch reconnaissance run into a routing brief.
4
+ Runs first, before architecture, in the `pipeline-scout-first` workflow.
5
+
6
+ **Primary output:** `scout-brief.md`
7
+
8
+ **Depends on:** nothing in the pipeline. It reads what a prior
9
+ `/codecarto-broadside` (Pi) or `codecarto_broadside` (MCP) run wrote under
10
+ `broadside/<run>/`. It never submits a batch and never spends; with no run on
11
+ disk it produces an explicitly empty brief and the pipeline proceeds.
12
+
13
+ **Consumed by:** architecture, defect-scan-mechanical, contracts, protocols,
14
+ defect-scan-semantic, and porting, each of which must account for the leads
15
+ routed to it at validation. `reimplementation-spec` deliberately does not read
16
+ it — the porting bundle is that phase's compression boundary.
17
+
18
+ Everything in the brief is an unverified scouting lead. No phase may cite it,
19
+ or any file under `broadside/`, as a source. See `SKILL.md`, and
20
+ `broadside/SKILL.md` for how to read the underlying run.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: broadside-scout
3
+ description: Distill a completed Broad-Side batch reconnaissance run into a routing brief the later phases read. Runs first, before architecture, in the scout-first pipeline. Produces leads with a target phase for each — never findings, never evidence.
4
+ ---
5
+
6
+ # Broad-Side Scout
7
+
8
+ This phase turns a Broad-Side batch reconnaissance run into a **routing brief**:
9
+ a short document that tells each later phase where to spend its attention
10
+ first. It runs before architecture, and everything downstream reads it.
11
+
12
+ The source code to analyze is in the parent directory (`../` relative to
13
+ `.codecarto/`).
14
+
15
+ ## This phase spends no money
16
+
17
+ Broad-Side itself is fired by `/codecarto-broadside submit` (Pi) or
18
+ `codecarto_broadside` (MCP), and it is priced and confirmed there. This phase
19
+ only reads what those already wrote under `broadside/<run>/`. It never submits
20
+ a batch, and it must never instruct anyone to.
21
+
22
+ If no run exists, that is a legitimate outcome — see "When there is no run."
23
+
24
+ ## What you are reading, and what it is worth
25
+
26
+ Broad-Side findings are **unverified scouting signals** produced by a cheap
27
+ batch model in a single shot: no cross-file traversal, no runtime
28
+ verification, no builds, no tests, no follow-up questions.
29
+
30
+ The entire value of this phase is routing attention. The entire risk is that a
31
+ lead gets copied forward as a fact. So the brief you write is a list of
32
+ *places to look*, each addressed to a phase, and every entry carries the
33
+ source pointer that phase must confirm for itself.
34
+
35
+ Nothing you write here is evidence. No later phase may cite this brief, or any
36
+ file under `broadside/`, as a source for a finding. A later phase cites the
37
+ code it confirmed.
38
+
39
+ ## Reading the run
40
+
41
+ 1. Find the most recent run directory under `broadside/`. If several exist,
42
+ use the newest and say which one you used.
43
+ 2. `broadside/<run>/synthesis.md` — the executive summary, severity counts,
44
+ top cross-lens findings, per-module risk. Start here.
45
+ 3. `broadside/<run>/triage.md` — the same findings scored by impact ×
46
+ difficulty into a P0–P3 order with effort estimates.
47
+ 4. `broadside/<run>/run-meta.json` — which lenses ran, at what cost, with what
48
+ coverage caps. This is where you learn what was *not* scanned.
49
+ 5. The per-lens files only when a lead matters enough to need its detail.
50
+
51
+ ## Routing
52
+
53
+ Each lead goes to exactly one phase. Use the lens it came from as the default
54
+ routing, and override when the content says otherwise:
55
+
56
+ | Lens | Default target phase |
57
+ |---|---|
58
+ | architecture | `architecture` |
59
+ | api | `contracts`, or `protocols` for wire formats |
60
+ | security | `defect-scan-semantic` |
61
+ | defect | `defect-scan-mechanical` |
62
+ | porting | `porting` |
63
+ | conventions | none — these are candidates for the orchestrator's `CONVENTIONS.md`, not a phase |
64
+
65
+ A lead you cannot route to a phase in the active pipeline is not a lead for
66
+ this run. Drop it and say you dropped it.
67
+
68
+ ## Cutting the list down
69
+
70
+ A brief that forwards everything routes nothing. Keep the leads that would
71
+ change where a phase starts looking, and drop the rest. Two filters:
72
+
73
+ - **Would this phase find it anyway in its first pass?** If yes, it is not
74
+ worth a lead — the phase's own rubric already covers it.
75
+ - **Is it specific enough to check?** A lead without a file or a module is not
76
+ actionable. Note the theme in coverage notes instead of forwarding noise.
77
+
78
+ Prefer 3–8 leads per target phase. If a lens produced far more than that, say
79
+ so in the coverage notes and forward the strongest.
80
+
81
+ ## Coverage is spoken, not implied
82
+
83
+ `run-meta.json` records truncated slices, skipped lenses, and coverage caps.
84
+ Everything outside the sweep is **unscouted, not clean**, and the brief must
85
+ say which parts of the repository were never looked at. A later phase that
86
+ reads "no leads for module X" must be able to tell "the scout found nothing
87
+ there" from "the scout never looked."
88
+
89
+ ## When there is no run
90
+
91
+ If `broadside/` holds no completed run, do not submit one and do not stall the
92
+ pipeline. Write the brief with an empty lead table, state plainly under
93
+ Coverage and limits that no run exists and therefore no module was scouted
94
+ (coverage disposition `NONE`), and validate the coverage criteria against that. Every later phase then proceeds on its own
95
+ rubric, exactly as it would in a pipeline without this phase.
96
+
97
+ ## Output
98
+
99
+ Write the brief to the primary output using
100
+ `templates/broadside-scout-brief.md`. Keep it short: it is read at the top of
101
+ six later phases, and every line costs each of them context.
@@ -79,6 +79,7 @@ End with a black-box acceptance list:
79
79
  Mark every finding with one of these evidence levels:
80
80
  - `observed fact`: direct statement from docs, tests, schemas, types, or code.
81
81
  - `strong inference`: behavioral conclusion drawn from multiple facts.
82
+ - `external-behavior claim`: a claim about what a system outside this source tree does (a server, engine, driver, third-party API, OS); unverifiable by reading this code, so it stays unsettled until a runtime probe or that system's own source confirms it.
82
83
  - `portability hazard`: assumption tied to the source language, runtime, terminal, OS, or third-party SDKs.
83
84
  - `open question`: missing or conflicting behavior that still needs evidence.
84
85
 
@@ -45,8 +45,11 @@ Not every pass applies to every codebase. Use the architecture map to decide emp
45
45
  Mark every finding with one of these evidence levels:
46
46
  - `observed fact`: the defect is directly visible in the code.
47
47
  - `strong inference`: the defect is highly likely based on multiple code observations.
48
+ - `external-behavior claim`: the claim is about a component outside the analyzed source tree — a server, engine, driver, third-party API, or OS — including how it parses a payload, what it silently ignores, and version-dependent behavior. Not obtainable at any read depth of this source: settling it needs a runtime probe against the pinned version, or that system's own source at that version. This is not a weaker `strong inference`; it is a claim about a different artifact. "The client sends a map where the server's API documents an array" is an `external-behavior claim` about the server, even when both halves of the sentence are observed facts.
48
49
  - `open question`: the code is suspicious but would need runtime testing to confirm.
49
50
 
51
+ **Cite or hedge quantities.** Any number in a finding — a file size, a default value, a call-site count, a version, a timeout — cites the file and line or the command output it was read from, or is written as an explicit estimate ("~300 MB, not measured"). A plausible specific stated in the same register as a read one is how a 32.8 MB artifact gets recorded as ~300 MB and a default of -20 as -5.
52
+
50
53
  ## Severity Classification
51
54
 
52
55
  Assign one severity per finding:
@@ -59,10 +62,11 @@ Assign one severity per finding:
59
62
 
60
63
  Tag each finding with a recommended action. Use the set that matches your pipeline:
61
64
 
62
- **Pre-porting pipelines** (full-with-audit, full-with-deep-audit):
65
+ **Pre-porting pipelines** (full-with-audit, full-with-deep-audit, scout-first):
63
66
  - `fix before porting`: the defect would carry into a new implementation if not addressed first.
64
67
  - `port differently`: the new implementation should handle this case differently by design.
65
68
  - `leave behind`: the defect is specific to the source implementation and won't survive porting.
69
+ - `verify at runtime`: the diagnosis names behavior of a system outside the analyzed source, or otherwise cannot be settled by reading; a runtime probe must confirm it before any fix is designed. Its destination is the spec's Spike List plus a `post_pipeline` entry of `kind: spike` — not a design change.
66
70
 
67
71
  **Maintenance pipelines** (defect-scan):
68
72
  - `fix now`: the defect is actively causing or risking problems.
@@ -72,6 +76,16 @@ Tag each finding with a recommended action. Use the set that matches your pipeli
72
76
 
73
77
  Determine which action set to use by checking the `pipeline` field in `workflow/status.yaml`.
74
78
 
79
+ ### Pairing rules — the evidence level bounds the action
80
+
81
+ A finding's action may not assert more certainty than its evidence level carries:
82
+
83
+ - Evidence `open question` or `external-behavior claim` ⇒ action is `verify at runtime` or `port differently` (pre-porting), or `investigate` (maintenance). **Never `fix before porting` or `fix now`.** A fix designed from an unsettled diagnosis can convert working behavior into the one shape the external system ignores — a real run recommended exactly that reshape, and runtime testing inverted it.
84
+ - Evidence `observed fact` ⇒ action is not `verify at runtime`. A settled label with an unsettled action contradicts itself; pick the one that is true.
85
+ - Every finding whose evidence is `open question` or `external-behavior claim` also appears in the report's **Open Questions** table, so the hedge travels with the finding into every document a later phase or a human reads — not only into the handoff.
86
+
87
+ Validation checks the first rule mechanically on the findings tables; on a current scaffold a violation fails the phase. If a routed `carry_forward` item derives from an open question of `kind: needs-runtime-test` that is still unresolved, the finding that addresses it inherits that uncertainty: it closes the carry-forward with `verify at runtime`, not with a settled action, unless the question itself is closed with runtime evidence in the same handoff.
88
+
75
89
  ## Output
76
90
 
77
91
  Write findings to the primary output using the template at `templates/defect-report.md`.
@@ -41,7 +41,7 @@ For each finding, record:
41
41
  - **Defect**: what is wrong, in one sentence.
42
42
  - **Evidence**: what you observed that proves or strongly suggests the defect.
43
43
  - **Severity**: critical (incorrect results in normal use), high (incorrect results in edge cases), medium (dead code or latent risk), low (style issue with correctness implications).
44
- - **Evidence level**: observed fact / strong inference / open question.
44
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
45
45
 
46
46
  ## What to skip
47
47
 
@@ -47,7 +47,7 @@ For each finding, record:
47
47
  - **Defect**: what error scenario is mishandled.
48
48
  - **Evidence**: the specific code pattern or path that demonstrates the gap.
49
49
  - **Severity**: critical (data loss or corruption on failure), high (silent failure in normal operations), medium (poor error messages or missing cleanup), low (observability gap).
50
- - **Evidence level**: observed fact / strong inference / open question.
50
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
51
51
 
52
52
  ## What to skip
53
53
 
@@ -46,7 +46,7 @@ For each finding, record:
46
46
  - **Defect**: what concurrent or resource scenario is mishandled.
47
47
  - **Evidence**: the specific shared state, missing synchronization, or unclosed resource.
48
48
  - **Severity**: critical (data corruption or deadlock in normal operation), high (race condition in common paths), medium (resource leak under error conditions), low (theoretical race in rarely-exercised path).
49
- - **Evidence level**: observed fact / strong inference / open question.
49
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
50
50
 
51
51
  ## What to skip
52
52
 
@@ -54,7 +54,7 @@ For each finding, record:
54
54
  - **Defect**: what security property is violated.
55
55
  - **Evidence**: the specific code path, missing check, or exposed secret.
56
56
  - **Severity**: critical (actively exploitable, data exposure, auth bypass), high (exploitable with some effort or preconditions), medium (defense-in-depth gap, hardcoded non-production secret), low (missing header, informational disclosure).
57
- - **Evidence level**: observed fact / strong inference / open question.
57
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
58
58
 
59
59
  ## What to skip
60
60
 
@@ -47,9 +47,10 @@ For each finding, record:
47
47
  - **Location**: file path and function/method name.
48
48
  - **Defect**: what contract is violated and how.
49
49
  - **Spec source**: where the expected behavior is documented (docstring, type signature, contracts phase, protocols phase, README).
50
+ - **Which side implements the contract**: the analyzed code is often the *caller* of a contract another system implements (an HTTP API, an inference engine, a driver). A divergence between what this code sends and what the other side documents is only an `observed fact` about this code; what the other side actually does with it — accepts, ignores, rejects — is an `external-behavior claim` until a runtime probe against the pinned version says otherwise, and its action is `verify at runtime`, never `fix before porting`.
50
51
  - **Evidence**: the specific divergence between spec and implementation.
51
52
  - **Severity**: critical (public API returns wrong results), high (documented behavior incorrect in edge cases), medium (internal API inconsistency), low (stale docs, minor parameter mismatch).
52
- - **Evidence level**: observed fact / strong inference / open question.
53
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
53
54
 
54
55
  ## What to skip
55
56
 
@@ -50,7 +50,7 @@ For each finding, record:
50
50
  - **Defect**: what configuration or environment hazard exists.
51
51
  - **Evidence**: the specific hardcoded value, missing validation, or dangerous default.
52
52
  - **Severity**: critical (security exposure in default config, data loss on misconfiguration), high (production failure from missing validation), medium (hardcoded value that will break in a different environment), low (undocumented config behavior).
53
- - **Evidence level**: observed fact / strong inference / open question.
53
+ - **Evidence level**: observed fact / strong inference / external-behavior claim / open question. A claim about what another system does with this code's output (a server, engine, driver, third-party API, OS) is an `external-behavior claim`, not a `strong inference` — see findings/defect-scan/SKILL.md §Evidence Classification.
54
54
 
55
55
  ## What to skip
56
56
 
@@ -39,9 +39,10 @@ Use the architecture map to decide emphasis:
39
39
 
40
40
  Use the same scheme as the legacy defect-scan SKILL:
41
41
 
42
- - **Evidence levels:** `observed fact`, `strong inference`, `open question`.
42
+ - **Evidence levels:** `observed fact`, `strong inference`, `external-behavior claim`, `open question`.
43
43
  - **Severity:** `critical`, `high`, `medium`, `low`.
44
- - **Action (pre-porting pipelines):** `fix before porting`, `port differently`, `leave behind`.
44
+ - **Action (pre-porting pipelines):** `fix before porting`, `port differently`, `leave behind`, `verify at runtime`.
45
+ - **Pairing rule:** `open question` or `external-behavior claim` evidence takes `verify at runtime` or `port differently`, never `fix before porting`, and the finding also appears in the report's Open Questions table. Validation checks this on the findings tables.
45
46
 
46
47
  See `findings/defect-scan/SKILL.md` for the full criteria; this phase intentionally does not duplicate them.
47
48
 
@@ -47,6 +47,8 @@ When citing a contract or protocol violation, include the contract ID or state-m
47
47
 
48
48
  Read the `carry_forward` entries in `workflow/status.yaml` whose `target_phase` is `defect-scan-semantic`. The mechanical phase may have routed semantic-flavored sightings here for closure.
49
49
 
50
+ **Closing a routed item does not settle the question it came from.** Before closing a carry-forward, check whether it derives from an `open_questions` entry of `kind: needs-runtime-test` that is still unresolved — the mechanical phase typically registers the question and routes one of its candidate explanations onward in the same handoff. If the question stands, the finding that addresses the carry-forward inherits its uncertainty: evidence `external-behavior claim` or `open question`, action `verify at runtime`, and a row in this report's Open Questions table naming the question's id. Asserting one of the question's candidates as `strong inference` / `fix before porting` while the question remains open is the contradiction this rule exists to prevent — a real run did exactly that, and runtime testing inverted the finding. Only runtime evidence (or the external system's own source at the pinned version) closes such a question; when you have it, list the question in `open_question_closures` and cite the evidence in the finding.
51
+
50
52
  ## Output
51
53
 
52
54
  Write findings to the primary output using `templates/semantic-defects.md`. Organize by pass, then by severity within each pass. End with a summary table covering only passes 3, 4, and 5.
@@ -19,6 +19,7 @@ Keep four classes of findings separate throughout:
19
19
  - `observed fact`: direct statements from docs, tests, schemas, types, and code.
20
20
  - `strong inference`: architectural conclusions drawn from multiple facts.
21
21
  - `portability hazard`: assumptions tied to the source language, runtime, terminal, OS, or third-party SDKs.
22
+ - `external-behavior claim`: a claim about what a system outside this source tree does (a server, engine, driver, third-party API, OS) — unverifiable at any read depth here; carry it forward as unsettled, never promote it to a fact.
22
23
  - `open question`: missing or conflicting behavior that still needs evidence.
23
24
 
24
25
  Prefer concept names over source names:
@@ -39,7 +40,7 @@ Sort features by porting importance:
39
40
 
40
41
  If the defect report is available, integrate defect findings into the porting bundle:
41
42
  - Reference relevant defects in the feature contract table.
42
- - Tag each referenced defect with a porting recommendation: `fix before porting` (the defect would carry into a new implementation), `port differently` (the new implementation should handle this case differently by design), or `leave behind` (the defect is specific to the source implementation and won't survive porting).
43
+ - Tag each referenced defect with a porting recommendation: `fix before porting` (the defect would carry into a new implementation), `port differently` (the new implementation should handle this case differently by design), `leave behind` (the defect is specific to the source implementation and won't survive porting), or `verify at runtime` (the diagnosis is an `external-behavior claim` or `open question` — carry it as a spike for the spec, and do not design around an unverified diagnosis). Preserve `verify at runtime` as written: flattening it into one of the settled three is how a hedge stops traveling.
43
44
  - Consolidate defect-related portability hazards alongside hazards from other phases.
44
45
 
45
46
  Use the output template at `templates/reverse-engineering-bundle.md`. Produce: