commit ec9310d049530f41eaec3ebf33e198808ec030d1
parent e2531a7fc35a0bbeb3eb4300db9d1ac93cccaa7e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 13 Oct 2026 21:35:15 -0400
umtool, common: the drafts review documented; the scaffold exported from the tasks index
The report-to-video README's narration review section is now the drafts
review's (the marks, no overwrite, the review file, the gate, and the
narration page as its narration view); umtool's report-video doc and the
narration route say where verdicts live now. tasks/index.ts exports the media
task scaffold and NARRATE_SPEC for phase 2's tasks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
5 files changed, 109 insertions(+), 29 deletions(-)
diff --git a/common/lib/report/draft/tasks/index.ts b/common/lib/report/draft/tasks/index.ts
@@ -15,7 +15,28 @@ export { sweepAgent, SWEEP_READ_TOOLS, type SweepAgentInput } from "./sweep-agen
export { sweepPipeline, type SweepPipelineInput } from "./sweep-pipeline";
export { reviseReport, type ReviseReportInput } from "./revise-report";
export { reviseVideo, type ReviseVideoInput } from "./revise-video";
-export { narrate, type NarrateInput } from "./narrate";
+export { narrate, NARRATE_SPEC, type NarrateInput } from "./narrate";
+// The media task scaffold (release 28, M0): what every media task is.
+export {
+ ALTERNATIVES_PER_FIELD,
+ defaultScore,
+ draftFileName,
+ isSkip,
+ loadMediaContext,
+ mergeAlternatives,
+ rankAttempts,
+ readDraftFile,
+ runMediaTask,
+ type DraftAlternative,
+ type DraftFile,
+ type MediaAttempt,
+ type MediaContext,
+ type MediaReport,
+ type MediaSkip,
+ type MediaTaskInput,
+ type MediaTaskSpec,
+ type MediaUnit,
+} from "./media";
export { research, RESEARCH_READ_TOOLS, type ResearchInput } from "./research";
export { pickCorpusBuild, listCorpusBuilds, siteOriginOf, NoCorpusBuildError, type CorpusBuild } from "./corpusSource";
export { momentHref, rewriteLinks, rewriteMomentBases, slugResolver } from "./links";
diff --git a/umtool/app/api/report/narration/route.ts b/umtool/app/api/report/narration/route.ts
@@ -21,9 +21,11 @@ export const dynamic = "force-dynamic";
// writer (snapshot, validators, the edit-notes
// guard); an edit clears the verdict
//
-// Verdicts live in <project>/narration.review.json (report-to-video's
-// narration-review.mjs, takes/verdicts.json's shape); the build refuses an
-// un-approved narrated card once that file exists.
+// Verdicts live in <project>/drafts.review.json as `narrate/<cardId>/narration`
+// (report-to-video's narration-review.mjs over drafts-review.mjs; release 25's
+// narration.review.json is still read); the build refuses an un-approved
+// narrated card once the cut's narration has a verdict, and a final build a
+// drafted one.
type Body = Record<string, unknown>;
const noStore = { "cache-control": "no-store" };
diff --git a/umtool/components/projects/NarrationPage.tsx b/umtool/components/projects/NarrationPage.tsx
@@ -9,8 +9,9 @@ import NarrationReview, { type NarrationView } from "./NarrationReview";
// `/browse/<project>/narration` -- the cut's narration script, card by card,
// before synthesis (release 25, T5): each narrated card's words beside what
// the card shows, approved, edited or rejected, and played through the editor.
-// Verdicts are <project>/narration.review.json; the build refuses an
-// un-approved card once that file exists.
+// Verdicts are <project>/drafts.review.json (release 25's
+// narration.review.json still read); the build refuses an un-approved card
+// once the cut's narration has a verdict, and a final build a drafted one.
export default async function NarrationPage({ project }: { project: ProjectRef }) {
const manifest = await readManifest(project.dir);
const view = (await narrationReviewView(project.dir, manifest ?? {})) as NarrationView;
diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md
@@ -811,14 +811,27 @@ rules and the validator.
**The narration review** — `/browse/<project>/narration`, linked from the
project page as **Narration — N** — is the script card by card before synthesis:
-the words beside what the card shows, Approve / Reject (a note required) / Save
-words / Play. Verdicts live in `narration.review.json` beside the manifest
-(the shape of `takes/verdicts.json`); `GET|POST /api/report/narration`,
+the words beside what the card shows, who drafted them, Approve / Reject (a note
+required) / Save words / Play. `GET|POST /api/report/narration`,
`POST /api/report/narration/play` (a job: `narrate-via-editor.mjs --only`),
-`GET /api/report/narration/audio`. Once the file exists, a build refuses any
-narrated card not approved on its current words (`--narration-unreviewed`
-builds unreviewed and edited ones; a rejected one never). The README's "The
-narration review" has the rules.
+`GET /api/report/narration/audio`. Once a narration verdict exists, a build
+refuses any hand-written narrated card not approved on its current words
+(`--narration-unreviewed` builds unreviewed and edited ones; a rejected one
+never).
+
+**The drafts review** (release 28) — `/browse/<project>/review`, linked as
+**Review drafts — N** when a draft task wrote a field — lists every drafted
+field (on-screen text, a narration, a teaser's lines, the cut's order, the
+flips, the threads, the YouTube text): who drafted it, its value, Approve /
+Reject (a note required), and the alternatives a task kept for a field that is
+the operator's, each with **Use this**. The same badge sits beside the field in
+the On-screen table, the teaser editor and on the narration page. Verdicts —
+the narration's included — live in `drafts.review.json` beside the manifest
+(release 25's `narration.review.json` is still read); `GET|POST
+/api/report/drafts`. A final build refuses a drafted field not approved on its
+current value (`--drafts-unreviewed` builds the unapproved; a rejected one
+never); a preview or fast build warns. An edit in umtool makes a drafted field
+the operator's: its mark goes. The README's "The drafts review" has the rules.
## Re-checking sources across projects
diff --git a/umtool/report-to-video/README.md b/umtool/report-to-video/README.md
@@ -1205,25 +1205,68 @@ so the vote lands last), the length of the sentences, one beat, and a short
punch to end each paragraph. No tag: nothing in it is a sound a person would
make; and nothing says the council *ignored* anyone — the minutes do not.
-#### The narration review
+#### The drafts review (and the narration review)
+
+A field a draft task wrote (release 28) says so: **`drafted`**, a provenance
+`{ task, model, at, iteration?, attempt }` (`at` ISO; `attempt` the one of two
+kept). An entry's field carries it on the entry, keyed by field —
+`"drafted": { "onscreen": {…}, "narration": {…}, "lines": {…} }` (any entry's
+on-screen text, a card's narration, a teaser's lines); a manifest field carries
+it in a top-level map keyed by path — `"drafted": { "timeline": {…},
+"render.chrome.flips": {…}, "render.chrome.threads": {…}, "publish.youtube": {…} }`
+(the cut's order; the flips; the threads, each clip's `thread` key included; the
+YouTube title and description, `publish.youtube { title, description }`, a new
+top-level key). The one copy of these rules is
+`common/lib/report/drafted.mjs`; the build and the lint refuse a mark anywhere
+else (`validateDrafted`) and warn of one whose field is gone.
+
+- **No overwrite.** A field with a value and no mark is the operator's: no
+ draft task replaces it, forced or not. Its draft is kept as an
+ **alternative** in `<task>-draft.json` beside the manifest
+ (`narration-draft.json` for narration), shown under the field in umtool with
+ **Use this**, which writes it as the operator's own edit.
+- **An edit makes it the operator's.** umtool's manifest writer removes a
+ field's mark whenever a write changes that field (`clearEditedDrafts`).
+- **The review.** `/browse/<project>/review` lists every drafted field of the
+ cut — who drafted it, its value, **Approve**, **Reject** (with a note) — and
+ every alternative; the same badge sits beside the field on the project page
+ (the On-screen table's title, the teaser editor) and on the narration page.
+ Verdicts are `<project>/drafts.review.json` (`drafts-review.mjs`):
+ `{ "<task>/<entry id | *>/<field>": { verdict: "approved" | "rejected" | null,
+ note, key, text, at } }`, the task being the field's own (`onscreen/c01/onscreen`,
+ `narrate/k01/narration`, `teaser/fin/lines`, `threads/*/render.chrome.threads`).
+ A verdict is on the value it was given on (`key`), so **an edit or a re-draft
+ leaves it "changed since approved"**.
+- **The gate.** A drafted field not approved on its current value is a
+ **warning** in a preview or fast build and an **error** in a final one
+ (`--final`, which the driver's `final` preset passes): `--drafts-unreviewed`
+ builds the unapproved anyway, never a rejected one. A rejected draft is a
+ warning in a fast build and refuses a final one.
`/browse/<project>/narration` in umtool reviews the script card by card before
synthesis: each narrated card's words beside what the card shows on screen, its
-engine and voice, **Approve**, **Reject** (with a note saying what is wrong),
-the words edited in place (**Save words**, through the manifest writer:
-snapshot, validators, the generated-manifest note), and **Play**, which asks the
-editor for that one card (`narrate-via-editor.mjs --only <id>`) and plays it.
-
-Verdicts are `<project>/narration.review.json` (`narration-review.mjs`; the
-shape of `takes/verdicts.json`): `{ "<cardId>": { verdict: "approved" |
-"rejected" | null, note, key, text, at } }`. A verdict is on the words and voice
-it was given on (`key` is the narration's key), so **an edit or a voice change
-leaves the card "edited" — not approved** — and the page's edit clears the
-verdict as well.
-
-- **No review file**: nothing is held — a cut narrated before reviews existed
- builds as it did — and the lint WARNS that the narration has no review.
-- **A review file**: every narrated card in the cut must be approved on its
+engine and voice, who drafted it, **Approve**, **Reject** (with a note saying
+what is wrong), the words edited in place (**Save words**, through the manifest
+writer: snapshot, validators, the generated-manifest note), and **Play**, which
+asks the editor for that one card (`narrate-via-editor.mjs --only <id>`) and
+plays it.
+
+Its verdicts are the drafts review's rows `narrate/<cardId>/narration`
+(`narration-review.mjs` is that view of it). Release 25's
+`<project>/narration.review.json` — `{ "<cardId>": { verdict, note, key, text,
+at } }` — is still READ, unchanged; the drafts file wins on a card both have,
+and every new verdict goes to the drafts file. A verdict is on the words and
+voice it was given on (`key` is the narration's key), so **an edit or a voice
+change leaves the card "edited" — not approved** — and the page's edit clears
+the verdict as well.
+
+A narration that carries a `drafted` mark follows the drafts gate above. One
+written by hand (or before release 28) keeps release 25's rule, in every build:
+
+- **No narration verdict anywhere**: nothing is held — a cut narrated before
+ reviews existed builds as it did — and the lint WARNS that the narration has
+ no review.
+- **Once there is one**: every narrated card in the cut must be approved on its
current words. An unreviewed or edited card refuses the build (a lint error)
unless `--narration-unreviewed`; a **rejected** card refuses it always —
rewrite it and approve it, or take the narration out.