Archilyzer · Source

archilyzer

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

commit 469da9ab9b3caabb6c8c7e5856f9d6d45b7f1351
parent 78e3e37b154959f510213f0ed698b2f0256f7f58
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 14 Oct 2026 13:09:20 -0400

plans: umtool redesign — R5, as shipped (recurring reports); [Unreleased] bullets

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

Diffstat:
Meditor/CHANGELOG.md | 2++
Mplans/umtool-redesign.md | 136++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 137 insertions(+), 1 deletion(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +- **Recurring reports.** umtool's Create has **A recurring report**: a topic, its scope (channels, or a research board's), a cadence (daily, weekly on a day, or every N days, at a time) and a shape — a **Living report** (one article kept current: each tick fetches what is new and updates it, the new iteration left for review unless "Make each update current without review" is on) or a **Series** (a new dated article each tick, "Co-host updates · week of 2026-10-13", over only the window since the last; a window nothing matches is a *quiet* edition — recorded, no article, $0). **Plan the schedule** says the first tick, the model and the cap before anything is made. A series has its own page (the cadence chip "weekly · next Mon 06:00", Pause/Resume, **Tick now**, Edit cadence, Delete, the editions newest first, the tick log with each tick's spend); a living report wears the same chip in its article's head. Work has a **Recurring** facet; the Inbox puts a finished edition under Review and a failed or cap-held tick under Your call (**Tick now** / **Raise cap**). `umtool schedule list | show <id>` prints them. Needs a restart of umtool and of the editor. +- **The editor keeps the schedules.** A new `report-schedule` lane ticks each recurring report when its window comes — one `report-tick` job at a time, never two of one schedule, never on an idle boot; a window missed while the editor was down is caught up by ONE tick. Hold it with `pnpm ops lane '{"lane":"report-schedule","held":true}'` (`settings.reportSchedule.held`); a tick in flight finishes, and Tick now still runs. Drive it with `pnpm ops report-schedule` (`list`, `create` — with `dryRun` the plan —, `update`, `pause`, `resume`, `delete` — the plan unless `confirm: true` —, `tick-now`). A tick is held, not run, past the day's API cap. Until umtool's Refresh (R4) is in the editor, a tick's fetch-and-build step is not wired and every tick ends failed saying so. - **umtool's benches are one shell.** The clip bench, the claim bench, the narration script, the takes and the drafts review share one frame that fits 1366×768 with no rail: a top bar (← the piece, which bench, **N of M**, ‹ prev / next ›, the keys), the work, a **verdict bar** asking ONE question with its consequence before you choose, and the source on the reader at the right. On the clip bench the transcript is the reader — the cited cue lit, its cite thread, **Copy citation**, **Play clip** — and a clip that ends mid-sentence asks "Extend c04 to the end of the sentence? It would end at 4:31:21 (+12.1 s), covering all of c05." with **Extend to 4:31:21** (or **Fetch to …** past what is fetched) and **Keep the cut here** (lockEnd) before the walk's **Yes, confirmed** / **No, note what is wrong**. The claim bench's context is its reader (`j`/`k` move the lit cue and seek the player) and **Save ruling** its verdict bar, saying what is still missing. Narration asks about the card in hand (`j`/`k`, `a` approve, `r` reject with its note); takes about the take being listened to (`n`/`p`, `l` like, `m` maybe, `x` no). Needs a restart of umtool. - **A report video's Media tab is one surface for every drafted field.** Each field is a line — its words, **where it came from** (the draft file, when, by what model, which attempt was kept, and the rule a refused attempt broke: "attempt 2 of 2 chosen · attempt 1 failed: ✕ text in quotation marks"), its review — with **Approve draft** and **Reject** (a note), the drafts kept aside with **Use this**, grouped by section (cut, on-screen, teaser, flips, threads, narration, YouTube), each headed by its **Draft with <model>**; **Approve all N**, **Draft everything** (the draft-all chain, on the model chosen) and section chips above. `j`/`k` light a field, `a` approves it, `r` rejects it. The on-screen panel moved here from Build, whole. A release-25 narration (no mark in the manifest) shows its `narration-draft.json` attempts too. Needs a restart of umtool. - **The drafts review is a bench: `/projects/<p>/review`.** The same field list, walked one field at a time: the verdict bar asks about the lit field ("Approve the drafted on-screen text of m01? A final build refuses it until it is approved."), the reader shows the clip it is drawn over with its cited cue lit. The Iterations tab's **Narrate**, media drafts and **Draft everything** are now a **Media drafts →** link to the iteration's video's Media tab. diff --git a/plans/umtool-redesign.md b/plans/umtool-redesign.md @@ -440,7 +440,7 @@ edition reviewed with the operator before the schedule is left on. | R3 transparent runs | `ux/r3` → `main` `6362cf40` | LIVE 2026-10-14 (editor HqcZW4aJ…, umtool 85Ultdj2…) | | P4b benches + Media | `ux/p4b` → `main` `e66dd702` | LIVE 2026-10-14 (umtool ktVxkFBl…) | | R4 refresh | `ux/r4` | in progress | -| R5 recurring reports | — | after R4 | +| R5 recurring reports | `ux/r5` | shipped on the branch (R4's two steps behind the seam until R4 merges) | | R6 triage first | — | after R5 | | Co-host pilot | — | after R6 (operator-approved) | | P6 cleanup, docs, audit | — | after P4a-3, P4b, R4–R6 | @@ -2359,3 +2359,137 @@ narration benches and clip benches c01/c03 200 with the bench head; `/drafts` 30 `drafts-unreviewed` rows are new), notes' hrefs end `note=<id>`. P6 audit: "Draft with is off here" reads clipped — name the action whole. + +### R5, as shipped + +**What.** Recurring reports: the same topic, updated at an interval, on a schedule the EDITOR keeps — a **living +report** (one article kept current) or a **series** (a dated edition each tick over the window since the last; a +window nothing matches is a quiet edition, recorded, no article, $0). umtool shows and edits a schedule; it never runs a +timer. R4's two steps (stage 1 fetch + local build, `report-draft {"task":"refresh"}`) are behind a seam until R4 merges. + +- **The store** (common, new files; decided from the store's shape). A living report's schedule is + `reports/<article>/schedule.json`, beside the article: it goes where the article goes (a delete parks the directory) + and nothing that reads an article reads it (compose copies named files; the history commits report.json, report.md, + exports.json). Creating one for a NEW article makes `<article>/iterations/` with it, so the article is "in the making" + (`listPendingArticles`) from the first moment — never an id-named directory without report.json that the registry + would list as a broken article. A series is `reports/.series/<id>/series.json`, its editions listed in it: a + dot-directory, which `idDirs` never lists. Each edition is an ordinary store article `<series>-<YYYY-MM-DD>` (then -2, + -3 …). The ids share one namespace (a series' ≤ 48 characters, room for the edition's date). Schema, words and derived + views: `lib/report/schedule/types.ts` (zod; `shape` reserves `watch` for R6, refused by create); reads: + `lib/report/schedule/store.ts`. **One writer**, `controller/reportSchedule.ts`: create (its plan first), update, + pause/resume, delete (plan, then confirm; refused while a tick runs), and the tick's bookkeeping (the claim, the + record, an edition's line) — each a read-patch-write under the article store's lock, validated, written whole. +- **The cadence** (`lib/report/schedule/cadence.ts`, pure, 7 tests): daily · weekly on a day · every N days (2–365) + anchored to the first tick's local date, at HH:MM on the schedule's `tz` (the editor's zone when it was made). A + spring-forward gap ticks the same distance past it (02:30 → 03:30, that day); a fall-back's repeated hour ticks its + first occurrence. **A missed window is ONE catch-up tick** (`dueTick`): the windows it stands in for are counted + (`missed`), the next tick is the first window after now. A resume and a new cadence re-plan from now. +- **The tick** (`controller/reportTick.ts`): ONE editor job, kind `report-tick` (jobKinds, "Report tick"), on its own + queue `report-tick` (queueKeys, added) — one tick at a time machine-wide; a claim on the schedule (`running`) means + never two ticks of one schedule. Its steps go through `TickSteps { fetchAndBuild, refresh, generateEdition, triage? }`: + living → fetchAndBuild → refresh (its first tick, with no report yet, is the article's first sweep) → made current only + with `autoMakeCurrent` (default off); series → fetchAndBuild → an edition over `[last swept or quiet edition's window + end, today]` (the first: the cadence's length back, floored at the scope's `from`), titled "<topic> · week of <from>" + (weekly) or "<topic> · <date>". `generateEdition` is real: the window check (the editor's enumerate over the build a + sweep would read; the series' terms, or with none any recording — 0 is quiet), the daily cap (refused → `held-by-cap` + with the per-tick cap as the estimate, before any job), a `report-draft` sweep with from/to on the model the schedule + names (else the sweep route's; a sweep routed to Claude Code runs the API model, said in the plan), its end awaited + (a cancelled tick cancels it; its spend logged as `~$x so far`), the edition's title written onto its report. A held + or refused edition leaves no line: the next tick covers its window. Every tick ends with a line in the schedule's + `ticks` (the newest 100: at, trigger, status, edition/iteration, spend, reason, estimate, missed) and the log's + `@@report-tick {json}`. **Before R4 merges** `fetchAndBuild` and `refresh` are `notWiredFetch` / `notWiredRefresh`: + every tick ends `failed` with "not wired: R4's stage 1 (fetch + local build) is not in this editor yet" — a Your + call card, which is the honest state. +- **The lane** (`controller/reportScheduleRunner.ts`): armed by `instrumentation.ts` below the idle gate (and refused on + an idle boot by itself), shaped after the research auto-continue rather than the long-lived auto-queue runner jobs — + a tick is the job, and the Running list shows ticks, not a runner that only waits. A scan now and every minute + (unref'd timer): a claim whose job is gone is recorded `interrupted` and released; the pause gate is read; each due + schedule not paused and not ticking gets one tick. **The pause gate** is `settings.reportSchedule.held` (a new + settings block, its one key; SETTINGS.md regenerated), lane `report-schedule` in `PIPELINE_LANES` beside publish — + `isGateHeld`/`withGateHeld`, the editor's pause action and `pnpm ops lane {"lane":"report-schedule","held":true}` (the + lane takes `held` only). A hold stops the runner starting ticks; a tick in flight finishes; Tick now is the + operator's word and is not held. +- **`pnpm ops report-schedule`** (`controller/reportScheduleOps.ts`, the route an adapter): `list` (with the chip, the + call, the spend, the lane), `create` (`dryRun`: the plan — first tick, model, cap, daily cap, a series' first window + and title, what is worth knowing), `update`, `pause`, `resume`, `delete` (the plan unless `confirm: true`), `tick-now` + (409 while a tick of it runs). Unknown channels are refused by name. COMMANDS.md regenerated; `--wait` prints the + tick's result. +- **umtool.** + - **Create → "A recurring report"** (the Article group's third line; `components/create/RecurringForm.tsx`): shape + (Living report / Series, one sentence each), topic, question, scope (channels — r28's `ChannelPicker`, now exported + — or a board's: its channels, `dateFrom` and query as the window check), cadence (`components/series/ + CadenceFields.tsx`), a series' window check or a living report's "Make each update current without review". **Plan + the schedule** asks the editor's dry run (the region "plan recurring report"); **Start the schedule** (focused, so + Enter starts it) makes it and opens the series page or the article. ⌘K gains "New recurring report". + - **The series page** `/series/<id>` (static segment; the piece `s:<id>`, `lib/pieces/ids.mjs`): the cadence chip + ("weekly · next Mon 06:00", "· paused"), Pause/Resume, Tick now, Edit cadence, Delete schedule (plan, then confirm; + the editions stay as articles) — `components/series/ScheduleControls.tsx` through `POST /api/schedules` (the editor's + action, forwarded); the tick in flight on P4b's `EditorJobProgress`; the editions newest first (a quiet one dimmed, + with its window and why, no link; a done one linking its article); the tick log (when, how, status, edition, spend, + why); what it asks (question, channels, board, window check, cadence and zone, model and cap). A living report's + `/series/<article>` redirects to its article. + - **Pieces and Work**: `s:<series>` pieces in the graph (flow `article`); an edition's article names its series and is + not a Work row (nor counted on the rail); a living report's article carries its schedule's chip. Work gains the + **Recurring** facet (`recurring=1`), the Series kind, and the chip under a row's id. A living report waiting for its + first tick is listed and opens (named by its topic; ArticlePage no longer 404s an article in the making with a + schedule and no iteration). + - **The piece head** (PieceFrame, additive `schedule` and `edition` props): a living report's chip with Pause/Resume + and Tick now; Edit cadence and Delete schedule in its ⋯ menu; an edition says "an edition of <series>". + - **The Inbox** (add-only kinds, `lib/inbox/schedules.mjs`, unit-tested): `tick-failed` (Your call, **Tick now** → the + schedule's page), `tick-held` (Your call, **Raise cap** → `/settings/generation`, the reason and "up to $x a tick"), + `edition-ready` (Review, **Review edition** → its article's iterations: done, nothing current yet). An edition's + article raises no `iteration-ready`/`iteration-failed` of its own — one card, on the series. + - **The Running list**: `report-tick` is a generation row; its spend is its log's `~$x`, its link the schedule. + - **`umtool schedule list | show <id> [--json]`** (bin/schedule.ts through tsx, like `inbox`; read-only). +- **Not built (said so)**: R6's `triage?` step (typed, never called) and the `watch` shape (reserved, refused); a + recording uploaded inside an older window but transcribed after its tick is not in any edition (R6's "new since the + last tick" candidates are its answer); the boundary day is read by two editions (from = the last window's end, + inclusive), on purpose — a video on that day may land after the earlier tick. + +**Commits** (`ux/r5`, from `main` `c103181d`; `main` `d49737da` — P4b live — merged before the gates): + +| sha | what | +|---|---| +| `2eaf14da` | common + editor: the schedule store, cadence, tick, ops action and lane; the settings block and the pause lane; `pnpm ops report-schedule`; COMMANDS.md, SETTINGS.md; common tests (cadence 7, schedule 13), the ops script's | +| `b3f677fb` | merge `main` `d49737da` (P4b live) | +| `1699aeae` | umtool: Create's recurring form, `/series/<id>`, the series pieces, Work's facet, the Inbox kinds, the chip in the piece head, the Running row, `umtool schedule`; the editor stub's report-schedule (`common/testing/schedule/opsStub.ts`); `recurring.spec`, `create.spec` (nine lines); editor `ops-api.spec`'s report-schedule row; the tick logs its sweep's spend | +| `d21da2a0` | the series page's panels one width and statuses as tags; Edit cadence opens on its field and closes back to its button; the spec's keys and screenshots | +| (this commit) | this record, `[Unreleased]` bullets | + +**Gates.** + +| Gate | Result | +|---|---| +| repo-wide `tsc --noEmit` | clean at every commit; `pnpm --filter umtool typecheck` clean | +| common `pnpm --filter yt-dlp-transcript-common test` (`SETTINGS_FILE` at the primary's, read only) | **4124/4124** (+20: `cadence.test.ts` 7, `reportSchedule.test.ts` 13) | +| editor unit `pnpm --filter editor test` | 297/297 | +| umtool unit (`node --test umtool/lib/*.test.mjs umtool/lib/*/*.test.mjs umtool/report-to-video/*.test.mjs`) | 858 tests, 856 pass, 2 skipped, 0 fail (new: `inbox/schedules.test.mjs` 2, facets +1, running +1, ids +assertions); `pnpm --filter umtool test` 24/24 | +| `pnpm run test:scripts` | 1010 tests, 1007 pass, 3 skipped, 0 fail (archilyzer-ops +1) | +| `archilyzer docs cli --check`, `settings example --check` | clean | +| capped umtool `next build` (corpus linked, `MemoryMax=5G`, heavy slot `--build --estimate 5120`) | exit 0; 1.56 GB max RSS; 10 min wall, most of it queued for the heavy slot; the link removed | +| capped editor `next build` (heavy slot, `MemoryMax=5G`) | exit 0; compiled in 27.4 s | +| editor e2e `ops-api.spec.ts` (detached, queued) | **14 passed**, 0 failed, 31.1 s — the new row: create's plan then the schedule, an unknown channel refused, list, Tick now as a `report-tick` job ending `failed` "not wired: R4's stage 1…" with its `@@report-tick` line, pause, the lane's gate (held only), delete plan then confirm | +| umtool `recurring.spec` | 6/6 alone (with `R5_SHOTS`), then 7/7 in the full run below (the keys test added) | +| full umtool e2e (`pnpm --filter umtool run e2e`, detached, queued) at `d21da2a0` | 460 tests: **451 passed, 3 failed, 6 skipped** (the song-data skips), 10.8 min — the three are `board.spec`'s serial chain (`e` did not focus the claim field at :137, the next two read the board it left); `board.spec` alone at the same tip: **7/7**. Not this lane's: no board file changed | + +**Screenshots and keys.** Job scratch `r5-shots/` (20): Create's recurring form and its plan, a series page with a real and +a quiet edition, a living report's article with its chip, the Inbox with the two Your call cards and the Review card — +each at 1366×768 and 1440×900, dark and light, on the e2e fixture under the start-mode build. The form opens in Create's +left column (the Article group) and scrolls at 1366 when planned, as the article form does. Keyboard only (asserted in +`recurring.spec`'s keys test): the topic takes the focus when the line opens; the plan's **Start the schedule** takes the +focus, Enter starts it, Escape drops the plan; on the series page Tab walks Pause schedule → Tick now → Edit cadence → +Delete schedule; Edit cadence opens on its cadence select and Escape returns to its button; the delete plan opens on +**Confirm delete** and Escape returns to **Delete schedule**. + +**Found and left.** +- **The seam.** `editor/app/api/ops/_reportSchedule.ts` wires `fetchAndBuild` and `refresh` to `notWiredFetch` / + `notWiredRefresh`; once R4 is on `ux/integration` they become R4's stage 1 and its refresh task, and the ops-api row's + tick asserts an edition over the fake Anthropic instead of the refusal. +- **A series without terms** checks its window with enumerate's `.` regex over the build a sweep would read — "any + recording in the window"; with terms, the terms (a board's query when made from a board). +- **Tick now is not held** by the lane's gate (the operator's word, as Publish now is); a paused schedule may be ticked + by hand. +- **The board's `dateFrom`** is taken as the series' floor (`from`), YYYYMMDD normalised to YYYY-MM-DD. +- Not touched (R4's): `common/lib/report/draft/**`, `controller/reportDraft.ts`, `lib/report/iterations.ts` (imported + only), `_researchEditor.ts`, the report-draft route. +