Archilyzer · Source

archilyzer

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

commit c301a2956fd7bc969762b1749298ce3dbe441ff6
parent a8e5894ed85ec45bd8f1b4dd52d0f9d90b9d576a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 20 Oct 2026 18:44:09 -0400

plans: release 38 lane E — the record (as shipped)

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

Diffstat:
Aplans/release-38/video-assist.md | 168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 168 insertions(+), 0 deletions(-)

diff --git a/plans/release-38/video-assist.md b/plans/release-38/video-assist.md @@ -0,0 +1,168 @@ +# Release 38 lane E — `r38/video-assist`: the local video assistant (as shipped) + +The operator, 2026-10-20: "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." This lane makes a +request in words ("make the joins 0.15 s with less smear") a set of checked, proposed edits of a video project that +the operator applies with a click — on the local model by default. Rulings followed: every model step optional and +routed by `settings.generation` (local / api / code); every op the assistant can propose is also a field (the Look +panel's slide and room numbers are new); nothing is applied without the operator's Apply, and Apply writes through +the manifest's own writers, token-guarded; never free HTML, never a raw manifest write; synthetic fixtures only; no +real network or model call in any test. + +## What + +1. **The look's rules moved to common** (`common/lib/report/look.mjs`, + `.d.mts`): `LOOK_KEYS`, `applyLookPatch` + (the body of umtool's `updateRender`, now pure), `lookErrors`, `lookOf`, and the validators and bounds that lived in + report-to-video (`validateTransitionStyle`/`validateSlide`, `validateRoom`/`clipRoom`/`roomOn`, + `validateCaptions`/`validateLoudness`/`verticalErrors`/`validateVertical`/`validateLook`; `SLIDE_BOUNDS` and + `ROOM_BOUNDS` exported). `report-to-video/{look,room,transition}.mjs` re-export every moved name; `updateRender` + calls `applyLookPatch`. Moved, not copied — the editor's task checks a look op with the writer's own function. +2. **Declared composition params** (`common/lib/report/fxParams.mjs`): `COMPOSITION_PARAMS` for `deck`, `stats` and + each `fx.<effect>` — timings, sizes, positions, toggles, the odometer's label — each with the bounds its validator + holds it to; `DECK_PARAMS` / `STATS_PARAMS` / `FX_PARAMS` re-exported by `deck.mjs` / `stats.mjs` / `fx.mjs`; + `fx-params.test.mjs` holds every declaration to `validateChrome` at both bounds and just past them. +3. **The ops** (`common/lib/report/videoAssistOps.mjs`, extending nothing: its own module, `.mjs` so umtool's plain-node + libs and the editor's TS both import it): `look`, `slide`, `room`, `clip_edges`, `clip_room`, `fx`, each checked + against the manifest as the ops before it left it, each with a diff line and the writer that performs it + (`checkAssistOps`); the model's one shape `{op, id, key, value}` (`ASSIST_OPS_SCHEMA`, four required keys — a strict + API tool requires every key) normalised to the checker's; `assistView` — the compact view trimmed to a budget, the + clips the request names first; `secondsNamedIn` (the 3 s slack widens to what the request names). +4. **The proposals file** (`common/lib/report/videoAssistProposals.mjs`): `<project>/assist-proposals.json` + `{version, promptVersion, at, model, request, scope, note?, reply?, ops[{id, op, diff, warning?, status}], + refused[{op, why}], diff[]}` — written whole by the task, its statuses marked by umtool. +5. **Task `video-assist`** (`GENERATION_TASKS`; local in every preset but `api`, the `code` preset included; field + docs; MCP `GENERATE_TASKS` derived): `common/lib/report/draft/tasks/videoAssist.ts` (one schema-bound ask, local + fitted to the prompt cap by `fitLocalAsk`, the API the same ask; the code route's `answers` read as a model's; + the ops checked against the manifest as it is after the answer; proposals written; never applied) and + `common/controller/videoAssist.ts` (its own `report-draft` job: `draft:local` through the GPU arbiter — the log and + the box say it waits for a transcription — ollama unloaded after; `draft:api` with the narration and daily caps and + a ledger row; `note`: a whole-project note's text is the request, the proposals posted back to it as the agent's + reply with `proposal {kind: "assist", at, ops}`). `reportDraft.ts` parses `request` / `scope` (and shares + `project` / `note` / `answers` with clips-suggest); the ops route's `dryRun` answers `planVideoAssistJob`. +6. **MCP** (`mcp/src/generation.ts`): `generate` takes `task: "video-assist"` with `project` and `request` | `note`, + `scope`; routed to code it returns the editor's plan as this session's request and takes `answers` back; + `/gen` (`.claude/commands/gen.md`) says so. +7. **umtool**: `lib/report/videoAssist.mjs` (the request, the followed job, `proposalsView` — each waiting op + re-checked, "now: …" when the manifest no longer allows it — `applyAssistOps` and `dismissAssistOps`); + `/api/report/video-assist` (GET view / job; POST ask, `action: "apply"` (token, ids, `at`) under `withEditNotes`, + `action: "dismiss"`, cancel); `components/projects/report/AssistBox.tsx` — the Ask box (status line: the route, the + GPU wait, or why not), the diff list with **Apply** / **Apply all** / **Dismiss**, applied and refused marked, + **Preview join**, and **Notes on the project** with **Ask the assistant** and the reply's **Apply all**; in the + Look panel (scope all, with the preview and the notes) and the clip editor's side column (a request naming no clip + is sent as about the selected one). `ReplyProposal` gains `kind: "assist"` (`lib/annotations/shape.mjs`, + `types.ts`); the clip editor never applies one. +8. **The Look panel's owed fields**: the blur slide's **Travel**, **Smear**, **Grain** (shown for a blur slide), and + with the tail on **Tail up to, s** (`room.maxS`) and **Silence gap, s** (`room.minGap`) — written only off their + defaults. +9. **Preview join**: `build-video.mjs --join-preview [--join-from <clip>]` (`report-to-video/join-preview.mjs` + `joinPreviewTimeline`: four consecutive clips, the last 3 s of each cut — the last clip its first 3 s — cards out, + windows untouched) → `out/join-preview.mp4` + `out/join-preview.json`, its own work dir, no chapters / YouTube text + / thumbnail, in the heavy slot; umtool `lib/report/joinPreview.mjs` + `/api/report/join-preview` (a job on the + app's runner), played under the box, marked stale when the look changed. +10. **revise-video** gains `look` / `slide` / `room` (`videoOps.ts` through `checkAssistOps`, scope look; + `VIDEO_OPS_SCHEMA`; `localOpsBatch` takes the schema) — the article path keeps its iteration model. + +## Files + +common: `lib/report/look.mjs` + `.d.mts` (new), `lib/report/fxParams.mjs` + `.d.mts` (new), +`lib/report/videoAssistOps.mjs` + `.d.mts` (new), `lib/report/videoAssistProposals.mjs` + `.d.mts` (new), +`lib/report/videoAssistOps.test.ts` (new), `lib/report/draft/tasks/videoAssist.ts` + `.test.ts` (new), +`lib/report/draft/videoOps.ts`, `lib/report/draft/tasks/revise-video.ts`, `lib/report/draft/tasks/revise-report.ts` +(`localOpsBatch` schema), `controller/videoAssist.ts` (new), `controller/reportDraft.ts`, `lib/generationSettings.ts` ++ `.test.ts`, `testing/clips/assistProject.mjs` + `.d.mts` (new), `testing/README.md`, `package.json` (exports). +editor: `app/api/ops/report-draft/route.ts`, `app/api/ops/_videoAssist.test.ts` (new), `CHANGELOG.md`. mcp: +`src/generation.ts`, `src/generation.test.ts`. report-to-video: `look.mjs`, `room.mjs`, `transition.mjs` (re-exports), +`deck.mjs`, `stats.mjs`, `fx.mjs` (params slices), `join-preview.mjs` + `.test.mjs` (new), `fx-params.test.mjs` (new), +`build-video.mjs` (`--join-preview`), `package.json` (`./join-preview`). umtool: `lib/report/manifest.mjs` +(`updateRender` over `applyLookPatch`), `lib/report/videoAssist.mjs` + `.test.mjs` (new), `lib/report/joinPreview.mjs` +(new), `app/api/report/video-assist/route.ts` (new), `app/api/report/join-preview/route.ts` (new), +`components/projects/report/AssistBox.tsx` (new), `components/projects/report/LookPanel.tsx`, +`components/projects/review/ClipEditor.tsx`, `components/projects/review/ClipSuggest.tsx`, +`lib/annotations/shape.mjs`, `lib/annotations/types.ts`, `lib/create/policy.mjs`, `e2e/video-assist.spec.ts` (new), +`e2e/fixtures/video-assist-fixture.mjs` (new), `e2e/fixtures/make-fixture.mjs`, `e2e/fixtures/editor-stub.mjs`, +`docs/report-video.md`. Root: `.claude/commands/gen.md`, `OPERATING.md`, `SETTINGS.md`, `settings.json.example` (regenerated), +`plans/FACTS.md` ("Release 38 lane E"). + +## Commits + +| sha | what | +|---|---| +| `e4542507` | common: the look's rules move to common/lib/report/look.mjs; compositions declare their tunable params (+ fx-params.test.mjs) | +| `f9662056` | common: task video-assist — the ops, the proposals file, the task and its job, reportDraft, generation settings, the editor's dry run; the test kit's project and 29-request table; tests | +| `5e9936d3` | common: revise-video takes the look ops (look, slide, room) | +| `53fab519` | mcp: generate video-assist (project + request / note; the code route's request and answers); /gen | +| `30bdc4bb` | umtool: the Ask box, Apply / Apply all / Dismiss, Preview join (build-video --join-preview), the Look panel's slide and room fields, notes' assist proposal; e2e video-assist.spec.ts; docs | +| `276f002a` | plans: FACTS ("Release 38 lane E"); CHANGELOG | +| `d3e009c1` | common: videoOps' refusal names the look ops (an existing test's expectation) | +| `dd5f4237` | docs: the video-assist dry run in OPERATING's recipes; the ops syntax in umtool's docs | +| (this commit) | plans: this record | + +## Gates + +All through the session's lock (`r31-locked.sh`; the e2e through `r31-locked6.sh`), from the worktree root. The +machine sat under the lock's memory floor for most of the afternoon (available memory 0.7–3 GB while other lanes and a +transcription ran), so the runs were queued detached and waited on in short loops. + +- `pnpm -r --no-bail --workspace-concurrency=1 exec tsc --noEmit`: clean before the commits (one umtool error — + `dismissAssistOps`' untyped options — fixed first; umtool re-checked clean). +- common: 4764 (4762 pass, 2 skipped; measured at the branch's start) → **4784 / 4782 pass / 0 fail / 2 skipped** + (+20: videoAssistOps 12, the task 6, generation settings 1, videoOps 1). +- editor unit: 356 → **361: 360 pass, 1 fail** — the one is `remote-listing/route.test.ts` ("a listing is a job whose + last line is the diff…": the log read before its `@@remote-listing` line landed, under the machine's load; not this + lane's code); that file alone afterwards **2 / 2 pass**. +5: `_videoAssist.test.ts`. +- mcp: 379 (release 37's record) → **380 / 380** (+1: generate video-assist). +- test:scripts: 1316 (1312 pass, 4 skipped; release 37's record) → **1326 / 1322 pass / 0 fail / 4 skipped** (+10: + fx-params 3, join-preview 2, umtool videoAssist 5). +- umtool unit (`pnpm --filter umtool test`): **45 / 45** (none of this lane's tests are there: umtool's `.mjs` tests run + in test:scripts). +- Docs: `docs env --check` 0, `docs files --check` 0, `docs cli --check` 0, `settings example --check` 0 (after + `docs files` and `settings example` regenerated SETTINGS.md and settings.json.example for the new route). +- e2e (umtool, `pnpm --filter umtool run e2e video-assist.spec.ts clip-look.spec.ts`, prebuild stamped + `93df78d7b655` at `d3e009c1`): **2 / 2 passed** (35 s; video-assist 13.6 s, clip-look — the Look panel's existing + spec, a short rendered — 6.9 s), first run. + +## Decisions + +- **One module of its own** for the ops (`common/lib/report/videoAssistOps.mjs`, not an extension of `videoOps.ts`): + plain ESM so umtool's node libs (Apply) and the editor's TS task import the same checker; `videoOps.ts` calls it for + revise-video's look ops. +- **The look's validators MOVED to common** (re-exported by report-to-video), not copied: the editor cannot import + umtool, and the brief's "the SAME validators updateRender uses" leaves no other honest way. +- **The composition params are declared in common** (`fxParams.mjs`) and re-exported by `deck.mjs` / `stats.mjs` / + `fx.mjs` as their slices — the editor needs them too; a drift test holds each declaration to `validateChrome`. The + layout-coupled settings (deck height, footage scale, QR size, pip sizes) are not declared; `validateChrome` still + has the last word at Apply. An `fx` op only tunes a composition the cut already draws (it never turns one on). +- **The model's op shape is `{op, id, key, value}`** (four required keys): the default API model is a strict tool + user, where every schema key is required — a flat schema of every op's fields would force junk into each op. +- **"≤ 3 s from current unless the request says more"**: the step widens to the largest number of seconds the + request names ("6 seconds", "2.5 s"); a bare number ("start at 516") does not widen it. +- **A clip's source window**: its extent (start–end) when it has a cut; else its edges ± `render.fetchPad` (0 when the + cut sets none). +- **"room tail 2"** is `{tail: true, maxS: 2}`: a room edge is a boolean, `maxS` is its seconds; a number for the + tail turns it on up to that, and a number alone (maxS / minGap) on a cut with no room turns the tail on with it. +- **The `code` preset routes `video-assist` local** (the brief: local in every preset but `api`); its field doc and + the preset's doc say so. +- **Scope**: both Ask boxes ask with `all`; the clip editor's box sends a request that names no clip as about the + selected one ("… (on clip r002)"). `scope` stays a body field for the CLI and the MCP. +- **Preview join** is `build-video --join-preview` (four clips, the last 3 s of each cut and the first 3 s of the + last), not `--only` (one segment has no join); its own work dir and file, so the cut's `out/` is never touched. + Refused for a deck cut (its joins are under the deck), a montage and hard cuts. +- **A project-level note** is a `whole`-anchored note; the video project had no surface for one, so the Look panel's + box lists them (Notes on the project, with Add note). The reply's proposal is a new `ReplyProposal` kind `assist` + `{at, ops}`; its Apply all applies the waiting ops of THOSE proposals only while they are the latest (`at`). +- **Apply** re-checks every op against the manifest as it is; an op the manifest no longer allows fails with the reason + and the rest go on; a stale token stops the batch (409) with what was applied kept and marked. +- **The task re-reads the manifest after the answer** and checks the ops against that, so an edit made while the model + thought is what the ops meet. + +## Not done / owed + +- **Live, after merge** (the orchestrator's): the editor and umtool restarts; a dry run then a real ask on the Nik Drop + project ("make the joins 0.15 s with less smear") on local Qwen, applied, and a Preview join — commands in the + report. +- The Build tab's other specs (`piece.spec.ts`, `visual-audit.spec.ts`) now render the Ask box under the Look panel; + not run here (two specs a run) — the orchestrator's full umtool suite covers them. +- `fx` ops reach only the declared params (no layout-coupled deck settings, no `render.palette`, no kinetic-quote + voices) and never turn an effect on; widening that is a declaration per param plus its drift test. +- The join preview is not offered for a deck cut (its joins are drawn under the deck; `--chrome-preview` is that + path).