Archilyzer · Source

archilyzer

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

commit 2e258d4c8c68cda43000a7f62b886360be05a636
parent ed3cf3495b9a199bbe64a27be0734c9a6ae9dddc
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 13 Oct 2026 23:09:35 -0400

plans: release 28 lane D — the media wiring, M1 cut, M2 on-screen, M3 teaser as shipped; FACTS: the media steps' contracts; CHANGELOG

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

Diffstat:
Meditor/CHANGELOG.md | 3+++
Mplans/FACTS.md | 29+++++++++++++++++++++++++++--
Mplans/release-28.md | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 170 insertions(+), 2 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +- **The editor drafts a report video's cut, on-screen text and teaser.** `pnpm ops report-draft --json '{"task": "cut" | "onscreen" | "teaser", "article", "iteration", "model"?, "entries"?, "force"?}'` runs on a done iteration's video project, as a step on it, like narration. **Cut** picks which of the report's citations the video shows and in what order, grouped under the report's sections; the code builds the timeline from the entries the cut already had (windows, quotes and on-screen text untouched), keeps a chapter card only while its section has a clip, keeps the title card and the teaser where they are, never drops a clip a post or a flip needs, and refuses an order the build would refuse. At most `settings.generation.cut.maxClips` entries (new, default 20), at least 3. **On-screen** writes each clip's title (at most 60 characters, no quotation marks) and subtitle (at most 90; it may quote only the clip's own words, exactly), several clips to a request. **Teaser** writes 3 to 5 lines that fit the teaser card, quoting nobody; a cut with no teaser gets one after its last clip. Every name and number must be in the report. Each drafted field carries its `drafted` mark and goes through the drafts review; a field you wrote or edited is never replaced (with `force` its draft is kept aside as an alternative). Each media draft has its own route in the generation policy (narration's, in every preset), and its job shows the entries done. Needs a restart of the editor and umtool. +- **A starter cut's order is marked as the converter's.** `archilyzer reports to-manifest` marks the timeline it writes as drafted by code (`drafted.timeline`, model `code`), so the cut task may redraft it without `force`; a cut converted before this release counts the same while its clips are still in the converter's order. A code-made order needs no review and shows no badge. Reordering it in umtool makes it yours. +- **New settings key `generation.cut.maxClips`** (SETTINGS.md): the most entries a drafted cut keeps (default 20). - **A research run on `auto` continues into its sweep by itself.** Once its acquisitions settle — every job it started has ended and nothing waits for your yes or no — the editor runs the same sweep **Continue into a sweep** would, on the run's own model, and the run's queue in umtool says **continued automatically by i<n>**. The caps hold: the sweep's per-job cap applies, and past the day's API total it is not started; the queue says so, and it is tried again the next day (UTC). A channel the run acquired into that is in no site build yet is left out of the sweep, with the warning "not in any build yet: <slug> — rebuild the site and continue again" on the queue and on the sweep; a run with nothing it could sweep waits for a newer build. `propose` and `limits` runs are still continued by you, and an editor booted idle (`ARCHILYZER_IDLE_BOOT`) continues nothing. Needs a restart of the editor and umtool. - **The editor drafts a report video's flips, threads and YouTube text.** `pnpm ops report-draft --json '{"task": "flips" | "threads" | "youtube", "article", "iteration", "model"?, "force"?}'` runs on a done iteration's video project. **Flips** pairs a clip with a later one on the same topic: the model picks the clips and names the topic, and the dates (the recordings'), the THEN/NOW order, the `when` lines and the words (the clip's own quote, word for word) are set by code. **Threads** groups the clips into 2 to 4 labelled threads; a thread's verdict stamp is its last clip's ruling, never the model's. **YouTube** writes `publish.youtube`'s title and a one-paragraph summary, with every name and number from the report, in the third person, quoting only what a clip says. Flips and threads share the left panel, so each refuses a cut that has the other unless forced over a draft of it, which it then replaces. Each drafted field carries its `drafted` mark and goes through the drafts review. - **A build writes the YouTube text: `out/youtube.txt`.** When the manifest has `publish.youtube`, the build writes the title, the summary, the chapters from its own chapter list, and a moment link for each cited clip, in cut order, each once. The chapters follow YouTube's rules: they start at 0:00, there are at least three, and each lasts ten seconds or more. A shorter one is folded into the one before it; when the list still falls short it is left out, and the build says why. umtool's project page shows the text with **Copy**. Before a build, it shows the same text without the chapters. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -9202,8 +9202,8 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri operator. `applyDraft(manifest, { entry?, field, value, provenance, force? })` is the one writer every task uses: `{ applied: true }` or `{ applied: false, reason: "operator" | "drafted" | "missing" }`. The operator's field is never replaced, `force` or not; `force` only re-drafts a field still marked. An entry id names every - entry with it (variant twins). A timeline with no `drafted.timeline` is the operator's — M1 decides what the - converter's order counts as. + entry with it (variant twins). A timeline with no `drafted.timeline` is the operator's to `ownerOf` — but the cut + task counts the converter's order as code's (M1, below). - **An edit clears the mark.** umtool's manifest writer (`lib/report/manifest.mjs` `writeManifestAtomic`) re-reads the file and runs `clearEditedDrafts(before, after)` on EVERY write: a marked field whose `fieldSignature` changed loses its mark; orphans go. A mark the write itself added is kept. `writeDraftedField` @@ -9232,6 +9232,31 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri reason }] }`; alternatives from earlier runs are carried over, newest five per field. The step is recorded in the iteration's `steps` (a done iteration's status is left). umtool reads alternatives from every `*-draft.json` beside the manifest (`lib/report/drafts.mjs` `readAlternatives`). +- **The media steps (release 28, lane D).** `MEDIA_STEP_TASKS` / `isStepTask` (`generationSettings.ts`) is the one list + of tasks that run as a step on a done iteration (`narrate, cut, onscreen, teaser, flips, threads, youtube`); each has a + route (narrate's in every preset) and a narration's cap; a `report-draft` step body is `{task, article, iteration, + model?, entries?, force?}`. The scaffold reports progress per ask (`progressMetric`, default `entries`; narrate + `cards`), may batch units (`spec.batch`) and may say who owns a unit's field for the skip (`spec.owner`); the + writer is always `applyDraft`. A task reaches the build's validators through `TaskDeps.deckChecks` + (`tasks/deckChecks.ts`: umtool's `deck.mjs` `validateTeaser` and `lint.mjs` `validatorErrors`, imported natively + from the checkout; the editor job passes `loadDeckChecks(paths.monorepoRoot)`). +- **cut** (`tasks/cut.ts`): one unit, `drafted.timeline`. The model answers citation ids grouped under section + headings; code checks them (candidates only, once each, 3 to `generation.cut.maxClips` (20), pinned clips kept — + posts' `attachTo`, flips' entries — headings the cut's, no new `validatorErrors`) and BUILDS the timeline + (`buildCut`) from the entries it had. **A timeline marked `model: "code"` is nobody's**: `reportToManifest` marks + its own `{task: "convert", model: "code"}`, an unmarked timeline in the converter's clip order counts as code's + (`isConverterOrder`), the cut drafts over either without `force`; `isCodeDraft` marks need no review (no review + row, no final-gate error). +- **onscreen** (`tasks/onscreen.ts`): one unit per clip, asked in batches (≤ 8, within the local cap); title ≤ 60 + with no quotation marks, subtitle ≤ 90 quoting only the clip's own quote word for word, one line each, names and + numbers in the clip's evidence (`groundedProblems`), third person outside quotes. +- **teaser** (`tasks/teaser.ts`): one unit per teaser entry; none → a `{type: "teaser", id: "teaser"}` after the last + clip, through `applyDraft`. 3 to 5 lines ≤ 70, no quotation marks, no 5-word run of a quote, grounded, and + `validateTeaser` passes — without `deckChecks` nothing is written. +- **`groundedProblems(text, reference, where)`** (`grounding.ts`) is the names-and-numbers check narration, on-screen + and teaser share (a sentence's first word is not checked as a name). +- **umtool's e2e stub runs cut, onscreen and teaser for real** (`common/testing/draft/runMediaStep.ts`, a tsx child + over the fixture iteration's project, the fake ollama on `runs/<task>.json`); the task records its own step. ## Release 28 lane B: quality and progress (verified 2026-10-13, branch `r28/quality` @ `48dbc5de`) - **The narrator is third person** (`grounding.ts`): a first-person word outside double quotes is a HARD grounding problem whose text starts `the narrator is third person`. A media task that calls `checkNarration` refuses it with no change of its own. `GroundingInput.sources` (each quote's speaker and `c03 (label @ m:ss)`) names the line it restates; `groundingInputOf` fills it. diff --git a/plans/release-28.md b/plans/release-28.md @@ -690,6 +690,146 @@ Found and left: - umtool's editor stub answers a media step only for `narrate` (any other task makes a new iteration in the stub). That is M9's to extend with its buttons. +### Media wiring, as shipped (2026-10-13, lane D, `r28/media-d`) + +Step 0: the six new media tasks are steps, as narrate was, through one list. Committed first and alone (`ea4e9072`); +lane E branched from it. +- `MEDIA_STEP_TASKS` (`narrate, cut, onscreen, teaser, flips, threads, youtube`) and `isStepTask` in + `generationSettings.ts` are the one list. `GENERATION_TASKS` and `TASK_NAMES` contain them. Every `=== "narrate"` + step check asks `isStepTask`: the controller's body, enqueue, job and usage row; the MCP's step lookup and wording; + the ops row; the route's doc. +- **Routes:** each new task takes narrate's route in every preset (`balanced`: local). +- **A settings file from before:** one that routes release 27's first four tasks keeps its preset. A task it does not + name takes that preset's route; S11's research rule is generalised. A partial patch names no preset. +- **The body** of a media draft is `{task, article, iteration, model?, entries?, force?}` (narrate's `cards` kept). It + is refused as narrate's is: no iteration, a `copyOf`, `entries` on a non-step task. Its cap is a narration's. +- The tasks not yet built refused at the job as a failed step, "not implemented in this build". All six are built + now, and the refusal is gone at the merge. +- umtool's generate forwards `entries`. +- SETTINGS.md, settings.json.example and COMMANDS.md regenerated. + +### M1, as shipped (2026-10-13, lane D, `r28/media-d`) + +The cut task (`cut`): which of the report's citations the video keeps, and in what order. It is one unit, the +timeline's ORDER (`drafted.timeline`). +- **Candidates** (`cutCandidates`): each clip or still whose id is a report citation (the converter's rule), else the + video citation of its recording and second. The model sees them by the chapter they sit in, with: + - each claim's text and verdict; + - the source and date; + - the quote, shortened step by step until the local prompt fits (`fitLocalAsk`). +- **The answer** is citation ids grouped under the section headings. +- **Code refuses:** + - an id not a candidate; + - an id twice; + - more than `settings.generation.cut.maxClips` (new; default 20; a whole number from 3) or fewer than 3; + - a dropped clip a post rides on or a flip names (`pinnedEntries`); + - a heading not the cut's, or one heading two groups; + - any error the build's own validators (`lint.mjs` `validatorErrors`) give the built cut that the cut as read did + not have (compared with timeline positions taken out). A thread left with no clip is caught this way. +- **Code builds the timeline** (`buildCut`), never inventing an entry: + - the chosen entries, untouched, with variant twins together; + - a chapter card where its group keeps an entry; a card with nothing left is dropped (S7's rule); + - everything before the first chapter or citation entry first, and everything after the last one last (the + teaser); + - an entry no citation names stays with its chapter, after its card. +- **The build's validators** reach a common task through `TaskDeps.deckChecks` (`tasks/deckChecks.ts`): umtool's + `deck.mjs` and `lint.mjs`, loaded natively from the checkout (`import(/* turbopackIgnore: true */ …)`). The editor + job passes `loadDeckChecks(paths.monorepoRoot)`. The editor's e2e proves it in the built server. +- **The ruling on lane A's question, as built:** + - `reportToManifest` marks its timeline `drafted.timeline {task: "convert", model: "code", at, attempt: 1}`, `at` + the day it was made (`today`). The kit's derived manifests were regenerated. + - An unmarked timeline whose clip order is exactly the converter's from the project's report is code's too + (`isConverterOrder`). + - A code-made order is drafted over without `force`. The cut's `apply` gives an unmarked one the converter's mark + first, then writes through `applyDraft`. One marked by a model needs `force`. Any other is the operator's: its + draft is kept as an alternative. + - `isCodeDraft` (drafted.mjs): `draftsReviewRows` leaves a code mark out, so there is no row, no badge and no + final-gate error. umtool's "Review drafts — N" count leaves it out too. These are lane A's files; the change is + additive, a filter and an import each. + - An operator's reorder in umtool clears the mark as any edit does. +- **The scaffold** (`media.ts`, additive): + - `spec.owner`, who owns a unit's field for the skip. The writer is still `applyDraft`. + - `spec.batch` (M2). + - Progress: `h.progress({metric: spec.progressMetric ?? "entries", current, total})` at 0 and after each ask. + Narrate's metric is `cards`. Lane E's three get `entries` for free. + +### M2, as shipped (2026-10-13, lane D, `r28/media-d`) + +The on-screen task (`onscreen`): each clip's `onscreen.{title, subtitle}`. One unit per clip entry (or the `entries` +asked for). +- **Evidence:** the report's title, the clip's section, its claim (text, verdict), its quote and source. +- **Batches:** several clips per ask (`spec.batch`) — as many as fit the local prompt cap measured by + `structuredPromptEstimate`, at most `ONSCREEN_BATCH_MAX` (8). The re-ask carries only the clips refused, with each + one's reasons. +- **Code refuses:** + - a title over 60 characters or a subtitle over 90; + - more than one line; + - a title with any quotation marks (an apostrophe is not one); + - a subtitle quoting anything but the clip's own quote, word for word (`strictNormalize`, whole words), or with + marks that do not pair up; + - a name or number the clip's evidence lacks; + - the first person outside a quotation (Q1's `firstPersonProblems`). +- **`grounding.ts` `groundedProblems(text, reference, where)`:** the names and numbers check `checkNarration` ran + inline, now one function that both use. The wording is unchanged for narration. + +### M3, as shipped (2026-10-13, lane D, `r28/media-d`) + +The teaser task (`teaser`): a teaser's `lines`. One unit per teaser entry. +- **A cut with no teaser** gets one: `{type: "teaser", id: "teaser"}` (else `teaser-2`, …) after its last clip, its + lines written through `applyDraft` as an empty field. Nothing is added when the draft is refused. +- **Evidence:** the report's title and subtitle, section titles, claim gists (`claimGist`: the quoted words taken + out), and the months its sources and clips are dated. +- **Code refuses:** + - fewer than 3 or more than 5 lines; + - a line over 70 characters, or on two lines; + - quotation marks; + - a run of 5 words from any quote; + - a name or number the evidence lacks; + - anything `deck.mjs` `validateTeaser` refuses (the row each role fits: overline, title, kicker). Without that + check (no `deckChecks`), nothing is written. +- **The prompt** states each role's fit as a rule; the check is the build's. + +| Commit | What | +| --- | --- | +| `ea4e9072` | step 0: `MEDIA_STEP_TASKS`, `isStepTask`, routes in every preset, the old-file preset rule, the step body with `entries`, the not-implemented refusal; the MCP, the ops row, the route doc; SETTINGS.md, COMMANDS.md | +| `54400684` | the scaffold: `spec.batch`, `spec.owner`, progress; `tasks/deckChecks.ts` and `TaskDeps.deckChecks`; a batch test | +| `fbf1e11d` | M1: `tasks/cut.ts` (+ 5 tests), `generation.cut.maxClips`, the converter's code mark, `isCodeDraft` and the review's exemption, `runs/cut.json`, the kit regenerated | +| `1a47547c` | M2: `tasks/onscreen.ts` (+ 3 tests), `groundedProblems`, `runs/onscreen.json` | +| `2cd6e68d` | M3: `tasks/teaser.ts` (+ 3 tests), `runs/teaser.json` | +| `c11db375` | umtool e2e `media-draft.spec.ts`: the stub runs a media step for real (`testing/draft/runMediaStep.ts`, a tsx child, the fake ollama on the kit's run); fixture `mdraft` | +| `6ff39f31` | merge of `r28/integration` (lanes C, E, F): cut beside verdicts in the settings, the dispatcher with all six | +| `4d0dee5c` | editor e2e: a teaser through the real editor job on the fake API; the runner's paths opt out of tracing | +| (this commit) | these records, FACTS, CHANGELOG | + +Lane D's gates (from the worktree root): +- **tsc** (all packages): clean before every commit. +- **Unit suites**, counted at the branch's start (`7e14a060`), after the merge, and at the tip: + - common: 4042 at the start (3 failing: two settings-doc tests read mid-edit, and the `fetchPosts` drain flake); 4050/4050 at M1; 4089/4089 after the merge; 4089/4089 at the tip. + - editor: 290 → 292 at step 0 → 295 after the merge; 295/295 at the tip. + - mcp: 346 → 349 after the merge; 349/349 at the tip. + - `test:scripts`: 874 (870 pass, 3 skipped, 1 `queue-lock` timing flake) at the start → 875 at M1 (+1, the code-mark review test) → 884 after the merge; 884 at the tip (881 pass, 2 skipped, 1 `queue-lock.test.mjs` timing failure under the full run's load, 37/37 alone). +- **Docs:** `docs env|files|cli --check` and `settings example --check` clean. +- **umtool e2e**, single specs in the foreground: + - `media-draft.spec.ts` 3/3 (14.6 s; the first run failed 3/3 waiting on a tab that does not poll a job it did not + start, so the spec now polls the iterations API, then opens the tab); + - `article-iterations.spec.ts` + `draft-review.spec.ts` 7/7 (40.3 s). + - The first run's prebuild was umtool's capped build. +- **Editor e2e** `report-draft.spec.ts` alone: 4/4 (17.9 s). Its prebuild was the editor's capped `next build`: + compiled in 21.8 s, 52 s in all, heavy slot, 5 GB. +- **umtool capped build**, corpus linked, through the heavy slot (5 GB): compiled in 9.1 s; the link removed. + +Found and left: +- **Lane E's flips swap** a THEN after its NOW when `ownerOf(timeline)` is `"drafted"`. With the converter's mark, a + converter-made cut is `"drafted"`, so flips may reorder it. This is consistent with the ruling: a code-made order is + nobody's. +- **A revise-video iteration copies its parent's manifest, mark included.** An order it changed through its ops + stays marked as code's or the cut's, and the cut task may redraft it. Its ops are a model's work from the operator's + feedback; whether that order is the operator's is a ruling for M9. +- **Folding lane E's tasks into `media-draft.spec.ts` was not cheap.** flips needs the corpus's records for its + dates, and the stub's runner has no corpus tools (common cannot import the MCP's). Both specs stay. +- **The Iterations tab does not follow a step it did not start.** A media draft asked through the API shows on reload. + M9's buttons start their own. + ## Not in this release Comment and thread generation for social posts (X/Bluesky promotion); auto-publishing to YouTube (r28 writes the text