commit 41e038bf43a867625ff46ecb72adccadf8bc9a99
parent 07af88f5802bcbd84237fbec6675385ba152a8e8
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 13 Oct 2026 20:46:41 -0400
plans: release 28 — the remaining media tasks, generation quality, follow-ups and housekeeping
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
| A | plans/release-28.md | | | 250 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 250 insertions(+), 0 deletions(-)
diff --git a/plans/release-28.md b/plans/release-28.md
@@ -0,0 +1,250 @@
+# Release 28 — the remaining media tasks, generation quality, follow-ups and housekeeping
+
+Status: **RATIFIED 2026-10-13** — all four groups (media tasks, quality, follow-ups, housekeeping). S0 landed on
+`r28/integration`.
+
+## Start here (the implementing session)
+
+Read before acting:
+- `AGENTS.md`;
+- `plans/STATE.md` ("Now") and `plans/FACTS.md`;
+- `plans/tools/implementer-rules.md`;
+- this plan, and `plans/release-27.md`'s record (the machinery this release builds on).
+
+**The orchestrator** runs in the primary checkout; the integration branch is in the worktree `~/Projects/r28-integration`:
+- lane worktrees: `pnpm wt add <branch> --from r28/integration`, then `link-fixture-public.sh`;
+- merges are `--no-ff`; `main` moves by `git merge --ff-only` after the gates;
+- rollout scripts are `~/reports/release-27/scripts` copied to `~/reports/release-28/scripts`, MERGE and LIVE re-guarded.
+
+## Rulings (operator, 2026-10-13)
+
+- **Review gate:** the full gate. Drafted fields carry provenance and an approve/reject, a field the operator edited is
+ never overwritten, and a `final` build refuses unapproved drafts (the original plan's D2).
+- **Verdicts:** bench first. A `verdicts` task ships only for models that pass the operator's bar, as AWAITING_REVIEW
+ proposals.
+- **Cleanup is authorised without a per-item OK (after the gates):** prune stale worktrees, delete the stopgap folder and
+ the user-level `/gen`, delete the candalyzer site, finish and deploy the hub tombstone.
+
+## Facts found (survey, 2026-10-13)
+
+- None of the media tasks exist. `common/lib/report/draft/tasks/index.ts` has five (sweep-agent, sweep-pipeline,
+ revise-report, revise-video, narrate). No `drafted` provenance or general review exists anywhere.
+- **The pattern to copy** is `narrate.ts`: evidence per entry → `structuredAnswer` against a schema → checks
+ (`grounding.ts`) → keep the better of two attempts → a `<task>-draft.json` audit file → `snapshotManifest` →
+ `writeManifest` (`tasks/project.ts`).
+- **The gate to generalise** is release 25's narration review: `umtool/report-to-video/narration-review.mjs` (the
+ `NARRATION_REVIEW_FILE`) and `build-video.mjs:4137` (an un-approved narrated card refuses the build unless
+ `--narration-unreviewed`); `umtool/lib/report/narration-review.mjs` is umtool's view; `driver.mjs:55` has the
+ `final` mode.
+- **Where each media field lives** (manifest; `umtool/report-to-video/README.md`):
+ - clips: timeline entries, today one per citation in report order (`convertManifest.ts:407`);
+ - on-screen: an entry's `onscreen.{title,subtitle}` (`umtool/lib/report/onscreen.mjs`, `OnscreenSection.tsx`;
+ validated by `deck.mjs` `normalizeOnscreen`);
+ - teaser: a `{type:"teaser", lines, …}` entry (`StructureEditors.tsx` hand editor);
+ - flips: `render.chrome.flips.pairs[]` (`flips.mjs` `validateFlips`, `validateFlipEntries`; no umtool UI);
+ - threads: `render.chrome.threads.list[]` and each clip's `thread` key (`threads.mjs` `validateThreads`,
+ `validateThreadEntries`; no UI; NOT social posts);
+ - YouTube title and description: no field anywhere (new);
+ - verdicts: the report's `Claim.verdict` (`schema.ts:80`), mirrored to the manifest's `claim.verdict`; no op sets it.
+- **Q0 (binding for every prompt):** counts and lengths are enforced in code; prompts carry rules, never worked
+ examples; keep the better of two attempts; the local prompt is ≤ 8k tokens.
+- **Quality gaps:**
+ - no check catches a speaker's first-person words in the narrator's mouth (`grounding.ts:179-237` is where the lints
+ live);
+ - nothing rejects a fragment quote ("I priced it as"; `citations/verify.ts`, `tasks/quotes.ts`);
+ - local revisions mostly fail in the tool loop (the r27 fallback asks once with `structuredAnswer`, and the numbered
+ view is never trimmed to the 8k cap).
+- **Follow-ups:**
+ - research continuation is only request-driven (`researchRuns.ts` `continuationOf` / `markContinued`, called from
+ `reportDraft.ts:315,392`);
+ - the extractor is settings-only (`reportDraft.ts:465`);
+ - `report-draft` discards `setProgress` (`JobProgressMetric` in `common/jobs/registry.ts:17`; example
+ `controller/fetchWindows.ts:274`);
+ - `~/.claude/commands/gen.md` is the stale stopgap version (the repo's overrides it in this project).
+- **Housekeeping:**
+ - `scripts/parakeet-stitch.mjs:346` mkdtemps, and the pause path `process.exit`s inside the `try` (:360), skipping the
+ `finally` rm (:379);
+ - flaky tests: `relocateChannelMedia.test.ts:1602` (real rsync in a shared temp dir), `scripts/queue-lock.test.mjs:792`
+ (timing), `editor/e2e/backfill.spec.ts:516` (unchecks before the previous save settles);
+ - A7: `~/reports/release-26/scripts/a7-fill-media.sh` (40 post captures via the editor, 2 windows, prepare, private
+ homepage);
+ - site delete is editor-only (`editor/app/sites/actions.ts:319` → `common/lib/site.ts:311`), with no ops verb;
+ - the hub tombstone code shipped (`common/publish/tombstones.ts`); a hub publish with its live tombstone probes, and
+ release 18's "open question 1", are owed;
+ - about 17 worktrees are on branches merged into `main` (unmerged: `mk/dedup-ums`, `export/gumroad-tip`,
+ `r13/phase-5`, `diet-series`; plus a detached `render-local-sources`);
+ - `plans/STATE.md` "Now" predates r27's rollout.
+
+## Shape
+
+**The draft framework (M0)** — one shape for every media task, narration included:
+- A drafted manifest field carries `drafted: {task, model, at, iteration?, attempt}` beside it (an entry's `onscreen`, a
+ teaser's `lines`, `render.chrome.flips`, `render.chrome.threads`, `publish.youtube`, a card's `narration`; the
+ timeline order for `cut`).
+- **No overwrite:** a field without `drafted` (the operator wrote or edited it) is never replaced. The new draft goes to
+ `<task>-draft.json` as an alternative with "use this" in umtool. Editing a drafted field in umtool removes its
+ `drafted` (it is the operator's now).
+- **The review** generalises `narration.review.json` into one review file keyed by `task/entry/field`: approve or reject
+ with a note. `build-video` lints it: preview and fast builds pass with a warning; `final` refuses any
+ drafted-and-unapproved field (`--drafts-unreviewed` overrides, as `--narration-unreviewed` does). Narration moves
+ onto it, and existing narration reviews read unchanged.
+- **A media task** = `(iteration, entries?, model, force?)` → evidence → `structuredAnswer` → code checks (counts,
+ lengths, ids that exist, grounding) → the better of two attempts → `<task>-draft.json` → snapshot → write with
+ `drafted`. Each task is registered in `tasks/index.ts`, runs as a `report-draft` step on the iteration (like narrate:
+ `steps[]`), and gets a route in `settings.generation.routes`.
+
+**The tasks:**
+- **M1 cut** — selection and order from the report's citations. A cap on clip count (setting, default 20), ids only
+ from citations, order by argument; windows untouched (fetch and snap stay code).
+- **M2 on-screen** — title (≤ 60 chars) and subtitle (≤ 90) per entry, grounded in the claim and quote.
+- **M3 teaser** — 3 to 5 lines, each ≤ 70 chars, no quotes read out, grounded.
+- **M4 flips** — THEN/NOW pairs over existing timeline ids. A pair needs two clips on one topic at different dates
+ (dates checked in code). `validateFlips` passes.
+- **M5 threads** — a short list (2 to 4) and a `thread` key per clip. `validateThreads` passes.
+- **M6 YouTube** — a new manifest field `publish.youtube {title, description}`:
+ - the model writes the title (≤ 100 chars) and a summary paragraph;
+ - code appends chapters from the build's chapter list, and source links from the citations (moment links);
+ - the build writes `out/youtube.txt`;
+ - umtool shows and copies it.
+- **M7 verdict bench** (local-only data, counts-only in commits):
+ - one claim per call (claim, quote, the transcript window) over existing fact-checks with operator rulings;
+ - models: Sonnet 5.5, Opus 5.5 and qwen3:8b;
+ - per model: agreement, a confusion matrix, CONTRADICTED and NOT_FOUND recall, against an always-CORROBORATED
+ baseline;
+ - a umtool results page, audit-style;
+ - the operator then sets the bar.
+- **M8 verdicts** (only after the bar is set, only for passing models):
+ - a `proposedVerdict {verdict, model, reason}` on claims;
+ - AWAITING_REVIEW in umtool, approve → `verdict`;
+ - never written to `verdict` directly.
+- **M9 surfaces:**
+ - "Draft with <model>" per section in the project and Iterations pages;
+ - "Draft everything" = the chain's optional text steps (cut → windows → on-screen → teaser → flips → threads →
+ narration → voices → fast build → podcast → YouTube);
+ - MCP `generate` and `generation_policy` know the new tasks, and `/gen` and `archilyzer gen` follow.
+
+**Quality (Q):**
+- **Q1** — a hard narration check: a first-person sentence (I/my/me/we/our outside a quote) is refused. The narrator is
+ third person by rule. If a sentence closely matches an evidence quote, the reason names it.
+- **Q2** — a quote-fragment check:
+ - a generated quote under 4 words, or ending on a function word (as, to, the, and, of, a…), is `fragment`;
+ - code offers the full sentence from the cue window, and the repair round and revisions use it;
+ - verify-quotes reports `fragment` as a warning for existing reports;
+ - `authoringRules.ts` gains "quote a whole sentence or clause".
+- **Q3** — local-first revisions: for an ollama model, skip the tool loop and make one `structuredAnswer` ops batch over
+ a numbered view trimmed to the 8k cap (sections the feedback names first, quotes shortened in the view only). The API
+ path is unchanged.
+
+**Follow-ups (F):**
+- **F1** — auto-continue: an `auto` research run whose acquisitions settle continues into its sweep by itself (a check
+ on the editor's existing heartbeat, plus at each acquisition job's end). Channels not yet in any build are skipped,
+ with a warning, and the caps hold.
+- **F2** — a per-job `extractorModel` body key (ops, umtool per-step model, MCP `generate`).
+- **F3** — progress metrics on `report-draft`: `turns` for agent tasks, `cards` and `entries` for media tasks; a new
+ `JobProgressMetric` value, threaded through `TaskDeps`.
+- **F4** — retire the stopgap: delete `~/reports/local-reports` and `~/.claude/commands/gen.md`; docs say the repo's
+ `/gen` is the one.
+
+**Housekeeping (H):**
+- **H1** — parakeet-stitch: rm the temp dir before the pause `process.exit`, plus a start-up sweep of
+ `parakeet-stitch-*` older than 24 h that no running process holds; then remove today's 21 stale dirs.
+- **H2** — the three flaky tests: an isolated temp dir and mtime tolerance; timing slack; wait for the save to settle
+ before unchecking.
+- **H3** — `plans/STATE.md` "Now" rewritten for r27-live and r28; FACTS gains r27's facts (the two-line finding, the ops
+ ask, delete semantics).
+- **H4** — the A7 leftovers: re-check the script against r27's CLI (`prepare --only`), then run it through the editor
+ (paced captures on the posts queue).
+- **H5** — `pnpm ops delete-site {id}` (an adapter over `deleteSiteAction`, refusing a site that has a deployed project
+ unless `force`); then delete `candalyzer` with it. Channel data untouched; the Candace rule stands.
+- **H6** — the hub: `archilyzer publish hub` build and production deploy; read the tombstone probes (plain and busted);
+ answer release 18's open question 1 in the record.
+- **H7** — prune the worktrees whose branches are merged into `main` (branches kept; the unmerged four and
+ `render-local-sources` untouched); `r27-integration` is replaced by `r28-integration`.
+
+## Lanes (at most three Opus implementers; worktrees from `r28/integration`)
+
+- **S0 (orchestrator):**
+ - `r28/integration` from `main`;
+ - `plans/release-28.md` committed (this plan);
+ - test-kit additions: manifests with every field, a fact-check fixture with ruled claims (synthetic);
+ - H3.
+- **Phase 1:**
+ - lane A: M0 (framework, review, the `final` refusal, badges, narration moved onto it);
+ - lane B: Q1 → Q2 → Q3 → F2 → F3;
+ - lane C: M7 bench → H1 → H2 → H5 (code).
+ - The orchestrator, meanwhile: F4, H4, H7, then H5's delete and H6 once their code and the gates allow.
+- **Phase 2 (after M0):** lane D: M1 → M2 → M3; lane E: M4 → M5 → M6; lane F: F1.
+- **Phase 3:**
+ - M9 (one lane);
+ - M8 once the operator has set the bench bar (the bench results page is the handoff);
+ - then the gate round and the rollout.
+
+Prelude and briefs follow r27's (`$T/r27-prelude.md` → `$T/r28-prelude.md`): the test kit, fakes, no real LLM calls in
+tests, memory floor, single-spec e2e for lanes, records in this file.
+
+## Rules that bind every slice
+
+As release 27:
+- no session links or trailers; the Co-Authored-By line alone;
+- heavy work through the heavy slot (6 GB floor, one `next build` at a time);
+- scratch in the job dir, never `/tmp`;
+- no hand edits under `transcripts/**`;
+- no yt-dlp, gallery-dl or ASR by hand;
+- never print the key or the scrub files;
+- Candace data never in fixtures — the M7 bench reads ruled claims locally and commits counts only;
+- tests use the S0 fakes; real API calls only in the bench run (≤ $5) and the live smoke (≤ $3).
+
+## Verification
+
+- Gates on `r28/integration`:
+ - `pnpm typecheck`, `pnpm test`, `docs env|files|cli --check`, `settings example --check`;
+ - the four capped builds;
+ - `pnpm e2e:all`, plus new specs: `draft-review.spec` (badge, approve/reject, `final` refusal, the no-overwrite
+ alternative), `media-draft.spec` (each task over the fake LLM and the editor stub), `verdict-bench.spec`, and a
+ `report-draft` progress assertion. A red is re-run alone; a persistent red blocks.
+ - privacy counts; the source mirror's check.
+- Unit:
+ - each task's code checks (counts, lengths, ids, dates for flips);
+ - Q1 (first-person refused);
+ - Q2 (fragment found, the full sentence offered);
+ - Q3 (a trimmed view under 8k; one ops call);
+ - F1 (an `auto` run continues once; caps hold);
+ - H1 (the pause path leaves no temp dir).
+- Live smoke (the operator's key, ≤ $3, through umtool):
+ - "Draft everything" on a fresh small article;
+ - each media task on qwen and on Sonnet;
+ - approve and reject in the review;
+ - a `final` build refused, then passing after the approvals;
+ - `out/youtube.txt`;
+ - an `auto` research run that continues by itself;
+ - a cancel.
+- Housekeeping checks:
+ - `/tmp` has no `parakeet-stitch-*` after a paused transcription;
+ - the three formerly flaky tests pass five runs each;
+ - candalyzer is gone from `/sites`;
+ - the hub's tombstone probes read ok;
+ - `pnpm wt list` shows only live worktrees.
+
+## Rollout
+
+Fast-forward `main`; editor and umtool build and restart (`~/reports/release-27/scripts` copied to
+`~/reports/release-28/scripts`, MERGE and LIVE re-guarded); Claude Code picks up the MCP tools on restart; homepage
+source-mirror publish; the hub deploy (H6). No public site changes otherwise.
+
+## Record
+
+### S0, as shipped (2026-10-13, orchestrator)
+
+`r28/integration` from `main` `e8a5f49d`, in the worktree `r28-integration`.
+
+| Commit | What |
+| --- | --- |
+| `cc1eca66` | the test kit: `draft/manifests/full` (on-screen, a narrated card, a teaser, `claim` verdicts, threads with a `thread` per clip) and `flips` (one THEN/NOW pair over clips of different dates), hand-written and kept lint-clean by `umtool/report-to-video/fixtures-r28.test.mjs`; `draft/reports/ruled.report.json`, a synthetic fact-check carrying every verdict |
+| (this commit) | this plan |
+
+Gates: common tsc clean; `testing/fakes.test.ts` 10/10; `fixtures-r28.test.mjs` 3/3.
+
+## Not in this release
+
+Comment and thread generation for social posts (X/Bluesky promotion); auto-publishing to YouTube (r28 writes the text
+only).