Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 0639c8dc2572ae5b64f521eaf27a611fb348586d
parent 771a555e384482c60771c8a176efaa0fc30a8c03
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 07:26:08 -0400

plans: release 29 — the V1 record (bench v2), FACTS (the prompt version contract, items-from and the resume, the items hash, the trace and marks), CHANGELOG

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 3+++
Mplans/FACTS.md | 35+++++++++++++++++++++++++++++++++++
Mplans/release-29.md | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 115 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +- **The verdict bench asks to the operator's standard, and says which prompt it asked with.** What each verdict means is written once (`common/lib/report/verdicts.mjs`) and read by the bench's prompt, REPORT.md and umtool's bench page: CORROBORATED when the substance of the claim is shown by the cited words (framing, emphasis or a detail the transcript does not show does not demote it), PARTLY only when a part is shown overstated or wrong, and when in doubt between the two, CORROBORATED. The model now writes its reason before its verdict, and sees the report's title, the claim's section, and each cited line's speaker and recording date. Each run records its prompt version and a hash of its items; a run made before this is version 1, and a run is never resumed under another version. Needs a restart of the editor and umtool. +- **`archilyzer reports bench-verdicts` takes `--items-from <run>`, `--window-mode seconds|turn` and a stratified `--limit`.** `--items-from vb-r28` asks the same items again (for example a local model on a new prompt, at no cost). `--window-mode turn` shows the cited speaker's turn instead of a fixed number of seconds either side, bounded by `--window`. `--limit` keeps every verdict the operator ruled, in proportion. A re-run of a run asks only the models it names, so a local-only re-run never asks a paid model again. A citation that gives no transcript is listed with its reason instead of being left out silently. `pnpm ops bench-verdicts` takes the same keys (`itemsFrom`, `windowMode`, `limit`). +- **umtool's verdict bench compares runs and takes your marks.** `/tools/bench` shows each run's prompt version and items hash, and **compare with** lists the runs over the same items: each model's agreement in both and every claim whose answer changed. Each disagreement has **Right** and **Wrong** (was the model right?), kept beside the run, and the not-CORROBORATED precision and recall beside the bar are shown as ruled and with your marks, so the bar can be set from what you marked. "What the verdicts mean" lists the definitions. - **The research board keeps a key pressed just after a save, too.** A key that arrived after a save's answer, or after its redraw but before the moved line took the focus back, could still lose `e`'s field (the claim then went nowhere). The board now waits until the redraw is fully done before acting on any key. Needs a restart of umtool. - **A recurring report's tick no longer calls a capped scan "nothing new".** Triage used to take the scope from one `enumerate_matches(".")`, which stops at 2,000 recordings — the co-host pilot's five channels hold 23,284, the newest read last, so its first tick found "0 new" and ended quiet. Tier 0 now lists the scope from the build's own per-channel manifests (every recording, uncapped, dated by the build's index) and reads the terms only over the new recordings (and, on a first run, from the start date). A scan that still hits a cap or misses a channel is **partial**: the tick says "partial — not reached: …" as a **Your call** card in umtool (never quiet, no quiet edition recorded), the triage run says so on its page, and its set of seen recordings is not kept, so the next run counts new from the last complete run (or from its start date). The same rule holds for a Refresh's search again (a capped search with nothing new ends **partial**, not "no change"), a series' window check, and the Inbox's daily refresh check (a partial check still raises its card, naming what it did not reach; `umtool refresh --check` prints PARTIAL). Needs a restart of the editor and umtool. - **`enumerate_matches` takes `ids`.** Only the pages that hold those recordings are read, so the scan is bounded by them rather than by the scope; the footer says how many the scope holds. A sweep restricted to given recordings (a refresh's update, a triage's escalation) now scans only theirs. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -9460,3 +9460,38 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri plan and confirm guard it, there is no red button and no Signal outline since P6b); a toggle that is on is `pressed` (the panel ground); a state that is not a judgement wears `badgeVariants` `state` (a dashed ink edge); Meter is measurement. `e2e/visual-audit.spec.ts` measures every page's actions by computed colour. + +## Release 29 V1: the verdict bench, v2 (verified 2026-10-15, branch `r29/verdicts`) + +- **What a verdict means is written once:** `VERDICT_MEANINGS` and `VERDICT_TIE_RULE` in + `common/lib/report/verdicts.mjs` (typed through `verdicts.ts`). The bench's system prompt, REPORT.md's verdicts table + (`lib/report/docs.ts`), `CLAIM_FIELD_DOCS.verdict` (a pointer to it) and umtool's `/tools/bench` read them; nothing + else spells them out. Changing a sentence changes the prompt: bump `PROMPT_VERSION`. +- **The prompt version contract.** `PROMPT_VERSION` (`draft/bench/prompt.ts`) is a string bumped BY HAND with any change + to the system prompt, the meanings, the answer schema or the user prompt's shape. A run records `summary.promptVersion`; + a run without one is release 28's, `M7_PROMPT_VERSION` `"1"`. A run is never resumed under another version (refused, + naming `--items-from`). The answer schema is `{reason, verdict}`, reason first. +- **An items hash** (`benchItemsHash`): sha256 (16 hex) of each item's key, ruling and windows (recording, from, to, + cue count) — not its context lines. `summary.itemsHash`; a run before V1 has it computed from its `items.jsonl`. + Two runs "on the same items" means equal hashes; umtool compares only those. +- **`--items-from <run>`** (`itemsFrom`): a new run takes that run's `items.jsonl` exactly (and its skipped, dropped, + window and limit), filling the context lines (title, section, a quote's date) an older item lacks from the registry + as it is now — the hash does not change. Refused with `--report`, `--window`, `--window-mode` or `--limit`. +- **Resume asks only the invocation's models** (`runVerdictBench` iterates `validateBenchOptions(o).models`); + `summary.models` is the union, in first-asked order. A qwen-only re-run of a run never re-asks an API pair. +- **Window modes** (`items.ts`): `seconds` (±windowS, M7's) and `turn` — the cited speaker's run of attribution + segments (`diskTurnsOf`, `attribution.json`), else the cues until a ≥ `TURN_GAP_S` (2 s) pause or a `>>` cue, + clipped to ±windowS; each window's `bound` is `seconds | speaker | pause | limit`. A citation of a kept claim that + gives no window is `dropped` with its reason (`summary.dropped`); a `--limit` is `stratifiedLimit` (every ruled verdict + kept, the rarest first, the rest in proportion) and the rest are skipped "left out by the limit". +- **A run's dir gains** `trace.jsonl` (appended: a `start` line per invocation with the system prompt and schema, a + `call` line per call with the user prompt, the raw answer, the verdict, ms, usd) and `marks.json` + (`archilyzer-bench-marks` v1, `{marks: {<model>: {<report>/<claim>: {verdict: right|wrong, answer, at}}}}`, written + by umtool alone — `umtool/lib/bench-marks.mjs`, R6's discipline; read by common's `readBenchMarks`). A mark says + whether the MODEL was right on a disagreement; it applies only while the model's answer is still `answer`. +- **Scores** (`score.ts`): `notCorroborated {tp, fp, fn, precision, recall}` per model (a failed answer is never a + positive); `compareBenchRuns(a, b)` (shared item keys, models asked in both: agreement each, `changed`, `fixed`, + `broke`); `markedScore` (a disagreement marked Right counts as agreeing) tallied by `markTally` + (`draft/triage/types.ts`, which `precisionOf` now uses too). +- **The injected model** is `BenchDeps.ask(system, user, schema, model)` — no Meter, so an injected ask costs nothing + in the run's spend. diff --git a/plans/release-29.md b/plans/release-29.md @@ -179,6 +179,83 @@ The three release 28 smoke drafts deleted through `archilyzer reports delete <id `r28-smoke-research` and `r28-smoke-research2` (articles in the making — 265 KiB and 262 KiB). The usage ledger's rows and the shared prepared-media cache are kept, as the command keeps them. +### V1, as shipped (2026-10-15, lane B, `r29/verdicts`) + +Bench v2: the verdict bench asks to the operator's standard, says which prompt and which items a run used, and can be +compared and marked, so the bar can be set from marked precision. No real calls were made (the fakes and the injected +`ask` only); V2's runs are the orchestrator's. + +- **The meanings are written once** — `VERDICT_MEANINGS` and `VERDICT_TIE_RULE` in `common/lib/report/verdicts.mjs` + (typed in `verdicts.ts`): CORROBORATED = the substance of the claim is shown by the cited words (framing, emphasis or + a detail the transcript does not show does not demote it); PARTLY = a part is shown overstated or wrong (a part only + not shown is not PARTLY); CONTRADICTED and NOT_FOUND sharpened to the claim's substance; UNTESTABLE as before; the tie + rule "In doubt between CORROBORATED and PARTLY: CORROBORATED, unless a part of the claim is shown overstated or + wrong." The bench's system prompt, REPORT.md's verdicts table (a "Means" column and the tie rule, `docs.ts`), + `CLAIM_FIELD_DOCS.verdict` (a pointer) and umtool's `/tools/bench` read them. +- **The prompt** (`bench/prompt.ts`): rules only (Q0), the meanings and the tie rule, "write the reason first"; the + answer schema `{reason, verdict}` (reason first); the user prompt carries `Report:` (the title), `Section:` (the + claim's heading), each cited line's speaker (the citation's, else the channel) and recording date (the citation's, + else the record's `upload_date` — `bench/disk.ts` `diskDateOf`), each window headed with its channel and date. + `PROMPT_VERSION = "2"`; a run without one is `"1"` (`M7_PROMPT_VERSION`). The local prompt stays under 7,800 + estimated tokens (the window trimmed, as before). +- **Items** (`bench/items.ts`): `--window-mode seconds|turn` — `turn` is the cited speaker's run of attribution + segments (`diskTurnsOf`), else the cues until a ≥ 2 s pause or a `>>` cue, clipped to ±`--window`; a window's + `bound` says which. A citation of a kept claim that gives no window is DROPPED with its reason (not in the report's + citations, not a video or audio citation, the recording has no cues, no cues around the cited seconds) and listed in + `summary.dropped`, the dry run and the page. `--limit` is stratified (`stratifiedLimit`: every ruled verdict kept, + the rarest first, the rest in proportion, the largest remainder); the rest are skipped "left out by the limit". + `unruledItemsOfReport` is M8's reading of the unruled claims. +- **Runs** (`bench/run.ts`, `store.ts`): `--items-from <run>` takes that run's exact items (context lines filled from + the registry; refused with `--report`, `--window`, `--window-mode`, `--limit`); a resume asks ONLY this invocation's + models (a qwen-only re-run never re-asks an API pair; `summary.models` the union); the summary records + `promptVersion`, `itemsHash` (`benchItemsHash`: keys, rulings and windows), `windowMode`, `itemsFrom`, `dropped`; a + resume under another prompt version, or with `itemsFrom` naming other items, is refused. Every call is traced + (`trace.jsonl` in the run dir: a `start` line per invocation with the system prompt and schema, a `call` line with the + user prompt, the raw answer, the verdict, ms, usd). The model is injectable (`BenchDeps.ask(system, user, schema, + model)`, R6's shape). +- **Scores** (`bench/score.ts`): `notCorroborated {tp, fp, fn, precision, recall}` per model and the baseline; + `compareBenchRuns` (each model asked in both: agreement in each over the shared items, the claims whose answers + changed, fixed and broke); `markedScore` (a disagreement marked Right counts as the model agreeing) tallied by + `markTally`, which triage's `precisionOf` now uses too (its output and tests unchanged). +- **umtool `/tools/bench`** (inside the page, on the redesign's primitives): the status line names the window mode, the + prompt version (`data-prompt-version`) and the items hash (`data-items-hash`, and `from <run>`); **compare with** + (`nav "compare with"`, chips `<run> · prompt v<n>` over the runs with the same items hash) and its table (region + `compare`, `data-compare`, `data-metric` `agreement-a|agreement-b|changed`, list `changed answers`); **Right** / + **Wrong** (pressed when set, again to unmark; `data-mark`) on every answered disagreement, kept in the run's + `marks.json` (`lib/bench-marks.mjs`, R6's discipline, umtool the one writer; `POST /api/bench/marks {run, model, + key, verdict}`, refused on an agreement); region `precision` beside the bar (`data-metric` + `precision|marked-precision|marks`); "what the verdicts mean" (`data-meaning`); the dropped citations. +- **CLI/ops:** `archilyzer reports bench-verdicts` gains `--window-mode`, `--items-from` and the stratified `--limit`; + the body keys `windowMode`, `itemsFrom` (controller, the editor route, `pnpm ops` help); COMMANDS.md and REPORT.md + regenerated. + +| Commit | What | +| --- | --- | +| `243cf1ec` | common, editor: the meanings, the prompt v2, window modes, drops, the stratified limit, items-from, the resume, the items hash, the new scores, the injected ask and the trace; CLI/ops/route flags; `bench.test.ts` (+5), `reports-bench-verdicts.test.ts`, `_benchVerdicts.test.ts`; COMMANDS.md, REPORT.md | +| `452446a9` | umtool: `/tools/bench` — version, hash, compare, marks, precision, meanings, drops; `lib/bench-marks.mjs` (+ test), `/api/bench/marks`, `MarkButtons`; `verdict-bench.spec` (+2) and its fixture's second run | +| (this commit) | this record, FACTS, CHANGELOG | + +Gates (at `452446a9`; branch start `3217bdfb` in brackets): + +| Gate | Result | +| --- | --- | +| repo-wide `tsc --noEmit` | clean at each commit | +| common `pnpm --filter yt-dlp-transcript-common test` | **4198/4198** [4193] (+5 in `bench.test.ts`: the meanings, tie rule, schema order and context; the turn mode and the drops; the stratified limit; the injected ask, the trace, items-from, the resume over its own models, a cross-version resume refused; not-CORROBORATED, the compare, the marks) | +| editor unit `pnpm --filter editor test` | 304/304 [304] (`_benchVerdicts.test.ts` gains the two body keys) | +| mcp `pnpm --filter yt-dlp-transcript-mcp test` | 370/370 [370] | +| `pnpm run test:scripts` | 1014 tests, 1011 pass, 3 skipped, 0 fail [1013: 1009 pass, 3 skipped, 1 fail — `queue-lock.test.mjs` "two builds never overlap", the timing flake D1 owns; green this time] (+1 `bench-marks.test.mjs`) | +| `pnpm --filter umtool test` | 33/33 [33] | +| `archilyzer docs cli|files|env --check`, `settings example --check` | clean | +| umtool e2e `verdict-bench.spec.ts` (foreground, queued; its prebuild 69 s) | **4 passed**, 0 failed, 24.6 s | + +Found and left: +- **No dry run over the real registry was made** from the worktree (it has no corpus and no `vb-r28`); the first + `--dry --items-from vb-r28` is V2's, through the primary. +- **The turn mode without attribution** reads the cues' pauses: on a stream whose cues run back to back (as the + synthetic ones do) a turn is the whole ±window, `bound: "limit"`. With an `attribution.json` it is the speaker's run + of segments. +- **An injected `ask` has no Meter**: its calls cost nothing in the run's spend (the cap still applies to the estimate). + ## Not in this release Auto-posting to X/Bluesky/YouTube (text only); any umtool restructuring; the "en track → 0 cues" bug (closed in r20).