crysk 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +27 -23
  2. package/dist/SKILL-1q3658n0.md +74 -0
  3. package/dist/SKILL-25j4q9b8.md +143 -0
  4. package/dist/SKILL-4747bhne.md +143 -0
  5. package/dist/SKILL-4jc3sv23.md +74 -0
  6. package/dist/SKILL-c0492rch.md +540 -0
  7. package/dist/SKILL-d1nzkhhr.md +74 -0
  8. package/dist/SKILL-f8p7kvx0.md +143 -0
  9. package/dist/SKILL-gxd45g38.md +553 -0
  10. package/dist/SKILL-rec41991.md +66 -0
  11. package/dist/SKILL-zze8zj5g.md +536 -0
  12. package/dist/cli.js +24658 -24654
  13. package/dist/index.js +492 -463
  14. package/dist/opencode-ci-qrcv7a99.md +106 -0
  15. package/dist/opencode-ci-rdpcc7xc.md +106 -0
  16. package/dist/opencode-ci-yt0k74t0.md +106 -0
  17. package/dist/workflow-andv2dvm.yml +158 -0
  18. package/package.json +1 -1
  19. package/prompts/default/PROVENANCE.md +1 -0
  20. package/skills/crysk/SKILL.md +6 -6
  21. package/skills/crysk-ci-setup/SKILL.md +32 -33
  22. package/skills/crysk-ci-setup/assets/workflow.yml +5 -10
  23. package/skills/crysk-ci-setup/references/ci-admission.md +5 -5
  24. package/skills/crysk-ci-setup/references/opencode-ci.md +6 -6
  25. package/skills/crysk-loop/SKILL.md +37 -54
  26. package/skills/crysk-pr/SKILL.md +1 -1
  27. package/src/asset-manifest.ts +0 -6
  28. package/src/assets.ts +1 -4
  29. package/src/brand.ts +20 -30
  30. package/src/ci/gates.ts +155 -201
  31. package/src/ci/outcome.ts +4 -31
  32. package/src/ci/platform-limits.ts +135 -0
  33. package/src/ci/platform-report.ts +212 -126
  34. package/src/ci/platform.ts +28 -26
  35. package/src/ci/reporter.ts +25 -26
  36. package/src/ci/review-admission.ts +1 -2
  37. package/src/ci/review-levels.ts +12 -53
  38. package/src/ci/setup.ts +96 -66
  39. package/src/ci/trace-bundle.ts +11 -27
  40. package/src/ci/trace-transcripts.ts +4 -6
  41. package/src/ci/trigger.ts +3 -5
  42. package/src/cli.ts +6 -5
  43. package/src/commands/ci-setup-questions.ts +2 -55
  44. package/src/commands/ci-setup.ts +2 -26
  45. package/src/commands/triage.ts +131 -38
  46. package/src/commands/usage.ts +0 -1
  47. package/src/compare/compare.ts +3 -3
  48. package/src/compare/floor-test.ts +30 -201
  49. package/src/config/config.ts +6 -30
  50. package/src/diversity/accounting.ts +0 -26
  51. package/src/diversity/benchmark.ts +1 -17
  52. package/src/diversity/identity.ts +0 -14
  53. package/src/diversity/pipeline-integration.ts +0 -29
  54. package/src/doctor.ts +3 -6
  55. package/src/execution/claude-session-trace.ts +7 -2
  56. package/src/execution/contracts.ts +15 -9
  57. package/src/execution/harness.ts +165 -187
  58. package/src/execution/spend-limiter.ts +39 -131
  59. package/src/execution/usage-facts.ts +397 -0
  60. package/src/execution/usage-normalized.ts +33 -86
  61. package/src/harness/materiality-judge.ts +0 -5
  62. package/src/harness/pipeline-plan.ts +0 -3
  63. package/src/harness/replay-rows.ts +0 -5
  64. package/src/harness/route-runner.ts +2 -2
  65. package/src/harness/single-step.ts +3 -9
  66. package/src/index.ts +1 -1
  67. package/src/mcp/preflight.ts +2 -2
  68. package/src/model/catalog.ts +1 -3
  69. package/src/model/free-discovery.ts +11 -78
  70. package/src/model/model-name.ts +14 -4
  71. package/src/model/profiles/claude.ts +1 -2
  72. package/src/model/profiles/openai.ts +1 -2
  73. package/src/model/profiles.ts +1 -2
  74. package/src/model/provider-capabilities.ts +16 -55
  75. package/src/model/routing.ts +39 -36
  76. package/src/pr/admission.ts +6 -6
  77. package/src/pr/answered-findings.ts +8 -4
  78. package/src/pr/ci-publish.ts +0 -2
  79. package/src/pr/discovery.ts +4 -25
  80. package/src/pr/plan.ts +40 -121
  81. package/src/pr/pr-status.ts +14 -2
  82. package/src/pr/preflight.ts +15 -12
  83. package/src/pr/publish-outcome.ts +1 -19
  84. package/src/pr/review-pr.ts +10 -47
  85. package/src/pr/target.ts +76 -82
  86. package/src/production-runtime.ts +52 -114
  87. package/src/progress.ts +0 -54
  88. package/src/rereview/prepare.ts +4 -1
  89. package/src/rereview/state.ts +1 -1
  90. package/src/review/boundary.ts +4 -8
  91. package/src/review/drafts.ts +3 -3
  92. package/src/review/findings-conformance.ts +1 -1
  93. package/src/review/findings.ts +0 -4
  94. package/src/review/pipeline.ts +57 -395
  95. package/src/review/preflight.ts +162 -201
  96. package/src/review/prompt-set.ts +0 -2
  97. package/src/review/report.ts +2 -162
  98. package/src/review/review.ts +16 -65
  99. package/src/review/route-preflight.ts +3 -35
  100. package/src/review/run.ts +37 -73
  101. package/src/review/size-gate.ts +3 -3
  102. package/src/review/spec.ts +6 -11
  103. package/src/review/step-runner.ts +4 -4
  104. package/src/runner-authority.ts +10 -9
  105. package/src/security/credential-broker.ts +5 -6
  106. package/src/server/preflight.ts +0 -1
  107. package/src/server/server.ts +17 -6
  108. package/src/store/activity.ts +1 -2
  109. package/src/store/backfill-preflight.ts +0 -3
  110. package/src/store/backfill.ts +0 -1
  111. package/src/store/metrics-preflight.ts +4 -14
  112. package/src/store/metrics.ts +5 -5
  113. package/src/store/preflight.ts +0 -13
  114. package/src/store/store.ts +11 -12
  115. package/src/transport-registry.ts +6 -30
  116. package/src/transports/claude-code-cli.ts +149 -215
  117. package/src/transports/opencode-client.ts +4 -24
  118. package/src/transports/opencode-sdk.ts +17 -112
  119. package/src/triage/plain-reply.ts +37 -0
  120. package/src/ui/activity.ts +1 -6
  121. package/src/ui/config-edit.ts +14 -67
  122. package/src/ui/config.ts +3 -8
  123. package/src/ui/plan.ts +11 -198
  124. package/src/ui/progress.ts +3 -49
  125. package/src/ui/result.ts +18 -77
  126. package/src/ui/review-menu.ts +3 -12
  127. package/src/ui/select.ts +9 -79
  128. package/src/updater.ts +1 -1
  129. package/src/usage.ts +1 -7
  130. package/prompts/default/deep-review-parity.md +0 -152
  131. package/prompts/scout.md +0 -140
  132. package/src/ci/platform-estimate.ts +0 -111
  133. package/src/review/scout.ts +0 -323
@@ -18,7 +18,6 @@ import { wrapBlock } from "./boundary";
18
18
  export const AGENT_NAMES = [
19
19
  "deep-review-reliability",
20
20
  "deep-review-resilience",
21
- "deep-review-parity",
22
21
  "review-refuter",
23
22
  ] as const;
24
23
 
@@ -28,7 +27,6 @@ export const AGENT_NAMES = [
28
27
  // (model-profiles S4).
29
28
  export const ENGINE_PROMPT_FILES = [
30
29
  "consolidate.md",
31
- "scout.md",
32
30
  "summarizer.md",
33
31
  "materiality.md",
34
32
  "verifier.md",
@@ -1,13 +1,11 @@
1
1
  // The human-facing half of local mode (ROADMAP B0): a pure renderer that
2
- // turns a findings document into the markdown a developer actually reads, and
3
- // a pure cost estimator that runs BEFORE the money is spent.
2
+ // turns a findings document into the markdown a developer actually reads.
4
3
  //
5
4
  // Pure on purpose — no I/O, no git, no clock. The CLI owns every side effect,
6
5
  // so the report can be re-rendered from an artifact on disk months later and
7
6
  // come out byte-identical (the lab already replays old findings.json files;
8
7
  // a renderer that reached for `new Date()` would make that a lie).
9
8
 
10
- import type { PlatformEstimateBasis } from "#ci/platform-estimate";
11
9
  import { listPaths } from "#git/refs";
12
10
  import type { ResolvedRoutePlan, ResolvedStepRoute } from "#model/routing";
13
11
  import type { PostMinSeverity } from "#pr/post-floor";
@@ -51,133 +49,6 @@ export interface DiffStat {
51
49
  deletions: number;
52
50
  }
53
51
 
54
- export interface CostEstimate {
55
- low: number;
56
- high: number;
57
- // Plain-language statement of how coarse this is, meant to be printed next
58
- // to the numbers so nobody reads the band as a quote.
59
- basis: string;
60
- // Set when the range is the Crysk platform's estimate, not this band: what
61
- // the platform priced it from (src/ci/platform-estimate.ts).
62
- platform?: PlatformEstimateBasis;
63
- }
64
-
65
- // Per-hunter marginal cost, fitted to the measured runs (see BAND below).
66
- // Deliberately three transparent coefficients instead of a regression: with
67
- // this few calibration points anything fancier is false precision.
68
- //
69
- // The base is the load-bearing coefficient, recalibrated 2026-08-11 from
70
- // 0.5 to 1.2: a hunter's floor is reading the TREE and the prompt
71
- // machinery, nearly independent of a small diff. The proof was two PR-mode
72
- // runs of the same 7-file / +21 −8 tree billing $4.74 and $3.92 against a
73
- // $1.19–$2.39 band — both ~2x above the top, the exact under-estimate
74
- // failure this band exists to prevent.
75
- const USD_PER_AGENT_BASE = 1.2;
76
- const USD_PER_CHANGED_LINE = 0.00021;
77
- const USD_PER_FILE = 0.008;
78
-
79
- // Skewed on purpose. Every recorded overrun was an UNDER-estimate, never
80
- // over, so the upper arm is the wider one: a band that is too generous costs
81
- // a second of hesitation, a band that is too tight costs real money.
82
- const BAND_LOW = 0.65;
83
- const BAND_HIGH = 1.4;
84
-
85
- // WHY this function exists at all: the ROADMAP logs two cost overruns in a
86
- // row — "~$21" against an actual bill, and "~$34" against an actual $48.30 —
87
- // and both had the same cause. The estimate was carried over from the
88
- // PREVIOUS arm instead of being computed from the tree about to be reviewed.
89
- // So this estimates from the diff, and only from the diff.
90
- //
91
- // Calibration points, all measured on real runs of the current engine:
92
- // - PR 1682's tree (7 files / +21 −8, 3 hunters + refuter) billed $4.74
93
- // and $3.92 across two runs — the per-agent floor evidence;
94
- // - a 45-file / +2775 −1237 tree with 5 hunters + refuter billed ~$14.78,
95
- // and the same tree was recorded at ~$11/run elsewhere in the campaign;
96
- // - the first B0 local run (5 files / +484, 4 hunters + refuter), $3.68.
97
- // A legacy "~$2.61 small tree" point from before PR mode existed was
98
- // RETIRED by the 1682 evidence: two same-engine runs of a comparable tree
99
- // both landed far above it, and a calibration point the instrument itself
100
- // contradicts is decoration. The ~$11 vs ~$14.78 spread on ONE tree is the
101
- // whole argument for returning a band: the same diff, the same agents, a
102
- // 34% swing. A point estimate here would be a fiction with a decimal point.
103
- //
104
- // The refuter is not a separate term: its cost rides in the coefficients,
105
- // because every calibration run had the refuter leg included and a
106
- // refuter's size tracks how much the hunters found, which tracks diff size.
107
- export function estimateCost(
108
- diffStat: DiffStat,
109
- hunterCount: number,
110
- summarizerEnabled = false,
111
- // ROADMAP-DOORDASH M5. Defaulted OFF so every existing caller keeps its
112
- // band byte-identical, and so a caller that forgets it under-quotes
113
- // nothing it did not already under-quote.
114
- scoutEnabled = false,
115
- // Item 7 O-5a. Default 0 so every existing caller keeps its band
116
- // byte-identical. Priced as its own term (not folded into `agents`) so a
117
- // 40-finding re-review of a 2-file delta is not billed as 40 hunters.
118
- verificationSteps = 0,
119
- // The post-refuter consolidation pass. LAST and defaulted OFF so every
120
- // existing call shape compiles and keeps its band; the product paths pass
121
- // true. One seat, the scout's rule: a claims-only sonnet call costs far
122
- // less than a hunter, and over-quoting is the cheap direction to be wrong.
123
- consolidateEnabled = false,
124
- ): CostEstimate {
125
- const files = Math.max(0, diffStat.files);
126
- const lines =
127
- Math.max(0, diffStat.insertions) + Math.max(0, diffStat.deletions);
128
- // A validated ReviewSpec always carries at least one hunter, so a zero here
129
- // means a caller asked hypothetically. Clamping keeps the band from
130
- // collapsing to $0–$0, which would read as "this is free".
131
- // The scout takes a full agent seat, the summarizer's precedent, and that
132
- // deliberately OVER-quotes: it is diff-only, one attempt, and reads no tree,
133
- // so its true cost is a fraction of a hunter's. Two reasons it gets the seat
134
- // anyway. First, this band's own rule — every recorded overrun was an
135
- // UNDER-estimate, so the generous direction is the cheap one to be wrong in.
136
- // Second, the scout has NO calibration point of its own: M4 billed $37.00
137
- // across six prompt versions, two probe defects and a reverted experiment,
138
- // which is a milestone total and not a per-spawn cost. M6 records cost per
139
- // arm; that is the number this coefficient gets recalibrated from, and until
140
- // it exists an invented per-scout coefficient would be false precision.
141
- const hunterSeats = Math.max(
142
- 0,
143
- hunterCount +
144
- (summarizerEnabled ? 1 : 0) +
145
- (scoutEnabled ? 1 : 0) +
146
- (consolidateEnabled ? 1 : 0),
147
- );
148
- const steps = Math.max(0, verificationSteps);
149
- // A zero-hunter, zero-verify call still needs a band (the hypothetical
150
- // floor). A skip-discovery re-review with N verify steps must NOT inherit
151
- // that floor — that would bill a phantom hunter on top of verification.
152
- const agents = hunterSeats === 0 && steps === 0 ? 1 : hunterSeats;
153
- // Verification is its OWN term (item 7 O-5a), not folded into `agents`:
154
- // a verify step reads one prior finding, not the whole tree, so multiplying
155
- // it by changed-files would price a 40-finding re-review of a 2-file delta
156
- // as if it were 40 hunters. The seat is the same per-agent floor — generous
157
- // on purpose, same direction as the scout.
158
- const mid =
159
- agents *
160
- (USD_PER_AGENT_BASE +
161
- USD_PER_CHANGED_LINE * lines +
162
- USD_PER_FILE * files) +
163
- steps * USD_PER_AGENT_BASE;
164
- return {
165
- low: round2(mid * BAND_LOW),
166
- high: round2(mid * BAND_HIGH),
167
- basis:
168
- "coarse band from measured runs (a 7-file / +21 −8 tree with 3 " +
169
- "hunters + refuter, $3.92–$4.74 across two runs; a 45-file / " +
170
- "+2775 −1237 tree with 5 hunters + refuter, ~$11–$14.78): a " +
171
- "per-agent floor for hunters + refuter" +
172
- `${summarizerEnabled ? " + summarizer" : ""}` +
173
- `${scoutEnabled ? " + scout" : ""}` +
174
- `${consolidateEnabled ? " + consolidation" : ""}` +
175
- `${steps > 0 ? ` + ${steps} verification step(s)` : ""} ` +
176
- "plus changed lines and files. An order-of-magnitude " +
177
- "guide, not a quote — the same tree has billed 34% apart across runs.",
178
- };
179
- }
180
-
181
52
  export interface ReportMeta {
182
53
  repo: string;
183
54
  base: string;
@@ -190,15 +61,6 @@ export interface ReportMeta {
190
61
  // Paths the exclusion filter dropped from the reviewed diff, if any. Stated
191
62
  // in the report because it is a mutation of the input, not a detail.
192
63
  excludedPaths?: string[];
193
- // CASH, and only cash — §8's "Budget enforcement uses cash only". A Claude
194
- // subscription route reports a truthful $0.00 here.
195
- costUsd: number;
196
- // #173 (§8: "Artifacts and reports show cash and notional totals
197
- // separately"). The list-basis figure the run was NOT charged. Absent means
198
- // no segment at all, never a `$0.00` one — a runner that reported no
199
- // normalized usage has no list figure, and printing one it never produced
200
- // is the fabrication the usage slice exists to prevent.
201
- notionalUsd?: number;
202
64
  wallMs: number;
203
65
  // S4: the mode the commit status is set under, which the closing note names.
204
66
  // Absent means advisory: a local run, and any caller that never passes it,
@@ -1596,17 +1458,9 @@ export function blobUrl(
1596
1458
 
1597
1459
  function runLines(doc: FindingsDocument, meta: ReportMeta): string[] {
1598
1460
  const { files, insertions, deletions } = meta.diffStat;
1599
- // #173: cash first and unqualified, notional after it and never without its
1600
- // basis spelled out — §8 allows notional in a report "only when clearly
1601
- // labelled", and two bare dollar figures side by side is precisely the
1602
- // mixing it forbids.
1603
- const notional =
1604
- meta.notionalUsd === undefined
1605
- ? ""
1606
- : ` (${usd(meta.notionalUsd)} at list price, not charged)`;
1607
1461
  const lines = [
1608
1462
  `${files} file${files === 1 ? "" : "s"}, +${insertions} −${deletions}` +
1609
- ` · run ${doc.run_status} · ${usd(meta.costUsd)}${notional} · ${duration(meta.wallMs)}`,
1463
+ ` · run ${doc.run_status} · ${duration(meta.wallMs)}`,
1610
1464
  ];
1611
1465
  const excluded = meta.excludedPaths ?? [];
1612
1466
  if (excluded.length > 0) {
@@ -1625,12 +1479,6 @@ function runLines(doc: FindingsDocument, meta: ReportMeta): string[] {
1625
1479
  `Agents: ${rows.map((r) => `${r.key} ${r.status}`).join(" · ")}`,
1626
1480
  );
1627
1481
  }
1628
- if (!doc.parity_hunter_fired) {
1629
- lines.push("");
1630
- lines.push(
1631
- "The parity hunter did not fire: no changed path matched its trigger.",
1632
- );
1633
- }
1634
1482
  return lines;
1635
1483
  }
1636
1484
 
@@ -1838,10 +1686,6 @@ function oneLine(text: string): string {
1838
1686
  return publishedText(text.replace(/\s+/g, " ").trim());
1839
1687
  }
1840
1688
 
1841
- function usd(amount: number): string {
1842
- return `$${amount.toFixed(2)}`;
1843
- }
1844
-
1845
1689
  // Elapsed time as the compact `3m12s` the CLI's live progress prefixes onto
1846
1690
  // every event line. Floor, never round: 59.9s read as "60s" would tick the
1847
1691
  // minute early. Minutes deliberately never roll into hours — a review past
@@ -1864,10 +1708,6 @@ function duration(ms: number): string {
1864
1708
  : `${minutes}m ${String(seconds).padStart(2, "0")}s`;
1865
1709
  }
1866
1710
 
1867
- function round2(value: number): number {
1868
- return Math.round(value * 100) / 100;
1869
- }
1870
-
1871
1711
  // A step's route as the plan card shows it: the model name it resolved to,
1872
1712
  // which already says its backend (`claude:sonnet-latest`,
1873
1713
  // `opencode:openai/gpt-5`), and its `models` entry's effort when it sets one,
@@ -10,7 +10,6 @@ import os from "node:os";
10
10
  import path from "node:path";
11
11
  import {
12
12
  ingestReviewMetrics,
13
- notionalCostInput,
14
13
  persistCanonicalReview,
15
14
  pipelineConfigInput,
16
15
  } from "#config/config";
@@ -23,8 +22,6 @@ import {
23
22
  resolveRepoRoot,
24
23
  } from "#git/git";
25
24
  import { engineIdentity } from "#git/identity";
26
- import { countFreeRouteSteps } from "#model/free-discovery";
27
- import { planRoutes } from "#model/routing";
28
25
  import { reviewPr } from "#pr/review-pr";
29
26
  import { reviewExitCode } from "#review/exit-code";
30
27
  import type { Telemetry } from "#review/findings";
@@ -38,12 +35,10 @@ import {
38
35
  resolveMaxConcurrentSteps,
39
36
  resolveSharedPrefix,
40
37
  } from "#review/preflight";
41
- import { estimateCost } from "#review/report";
42
38
  import {
43
39
  isBundledAgentsDir,
44
40
  pipelineConsolidateInput,
45
41
  pipelineMaterialityInput,
46
- pipelineScoutInput,
47
42
  pipelineSummarizerInput,
48
43
  } from "#review/route-preflight";
49
44
  import {
@@ -54,7 +49,6 @@ import {
54
49
  loadRunConfig,
55
50
  NO_INSTRUCTIONS_NOTICE,
56
51
  prepareRunnerForRoute,
57
- resolveParityFires,
58
52
  resolvePipelineRoute,
59
53
  resolvePromptSet,
60
54
  resolveReviewInstructions,
@@ -78,7 +72,6 @@ import {
78
72
  import { log, styleEnabled } from "#ui/primitives";
79
73
  import { applySizeGate, confirm, startProgressRenderer } from "#ui/progress";
80
74
  import { renderResult } from "#ui/result";
81
- import { freeBillingMode } from "#ui/select";
82
75
  import { CliError } from "../errors";
83
76
  import { prheroLayout } from "../home-preflight";
84
77
  import { readLocalIgnoreRules } from "../ignore-read";
@@ -103,15 +96,13 @@ export async function review(options: CliOptions): Promise<number> {
103
96
  // Two layers since C5, folded by loadEffectiveConfig into the one
104
97
  // LocalConfig everything below already expected. The --config missing-file
105
98
  // error and the boundary rules live there.
106
- const { loaded, config, summary, scout, post, profile } = await loadRunConfig(
107
- {
108
- root: repoRoot,
109
- home: os.homedir(),
110
- configFlag: options.config,
111
- options,
112
- },
113
- );
114
- options = { ...options, scout, post };
99
+ const { loaded, config, summary, post, profile } = await loadRunConfig({
100
+ root: repoRoot,
101
+ home: os.homedir(),
102
+ configFlag: options.config,
103
+ options,
104
+ });
105
+ options = { ...options, post };
115
106
  // S5: the Claude credential this run uses, chosen once, here, from
116
107
  // `credentials.claude` and what is set. Every runner, binding and child below
117
108
  // reads its env, which holds that one credential and no other.
@@ -197,8 +188,8 @@ export async function review(options: CliOptions): Promise<number> {
197
188
  const { runDir, repoId } = await createRunDir(options, repoRoot, headSha);
198
189
  const diffPath = path.join(runDir, "diff.patch");
199
190
  // diffFromSha, never baseSha: see resolveDiffFrom. The numstat below uses
200
- // the same endpoint on purpose — a cost estimate computed over a wider range
201
- // than the one being reviewed is a bill that arrives from nowhere.
191
+ // the same endpoint on purpose — a stat computed over a wider range than
192
+ // the one being reviewed would describe a different review.
202
193
  const diff = await git(repoRoot, ["diff", `${diffFromSha}..${headSha}`]);
203
194
  if (!diff.ok) throw new CliError(`git diff failed: ${diff.stderr}`);
204
195
  if (diff.stdout.trim().length === 0) {
@@ -238,23 +229,9 @@ export async function review(options: CliOptions): Promise<number> {
238
229
  const codegraphAvailable = existsSync(path.join(repoRoot, ".codegraph"));
239
230
  await writeMcpConfig(mcpConfigPath, codegraphAvailable);
240
231
 
241
- // 11 — the plan. Triggers read the EFFECTIVE diff, the same bytes the
242
- // pipeline will read back from diff.patch: a conditional hunter must never
243
- // fire on a path no hunter was given.
244
- const parityFires = resolveParityFires(
245
- effectiveDiff.patch,
246
- config.parity_trigger_paths,
247
- );
248
- const activeHunters = selectActiveHunters(spec.agents, parityFires);
232
+ // 11 — the plan.
233
+ const activeHunters = selectActiveHunters(spec.agents);
249
234
  const hunterCount = activeHunters.length;
250
- const estimate = estimateCost(
251
- diffStat,
252
- hunterCount,
253
- summary.enabled,
254
- options.scout,
255
- 0,
256
- true,
257
- );
258
235
  const productionRoute = await resolvePipelineRoute({
259
236
  modelsConfigured: routingConfigured(config),
260
237
  workspaceRoot: repoRoot,
@@ -270,19 +247,6 @@ export async function review(options: CliOptions): Promise<number> {
270
247
  });
271
248
  const routePlan = productionRoute?.routePlan;
272
249
  const productionAdmission = productionRoute?.productionAdmission;
273
- // Read off the admission above, which already decided every free verdict:
274
- // this adds no probe. Absent without routing, so the band stays.
275
- const freeRoute =
276
- routePlan === undefined || productionAdmission === undefined
277
- ? undefined
278
- : await countFreeRouteSteps({
279
- steps: planRoutes(routePlan),
280
- probe: productionAdmission.freeModelProbe,
281
- // The CRYSK_OPENCODE_* names admission bound each route's kind with,
282
- // so the card counts free exactly the routes admission probed (U3).
283
- openCodeSecretNames:
284
- productionAdmission.authorityOptions.openCodeSecretNames,
285
- });
286
250
  // Named rather than inlined into renderPlan: the same context is what the
287
251
  // confirm menu's "Show details" renders, and building it twice would risk
288
252
  // the card and the details view disagreeing about the run they describe.
@@ -301,17 +265,13 @@ export async function review(options: CliOptions): Promise<number> {
301
265
  runDir,
302
266
  config,
303
267
  summary,
304
- parityFires,
305
268
  codegraphAvailable,
306
- estimate,
307
- hunterCount,
308
269
  // Evaluated above (step 9) and ENFORCED below at step 13, unchanged;
309
270
  // the plan only prints the verdict, last, where the decision is made.
310
271
  sizeGate,
311
272
  droppedPaths: effectiveDiff.droppedPaths,
312
273
  configProvenance: configProvenanceOf(loaded, agentsDirSource),
313
274
  ...(routePlan === undefined ? {} : { routePlan }),
314
- ...(freeRoute === undefined ? {} : { freeRoute }),
315
275
  };
316
276
  for (const line of renderPlan(planContext, styleEnabled())) log(line);
317
277
 
@@ -344,7 +304,7 @@ export async function review(options: CliOptions): Promise<number> {
344
304
  productionAdmission,
345
305
  });
346
306
 
347
- // 13 — the size gate, BEFORE the cost band's confirm() for the unattended
307
+ // 13 — the size gate, BEFORE the confirm prompt for the unattended
348
308
  // path. The watcher spawns with --yes, so a gate that lived only inside
349
309
  // that confirmation would never fire in the one place — unattended spend
350
310
  // — it exists to protect. An interactive TTY is offered Continue/Cancel
@@ -356,12 +316,8 @@ export async function review(options: CliOptions): Promise<number> {
356
316
  // without --pr), so the "don't post" option is not offered and the choice's
357
317
  // `post` field carries nothing local mode could act on.
358
318
  if (!options.yes) {
359
- const choice = await confirm(
360
- estimate.low,
361
- estimate.high,
362
- false,
363
- () => planDetails(planContext, styleEnabled()),
364
- freeRoute,
319
+ const choice = await confirm(false, () =>
320
+ planDetails(planContext, styleEnabled()),
365
321
  );
366
322
  if (choice.kind === "cancel") {
367
323
  log("aborted; nothing was spent.");
@@ -371,7 +327,7 @@ export async function review(options: CliOptions): Promise<number> {
371
327
 
372
328
  // 15 — run, with live progress: the expectation line up front, then one
373
329
  // stderr line per pipeline event (plus a TTY heartbeat between them).
374
- log(reviewingLine(hunterCount, summary, options));
330
+ log(reviewingLine(hunterCount, summary));
375
331
  const started = performance.now();
376
332
  const progress = startProgressRenderer(
377
333
  started,
@@ -440,11 +396,10 @@ export async function review(options: CliOptions): Promise<number> {
440
396
  mcpConfigPath,
441
397
  hopBudget: options.hopBudget,
442
398
  ...(options.model ? { model: options.model } : {}),
443
- parityTriggerPaths: config.parity_trigger_paths,
399
+ parityTriggerPaths: [],
444
400
  suspicionPriors: config.suspicion_priors,
445
401
  modelProfile: profile,
446
402
  ...pipelineSummarizerInput(summary, { profile }),
447
- ...pipelineScoutInput(options, { profile }),
448
403
  ...pipelineConsolidateInput({ profile }),
449
404
  ...pipelineMaterialityInput(config, { profile }),
450
405
  ...(prTitle === undefined ? {} : { prTitle }),
@@ -524,11 +479,7 @@ export async function review(options: CliOptions): Promise<number> {
524
479
  const links = await localResultLinks(repoRoot, headSha);
525
480
  for (const line of renderResult({
526
481
  doc,
527
- costUsd: result.usage.cost_usd_est,
528
- ...notionalCostInput(result),
529
- ...(freeRoute === undefined ? {} : { billing: freeBillingMode(freeRoute) }),
530
482
  wallMs,
531
- estimate: { low: estimate.low, high: estimate.high },
532
483
  runDir,
533
484
  artifacts: [path.basename(reportPath), path.basename(findingsPath)],
534
485
  ...(links === undefined ? {} : { links }),
@@ -88,8 +88,6 @@ export function enginePromptPath(
88
88
  switch (file) {
89
89
  case "consolidate.md":
90
90
  return assets.consolidatePromptPath;
91
- case "scout.md":
92
- return assets.scoutPromptPath;
93
91
  case "summarizer.md":
94
92
  return assets.summarizerPromptPath;
95
93
  case "materiality.md":
@@ -121,32 +119,7 @@ export function pipelineSummarizerInput(
121
119
  : {};
122
120
  }
123
121
 
124
- // The scout's prompt is ENGINE-owned and lives outside the agents dir, on
125
- // purpose and twice over (§3.7): a `review-scout.md` dropped in the agents dir
126
- // without a spec entry is a hard CliError, and a new prompt-set directory
127
- // holding byte-identical hunter files would be a new fingerprint — which is
128
- // exactly the one-variable property M6 needs to be true by construction rather
129
- // than argued. `prompts/` is the door the summarizer already walked through.
130
- export function pipelineScoutInput(
131
- options: Pick<CliOptions, "scout" | "scoutModel">,
132
- prompts: RunPromptOptions,
133
- ):
134
- | { scout: { promptPath: string; model?: string; bundled: true } }
135
- | Record<string, never> {
136
- return options.scout
137
- ? {
138
- scout: {
139
- promptPath: enginePromptPath("scout.md", prompts),
140
- ...(options.scoutModel === undefined
141
- ? {}
142
- : { model: options.scoutModel }),
143
- bundled: true,
144
- },
145
- }
146
- : {};
147
- }
148
-
149
- // The consolidation pass is ENGINE-owned like the scout, and on by default in
122
+ // The consolidation pass is ENGINE-owned like the summarizer, and on by default in
150
123
  // both product paths (local and PR/CI) with no flag: it was measured as a net
151
124
  // gain on the Martian 50 (lab bench/METRICS.md 2026-10-27), and a failed pass
152
125
  // falls back to the unconsolidated findings. The lab's direct `runPipeline`
@@ -217,10 +190,9 @@ export async function buildCliRoutePlan(params: {
217
190
  models?: ModelsConfig;
218
191
  summary: SummarySettings;
219
192
  summarizerEnabled?: boolean;
220
- scoutEnabled?: boolean;
221
193
  // Defaults ON, like the stage itself in both product paths; a re-review
222
- // that skips discovery passes false, the scout's condition, so the plan
223
- // never carries a route for a step that will not run.
194
+ // that skips discovery passes false, so the plan never carries a route for a
195
+ // step that will not run.
224
196
  consolidateEnabled?: boolean;
225
197
  // Defaults OFF, unlike consolidation: the gate is opt-in, and a judge key in
226
198
  // the plan changes its fingerprint, so absent must mean today's plan.
@@ -231,7 +203,6 @@ export async function buildCliRoutePlan(params: {
231
203
  profile: ModelProfile;
232
204
  }): Promise<ResolvedRoutePlan> {
233
205
  const summarizerEnabled = params.summarizerEnabled ?? params.summary.enabled;
234
- const scoutEnabled = params.scoutEnabled ?? params.options.scout;
235
206
  const consolidateEnabled = params.consolidateEnabled ?? true;
236
207
  // The root prompts are the engine's own (pipeline*Input marks them), so
237
208
  // their frontmatter is not read: the profile holds their seat (S3), the
@@ -246,9 +217,6 @@ export async function buildCliRoutePlan(params: {
246
217
  ...(summarizerEnabled
247
218
  ? { summarizer: { model: params.summary.model, bundled: true } }
248
219
  : {}),
249
- ...(scoutEnabled
250
- ? { scout: { model: params.options.scoutModel, bundled: true } }
251
- : {}),
252
220
  ...(consolidateEnabled ? { consolidate: { bundled: true } } : {}),
253
221
  ...(params.materialityEnabled === true
254
222
  ? { materiality: true as const }