Archilyzer · Source

archilyzer

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

commit fc82ab3f113a71c99be9a56302ef4f90840fa51e
parent e7f6c4800d12ad5cdba4dfc5fbbbee704baf13ea
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 13 Oct 2026 22:49:56 -0400

plans: release 28 M4, M5 and M6, as shipped (lane E); FACTS: the left panel's rules, the drafts' code checks, out/youtube.txt; CHANGELOG

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

Diffstat:
Meditor/CHANGELOG.md | 2++
Mplans/FACTS.md | 30++++++++++++++++++++++++++++++
Mplans/release-28.md | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 144 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +- **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. - **A drafted field of a report video says it was drafted, and a final build refuses it until it is approved.** A field a generation task writes (a card's narration today; on-screen text, a teaser's lines, the cut's order, the flips, the threads and the YouTube text as their tasks land) carries `drafted` — who drafted it, on which model, when — in the manifest. umtool shows **drafted by <model>** and its review state beside the field (the On-screen table, the teaser editor, the narration page) with **Approve** and **Reject** (with a note), and `/browse/<project>/review` (**Review drafts — N** on the project page) lists every drafted field of the cut and what a final build would refuse. Verdicts are kept in `drafts.review.json` beside the manifest, each on the value it was given on, so a re-draft or an edit needs approving again. A **final** build refuses a drafted field not approved (`--drafts-unreviewed` builds the unapproved anyway, never a rejected one); preview and fast builds only warn. A narration written by hand keeps the rule it had, and existing `narration.review.json` verdicts read as they were (new ones are written to `drafts.review.json`). - **A draft never overwrites what you wrote.** A field with words in it and no `drafted` mark is yours: no generation task replaces it, even when asked to redraft. Its draft is kept aside in `<task>-draft.json` and shown under the field in umtool with **Use this**, which writes it as your own edit. Editing a drafted field in umtool makes it yours (its mark goes). - **A report video manifest may carry `publish.youtube { title, description }`** — two strings, a title of at most 100 characters — for the YouTube text a later task drafts. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -9265,3 +9265,33 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri `export/.export-builds/<id>/` and `export/.export-index/sites/<id>/`; nothing else on disk names a site by id (channel membership is site.json's own pool). The editor's Danger → Delete (`deleteSiteAction` → `deleteSite`) still removes `sites/<id>/` alone. + +## Release 28 lane E: flips, threads, the YouTube text (verified 2026-10-14, branch `r28/media-e`) + +- **The left panel's rules are common's** — `common/lib/report/panels.mjs` (+ `.d.mts`, exported as + `yt-dlp-transcript-common/lib/report/panels.mjs`): `FLIPS_LIMITS`, `flipsOn`, `validateFlips`, + `validateFlipEntries`, `THREADS_LIMITS`, `threadsOn`, `threadOf`, `validateThreads`, `validateThreadEntries`. + umtool's `report-to-video/flips.mjs` and `threads.mjs` re-export them unchanged; never copy them back. +- **A flips pair is code's but for its clips and topic.** The `flips` task (`tasks/flips.ts`) dates each clip + (`tasks/clipEvidence.ts` `clipFacts`): the entry's `date`, else the corpus record's `uploadDate` + (`get_video_metadata` through `deps.corpus`), else the report citation's `date`. The earlier is THEN; one day is + no pair; `when` is `Mon YYYY`; `words` is the clip's quote (or the model's part of it, when the quote says exactly + that), cut at a word to `FLIPS_LIMITS.words` with `…`; the pair id is the topic slugged. A THEN that plays after its + NOW swaps the two clips' places only when `ownerOf(timeline)` is `"drafted"` and the flips will be applied (the + timeline is rewritten through `applyDraft` with the flips provenance), else the pair is refused. +- **A thread's outcome is its last clip's `claim.verdict` in the manifest** (by timeline order), when it has one; the + `threads` task (`tasks/threads.ts`) makes 2 to 4 threads (`THREADS_TASK_COUNT`) and, once the list is applied, sets + every clip's `thread` (a clip in none has the key removed). +- **One left panel:** `flips` refuses a cut with threads and `threads` one with flips, unless `force` and the other is + a draft: then the other's field, its clips' `thread` keys (for threads) and its mark are removed, and the log says + so. Both refuse a cut with no `render.chrome`. +- **`publish.youtube` is drafted by `youtube`** (`tasks/youtube.ts`): title ≤ 100, one summary paragraph ≤ + `YOUTUBE_SUMMARY_MAX` (900), `checkLine(…, {quotes: true})` grounding (words in quotation marks must be a cited + quote's, word for word), no links, timestamps or hashtags. **`checkLine` does not check a line's FIRST word as a + name** (it is the narration grounding, which skips each sentence's first word), so a topic, label or title that + starts with an unknown name passes that check. +- **`out/youtube.txt`** (`youtube-<variant>.txt` for a variant other than `sourced`) is written by build-video after + every chapter mux (the full build, the deck build, `--rail-only`, `--chapters-only`; also under `--no-chapters`, + without chapters) when the manifest has a `publish.youtube` title. `muxChapters` returns `{chapters: [{start, end, + title}], total}`. The composition is `report-to-video/youtube.mjs` (`composeYoutubeText`, `youtubeChapters`, + `youtubeSources`, `momentLinkOf`, `youtubePreview`, `youtubeTextName`), exported as `umtool-report-to-video/youtube`. diff --git a/plans/release-28.md b/plans/release-28.md @@ -514,6 +514,118 @@ ruled CORROBORATED 78, PARTLY 58, NOT_FOUND 6, CONTRADICTED 4, UNTESTABLE 1; est (`/api/ops/bench-verdicts`); the editor at `ebf9e60d`, 123 s (`/api/ops/bench-verdicts`, `/api/ops/delete-site`). - e2e: umtool `verdict-bench.spec.ts` 2/2, 14.2 s; editor `backfill.spec.ts` 22/22 five times (above). +### M4, as shipped (2026-10-14, lane E, `r28/media-e`) + +The flips draft (`flips`): THEN/NOW pairs over the cut's clips, `render.chrome.flips`. A step on a done iteration on +M0's scaffold, one unit (the whole field), replacing step 0's "not implemented" refusal. +- **The model** proposes pairs: a topic, two clip ids, and optionally a part of each clip's quote. Rules, no example. +- **Code** does the rest. It dates each clip: the entry's `date` (the operator's, what the header shows), else the + corpus record's `uploadDate` (`get_video_metadata`), else the citation's `date`. The earlier is THEN, whichever + way the model named them, and a pair of one day is refused. Each `when` is written from the date (`Jan 2026`). + A side's `words` is the clip's quote verbatim, or the model's part of it only when the quote says exactly that, + cut at a word to 110 with `…`. The pair id is the topic slugged. Code refuses unknown ids, a clip in two pairs, and + more pairs than `min(24, dated clips / 2)`. The topic is one line of at most 32 characters, grounded by + `checkLine`. +- **Order:** a THEN that plays after its NOW is refused, unless `ownerOf(timeline)` is `"drafted"` and the flips + will be applied. In that case the two clips swap places, and the timeline is written through `applyDraft` with the + flips provenance. A twin id refuses the swap. +- **The build's validators:** `validateFlips` and `validateFlipEntries` run on the cut as it will be, swaps + included. To make that possible they moved to common, as `common/lib/report/panels.mjs` (see M5). The repair keeps + the attempt's pairs that pass when one fails. +- **One left panel (the simplest correct rule):** a cut with threads is refused, unless `force` and the threads are + a draft. In that case the flips replace them: the list, every clip's `thread` and the mark are removed, and the log + says so. Operator's threads are refused even with `force`. A cut with no `render.chrome` is refused. +- Test kit: `draft/runs/flips.json`. Run over the full manifest with its threads taken off: the first answer is + refused (a pair of one day, a number the report lacks) and re-asked. The kept answer reproduces S0's flips manifest + pair, id aside. + +### M5, as shipped (2026-10-14, lane E, `r28/media-e`) + +The threads draft (`threads`): `render.chrome.threads.list` and each clip's `thread`. +- **The model** names the threads (`{id, label}`) and gives each clip a thread or `""`. +- **Code** checks the result: + - 2 to 4 threads (`THREADS_TASK_COUNT`); + - ids are slugged when invalid, and none is listed twice; + - labels are one line of at most 32 characters, grounded; + - every assignment names a clip of the cut and a listed thread, and no clip is in two threads; + - every thread has a clip; + - `validateThreads` and `validateThreadEntries` pass on the cut as it will be. +- **The outcome is code's:** the `claim.verdict` that the thread's last clip (in timeline order) carries in the + manifest, when it has one. The model never writes a verdict. +- **Applied:** `applyDraft(render.chrome.threads, {list})`, then every clip's `thread` is set, and removed from a + clip in no thread. The repair drops failing threads with their clips when two still stand. +- **Mirror of M4:** a cut with flips is refused unless `force` and the flips are a draft, which the threads then + replace. +- **`common/lib/report/panels.mjs`** is now the one copy of the flips' and the threads' limits and validators. + umtool's `flips.mjs` and `threads.mjs` re-export them unchanged (their tests, deck, lint and fixtures-r28 pass + unchanged). +- Test kit: `draft/runs/threads.json`. The first answer is refused (a label naming someone the report does not, a + thread with no clip). The kept answer: bakery CONTRADICTED (c07), contest NOT_FOUND (c06). + +### M6, as shipped (2026-10-14, lane E, `r28/media-e`) + +The YouTube draft (`youtube`), `out/youtube.txt`, and umtool's panel. +- **The task** writes `publish.youtube {title, description}`: a title of one line, at most 100 characters, and one + summary paragraph of at most 900 (`YOUTUBE_SUMMARY_MAX`, room under `validatePublish`'s 5000). Both are grounded + by `checkLine(…, {quotes: true})`: + - names and numbers come from the report and the cut's title and subtitle; + - no stock phrase; + - third person (Q1's `firstPersonProblems`); + - words in quotation marks only when a cited quote says them word for word; + - no links, timestamps or hashtags. + The repair drops a failing sentence of the summary when the title is clean and something is left. +- **`out/youtube.txt`** is composed by code (`umtool/report-to-video/youtube.mjs`, pure; exported + `umtool-report-to-video/youtube`): + - the title, a blank line, the summary; + - `Chapters` from the build's own chapter list: `muxChapters` now returns `{chapters, total}`, the list it muxed; + - `Sources`: a moment link per cited clip, in cut order, each once — `citeUrl`, else the archive's page at + `cite`. +- **Chapters follow YouTube's rules** (ruled here): the first at 0:00, at least three, each at least ten seconds. A + shorter one is folded into the one before it. A list that still falls short, or does not start at 0:00, is left + out, and the build's `youtube` event names why. +- **When it is written:** after every chapter mux (the full build, the deck build, `--rail-only`, + `--chapters-only`), and under `--no-chapters` without the block, whenever the manifest has a `publish.youtube` + title. The file is `youtube-<variant>.txt` for a variant other than `sourced`, as the mp4 is named. +- **umtool:** `YoutubeSection` on the project page shows `out/youtube.txt` (its age; a note when `publish.youtube` + changed since), else the same text composed without chapters (`youtubePreview`), with **Copy** and "drafted by + <model>". Nothing when neither exists. M9 does "Draft with". +- Test kit: `draft/runs/youtube.json`. The first answer is refused (speaks as the speaker, a link). The editor's + `_reportDraft.test.ts` runs a youtube step through the job (step 0's "not implemented" case is now this). + +| Commit | What | +| --- | --- | +| `e4dff898` | `common/lib/report/panels.mjs` (+ `.d.mts`, package export), flips.mjs and threads.mjs re-export it; `report-to-video/youtube.mjs` + `youtube.test.mjs` (6); `muxChapters` returns its list; `writeYoutubeText` after every chapter mux; the `youtube` event | +| `2d97a52c` | `tasks/clipEvidence.ts` (`clipFacts`, `isoDay`, `whenOf`, `checkLine`), `tasks/flips.ts`, `tasks/threads.ts`, `tasks/youtube.ts`, the dispatcher; `panelTasks.test.ts` (10); runs `flips` / `threads` / `youtube`; the MCP's end-to-end tests (3); the editor's report-draft youtube step; the kit README | +| `f4884f7f` | umtool `YoutubeSection` on the project page; e2e `media-draft-e.spec.ts`, `fixtures/youtube-fixture.mjs` | +| `45355fb8` | report-to-video README: the drafted panels, `publish.youtube` and `out/youtube.txt` | +| (this commit) | these records, FACTS "Release 28 lane E", CHANGELOG | + +Lane E's gates (from the worktree root, at `45355fb8`; counts at the branch's start `381156ae` → its tip): +- tsc clean (all packages) before every commit. +- common 4059 → 4069 (+10, `panelTasks.test.ts`); 4068 passed, 1 failed: `fetchPosts.test.ts` "a drain mid-page + waits for the page's cursor…", the phase-1 flake candidate, 8/8 alone. +- mcp 346 → 349/349 (+3); editor 295/295 (one test rewritten, none added); `test:scripts` 874 + 3 skipped → + 880 + 3 skipped (+6, `youtube.test.mjs`). +- `docs env|files|cli --check`, `settings example --check`: clean (nothing regenerated). +- umtool e2e, single specs in the foreground: + - `media-draft-e.spec.ts` 1/1 (5.0 s; a real offline fast build: three chapters, two folded, and the sources); + - `draft-review.spec.ts` + `report-narration.spec.ts` 6/6; + - `projects.spec.ts` + `build.spec.ts` 29/29. + - Each run's prebuild was umtool's capped `next build`, 29 s. +- umtool capped build, corpus linked, through the heavy slot (5 GB): ok, 29 s with 8.5 GB available; the link removed. + +Found and left: +- `checkLine` does not check a line's FIRST word as a name. It is the narration grounding, which skips each + sentence's first word, so a topic, label or title starting with an unknown name passes that check. The tests use a + name mid-line. +- "Use this" on a threads alternative writes the list alone (M0's `writeDraftedField`), not the clips' `thread` + keys the draft assigned. A threads alternative arises only when the operator's threads are forced over, and its + Use this may then leave clips naming the operator's old ids, which the build refuses. +- The media tasks report no progress in this branch. Lane D's scaffold change (`h.progress` per unit, + `progressMetric`) covers these three once merged; they set no `progressMetric` (default `entries`). +- 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. + ## Not in this release Comment and thread generation for social posts (X/Bluesky promotion); auto-publishing to YouTube (r28 writes the text