# Release 38 — research cases as a pipeline, and a local video assistant (plan) **Status 2026-10-27:** lane E (`r38/video-assist`, 5e62aa1b) and lane S (`r38/x-search`, 32cf0551) are merged; lanes 0 (the `common/lib/research/` contract), A, B, C and D were never started — no branch, no code (`privateNames` and `quarantined` statuses do not exist). The rest of this plan is open. Operator, 2026-10-20 (during the Oneylyzer case): "Add all the research techniques we do here as possibilities in umtool that can use API or qwen, including creating Archilyzer tools for the MCP to replicate Claude Code functionality if needed." "Part of the purpose of these research sessions with Claude Code are discovering things to add to umtool." "A feature to iterate on the video with hyperframes using qwen, such that I can request little things like changing transition time on local AI even when Claude Code is not available." The reference implementation is the case's own scripts (`~/reports/oneylyzer/sweep-1/candidates.py`, `merge.py`, `prompts/*.md`; not committed: they read a private case). What they did, step by step, is the inventory below; each step becomes a stage with a **manual path (no model)**, an **AI path routed by `settings.generation`** (api / local Qwen through the GPU arbiter / code = a Claude Code session via the MCP), and an MCP surface. ## What exists (survey, 2026-10-20) — extend, don't duplicate - umtool `/research` (ask bar, one `enumerate_matches` scan, reading log) and `/research/[case]` (a board of pinned quotes, verify, hand-off to an article or video) — `lib/research/cases.mjs`, `app/api/research/cases/**`. - The API sweep agent (`sweep-agent.ts`: extractor subagents via `extract_batch`, strict quote check, trace.jsonl) and the local sweep pipeline (`sweep-pipeline.ts`, code-driven 7000-char chunks). Research runs that propose acquisitions (`research.ts`, `decide.ts`, research-approve, autonomy modes, standing-rule refusals). - Triage tiers 0/1/2, the claim bench, swipe decks for clips/drafts, "by hand" articles (`handEdits.ts`). - `revise-video` (release 27/28): feedback → checked `videoOps` (drop/move/heading/narration/trim/add_clip/title/ subtitle), local = one schema-bound ask. No look/render ops, no hyperframes ops, article iterations only. - Clip editor "Ask the assistant" (release 36 D, `clips-suggest mode:"ask"`) — clip notes only. - Gaps: no case definition with eras/term families/private names; no candidate-window stage; no findings store, dedupe or sectioned report; no private-name gate; no quote-vs-captions/audio check; no lead discovery; the research agent has no wayback/import-page/capture-posts/find-copy; the MCP has no web/wayback/archive tools and can't do what a Claude Code session did with its shell (read a batch file, write findings, merge). ## The case pipeline (what the Oneylyzer session did, as stages) A **case** (`/research/[case]`, extended — its board stays) gains `case.json`: `{subjects:[{name, aliases[]}], scope:{channels[], groups[], sites[]}, eras:[{id, from, to, families:{: regex}}], groups:[{id, label, channels[]|"subject"|"coverage", era?}], privateNames:{terms[], note}, readerPrompts:{common, : text}, status}`. `privateNames` is never exported, never shown outside the case page, and is a GATE (below). 1. **Coverage** — per channel × year: listed, held, transcribed, untranscribed audio; the key periods highlighted; gaps as actions (download-missing, focus the case's site, persist, transcribe) — buttons, no model. 2. **Candidates** — term families per era over the scope's transcripts (en-orig before en; rolling-caption dedupe; cue/whisper fallback; title hits; ±W s windows merged), noise filters ("the video mentions a subject at all" for coverage groups; a stricter family for a subject's own late material), counts per family/year/channel before any read. Deterministic, a job; `candidates.jsonl` in the case dir. 3. **Batches** — windows grouped per reader group, budgeted by characters, written as WRAPPED TEXT (no line over 200 chars — the round-1 lesson: a reader's file tool truncates long lines and silently drops the densest windows). 4. **Read** — three paths producing the same findings rows (`{batch, slug, id, date, title, t, url, category, relevance 1–3, quote (verbatim ≤45 words), summary, speaker, confidence, round, by}`): - **by hand**: a candidate deck (the swipe-deck primitive): each window with its text and a player at t; keep → pick the quote by selecting words, set category/relevance/speaker; skip. Keyboard-first. - **AI**: a new generation task `case-read` per batch (api: Haiku/Sonnet extractor; local: Qwen through the GPU arbiter with the batch split to the prompt cap; code: the MCP tools below), concurrency-capped, each batch a job with its own ledger row; the reader prompt = `common` + the group's prompt, editable on the case page. - **quote check**: every AI row's quote must be found in the window's caption text (normalised) or it is marked "quote not found" (kept, flagged — not dropped: a garbled caption is still evidence to check). 5. **Merge** — validate, dedupe (same video, |Δt| ≤ 20 s → keep higher relevance, later round), sections by group, relevance ≥ 2 by default, a SUMMARY written by hand (or drafted by a model, marked as a draft) on top; `REPORT.md` / `.html` export; hand-off to an article as claims with citations (the board's hand-off path). 6. **Privacy gate** — every write of findings, summary, export and hand-off is scanned against `privateNames.terms` (word-boundary, case-insensitive); a hit blocks the export/hand-off and lists the rows (counts + row ids, never the term in a log). Readers' prompts always include the naming rule with `[name withheld]`. 7. **Verify** — per finding: the window's captions in both tracks side by side, the quote highlighted; **audio check** = `pnpm ops transcribe` of the window (whilePaused allowed by a button) and a word diff; status `verified | corrected | disputed | unverified`; "corrected by hand" edits keep the reader's original in history. 8. **Leads** — over a posts/forum channel in scope: the accounts/URLs it links most (counts), with context snippets on demand; each lead gets a role note and one of `archive | watch | never-archive` (never-archive feeds `privateNames`); `archive` creates the channel (X on no site, by rule) and starts its fetch/older walk. 9. **Absence and date checks** — the subject's uploads around each key date, and the latest uploads after an event ("no response found in captioned uploads through "), as a table. 10. **Evidence capture** — Wayback captures at chosen dates for a target list (release 37 `import-page`; the scan when B lands), and a forum post's attachments/screenshot (`capture-posts`) marked "forum attachment, post #N, unverified" in every surface. 11. **Polite retries** — a forum fetch that meets a challenge page retries after N minutes up to M times (today a shell wrapper): `fetch-posts {retryOnBlock:{minutes, max}}`, the job's log says each wait. ## The MCP: what a Claude Code session did, as tools (lane D) - Web and archives: `web_search`, `web_fetch`, `wayback_lookup`, `archive_search` (read-only, through the editor's paced ops) and `enqueue` kinds `import-page`, `capture-posts`, `find-copy`, `create-channel` (X never on a site; sites only by the operator). - Case tools: `case_get`, `case_coverage`, `case_candidates` (build or read counts), `case_batch` (one batch's wrapped text, paged), `case_findings_write` (append rows; schema-checked; privacy gate), `case_merge`, `case_verify` (captions side by side; queue the audio check), `case_leads`. - The research agent (`research.ts`) gains `wayback_lookup`, `import-page`, `capture-posts` and `find-copy` as proposals under its autonomy rules; `_researchEditor.ts` ROUTES extended. - `instructions.ts`: a `case_plan` (like `sweep_plan`) that tells an agent the stage order, the wrapped-batch rule, the naming rule and the merge — the corpus discipline stays in code, not prose. ## The video assistant (lane E) — "make the joins 0.15 s" on local Qwen - **Look ops** for `videoOps` (and the clip-project manifest): `{op:"look", key, value}` over `LOOK_KEYS` (headerHeight, footerHeight, qr, transition, transitionStyle, loudness, captions, room, slide) validated by the same validators `updateRender` uses; `{op:"clip_room", id, …}`, `{op:"clip_edges", id, start, end}` (within bounds), `{op:"fx", id, param, value}` over a hyperframes composition's declared params (each fx module declares its tunable params + bounds; `chrome-fx.mjs` / deck fx) — never free HTML. - **Ask box** on every project (Build tab's Look panel, a project-level note, the clip editor's side column): a request in words → task `video-assist` (default route LOCAL; one schema-bound ask with the project's current look + cut view trimmed to the prompt cap) → proposed ops shown as a diff ("transition 0.22 → 0.15 s") with **Apply** / **Dismiss**; Apply goes through `updateRender` / the clip editor writer (token-guarded); nothing applies silently. **Preview**: a short join preview render (the r36 `transition-.mp4` 4-clip pattern) through the heavy slot. - Works for article videos (`revise-video` gains the look/fx ops) AND for clip projects (no article needed). - Manual path: the Look panel itself, now with the owed fields (slide travel/smear/grain, room tail/head). - Tests with the fake ollama/anthropic: requests → ops (a fixture table of 20 requests: "quicker joins", "no QR", "louder", "smear less", "keep 2 s after the last word"); refusals for out-of-bounds values. ## Lanes (parallel Opus implementers; dependency graph) - **0 (orchestrator, on main first):** the contract — `common/lib/research/caseTypes.ts` (case.json, candidate window, batch, finding row, verify status, lead) + `common/lib/report/videoAssistTypes.ts` (look/fx/clip ops). - **A `r38/case-pipeline`** (stages 1–3, 5, 6, 9; case page UI; jobs + ops + CLI): after 0. - **B `r38/case-read`** (stage 4: candidate deck, `case-read` task api/local/code, quote check): after 0, parallel with A (codes against the contract; wires to A's batch files after A merges). - **C `r38/case-verify-leads`** (stages 7, 8, 10, 11): after 0, parallel. - **D `r38/mcp-research`** (the MCP tools + research-agent tools + case_plan): generic tools now; case tools after A. - **E `r38/video-assist`** (look/fx/clip ops, Ask box, preview, Look panel fields): independent; first to launch. Merge order: E, A, C, B, D. Gates: tsc; common/editor/mcp/umtool/test:scripts; docs; e2e per lane + the full suites at the end; editor + umtool restarts. ## First live use The Oneylyzer case re-run end to end through the app: coverage → candidates → local Qwen readers on the early batches and API readers on the coverage batches → merge → privacy gate → verify the 20 starred findings → export. And on the Nik Drop: "make the joins 0.15 s with less smear" from the Ask box on local Qwen, applied, previewed. ## Found during the case (add to the lanes that fit) - **A CDX 403 is an exclusion, not an error** (seen live: one X profile answers 403 on x.com and twitter.com while other lookups succeed). `wayback-lookup` / `import-page` / `wayback-scan` return a typed `excluded` refusal with that sentence; the case's capture table shows "excluded from the Wayback Machine (cause unknown)". (Lane C.) - **archive.today as a second source** — MOVED to release 37 lane F (`r37/archive-sources`, 2026-10-20): forum threads link `archive.ph/` copies of deleted posts that Wayback never captured. A read-only fetch of an archive.today memento into a Wayback pages channel record (same `Post.page`, `source:"archive.today"`), paced, no CAPTCHA solving — refused with a sentence when the site challenges. (Lane C, or a release 37 follow-up.) - **A Newgrounds extractor** (user pages, art/movie pages): the generic extractor reads almost nothing of a 2014 user page (the content sits in blocks it drops). Raw captures are kept, so `reextract-pages` fixes held records. (Lane C.) - **Forum attachments as marked evidence**: `capture-posts` on a forum channel's posts → "forum attachment, post #N, unverified" wherever shown; a case export lists them in an Evidence section with the post link. (Lane C.) - **Private names are stored as hashes** (`privateNames.sha256`: sha256 of each lowercased term), never as text: the gate hashes every word and 2–3-word phrase of what it checks. A case's private terms then never sit in any file. (Used live in `~/reports/oneylyzer/case/build_case.py`.) (Lane A.) - **Quarantine as a finding status** (operator 2026-10-20: forum joke culture): `quarantined` for anything first seen on a forum and not corroborated by an independent source; its own report section; attachments looked at before being described. (Lanes B/C.) - **An X search channel** (a saved query across accounts, leads ranked by author, Archive / Never archive) — lane S `r38/x-search`, launched 2026-10-20. ## Lane C, as shipped (`r38/case-verify-leads`, 2026-11-02) Stages 7, 8 and 10, and the case's found items for lane C. Built beside lane A at first, then merged A (`r38/case-pipeline` e182dd00) and moved onto its seams: the three stages are panels **7 Verify**, **8 Leads** and **10 Evidence** of A's `/research//pipeline` (in its Stages list), on A's store, lock files, privacy gate and export. FACTS.md, "Release 38 lane C", has the verified details. - **7 Verify** — a finding's window in every caption track side by side (en-orig, en, a transcription; a post's text), the quote's words lit; the **audio check** (held media or a clip fetched through the editor → `transcribe {path, start, end, whilePaused?}` → `@@transcribe-result` → a word diff, kept as `verify.audio`); the five statuses (`quarantined` with a forum hint); **correct by hand** keeps the reader's words once in `verify.original`. Findings are rewritten whole inside A's `findings.jsonl.lock` under A's gate. - **8 Leads** — the accounts and pages a posts/forum channel links most, counted by post, context on demand (private names withheld); role + disposition. never-archive → the name's hash through A's `changePrivateNames`, the lead kept only as `hash:`; archive → `create-channel` with no `sites` (X never on a site) and its first fetch; Older walk → `fetch-posts {older}`. - **10 Evidence** — `evidence.json` (a contract addition): Wayback targets × dates (`wayback-lookup`: a 403 is the `excluded` row; `import-page {slug, url, at}`), a forum post through `capture-posts` labelled "forum attachment, post #N, unverified" everywhere (`forumAttachmentLabel`), attached to findings; A's export prints them in an **Evidence** section (`common/lib/research/caseEvidence.ts`). - **11 Polite retries** — already on main (release 37 lane G: `fetch-posts {retryOnBlock}`, its log says each wait, `fetchForumPosts.test.ts`). Nothing added. - **Found during the case:** a CDX 403 — `wayback-lookup` and `import-page` already answered `refusal: "excluded"` (release 37 lane F); `wayback-scan` now marks an excluded target and goes on to the next (Captures tab line). **Newgrounds extractor** (`ng-user`, `ng-art`, `ng-movie`; synthetic fixtures; a reextract of a generic-read capture tested). **Forum attachments as marked evidence**, **`quarantined`** (as above). | commit | what | |---|---| | 93b60ec4 | wayback pages: a Newgrounds extractor | | 72734218 | wayback scan: an excluded target is answered, not failed | | b1883d14 | research cases: lane C's contract additions (evidence.json, the audio check, the labels, the word diff) | | ed0c3e61 | research cases: a possessive never slips a private name past the gate (A shipped the same rule) | | 876b46c0 | umtool research: verify, leads and evidence stages | | d3a50503 | docs + e2e: research.md, case-stages.spec, CHANGELOG, FACTS | | 064de1ca | leads: a role note alone keeps the disposition; editor e2e: an excluded scan target | | 6332a730 | merge lane A; lane C's stages onto its seams (panels, store, gate, changePrivateNames, the export's Evidence) | | 229ee2ca | the verify panel's status follows a save; the spec waits out a cold read | **Gates (after the merge):** root `pnpm typecheck` clean; common 5324 tests, 5322 pass, 0 fail, 2 skipped; umtool unit 51/51; mcp 385/385; `test:scripts` 2174, 2169 pass, 1 fail (`renderMode.test.mjs` "take --priority killed by a signal", a timing test that passes alone — 13/13 — and failed the same way before the merge; untouched here), 4 skipped; `archilyzer docs cli --check` and `docs env --check` clean (no ops or CLI changed). umtool e2e (`case-stages`, `case-pipeline`, `board`, `import-capture`, `research`, `article-research`): 26 passed and the one case-stages failure fixed, then `case-stages` 4/4 (34 s); editor e2e `wayback-captures` 2/2 (47.6 s, before the merge; the merge touches none of its code). Editor unit 399/400: `_researchRuns.test.ts` "the research editor is this editor's own ops routes" fails the same on main 3cb071fe. **Left:** lane B's appends should use A's `appendFindings` (verify already shares its lock); the MCP's `case_verify`/`case_leads` (lane D) can call `findingCaptions`/`leadsView` or the stage routes; a live Newgrounds capture has not been read (the extractor is from synthetic fixtures — a `reextract-pages` fixes held records once a real page shows a different shape).