# Triage first ## Where it runs A cheap pass before a recurring report's sweep flags what is worth researching; only what it flags reaches the better model with tools (`plans/umtool-redesign.md`, "R6", "R6.1"). | Shape | What a tick does | |---|---| | **Watch** | Fetch, then triage what is new in scope. At or above the threshold, an API sweep of the flagged recordings, as a new article `-`. Below it, nothing: the tick ends with its triage log, $0 API. | | **Series** with *Triage first* | Fetch the window, triage, then sweep the flagged recordings as the edition (no date bound, so a late transcript is in). Below the threshold the edition is quiet. | | **Living report** with *Triage first* | Fetch, triage, then R4's refresh reads the flagged recordings (no second fetch). Below the threshold, no change. | Create one at **Create → A recurring report**: pick **Watch**, or tick **Triage first** on a series or a living report. Set the terms, the digest topics and the threshold there. ## The tiers | Tier | What | Cost | |---|---|---| | 0 | Code. Recordings new since the last triage **by id** (an old recording whose transcript landed late is new), that match the terms (aliases too) or carry a matching digest topic tag. The first run counts new by upload date. | $0 | | 1 | The local model (or `models.extractor`) judges each candidate's matching windows: the sweep pipeline's window judge. A line is a flag only when the code finds it verbatim in the window and in the transcript's cues. Score 3 is a strong flag, 2 a weak one; 1, off topic, invented or not relevant is dismissed, with why. | $0 local | | 2 | Only at or above the threshold: an API sweep restricted to the flagged ids, within the caps and the day's escalation cap. | metered | The default threshold is one strong flag, or three flags of any strength. ## Tier 0's listing and what is seen - **The listing is the whole scope, by id**, from each channel's transcripts manifest (uncapped; the summaries index dates the rows) — on a first run too, where new is by upload date (`date >= since`). The terms query is bounded to the new ids (`enumerate_matches` `ids`). - **Seen means judge-able.** A listed recording with no transcript yet (synced, not transcribed; a deleted upload with metadata only) is neither new nor seen: the run after its transcript lands counts it new, and it is a candidate if it matches. An id stored while it had no text is dropped on the next complete run. The log's first line says it: "tier 0: 23,290 listed · 96 without a transcript yet (not seen; new once transcribed)"; the triage page counts them under Tier 0. ## Partial runs Tier 0 is **partial** when its listing could not read the whole scope: a cap, a channel not reached, a manifest that does not read, a record no page dates. Never a silent zero: - The run's summary starts "partial (not reached: …) ·"; the triage page marks tier 0 partial, the series page the run. - **A partial run keeps no seen set.** The last complete run's `seen.json` stands; with none, the next run counts new from its `since`. - Below the threshold, the tick ends **`partial`**, never quiet: a **tick-partial** card (Your call, **See what was missed**), "partial — not reached: …; nothing flagged in what was read (…)". A series records no quiet edition, so the next tick covers the window. At or above the threshold it still escalates, with a warning on the tick. - A capped window check (a series without triage) and a capped refresh search end `partial` the same way. ## The fetch under a hold A tick's fetch asks whether transcription is held now (the worker pool's live state: paused, or no worker enabled). Held, `transcribe-bucket` is skipped — "transcription is paused (…) — N recordings wait; a later run reads them once transcribed" — and that is a warning on the tick. A cancelled step is a warning; "nothing new to transcribe" is routine, never one. ## Recovering a bad run ```sh pnpm ops report-schedule --json '{"action":"reset-triage","id":""}' # the plan pnpm ops report-schedule --json '{"action":"reset-triage","id":"","k":3,"confirm":true}' # from run 3 on ``` The plan names the triage runs it discards (from run `k` on; all by default), `seen.json` when those runs fed it (the next run counts new from its `since`), and the quiet editions they recorded (the next tick covers their windows again). The schedule, its cadence, its tick log and every edition article stay. Refused while a tick runs, and when there is nothing to discard. ## Learned spellings Transcripts are AI-made and mishear names ("Melanie Mack" for Melonie Mac). A watch learns its own spellings, so it does not miss those lines. - **Which names.** Each literal alternative of the terms with a capital letter — a proper name (`\b` anchors aside); a lowercase word or phrase, a regex class, quantifier or group is skipped. At most 16 a pass. - **Proposed.** The triage model lists up to 5 likely mis-hearings of each name: sound-alikes, split or joined words, a dropped or added letter. A pass runs when a schedule that triages is created, when its terms change, on `learn`, and in a tick before tier 0 when the last pass is a week old. A failed pass is a warning on the tick. - **Heard.** While tier 1 reads a window it also reports any span it takes for a mis-hearing of a watched name. The code checks the span is verbatim in the window and in the cues; else it is put aside, with why. - **Nothing is learned on the model's word.** Each spelling is counted in scope, uncapped: the listing, then `enumerate_matches` restricted to its ids in batches. No hits: dropped. A spelling the terms already find ("Melanie Mack" under "Melanie Mac") is not new. Then the judge reads up to 3 windows where it occurs, newest first, each answering whether it means the name and quoting the line, which must be verbatim in the window and the cues. Kept when at least 2 of the windows read say so; with only 1 window, that yes and at least 3 recordings in scope. Kept: the spelling, the name, the proving line and where, its hits, its source (`proposed` or `heard`) and each window's verdict. Dropped ones keep their reason (no hits, not the name, not verbatim, too few, known, removed, past the cap) and their windows' verdicts. - **Used on this watch only.** Learned spellings join the candidate query as escaped literals, never a regex. The tick log and `triage.json` say "terms + N learned"; a candidate a spelling brought names it. At most 20 a watch. A spelling whose name left the terms is idle: kept, not used. - **Suggest removing.** A spelling whose candidates were dismissed in each of its last 4 runs with none flagged is marked "suggest removing". Nothing removes it but you. The series page's **Learned spellings** lists them: the lit spelling's proving line on the reader with its cite, **Remove** (never learned again) and **Promote to search alias**. Both are plan, then confirm. A promotion writes through the editor's alias writer, to the global aliases or one site's: the spelling is added as a trigger to the alias for that name, or a new alias is made. Its note says "learned by watch from ". **Propose spellings** runs a pass now. ```sh pnpm ops report-schedule --json '{"action":"learn","id":"","dryRun":true}' # the names it asks about pnpm ops report-schedule --json '{"action":"learn","id":""}' # the pass, a job pnpm ops report-schedule --json '{"action":"unlearn","id":"","spelling":"Gothics"}' pnpm ops report-schedule --json '{"action":"promote-alias","id":"","spelling":"Gothics"}' # the plan pnpm ops report-schedule --json '{"action":"promote-alias","id":"","spelling":"Gothics","site":"jeralyzer","confirm":true}' ``` ## What you see - **`/series/`** — a watch's **Found** list (each escalation's article and board), the **Triage** table (every run, escalated or not, the spend per tier), the precision of your marks and a suggested threshold. - **`/series/`, Learned spellings** — what the watch learned of how the transcripts mishear its names, each with its proving line; Remove, Promote to search alias, Propose spellings (above). - **`/series//triage/`** — one run: the tiers, the candidates, each flag with its line on the reader surface and the judge's reason, each dismissal with why, what escalated. Keys: `j`/`k` move, `y` right, `x` wrong, `u` unmark, `b` open the flags as a board. - **Work** — a watch is its own kind, **Watch** (`/work?kind=watch`); its found articles are its own, not Work rows. - **The run page** of an escalated sweep (`/research/runs/
/`) — its first step is **triage first**, linking the run. - **The Inbox** — a watch that escalated is a **Worth researching** card (Your call; the decision kind `worth-researching`, [inbox.md](inbox.md)). Its action opens the board: an R2 case of the flags, each quote **by triage**, whose hand-offs make an article or a video. The card goes once the board has a hand-off or every flag of the run is marked. A suggested threshold is only a suggestion. The schedule keeps its own until you change it. ## Where things live | Path | Writer | |---|---| | `reports/.triage///triage.json`, `trace.jsonl` | the editor's `report-draft {"task":"triage"}` job | | `reports/.triage//seen.json` | the same job (only when a run completes) | | the schedule's tick line `triage` | the editor's tick | | `reports/.series//learned.json` (a living report's: `reports/
/learned.json`) | the editor (`controller/learnedSpellings.ts`, the one writer) | | `search-aliases.json`, `sites//search-aliases.json` (a promotion) | the editor's alias writer, on your confirm | | `REPORTS_ROOT/.umtool/triage/.json` (marks) | umtool | | `REPORTS_ROOT/.umtool/research//case.json` (the board) | umtool, never the editor | ## Settings `settings.generation.triage` (SETTINGS.md): the judge (`local` or `extractor`), `strong` and `weak`, `maxEscalationsPerDay`, `maxCandidates`. Settings → Generation edits them. A schedule may carry its own threshold. ## From the command line ```sh pnpm ops report-schedule --json '{"action":"create","shape":"watch","topic":"Co-host watch","channels":["demo-channel"],"terms":"co-host","cadence":"daily 06:00","dryRun":true}' pnpm ops report-draft --json '{"task":"triage","article":"co-host-watch","question":"Who co-hosts?","channels":["demo-channel"],"terms":"co-host"}' --wait ``` A flag on a co-host's line is a speaker check, not a finding: a board's quote says **Speaker not checked** until you check it.