@trazum/cli 1.80.0 → 1.81.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/dist/i18n/en.js CHANGED
@@ -3,8 +3,8 @@ const count = (value) => value.toLocaleString('en-US');
3
3
  /**
4
4
  * A grouped count and its noun, agreeing.
5
5
  *
6
- * `1 calls` and `1 prompts` were reachable on ordinary input — a one-call log, a
7
- * repository with a single prompt — and two messages in this file already did the
6
+ * `1 calls` and `1 prompts` were reachable on ordinary input, a one-call log, a
7
+ * repository with a single prompt, and two messages in this file already did the
8
8
  * agreement by hand while a dozen did not. A helper rather than a dozen ternaries,
9
9
  * so the next message written gets it for free.
10
10
  */
@@ -12,7 +12,7 @@ const plural = (value, one, many = `${one}s`) => `${count(value)} ${value === 1
12
12
  /** "(46 days ago)", or nothing when the age is unknown. */
13
13
  const ago = (days) => days === null ? '' : days === 0 ? ' (today)' : days === 1 ? ' (1 day ago)' : ` (${days} days ago)`;
14
14
  /**
15
- * English catalogue — the source of truth.
15
+ * English catalogue, the source of truth.
16
16
  *
17
17
  * When a message changes here, the other catalogues need the same change.
18
18
  * `test/i18n.test.js` in the core enforces the equivalent guarantee for the
@@ -21,7 +21,7 @@ const ago = (days) => days === null ? '' : days === 0 ? ' (today)' : days === 1
21
21
  export const en = {
22
22
  locale: 'en',
23
23
  numberLocale: 'en-US',
24
- help: (d, bold) => `${bold('trazum')} — cut the cost of your prompts without losing what they ask for.
24
+ help: (d, bold) => `${bold('trazum')}, cut the cost of your prompts without losing what they ask for.
25
25
 
26
26
  ${bold('USAGE')}
27
27
  trazum init [dir] [--dry-run | --yes]
@@ -83,7 +83,7 @@ ${bold('OPTIONS FOR init')}
83
83
  found, arithmetic first.
84
84
 
85
85
  It never invents a threshold. A budget is a policy, so init hands you the
86
- measured figure and leaves the limit to you — a generated config full of
86
+ measured figure and leaves the limit to you: a generated config full of
87
87
  guessed numbers is one nobody trusts.
88
88
 
89
89
  ${bold('OPTIONS FOR conform')}
@@ -91,7 +91,7 @@ ${bold('OPTIONS FOR conform')}
91
91
  detecting one: ${d.contracts.join(', ')}.
92
92
  --json The report as data.
93
93
 
94
- Answers two questions and keeps them apart. Does this document conform —
94
+ Answers two questions and keeps them apart. Does this document conform,
95
95
  required fields, present and the right type, exits 1 when not. And what can a
96
96
  valid document of this shape not answer, with the field that would unlock
97
97
  each.
@@ -102,7 +102,7 @@ ${bold('OPTIONS FOR conform')}
102
102
  ${bold('OPTIONS FOR rollup')}
103
103
  --json The roll-up document as data. See docs/format.md.
104
104
  --html-out <file> Also write the roll-up as one self-contained HTML
105
- file — the team-facing report, for whoever pays
105
+ file, the team-facing report, for whoever pays
106
106
  the bill. Each contributor's gaps stay under that
107
107
  contributor, and what no merge can measure is in
108
108
  the caveat block, impossible to crop.
@@ -110,13 +110,13 @@ ${bold('OPTIONS FOR rollup')}
110
110
  Several people's bills, one roll-up. Each contributor runs
111
111
  \`trazum profile --json\` where their traffic already is; this merges the
112
112
  documents. A format and a merge, not a service: nothing is uploaded and there
113
- is no account — the documents arrive however your team already moves files.
113
+ is no account: the documents arrive however your team already moves files.
114
114
 
115
115
  Most of the output is what the merge could not do. Each contributor's own
116
116
  gaps stay with that contributor rather than being averaged into one figure,
117
117
  the findings that need individual calls are named instead of dropped, and
118
118
  every roll-up of more than one document says that overlap between
119
- contributors is unmeasurable — two people exporting the same traffic double
119
+ contributors is unmeasurable: two people exporting the same traffic double
120
120
  the bill and no merge of summaries can see it.
121
121
 
122
122
  Exits 1 when a contribution was handed over and could not be merged.
@@ -139,11 +139,11 @@ ${bold('OPTIONS FOR switch')}
139
139
  Unlocks the line pricing that evaluation.
140
140
 
141
141
  The decision every what-if serves, priced: what this measured mix costs on
142
- the candidate, the saving with its sign stated, and — with a declared
143
- migration cost — the break-even as division on the measured past, days of
142
+ the candidate, the saving with its sign stated, and, with a declared
143
+ migration cost, the break-even as division on the measured past, days of
144
144
  window attached, never a forecast. The evaluation the switch requires is
145
145
  priced at this log's own mean call, two calls on the incumbent and one on
146
- the candidate per case. What it refuses: any sentence about quality — that
146
+ the candidate per case. What it refuses: any sentence about quality, that
147
147
  verdict belongs to trazum route, and the report ends by printing it.
148
148
 
149
149
  ${bold('OPTIONS FOR ownrate')}
@@ -152,7 +152,7 @@ ${bold('OPTIONS FOR ownrate')}
152
152
  --utilization <0-1> Fraction of the hour actually serving.
153
153
  Defaults to 1.
154
154
 
155
- Your self-hosted model's $/MTok, derived from your own two numbers —
155
+ Your self-hosted model's $/MTok, derived from your own two numbers,
156
156
  division, nothing else: no amortisation, no energy model, no guessed
157
157
  efficiency. Prints the figure and the pricing-overlay snippet to paste
158
158
  into trazum.config.json, so the model you run yourself becomes a
@@ -164,7 +164,7 @@ ${bold('OPTIONS FOR from-otel')}
164
164
  -o, --out <file> Write the usage log there instead of stdout.
165
165
 
166
166
  OpenTelemetry GenAI spans, read as a usage log: model, timestamp, label and
167
- the token counts from each gen_ai.* span — and nothing else. Prompt content
167
+ the token counts from each gen_ai.* span, and nothing else. Prompt content
168
168
  and trace ids stay in the span. OTel has no cache TTL split, so cache
169
169
  verdicts read "cannot tell" rather than a guessed one. Non-LLM spans are
170
170
  counted and skipped, said on stderr.
@@ -172,19 +172,19 @@ ${bold('OPTIONS FOR from-otel')}
172
172
  ${bold('OPTIONS FOR from-claude-code')}
173
173
  --label <name> Stamp every record with one label.
174
174
  --label-from-project Label each record with its transcript's project
175
- directory name, verbatim — map it to a workload
175
+ directory name, verbatim, map it to a workload
176
176
  name with the config's \`labels\` block.
177
177
  -o, --out <file> Write the usage log there instead of stdout.
178
178
 
179
179
  Claude Code's transcripts, read as a usage log: model, timestamp, session
180
- and the API's own usage object — the cache TTL split included — and
180
+ and the API's own usage object, the cache TTL split included, and
181
181
  nothing else. No message text, no paths, no branches cross the
182
182
  conversion. One API call is written as one line per content block, so
183
183
  lines are collapsed by request id; what was collapsed or passed over is
184
184
  said on stderr, never silently.
185
185
 
186
186
  ${bold('OPTIONS FOR position')}
187
- --html-out <file> The position as one self-contained page — the
187
+ --html-out <file> The position as one self-contained page, the
188
188
  same sentences the terminal prints, caveats
189
189
  first, for the person who does not run CLIs.
190
190
  --json The position document, contract-checked like
@@ -203,7 +203,7 @@ ${bold('OPTIONS FOR pulse')}
203
203
  --json The report as data.
204
204
 
205
205
  Did the things that are supposed to run, run? \`watch --once\` is built for a
206
- scheduler, and its state file is read by exactly one thing — the next cycle.
206
+ scheduler, and its state file is read by exactly one thing, the next cycle.
207
207
  So nothing could tell you the watcher had stopped, because the thing that
208
208
  would tell you was the thing that stopped.
209
209
 
@@ -211,8 +211,8 @@ ${bold('OPTIONS FOR pulse')}
211
211
  is your CI: a step running this on the schedule you already have turns a dead
212
212
  cron into a red build, without Trazum holding anybody's metrics.
213
213
 
214
- Never gates on a first run that never happened — that has no cadence to be
215
- late against — and never on how far the measurements reach, which is a
214
+ Never gates on a first run that never happened: that has no cadence to be
215
+ late against, and never on how far the measurements reach, which is a
216
216
  provider reporting on its own schedule rather than a job that failed.
217
217
 
218
218
  ${bold('OPTIONS FOR bench')}
@@ -227,7 +227,7 @@ ${bold('OPTIONS FOR bench')}
227
227
  --against: how much regression is too much is a
228
228
  policy, and this tool does not write yours.
229
229
  --json The measurements as data. The shape never changes
230
- with the gate flags — a verdict is the exit code
230
+ with the gate flags: a verdict is the exit code
231
231
  and sentences on stderr, the way check gates.
232
232
 
233
233
  Measures this machine: the standard workloads, one shot each, wall time and
@@ -261,7 +261,7 @@ ${bold('OPTIONS FOR feedback')}
261
261
  (none)
262
262
 
263
263
  Prints where to report a wrong optimisation, a bug, a question or a security
264
- problem — and a blank issue with the version, runtime and platform already
264
+ problem, and a blank issue with the version, runtime and platform already
265
265
  filled in, printed in full first so nothing travels you have not read.
266
266
 
267
267
  It sends nothing. Trazum has no telemetry: no ping, no install hook, no
@@ -270,17 +270,17 @@ ${bold('OPTIONS FOR feedback')}
270
270
 
271
271
  ${bold('OPTIONS FOR gateway')}
272
272
  --on-cannot-tell <policy> Required, no default: fail-open or fail-closed.
273
- What happens when the gateway cannot judge a call
274
- — no budget, nothing measured, an unpriced model.
273
+ What happens when the gateway cannot judge a call:
274
+ no budget, nothing measured, an unpriced model.
275
275
  --port <n> | --socket <p> Where to listen. Loopback only, always.
276
276
  --log <usage.jsonl> The usage log the limits policy is measured
277
- against, read once at start — same flag as
277
+ against, read once at start, same flag as
278
278
  serve's, same reason: label and session spend
279
279
  live in a usage log, not in the store.
280
280
 
281
281
  Stands between your SDK and the provider, speaking their wire format, so no
282
282
  code changes. Usage is measured from the provider's own response as it comes
283
- back — no export, no connector lag, no missing day.
283
+ back, no export, no connector lag, no missing day.
284
284
 
285
285
  It refuses and never substitutes: a call over budget gets HTTP 402 with the
286
286
  cheaper alternatives named. Substitution happens only where you wrote it down
@@ -297,7 +297,7 @@ ${bold('OPTIONS FOR experiment')}
297
297
  honoured.
298
298
 
299
299
  Judges recorded outcomes and cost together. Three-valued: A wins, B wins, or
300
- not separable — with the number of outcomes per arm that would settle it, so
300
+ not separable, with the number of outcomes per arm that would settle it, so
301
301
  "run it longer" is an instruction rather than a shrug. Nothing is promoted.
302
302
 
303
303
  ${bold('OPTIONS FOR quality')}
@@ -312,7 +312,7 @@ ${bold('OPTIONS FOR quality')}
312
312
 
313
313
  A before-and-after rather than an experiment, so it reports "cannot tell"
314
314
  whenever the model mix, the call volume or the outcome coverage moved across
315
- the boundary — the prompt is not the only variable and it says so.
315
+ the boundary: the prompt is not the only variable and it says so.
316
316
 
317
317
  ${bold('OPTIONS FOR semantic')}
318
318
  --yes Required to send anything. Without it the command
@@ -333,14 +333,14 @@ ${bold('OPTIONS FOR commitment')}
333
333
 
334
334
  Replays measured whole months against the deal's terms. Both directions are
335
335
  priced: the months that cleared the floor, and what the floor cost in the
336
- months that fell short — kept as its own figure, because netted into the
336
+ months that fell short, kept as its own figure, because netted into the
337
337
  saving it disappears. An as-if calculation about the past, never a forecast.
338
338
 
339
339
  ${bold('OPTIONS FOR report')}
340
340
  --year <yyyy> Required. Which year to assemble.
341
341
  --json The record as data.
342
342
 
343
- Everything comes from the store and the plans you already keep — nothing is
343
+ Everything comes from the store and the plans you already keep: nothing is
344
344
  computed that cannot be checked against a document that already exists.
345
345
  Months with no record are named rather than filled, promises are kept in
346
346
  three outcomes rather than two, and the report lists what it cannot say.
@@ -365,14 +365,14 @@ ${bold('OPTIONS FOR eval')}
365
365
  --concurrency <n> Calls in flight at once. Default: 3.
366
366
  --export promptfoo Write a promptfoo suite instead of running anything:
367
367
  both prompts, every case, no API key needed and no
368
- call made. The assertions are yours — this exists
368
+ call made. The assertions are yours: this exists
369
369
  for the question agreement cannot answer.
370
370
  -o, --out <file> Where to write it. Defaults to stdout.
371
371
 
372
372
  Runs both prompt versions over your cases and reports whether the
373
373
  optimisation changed the answers. Costs THREE provider calls per case: the
374
374
  original twice, to measure the model's own run-to-run variance, and the
375
- optimised once. That baseline is the yardstick — without it, a divergence
375
+ optimised once. That baseline is the yardstick, without it, a divergence
376
376
  figure means nothing. Exits with code 1 when the answers genuinely diverge.
377
377
 
378
378
  ${bold('OPTIONS FOR rank')}
@@ -434,7 +434,7 @@ ${bold('OPTIONS FOR optimize')}
434
434
  --all-labels With --from-log: every prompt in the config's
435
435
  "labels" map, optimised and priced against its
436
436
  own measured traffic, ranked by what the change
437
- is worth — plus the mismatches in both
437
+ is worth, plus the mismatches in both
438
438
  directions (mapped prompts with no traffic,
439
439
  traffic with no mapped prompt).
440
440
  --from-log <usage.jsonl> Measure the three figures above from a usage log
@@ -448,7 +448,7 @@ ${bold('OPTIONS FOR optimize')}
448
448
  --batch The work tolerates latency (Batch API, 50% off).
449
449
  --disable <id,id> Turn off specific rules (see "trazum rules").
450
450
  --suggest Ask the LLM for phrase-level rewrites and list them
451
- with what each saves. Changes nothing on its own —
451
+ with what each saves. Changes nothing on its own,
452
452
  every proposal is checked against your prompt first
453
453
  and dropped if it does not survive.
454
454
  --apply-suggestions Take them. Only with --suggest; alone it is an error
@@ -469,7 +469,7 @@ ${bold('OPTIONS FOR optimize')}
469
469
  --tokens-only Report the token saving and no money at all. The
470
470
  default inside Claude Code, Codex or Cursor, where
471
471
  a subscription means there is no bill to reduce.
472
- --cost Show the money even there — the host says where
472
+ --cost Show the money even there: the host says where
473
473
  Trazum runs, not where your prompt goes.
474
474
  --prompt <name> Which marked prompt to optimise, when a source file
475
475
  holds more than one. See "trazum where".
@@ -496,7 +496,7 @@ ${bold('OPTIONS FOR check')}
496
496
  --baseline Gate on the recorded cost baseline. On by default whenever
497
497
  the config declares one, so CI needs no argument; the useful
498
498
  spelling is --no-baseline, which skips it for one run.
499
- --files-from <file|-> Check only the files listed, one path per line — the shape
499
+ --files-from <file|-> Check only the files listed, one path per line, the shape
500
500
  git diff --name-only produces, so a pre-commit hook is one
501
501
  pipe: git diff --cached --name-only | trazum check --files-from -
502
502
  Non-prompt paths and deletions are dropped and counted out
@@ -509,7 +509,7 @@ ${bold('OPTIONS FOR check')}
509
509
 
510
510
  ${bold('OPTIONS FOR baseline')}
511
511
  Records what the prompts in a directory cost right now, to a file you commit.
512
- Then "check" fails the build when the repository drifts past it — the question
512
+ Then "check" fails the build when the repository drifts past it: the question
513
513
  budgets cannot answer, because a repository at 95% of every budget passes
514
514
  forever while a pull request adds four hundred tokens across a dozen files.
515
515
 
@@ -518,7 +518,7 @@ ${bold('OPTIONS FOR baseline')}
518
518
  --model, --calls, --output-tokens, --cache-hit-rate, --batch
519
519
  The scenario the monthly figure is recorded under. It is
520
520
  recorded so a later comparison can say whether the money is
521
- comparable — the gate itself is in tokens, so a repriced
521
+ comparable: the gate itself is in tokens, so a repriced
522
522
  model never fails a build on its own.
523
523
  --exact-tokens Exact counts (needs ANTHROPIC_API_KEY).
524
524
  --json Result as JSON.
@@ -527,7 +527,7 @@ ${bold('OPTIONS FOR baseline')}
527
527
  writing the thing you would fix the failure with is a loop.
528
528
 
529
529
  Given a directory it checks every prompt inside it against the "budgets"
530
- patterns in ${bold('trazum.config.json')} — one CI step for a whole repository of
530
+ patterns in ${bold('trazum.config.json')}: one CI step for a whole repository of
531
531
  prompts. A file no pattern covers is listed as unbudgeted rather than
532
532
  skipped quietly, and a run where nothing at all was budgeted is an error:
533
533
  "0 failures" from a check that measured nothing is the most misleading
@@ -537,7 +537,7 @@ ${bold('OPTIONS FOR ladder')}
537
537
  --since <when> Read only calls in this window. A UTC day
538
538
  --until <when> (2026-08-14), a full ISO 8601 timestamp, a
539
539
  relative window (7d, 24h) or "now". Calls with no
540
- "ts" cannot be placed and are left out — counted
540
+ "ts" cannot be placed and are left out, counted
541
541
  out loud, never dropped silently.
542
542
  --label <name> Judge one workload's ladder rather than the whole
543
543
  log. A label that matches nothing is an error
@@ -552,9 +552,9 @@ ${bold('OPTIONS FOR owners')}
552
552
  ${bold('OPTIONS FOR profile')}
553
553
  --against <log.jsonl> Compare this bill to a previous log. Positive
554
554
  means the bill grew; drivers are ranked by their
555
- contribution to the change. No period is assumed —
555
+ contribution to the change. No period is assumed,
556
556
  judge the call counts before judging the money.
557
- --label <name> Profile only the calls carrying this label — the
557
+ --label <name> Profile only the calls carrying this label, the
558
558
  drill-down once the full report named a suspect.
559
559
  A label that matches nothing is an error naming
560
560
  the labels that exist. With --against, both logs
@@ -568,16 +568,16 @@ ${bold('OPTIONS FOR profile')}
568
568
  an error, not a flag that silently gates nothing.
569
569
  --max-cache-loss-usd <n> Exit 1 when caching added more than n dollars to
570
570
  this bill. Reads the worst case when the log did
571
- not record the write TTL — a gate reading the
571
+ not record the write TTL: a gate reading the
572
572
  flattering half would pass the bills it exists
573
- to catch — and says which claim fired.
573
+ to catch, and says which claim fired.
574
574
  --max-day-usd <n> Fail when any single UTC day inside the log spent
575
575
  more than this. A month under budget can hide the
576
576
  afternoon a loop burned a quarter of it. A log
577
577
  with no timestamps fails: not measured is not
578
578
  under budget.
579
579
  --max-session-usd <n> Fail when any single conversation in the log
580
- cost more than this — the unit an agent product
580
+ cost more than this, the unit an agent product
581
581
  blows up in. A log with no sessions fails: not
582
582
  measured is not under budget.
583
583
  --since <when> Profile only calls at or after this moment. A UTC
@@ -585,22 +585,22 @@ ${bold('OPTIONS FOR profile')}
585
585
  relative window (7d, 24h) or "now";
586
586
  --until with a bare date includes that whole day.
587
587
  Calls with no "ts" cannot be placed and are left
588
- out — counted out loud, never dropped silently.
588
+ out, counted out loud, never dropped silently.
589
589
  With --against, both logs get the same window.
590
590
  --what-if <model> Price these exact calls on another model. The
591
- same token counts at a different rate card —
591
+ same token counts at a different rate card,
592
592
  multiplication, not advice, and it says so.
593
593
  Calls larger than that model's context window
594
594
  are named as impossible, not priced as cheap.
595
595
  --markdown-out <file> Also write the report as Markdown, for a CI job
596
596
  summary or a pull request comment.
597
597
  --html-out <file> Also write the report as one self-contained HTML
598
- file — the one to email to whoever pays the bill.
598
+ file, the one to email to whoever pays the bill.
599
599
  Same figures as --json, caveats rendered as
600
600
  prominently as the totals they qualify.
601
601
  --csv-shape <shape> Which table --csv-out writes: slice (default),
602
602
  day, hour, or model-day (one row per day and
603
- model — charts the mix moving). One row shape
603
+ model, charts the mix moving). One row shape
604
604
  per file, so nothing has to be filtered before
605
605
  it can be summed.
606
606
  --csv-out <file> Also write the report as CSV, one row per label
@@ -611,20 +611,20 @@ ${bold('OPTIONS FOR profile')}
611
611
  --pricing <file> Local price overlay, as everywhere else.
612
612
  --json The full report as data, including the levers.
613
613
 
614
- Takes a log file or a directory of them — rotated daily logs are read in
614
+ Takes a log file or a directory of them, rotated daily logs are read in
615
615
  name order as one bill, and how many were read is stated. Gzipped files
616
616
  (.jsonl.gz and the rest) are read too, because that is what a rotated log
617
617
  looks like a day later; one that will not decompress is an error naming the
618
618
  file, never a bill quietly missing a day.
619
619
 
620
620
  Reads what the provider actually charged. Optional fields unlock findings:
621
- "label" (which workload), "session" (which conversation — grouped by, never
621
+ "label" (which workload), "session" (which conversation, grouped by, never
622
622
  printed), "stop_reason"/"finish_reason" (answers cut off at max_tokens).
623
623
 
624
624
  ${bold('OPTIONS FOR plan')}
625
625
  --min-usd <n> Leave out actions worth less than n dollars. How
626
626
  many were left out is stated, never silent.
627
- -o, --out <file> Save the plan as dated JSON — the file
627
+ -o, --out <file> Save the plan as dated JSON: the file
628
628
  "trazum verify" will later hold it to.
629
629
  --markdown-out <file> Also write the plan as Markdown, for a CI job
630
630
  summary or a pull request comment.
@@ -633,8 +633,8 @@ ${bold('OPTIONS FOR plan')}
633
633
 
634
634
  Reads a usage log and turns the report's findings into a ranked plan: route
635
635
  this, batch that, fix the truncation pair, look at the cache. The money is
636
- composed correctly — route and batch on the same slice arrive combined,
637
- never summed — and every action names what the log cannot confirm, because
636
+ composed correctly, route and batch on the same slice arrive combined,
637
+ never summed, and every action names what the log cannot confirm, because
638
638
  a plan that hides its assumptions is advice pretending to be arithmetic.
639
639
  Projected savings and money already spent are separate totals throughout.
640
640
 
@@ -647,8 +647,8 @@ ${bold('OPTIONS FOR serve')}
647
647
  the store; without this, every ceiling in
648
648
  "limits" answers cannot-tell.
649
649
 
650
- Answers the two questions that matter at call time — what will this cost,
651
- and is there budget left — in single-digit milliseconds, so an agent or a
650
+ Answers the two questions that matter at call time, what will this cost,
651
+ and is there budget left, in single-digit milliseconds, so an agent or a
652
652
  wrapper can ask before it spends rather than reading a report afterwards.
653
653
 
654
654
  POST /cost with {"model": "...", "inputTokens": n, "outputTokens": n};
@@ -660,7 +660,7 @@ ${bold('OPTIONS FOR serve')}
660
660
  It listens on 127.0.0.1 and nowhere else, and there is no flag to change
661
661
  that: a cost oracle on a network interface holds a company's spend, its
662
662
  model mix and its budgets, and answers whoever asks. There is no auth for
663
- the same reason there is no --host — a token checked over loopback is
663
+ the same reason there is no --host: a token checked over loopback is
664
664
  theatre, and the honest posture is a surface small enough not to need one.
665
665
 
666
666
  With no store and no budget it still prices the call and says the budget
@@ -679,15 +679,15 @@ ${bold('OPTIONS FOR watch')}
679
679
  instead of the store.
680
680
  --json The cycle as data: crossings, abstentions, gap.
681
681
 
682
- Evaluates the spend gates from your config — maxUsd, maxDayUsd,
683
- maxCacheLossUsd — against what has been measured, and tells you the
682
+ Evaluates the spend gates from your config, maxUsd, maxDayUsd,
683
+ maxCacheLossUsd, against what has been measured, and tells you the
684
684
  afternoon it happens rather than three weeks later. Exits 1 when something
685
685
  crossed, so cron mails it and CI fails.
686
686
 
687
687
  An alert fires on a measured crossing and never on a projection: "you have
688
688
  spent $412 of a $400 budget" is a fact and "you will exceed" is a forecast,
689
689
  which this tool does not make at any window length. A day still being
690
- measured is reported as not yet judgeable rather than passed — but a day
690
+ measured is reported as not yet judgeable rather than passed, but a day
691
691
  already over budget fires whatever the hour, because it does not become less
692
692
  over budget at midnight.
693
693
 
@@ -706,8 +706,8 @@ ${bold('OPTIONS FOR store')}
706
706
 
707
707
  Says what the local store holds: how many measurements, over what span, per
708
708
  provider, and what a prune would take. The store keeps aggregates and
709
- billing fields — never prompt text, never completion text, never a
710
- credential — so it is a file a team can back up without a privacy review.
709
+ billing fields, never prompt text, never completion text, never a
710
+ credential, so it is a file a team can back up without a privacy review.
711
711
 
712
712
  Pruning is the one operation here that destroys something, so it refuses to
713
713
  run without a retention policy: set "store": {"keepDays": 90} in the config
@@ -722,7 +722,7 @@ ${bold('OPTIONS FOR connect')}
722
722
  variable the key would come from. Sends nothing
723
723
  and needs no credential.
724
724
  --payload <file> Price a usage payload you already have, instead of
725
- pulling one. No credential, no network — the same
725
+ pulling one. No credential, no network, the same
726
726
  arithmetic on the same shape.
727
727
  --store Keep what was pulled in the local store, so the
728
728
  next run does not download it again and "trazum
@@ -740,8 +740,8 @@ ${bold('OPTIONS FOR connect')}
740
740
 
741
741
  These APIs serve sums over a window, not one row per call, so a connected
742
742
  report is a restricted one and says so: the totals, the model split, the day
743
- series and the cache verdict are all available, and the per-call findings —
744
- input shapes, truncation retries, conversations, context pressure — are
743
+ series and the cache verdict are all available, and the per-call findings,
744
+ input shapes, truncation retries, conversations, context pressure, are
745
745
  listed as unavailable with what would unlock them. A rate limit, a page cap
746
746
  or an expired cursor returns what arrived with the gap named, never a total
747
747
  that quietly describes less traffic than you asked about.
@@ -750,15 +750,15 @@ ${bold('OPTIONS FOR history')}
750
750
  --store Build the series from the local store instead of
751
751
  a directory of stored reports. Bucketed sources
752
752
  carry no label, so the label series is absent and
753
- said to be — the model-share and cache-share
753
+ said to be: the model-share and cache-share
754
754
  series are what a series exists for, and both
755
755
  work.
756
756
  --markdown-out <file> Also write the series as Markdown, for a CI job
757
757
  summary or a pull request comment.
758
758
  --json The history as data.
759
759
 
760
- Takes a directory of stored reports — the --json documents profile already
761
- writes — plus any saved plans beside them, and builds the series no
760
+ Takes a directory of stored reports, the --json documents profile already
761
+ writes, plus any saved plans beside them, and builds the series no
762
762
  pairwise comparison can see: a workload climbing a little every period, a
763
763
  model share rising since a date, a cache share decaying slowly enough that
764
764
  no single week's report called it a finding, and the same action planned
@@ -770,7 +770,7 @@ ${bold('OPTIONS FOR verify')}
770
770
  --against <log|dir> The newer usage log the plan is held to. Required.
771
771
  --gate Exit 1 when an action did not produce what the
772
772
  plan promised, or its fields stopped being
773
- recorded — "not recorded" must not read as
773
+ recorded, "not recorded" must not read as
774
774
  "fixed". A vanished workload fails nothing.
775
775
  --markdown-out <file> Also write the verdicts as Markdown, for a CI
776
776
  job summary or a pull request comment.
@@ -778,7 +778,7 @@ ${bold('OPTIONS FOR verify')}
778
778
  --json The verification as data.
779
779
 
780
780
  Holds a saved plan to the log that came after it, with three outcomes and
781
- never two: the change arrived, it did not, or it cannot be told — because
781
+ never two: the change arrived, it did not, or it cannot be told, because
782
782
  the workload vanished, the fields the detection needs stopped being
783
783
  recorded, or tokens cannot say which tier billed them. Differences carry
784
784
  the world's measured movement (calls, output per call) from the plan's own
@@ -797,7 +797,7 @@ ${bold('OPTIONS FOR route')}
797
797
 
798
798
  Reads a usage log, finds the slice where routing to a cheaper model is worth
799
799
  the most, and measures whether that model still does the job. The same prompt
800
- goes to both, and the original runs twice per case — so the verdict is judged
800
+ goes to both, and the original runs twice per case, so the verdict is judged
801
801
  against that model's own variance rather than a threshold somebody picked.
802
802
 
803
803
  Costs three provider calls per case and needs TRAZUM_LLM_* configured.
@@ -824,7 +824,7 @@ ${bold('OPTIONS FOR diff')}
824
824
  is given: deciding that growth is unacceptable is your call, not ours.
825
825
 
826
826
  ${bold('trazum where')}
827
- Says which provider a file's prompts are actually sent to, and how it knows —
827
+ Says which provider a file's prompts are actually sent to, and how it knows,
828
828
  an SDK import, a base URL, a quoted model id, or "model=" on a trazum:prompt
829
829
  marker. Every answer names the line it came from.
830
830
 
@@ -836,7 +836,7 @@ ${bold('trazum where')}
836
836
  are all called through the OpenAI SDK with a different base_url, so treating
837
837
  that as a contradiction would refuse to price an ordinary client.
838
838
 
839
- With no file, it reports only which tool Trazum is running inside — and warns
839
+ With no file, it reports only which tool Trazum is running inside, and warns
840
840
  when that tool bills by subscription, because a monthly saving is arithmetic
841
841
  about tokens there, not money you get back.
842
842
 
@@ -848,14 +848,14 @@ ${bold('CONFIG FILE')}
848
848
  usage { model, callsPerMonth, avgOutputTokens, cacheHitRate, batchEligible }
849
849
  budgets { "prompts/**": 2000, "prompts/system.txt": 4000 }
850
850
  baseline { "path": "trazum.baseline.json", "maxGrowthTokens": 0, "maxGrowthPct": 5 }
851
- pricing "./prices.json" — local price corrections, see below
852
- labels { "support-rag": "prompts/support.txt" } — which prompt file each
851
+ pricing "./prices.json": local price corrections, see below
852
+ labels { "support-rag": "prompts/support.txt" }: which prompt file each
853
853
  usage-log label sends, so "trazum profile" can read the file and
854
854
  say why a failing cache fails
855
- spend { "maxUsd": 200, "byLabel": { "chat": 40 } } — money budgets for
855
+ spend { "maxUsd": 200, "byLabel": { "chat": 40 } }: money budgets for
856
856
  "trazum profile", in dollars. A budgeted label with no calls in
857
857
  the log is reported as not measured, never as a pass
858
- limits { "dayUsd": 25, "sessionUsd": 1.5, "byLabel": { "chat": 5 } } —
858
+ limits { "dayUsd": 25, "sessionUsd": 1.5, "byLabel": { "chat": 5 } }:
859
859
  the enforcement policy: USD ceilings judged before a call is
860
860
  made, at whichever door it arrives (the gateway's 402, "serve",
861
861
  spend_guard over MCP). Separate from "spend" because a report
@@ -864,17 +864,17 @@ ${bold('CONFIG FILE')}
864
864
  outage written as a policy
865
865
  owners { "patterns": { "payments": ["billing-*"] },
866
866
  "shared": { "search": { "payments": 0.6, "support": 0.4 } },
867
- "budgets": { "payments": 400 } } — whose budget each workload
867
+ "budgets": { "payments": 400 } }: whose budget each workload
868
868
  lands on. Spend matching no owner is its own line and is NEVER
869
869
  divided between the others; a shared split must sum to 1, and the
870
870
  rule travels with the report so the argument is about the rule
871
871
  ladders { "support": { "tiers": ["claude-haiku-4-5", "claude-opus-5"],
872
- "escalateOn": ["escalated"] } } — cheap model first, escalate a
872
+ "escalateOn": ["escalated"] } }: cheap model first, escalate a
873
873
  recorded failure to a dearer one. Both fields required.
874
874
  "trazum ladder <log>" prints the break-even escalation rate
875
875
  beside the measured one: an escalation pays twice, so above that
876
876
  rate the ladder costs more than never having built it
877
- outcomes { "values": ["resolved", "escalated"], "success": ["resolved"] } —
877
+ outcomes { "values": ["resolved", "escalated"], "success": ["resolved"] }:
878
878
  your own vocabulary for what happened, and which of it counts as
879
879
  a win. Both required: which words mean success is a judgement
880
880
  about your product rather than your bill, and this tool has no
@@ -882,27 +882,27 @@ ${bold('CONFIG FILE')}
882
882
  value in a log that "values" never declares is named as
883
883
  undeclared, never counted as a failure
884
884
  waive [{ "gate": "maxUsd", "reason": "August migration", "until":
885
- "2026-09-15" }] — a gate failure decided about, on the record.
885
+ "2026-09-15" }]: a gate failure decided about, on the record.
886
886
  All three fields required: a waiver with no end date is a
887
887
  finding deleted with extra steps. Waived failures still print,
888
888
  and the day the waiver expires the gate fails again
889
889
 
890
890
  Flags beat the config; the config beats the defaults. Budgets resolve to the
891
- most specific matching pattern — most literal characters wins. A boolean the
891
+ most specific matching pattern: most literal characters wins. A boolean the
892
892
  config switched on comes back off with --no-<flag>, e.g. --no-batch.
893
893
 
894
894
  ${bold('budgets')} is a ceiling; ${bold('baseline')} is a gate. One asks whether a file fits,
895
895
  the other whether the repository got worse than the commit somebody recorded
896
896
  with "trazum baseline". A repository at 95% of every budget passes forever
897
897
  while a pull request adds four hundred tokens across a dozen files. With
898
- baseline in the config, "check" on a directory reads it and gates on it — no
898
+ baseline in the config, "check" on a directory reads it and gates on it, no
899
899
  flag, because a gate you have to remember to pass an argument to runs in the
900
900
  author's terminal and not in CI. Thresholds are in tokens, never dollars: a
901
901
  repriced model would otherwise fail a build for a change nobody made.
902
902
 
903
903
  A config that will not validate is an error, including an unknown key. A
904
904
  lenient parser would silently restore defaults, and for a budget the default
905
- is "no budget" — a green build for a prompt nobody measured.
905
+ is "no budget", a green build for a prompt nobody measured.
906
906
 
907
907
  --config <file> Use this config instead of searching for one.
908
908
 
@@ -926,7 +926,7 @@ ${bold('PRICES')}
926
926
  --pricing-live Take prices from OpenRouter instead of the bundled
927
927
  table: today's figures for hundreds of models across
928
928
  dozens of providers. Opt-in, because it is a network
929
- call — the deterministic core never makes one.
929
+ call: the deterministic core never makes one.
930
930
  A --pricing file wins over this.
931
931
 
932
932
  What that source does not publish is whether a model
@@ -950,7 +950,7 @@ ${bold('OPTIONAL LLM')}
950
950
 
951
951
  ${bold('LANGUAGE')}
952
952
  The report language follows --locale, then TRAZUM_LOCALE, then LANG, and last
953
- the config file — so a project can set the language its CI logs read in
953
+ the config file, so a project can set the language its CI logs read in
954
954
  without overriding the language of whoever is at the keyboard. It changes the
955
955
  report only: the same prompt always optimises the same way.
956
956
 
@@ -970,7 +970,7 @@ ${bold('EXAMPLES')}
970
970
  used: (hits, misses) => `Suggestions: ${hits} from cache, ${misses} asked. Cached answers are what the model said last time; --clear-suggestion-cache to start over.`,
971
971
  },
972
972
  errors: {
973
- livePricingFailed: (url, detail) => `Could not load live prices from ${url}: ${detail}. The bundled prices are still there — drop --pricing-live to use them.`,
973
+ livePricingFailed: (url, detail) => `Could not load live prices from ${url}: ${detail}. The bundled prices are still there. Drop --pricing-live to use them.`,
974
974
  optionNeedsValue: (name) => `Option --${name} needs a value.`,
975
975
  mustBeNonNegative: (name, raw) => `--${name} must be a non-negative number (received: "${raw}").`,
976
976
  inputTooLarge: (source, size, limit) => `${source} is ${count(size)} characters, past the ${count(limit)}-character ceiling for a prompt. Raise it deliberately with --max-input <chars> if this input really is one.`,
@@ -978,11 +978,11 @@ ${bold('EXAMPLES')}
978
978
  fractionFlag: (name, raw) => `--${name} is a fraction between 0 and 1 (received: ${raw}). The config refuses the same value the same way.`,
979
979
  badLevel: (received) => `--level must be "safe" or "aggressive" (received: "${received}").`,
980
980
  allLabelsNeedsLog: () => '--all-labels ranks prompts by measured traffic, so it needs --from-log <usage.jsonl>. Without a log every saving would be multiplied by the same typed guess, which ranks prompts by length and calls it a priority.',
981
- allLabelsNeedsMap: () => '--all-labels reads the "labels" map in trazum.config.json — label to prompt file — and this config has none. Map at least one workload to its prompt.',
981
+ allLabelsNeedsMap: () => '--all-labels reads the "labels" map in trazum.config.json, label to prompt file, and this config has none. Map at least one workload to its prompt.',
982
982
  fromLogConflict: (flag) => `--from-log measures the figure --${flag} types, and merging a measurement with a guess produces a number that is neither. Pass one or the other.`,
983
983
  fromLogNeedsLabel: (available) => `--from-log needs to know which workload this prompt is: pass --label, or map the prompt file under "labels" in trazum.config.json. Labels with traffic in this log: ${available}.`,
984
984
  fromLogAmbiguousLabel: (target, labels) => `${target} is mapped to more than one label in trazum.config.json (${labels}), so --from-log cannot pick one silently. Pass --label.`,
985
- fromLogLabelEmpty: (label, available) => `No priced call in this log carries the label "${label}", so there is nothing to measure — a zero-call profile would price this change as worthless rather than as unmeasured. Labels with traffic: ${available}.`,
985
+ fromLogLabelEmpty: (label, available) => `No priced call in this log carries the label "${label}", so there is nothing to measure: a zero-call profile would price this change as worthless rather than as unmeasured. Labels with traffic: ${available}.`,
986
986
  unknownRuleInDisable: (id) => `Unknown rule in --disable: "${id}". Full list: trazum rules`,
987
987
  unknownCommand: (command) => `Unknown command: "${command}". Try "trazum --help".`,
988
988
  missingInputFile: () => 'Missing input file. Use "-" to read from standard input.',
@@ -996,12 +996,12 @@ ${bold('EXAMPLES')}
996
996
  * Named, and told what it cannot do rather than merely that it will not.
997
997
  *
998
998
  * The alternative on offer has to be somebody else's tooling, because
999
- * Trazum has none for this family — saying so is the whole refusal. A
999
+ * Trazum has none for this family, saying so is the whole refusal. A
1000
1000
  * refusal never arrives bare.
1001
1001
  */
1002
1002
  exactTokensWrongFamily: (model, provider) => `--exact-tokens counts with Anthropic's endpoint, which counts Claude's tokenizer${provider === null
1003
- ? `, and the catalogue records no provider for "${model}" — so which tokenizer it uses is not something Trazum knows`
1004
- : `, and ${model} is a model from ${provider}`}. Counting it there would either be refused upstream or return a number for a different tokenizer, and this tool will not label that exact. Drop --exact-tokens for the estimate — which is honest about being one — or count with ${provider === null ? "that model's" : provider + "'s"} own tooling.`,
1003
+ ? `, and the catalogue records no provider for "${model}", so which tokenizer it uses is not something Trazum knows`
1004
+ : `, and ${model} is a model from ${provider}`}. Counting it there would either be refused upstream or return a number for a different tokenizer, and this tool will not label that exact. Drop --exact-tokens for the estimate, which is honest about being one, or count with ${provider === null ? "that model's" : provider + "'s"} own tooling.`,
1005
1005
  checkNeedsMaxTokens: () => 'trazum check needs --max-tokens <n>.',
1006
1006
  evalNeedsCases: () => 'trazum eval needs --cases <file>.',
1007
1007
  unknownExportFormat: (received, allowed) => `Unknown export format "${received}". Available: ${allowed}.`,
@@ -1021,7 +1021,7 @@ ${bold('EXAMPLES')}
1021
1021
  inputTokens: () => 'Input tokens',
1022
1022
  estimated: (offFamily) => offFamily === null
1023
1023
  ? ' (estimated, ±10%)'
1024
- : ` (estimated — the counter is calibrated on Claude, not ${offFamily})`,
1024
+ : ` (estimated: the counter is calibrated on Claude, not ${offFamily})`,
1025
1025
  exactCount: () => ' (exact count)',
1026
1026
  rulesApplied: () => 'Rules applied',
1027
1027
  nothingToTrim: () => ' No rule found anything to trim.',
@@ -1030,12 +1030,12 @@ ${bold('EXAMPLES')}
1030
1030
  // detected: guessing the prompt's language is one more thing to get wrong,
1031
1031
  // and naming the coverage cannot be wrong.
1032
1032
  dictionaryCoverage: (languages) => ` The phrase dictionaries cover ${languages}. A prompt in another language `
1033
- + 'is not necessarily efficient — it may just be one Trazum cannot read yet.',
1033
+ + 'is not necessarily efficient: it may just be one Trazum cannot read yet.',
1034
1034
  dictionaryUnreviewed: (languages) => ` Of those, ${languages} carry entries nobody here reads: written by the same `
1035
1035
  + 'process that wrote the rules, never agreed by a speaker of the language.',
1036
1036
  dictionaryAppliedUnreviewed: (language) => ` These changes came from the ${language} dictionary, which nobody here reads. `
1037
1037
  + 'Its entries were written by the same process that wrote the rules and never '
1038
- + 'agreed by a speaker — read the diff before trusting it.',
1038
+ + 'agreed by a speaker. Read the diff before trusting it.',
1039
1039
  levelAggressive: () => '[aggressive]',
1040
1040
  levelSafe: () => '[safe]',
1041
1041
  ruleHits: (hits, tokensSaved) => `(${hits}×, ~${tokensSaved} tokens)`,
@@ -1048,28 +1048,28 @@ ${bold('EXAMPLES')}
1048
1048
  llmRejected: (reason) => `rejected: ${reason}`,
1049
1049
  costWith: (modelName) => `Cost with ${modelName}`,
1050
1050
  usageLine: (calls, outputTokens, batch) => `${calls} calls/month · ${outputTokens} output tokens per call${batch ? ' · Batch API' : ''}`,
1051
- allLabelsHeading: (count) => `Every mapped prompt against its own measured traffic — ${count} ranked by what the change is worth`,
1051
+ allLabelsHeading: (count) => `Every mapped prompt against its own measured traffic, ${count} ranked by what the change is worth`,
1052
1052
  allLabelsRow: (saving) => `${saving}/month if optimised`,
1053
1053
  allLabelsRowPeriod: (saving) => `${saving} over the measured period if optimised`,
1054
1054
  allLabelsFooter: () => 'Ranked by measured traffic, not by prompt length: a big prompt on a dead workload is worth less than a small one on a busy one. Each figure is this prompt\'s token delta at its own label\'s measured rate.',
1055
- allLabelsUnmapped: (label, usd) => `${label} carries ${usd} of measured spend and no prompt file is mapped to it — the workload nobody can optimise because nobody said where it lives. Map it under "labels" in trazum.config.json.`,
1056
- allLabelsDead: (label, path) => `${label} is mapped to ${path} and has no traffic in this log — a retired workload, a renamed label, or a typo that has been silently doing nothing.`,
1055
+ allLabelsUnmapped: (label, usd) => `${label} carries ${usd} of measured spend and no prompt file is mapped to it: the workload nobody can optimise because nobody said where it lives. Map it under "labels" in trazum.config.json.`,
1056
+ allLabelsDead: (label, path) => `${label} is mapped to ${path} and has no traffic in this log, a retired workload, a renamed label, or a typo that has been silently doing nothing.`,
1057
1057
  allLabelsUnreadable: (label, path) => `${label} is mapped to ${path}, which could not be read. The mapping exists; the file does not.`,
1058
- usageLineMeasured: (calls, days, scaled, outputTokens, batch) => `${calls} calls measured over ${days} days — ${scaled}/month at that rate · ${outputTokens} output tokens per call, measured${batch ? ' · Batch API' : ''}`,
1058
+ usageLineMeasured: (calls, days, scaled, outputTokens, batch) => `${calls} calls measured over ${days} days, ${scaled}/month at that rate · ${outputTokens} output tokens per call, measured${batch ? ' · Batch API' : ''}`,
1059
1059
  usageLineMeasuredPeriod: (calls, days, outputTokens, batch) => `${calls} calls measured${days === null ? ' (the log carries no clock)' : ` over ${days} days`} · ${outputTokens} output tokens per call, measured${batch ? ' · Batch API' : ''}`,
1060
1060
  measuredModelShare: (model, share, count) => `This label ran on ${count} models; the figures use ${model}, which carried ${share} of its spend.`,
1061
- measuredNoOutput: () => 'No call in this slice recorded output tokens, so the output half of every figure below is $0 measured — not $0 assumed.',
1061
+ measuredNoOutput: () => 'No call in this slice recorded output tokens, so the output half of every figure below is $0 measured, not $0 assumed.',
1062
1062
  perPeriodSaving: (saving, pct) => `saving ${saving} over the measured period (${pct}%)`,
1063
1063
  periodNotScaled: (days) => days === null
1064
1064
  ? 'Not scaled to a month: the log carries no clock, so there is no rate to scale. These figures cover exactly the calls measured.'
1065
- : `Not scaled to a month: ${days} days is under the week a scaling needs — shorter than one weekly cycle multiplies whichever part of the cycle it caught. These figures cover exactly the period measured.`,
1065
+ : `Not scaled to a month: ${days} days is under the week a scaling needs, and being shorter than one weekly cycle multiplies whichever part of the cycle it caught. These figures cover exactly the period measured.`,
1066
1066
  perMonthSaving: (saving, pct) => `saving ${saving}/month (${pct}%)`,
1067
1067
  beyondShortening: () => 'Beyond shortening the prompt',
1068
1068
  biggestLever: () => 'Start here:',
1069
1069
  biggestLeverDetail: (title, amount, times) =>
1070
1070
  // The title keeps its case: lowercasing it turned "Claude Opus 5" into
1071
1071
  // "claude opus 5", which is a product name mangled to fit a sentence.
1072
- `"${title}" — ${amount}/month` +
1072
+ `"${title}", ${amount}/month` +
1073
1073
  (times !== null && times >= 2 ? `, ${times}× what the rules saved.` : '.'),
1074
1074
  perMonthSuffix: (amount) => ` ~${amount}/month`,
1075
1075
  diff: () => 'Diff',
@@ -1079,12 +1079,12 @@ ${bold('EXAMPLES')}
1079
1079
  // `tokens` arrives already formatted for the locale, so the singular is
1080
1080
  // decided on the string rather than on a number that is no longer here.
1081
1081
  tokensSaved: (tokens) => `${tokens} token${tokens === '1' ? '' : 's'} back, every call.`,
1082
- windowNegligible: (tokens, model, window) => `${tokens} tokens of ${model}'s ${window}-token window — under a tenth of a percent, so the window is not what constrains this prompt.`,
1082
+ windowNegligible: (tokens, model, window) => `${tokens} tokens of ${model}'s ${window}-token window, under a tenth of a percent, so the window is not what constrains this prompt.`,
1083
1083
  windowUnmoved: (share, model, window) => `${share} of ${model}'s ${window}-token window, before and after: this change is too small to move it.`,
1084
1084
  beyondThisPromptTokensOnly: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. If any of your prompts go to a metered API, "trazum profile <usage.jsonl>" reads what the provider actually charged and prices the levers that are not the prompt. Recording that log is a few lines and it never contains prompt text.',
1085
- beyondThisPrompt: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 40% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs — and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1086
- windowUse: (before, after, model, window) => `Context window: ${before} → ${after} of ${model}'s ${window} tokens — room the conversation gets instead.`,
1087
- tokensOnlyAskedFor: () => 'You named a scenario, and it was not priced: Trazum is running somewhere that bills by subscription, so there is no bill here to reduce. Add --cost to price it anyway — the host says where Trazum runs, not where your prompt goes.',
1085
+ beyondThisPrompt: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 40% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1086
+ windowUse: (before, after, model, window) => `Context window: ${before} → ${after} of ${model}'s ${window} tokens, room the conversation gets instead.`,
1087
+ tokensOnlyAskedFor: () => 'You named a scenario, and it was not priced: Trazum is running somewhere that bills by subscription, so there is no bill here to reduce. Add --cost to price it anyway: the host says where Trazum runs, not where your prompt goes.',
1088
1088
  tokensOnlyCost: () => 'Pass --cost if this prompt is bound for a metered API.',
1089
1089
  pricingOverlaid: (models, lastReviewed) => `Prices for ${models} came from a local overlay reviewed ${lastReviewed}, not from the bundled catalogue.`,
1090
1090
  reorderHeading: () => 'Reordered for caching',
@@ -1120,14 +1120,14 @@ ${bold('EXAMPLES')}
1120
1120
  heading: () => 'What is here',
1121
1121
  host: (name) => `Running inside ${name}.`,
1122
1122
  prompts: (count) => `${count} prompt ${count === 1 ? 'file' : 'files'} found.`,
1123
- noPrompts: () => 'No prompt files found. Directory mode reads .txt, .md, .prompt and .tmpl by default — set "extensions" if yours are named otherwise.',
1123
+ noPrompts: () => 'No prompt files found. Directory mode reads .txt, .md, .prompt and .tmpl by default. Set "extensions" if yours are named otherwise.',
1124
1124
  sourcesTruncated: (cap) => `Stopped after ${cap} source files, so a provider named further down was not seen.`,
1125
1125
  usageFound: (kind, where) => kind === 'connector-credential'
1126
1126
  ? `Usage can be pulled: a credential is in ${where}. Run trazum connect.`
1127
1127
  : kind === 'store'
1128
1128
  ? `A local store of past measurements is in ${where}.`
1129
1129
  : `Usage log found: ${where}.`,
1130
- noUsage: () => 'No usage found. Point trazum at a log (trazum profile <log.jsonl>) or pull one (trazum connect anthropic) — every money figure in this tool comes from one.',
1130
+ noUsage: () => 'No usage found. Point trazum at a log (trazum profile <log.jsonl>) or pull one (trazum connect anthropic): every money figure in this tool comes from one.',
1131
1131
  usageUnreadable: (where, because) => `${where} is there and could not be read: ${because}. That is a different problem from having no usage, and it is the one to fix first.`,
1132
1132
  configHeading: () => 'What the config would say',
1133
1133
  nothingJustified: () => 'Nothing. Every key below needs evidence this run did not find, and a guessed config is worse than none.',
@@ -1140,7 +1140,7 @@ ${bold('EXAMPLES')}
1140
1140
  whyCache: (rate, cacheReadTokens, inputTokens) => `${cacheReadTokens} cached against ${inputTokens} fresh input is a hit rate of ${rate}`,
1141
1141
  noModelEvidence: () => 'nothing measured or written in the source names one model',
1142
1142
  modelConflict: (files) => `these files name more than one provider: ${files}`,
1143
- modelProviderOnly: (provider, file) => `${file} names ${provider} and no model — a provider default would read as your decision six weeks from now`,
1143
+ modelProviderOnly: (provider, file) => `${file} names ${provider} and no model: a provider default would read as your decision six weeks from now`,
1144
1144
  nothingMeasured: () => 'nothing has been measured yet',
1145
1145
  windowTooShort: (days, minimum) => `${days} days measured; ${minimum} are needed before that is a monthly rate rather than a forecast`,
1146
1146
  undatedCalls: (undated, calls) => `${undated} of ${calls} calls carry no timestamp, so they cannot be placed inside the window a rate would divide by`,
@@ -1148,7 +1148,7 @@ ${bold('EXAMPLES')}
1148
1148
  batchOnlyYouKnow: () => 'whether the work can wait for a batch window is a product decision, and no log records it',
1149
1149
  labelsUnprovable: (labels) => `${labels} ${labels === 1 ? 'label' : 'labels'} in the log, and nothing here proves which prompt file sends which`,
1150
1150
  budgetIsPolicy: () => 'a budget is a policy, and there is no measured figure to write one against yet',
1151
- budgetIsPolicyMeasured: (usd, days) => `a budget is a policy, so it is yours to set — the measured figure is $${usd} over ${days} days`,
1151
+ budgetIsPolicyMeasured: (usd, days) => `a budget is a policy, so it is yours to set: the measured figure is $${usd} over ${days} days`,
1152
1152
  findingHeading: () => 'The most valuable thing found',
1153
1153
  noFinding: (why) => why === 'nothing-measured'
1154
1154
  ? 'Nothing, because nothing has been measured. Every figure this tool prints as money comes from a usage log.'
@@ -1160,7 +1160,7 @@ ${bold('EXAMPLES')}
1160
1160
  findingRoute: (model) => `The same work fits ${model}, which is cheaper per token.`,
1161
1161
  findingBatch: () => 'The Batch API halves both halves of the bill, for work that can wait.',
1162
1162
  findingTotal: (usd, days) => `Together: $${usd} over the same ${days} days.`,
1163
- findingNext: () => 'trazum plan <your log> ranks every action, not just this one. If a figure here looks wrong, trazum feedback says where to tell us — it sends nothing on its own.',
1163
+ findingNext: () => 'trazum plan <your log> ranks every action, not just this one. If a figure here looks wrong, trazum feedback says where to tell us, it sends nothing on its own.',
1164
1164
  wouldOverwrite: (keys) => `This replaces keys you already set: ${keys}. Pass --yes to write anyway.`,
1165
1165
  nothingToWrite: () => 'No config written: nothing above could be justified from what is here.',
1166
1166
  wouldWrite: (path) => `Would write ${path}:`,
@@ -1173,11 +1173,11 @@ ${bold('EXAMPLES')}
1173
1173
  needsYear: () => '--year is required, as four digits: trazum report <log> --year 2026.',
1174
1174
  spent: (usd, calls, months) => `${usd} across ${calls} calls, over ${months} recorded months.`,
1175
1175
  missing: (months) => `No record at all for ${months}. Those months are named rather than filled: a year that quietly covers part of itself and prints an annual total is wrong by the rest and says nothing about it.`,
1176
- promises: (planned, arrived, notArrived, cannotTell) => `${planned} actions planned. ${arrived} arrived, ${notArrived} did not, and ${cannotTell} could not be judged. Three outcomes, never two \u2014 the third is the one an ordinary annual report folds into the flattering one.`,
1176
+ promises: (planned, arrived, notArrived, cannotTell) => `${planned} actions planned. ${arrived} arrived, ${notArrived} did not, and ${cannotTell} could not be judged. Three outcomes, never two, the third is the one an ordinary annual report folds into the flattering one.`,
1177
1177
  projected: (usd) => `The plans projected ${usd} of savings.`,
1178
- noArrivedFigure: () => 'There is deliberately no figure beside it for what arrived. A verification says WHETHER each action landed; it has never carried a per-action dollar figure for the saving. Assembling one here would mean deciding which of several observed numbers is "the saving" \u2014 a judgement the verification refused to make, and exactly the annual-report arithmetic this document replaces.',
1178
+ noArrivedFigure: () => 'There is deliberately no figure beside it for what arrived. A verification says WHETHER each action landed; it has never carried a per-action dollar figure for the saving. Assembling one here would mean deciding which of several observed numbers is "the saving", a judgement the verification refused to make, and exactly the annual-report arithmetic this document replaces.',
1179
1179
  outcomes: (recorded, parsed, unrecordedUsd) => `${recorded} of ${parsed} calls recorded an outcome; ${unrecordedUsd} of the year\u2019s spend did not.`,
1180
- noOutcomes: () => 'No outcome was recorded this year, so nothing here says what the money bought. That is not a success rate of zero \u2014 an uninstrumented year and a failing year are different sentences.',
1180
+ noOutcomes: () => 'No outcome was recorded this year, so nothing here says what the money bought. That is not a success rate of zero, an uninstrumented year and a failing year are different sentences.',
1181
1181
  cannotSayHeading: () => 'What this record cannot say',
1182
1182
  cannotSay: (kind) => kind === 'months-missing'
1183
1183
  ? 'what happened in the months with no record'
@@ -1186,60 +1186,60 @@ ${bold('EXAMPLES')}
1186
1186
  : kind === 'nothing-was-verified'
1187
1187
  ? 'whether the promises were kept, because no plan was verified'
1188
1188
  : kind === 'some-promises-unjudgeable'
1189
- ? 'whether some promises were kept \u2014 they could not be judged from the logs that exist'
1189
+ ? 'whether some promises were kept, they could not be judged from the logs that exist'
1190
1190
  : kind === 'arrived-savings-not-quantified'
1191
1191
  ? 'how many dollars the kept promises were worth'
1192
1192
  : kind === 'no-outcomes-recorded'
1193
1193
  ? 'what any of the money bought'
1194
1194
  : 'what the uninstrumented share of the traffic did',
1195
- noNewData: () => 'Every figure above comes from the store and the plans you already keep. Nothing was computed here that cannot be checked against a document that already exists \u2014 which is the only reason an annual report is worth trusting, since it is the document most likely to be quoted out of the room it was written in.',
1195
+ noNewData: () => 'Every figure above comes from the store and the plans you already keep. Nothing was computed here that cannot be checked against a document that already exists, which is the only reason an annual report is worth trusting, since it is the document most likely to be quoted out of the room it was written in.',
1196
1196
  },
1197
1197
  commitment: {
1198
1198
  heading: (floor, discount, months) => `A ${months}-month commitment: ${floor} a month at ${discount} off`,
1199
1199
  needsTerms: () => '--floor and --discount are required, and --months defaults to 12. Take them from the contract the provider is offering you: the floor is what you commit to spending each month after the discount, and the discount is what you get off list.',
1200
- asIf: () => 'This is what the deal WOULD HAVE done on the traffic you actually had. It is a measurement of the past, not a prediction \u2014 every month below happened.',
1200
+ asIf: () => 'This is what the deal WOULD HAVE done on the traffic you actually had. It is a measurement of the past, not a prediction, every month below happened.',
1201
1201
  columns: { month: 'month', list: 'list', paid: 'would pay', saving: 'saving' },
1202
1202
  net: (usd, months) => `Net over ${months} measured months: ${usd}.`,
1203
1203
  good: (usd) => `The months that cleared the floor saved ${usd}.`,
1204
1204
  lost: (usd, months) => `${months} of them fell short, and the floor you would have paid for capacity nobody used comes to ${usd}. That figure is kept separate on purpose: netted into the line above it disappears, and the disappearing is what a vendor\u2019s slide relies on.`,
1205
1205
  noShortfall: () => 'No measured month would have fallen short of the floor.',
1206
1206
  breakEven: (usd) => `Break-even is ${usd} of monthly spend. Below it you pay the floor for less usage than it buys; above it the saving grows.`,
1207
- spread: (low, high, median) => `Measured spread: ${low} to ${high}, median ${median}. That is the shortfall risk in the only form a log can state it \u2014 a count of real months and the range they covered, rather than a probability from a distribution nobody fitted.`,
1207
+ spread: (low, high, median) => `Measured spread: ${low} to ${high}, median ${median}. That is the shortfall risk in the only form a log can state it, a count of real months and the range they covered, rather than a probability from a distribution nobody fitted.`,
1208
1208
  shortTerm: (covered, term) => `This replays ${covered} months against a ${term}-month commitment. It is a real answer about ${covered} months and not about ${term}.`,
1209
1209
  cannotTell: (why, needed) => why === 'no-history'
1210
1210
  ? 'Nothing to replay: this log has no whole months in it.'
1211
- : `Cannot judge this from ${needed === '0' ? 'what exists' : `what exists \u2014 ${needed} more whole month(s) would settle it`}. A commitment is signed for a year, and an answer from one month is a year-long decision made on a fortnight of evidence.`,
1212
- neverAForecast: () => 'Nothing here is annualised, extrapolated or fitted to a trend. If next quarter looks nothing like last quarter, this arithmetic says nothing about it \u2014 which is the honest limit of what a log can tell you about a contract.',
1211
+ : `Cannot judge this from ${needed === '0' ? 'what exists' : `what exists, ${needed} more whole month(s) would settle it`}. A commitment is signed for a year, and an answer from one month is a year-long decision made on a fortnight of evidence.`,
1212
+ neverAForecast: () => 'Nothing here is annualised, extrapolated or fitted to a trend. If next quarter looks nothing like last quarter, this arithmetic says nothing about it, which is the honest limit of what a log can tell you about a contract.',
1213
1213
  },
1214
1214
  owners: {
1215
1215
  heading: () => 'Whose money',
1216
1216
  noOwners: () => 'No owners configured. Add "owners" to trazum.config.json to attribute spend, for example {"patterns": {"payments": ["billing-*"]}, "budgets": {"payments": 400}}.',
1217
1217
  columns: { owner: 'owner', spend: 'spend', budget: 'budget', calls: 'calls' },
1218
- verdict: (kind) => kind === 'over' ? 'over' : kind === 'within' ? 'within' : kind === 'not-measured' ? 'not measured' : '\u2014',
1218
+ verdict: (kind) => kind === 'over' ? 'over' : kind === 'within' ? 'within' : kind === 'not-measured' ? 'not measured' : 'no verdict',
1219
1219
  unallocated: (usd, share, labels) => `Unallocated: ${usd} (${share} of the bill), from ${labels}.`,
1220
- neverSpread: () => 'It is not divided between the owners above, and it never will be. Spreading unattributed spend proportionally is the most common lie in cost reporting: it makes every line add up and every team\u2019s number wrong by an amount nobody can see \u2014 hardest on whoever instruments best, because their known spend is largest and they absorb the biggest share of somebody else\u2019s mystery. Claim it with a pattern.',
1220
+ neverSpread: () => 'It is not divided between the owners above, and it never will be. Spreading unattributed spend proportionally is the most common lie in cost reporting: it makes every line add up and every team\u2019s number wrong by an amount nobody can see, hardest on whoever instruments best, because their known spend is largest and they absorb the biggest share of somebody else\u2019s mystery. Claim it with a pattern.',
1221
1221
  nothingUnallocated: () => 'Every workload in this log has an owner.',
1222
1222
  sharedHeading: () => 'Shared, by a rule somebody wrote',
1223
1223
  sharedRule: (label, rule) => `${label}: ${rule}`,
1224
1224
  problemsHeading: () => 'This ownership config will not do what it looks like it does',
1225
1225
  problem: (kind, detail) => kind === 'split-does-not-sum'
1226
- ? `${detail} \u2014 a split that does not sum to 1 loses money or invents it, silently. That workload is left whole in the unallocated line until this is fixed.`
1226
+ ? `${detail}, a split that does not sum to 1 loses money or invents it, silently. That workload is left whole in the unallocated line until this is fixed.`
1227
1227
  : kind === 'split-names-unknown-owner'
1228
1228
  ? `${detail} names an owner that "owners.patterns" does not declare.`
1229
1229
  : kind === 'split-has-one-owner'
1230
- ? `${detail} is "shared" with one owner \u2014 that is a pattern written the long way, and reading it as a share invites a second owner to be added without the first being adjusted.`
1230
+ ? `${detail} is "shared" with one owner, that is a pattern written the long way, and reading it as a share invites a second owner to be added without the first being adjusted.`
1231
1231
  : kind === 'negative-share'
1232
1232
  ? `${detail} has a negative share.`
1233
1233
  : `${detail} has a budget but no patterns, so nothing can ever land on it.`,
1234
- notMeasured: (owner) => `${owner} has a budget and no measured calls. That is NOT under budget \u2014 a team whose logs never arrived passes every budget it has, forever, and a green tick beside their name says the opposite of the truth.`,
1234
+ notMeasured: (owner) => `${owner} has a budget and no measured calls. That is NOT under budget, a team whose logs never arrived passes every budget it has, forever, and a green tick beside their name says the opposite of the truth.`,
1235
1235
  },
1236
1236
  semantic: {
1237
1237
  heading: (path) => `Semantic pass on ${path}`,
1238
- willCost: (usd, input, output, model) => `This will send the prompt to ${model}: about ${input} tokens in and ${output} out, roughly ${usd}. Estimated, not measured \u2014 a tool that spends your money to tell you how to spend less should be the first thing audited by its own arithmetic. Pass --yes to run it.`,
1238
+ willCost: (usd, input, output, model) => `This will send the prompt to ${model}: about ${input} tokens in and ${output} out, roughly ${usd}. Estimated, not measured, a tool that spends your money to tell you how to spend less should be the first thing audited by its own arithmetic. Pass --yes to run it.`,
1239
1239
  needsYes: () => 'Nothing was sent. Add --yes once you have read the price above.',
1240
1240
  finding: (kind, because) => `${kind === 'contradiction' ? 'Contradiction' : kind === 'restated-instruction' ? 'Restated' : 'Same thing, different words'}: ${because}`,
1241
1241
  span: (line, text) => `line ${line}: ${text}`,
1242
- ceiling: (tokens) => `At most ${tokens} tokens \u2014 a ceiling, not a saving. Merging these two means writing one passage that does the work of both, and nobody knows yet how long that is.`,
1242
+ ceiling: (tokens) => `At most ${tokens} tokens, a ceiling, not a saving. Merging these two means writing one passage that does the work of both, and nobody knows yet how long that is.`,
1243
1243
  noCeiling: () => 'No tokens attached. A contradiction is worth fixing because the prompt is wrong, not because it is long, and putting a figure on it would sell the wrong reason.',
1244
1244
  nothingFound: () => 'Nothing survived checking. That is a real answer.',
1245
1245
  rejected: (count) => `${count} proposals did not survive checking against the prompt.`,
@@ -1253,7 +1253,7 @@ ${bold('EXAMPLES')}
1253
1253
  ? `quoted the same passage twice: ${span}`
1254
1254
  : `covers ground an accepted finding covers: ${span}`,
1255
1255
  disposes: () => 'The model proposes and the deterministic layer disposes: every quoted passage is checked character for character against the prompt, pairs the rules engine already catches are dropped, and every token figure is counted here rather than believed.',
1256
- optIn: () => 'This pass is optional and always will be. Trazum works with no key, no network and no model \u2014 that has been true since 0.1.0 and this does not change it.',
1256
+ optIn: () => 'This pass is optional and always will be. Trazum works with no key, no network and no model, that has been true since 0.1.0 and this does not change it.',
1257
1257
  },
1258
1258
  quality: {
1259
1259
  heading: (label) => `Quality across the change: ${label}`,
@@ -1261,13 +1261,13 @@ ${bold('EXAMPLES')}
1261
1261
  needsAt: () => '--at is required: give the moment the change landed, as an ISO timestamp. Without it there is no boundary to compare across, and picking one from the log would be this tool choosing which change to blame.',
1262
1262
  sides: (beforeRate, afterRate, before, after) => `before ${beforeRate} (${before} outcomes) after ${afterRate} (${after} outcomes)`,
1263
1263
  dropped: (from, to, outcomes, cost) => `The resolution rate moved from ${from} to ${to} on ${outcomes} measured outcomes, and this change ${cost}. Both halves are measured; neither is an estimate.`,
1264
- held: (from, to, outcomes) => `The resolution rate moved from ${from} to ${to} on ${outcomes} measured outcomes \u2014 up, measurably.`,
1264
+ held: (from, to, outcomes) => `The resolution rate moved from ${from} to ${to} on ${outcomes} measured outcomes, up, measurably.`,
1265
1265
  cannotTell: (why, need) => why === 'too-few-before'
1266
1266
  ? `Cannot tell: only ${need} outcomes before the change, and this gate needs 100 a side. It fails builds, so the threshold is not the one a rate uses elsewhere.`
1267
1267
  : why === 'too-few-after'
1268
1268
  ? `Cannot tell yet: only ${need} outcomes since the change, and this gate needs 100 a side. Run it again once the traffic has caught up.`
1269
1269
  : why === 'not-separable'
1270
- ? 'Cannot tell: the rate did not measurably move. That is NOT the same as "it held" \u2014 a gate that spelled them the same way would pass a real regression it merely lacked the power to see.'
1270
+ ? 'Cannot tell: the rate did not measurably move. That is NOT the same as "it held", a gate that spelled them the same way would pass a real regression it merely lacked the power to see.'
1271
1271
  : why === 'no-vocabulary'
1272
1272
  ? 'Cannot tell: "outcomes.success" declares nothing, so there is no resolution rate to compare.'
1273
1273
  : 'Cannot tell: something other than the prompt moved across the boundary. See below.',
@@ -1275,33 +1275,33 @@ ${bold('EXAMPLES')}
1275
1275
  confounder: (kind, detail) => kind === 'model-mix-moved'
1276
1276
  ? `The model mix moved by ${detail}. The drop may be entirely somebody else's migration, and this tool cannot separate the two.`
1277
1277
  : kind === 'volume-moved'
1278
- ? `The call volume moved ${detail}. A workload whose traffic moved that much is usually a workload whose population changed \u2014 a new surface, a new customer, a campaign \u2014 and the questions being asked are not the questions from before.`
1278
+ ? `The call volume moved ${detail}. A workload whose traffic moved that much is usually a workload whose population changed, a new surface, a new customer, a campaign, and the questions being asked are not the questions from before.`
1279
1279
  : `Outcome coverage moved from ${detail}. The two rates describe different populations: a team that starts instrumenting its hard cases sees its measured rate fall without anything having got worse.`,
1280
- notRandomised: () => 'This is a before-and-after, not an experiment. It splits traffic by time rather than at random, so everything else that changed at the same time is in the difference too \u2014 which is why it says "cannot tell" far more readily than an A/B would.',
1280
+ notRandomised: () => 'This is a before-and-after, not an experiment. It splits traffic by time rather than at random, so everything else that changed at the same time is in the difference too, which is why it says "cannot tell" far more readily than an A/B would.',
1281
1281
  cannotSee: () => 'It cannot see anything else you deployed that day. A "dropped" verdict says the rate fell and the three things it can check did not move. That is a smaller claim than "the prompt did it", and it is the largest one the evidence supports.',
1282
1282
  gateFailed: () => 'Gate failed: a measured drop with nothing else to explain it.',
1283
- gateHeldOpen: () => 'Gate not passed and not failed. "Cannot tell" holds the claim open rather than exiting green \u2014 the posture verify has had since 1.39.',
1283
+ gateHeldOpen: () => 'Gate not passed and not failed. "Cannot tell" holds the claim open rather than exiting green, the posture verify has had since 1.39.',
1284
1284
  },
1285
1285
  experiment: {
1286
1286
  heading: (a, b) => `Experiment: ${a} against ${b}`,
1287
1287
  needsTwo: () => 'Name two labels to compare, for example: trazum experiment <log> --a prompt-v1 --b prompt-v2',
1288
1288
  needsRule: () => '--min-outcomes is required, and it is the point: a stopping rule declared after looking at the numbers is not a stopping rule. Say how many outcomes each arm must record before the result may be read.',
1289
1289
  arm: (name, rate, successes, recorded, interval) => `${name} ${rate} (${successes} of ${recorded} recorded) 95% ${interval}`,
1290
- wins: (name, low, high) => `${name} wins. The difference is between ${low} and ${high} at 95% confidence \u2014 the whole interval is on one side of zero, which is what "wins" means here.`,
1290
+ wins: (name, low, high) => `${name} wins. The difference is between ${low} and ${high} at 95% confidence, the whole interval is on one side of zero, which is what "wins" means here.`,
1291
1291
  notSeparable: (why, needed) => why === 'no-difference-observed'
1292
- ? 'Not separable: both arms recorded the same rate. No sample size separates a difference of zero, so there is no "run it longer" to offer \u2014 there is nothing here to find.'
1292
+ ? 'Not separable: both arms recorded the same rate. No sample size separates a difference of zero, so there is no "run it longer" to offer, there is nothing here to find.'
1293
1293
  : why === 'nothing-recorded'
1294
1294
  ? 'Not separable: an arm recorded no outcomes at all, so there is no rate to compare.'
1295
1295
  : `Not separable on this traffic: the 95% interval on the difference includes zero. One number is larger, and that is not a finding. About ${needed} outcomes per arm would settle the difference observed so far.`,
1296
1296
  peeked: (short, declared, recorded) => `Read early. The declared rule was ${declared} outcomes per arm and ${short} has ${recorded}. Nothing can stop a number being read early; this line exists so whoever reads the result later can see that it was.`,
1297
1297
  honoured: (declared) => `Stopping rule honoured: both arms cleared ${declared} recorded outcomes.`,
1298
- marginalDearer: (better, usd) => `${better} resolves more and costs more. One extra success costs ${usd} \u2014 that figure, not the rate, is what the decision turns on.`,
1298
+ marginalDearer: (better, usd) => `${better} resolves more and costs more. One extra success costs ${usd}, that figure, not the rate, is what the decision turns on.`,
1299
1299
  marginalCheaper: (better) => `${better} resolves more AND costs less per call. Nothing is being traded.`,
1300
1300
  neverPromotes: () => 'Nothing was changed. A winner is a finding; taking it is a decision with a name attached, and it belongs in the plan like everything else.',
1301
1301
  },
1302
1302
  ladder: {
1303
1303
  heading: () => 'Escalation ladders',
1304
- noLadders: () => 'No ladders configured. A ladder sends a workload to a cheap model first and escalates a recorded failure to a dearer one — add "ladders" to trazum.config.json, for example {"support": {"tiers": ["claude-haiku-4-5", "claude-opus-5"], "escalateOn": ["escalated"]}}.',
1304
+ noLadders: () => 'No ladders configured. A ladder sends a workload to a cheap model first and escalates a recorded failure to a dearer one. Add "ladders" to trazum.config.json, for example {"support": {"tiers": ["claude-haiku-4-5", "claude-opus-5"], "escalateOn": ["escalated"]}}.',
1305
1305
  workload: (label) => label,
1306
1306
  arithmetic: (cheap, dear, breakEven) => `${cheap} a call cheap, ${dear} dear. Break-even escalation rate: ${breakEven}.`,
1307
1307
  measured: (rate, escalations, calls) => `Measured: ${rate} (${escalations} of ${calls} calls escalated).`,
@@ -1315,7 +1315,7 @@ ${bold('EXAMPLES')}
1315
1315
  : why === 'tier-unpriced'
1316
1316
  ? 'Cannot tell: one of the tiers is not in the price catalogue, so the break-even rate cannot be computed.'
1317
1317
  : 'Cannot tell: this ladder declares no escalation values.',
1318
- problemsHeading: (label) => `${label} — this ladder will not do what it looks like it does`,
1318
+ problemsHeading: (label) => `${label}: this ladder will not do what it looks like it does`,
1319
1319
  problem: (kind, detail) => kind === 'escalate-on-a-success'
1320
1320
  ? `escalateOn names "${detail}", which "outcomes.success" declares a SUCCESS. This ladder pays twice for work that already worked, on every call, while looking exactly like a cost-saving measure.`
1321
1321
  : kind === 'escalate-on-undeclared'
@@ -1327,15 +1327,15 @@ ${bold('EXAMPLES')}
1327
1327
  : kind === 'unknown-model'
1328
1328
  ? `"${detail}" is not in the price catalogue.`
1329
1329
  : `a ladder needs at least two tiers; this one has ${detail}.`,
1330
- theDoubleSpend: () => 'An escalation pays twice: the cheap attempt is not refunded. So a ladder saves money only below its break-even escalation rate, and above it costs more than never having built one — which is why the rate is printed beside the measurement rather than left to be worked out in somebody\u2019s head.',
1330
+ theDoubleSpend: () => 'An escalation pays twice: the cheap attempt is not refunded. So a ladder saves money only below its break-even escalation rate, and above it costs more than never having built one, which is why the rate is printed beside the measurement rather than left to be worked out in somebody\u2019s head.',
1331
1331
  notExecuted: () => 'Trazum does not run the escalation. A ladder escalates after a failure is known, which is after the answer came back and usually after something downstream judged it, so the retry belongs in your own loop. What is here is the policy and the arithmetic that says whether the policy is worth running.',
1332
1332
  },
1333
1333
  gateway: {
1334
1334
  badProvider: (given, known) => given === ''
1335
1335
  ? `Name the provider to stand in front of. Known: ${known}.`
1336
1336
  : `"${given}" is not a provider this gateway speaks for. Known: ${known}.`,
1337
- pricedNotFronted: (given, known) => `Trazum prices ${given} but this gateway does not stand in front of it yet — it fronts ${known}. That is a real gap and it is on the roadmap, not a typo on your part. Until then: "trazum profile" prices a ${given} log you export, and its --max-usd gate fails a build on the bill after the fact. What you do not get is a refusal before the money is spent, which is the whole point of the gateway and the reason this is worth saying rather than listing ${given} as unknown.`,
1338
- needsPolicy: (policies) => `--on-cannot-tell is required, and there is no default: ${policies}. When the gateway cannot judge a call — no budget, nothing measured, an unpriced model — one of these happens, and only you know which failure your product can survive. fail-open keeps it working and lets the bill run; fail-closed stops the bill and takes it down with it. Picking one for you would be the most consequential decision in your architecture, made silently at install time.`,
1337
+ pricedNotFronted: (given, known) => `Trazum prices ${given} but this gateway does not stand in front of it yet: it fronts ${known}. That is a real gap and it is on the roadmap, not a typo on your part. Until then: "trazum profile" prices a ${given} log you export, and its --max-usd gate fails a build on the bill after the fact. What you do not get is a refusal before the money is spent, which is the whole point of the gateway and the reason this is worth saying rather than listing ${given} as unknown.`,
1338
+ needsPolicy: (policies) => `--on-cannot-tell is required, and there is no default: ${policies}. When the gateway cannot judge a call, no budget, nothing measured, an unpriced model, one of these happens, and only you know which failure your product can survive. fail-open keeps it working and lets the bill run; fail-closed stops the bill and takes it down with it. Picking one for you would be the most consequential decision in your architecture, made silently at install time.`,
1339
1339
  listening: (where, provider) => `Gateway on ${where}, in front of ${provider}`,
1340
1340
  /**
1341
1341
  * One sentence per cause, and no `else`.
@@ -1343,42 +1343,42 @@ ${bold('EXAMPLES')}
1343
1343
  * This was a two-branch ternary whose second arm explained OpenAI's
1344
1344
  * `stream_options`. A third cause added later would have inherited that
1345
1345
  * sentence and told a Gemini user about a setting that does not exist in
1346
- * their SDK — a message bounded by its neighbour rather than by its
1346
+ * their SDK, a message bounded by its neighbour rather than by its
1347
1347
  * subject, which is this project's most repeated mistake.
1348
1348
  */
1349
1349
  unmeasured: (cause, sofar) => {
1350
1350
  if (cause === 'stream-broke') {
1351
- return `unmeasured: the stream broke before its usage event — the provider billed this call and this session cannot see it (${sofar} unmeasured so far)`;
1351
+ return `unmeasured: the stream broke before its usage event, so the provider billed this call and this session cannot see it (${sofar} unmeasured so far)`;
1352
1352
  }
1353
1353
  if (cause === 'no-usage-event') {
1354
- return `unmeasured: the stream carried no usage event — on OpenAI that is every streaming call without stream_options.include_usage, so the total below is short by these (${sofar} unmeasured so far)`;
1354
+ return `unmeasured: the stream carried no usage event, on OpenAI that is every streaming call without stream_options.include_usage, so the total below is short by these (${sofar} unmeasured so far)`;
1355
1355
  }
1356
- return `unmeasured: the provider answered without any usage in the body — the call was made and its cost is not knowable from the response, so the total below is short by these (${sofar} unmeasured so far)`;
1356
+ return `unmeasured: the provider answered without any usage in the body, so the call was made and its cost is not knowable from the response, so the total below is short by these (${sofar} unmeasured so far)`;
1357
1357
  },
1358
1358
  pointYourSdk: (where) => `Point your SDK's base URL at ${where} and change nothing else. It speaks the provider's own wire format, so no code changes and no new client.`,
1359
1359
  credential: () => 'Your credential is forwarded untouched and never read, never stored, never logged and never put in a URL. Trazum holds no key here and cannot make a call of its own through this.',
1360
- neverSubstitutes: () => 'A call over budget is refused with HTTP 402 and the cheaper alternatives named — never silently swapped, trimmed or downgraded. 402 rather than 429 on purpose: every provider SDK retries a 429, which would turn one refusal into a retry storm.',
1361
- standing: (consumed, limit) => `Judging against ${consumed} of ${limit}, measured, read once at start — a file read in the request path would put this tool's latency between you and your provider on every call.`,
1360
+ neverSubstitutes: () => 'A call over budget is refused with HTTP 402 and the cheaper alternatives named, never silently swapped, trimmed or downgraded. 402 rather than 429 on purpose: every provider SDK retries a 429, which would turn one refusal into a retry storm.',
1361
+ standing: (consumed, limit) => `Judging against ${consumed} of ${limit}, measured, read once at start: a file read in the request path would put this tool's latency between you and your provider on every call.`,
1362
1362
  noStanding: () => 'Nothing measured for this period, so every call is unjudged and the failure policy below decides. Set spend.monthlyUsd and pull with trazum connect.',
1363
1363
  policy: (policy) => policy === 'fail-open'
1364
1364
  ? 'When it cannot judge: the call goes through, and the record says it was unjudged rather than within budget.'
1365
1365
  : 'When it cannot judge: the call is refused. Nothing gets through unmeasured.',
1366
- measured: (model, label, input, output, substituted) => ` ${model}${label === null ? '' : ` [${label}]`}: ${input} in, ${output} out${substituted ? ' (substituted — marked, and never counted as the call that was asked for)' : ''}`,
1366
+ measured: (model, label, input, output, substituted) => ` ${model}${label === null ? '' : ` [${label}]`}: ${input} in, ${output} out${substituted ? ' (substituted, marked, and never counted as the call that was asked for)' : ''}`,
1367
1367
  },
1368
1368
  feedback: {
1369
1369
  heading: () => 'Telling us something',
1370
1370
  sendsNothing: () => 'This command sends nothing, and neither does anything else here. Trazum has no telemetry: no ping, no install hook, no anonymous counter. A tool whose whole argument is that it reads your bill without uploading it cannot also be quietly reporting on you, and a test fails the build if this command ever reaches the network.',
1371
1371
  whereHeading: () => 'Where',
1372
- wrongOptimisation: () => 'A rule changed what a prompt asks for — the report that matters most, and the failure this product exists to avoid:',
1372
+ wrongOptimisation: () => 'A rule changed what a prompt asks for, the report that matters most, and the failure this product exists to avoid:',
1373
1373
  bug: () => 'Anything else that is wrong:',
1374
1374
  question: () => 'A question, or an idea you are not sure about:',
1375
- security: () => 'A security problem — privately, never a public issue:',
1375
+ security: () => 'A security problem, privately, never a public issue:',
1376
1376
  environmentHeading: () => 'What a maintainer will ask for',
1377
- environmentOnly: () => 'That is the whole of it. Nothing about your work is here — not the config, not a prompt, not a label, not a figure. Those are what a good report needs and what only you can decide to share.',
1377
+ environmentOnly: () => 'That is the whole of it. Nothing about your work is here, not the config, not a prompt, not a label, not a figure. Those are what a good report needs and what only you can decide to share.',
1378
1378
  linkHeading: () => 'A blank issue with the above already filled in',
1379
1379
  },
1380
1380
  conform: {
1381
- noTarget: () => 'Pass a file to check — a usage log, or any document Trazum emits. Use "-" to read from stdin.',
1381
+ noTarget: () => 'Pass a file to check, a usage log, or any document Trazum emits. Use "-" to read from stdin.',
1382
1382
  badContract: (given, known) => `"${given}" is not a contract. Known contracts: ${known}.`,
1383
1383
  unrecognised: (path) => `${path} does not match any contract Trazum knows.`,
1384
1384
  /**
@@ -1401,39 +1401,39 @@ ${bold('EXAMPLES')}
1401
1401
  problem: (at, kind, detail) => `${at}: ${detail} (${kind})`,
1402
1402
  moreProblems: (count) => `…and ${count} more. Fix these first; they are often the same mistake.`,
1403
1403
  unavailableHeading: () => 'What this cannot answer, and what would unlock it',
1404
- unavailable: (finding, because, unlockedBy) => `${finding} — ${because}. Add ${unlockedBy}.`,
1404
+ unavailable: (finding, because, unlockedBy) => `${finding}, ${because}. Add ${unlockedBy}.`,
1405
1405
  unavailableNeverGates: () => 'None of those failed anything. Choosing not to record a field is a decision, not a defect, and a gate that failed on it would be this tool telling you what to log.',
1406
1406
  },
1407
1407
  rollup: {
1408
- noTargets: () => 'Pass the profile documents to roll up — each one written by `trazum profile --json` — or a directory of them.',
1408
+ noTargets: () => 'Pass the profile documents to roll up, each one written by `trazum profile --json`, or a directory of them.',
1409
1409
  noSuchTarget: (path) => `${path} is not there. A roll-up never guesses at a contribution it could not read.`,
1410
1410
  emptyDirectory: (path) => `${path} holds no .json documents. An empty folder rolled up silently would report a team that spent nothing.`,
1411
- heading: (contributors, usd, calls) => `Roll-up of ${plural(contributors, 'contributor')} — ${usd} over ${plural(calls, 'call')}`,
1411
+ heading: (contributors, usd, calls) => `Roll-up of ${plural(contributors, 'contributor')}, ${usd} over ${plural(calls, 'call')}`,
1412
1412
  span: (from, to) => `Covering ${from} to ${to}, stated and never extrapolated from.`,
1413
1413
  noSpan: () => 'No contributor carried a clock, so this roll-up covers no stated period.',
1414
1414
  contributorsHeading: () => 'Contributors, and what each one could not see',
1415
- contributor: (name, usd, calls, spanDays) => `${name} — ${usd}, ${plural(calls, 'call')}${spanDays === null ? ', no clock' : `, ${plural(spanDays, 'day')}`}`,
1416
- claimedSpan: (from, to, contributors) => `Asked for ${from} to ${to} by ${plural(contributors, 'contributor')} — a claim about what was gone looking for, kept apart from what the records showed.`,
1415
+ contributor: (name, usd, calls, spanDays) => `${name}, ${usd}, ${plural(calls, 'call')}${spanDays === null ? ', no clock' : `, ${plural(spanDays, 'day')}`}`,
1416
+ claimedSpan: (from, to, contributors) => `Asked for ${from} to ${to} by ${plural(contributors, 'contributor')}: a claim about what was gone looking for, kept apart from what the records showed.`,
1417
1417
  claimedRow: (from, to) => `asked for ${from} to ${to}`,
1418
1418
  silentRuns: (runs) => runs,
1419
1419
  undated: (count) => `${plural(count, 'record')} this contributor's own window could not place, because they carried no clock`,
1420
1420
  rejectedHeading: () => 'Handed over and not merged',
1421
- rejected: (name, because) => `${name} — ${because}`,
1421
+ rejected: (name, because) => `${name}, ${because}`,
1422
1422
  via: (rollup) => `via ${rollup}`,
1423
- rejectedVia: (name, via, because) => `${name}, via ${via} — ${because}`,
1424
- repeated: (names) => `Handed over more than once, by name: ${names}. Its money is counted every time. Two machines genuinely sharing a name is possible, so nothing was subtracted — check whether a roll-up and one of the machines inside it were both handed over.`,
1423
+ rejectedVia: (name, via, because) => `${name}, via ${via}, ${because}`,
1424
+ repeated: (names) => `Handed over more than once, by name: ${names}. Its money is counted every time. Two machines genuinely sharing a name is possible, so nothing was subtracted. Check whether a roll-up and one of the machines inside it were both handed over.`,
1425
1425
  identical: (names) => `The same document arrived more than once: ${names}.`,
1426
- identicalUsd: (usd) => `${usd} of the total above is the repeat. It is counted, not discarded — whether it is one export handed over twice or two machines that agreed exactly is yours to know.`,
1426
+ identicalUsd: (usd) => `${usd} of the total above is the repeat. It is counted, not discarded, whether it is one export handed over twice or two machines that agreed exactly is yours to know.`,
1427
1427
  byLabelHeading: () => 'The merged bill, per workload',
1428
- labelRow: (label, usd, calls) => `${label} — ${usd}, ${plural(calls, 'call')}`,
1428
+ labelRow: (label, usd, calls) => `${label}, ${usd}, ${plural(calls, 'call')}`,
1429
1429
  notMergedHeading: () => 'Findings that do not roll up',
1430
- notMerged: (finding, because) => `${finding} — ${because}.`,
1430
+ notMerged: (finding, because) => `${finding}, ${because}.`,
1431
1431
  presentIn: (names) => `Present in: ${names}. Read it there.`,
1432
1432
  cannotSayHeading: () => 'What this roll-up cannot say about itself',
1433
1433
  caveat: (code) => {
1434
1434
  switch (code) {
1435
1435
  case 'overlap-invisible':
1436
- return 'Overlap between contributors is unmeasurable here. Two people exporting the same traffic double the bill, and a merge of summaries cannot see it — the raw lines a duplicate check needs are in no document.';
1436
+ return 'Overlap between contributors is unmeasurable here. Two people exporting the same traffic double the bill, and a merge of summaries cannot see it: the raw lines a duplicate check needs are in no document.';
1437
1437
  case 'mismatched-spans':
1438
1438
  return 'The contributors cover meaningfully different periods. The sum is a sum; reading a share of it as a comparison of rates is the mistake this names.';
1439
1439
  case 'contributor-without-clock':
@@ -1441,7 +1441,7 @@ ${bold('EXAMPLES')}
1441
1441
  case 'day-top-label-unknown':
1442
1442
  return "A day drew from more than one contributor, so its dearest label is unknown: each contributor knows its own, and the merged answer needs per-label-per-day spend no document carries.";
1443
1443
  case 'no-claimed-period':
1444
- return 'A contributor stated no window, so its span is all that is known of it — and a log whose latest record is the 5th may be a log of a quiet week or a log that stopped being written on the 5th.';
1444
+ return 'A contributor stated no window, so its span is all that is known of it, and a log whose latest record is the 5th may be a log of a quiet week or a log that stopped being written on the 5th.';
1445
1445
  case 'silence-inside-a-claim':
1446
1446
  return 'A contributor recorded nothing on days it asked for. Whether that is a quiet stretch or an export that stopped is yours to know; the days are named above.';
1447
1447
  case 'claim-not-bounded':
@@ -1466,15 +1466,15 @@ ${bold('EXAMPLES')}
1466
1466
  noTarget: () => 'Name the candidate: --to <model>. trazum models lists the catalogue.',
1467
1467
  unknownModel: (id) => `The catalogue has no price for "${id}", and a comparison against a price nobody has is worse than none. trazum models lists what it knows; a pricing overlay adds what it does not.`,
1468
1468
  heading: (target) => `Switching this traffic to ${target}, measured`,
1469
- saves: (current, target, saving) => `${current} on this log becomes ${target} on the candidate — ${saving} less, on the same tokens.`,
1470
- costs: (current, target, extra) => `${current} on this log becomes ${target} on the candidate — ${extra} MORE. This switch loses money before quality is even asked.`,
1469
+ saves: (current, target, saving) => `${current} on this log becomes ${target} on the candidate, ${saving} less, on the same tokens.`,
1470
+ costs: (current, target, extra) => `${current} on this log becomes ${target} on the candidate, ${extra} MORE. This switch loses money before quality is even asked.`,
1471
1471
  nothingMovable: () => 'Nothing here can move: every slice is already on the candidate or exceeds its context window.',
1472
1472
  movable: (calls, slices) => `${calls} call(s) across ${slices} slice(s) could move.`,
1473
- overContext: (slices, usd) => `${slices} slice(s) worth ${usd} cannot move — at least one call exceeds the candidate's context window. Their money is in none of the figures above.`,
1473
+ overContext: (slices, usd) => `${slices} slice(s) worth ${usd} cannot move, at least one call exceeds the candidate's context window. Their money is in none of the figures above.`,
1474
1474
  alreadyOnTarget: (calls, usd) => `${calls} call(s) worth ${usd} are already on the candidate.`,
1475
- window: (days) => `Measured over ${days} day(s) of this log — every figure above is arithmetic on that window.`,
1475
+ window: (days) => `Measured over ${days} day(s) of this log: every figure above is arithmetic on that window.`,
1476
1476
  noWindow: () => 'No record carries a timestamp, so this log has no measured rate.',
1477
- breakEvenDays: (migration, days, measuredDays) => `A declared migration cost of ${migration} is recovered after ~${days} day(s) at the saving measured over ${measuredDays} day(s). Division on the past — what next month does is next month's business.`,
1477
+ breakEvenDays: (migration, days, measuredDays) => `A declared migration cost of ${migration} is recovered after ~${days} day(s) at the saving measured over ${measuredDays} day(s). Division on the past, what next month does is next month's business.`,
1478
1478
  breakEvenNoSaving: (migration) => `Break-even refused: the switch saves nothing, so the declared ${migration} has nothing to recover.`,
1479
1479
  breakEvenNoClock: (migration) => `Break-even refused for ${migration}: no record carries a timestamp, so there is no measured rate to divide by.`,
1480
1480
  evalCost: (cases, total) => `Knowing whether the candidate is good enough costs money too: ${cases} case(s) through trazum route is ~${total} at this log's own mean call (two calls on the incumbent, one on the candidate, per case).`,
@@ -1484,7 +1484,7 @@ ${bold('EXAMPLES')}
1484
1484
  ownrate: {
1485
1485
  missing: () => 'Both numbers are yours to declare: trazum ownrate --gpu-usd-hour <n> --tokens-per-second <n> [--utilization <0-1>]',
1486
1486
  invalid: (flag) => `--${flag} must be a positive number (utilization: greater than 0, at most 1).`,
1487
- result: (usdPerMTok, tokensPerSecond, gpuUsdPerHour, utilizationPct) => `${usdPerMTok} per million tokens — ${gpuUsdPerHour}/hour over ${tokensPerSecond} tokens/second at ${utilizationPct}% serving.`,
1487
+ result: (usdPerMTok, tokensPerSecond, gpuUsdPerHour, utilizationPct) => `${usdPerMTok} per million tokens, ${gpuUsdPerHour}/hour over ${tokensPerSecond} tokens/second at ${utilizationPct}% serving.`,
1488
1488
  declared: () => 'Derived from your declaration, honest only if the throughput was measured. Every report that prices this model will rest on these two numbers.',
1489
1489
  snippetHeading: () => 'Paste into trazum.config.json (the "pricing" overlay file):',
1490
1490
  },
@@ -1493,7 +1493,7 @@ ${bold('EXAMPLES')}
1493
1493
  notFound: (path) => `${path}: not found`,
1494
1494
  noExports: (path) => `${path}: no .json/.jsonl/.ndjson OTLP exports under it.`,
1495
1495
  summary: (files, llmSpans) => `${files} file(s), ${llmSpans} LLM span(s) priced.`,
1496
- skipped: (otherSpans) => `${otherSpans} non-LLM span(s) skipped — the trace's other work, not a bill.`,
1496
+ skipped: (otherSpans) => `${otherSpans} non-LLM span(s) skipped, the trace's other work, not a bill.`,
1497
1497
  noCache: (count) => `${count} span(s) carried no cache data. OpenTelemetry has not standardised the cache TTL split, so the cache verdicts read "cannot tell" on this log rather than a fabricated one.`,
1498
1498
  unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1499
1499
  written: (file) => `Wrote ${file}.`,
@@ -1503,24 +1503,29 @@ ${bold('EXAMPLES')}
1503
1503
  notFound: (path) => `${path}: not found`,
1504
1504
  noTranscripts: (path) => `${path}: no .jsonl transcripts under it. Claude Code writes them per session under ~/.claude/projects/<project>/.`,
1505
1505
  summary: (files, records) => `${files} transcript(s), ${records} priced call(s).`,
1506
- collapsed: (lines) => `${lines} extra line(s) of already-counted calls collapsed — one API call is written as one line per content block, and counting each line would overbill.`,
1506
+ collapsed: (lines) => `${lines} extra line(s) of already-counted calls collapsed: one API call is written as one line per content block, and counting each line would overbill.`,
1507
1507
  streamed: (count) => `${count} call(s) were written while still streaming; the final line's counts stood.`,
1508
- disagreements: (count) => `${count} call(s) had lines that disagreed beyond streaming growth — a count shrank, or another field changed. The last line stood, but that is a finding: worth a look at the transcript.`,
1508
+ disagreements: (count) => `${count} call(s) had lines that disagreed beyond streaming growth: a count shrank, or another field changed. The last line stood, but that is a finding: worth a look at the transcript.`,
1509
1509
  noRequestId: (count) => `${count} call(s) carried no request id, so nothing could be collapsed against them; each is priced as recorded.`,
1510
1510
  synthetic: (count) => `${count} turn(s) Claude Code wrote itself (model "<synthetic>") are not in the output: no provider ever billed them, so they are not calls.`,
1511
1511
  labelled: () => 'Labelled by project folder. Pass --no-label-from-project to leave the label off, or --label <name> to set one.',
1512
1512
  skipped: (other, unparseable, withoutUsage) => `Passed over: ${other} non-assistant line(s) (the transcript's other business), ${unparseable} unparseable, ${withoutUsage} assistant line(s) without usage.`,
1513
1513
  written: (file) => `Wrote ${file}.`,
1514
+ stateNeedsFile: () => '--state reads one transcript, not a folder: the state ties an offset in the transcript to a length of the output, and several transcripts appending to one output have no single such length. Point it at the .jsonl file.',
1515
+ stateNeedsOut: () => '--state needs --out: there is nothing to resume against when the records go to stdout.',
1516
+ resumed: (skipped, offset) => skipped === 0
1517
+ ? `Read the transcript in full and recorded a resume point at byte ${offset}.`
1518
+ : `Resumed at byte ${skipped}, so ${skipped} byte(s) were not re-read. Next resume point: byte ${offset}.`,
1514
1519
  },
1515
1520
  position: {
1516
1521
  heading: (month) => `Where ${month} stands, measured`,
1517
1522
  scopeMonth: () => 'the month',
1518
1523
  scopeDay: () => 'today',
1519
1524
  scopeLabel: (label) => `"${label}"`,
1520
- within: (scope, measured, limit, remaining, days, elapsed) => `${scope}: ${measured} of ${limit} measured — ${remaining} left (${days} of ${elapsed} elapsed days measured)`,
1521
- over: (scope, measured, limit, overBy) => `${scope}: over — ${measured} measured against ${limit}, ${overBy} past the ceiling`,
1522
- cannotTell: (scope) => `${scope}: cannot tell — nothing measured in this window`,
1523
- distance: (days, rate, overDays) => `at ${rate}/day over ${overDays} measured days, the ceiling is ${days} days away — division on the past, not a forecast`,
1525
+ within: (scope, measured, limit, remaining, days, elapsed) => `${scope}: ${measured} of ${limit} measured, ${remaining} left (${days} of ${elapsed} elapsed days measured)`,
1526
+ over: (scope, measured, limit, overBy) => `${scope}: over, ${measured} measured against ${limit}, ${overBy} past the ceiling`,
1527
+ cannotTell: (scope) => `${scope}: cannot tell, because nothing was measured in this window`,
1528
+ distance: (days, rate, overDays) => `at ${rate}/day over ${overDays} measured days, the ceiling is ${days} days away, division on the past, not a forecast`,
1524
1529
  unmeasuredHeading: () => 'Configured and not measurable from this log',
1525
1530
  unmeasured: (scope, why) => `${scope}: ${why}`,
1526
1531
  why: (reason) => reason === 'no-clock'
@@ -1528,8 +1533,8 @@ ${bold('EXAMPLES')}
1528
1533
  : reason === 'no-labels'
1529
1534
  ? 'no record carries a label, so per-label spend is unknowable here'
1530
1535
  : reason === 'nothing-recorded'
1531
- ? 'the log is empty — nothing was recorded'
1532
- : 'the log records labels and has never seen this one this month — possibly renamed, possibly idle, and neither is "under budget"',
1536
+ ? 'the log is empty: nothing was recorded'
1537
+ : 'the log records labels and has never seen this one this month, possibly renamed, possibly idle, and neither is "under budget"',
1533
1538
  cannotSayHeading: () => 'What this deliberately does not answer',
1534
1539
  cannotSay: (code) => {
1535
1540
  switch (code) {
@@ -1541,8 +1546,8 @@ ${bold('EXAMPLES')}
1541
1546
  return code;
1542
1547
  }
1543
1548
  },
1544
- unpriced: (count) => `${count} record(s) name a model the catalogue cannot price. They contribute nothing to any figure above — money nobody can see, said here rather than hidden.`,
1545
- source: () => 'Measured from this log alone, priced record by record. The store\'s provider-billed monthly standing is a different measurement — "trazum store" prints it — and the two are never merged into one figure.',
1549
+ unpriced: (count) => `${count} record(s) name a model the catalogue cannot price. They contribute nothing to any figure above: money nobody can see, said here rather than hidden.`,
1550
+ source: () => 'Measured from this log alone, priced record by record. The store\'s provider-billed monthly standing is a different measurement, "trazum store" prints it, and the two are never merged into one figure.',
1546
1551
  noLog: () => 'position needs a usage log: trazum position usage.jsonl',
1547
1552
  },
1548
1553
  pulse: {
@@ -1559,16 +1564,16 @@ ${bold('EXAMPLES')}
1559
1564
  return kind;
1560
1565
  }
1561
1566
  },
1562
- neverRun: (name) => `${name}: never here. Not late — there is no cadence to be late against.`,
1567
+ neverRun: (name) => `${name}: never here. Not late: there is no cadence to be late against.`,
1563
1568
  age: (name, when, hours) => `${name}: ${when}Z, ${plural(hours, 'hour')} ago`,
1564
1569
  noThreshold: () => 'Nothing was judged. Pass --max-stale-hours <n> to make a run that stopped a failing exit code; how stale is too stale is a policy, and this tool does not write yours.',
1565
1570
  within: (hours) => `Everything that has run here ran within ${plural(hours, 'hour')}.`,
1566
1571
  stale: (hours) => `Something that runs here has not run in over ${plural(hours, 'hour')}. Silence from a scheduled job and silence from a job with nothing to report look identical; this is which.`,
1567
- notAService: () => 'This command runs nothing and hosts nothing. Something has to notice, and the something is your CI: a step that runs this on the schedule you already have turns a dead cron into a red build, without Trazum holding anybody\'s metrics. How far the measurements reach is reported and never judged — that is a provider reporting on its own schedule, not a job that failed.',
1572
+ notAService: () => 'This command runs nothing and hosts nothing. Something has to notice, and the something is your CI: a step that runs this on the schedule you already have turns a dead cron into a red build, without Trazum holding anybody\'s metrics. How far the measurements reach is reported and never judged: that is a provider reporting on its own schedule, not a job that failed.',
1568
1573
  },
1569
1574
  html: {
1570
1575
  caveatsHeading: () => 'What this report cannot say',
1571
- noClock: () => 'No record carried a timestamp, so days, rates and drift are not in this report — a total is still a total.',
1576
+ noClock: () => 'No record carried a timestamp, so days, rates and drift are not in this report: a total is still a total.',
1572
1577
  noSessions: () => 'No record carried a session, so conversation growth and per-conversation costs are not in this report.',
1573
1578
  byLabelHeading: () => 'By workload',
1574
1579
  byModelHeading: () => 'By model',
@@ -1587,7 +1592,7 @@ ${bold('EXAMPLES')}
1587
1592
  written: (path) => `HTML report written to ${path}.`,
1588
1593
  },
1589
1594
  schema: {
1590
- noTarget: (known) => `Name a contract to print its JSON Schema. Known: ${known}. The schema validates with any draft 2020-12 validator — no Trazum required.`,
1595
+ noTarget: (known) => `Name a contract to print its JSON Schema. Known: ${known}. The schema validates with any draft 2020-12 validator, no Trazum required.`,
1591
1596
  unknown: (name, known) => `"${name}" is not a contract. Known: ${known}.`,
1592
1597
  },
1593
1598
  bench: {
@@ -1597,7 +1602,7 @@ ${bold('EXAMPLES')}
1597
1602
  colWall: () => 'wall ms',
1598
1603
  colRatio: () => 'ratio',
1599
1604
  colPeakRss: () => 'peak RSS',
1600
- note: () => 'One shot each, this machine, today. The wall clock is for a person reading two tables side by side; the ratio — workload over an in-process calibration loop — is the number a gate can hold, because the machine cancels out of it. Record one with --record, hold a build to it with --against and a stated --max-ratio.',
1605
+ note: () => 'One shot each, this machine, today. The wall clock is for a person reading two tables side by side; the ratio, workload over an in-process calibration loop, is the number a gate can hold, because the machine cancels out of it. Record one with --record, hold a build to it with --against and a stated --max-ratio.',
1601
1606
  unknownWorkload: (id, known) => `Unknown workload "${id}". Known: ${known}.`,
1602
1607
  recorded: (path) => `Baseline written to ${path}. Commit it; --against reads it.`,
1603
1608
  needsMaxRatio: () => '--against needs --max-ratio <n>. How much regression is too much is a policy, and this tool does not write yours.',
@@ -1612,19 +1617,19 @@ ${bold('EXAMPLES')}
1612
1617
  },
1613
1618
  where: {
1614
1619
  hostHeading: () => 'Running inside',
1615
- subscription: (host) => `${host} bills by subscription, not by the token. A monthly saving below is arithmetic about tokens, not money you get back — what you gain is context window and rate-limit headroom.`,
1620
+ subscription: (host) => `${host} bills by subscription, not by the token. A monthly saving below is arithmetic about tokens, not money you get back, what you gain is context window and rate-limit headroom.`,
1616
1621
  noTarget: () => 'Pass a source file to see which provider its prompts are sent to.',
1617
1622
  sourceHeading: (path) => `Prompts in ${path} go to`,
1618
1623
  conflict: () => 'Cannot tell: the file names more than one provider.',
1619
1624
  conflictFallback: () => 'Nothing was assumed. Set "usage.model" in trazum.config.json, or pass --model.',
1620
1625
  nothingFound: () => 'Nothing in this file says which provider it calls.',
1621
- providerOnly: () => ' (provider only — nothing named a model)',
1626
+ providerOnly: () => ' (provider only, nothing named a model)',
1622
1627
  evidenceLine: (line, kind, detail) => `line ${line} ${kind}: ${detail}`,
1623
1628
  pricedAs: () => 'Priced as',
1624
1629
  fromConfig: () => '(from trazum.config.json)',
1625
1630
  fromDetection: () => '(read from the source)',
1626
1631
  fromProviderDefault: (provider) => `(${provider} was read from the source; nothing named a model, so this is theirs)`,
1627
- fromDefault: () => '(the built-in default — nothing said otherwise)',
1632
+ fromDefault: () => '(the built-in default, nothing said otherwise)',
1628
1633
  },
1629
1634
  pricing: {
1630
1635
  liveLoaded: (added, refreshed, skipped) => `Live prices: ${refreshed} refreshed, ${added} models added, ${skipped} skipped for having no usable price or context window. Caching minimums are not published by this source, so caching advice is withheld for the added models.`,
@@ -1657,13 +1662,13 @@ ${bold('EXAMPLES')}
1657
1662
  noteExamples: (count, tokens) => `${count} examples, ~${tokens} tokens`,
1658
1663
  noteFormat: (tokens) => `~${tokens} tokens restating the output format`,
1659
1664
  noteProtected: (pct) => `${pct}% is code or URLs, which cannot be trimmed`,
1660
- skipped: (count) => `Skipped ${count} source ${count === 1 ? 'file' : 'files'} with no \`// trazum:prompt\` marker — `
1665
+ skipped: (count) => `Skipped ${count} source ${count === 1 ? 'file' : 'files'} with no \`// trazum:prompt\` marker, `
1661
1666
  + 'their prompts are not in this ranking.',
1662
- densityNote: () => 'Tok/sen is tokens per sentence: verbosity independent of length. There is no score — every column is a measurement you can check against the file.',
1663
- recoverableNote: () => 'Recover is what the deterministic rules would take at this level, priced by the usage profile, with the token count beside it — a saving of one token is twenty-five cents and no work worth doing. It is measured by running the rules, not by a formula.',
1667
+ densityNote: () => 'Tok/sen is tokens per sentence: verbosity independent of length. There is no score. Every column is a measurement you can check against the file.',
1668
+ recoverableNote: () => 'Recover is what the deterministic rules would take at this level, priced by the usage profile, with the token count beside it: a saving of one token is twenty-five cents and no work worth doing. It is measured by running the rules, not by a formula.',
1664
1669
  },
1665
1670
  blame: {
1666
- heading: (path, revisions) => `${path} — ${revisions} ${revisions === 1 ? 'revision' : 'revisions'}`,
1671
+ heading: (path, revisions) => `${path}, ${revisions} ${revisions === 1 ? 'revision' : 'revisions'}`,
1667
1672
  notARepository: () => 'blame reads a file\'s history from git, and this directory is not inside a repository.',
1668
1673
  outsideRepository: (path) => `${path} is outside the repository, so there is no history to read.`,
1669
1674
  noHistory: (path) => `git has no commits touching ${path}.`,
@@ -1672,7 +1677,7 @@ ${bold('EXAMPLES')}
1672
1677
  net: (first, last, delta, pct) => `Net across this history: ${first} → ${last} tokens (${delta}, ${pct}).`,
1673
1678
  netCost: (amount, model, calls) => `That movement is ${amount} a month on ${model} at ${calls} calls.`,
1674
1679
  biggestRise: () => 'Biggest single increase',
1675
- biggestRiseDetail: (tokens, author, subject, sha) => `+${tokens} tokens — ${author}, "${subject}" (${sha})`,
1680
+ biggestRiseDetail: (tokens, author, subject, sha) => `+${tokens} tokens, ${author}, "${subject}" (${sha})`,
1676
1681
  addedAt: () => 'added',
1677
1682
  goneAt: () => 'not present',
1678
1683
  truncated: (shown) => `Showing the most recent ${shown}. Pass --limit for more.`,
@@ -1692,19 +1697,19 @@ ${bold('EXAMPLES')}
1692
1697
  rules: {
1693
1698
  title: () => 'Available rules',
1694
1699
  disableHint: () => ' Turn off the ones you do not want with --disable id1,id2',
1695
- measureHeading: (root, prompts, level) => `What each rule recovers in ${root} — ${plural(prompts, 'prompt')}, level ${level}`,
1700
+ measureHeading: (root, prompts, level) => `What each rule recovers in ${root}, ${plural(prompts, 'prompt')}, level ${level}`,
1696
1701
  measureTotals: (before, saved, floor) => `${before} tokens before. The rules recover ${saved}; normalisation recovers ${floor} whether a rule is enabled or not, and that is not the rules' work.`,
1697
1702
  measureRow: (id, marginal, alone, prompts) => `${id.padEnd(22)} lost if removed ${marginal.padStart(6)} alone ${alone.padStart(6)} ${plural(prompts, 'prompt')}`,
1698
- measureOverlap: (sumOfAlone, saved) => `The rules recover ${sumOfAlone} between them one at a time and ${saved} together. The gap is the overlap — two rules finding the same tokens — and it is stated rather than resolved into a total, because a single figure here is the one number that cannot be true.`,
1699
- measureRedundant: (ids) => `Every token these find, something else finds too, here: ${ids}. An overlap, not a defect — and not a reason to delete one without deciding which is the better to keep.`,
1700
- measureFiredWithoutSaving: (ids) => `These changed the prompt and recovered no tokens: ${ids}. Not the same as inert — they were exercised, and they are altering somebody's instruction for no measured benefit.`,
1703
+ measureOverlap: (sumOfAlone, saved) => `The rules recover ${sumOfAlone} between them one at a time and ${saved} together. The gap is the overlap: two rules finding the same tokens, and it is stated rather than resolved into a total, because a single figure here is the one number that cannot be true.`,
1704
+ measureRedundant: (ids) => `Every token these find, something else finds too, here: ${ids}. An overlap, not a defect, and not a reason to delete one without deciding which is the better to keep.`,
1705
+ measureFiredWithoutSaving: (ids) => `These changed the prompt and recovered no tokens: ${ids}. Not the same as inert: they were exercised, and they are altering somebody's instruction for no measured benefit.`,
1701
1706
  measureInert: (ids) => `These changed nothing in this corpus: ${ids}. That is a fact about these files, not about the rules: a rule that finds nothing here has not been shown to find nothing anywhere.`,
1702
1707
  measureBand: (source) => source === 'heuristic'
1703
1708
  ? 'Counted with the built-in estimator, so every figure above carries its documented band. A rule whose yield is a handful of tokens is inside the noise.'
1704
1709
  : 'Counted with an external tokenizer.',
1705
1710
  },
1706
1711
  doctor: {
1707
- heading: (root, prompts) => `${root} — ${prompts} ${prompts === 1 ? 'prompt' : 'prompts'}`,
1712
+ heading: (root, prompts) => `${root}, ${prompts} ${prompts === 1 ? 'prompt' : 'prompts'}`,
1708
1713
  subheading: (model, calls) => `Priced on ${model} at ${calls} calls a month.`,
1709
1714
  pricesReviewed: (date, days) => `Prices reviewed ${date}${ago(days)}.`,
1710
1715
  budgetsHeading: () => 'Budgets',
@@ -1713,14 +1718,14 @@ ${bold('EXAMPLES')}
1713
1718
  : `All ${count} prompts have a budget and are inside it.`,
1714
1719
  unbudgeted: (count, total) => `${count} of ${total} ${count === 1 ? 'prompt has' : 'prompts have'} no budget, so nothing is watching ${count === 1 ? 'it' : 'them'}`,
1715
1720
  overBudget: (count) => count === 1
1716
- ? '1 prompt is already over its budget — trazum check would fail on it'
1717
- : `${count} prompts are already over their budget — trazum check would fail on them`,
1721
+ ? '1 prompt is already over its budget: trazum check would fail on it'
1722
+ : `${count} prompts are already over their budget: trazum check would fail on them`,
1718
1723
  andMore: (count) => `and ${count} more`,
1719
1724
  findingsHeading: () => 'What it would be worth fixing',
1720
1725
  acrossPrompts: (count) => `${count} ${count === 1 ? 'prompt' : 'prompts'}`,
1721
1726
  findingsNote: () => 'Each line is the same advisory trazum optimize raises on those prompts, summed. '
1722
1727
  + 'Run it on any one of them to see the figure on its own.',
1723
- notAGate: () => 'Nothing here fails a build. trazum check is the gate; this is the survey — the '
1728
+ notAGate: () => 'Nothing here fails a build. trazum check is the gate; this is the survey: the '
1724
1729
  + 'model recommendation is a keyword heuristic, and a build gated on one teaches '
1725
1730
  + 'people to re-run until green.',
1726
1731
  sharedPrefixHeading: () => 'Preambles that could share a cache entry and do not',
@@ -1730,9 +1735,9 @@ ${bold('EXAMPLES')}
1730
1735
  : 'differing in wording, capitalisation or punctuation'),
1731
1736
  sharedPrefixFix: (drift) => drift === 'whitespace'
1732
1737
  ? 'A formatter fixes this: the text already agrees, only the spacing does not.'
1733
- : 'Someone has to pick one wording — the text itself differs, not just its spacing.',
1738
+ : 'Someone has to pick one wording, the text itself differs, not just its spacing.',
1734
1739
  sharedPrefixNoFigure: () => 'No figure is attached, deliberately. Caching matches bytes, so these prompts hold '
1735
- + 'one cache entry each instead of one between them — but what that costs depends on '
1740
+ + 'one cache entry each instead of one between them, but what that costs depends on '
1736
1741
  + 'how the calls are spread across the group, and Trazum applies a single '
1737
1742
  + '--cache-hit-rate to every prompt. Pricing it would mean inventing your traffic.',
1738
1743
  },
@@ -1745,13 +1750,13 @@ ${bold('EXAMPLES')}
1745
1750
  heading: (model) => `What each example is doing, measured on ${model}`,
1746
1751
  selfAgreement: (pct) => `The prompt agrees with itself ${pct} of the time. That is the yardstick: a removal `
1747
1752
  + 'that moves the answer less than this moved nothing attributable to the example.',
1748
- line: (n, tokens, pct) => `example ${n} — ${tokens} tokens, ${pct} agreement without it`,
1753
+ line: (n, tokens, pct) => `example ${n}, ${tokens} tokens, ${pct} agreement without it`,
1749
1754
  verdictNeeded: () => 'needed here',
1750
1755
  verdictRecoverable: () => 'no effect on these inputs',
1751
1756
  verdictUnknown: () => 'inconclusive',
1752
1757
  recoverable: (tokens) => `${tokens} tokens sit in examples whose removal changed nothing measurable here.`,
1753
1758
  caveat: () => 'Which is not the same as "delete them". An example may exist for a case these '
1754
- + 'inputs do not contain — the boundary condition somebody hit in production and '
1759
+ + 'inputs do not contain, the boundary condition somebody hit in production and '
1755
1760
  + 'added a demonstration for. This measures the inputs you gave it, and only you '
1756
1761
  + 'know whether they cover what matters. Nothing was edited.',
1757
1762
  },
@@ -1799,13 +1804,13 @@ ${bold('EXAMPLES')}
1799
1804
  someOverLimit: (count, max) => `${count} ${count === 1 ? 'prompt grew' : 'prompts grew'} past the per-prompt limit of ${max} tokens:`,
1800
1805
  allSubheading: (prompts) => `${prompts} ${prompts === 1 ? 'prompt' : 'prompts'} on both sides.`,
1801
1806
  allTotal: (delta, prompts) => `${delta} tokens across ${prompts} ${prompts === 1 ? 'prompt' : 'prompts'}`,
1802
- signConvention: () => 'Every figure is after minus before, so positive means worse — the opposite of the rest of Trazum.',
1807
+ signConvention: () => 'Every figure is after minus before, so positive means worse, the opposite of the rest of Trazum.',
1803
1808
  onlyBefore: () => 'only before',
1804
1809
  onlyAfter: () => 'only after ',
1805
1810
  onlyOneSideNote: () => 'Not counted in the totals. A prompt that vanished is a question, not a saving.',
1806
1811
  },
1807
1812
  markdown: {
1808
- checkHeading: (target) => `Trazum — token budgets for ${target}`,
1813
+ checkHeading: (target) => `Trazum, token budgets for ${target}`,
1809
1814
  baselineGrew: (delta, pct) => `This branch adds ${delta} tokens (${pct}) to the prompts here`,
1810
1815
  baselineShrank: (delta, pct) => `This branch removes ${delta} tokens (${pct}) from the prompts here`,
1811
1816
  baselineUnchanged: () => 'No change against the recorded baseline',
@@ -1817,9 +1822,9 @@ ${bold('EXAMPLES')}
1817
1822
  baselineMoney: (before, after, delta) => `Monthly cost **${before} \u2192 ${after}** (${delta})`,
1818
1823
  baselineMoneyIncomparable: () => 'The scenario or the price list moved since the baseline was recorded, so the two monthly figures are not the same measurement and are not subtracted here. The token comparison above is unaffected.',
1819
1824
  baselineReRecord: (command, path) => `If this growth is intended, re-record with \`${command}\` and commit \`${path}\`.`,
1820
- diffHeading: (before, after) => `Trazum — ${before} → ${after}`,
1821
- rankHeading: (root, count) => `Trazum — what to fix first in ${root} (${count} ${count === 1 ? "prompt" : "prompts"})`,
1822
- blameHeading: (path) => `Trazum — token history for ${path}`,
1825
+ diffHeading: (before, after) => `Trazum, ${before} → ${after}`,
1826
+ rankHeading: (root, count) => `Trazum, what to fix first in ${root} (${count} ${count === 1 ? "prompt" : "prompts"})`,
1827
+ blameHeading: (path) => `Trazum, token history for ${path}`,
1823
1828
  rankLevel: (level) => `Measured at rule level \`${level}\`.`,
1824
1829
  columnFile: () => 'Prompt',
1825
1830
  columnTokens: () => 'Tokens',
@@ -1830,7 +1835,7 @@ ${bold('EXAMPLES')}
1830
1835
  ? 'The prompt is within budget.'
1831
1836
  : `All ${budgeted} budgeted prompts are within budget.`,
1832
1837
  overBudget: (failures, budgeted) => `${failures} of ${budgeted} over budget`,
1833
- noBudget: () => '—',
1838
+ noBudget: () => 'none',
1834
1839
  unbudgetedNote: (count) => count === 1
1835
1840
  ? '1 prompt is not covered by any budget pattern, so nothing is watching it.'
1836
1841
  : `${count} prompts are not covered by any budget pattern, so nothing is watching them.`,
@@ -1857,7 +1862,7 @@ ${bold('EXAMPLES')}
1857
1862
  },
1858
1863
  check: {
1859
1864
  okLabel: () => 'OK',
1860
- embeddedHeading: (path, count) => `${path} — ${count} marked ${count === 1 ? 'prompt' : 'prompts'}`,
1865
+ embeddedHeading: (path, count) => `${path}, ${count} marked ${count === 1 ? 'prompt' : 'prompts'}`,
1861
1866
  declinedHeading: (count) => `${count} ${count === 1 ? 'marker' : 'markers'} could not be read:`,
1862
1867
  declinedAt: (line, detail) => `line ${line}: ${detail}`,
1863
1868
  failedLabel: () => 'FAILED',
@@ -1865,18 +1870,18 @@ ${bold('EXAMPLES')}
1865
1870
  failed: (tokens, budget) => `${tokens} tokens busts the budget of ${budget}.`,
1866
1871
  wouldFit: (level, optimizedTokens) => ` Optimised with "trazum optimize --level ${level}" it would land at ~${optimizedTokens} tokens and fit.`,
1867
1872
  stillTooBig: (optimizedTokens) => ` Even optimised it does not fit (~${optimizedTokens} tokens): content has to be cut by hand.`,
1868
- directoryHeading: (directory, files) => `${directory} — ${files} ${files === 1 ? 'prompt' : 'prompts'}`,
1873
+ directoryHeading: (directory, files) => `${directory}, ${files} ${files === 1 ? 'prompt' : 'prompts'}`,
1869
1874
  directorySummary: (failures, files) => failures === 0
1870
1875
  ? `All ${files} within budget.`
1871
1876
  : `${failures} of ${files} over budget.`,
1872
1877
  noBudget: () => '(no budget)',
1873
1878
  walkTruncated: () => 'Stopped early: the directory is larger than the walk limit, so this is not the whole picture.',
1874
- filesFromSummary: (checked, listed, dropped) => `Checking ${checked} of ${listed} listed file(s) — ${dropped} dropped: not a prompt extension, ignored by config, or no longer on disk.`,
1879
+ filesFromSummary: (checked, listed, dropped) => `Checking ${checked} of ${listed} listed file(s), ${dropped} dropped: not a prompt extension, ignored by config, or no longer on disk.`,
1875
1880
  filesFromNoBaseline: () => 'The baseline gate is skipped under --files-from: it compares the whole repository against the committed record, and a partial list would read as removals. Budgets are checked per file as always; run "trazum check ." for the baseline.',
1876
1881
  exactCountsCost: (files) => `Counting ${files} ${files === 1 ? 'file' : 'files'} through the API, one call each. This takes a moment.`,
1877
1882
  },
1878
1883
  profile: {
1879
- noTarget: () => 'Point this at a usage log: trazum profile usage.jsonl — one JSON object per line, each with a "model" and the "usage" object the API returned. Add "label" (which workload), "session" (which conversation) and "ts" (when) while you are there: without them every call looks alike, and the largest findings this command makes — conversation growth, and whether the cache TTL fits how fast your turns come — cannot be made at all. Recording it is four lines in your own code, it never contains prompt text, and the session key is grouped by and never printed.',
1884
+ noTarget: () => 'Point this at a usage log: trazum profile usage.jsonl, one JSON object per line, each with a "model" and the "usage" object the API returned. Add "label" (which workload), "session" (which conversation) and "ts" (when) while you are there: without them every call looks alike, and the largest findings this command makes, conversation growth, and whether the cache TTL fits how fast your turns come, cannot be made at all. Recording it is four lines in your own code, it never contains prompt text, and the session key is grouped by and never printed.',
1880
1885
  heading: () => 'Where the money went',
1881
1886
  calls: (n) => plural(n, 'call'),
1882
1887
  spent: (calls, total) => `${calls} · ${total}`,
@@ -1889,11 +1894,11 @@ ${bold('EXAMPLES')}
1889
1894
  byModelHeading: () => 'By model',
1890
1895
  row: (name, usd, pct, calls) => `${usd.padStart(11)} ${pct.padStart(5)} ${name} (${calls})`,
1891
1896
  // Parenthesised so a real label named "unlabelled" cannot read identically
1892
- // beside it — the data already keeps them apart; the display should too.
1897
+ // beside it, the data already keeps them apart; the display should too.
1893
1898
  unlabelled: () => '(no label)',
1894
1899
  cacheHit: (pct) => `Cache hit rate ${pct} of billable input.`,
1895
1900
  cacheNever: () => 'Caching was never used on these calls. If any prefix repeats, that is the largest saving available.',
1896
- cacheLost: (usd, writes, reads) => `Caching added ${usd} to this bill instead of taking it off. ${writes} tokens were written to the cache and ${reads} read back — and a write costs 1.25x plain input, or 2x at the 1-hour TTL. A prefix that changes faster than it is reused pays that premium for nothing. Either cache a prefix that holds still, or turn caching off here.`,
1901
+ cacheLost: (usd, writes, reads) => `Caching added ${usd} to this bill instead of taking it off. ${writes} tokens were written to the cache and ${reads} read back, and a write costs 1.25x plain input, or 2x at the 1-hour TTL. A prefix that changes faster than it is reused pays that premium for nothing. Either cache a prefix that holds still, or turn caching off here.`,
1897
1902
  cachePaidOff: (usd) => `Caching took ${usd} off this bill, against the same tokens uncached.`,
1898
1903
  cacheNoDifference: () => 'Caching came out level on this bill: what it charged for these tokens is what they would have cost as ordinary input. It is neither paying for itself nor costing you anything.',
1899
1904
  cacheLostBy: (labels) => `The loss is in: ${labels}.`,
@@ -1904,155 +1909,155 @@ ${bold('EXAMPLES')}
1904
1909
  cacheTtlUnsettledLabels: (labels) => `These would be losing money if their unrecorded writes used the 1-hour TTL: ${labels}.`,
1905
1910
  biggestPart: (name, pct) => `${name} is ${pct} of this bill.`,
1906
1911
  outputDominates: (pct) => `Output is ${pct} of this bill, so shortening prompts has a low ceiling here. What moves it is asking for shorter answers and capping max_tokens.`,
1907
- unpriced: (models, calls) => `${count(calls)} ${calls === 1 ? 'call is' : 'calls are'} not in these totals — the pricing catalogue does not know: ${models}. Add them with a pricing overlay (--pricing) to include them.`,
1912
+ unpriced: (models, calls) => `${count(calls)} ${calls === 1 ? 'call is' : 'calls are'} not in these totals, because the pricing catalogue does not know: ${models}. Add them with a pricing overlay (--pricing) to include them.`,
1908
1913
  skipped: (lineCount, lines) => `${count(lineCount)} ${lineCount === 1 ? 'line' : 'lines'} could not be read and ${lineCount === 1 ? 'was' : 'were'} left out (${lineCount === 1 ? 'line' : 'lines'} ${lines}).`,
1909
1914
  empty: () => 'No usage records in that file.',
1910
1915
  nothingPriced: () => 'None of the models in that log are in the pricing catalogue, so there is no bill to report. Add them with a pricing overlay (--pricing) and run this again.',
1911
1916
  leversHeading: () => 'What would actually move this bill',
1912
- leverSlice: (label, model, usd, pct) => `${label} on ${model} — up to ${usd} of this bill (${pct})`,
1917
+ leverSlice: (label, model, usd, pct) => `${label} on ${model}, up to ${usd} of this bill (${pct})`,
1913
1918
  leverRoute: (candidate, usd) => `route it to ${candidate}, ${usd}`,
1914
1919
  leverRouteVerify: (candidate) => `Whether that holds is an evaluation question, not an arithmetic one, and nothing here has seen a single answer. Measure it: trazum route <log> --prompt-file <prompt> --cases <cases> --yes`,
1915
1920
  leverBatch: (usd) => `send it through the Batch API, ${usd}`,
1916
1921
  leverCalls: (calls, spent) => `${calls}, ${spent} spent`,
1917
- leverPromptCeiling: (usd, pct) => `For comparison: shortening the prompt text can touch ${usd} at the very most — ${pct} of this bill, and only if you deleted every input token. The real figure is far below that, because most of those tokens are retrieved context, conversation history and tool results that no prompt file contains.`,
1922
+ leverPromptCeiling: (usd, pct) => `For comparison: shortening the prompt text can touch ${usd} at the very most, ${pct} of this bill, and only if you deleted every input token. The real figure is far below that, because most of those tokens are retrieved context, conversation history and tool results that no prompt file contains.`,
1918
1923
  historyHeading: () => 'What re-sending the conversation costs',
1919
1924
  historyGrowth: (label, model, first, last, turns) => `${label} on ${model}: input ranges from ${first} tokens on the smallest turn to ${last} on the largest, over conversations of up to ${turns} turns.`,
1920
- historyCeiling: (usd, pct, flat, spent) => `If every turn had been the size of its smallest one, that input would have cost ${flat} instead of ${spent} — so at most ${usd} of this bill is conversation growth (${pct}). It is a ceiling and not a saving: some of that is the user's own new messages, which nothing can truncate away, and this reads counts rather than content so it cannot tell the two apart. What moves it is capping the history you replay, or summarising it.`,
1921
- truncatedWaste: (calls, usd, pct) => `${calls} hit the max_tokens ceiling: ${usd} of the output spend (${pct}) bought answers that were cut off mid-generation — paid in full, frequently retried and billed again. Where the answer genuinely needs the room, raise max_tokens; where it does not, ask for less. Either way this is the one slice of a bill that is waste without a counterpart.`,
1925
+ historyCeiling: (usd, pct, flat, spent) => `If every turn had been the size of its smallest one, that input would have cost ${flat} instead of ${spent}, so at most ${usd} of this bill is conversation growth (${pct}). It is a ceiling and not a saving: some of that is the user's own new messages, which nothing can truncate away, and this reads counts rather than content so it cannot tell the two apart. What moves it is capping the history you replay, or summarising it.`,
1926
+ truncatedWaste: (calls, usd, pct) => `${calls} hit the max_tokens ceiling: ${usd} of the output spend (${pct}) bought answers that were cut off mid-generation, paid in full, frequently retried and billed again. Where the answer genuinely needs the room, raise max_tokens; where it does not, ask for less. Either way this is the one slice of a bill that is waste without a counterpart.`,
1922
1927
  againstHeading: () => 'Against the previous log',
1923
- againstTotals: (before, after, delta, pct, callsBefore, callsAfter) => `${before} → ${after} ${delta} (${pct}) ${callsBefore} → ${callsAfter}. Positive means the bill grew. Both figures are exactly what each file holds — no period is assumed, so judge the call counts before judging the money.`,
1928
+ againstTotals: (before, after, delta, pct, callsBefore, callsAfter) => `${before} → ${after} ${delta} (${pct}) ${callsBefore} → ${callsAfter}. Positive means the bill grew. Both figures are exactly what each file holds, no period is assumed, so judge the call counts before judging the money.`,
1924
1929
  againstDriver: (delta, label, before, after) => `${delta} ${label} (${before} → ${after})`,
1925
1930
  againstDriverNew: (delta, label) => `${delta} ${label} (new since the previous log)`,
1926
1931
  againstDriverGone: (delta, label) => `${delta} ${label} (gone since the previous log)`,
1927
- againstByModel: () => 'The same change, by model — where the mix moved:',
1928
- labelPrefixBelowMinimum: (file, prefix, minimum, model) => `${file} (as it is today — the log may predate it): the stable prefix is ${prefix} tokens and ${model} caches nothing under ${minimum}. Setting cache_control there does not error, it simply never caches — which is what a cache that only writes looks like from the bill.`,
1929
- labelPrefixMovable: (file, movable, prefix) => `${file} (as it is today — the log may predate it): ~${movable} stable tokens sit after the first placeholder, where caching cannot reach them; the cacheable prefix is ${prefix}. "trazum optimize ${file} --reorder" moves them in front and shows the diff.`,
1930
- labelPrefixHealthy: (file, prefix, minimum) => `${file} (as it is today — the log may predate it): the stable prefix is ${prefix} tokens, over the ${minimum} minimum. The prompt file is not the problem; look at whether the prefix is byte-identical between calls.`,
1931
- labelFileMissing: (label, file) => `labels["${label}"] points at ${file}, which does not exist — the mapping was skipped.`,
1932
+ againstByModel: () => 'The same change, by model, where the mix moved:',
1933
+ labelPrefixBelowMinimum: (file, prefix, minimum, model) => `${file} (as it is today, and the log may predate it): the stable prefix is ${prefix} tokens and ${model} caches nothing under ${minimum}. Setting cache_control there does not error, it simply never caches, which is what a cache that only writes looks like from the bill.`,
1934
+ labelPrefixMovable: (file, movable, prefix) => `${file} (as it is today, and the log may predate it): ~${movable} stable tokens sit after the first placeholder, where caching cannot reach them; the cacheable prefix is ${prefix}. "trazum optimize ${file} --reorder" moves them in front and shows the diff.`,
1935
+ labelPrefixHealthy: (file, prefix, minimum) => `${file} (as it is today, and the log may predate it): the stable prefix is ${prefix} tokens, over the ${minimum} minimum. The prompt file is not the problem; look at whether the prefix is byte-identical between calls.`,
1936
+ labelFileMissing: (label, file) => `labels["${label}"] points at ${file}, which does not exist: the mapping was skipped.`,
1932
1937
  againstNothingPriced: () => 'The previous log has nothing the pricing catalogue knows, so there is no comparison to make.',
1933
- truncatedNotRecorded: () => 'Whether any answers were cut off could not be measured — no call in this log carries a stop reason. Add "stop_reason" (Anthropic) or "finish_reason" (OpenAI) to the record; the API already returns it beside "usage".',
1934
- historyNoSessions: () => 'No call in this log carried a session, so what re-sending the conversation costs could not be measured — usually the largest line on a chat or agent bill. Add "session" (or "conversation_id") to the record and run this again. Trazum groups by it and never prints it.',
1935
- leversUnlabelled: () => 'None of these calls carried a label, so this is every workload in one row — a classifier and a RAG pipeline merged into a single figure, with one route suggested for both. Add "label" to the record and the levers split by workload, which is the grouping a decision is actually made at.',
1938
+ truncatedNotRecorded: () => 'Whether any answers were cut off could not be measured, no call in this log carries a stop reason. Add "stop_reason" (Anthropic) or "finish_reason" (OpenAI) to the record; the API already returns it beside "usage".',
1939
+ historyNoSessions: () => 'No call in this log carried a session, so what re-sending the conversation costs could not be measured, usually the largest line on a chat or agent bill. Add "session" (or "conversation_id") to the record and run this again. Trazum groups by it and never prints it.',
1940
+ leversUnlabelled: () => 'None of these calls carried a label, so this is every workload in one row, a classifier and a RAG pipeline merged into a single figure, with one route suggested for both. Add "label" to the record and the levers split by workload, which is the grouping a decision is actually made at.',
1936
1941
  outputShapeHeading: () => 'Where the output spend concentrates',
1937
- outputTail: (label, model, callPct, spendPct, above, usd) => `${label} on ${model}: ${callPct} of calls hold ${spendPct} of the output spend — the ones answering with more than ${above} tokens, out of ${usd} of output on this slice.`,
1942
+ outputTail: (label, model, callPct, spendPct, above, usd) => `${label} on ${model}: ${callPct} of calls hold ${spendPct} of the output spend, the ones answering with more than ${above} tokens, out of ${usd} of output on this slice.`,
1938
1943
  outputTailAdvice: () => 'That is a tail, and a tail has a cause: a path through the prompt that invites an essay, a call with no max_tokens, a retrieval that returned a book. Finding it is a morning; it is not "make everything shorter".',
1939
- outputFlat: (label, model, callPct, spendPct, usd) => `${label} on ${model}: the output spend sits where the calls are — ${callPct} of them hold ${spendPct} of ${usd}. There is no tail to hunt.`,
1944
+ outputFlat: (label, model, callPct, spendPct, usd) => `${label} on ${model}: the output spend sits where the calls are, ${callPct} of them hold ${spendPct} of ${usd}. There is no tail to hunt.`,
1940
1945
  outputFlatAdvice: () => 'The answer length is the task here, so the levers are the blunt ones: ask for shorter answers in the prompt, and cap max_tokens.',
1941
- outputPercentiles: (p50, p95) => `Half the measured answers fit within ${p50} output tokens, and 95% within ${p95} — the number a max_tokens cap actually wants. Measured on these calls, promised for nothing.`,
1946
+ outputPercentiles: (p50, p95) => `Half the measured answers fit within ${p50} output tokens, and 95% within ${p95}, the number a max_tokens cap actually wants. Measured on these calls, promised for nothing.`,
1942
1947
  inputShapeHeading: () => 'How big these calls are',
1943
- inputSkewed: (label, model, p50, p95, ratio, usd) => `${label} on ${model} is uneven: half its calls fit within ${p50} input tokens and 95% within ${p95} — about ${ratio}x the ordinary call, over ${usd} of input spend.`,
1948
+ inputSkewed: (label, model, p50, p95, ratio, usd) => `${label} on ${model} is uneven: half its calls fit within ${p50} input tokens and 95% within ${p95}, about ${ratio}x the ordinary call, over ${usd} of input spend.`,
1944
1949
  inputSkewedAdvice: () => 'Past four times the median, the ordinary call is fine and something is growing on top of it: a conversation nobody truncates, a retrieval with no cap, a tool result pasted in whole. The fix is a limit on the large calls, not a rewrite of the prompt every call sends.',
1945
1950
  inputEven: (label, model, p50, p95, usd) => `${label} on ${model} is even: half its calls fit within ${p50} input tokens and 95% within ${p95}, over ${usd} of input spend.`,
1946
- inputEvenAdvice: () => 'The large calls are not much larger than the ordinary one, so there is no tail to cap — the prompt is simply big. The levers are fewer retrieved documents, a shorter system block, and caching if the prefix repeats.',
1947
- inputHuge: (label, model, calls, usd) => `${label} on ${model}: every one of its ${calls} is larger than this tool measures precisely, over ${usd} of input spend. No ceiling is named because there is none to name honestly — that size is itself the finding.`,
1951
+ inputEvenAdvice: () => 'The large calls are not much larger than the ordinary one, so there is no tail to cap: the prompt is simply big. The levers are fewer retrieved documents, a shorter system block, and caching if the prefix repeats.',
1952
+ inputHuge: (label, model, calls, usd) => `${label} on ${model}: every one of its ${calls} is larger than this tool measures precisely, over ${usd} of input spend. No ceiling is named because there is none to name honestly: that size is itself the finding.`,
1948
1953
  repeatsHeading: () => 'The same request, sent again',
1949
1954
  repeatsFound: (label, model, repeats, checked, seconds, usd) => `${label} on ${model}: ${repeats} of ${checked} calls re-sent the previous call's exact input size within ${seconds} seconds, in the same conversation, costing ${usd}.`,
1950
1955
  pressureHeading: () => 'Approaching the context window',
1951
- pressureLine: (label, model, tokens, window, share) => `${label} on ${model}: the largest call carried ${tokens} input tokens against a ${window}-token window — ${share} of the ceiling.`,
1956
+ pressureLine: (label, model, tokens, window, share) => `${label} on ${model}: the largest call carried ${tokens} input tokens against a ${window}-token window, ${share} of the ceiling.`,
1952
1957
  mixDriftHeading: () => 'The mix moved inside this log',
1953
- mixDriftLine: (model, firstShare, lastShare, firstDays, lastDays, lastUsd) => `${model} went from ${firstShare} of the spend in the first ${firstDays} days to ${lastShare} in the last ${lastDays} — ${lastUsd} of the recent half.`,
1954
- truncationRetryLine: (label, model, retried, truncated, seconds, wasted, retry) => `${label} on ${model}: ${retried} of ${truncated} truncated answers were followed within ${seconds} seconds by another call in the same conversation — ${wasted} spent on the cut attempts, plus ${retry} on the follow-ups.`,
1958
+ mixDriftLine: (model, firstShare, lastShare, firstDays, lastDays, lastUsd) => `${model} went from ${firstShare} of the spend in the first ${firstDays} days to ${lastShare} in the last ${lastDays}, ${lastUsd} of the recent half.`,
1959
+ truncationRetryLine: (label, model, retried, truncated, seconds, wasted, retry) => `${label} on ${model}: ${retried} of ${truncated} truncated answers were followed within ${seconds} seconds by another call in the same conversation, ${wasted} spent on the cut attempts, plus ${retry} on the follow-ups.`,
1955
1960
  truncationRetryNote: () => 'The pair is the shape a retry has; the log cannot see content, so whether each was one is yours to know. Both sides of it are real money, and the fix is the same either way: a max_tokens the answers actually fit in.',
1956
1961
  mixDriftNote: () => 'A bill can grow with no workload growing: traffic migrating between models, a deploy that flipped a default, a fallback that became the main path. Shown past fifteen points of movement. Where the mix goes next is not in this log, so it is not said here.',
1957
1962
  pressureAdvice: () => 'At 100% the call fails outright, and nothing on the bill changes until that day. The levers are a cap on retrieved context, truncating conversation history, or a larger-window model. When it crosses is not predicted here: the share is a fact, the trajectory is yours to know.',
1958
- repeatsAdvice: () => 'A conversation\'s input grows with every turn, so the same size twice in a row seconds apart is usually a retry after a timeout, an agent step repeating, or a loop — this reads counts and cannot see content, so it names the pattern and stops. Whatever it is, the money bought nothing the call before it had not already paid for.',
1959
- inputMostlyCached: (share) => `${share} of those tokens were cache reads, billed at a tenth of the input rate — the size is real and most of it is cheap.`,
1963
+ repeatsAdvice: () => 'A conversation\'s input grows with every turn, so the same size twice in a row seconds apart is usually a retry after a timeout, an agent step repeating, or a loop: this reads counts and cannot see content, so it names the pattern and stops. Whatever it is, the money bought nothing the call before it had not already paid for.',
1964
+ inputMostlyCached: (share) => `${share} of those tokens were cache reads, billed at a tenth of the input rate: the size is real and most of it is cheap.`,
1960
1965
  inputFullRate: () => 'Almost none of that was a cache read, so every one of those tokens was billed at the full input rate. If any prefix repeats across these calls, caching is the lever with the largest ceiling here.',
1961
1966
  leversNone: () => 'Nothing here clears 1% of the bill: these calls are already on the cheapest model of their family, or their provider has no batch API. That is a real answer, not an empty section.',
1962
1967
  assumedWriteTtl: (calls) => `${count(calls)} ${calls === 1 ? 'call did' : 'calls did'} not say which cache-write TTL was used, so the cheaper 5-minute rate was assumed. A 1-hour entry costs 2x input rather than 1.25x, so this total is a floor for those calls. Record the "cache_creation" object the API returns to remove the assumption.`,
1963
- spanLine: (from, to, days) => `This log covers ${from} → ${to} (${days} days). The span is stated, never extrapolated — the monthly arithmetic is yours to do, and now it is valid.`,
1968
+ spanLine: (from, to, days) => `This log covers ${from} → ${to} (${days} days). The span is stated, never extrapolated: the monthly arithmetic is yours to do, and now it is valid.`,
1964
1969
  spanPartial: (withTs, total) => `Only ${withTs} of ${total} calls carry a timestamp; the span describes those.`,
1965
- ttlFitExpires: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart and the 5-minute entry is gone by then — writes expire before the next turn reads them, which from the bill is a cache that only writes. The 1-hour TTL costs 2x input to write and would survive these gaps; the other honest option is caching switched off here.`,
1966
- ttlFitExpiresBoth: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart, and no cache entry lives that long — even the 1-hour TTL is gone by the next turn. Caching cannot work at this pace; turn it off here and stop paying the write premium.`,
1967
- ttlFitOverlong: (label, model, gap, usd) => `${label} on ${model}: turns arrive a median of ${gap} apart — comfortably inside the 5-minute window — and these writes pay the 1-hour rate, 2x input against 1.25x, for endurance the gaps never use. The same writes at the 5-minute TTL are ${usd} cheaper on this log, and that figure is exact: the same tokens at the other published rate.`,
1968
- ttlFitUnsettledGap: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart — a 5-minute entry is gone by then and a 1-hour one survives — and the log did not record which these writes were, so whether they ever get read back cannot be settled. Record the "cache_creation" object the API returns and it settles itself.`,
1970
+ ttlFitExpires: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart and the 5-minute entry is gone by then, writes expire before the next turn reads them, which from the bill is a cache that only writes. The 1-hour TTL costs 2x input to write and would survive these gaps; the other honest option is caching switched off here.`,
1971
+ ttlFitExpiresBoth: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart, and no cache entry lives that long, even the 1-hour TTL is gone by the next turn. Caching cannot work at this pace; turn it off here and stop paying the write premium.`,
1972
+ ttlFitOverlong: (label, model, gap, usd) => `${label} on ${model}: turns arrive a median of ${gap} apart, comfortably inside the 5-minute window, and these writes pay the 1-hour rate, 2x input against 1.25x, for endurance the gaps never use. The same writes at the 5-minute TTL are ${usd} cheaper on this log, and that figure is exact: the same tokens at the other published rate.`,
1973
+ ttlFitUnsettledGap: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart, which a 5-minute entry does not survive and a 1-hour one does, and the log did not record which these writes were, so whether they ever get read back cannot be settled. Record the "cache_creation" object the API returns and it settles itself.`,
1969
1974
  ttlFitFits: (label, model, gap) => `${label} on ${model}: turns arrive a median of ${gap} apart, inside the lifetime these writes use. The TTL is not the problem here.`,
1970
- ttlFitUnmeasured: () => 'Whether the cache TTL fits how fast the turns arrive could not be measured — it needs both "session" and "ts" on the record. A 5-minute entry on a workload whose turns come nine minutes apart expires unread on every write, and only the clock can see it. Trazum groups by the session and never shows it.',
1975
+ ttlFitUnmeasured: () => 'Whether the cache TTL fits how fast the turns arrive could not be measured, it needs both "session" and "ts" on the record. A 5-minute entry on a workload whose turns come nine minutes apart expires unread on every write, and only the clock can see it. Trazum groups by the session and never shows it.',
1971
1976
  dayPeak: (day, usd, xMedian) => `The most expensive day in this log was ${day}: ${usd}, ${xMedian}x the median day.`,
1972
1977
  dayPeakLabel: (label, usd) => `Most of it was ${label} (${usd}).`,
1973
1978
  maxUsdOk: (total, max) => `Within budget: ${total} spent against --max-usd ${max}.`,
1974
- maxUsdFailed: (total, max) => `FAILED — this log spent ${total} against a --max-usd of ${max}. The figures are the provider's own billed counts over exactly this log; no period was assumed.`,
1975
- maxGrowthUsdFailed: (delta, max) => `FAILED — the bill grew ${delta} against the previous log, over the --max-growth-usd limit of ${max}.`,
1979
+ maxUsdFailed: (total, max) => `FAILED: this log spent ${total} against a --max-usd of ${max}. The figures are the provider's own billed counts over exactly this log; no period was assumed.`,
1980
+ maxGrowthUsdFailed: (delta, max) => `FAILED, the bill grew ${delta} against the previous log, over the --max-growth-usd limit of ${max}.`,
1976
1981
  maxGrowthNeedsAgainst: () => '--max-growth-usd has nothing to compare without --against <previous.jsonl>. On its own it would have run silently and gated nothing, which is not an answer.',
1977
1982
  maxCacheLossOk: (worst, max) => `Cache within budget: caching cost at most ${worst} against --max-cache-loss-usd ${max}, worst case included.`,
1978
- maxCacheLossFailed: (delta, max) => `FAILED — caching added ${delta} to this bill (the same tokens as plain input would have cost less), over the --max-cache-loss-usd limit of ${max}. The counterfactual is exact: the same tokens at the published input rate.`,
1983
+ maxCacheLossFailed: (delta, max) => `FAILED, caching added ${delta} to this bill (the same tokens as plain input would have cost less), over the --max-cache-loss-usd limit of ${max}. The counterfactual is exact: the same tokens at the published input rate.`,
1979
1984
  maxDayOk: (day, usd, max) => `No single day over budget: the worst was ${day} at ${usd}, against --max-day-usd ${max}.`,
1980
- maxDayFailed: (day, usd, max) => `FAILED — ${day} spent ${usd}, over the --max-day-usd limit of ${max}. A total under budget can hide a single runaway day, which is what this gate exists to catch.`,
1981
- maxDayNoClock: () => 'FAILED — --max-day-usd was asked for and no record in this log carries a timestamp, so there are no days to judge. That is not a pass: a bill nobody could measure by day is not a bill that stayed under a daily budget. Add "ts" to the record and the gate arms.',
1985
+ maxDayFailed: (day, usd, max) => `FAILED, ${day} spent ${usd}, over the --max-day-usd limit of ${max}. A total under budget can hide a single runaway day, which is what this gate exists to catch.`,
1986
+ maxDayNoClock: () => 'FAILED, --max-day-usd was asked for and no record in this log carries a timestamp, so there are no days to judge. That is not a pass: a bill nobody could measure by day is not a bill that stayed under a daily budget. Add "ts" to the record and the gate arms.',
1982
1987
  maxSessionOk: (worst, max, sessions) => `No conversation over budget: the most expensive of ${sessions} cost ${worst}, against --max-session-usd ${max}. A conversation that started before this log is counted only for the turns recorded here, so this is a floor.`,
1983
- maxSessionFailed: (worst, max, sessions) => `FAILED — the most expensive of ${sessions} conversations cost ${worst}, over the --max-session-usd limit of ${max}. A month's budget and a day's budget both pass while one conversation loops its way through this; the per-conversation figure is the one that catches it.`,
1984
- maxSessionNoSessions: () => 'FAILED — --max-session-usd was asked for and no record in this log carries a session, so there are no conversations to judge. That is not a pass. Add "session" (or "conversation_id") to the record and the gate arms; Trazum groups by it and never prints it.',
1985
- maxDayUndated: (calls) => `${calls} calls carry no timestamp, so they are in the bill and in none of the days above — the worst day is a floor by whatever they held. A failure would stand regardless; this pass is over the part that could be dated.`,
1986
- maxCacheLossWorstCase: (calls, worst, max) => `FAILED — ${count(calls)} ${calls === 1 ? 'call' : 'calls'} did not record which cache-write TTL was paid, and at the 1-hour rate caching added up to ${worst}, over the --max-cache-loss-usd limit of ${max}. The gate reads the worst case on purpose: a gate reading the flattering half would pass exactly the bills it exists to catch. Record the "cache_creation" object the API returns and the ceiling becomes a figure.`,
1987
- pricesStale: (date, days) => `The price table behind every dollar here was last reviewed ${date} — ${count(days)} days ago, past the 45 this tool considers current. If the provider changed prices since, this report is wrong by exactly that change. --pricing-live fetches today's prices; --pricing overlays your own.`,
1988
+ maxSessionFailed: (worst, max, sessions) => `FAILED: the most expensive of ${sessions} conversations cost ${worst}, over the --max-session-usd limit of ${max}. A month's budget and a day's budget both pass while one conversation loops its way through this; the per-conversation figure is the one that catches it.`,
1989
+ maxSessionNoSessions: () => 'FAILED, --max-session-usd was asked for and no record in this log carries a session, so there are no conversations to judge. That is not a pass. Add "session" (or "conversation_id") to the record and the gate arms; Trazum groups by it and never prints it.',
1990
+ maxDayUndated: (calls) => `${calls} calls carry no timestamp, so they are in the bill and in none of the days above: the worst day is a floor by whatever they held. A failure would stand regardless; this pass is over the part that could be dated.`,
1991
+ maxCacheLossWorstCase: (calls, worst, max) => `FAILED, ${count(calls)} ${calls === 1 ? 'call' : 'calls'} did not record which cache-write TTL was paid, and at the 1-hour rate caching added up to ${worst}, over the --max-cache-loss-usd limit of ${max}. The gate reads the worst case on purpose: a gate reading the flattering half would pass exactly the bills it exists to catch. Record the "cache_creation" object the API returns and the ceiling becomes a figure.`,
1992
+ pricesStale: (date, days) => `The price table behind every dollar here was last reviewed ${date}, ${count(days)} days ago, past the 45 this tool considers current. If the provider changed prices since, this report is wrong by exactly that change. --pricing-live fetches today's prices; --pricing overlays your own.`,
1988
1993
  dayTableDay: () => 'Day (UTC)',
1989
1994
  dayTableCalls: () => 'calls',
1990
1995
  dayTableTop: () => 'biggest that day',
1991
1996
  dayTableEarlier: (days) => `…and ${count(days)} earlier ${days === 1 ? 'day' : 'days'} not shown here. The full series rides --json as spendByDay.`,
1992
- gateOnFloor: (reasons) => `Note: the gated figure is a floor, not the bill — ${reasons}. Whatever those calls cost is not in the number the gate just judged, so a pass here means "the part I could read fits", never "the bill fits".`,
1997
+ gateOnFloor: (reasons) => `Note: the gated figure is a floor, not the bill, ${reasons}. Whatever those calls cost is not in the number the gate just judged, so a pass here means "the part I could read fits", never "the bill fits".`,
1993
1998
  floorSkipped: (lines) => `${count(lines)} ${lines === 1 ? 'line was' : 'lines were'} unreadable and left out`,
1994
1999
  floorUnpriced: (calls) => `${count(calls)} ${calls === 1 ? 'call is' : 'calls are'} on models the price table does not know`,
1995
2000
  floorUndated: (calls) => `${count(calls)} ${calls === 1 ? 'call carries' : 'calls carry'} no timestamp and fell outside the window`,
1996
- sessionCost: (label, model, sessions, median, medianTurns, p95, max) => `${label} on ${model}: across ${sessions} conversations, the median one costs ${median} over ${medianTurns} turns, 95% come in under ${p95}, and the most expensive was ${max}. Exact billed counts, per conversation — the figure a per-seat price or a quota is set from. A conversation that started before this log or continues after it is counted only for the turns recorded here.`,
2001
+ sessionCost: (label, model, sessions, median, medianTurns, p95, max) => `${label} on ${model}: across ${sessions} conversations, the median one costs ${median} over ${medianTurns} turns, 95% come in under ${p95}, and the most expensive was ${max}. Exact billed counts, per conversation: the figure a per-seat price or a quota is set from. A conversation that started before this log or continues after it is counted only for the turns recorded here.`,
1997
2002
  labelBudgetOk: (label, usd, max) => `Within budget: ${label} spent ${usd} against ${max}.`,
1998
- labelBudgetFailed: (label, usd, max) => `FAILED — ${label} spent ${usd} against its budget of ${max} in trazum.config.json.`,
2003
+ labelBudgetFailed: (label, usd, max) => `FAILED, ${label} spent ${usd} against its budget of ${max} in trazum.config.json.`,
1999
2004
  labelBudgetMissing: (label) => `${label} has a budget in trazum.config.json and no calls in this log, so nothing was measured for it. Not a pass: a workload that did not appear is not a workload that came in under budget.`,
2000
2005
  labelBudgetWindowed: () => 'Per-label budgets in trazum.config.json were not applied: --since/--until make "what this label spent" mean a slice, and a budget written for the whole period would be gating against something it does not describe.',
2001
- duplicateLines: (calls, usd) => `${plural(calls, 'line is an exact duplicate', `lines are exact duplicates`)} of an earlier line — same counts, same label and session, same millisecond — and that adds ${usd} to the total above. If a log was exported twice or two files in a directory overlap, this bill is overstated by that much. Two real calls colliding on all of that is possible; it is just unlikely.`,
2002
- budgetVsWire: (label, file, budget, perCall, share) => `The budget on ${file} is ${budget} tokens, and calls labelled ${label} carry about ${perCall} input tokens each — so that gate governs roughly ${share} of what actually goes up the wire. The rest is retrieved context, conversation history and tool results, which no prompt file contains and no budget on one can see. The budget is not wrong; it is just smaller than the bill.`,
2003
- badCsvShape: (value) => `--csv-shape does not know "${value}". It takes "slice" (one row per label and model, the default), "day", "hour" or "model-day" (one row per day and model — the long format a pivot table wants).`,
2006
+ duplicateLines: (calls, usd) => `${plural(calls, 'line is an exact duplicate', `lines are exact duplicates`)} of an earlier line, same counts, same label and session, same millisecond, and that adds ${usd} to the total above. If a log was exported twice or two files in a directory overlap, this bill is overstated by that much. Two real calls colliding on all of that is possible; it is just unlikely.`,
2007
+ budgetVsWire: (label, file, budget, perCall, share) => `The budget on ${file} is ${budget} tokens, and calls labelled ${label} carry about ${perCall} input tokens each, so that gate governs roughly ${share} of what actually goes up the wire. The rest is retrieved context, conversation history and tool results, which no prompt file contains and no budget on one can see. The budget is not wrong; it is just smaller than the bill.`,
2008
+ badCsvShape: (value) => `--csv-shape does not know "${value}". It takes "slice" (one row per label and model, the default), "day", "hour" or "model-day" (one row per day and model, the long format a pivot table wants).`,
2004
2009
  whatIfHeading: (model) => `These exact calls on ${model}`,
2005
2010
  whatIfAssumption: () => 'This is multiplication, not advice: the same token counts at another rate card. It says nothing about whether that model could do the work, and a model that answers at greater length or gets retried would not send these counts at all.',
2006
- whatIfTotal: (current, target, delta) => `${current} of movable spend would have been ${target} — a difference of ${delta}.`,
2011
+ whatIfTotal: (current, target, delta) => `${current} of movable spend would have been ${target}, a difference of ${delta}.`,
2007
2012
  whatIfCheaper: () => 'Verify before you move anything: trazum route measures one prompt against both models on your own examples.',
2008
2013
  whatIfDearer: () => 'That direction costs more. The arithmetic is here so the number is not a guess.',
2009
- whatIfBatchOnTarget: (batched, moved) => `If those calls can also wait, the target's Batch API takes the moved bill from ${moved} to ${batched} — the discount applies to the target's rates, not the ones you left. Whether they can wait is not in the log; that half of the decision is yours.`,
2010
- whatIfCacheBeyond: (largest, min, noCache) => `Its cache traffic could not exist there: the largest call is ${largest} tokens against the target's ${min}-token cache minimum, so no call in this slice could create an entry. Without the cache the same tokens cost ${noCache} — that is the figure the target would actually bill, and the row above flatters the move.`,
2014
+ whatIfBatchOnTarget: (batched, moved) => `If those calls can also wait, the target's Batch API takes the moved bill from ${moved} to ${batched}, the discount applies to the target's rates, not the ones you left. Whether they can wait is not in the log; that half of the decision is yours.`,
2015
+ whatIfCacheBeyond: (largest, min, noCache) => `Its cache traffic could not exist there: the largest call is ${largest} tokens against the target's ${min}-token cache minimum, so no call in this slice could create an entry. Without the cache the same tokens cost ${noCache}: that is the figure the target would actually bill, and the row above flatters the move.`,
2011
2016
  whatIfSlice: (label, model, current, target) => `${label} on ${model}: ${current} → ${target}`,
2012
2017
  whatIfOverContext: (label, tokens, window, usd) => `${label} cannot move: its largest call carries ${tokens} input tokens and that model's window is ${window}. Those calls would fail, not cost less, so their ${usd} is excluded from the figures above.`,
2013
- whatIfAlreadyThere: (calls, usd) => `Already on that model: ${calls} worth ${usd}, left out of the figures above — money that cannot move would make the difference look smaller than it is.`,
2018
+ whatIfAlreadyThere: (calls, usd) => `Already on that model: ${calls} worth ${usd}, left out of the figures above, because money that cannot move would make the difference look smaller than it is.`,
2014
2019
  whatIfUnpriced: (calls, models) => `Excluded: ${calls} whose model has no price here (${models}). Their cost on the target is knowable; the difference is not, because there is no current figure to subtract from.`,
2015
2020
  whatIfNothingToMove: () => 'Nothing to compare: every priced call in this log is already on that model, or too large for its context window.',
2016
2021
  whatIfUnknown: (value, available) => `--what-if does not know "${value}". Priced models: ${available}. Add it with --pricing if you have its rates.`,
2017
2022
  badGzip: (file, detail) => `${file} is gzipped and would not decompress: ${detail}. Reading the rest and saying nothing would report a bill missing whatever that file held, so this stops instead. Check the file, or move it out of the directory.`,
2018
- dryRunHeading: () => 'What this log can answer — no bill was produced',
2023
+ dryRunHeading: () => 'What this log can answer, no bill was produced',
2019
2024
  dryRunParsed: (parsed, skipped) => `${parsed} records parse; ${skipped} lines could not be read. A dry run prices nothing: the point is what the gates you are about to wire would stand on.`,
2020
2025
  dryRunUnpriced: (models) => `Models the price table does not know: ${models}. Their tokens parse; their dollars need a --pricing overlay.`,
2021
2026
  dryRunTotals: () => 'The bill itself: totals, per-model split, cache economics, the levers.',
2022
- dryRunLabels: (share) => `Per-workload findings and label budgets — "label" on ${share} of records.`,
2023
- dryRunClock: (share) => `The period, per-day and per-hour shape, --max-day-usd, --since/--until — a timestamp on ${share} of records.`,
2024
- dryRunSessions: (share) => `Conversation growth, per-conversation cost, --max-session-usd — a session on ${share} of records. Grouped by, never printed.`,
2025
- dryRunStopReason: (share) => `Truncated answers and their retry bill — a stop reason on ${share} of records.`,
2026
- dryRunCacheTtl: (ttl, writes) => `Settled cache verdicts — the "cache_creation" split on ${ttl} of ${writes} cache-writing records.`,
2027
- dryRunNoCacheTraffic: () => 'Cache verdicts: nothing wrote to the cache in this log, so there is nothing to settle — not a missing field.',
2027
+ dryRunLabels: (share) => `Per-workload findings and label budgets, "label" on ${share} of records.`,
2028
+ dryRunClock: (share) => `The period, per-day and per-hour shape, --max-day-usd, --since/--until, a timestamp on ${share} of records.`,
2029
+ dryRunSessions: (share) => `Conversation growth, per-conversation cost, --max-session-usd, a session on ${share} of records. Grouped by, never printed.`,
2030
+ dryRunStopReason: (share) => `Truncated answers and their retry bill, a stop reason on ${share} of records.`,
2031
+ dryRunCacheTtl: (ttl, writes) => `Settled cache verdicts, the "cache_creation" split on ${ttl} of ${writes} cache-writing records.`,
2032
+ dryRunNoCacheTraffic: () => 'Cache verdicts: nothing wrote to the cache in this log, so there is nothing to settle, not a missing field.',
2028
2033
  dryRunFooter: () => 'A ✗ is not a defect in the log; it is a finding this log cannot support yet. The README\'s recording recipe carries every field above.',
2029
2034
  dryRunNoGates: () => '--dry-run produces no bill, so a gate beside it would exit green having judged nothing. Run the gates without --dry-run.',
2030
- bySourceNeedsConfig: () => '--by-source reads the "sources" block in trazum.config.json — a name per service, each with glob patterns over log paths — and this config has none. Name at least one source.',
2035
+ bySourceNeedsConfig: () => '--by-source reads the "sources" block in trazum.config.json, a name per service, each with glob patterns over log paths, and this config has none. Name at least one source.',
2031
2036
  bySourceNothingMatched: (sources) => 'No log file matched any source pattern. The sources configured: ${sources}. Patterns match the paths as given on the command line.'.replace('${sources}', sources),
2032
2037
  fleetHeading: (count, total, calls) => `The fleet: ${count} sources · ${total} · ${calls}`,
2033
2038
  fleetRow: (name, usd, share, calls, span) => `${name} ${usd} ${share} of the fleet · ${calls} · ${span}`,
2034
2039
  fleetSpan: (days) => `${days} days`,
2035
2040
  fleetNoClock: () => 'no clock',
2036
2041
  fleetWorst: (name, usd, share) => `${name} is where the money is: ${usd}, ${share} of the fleet's total.`,
2037
- fleetMismatchedSpans: () => 'These sources cover different periods, so the shares above compare totals, not rates — a 3-day log looks cheap next to a 30-day one for reasons that have nothing to do with cost. Each row states its own span.',
2038
- fleetSplitBrain: (label, detail) => `The same workload runs on different models in different sources — ${label}: ${detail}. Same job, different rate cards; whether that is a decision or an accident is not in the logs.`,
2039
- fleetCacheUnderwater: (name, usd) => `Caching pays for the fleet overall but loses ${usd} in ${name} — the aggregate verdict was hiding it.`,
2040
- fleetUnmatched: (file) => `${file} matched no source pattern, so it is in no report above — spend missing from every bill until a pattern covers it.`,
2042
+ fleetMismatchedSpans: () => 'These sources cover different periods, so the shares above compare totals, not rates: a 3-day log looks cheap next to a 30-day one for reasons that have nothing to do with cost. Each row states its own span.',
2043
+ fleetSplitBrain: (label, detail) => `The same workload runs on different models in different sources, ${label}: ${detail}. Same job, different rate cards; whether that is a decision or an accident is not in the logs.`,
2044
+ fleetCacheUnderwater: (name, usd) => `Caching pays for the fleet overall but loses ${usd} in ${name}: the aggregate verdict was hiding it.`,
2045
+ fleetUnmatched: (file) => `${file} matched no source pattern, so it is in no report above, spend missing from every bill until a pattern covers it.`,
2041
2046
  fleetFooter: () => 'Summaries per source; the full report for one service is "trazum profile <its logs>". Same thresholds, same findings, one source at a time.',
2042
2047
  fleetBudgetOk: (name, usd, max) => `Within budget: ${name} spent ${usd} against its ${max} in spend.bySource.`,
2043
- fleetBudgetFailed: (name, usd, max) => `FAILED — ${name} spent ${usd} against its budget of ${max} in spend.bySource. The fleet total can be fine while one service bleeds; this gate names which.`,
2048
+ fleetBudgetFailed: (name, usd, max) => `FAILED, ${name} spent ${usd} against its budget of ${max} in spend.bySource. The fleet total can be fine while one service bleeds; this gate names which.`,
2044
2049
  fleetBudgetMissing: (name) => `${name} has a budget in spend.bySource and no logs matched it in this run, so nothing was measured for it. Not a pass: a service that did not appear is not a service under budget.`,
2045
2050
  coverageHeading: () => 'What this log cannot answer yet',
2046
2051
  needsLabel: (seen) => `"label" on ${seen} records: without it every workload is one row, so no per-workload spend, no drill-down, and the levers describe a mixture rather than a decision.`,
2047
- needsOutcome: (seen) => `an "outcome" — ${seen}. The one field that changes what every other figure here means: without it this tool can say a workload got 40% cheaper and cannot say whether it stopped working. Record your own word for what happened and declare the vocabulary under "outcomes".`,
2052
+ needsOutcome: (seen) => `an "outcome", ${seen}. The one field that changes what every other figure here means: without it this tool can say a workload got 40% cheaper and cannot say whether it stopped working. Record your own word for what happened and declare the vocabulary under "outcomes".`,
2048
2053
  dryRunOutcomes: (share) => `cost per outcome and a success rate (${share} of records carry an "outcome")`,
2049
2054
  outcomeHeading: () => 'Outcomes',
2050
- outcomeRate: (rate, ofUsd) => `${rate} of ${ofUsd} in declared outcomes succeeded \u2014 by spend rather than by call, because the two diverge exactly when the expensive half is the half that fails.`,
2055
+ outcomeRate: (rate, ofUsd) => `${rate} of ${ofUsd} in declared outcomes succeeded, by spend rather than by call, because the two diverge exactly when the expensive half is the half that fails.`,
2051
2056
  outcomeNoRate: (why) => why === 'nothing-recorded'
2052
- ? 'No success rate: nothing in this log recorded an outcome. That is not a rate of zero \u2014 a rate of zero is a real and terrible measurement, and this is nobody having told us.'
2057
+ ? 'No success rate: nothing in this log recorded an outcome. That is not a rate of zero, a rate of zero is a real and terrible measurement, and this is nobody having told us.'
2053
2058
  : 'No success rate: "outcomes.success" declares no values, so nothing here counts as one. A legitimate thing to declare, and it means the rate is not this tool\u2019s to compute.',
2054
2059
  outcomeUnrecorded: (share, usd) => `${share} of the bill (${usd}) carried no outcome, and is in neither half of the rate above.`,
2055
- outcomeUndeclared: (values) => `Not declared in "outcomes.values": ${values}. Named rather than counted as failures \u2014 a typo in an exporter should look like a typo, not like a product regression.`,
2060
+ outcomeUndeclared: (values) => `Not declared in "outcomes.values": ${values}. Named rather than counted as failures, a typo in an exporter should look like a typo, not like a product regression.`,
2056
2061
  perOutcomeHeading: () => 'What an outcome costs',
2057
2062
  perOutcomeRow: (key, perCall, perOutcome, coverage) => `${key} ${perCall} ${perOutcome} ${coverage}`,
2058
2063
  perOutcomeColumns: {
@@ -2070,37 +2075,37 @@ ${bold('EXAMPLES')}
2070
2075
  : why === 'nothing-recorded'
2071
2076
  ? 'not recorded'
2072
2077
  : 'no vocabulary',
2073
- perOutcomeNumerator: () => 'Per success divides the spend on calls that recorded an outcome, never the whole bill \u2014 dividing everything would charge your uninstrumented traffic to your measured successes and report a figure too high by exactly the uncovered share, silently, in the direction that gets a working feature killed. "recorded" is what share of each workload\u2019s spend the figure covers.',
2078
+ perOutcomeNumerator: () => 'Per success divides the spend on calls that recorded an outcome, never the whole bill, dividing everything would charge your uninstrumented traffic to your measured successes and report a figure too high by exactly the uncovered share, silently, in the direction that gets a working feature killed. "recorded" is what share of each workload\u2019s spend the figure covers.',
2074
2079
  perOutcomeDisagreement: (key, callRank, outcomeRank) => `${key} is #${callRank} by cost per call and #${outcomeRank} by cost per success.`,
2075
2080
  perOutcomeBothOrders: () => 'Cheapest per call and cheapest per success are different orders, and both are printed rather than one being picked. A workload can move up one while moving down the other, and somebody optimising on the first number would be moving the wrong one.',
2076
2081
  outcomeColumns: { outcome: 'outcome', calls: 'calls', spend: 'spend' },
2077
2082
  verdictSuccess: () => 'success',
2078
- verdictOther: () => '\u2014',
2083
+ verdictOther: () => 'other',
2079
2084
  verdictUndeclared: () => 'undeclared',
2080
2085
  needsSession: (seen) => `"session" on ${seen} records: without it there is no conversation growth, no per-conversation cost, and no cache-TTL fit. It is grouped by and never printed.`,
2081
2086
  needsTs: (seen) => `"ts" on ${seen} records: without it the log has no period, no per-day or per-hour shape, and the cache-TTL question cannot be asked at all.`,
2082
- needsStopReason: (seen) => `"stop_reason" (Anthropic) or "finish_reason" (OpenAI) on ${seen} records: without it, answers cut off at max_tokens are invisible — and silence there is not the same as none.`,
2087
+ needsStopReason: (seen) => `"stop_reason" (Anthropic) or "finish_reason" (OpenAI) on ${seen} records: without it, answers cut off at max_tokens are invisible, and silence there is not the same as none.`,
2083
2088
  needsCacheTtl: (seen) => `the "cache_creation" object on ${seen} of the records that wrote to the cache: without it the 5-minute rate is assumed, so those totals are a floor and some cache verdicts cannot be settled.`,
2084
- hoursConcentrated: (hours, list) => `80% of this spend lands in ${hours} hours of the UTC day (${list}) — interactive traffic somebody is waiting on, where the Batch API's 24-hour turnaround does not fit. Hours are UTC; shift them yourself if your traffic sits in one region.`,
2085
- hoursFlat: (hours) => `The spend is spread across the day: it takes ${hours} hours of the UTC day to cover 80% of it. That is the shape background work has, and background work is what the Batch API halves the price of — see the levers above for what it would be worth here. Whether these calls can wait is yours to say; the log only shows when they happened.`,
2086
- truncatedBy: (label, calls, measured, rate, usd) => `${label}: ${calls} of ${measured} calls that recorded a stop reason were cut off (${rate}), ${usd} of output. The denominator is the calls that measured, not every call — a workload logging the field half the time is not a workload whose other half completed.`,
2089
+ hoursConcentrated: (hours, list) => `80% of this spend lands in ${hours} hours of the UTC day (${list}), interactive traffic somebody is waiting on, where the Batch API's 24-hour turnaround does not fit. Hours are UTC; shift them yourself if your traffic sits in one region.`,
2090
+ hoursFlat: (hours) => `The spend is spread across the day: it takes ${hours} hours of the UTC day to cover 80% of it. That is the shape background work has, and background work is what the Batch API halves the price of. See the levers above for what it would be worth here. Whether these calls can wait is yours to say; the log only shows when they happened.`,
2091
+ truncatedBy: (label, calls, measured, rate, usd) => `${label}: ${calls} of ${measured} calls that recorded a stop reason were cut off (${rate}), ${usd} of output. The denominator is the calls that measured, not every call: a workload logging the field half the time is not a workload whose other half completed.`,
2087
2092
  truncatedCeiling: (p95) => `95% of the answers that finished fit within ${p95} output tokens, so a cap around there would stop cutting them off. Measured on these calls, promised for nothing.`,
2088
2093
  readFiles: (files, directory) => `Read ${count(files)} log files from ${directory}, in name order, as one bill. Every figure below covers all of them.`,
2089
2094
  noLogsInDirectory: (directory, extensions) => `No usage logs in "${directory}". Looked for files ending in ${extensions}. A directory with nothing readable in it is an error rather than an empty report, which would read as "you spent nothing".`,
2090
2095
  sessionCostTail: (ratio) => `The 95th percentile is ${ratio}x the median there: most conversations are cheap and a few are not, which is a tail a quota can catch. Where median and p95 sit close together the workload is simply expensive and there is no tail to hunt.`,
2091
- sessionSpendOnly: (sessions, max) => `${sessions} ${sessions === '1' ? 'conversation' : 'conversations'} in this log; the most expensive cost ${max}. Too few per workload for a percentile — a maximum is a fact at any count, and it is the figure --max-session-usd judges.`,
2092
- waiveActive: (gate, reason, until, daysLeft) => `WAIVED — the ${gate} failure above is on the record and silenced until ${until} (${daysLeft} days left): "${reason}". The bill still counts it; only the exit code is quiet, and the day the waiver expires this gate fails again.`,
2093
- waiveExpired: (gate, until, reason) => `The waiver on ${gate} expired on ${until} and no longer silences anything. It was written for: "${reason}". Renew it with a new date and a current reason, or fix what it was covering — an expired waiver left in place is a finding deleted with extra steps.`,
2096
+ sessionSpendOnly: (sessions, max) => `${sessions} ${sessions === '1' ? 'conversation' : 'conversations'} in this log; the most expensive cost ${max}. Too few per workload for a percentile: a maximum is a fact at any count, and it is the figure --max-session-usd judges.`,
2097
+ waiveActive: (gate, reason, until, daysLeft) => `WAIVED: the ${gate} failure above is on the record and silenced until ${until} (${daysLeft} days left): "${reason}". The bill still counts it; only the exit code is quiet, and the day the waiver expires this gate fails again.`,
2098
+ waiveExpired: (gate, until, reason) => `The waiver on ${gate} expired on ${until} and no longer silences anything. It was written for: "${reason}". Renew it with a new date and a current reason, or fix what it was covering: an expired waiver left in place is a finding deleted with extra steps.`,
2094
2099
  waiveNotRecorded: (path, because) => ` (This waiver was not written to ${path}: ${because}. The gate's verdict above is unaffected.)`,
2095
- summaryNoComparison: () => 'No previous log was given, so nothing here says whether the bill moved — a summary without a comparison states the bill, not its stability.',
2096
- summaryFooter: () => 'The short form: what changed and the largest lever, nothing else. Run trazum profile for the full report — every figure here comes from it.',
2100
+ summaryNoComparison: () => 'No previous log was given, so nothing here says whether the bill moved, a summary without a comparison states the bill, not its stability.',
2101
+ summaryFooter: () => 'The short form: what changed and the largest lever, nothing else. Run trazum profile for the full report: every figure here comes from it.',
2097
2102
  gateLargest: (label, model, usd, share) => `Most of it is ${label} on ${model}: ${usd}, ${share} of the bill. That is where the money is, not necessarily where the fix is.`,
2098
- gateLever: (label, action, saving, overage, covers) => `The largest lever the report priced would save ${saving} on ${label} by ${action} — ${covers ? `enough to cover the ${overage} this is over by` : `short of the ${overage} this is over by, so it is part of the answer rather than all of it`}. Whether that is the right call for this workload is yours to judge; the figure is arithmetic, not advice.`,
2103
+ gateLever: (label, action, saving, overage, covers) => `The largest lever the report priced would save ${saving} on ${label} by ${action}, ${covers ? `enough to cover the ${overage} this is over by` : `short of the ${overage} this is over by, so it is part of the answer rather than all of it`}. Whether that is the right call for this workload is yours to judge; the figure is arithmetic, not advice.`,
2099
2104
  gateLeverRoute: (model) => `moving it to ${model}`,
2100
2105
  gateLeverBatch: () => 'sending it through the Batch API',
2101
2106
  gateLeverBoth: (model) => `moving it to ${model} and sending it through the Batch API`,
2102
- gateMarginTight: (margin, room) => `Passed with ${margin} of the budget left — ${room}. Under a tenth is close enough that an ordinary week crosses it; a pass this tight is worth knowing about before it becomes a failure.`,
2103
- maxGrowthCoverageLost: (fields, was, now) => `FAILED — this log stopped recording ${fields} (${was} of records before, ${now} now), so the comparison cannot be made. That is not a pass: a bill whose growth nobody could measure is not a bill that stayed flat, and every finding that needed the field went quiet for a reason that has nothing to do with spend.`,
2107
+ gateMarginTight: (margin, room) => `Passed with ${margin} of the budget left, ${room}. Under a tenth is close enough that an ordinary week crosses it; a pass this tight is worth knowing about before it becomes a failure.`,
2108
+ maxGrowthCoverageLost: (fields, was, now) => `FAILED: this log stopped recording ${fields} (${was} of records before, ${now} now), so the comparison cannot be made. That is not a pass: a bill whose growth nobody could measure is not a bill that stayed flat, and every finding that needed the field went quiet for a reason that has nothing to do with spend.`,
2104
2109
  coverageField: (field) => ({ label: 'label', session: 'session', ts: 'timestamp', stopReason: 'stop reason' })[field] ?? field,
2105
2110
  coverageSilenced: (field) => ({
2106
2111
  label: 'Gone quiet with it: per-workload spend, the drill-down, and levers that describe a decision rather than a mixture.',
@@ -2109,24 +2114,24 @@ ${bold('EXAMPLES')}
2109
2114
  stopReason: 'Gone quiet with it: answers cut off at max_tokens, and the retries billed after them.',
2110
2115
  })[field] ?? '',
2111
2116
  coverageDrift: (field, was, now) => `Coverage moved: ${field} was on ${was} of records and is now on ${now}.`,
2112
- coverageDriftWhy: () => 'A field the log stopped recording is not a finding that got fixed — every finding that needed it has gone quiet for a reason that has nothing to do with the bill. Reported from a 20-point move in either direction; a field that appeared means this report can see what the previous one could not.',
2113
- againstOverlap: (from, to) => `These two logs both cover ${from} → ${to}, so some of the same calls sit on both sides of this subtraction and part of the change is the same money counted twice. Compare periods that do not overlap — or window both logs with --since/--until.`,
2117
+ coverageDriftWhy: () => 'A field the log stopped recording is not a finding that got fixed: every finding that needed it has gone quiet for a reason that has nothing to do with the bill. Reported from a 20-point move in either direction; a field that appeared means this report can see what the previous one could not.',
2118
+ againstOverlap: (from, to) => `These two logs both cover ${from} → ${to}, so some of the same calls sit on both sides of this subtraction and part of the change is the same money counted twice. Compare periods that do not overlap, or window both logs with --since/--until.`,
2114
2119
  windowLine: (since, until) => `Filtered to --since ${since} --until ${until}. Everything below describes this window, not the whole log; a bare date means the whole of that UTC day.`,
2115
- windowUndated: (calls) => `${count(calls)} ${calls === 1 ? 'call carries' : 'calls carry'} no timestamp and cannot be placed inside or outside this window, so ${calls === 1 ? 'it was' : 'they were'} left out. Their spend is in the log and not in this report — the window's figures are a floor on the period.`,
2116
- windowRelative: () => 'That window is relative to this machine\'s clock, not to the log\'s last record — a log exported a month ago will answer "the last 7 days" with nothing.',
2120
+ windowUndated: (calls) => `${count(calls)} ${calls === 1 ? 'call carries' : 'calls carry'} no timestamp and cannot be placed inside or outside this window, so ${calls === 1 ? 'it was' : 'they were'} left out. Their spend is in the log and not in this report: the window's figures are a floor on the period.`,
2121
+ windowRelative: () => 'That window is relative to this machine\'s clock, not to the log\'s last record: a log exported a month ago will answer "the last 7 days" with nothing.',
2117
2122
  windowRelativeEmpty: () => 'A relative window is measured from this machine\'s clock: if this log was exported earlier, ask for the dates it covers instead.',
2118
- windowNeedsClock: () => 'No record in this log carries a timestamp, so --since/--until have nothing to filter by. A time window over a clockless log would gate nothing, which is not an answer. Add "ts" to the records — the recipe in the README shows where.',
2119
- windowMatchesNothing: (from, to) => `No record falls inside this window. The log covers ${from} → ${to}. A window matching nothing must not become a $0 report — under --max-usd it would pass a budget gate over a period the log does not cover.`,
2123
+ windowNeedsClock: () => 'No record in this log carries a timestamp, so --since/--until have nothing to filter by. A time window over a clockless log would gate nothing, which is not an answer. Add "ts" to the records, the recipe in the README shows where.',
2124
+ windowMatchesNothing: (from, to) => `No record falls inside this window. The log covers ${from} → ${to}. A window matching nothing must not become a $0 report, under --max-usd it would pass a budget gate over a period the log does not cover.`,
2120
2125
  sinceAfterUntil: () => '--since is at or after --until, so the window contains no time at all. Check the two dates.',
2121
2126
  badWhen: (flag, value) => `--${flag} could not read "${value}". It takes a UTC day (2026-08-14) or a full ISO 8601 timestamp (2026-08-14T09:30:00Z).`,
2122
- singleTurnCeiling: (label, model, single, sessions, usd) => `${label} on ${model}: ${single} of ${sessions} conversations ended after their first turn, and their cache writes — ${usd} — paid for reuse their own conversation never made. Another conversation sharing the same prefix within the TTL could have read them; the log cannot see whose write a read hit, so that figure is a ceiling on the waste, not a bill.`,
2123
- singleTurnConfirmed: (label, model, single, sessions, usd) => `${label} on ${model}: ${single} of ${sessions} conversations ended after their first turn and spent ${usd} writing a cache that nothing in this log ever read. Within the conversation, across conversations — no read anywhere, so those writes bought nothing. Caching a one-shot call is pure write premium; stop marking these calls with cache_control.`,
2127
+ singleTurnCeiling: (label, model, single, sessions, usd) => `${label} on ${model}: ${single} of ${sessions} conversations ended after their first turn, and their cache writes, ${usd}, paid for reuse their own conversation never made. Another conversation sharing the same prefix within the TTL could have read them; the log cannot see whose write a read hit, so that figure is a ceiling on the waste, not a bill.`,
2128
+ singleTurnConfirmed: (label, model, single, sessions, usd) => `${label} on ${model}: ${single} of ${sessions} conversations ended after their first turn and spent ${usd} writing a cache that nothing in this log ever read. Within the conversation, across conversations, no read anywhere, so those writes bought nothing. Caching a one-shot call is pure write premium; stop marking these calls with cache_control.`,
2124
2129
  },
2125
2130
  plan: {
2126
- noTarget: () => 'Point this at a usage log or a directory of them: trazum plan usage.jsonl. It turns the report into a ranked plan — what to do first, what each action is worth, and what the log cannot confirm about it.',
2127
- nothingPriced: () => 'This log priced nothing — no call in it matched a model in the catalogue. A plan over zero dollars would be advice about nothing; check the log with "trazum profile" first.',
2131
+ noTarget: () => 'Point this at a usage log or a directory of them: trazum plan usage.jsonl. It turns the report into a ranked plan, what to do first, what each action is worth, and what the log cannot confirm about it.',
2132
+ nothingPriced: () => 'This log priced nothing, no call in it matched a model in the catalogue. A plan over zero dollars would be advice about nothing; check the log with "trazum profile" first.',
2128
2133
  heading: (actions, total) => `The plan: ${actions} actions against a ${total} bill`,
2129
- totals: (projected, staked) => `${projected} projected savings, on assumptions listed below. ${staked} already spent on problems this plan names — measured, not projected.`,
2134
+ totals: (projected, staked) => `${projected} projected savings, on assumptions listed below. ${staked} already spent on problems this plan names, measured, not projected.`,
2130
2135
  noClock: () => 'No timestamps in this log, so every figure is per this log, not per any period.',
2131
2136
  projected: (usd) => `${usd} projected`,
2132
2137
  staked: (usd) => `${usd} already spent`,
@@ -2142,43 +2147,43 @@ ${bold('EXAMPLES')}
2142
2147
  : 'Look at the cache on';
2143
2148
  return `${verb} ${label} (${model})`;
2144
2149
  },
2145
- routeTo: (model) => `to ${model} — combined with batching where both apply, never summed`,
2150
+ routeTo: (model) => `to ${model}, combined with batching where both apply, never summed`,
2146
2151
  assume: (assumption) => {
2147
2152
  switch (assumption.kind) {
2148
2153
  case 'model-capability':
2149
- return `assumes ${assumption.model} can do this work — the log prices the move, it cannot judge the answers`;
2154
+ return `assumes ${assumption.model} can do this work, the log prices the move, it cannot judge the answers`;
2150
2155
  case 'batch-window':
2151
2156
  return 'assumes these calls can wait for a batch window';
2152
2157
  case 'retry-pattern-real':
2153
- return 'assumes the retry pattern is real — the log sees shapes, not content';
2158
+ return 'assumes the retry pattern is real, the log sees shapes, not content';
2154
2159
  case 'max-tokens-fits':
2155
2160
  return 'assumes a max_tokens the answers fit in removes the pair';
2156
2161
  case 'traffic-pattern-holds':
2157
- return 'assumes the traffic pattern holds — a cache that lost money on this log may pay on different traffic';
2162
+ return 'assumes the traffic pattern holds: a cache that lost money on this log may pay on different traffic';
2158
2163
  }
2159
2164
  },
2160
2165
  check: (command) => `check it: ${command}`,
2161
- filtered: (count, minUsd, worth) => `${count} actions under ${minUsd}, worth ${worth} together, left out by --min-usd — left out of this document entirely, not disproved.`,
2166
+ filtered: (count, minUsd, worth) => `${count} actions under ${minUsd}, worth ${worth} together, left out by --min-usd, left out of this document entirely, not disproved.`,
2162
2167
  footer: () => 'Ranked by money, projected or already spent alike. The assumptions are yours to answer: this plan is arithmetic over the log, not knowledge of your product.',
2163
2168
  wrote: (path) => `Plan written to ${path}, dated. Keep it: a prediction nobody wrote down is a prediction nobody can be held to.`,
2164
2169
  },
2165
2170
  serve: {
2166
2171
  listening: (where) => `Answering on ${where}`,
2167
2172
  limitsNoLog: () => 'A limits policy is configured and no --log was given, so every ceiling will answer cannot-tell: per-label and per-session spend live in a usage log, not in the store. Point --log at your usage log to make the ceilings judgeable.',
2168
- limitsUnpriced: (count) => `${count} record(s) in the --log name a model the catalogue cannot price. They contribute nothing to any measured figure — money the limits policy cannot see, said here rather than hidden.`,
2169
- loopbackOnly: () => 'Loopback only, and there is no flag to change that: this holds your spend, your model mix and your budgets, and would answer whoever asked. There is no auth for the same reason — a token checked over loopback is theatre.',
2170
- measuredFrom: (usd) => `Budget answers are measured against ${usd} from the store, read once at start. Every answer carries the window that figure covers rather than implying it is current to the second — restart to refresh it.`,
2173
+ limitsUnpriced: (count) => `${count} record(s) in the --log name a model the catalogue cannot price. They contribute nothing to any measured figure: money the limits policy cannot see, said here rather than hidden.`,
2174
+ loopbackOnly: () => 'Loopback only, and there is no flag to change that: this holds your spend, your model mix and your budgets, and would answer whoever asked. There is no auth for the same reason: a token checked over loopback is theatre.',
2175
+ measuredFrom: (usd) => `Budget answers are measured against ${usd} from the store, read once at start. Every answer carries the window that figure covers rather than implying it is current to the second, restart to refresh it.`,
2171
2176
  nothingMeasured: (dir) => `Nothing is measured yet (the store at ${dir} is empty), so the budget half of every answer will say so. The cost half still answers from the catalogue: offline is a mode, not a failure.`,
2172
2177
  noBudget: () => 'No spend.monthlyUsd is configured, so "is there budget left" has no subject and every answer says so rather than guessing one. spend.maxUsd is deliberately not read here: it gates whatever period a log covers, and reading it as a monthly limit is how two surfaces of this tool come to disagree.',
2173
2178
  partialCoverage: (measuredDays, elapsedDays, period) => `Only ${measuredDays} of the ${elapsedDays} elapsed days of ${period} carry any measurement, so the consumed figure is a floor on the period rather than the period. Pull the missing days with trazum connect before treating what is left as headroom.`,
2174
2179
  badPort: (value) => `"${value}" is not a port. Give a whole number from 0 to 65535, or use --socket.`,
2175
2180
  },
2176
2181
  watch: {
2177
- noThresholds: () => 'Watching needs something to watch for. Set spend.maxUsd, spend.maxDayUsd or spend.maxCacheLossUsd in trazum.config.json — a watcher with no threshold is a green light nobody earned.',
2178
- nothingToWatch: (dir) => `Nothing has been measured yet: the store at ${dir} is empty. Fill it with "trazum connect <provider> --store" first — watching nothing would report that everything is fine.`,
2182
+ noThresholds: () => 'Watching needs something to watch for. Set spend.maxUsd, spend.maxDayUsd or spend.maxCacheLossUsd in trazum.config.json: a watcher with no threshold is a green light nobody earned.',
2183
+ nothingToWatch: (dir) => `Nothing has been measured yet: the store at ${dir} is empty. Fill it with "trazum connect <provider> --store" first, watching nothing would report that everything is fine.`,
2179
2184
  intervalTooTight: () => '--interval must be at least 5m. Usage APIs are rate limited, and a tight loop is a way to get your own key throttled by a tool that exists to save you money.',
2180
2185
  badWebhook: (reason) => reason === 'credentials-in-url'
2181
- ? 'That webhook URL carries credentials. URLs end up in logs, shell history and error messages, so this one is refused — put the secret in a header your receiver checks, or in the receiver itself.'
2186
+ ? 'That webhook URL carries credentials. URLs end up in logs, shell history and error messages, so this one is refused, put the secret in a header your receiver checks, or in the receiver itself.'
2182
2187
  : reason === 'insecure-scheme'
2183
2188
  ? 'A webhook must be https, except on loopback. An alert carries your spend figures, and sending them in the clear across a network is a leak you did not ask for.'
2184
2189
  : 'That webhook is not a URL this tool can parse.',
@@ -2188,7 +2193,7 @@ ${bold('EXAMPLES')}
2188
2193
  : gate === 'maxDayUsd'
2189
2194
  ? `Spend on ${day}`
2190
2195
  : 'Money lost to caching';
2191
- return `CROSSED — ${what} is ${measured} against a limit of ${limit}. Measured, not projected.`;
2196
+ return `CROSSED, ${what} is ${measured} against a limit of ${limit}. Measured, not projected.`;
2192
2197
  },
2193
2198
  stillOver: (gate, measured, limit, day) => {
2194
2199
  const what = gate === 'maxUsd'
@@ -2196,31 +2201,31 @@ ${bold('EXAMPLES')}
2196
2201
  : gate === 'maxDayUsd'
2197
2202
  ? `Spend on ${day}`
2198
2203
  : 'Money lost to caching';
2199
- return `STILL OVER — ${what} is ${measured} against a limit of ${limit}, and was already reported. Quiet is not clean.`;
2204
+ return `STILL OVER, ${what} is ${measured} against a limit of ${limit}, and was already reported. Quiet is not clean.`;
2200
2205
  },
2201
2206
  notJudgeable: (gate, reason, covered) => reason === 'window-too-short'
2202
- ? `${gate} cannot be judged yet: this period is ${covered ?? 'partly'} measured, and a threshold over part of a day is a threshold over something else. Not a pass — it will be judged when the day is in.`
2207
+ ? `${gate} cannot be judged yet: this period is ${covered ?? 'partly'} measured, and a threshold over part of a day is a threshold over something else. Not a pass: it will be judged when the day is in.`
2203
2208
  : `${gate} cannot be judged on this source, which does not serve what the gate is written against. Not a pass: a gate silently skipped reads exactly like a gate that keeps passing.`,
2204
2209
  gap: (from, to) => `Nothing was watching between ${from} and ${to}. Whatever crossed in that stretch was not seen, and this line exists so a resumed watcher does not imply coverage it did not have.`,
2205
2210
  allWithin: (gates) => `Within every threshold: ${gates} gates evaluated against measured spend.`,
2206
- webhookFailed: (status) => `The webhook did not deliver (${status}). The crossing is still in the exit code and in the output above — a receiver being down must not be the quietest failure in the room.`,
2211
+ webhookFailed: (status) => `The webhook did not deliver (${status}). The crossing is still in the exit code and in the output above: a receiver being down must not be the quietest failure in the room.`,
2207
2212
  watching: (minutes) => `Watching every ${minutes} minutes. Ctrl-C stops it.`,
2208
2213
  },
2209
2214
  store: {
2210
2215
  appended: (count, dir) => `Kept ${count} measurements in ${dir}.`,
2211
- empty: (dir) => `The store at ${dir} is empty. Fill it with "trazum connect <provider> --store" — that is a state, not an error.`,
2216
+ empty: (dir) => `The store at ${dir} is empty. Fill it with "trazum connect <provider> --store": that is a state, not an error.`,
2212
2217
  heading: (records, usd, from, to) => `The store: ${records} measurements · ${usd} · ${from} → ${to}`,
2213
2218
  providerRow: (provider, records, span, models) => `${provider} ${records} measurements · ${span} · ${models} models`,
2214
- holds: (files) => `Held in ${files} files: token counts, billed dollars and the account's own workspace and key identifiers. Never prompt text, never completion text, never a credential — this is a file you can back up without a privacy review.`,
2215
- possiblyDouble: (count) => `${count} records could not be told apart from another — a window of no length, or a record naming no model. They are kept whole rather than merged, so a total built on them may count the same spend twice. Saying so beats a smaller number nobody can check.`,
2219
+ holds: (files) => `Held in ${files} files: token counts, billed dollars and the account's own workspace and key identifiers. Never prompt text, never completion text, never a credential: this is a file you can back up without a privacy review.`,
2220
+ possiblyDouble: (count) => `${count} records could not be told apart from another, a window of no length, or a record naming no model. They are kept whole rather than merged, so a total built on them may count the same spend twice. Saying so beats a smaller number nobody can check.`,
2216
2221
  unknownVersion: (count) => `${count} records come from a newer schema than this version knows, so they are kept and left out of the figures above rather than guessed at. Upgrade to read them.`,
2217
- unreadable: (file, line) => `${file} line ${line} would not parse, so it is not in the figures above. The rest of the file was read — one broken line must not lose a month.`,
2222
+ unreadable: (file, line) => `${file} line ${line} would not parse, so it is not in the figures above. The rest of the file was read: one broken line must not lose a month.`,
2218
2223
  retention: (days) => `Retention: ${days} days, from "store.keepDays". Run "trazum store --prune" to apply it.`,
2219
2224
  noRetention: () => 'No retention policy is configured, so nothing is ever deleted on its own. Set "store": {"keepDays": 90} when you want one.',
2220
2225
  pruneNeedsPolicy: () => 'Pruning needs a retention policy: set "store": {"keepDays": 90} in trazum.config.json, or pass --keep 90d for this run. Deleting measurements on a policy nobody wrote down is not a default you should get by accident.',
2221
2226
  pruneDryRun: (count, days, span, usd) => span === null
2222
2227
  ? `Nothing is older than ${days} days, so a prune would delete nothing.`
2223
- : `A prune would delete ${count} measurements older than ${days} days, covering ${span} and ${usd} of measured spend. Nothing was deleted — this was --dry-run.`,
2228
+ : `A prune would delete ${count} measurements older than ${days} days, covering ${span} and ${usd} of measured spend. Nothing was deleted: this was --dry-run.`,
2224
2229
  pruned: (count, days, span, usd, kept) => span === null
2225
2230
  ? `Nothing was older than ${days} days. ${kept} measurements kept, and the append log compacted.`
2226
2231
  : `Deleted ${count} measurements older than ${days} days, covering ${span} and ${usd} of measured spend. ${kept} kept, and the append log compacted to what the store already resolved to.`,
@@ -2236,27 +2241,27 @@ ${bold('EXAMPLES')}
2236
2241
  ? 'Whether that is fast or slow for the month cannot be told from a floor: the unmeasured days spent something, and only an overrun would be unarguable.'
2237
2242
  : 'There is nothing to compare the spend against yet.',
2238
2243
  budgetNeverForecast: () => 'That is a shape, not a forecast. Where this goes next depends on what you do next, and no arithmetic here knows that.',
2239
- budgetNothingMeasured: (elapsedDays) => `Nothing has been measured this month, across ${elapsedDays} elapsed ${elapsedDays === 1 ? 'day' : 'days'}. That is not a budget under control — it is a budget nobody is watching. Run trazum connect to pull what the provider has.`,
2244
+ budgetNothingMeasured: (elapsedDays) => `Nothing has been measured this month, across ${elapsedDays} elapsed ${elapsedDays === 1 ? 'day' : 'days'}. That is not a budget under control: it is a budget nobody is watching. Run trazum connect to pull what the provider has.`,
2240
2245
  budgetPartial: (measuredDays, elapsedDays, days) => `Only ${measuredDays} of ${elapsedDays} elapsed days carry any measurement, so the figure below is a floor on the month rather than the month. Missing: ${days}.`,
2241
2246
  budgetScopesUnmeasured: (count) => `${count} budgeted ${count === 1 ? 'scope' : 'scopes'} (per label or per service) cannot be answered from the store: a store record carries a provider and a model, not a workload label. Gate those with trazum profile against a per-call log.`,
2242
2247
  },
2243
2248
  connect: {
2244
- noTarget: (providers) => `Name a provider to read your bill from: trazum connect anthropic. Available: ${providers}. The credential comes from the environment and is never stored — add --dry-run to see exactly what would be called and which variable it would be read from.`,
2249
+ noTarget: (providers) => `Name a provider to read your bill from: trazum connect anthropic. Available: ${providers}. The credential comes from the environment and is never stored. Add --dry-run to see exactly what would be called and which variable it would be read from.`,
2245
2250
  unknownProvider: (id, providers) => `There is no connector for "${id}". The ones that exist are: ${providers}.`,
2246
- pricedNoConnector: (id, providers) => `Trazum prices ${id} but has no connector for it yet — it connects to ${providers}. Either that provider publishes no usage API, or one has not been written; both are gaps rather than mistakes of yours. Until then, export a log and run "trazum profile" on it: every figure works except the ones a usage API would supply on its own.`,
2251
+ pricedNoConnector: (id, providers) => `Trazum prices ${id} but has no connector for it yet, it connects to ${providers}. Either that provider publishes no usage API, or one has not been written; both are gaps rather than mistakes of yours. Until then, export a log and run "trazum profile" on it: every figure works except the ones a usage API would supply on its own.`,
2247
2252
  dryRun: (provider, from, to, envVars, keyKind) => `Would read ${provider} usage from ${from} to ${to}, using ${keyKind} taken from ${envVars}. Nothing was sent and no credential was needed to print this.`,
2248
2253
  heading: (provider, from, to, usd, calls) => calls === null
2249
2254
  ? `${provider} · ${from} → ${to} · ${usd}`
2250
2255
  : `${provider} · ${from} → ${to} · ${usd} · ${calls} calls`,
2251
2256
  modelRow: (model, usd, share, calls) => calls === null ? `${model} ${usd} ${share}` : `${model} ${usd} ${share} · ${calls} calls`,
2252
- nothingBilled: () => 'The provider billed nothing in this window. That is a measurement, not an error — widen it with --since if you expected traffic.',
2257
+ nothingBilled: () => 'The provider billed nothing in this window. That is a measurement, not an error, widen it with --since if you expected traffic.',
2253
2258
  cachePaid: (saved) => `Caching paid for itself: ${saved} less than these tokens would have cost as ordinary input.`,
2254
2259
  cacheLost: (added) => `Caching added ${added} to this bill against what the same tokens would have cost as ordinary input.`,
2255
2260
  cacheUnsettled: () => 'This source did not say which TTL the cache writes used, so the cheaper rate was assumed and the verdict moves under the other one. Unsettled, not settled in your favour.',
2256
2261
  noCallCount: (provider) => `${provider}'s usage report serves token sums and no request count, so there is no call count here and no per-call average. A zero would read as "no traffic", so nothing is printed instead.`,
2257
2262
  unpriced: (model, tokens) => `${model} is not in the price catalogue, so its ${tokens} tokens are counted and its money is not. Add it with --pricing rather than reading the total as complete.`,
2258
2263
  gap: (detail) => `This window is incomplete: ${detail}.`,
2259
- unavailable: (findings) => `Findings this source cannot support: ${findings}. They need one row per call, and a sum has lost the rows — a per-call log still answers them.`,
2264
+ unavailable: (findings) => `Findings this source cannot support: ${findings}. They need one row per call, and a sum has lost the rows, a per-call log still answers them.`,
2260
2265
  wrote: (path) => `Report written to ${path}.`,
2261
2266
  footer: () => 'Every figure here is the provider\u2019s own billed token count at the catalogue\u2019s rates. Nothing was estimated, and nothing the provider did not serve was filled in.',
2262
2267
  },
@@ -2267,7 +2272,7 @@ ${bold('EXAMPLES')}
2267
2272
  periodRow: (name, usd, calls, days) => calls === null ? `${name} ${usd} · ${days} days` : `${name} ${usd} · ${calls} calls · ${days} days`,
2268
2273
  runLabel: (label, periods, sinceName, from, to) => `${label} has climbed for ${periods} consecutive periods since ${sinceName}: ${from} → ${to}. A shape, not a forecast.`,
2269
2274
  runModel: (model, periods, sinceName, from, to) => `${model}'s share of the bill has climbed for ${periods} consecutive periods since ${sinceName}: ${from} → ${to}. The totals can look flat while the mix moves under them.`,
2270
- runCache: (periods, sinceName, from, to) => `The cache share has decayed for ${periods} consecutive periods since ${sinceName}: ${from} → ${to} — slowly enough that no single report called it a finding, which is exactly why a series exists.`,
2275
+ runCache: (periods, sinceName, from, to) => `The cache share has decayed for ${periods} consecutive periods since ${sinceName}: ${from} → ${to}, slowly enough that no single report called it a finding, which is exactly why a series exists.`,
2271
2276
  repeated: (kind, label, model, appearances, first, last) => {
2272
2277
  const what = kind === 'route'
2273
2278
  ? `Routing ${label} (${model})`
@@ -2279,37 +2284,37 @@ ${bold('EXAMPLES')}
2279
2284
  ? `Fixing the truncation retries on ${label} (${model})`
2280
2285
  : `Fixing the cache on ${label} (${model})`;
2281
2286
  const span = first !== null && last !== null ? ` (${first} → ${last})` : '';
2282
- return `${what} has been planned ${appearances} times${span} and is still in the newest plan — a decision nobody is revisiting.`;
2287
+ return `${what} has been planned ${appearances} times${span} and is still in the newest plan: a decision nobody is revisiting.`;
2283
2288
  },
2284
- storeNoLabels: () => 'This series comes from the store, and a usage API groups by model and workspace rather than by workload — so there is no label series here at all. Absent, not empty: nothing above says a workload did or did not move.',
2285
- unmeasured: (days, from, to, after, before) => `Nothing covers ${from} to ${to} — ${plural(days, 'day')} between ${after} and ${before}.`,
2289
+ storeNoLabels: () => 'This series comes from the store, and a usage API groups by model and workspace rather than by workload, so there is no label series here at all. Absent, not empty: nothing above says a workload did or did not move.',
2290
+ unmeasured: (days, from, to, after, before) => `Nothing covers ${from} to ${to}, ${plural(days, 'day')} between ${after} and ${before}.`,
2286
2291
  unmeasuredTotal: (days) => `${plural(days, 'day')} of this stretch are covered by no report. A series with a hole in it and a shorter series read identically; this is which.`,
2287
- overlap: (a, b, days) => `${a} and ${b} both cover ${plural(days, 'day')}. Named, never merged — which is the better measurement is not knowable from here, and adding both totals counts those days twice.`,
2288
- runHole: (days) => ` — ${plural(days, 'day')} of this run are covered by no report`,
2289
- undated: (name) => `${name} carries no span, so it is on no timeline above — named, never silently absorbed.`,
2292
+ overlap: (a, b, days) => `${a} and ${b} both cover ${plural(days, 'day')}. Named, never merged, which is the better measurement is not knowable from here, and adding both totals counts those days twice.`,
2293
+ runHole: (days) => `, ${plural(days, 'day')} of this run are covered by no report`,
2294
+ undated: (name) => `${name} carries no span, so it is on no timeline above, named, never silently absorbed.`,
2290
2295
  unrecognized: (name) => `${name} is neither a stored report nor a saved plan, so it is in no series above.`,
2291
- footer: () => 'A series names shapes, not futures. Twenty points make a trend visible; they do not make next month knowable — where these lines go next is yours to judge.',
2296
+ footer: () => 'A series names shapes, not futures. Twenty points make a trend visible; they do not make next month knowable, where these lines go next is yours to judge.',
2292
2297
  waiverHeading: () => 'What this repository has been living with',
2293
2298
  waiverSince: (day, uses) => `${uses} recorded ${uses === 1 ? 'use' : 'uses'} since ${day}, when recording started.`,
2294
- waiverNoneRecorded: () => 'No waiver has silenced a gate since recording started. Nothing here is inferred from the config — a waiver written down and never hit is not a decision anyone is living with.',
2299
+ waiverNoneRecorded: () => 'No waiver has silenced a gate since recording started. Nothing here is inferred from the config: a waiver written down and never hit is not a decision anyone is living with.',
2295
2300
  waiverHabit: (gate, uses, days, firstDay, lastDay) => `${gate}: ${uses} ${uses === 1 ? 'use' : 'uses'} across ${days} ${days === 1 ? 'day' : 'days'}, ${firstDay} to ${lastDay}`,
2296
2301
  waiverVerdict: (verdict) => verdict === 'used-once'
2297
2302
  ? 'Used once. Nothing to read into it yet.'
2298
2303
  : verdict === 'recurring'
2299
2304
  ? 'The same decision, holding. The gate keeps firing and the reason has not moved.'
2300
2305
  : verdict === 'renewed-without-revisiting'
2301
- ? 'The expiry has moved and the reason has not. That is the shape a decision takes when nobody is revisiting it — which is sometimes exactly right, and worth saying out loud either way.'
2306
+ ? 'The expiry has moved and the reason has not. That is the shape a decision takes when nobody is revisiting it, which is sometimes exactly right, and worth saying out loud either way.'
2302
2307
  : 'The reason changed between uses. Somebody looked again.',
2303
2308
  waiverReasonNow: (reason) => `Reason: ${reason}`,
2304
2309
  waiverReasonsChanged: (count) => `${count} different reasons given over that time.`,
2305
2310
  waiverExpiriesMoved: (from, to, count) => `Expiry moved ${count} ${count === 1 ? 'time' : 'times'}: ${from} → ${to}.`,
2306
2311
  waiverNoLongerConfigured: () => 'Not in the config any more. The decision was reversed; the record keeps it.',
2307
- waiverNeverUsed: (gates) => `Waived in the config and never hit by a recorded run: ${gates}. Either the gate stopped failing — good news nobody wrote down — or the waiver names a situation that does not arise. Both are worth deleting.`,
2312
+ waiverNeverUsed: (gates) => `Waived in the config and never hit by a recorded run: ${gates}. Either the gate stopped failing, good news nobody wrote down, or the waiver names a situation that does not arise. Both are worth deleting.`,
2308
2313
  waiverUnreadable: (count, path) => `${count} ${count === 1 ? 'line' : 'lines'} in ${path} could not be read and are not counted above.`,
2309
2314
  waiverStartsHere: () => 'Nothing before that day exists. This record began when recording did, and no past was reconstructed from the config as it stands.',
2310
2315
  },
2311
2316
  verify: {
2312
- noTarget: () => 'Point this at a saved plan and a newer log: trazum verify plan.json --against usage.jsonl. It says, per action, whether the change arrived, did not arrive, or cannot be told — and never fewer than those three.',
2317
+ noTarget: () => 'Point this at a saved plan and a newer log: trazum verify plan.json --against usage.jsonl. It says, per action, whether the change arrived, did not arrive, or cannot be told, and never fewer than those three.',
2313
2318
  needsAgainst: () => '--against <newer.jsonl|dir> is required. A plan can only be verified against a log that came after it; without one there is nothing to hold the prediction to.',
2314
2319
  badPlan: (path, why) => `${path} is not a plan document this tool can verify: ${why}. Expected the JSON that "trazum plan -o" writes.`,
2315
2320
  planRefusal: (why) => why.kind === 'not-json'
@@ -2325,7 +2330,7 @@ ${bold('EXAMPLES')}
2325
2330
  ? `Did it work? ${actions} actions from an undated plan, against this log`
2326
2331
  : `Did it work? ${actions} actions from the plan of ${planDate}, against this log`,
2327
2332
  counts: (arrived, notArrived, cannotTell) => `${arrived} arrived · ${notArrived} did not arrive · ${cannotTell} cannot be told. The third is not a soft version of the second: it means this log cannot answer, which is its own finding.`,
2328
- pricesChanged: (planReviewed, nowReviewed) => `Prices were reviewed ${planReviewed} when the plan was made and ${nowReviewed} now, so every dollar comparison here is two price lists, not one measurement — a team must not be blamed for a saving that arithmetic revoked.`,
2333
+ pricesChanged: (planReviewed, nowReviewed) => `Prices were reviewed ${planReviewed} when the plan was made and ${nowReviewed} now, so every dollar comparison here is two price lists, not one measurement: a team must not be blamed for a saving that arithmetic revoked.`,
2329
2334
  action: (kind, label, model, outcome) => {
2330
2335
  const what = kind === 'route'
2331
2336
  ? `Route ${label} (${model})`
@@ -2337,21 +2342,21 @@ ${bold('EXAMPLES')}
2337
2342
  ? `Fix the truncation retries on ${label} (${model})`
2338
2343
  : `Fix the cache on ${label} (${model})`;
2339
2344
  const verdict = outcome === 'arrived' ? 'ARRIVED' : outcome === 'not-arrived' ? 'DID NOT ARRIVE' : 'CANNOT BE TOLD';
2340
- return `${what} — ${verdict}`;
2345
+ return `${what}, ${verdict}`;
2341
2346
  },
2342
2347
  reason: (reason) => reason === 'workload-vanished'
2343
- ? 'the label carries no priced traffic in this log — a vanished workload is not a fixed one, and not a broken one either'
2348
+ ? 'the label carries no priced traffic in this log: a vanished workload is not a fixed one, and not a broken one either'
2344
2349
  : reason === 'fields-stopped'
2345
- ? 'the fields the detection needs are not in this log — "not recorded" must not read as "fixed", so with --gate this fails'
2346
- : 'the log records tokens, and tokens do not say which tier billed them — the Batch API cannot be seen from here',
2350
+ ? 'the fields the detection needs are not in this log, "not recorded" must not read as "fixed", so with --gate this fails'
2351
+ : 'the log records tokens, and tokens do not say which tier billed them: the Batch API cannot be seen from here',
2347
2352
  routeObserved: (dearestModel, onTargetUsd, onOldUsd) => `the label's dearest model is now ${dearestModel} · ${onTargetUsd} on the target, ${onOldUsd} still on the old model`,
2348
2353
  batchUnobservable: () => 'the batch half of this action cannot be seen in token counts; the verdict above is the route half alone',
2349
2354
  truncationObserved: (retryBillUsd) => `this log still shows ${retryBillUsd} of truncation waste and retries`,
2350
2355
  cacheObserved: (deltaUsd, outcome) => outcome === 'arrived'
2351
2356
  ? `caching now pays for itself on this slice (${deltaUsd} against the no-cache bill)`
2352
2357
  : `caching still adds ${deltaUsd} to this slice's bill`,
2353
- attribution: (callsBefore, callsAfter, outBefore, outAfter) => `the world moved too: calls ${callsBefore} → ${callsAfter}, output/call ${outBefore} → ${outAfter} tokens — stated so the verdict is not read as the whole story`,
2354
- gateFailed: (failures, total) => `GATE FAILED — ${failures} of ${total} actions did not produce what the plan promised, or stopped being measurable by the team's own log.`,
2358
+ attribution: (callsBefore, callsAfter, outBefore, outAfter) => `the world moved too: calls ${callsBefore} → ${callsAfter}, output/call ${outBefore} → ${outAfter} tokens, stated so the verdict is not read as the whole story`,
2359
+ gateFailed: (failures, total) => `GATE FAILED, ${failures} of ${total} actions did not produce what the plan promised, or stopped being measurable by the team's own log.`,
2355
2360
  gateOk: () => 'Gate passed: every verifiable action arrived, and nothing became unverifiable.',
2356
2361
  footer: () => 'Arrived and did-not-arrive are measurements; cannot-be-told is the log refusing to guess. All three are the verification working, not failing.',
2357
2362
  },
@@ -2361,18 +2366,18 @@ ${bold('EXAMPLES')}
2361
2366
  labelNotFound: (label, available) => `No call in this log carries the label "${label}". The labels here are: ${available}.`,
2362
2367
  noRoute: () => 'No route on this log clears 1% of the bill. These calls are already on the cheapest model of their family, or the catalogue has nothing below them.',
2363
2368
  picked: (label, model, candidate, usd, pct) => `${label} on ${model} → ${candidate}, worth ${usd} of this bill (${pct}).`,
2364
- willSpend: (calls, model, candidate) => `This will make ${count(calls)} provider calls: two per case on ${model} to measure its own variance, one per case on ${candidate}. Nothing has been spent yet — add --yes to run it.`,
2369
+ willSpend: (calls, model, candidate) => `This will make ${count(calls)} provider calls: two per case on ${model} to measure its own variance, one per case on ${candidate}. Nothing has been spent yet. Add --yes to run it.`,
2365
2370
  dryRun: () => 'Nothing was called.',
2366
2371
  running: (cases) => `Running ${count(cases)} cases...`,
2367
- agreement: (cross, self) => `The cheaper model agrees with the original ${cross} of the time. The original agrees with itself ${self} of the time — that is the yardstick, not 100%.`,
2368
- holds: (usd) => `HOLDS — the difference is inside the original model's own noise. On this bill that route is worth ${usd}.`,
2369
- diverges: (usd) => `DIVERGES — the cheaper model gives materially different answers. The ${usd} is real and so is the change in behaviour; this one is not free money.`,
2370
- inconclusive: () => 'INCONCLUSIVE — the original model was too inconsistent with itself on these cases to judge anything against. Add cases, or pick ones with less room for the model to wander.',
2371
- unlabelledSlice: () => 'These calls carry no label, so Trazum cannot tell whether they are all this prompt. If they are not, the figure above covers calls this measurement never touched — add "label" to the record and the slice becomes one workload, which is what makes the number attributable.',
2372
- yours: () => 'Agreement is not correctness. This measures whether the answers moved, not whether they were ever right — the decision is still yours.',
2372
+ agreement: (cross, self) => `The cheaper model agrees with the original ${cross} of the time. The original agrees with itself ${self} of the time: that is the yardstick, not 100%.`,
2373
+ holds: (usd) => `HOLDS: the difference is inside the original model's own noise. On this bill that route is worth ${usd}.`,
2374
+ diverges: (usd) => `DIVERGES: the cheaper model gives materially different answers. The ${usd} is real and so is the change in behaviour; this one is not free money.`,
2375
+ inconclusive: () => 'INCONCLUSIVE: the original model was too inconsistent with itself on these cases to judge anything against. Add cases, or pick ones with less room for the model to wander.',
2376
+ unlabelledSlice: () => 'These calls carry no label, so Trazum cannot tell whether they are all this prompt. If they are not, the figure above covers calls this measurement never touched. Add "label" to the record and the slice becomes one workload, which is what makes the number attributable.',
2377
+ yours: () => 'Agreement is not correctness. This measures whether the answers moved, not whether they were ever right: the decision is still yours.',
2373
2378
  },
2374
2379
  baseline: {
2375
- recorded: (path, files, tokens) => `Recorded ${files} prompts, ${tokens} tokens, to ${path}. Commit it — the gate compares the tree against what is committed.`,
2380
+ recorded: (path, files, tokens) => `Recorded ${files} prompts, ${tokens} tokens, to ${path}. Commit it: the gate compares the tree against what is committed.`,
2376
2381
  recordedMoney: (monthly, model, calls) => `That is ${monthly} per month with ${model} at ${calls} calls. Reported, not gated on: thresholds are in tokens, so a repriced model never fails a build on its own.`,
2377
2382
  heading: () => 'Against the baseline',
2378
2383
  unchanged: (tokens) => `unchanged at ${tokens} tokens`,
@@ -2393,7 +2398,7 @@ ${bold('EXAMPLES')}
2393
2398
  slots: {
2394
2399
  task: {
2395
2400
  question: 'What should the model do, in one sentence?',
2396
- unlocks: 'the whole prompt — without it there is nothing to write',
2401
+ unlocks: 'the whole prompt, without it there is nothing to write',
2397
2402
  },
2398
2403
  role: {
2399
2404
  question: 'Who is the model being while it does that?',
@@ -2401,7 +2406,7 @@ ${bold('EXAMPLES')}
2401
2406
  },
2402
2407
  inputs: {
2403
2408
  question: 'What changes from one call to the next?',
2404
- unlocks: 'the varying part — without it the prompt hard-codes one case and is rewritten for the next',
2409
+ unlocks: 'the varying part, without it the prompt hard-codes one case and is rewritten for the next',
2405
2410
  },
2406
2411
  'output-shape': {
2407
2412
  question: 'What should come back: prose, json, list or table?',
@@ -2417,7 +2422,7 @@ ${bold('EXAMPLES')}
2417
2422
  },
2418
2423
  audience: {
2419
2424
  question: 'Who reads the output?',
2420
- unlocks: 'the register — an answer for an engineer and one for a customer are different answers',
2425
+ unlocks: 'the register: an answer for an engineer and one for a customer are different answers',
2421
2426
  },
2422
2427
  constraints: {
2423
2428
  question: 'What must it never do?',
@@ -2433,7 +2438,7 @@ ${bold('EXAMPLES')}
2433
2438
  },
2434
2439
  'example-inputs': {
2435
2440
  question: 'What input produced that example?',
2436
- unlocks: 'the pairing — an example answer with no input teaches the shape and not the mapping',
2441
+ unlocks: 'the pairing, an example answer with no input teaches the shape and not the mapping',
2437
2442
  },
2438
2443
  'failure-modes': {
2439
2444
  question: 'What has gone wrong with this before?',
@@ -2441,11 +2446,11 @@ ${bold('EXAMPLES')}
2441
2446
  },
2442
2447
  model: {
2443
2448
  question: 'Which model is this for?',
2444
- unlocks: 'the cost estimate — this changes the report and never the prompt',
2449
+ unlocks: 'the cost estimate, this changes the report and never the prompt',
2445
2450
  },
2446
2451
  budget: {
2447
2452
  question: 'What is the monthly ceiling for this prompt?',
2448
- unlocks: 'the budget check — this changes the report and never the prompt',
2453
+ unlocks: 'the budget check, this changes the report and never the prompt',
2449
2454
  },
2450
2455
  },
2451
2456
  missing: (count) => count === 1
@@ -2458,7 +2463,7 @@ ${bold('EXAMPLES')}
2458
2463
  : `"${id}" is not a slot. Did you mean "${nearest}"?`,
2459
2464
  answerNotText: (id) => `"${id}" must be a string, or null to decline it.`,
2460
2465
  tokens: (count) => `${count} tokens`,
2461
- monthly: (usd) => `${usd} per month, estimated — nobody has sent this prompt yet`,
2466
+ monthly: (usd) => `${usd} per month, estimated: nobody has sent this prompt yet`,
2462
2467
  budget: (verdict, limit) => verdict === 'over' ? `over the budget of ${limit}` : `within the budget of ${limit}`,
2463
2468
  noVerdict: (reason) => reason === 'no-budget'
2464
2469
  ? 'No budget answered, so there is nothing to check it against.'
@@ -2466,7 +2471,7 @@ ${bold('EXAMPLES')}
2466
2471
  ? 'No model answered, so it cannot be priced.'
2467
2472
  : 'That model is not in the price catalogue, so it cannot be priced.',
2468
2473
  clean: () => 'trazum optimize recovers nothing from this.',
2469
- notClean: (rules, tokens) => `trazum optimize would still recover ${tokens} tokens here (${rules}) — from your answers, not from the structure.`,
2474
+ notClean: (rules, tokens) => `trazum optimize would still recover ${tokens} tokens here (${rules}), from your answers, not from the structure.`,
2470
2475
  declined: (ids) => `Declined, and left out: ${ids}`,
2471
2476
  },
2472
2477
  };