Archilyzer · Source

archilyzer

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

commit 044ca54e5f6cb7fd37bb9008a557eff13378d46a
parent 09d021357cc7cc92e85a3effcd9ffed087137247
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 14 Oct 2026 07:59:36 -0400

plans: umtool redesign — P5, as shipped (Create and Settings); [Unreleased] bullets

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

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

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +- **umtool has Create: `/create`, "What are you making?"** One list of lines — Research a question · an article from a question or from a board · a video from an article, a board, a recording or a sweep report · a song — each opening its form under it, each a shell over a writer that already existed: a case (the board opens), a sweep (r27's new-article form, with the **estimate** said before Start: what earlier runs on that model spent, from the usage ledger, and the cap it stops at), a board's hand-off (its plan, then the confirm), the video chain over an article's iteration (its steps listed first), a project from a recording or a report on disk, a song. Keys: `j`/`k` the lines, Enter opens a form on its first field, Escape closes it back to the line. The policy is a chip — "Generation: balanced · Claude Code: sweeps · API: report revisions, research · local: video revisions, drafts" — linking Settings. The rail's **+ Create** is a link to it, ⌘K's create actions open its lines (`/create?make=…`), and Work has one **+ Create**. Needs a restart of umtool. +- **The editor's "Make a video" lands on Create.** `/?from=<channel>/<id>` (VideoPanel, VideoNavStrip) now redirects to `/create?from=…`, which opens "Video from a recording" prefilled; `/articles/new` redirects to `/create?make=article`. The Inbox no longer carries the new-project form. +- **Settings · generation, `/settings/generation`.** The generation policy — routes per task, the presets, the models (the extractor among them), the caps, whether the API key's file is there (its path, never the key) — moved here from the new-article form, written through the editor's settings action as before; beside it the day's API spend job by job (task, article and iteration, the models, what it cost) and the last seven days, from the editor's usage ledger. +- **Settings · system does what a terminal did, plan first.** The doctor's roots (reports, the media root and whether its drive is there, the cache, an old cache), the project index (**Rebuild…** runs `umtool index --rebuild` as a umtool job; **Prune…** drops the records of projects that are gone) and storage (every project's `out/` and deliverables, with **Move out…**, **Move back…**, **Deliverables to media…** / **home…**, and every `out/` at once). Each shows its plan first — what it touches, with sizes, what refuses — then **Confirm** or **Keep it**; a move runs the same `umtool storage` a terminal would, as a job in the rail's Running list. `GET /api/doctor` also says the roots. - **umtool has a Research page, `/research`.** Ask the corpus (a phrase, a `/regex/`, or `a near:8 b`) in the local corpus, a published site or the hub; the scope chips (channels, dates, state on the platform, videos or streams, posts) say what the scope **holds** before anything runs: channels, videos, the years, and transcripts vs captions once a search has counted them. A search reads the whole scope once, with the MCP's own `enumerate_matches` engine (the same total and the same recordings), and says **full coverage** or **Partial — not reached:** the channels a cap left unread, with the mirrors it folded. Results are lit lines grouped by recording, the match marked, with year, channel, text, state and reading facets that narrow what is shown. The reader on the right shows the transcript around the lit hit with its cue lit, **−**/**+** to narrow or widen it, **Copy citation** in the house format, **Play from** a clip or source this machine holds, and **Fetch clip** through the editor's fetch-window route, as `fetch_clip` asks. Keys: `j`/`k` lines, `r` read, `s` skip, `u` unread, `c` copy citation, `/` the ask bar. Needs a restart of umtool. - **Research keeps a reading log.** Every hit is read, skipped or unread, and the header says **read 37 of 97**. The log is umtool's, under `REPORTS_ROOT/.umtool/research/sessions/`, one per query and scope, never in the corpus. - **umtool's archive inventory, `/research/archive`.** Channels × years: the videos the editor holds (its `GET /api/ops/coverage`, the MCP's `channel_coverage`) or the videos the source publishes, on the Meter ramp, gaps over 60 days marked, nothing held as —. Hover or focus a cell for what it holds, published, deleted or unlisted, and transcripts vs captions; the arrow keys walk the grid; **Table** lists the same numbers. When umtool has no `WORKER_TOKEN` or the editor does not answer, the page says which, and for the local corpus reads the held counts on disk instead. diff --git a/plans/umtool-redesign.md b/plans/umtool-redesign.md @@ -352,7 +352,7 @@ P0 design ─► P1 foundation ─┬─► P3 inbox/work/tools/URLs ─┬─ | P3 inbox/work/tools/URLs | `ux/p3` → `main` `01120bfe` | LIVE 2026-10-14 (umtool BUILD_ID q7e29Em…) | | P2b jobs + drafts | `ux/p2b` → `main` `44c7b758` | LIVE 2026-10-14 (umtool BUILD_ID J2YDbFuc…) | | R2 research boards | `ux/r2` → `main` `b8561669` | LIVE 2026-10-14 (editor N0OAYPyM…, umtool 9lPefuiS…) | -| P5 create + settings | `ux/p5` | in progress | +| P5 create + settings | `ux/p5` | done on the branch, awaiting review (not merged) | | P4a-1 piece frame | `ux/p4a` | in progress | | P4a-2, P4a-3 | — | after P4a-1 | | R3, P4b, P6 | — | after R2 / P4a / all | @@ -1205,3 +1205,131 @@ r28 session (nothing of its in flight), the editor was built (50 s, capped) and before and after; only the auto-* lane runners were active), then umtool (44 s, `scripts/r2-umtool.sh`). Live: `/`, `/research`, `/work` 200; `/api/research/cases` answers (0 cases); the editor's `report-draft` route lists `seed` among its keys and judges a seeded body on its other fields. + +### P5, as shipped + +**What.** Create and Settings: one door to everything that can be made, and the settings a terminal held. Built on +P3's shell, R2's case API and r28's forms; no writer is new — every form is a shell over one that existed. + +- **`/create`, "What are you making?"** (`app/create/page.tsx`, `components/create/CreateView.tsx`, `forms.tsx`, + `lib/create.ts`; canvas "Create"): ONE lit list in two columns — Research · Article | Video · Song — eight lines, each + with its button (filled Signal on the lit line, an outline once its form is open: the form's own button is then the + one primary action). The form opens inline under its line; the result navigates to what was made. + - **Research a question** → `POST /api/research/cases {query, title?, scope: {source}}` (R2) → `/research/<case>`. + The corpus is a select of R1's sources. + - **Article from a question** → r28's `NewArticleForm`, reused with three props: `showPolicy` (false here: the + policy is the chip), `framed`, `history` + `onCancel`. It now says the **estimate** before Start + (`lib/create/estimate.mjs`, unit-tested): what earlier runs of the same task on the chosen model spent — the editor's + usage ledger summed per job, typical (median) and most, the latest 20 — and the cap it stops at; a local model + "Runs on the local model: no API spend"; the day's spend against the daily cap beside it. There is no price model of + a sweep (what it reads depends on what the question matches), so the estimate is the record, said as such. + - **Article / Video from a board** → a board select (`GET /api/research/cases`, `?case=` preselects), then R2's + `HandoffDialog` unchanged: the plan from `POST …/handoff {to}`, nothing written until its confirm. + - **Video from an article** → a store article and a done iteration with a report (newest first, `?article=` + preselects), the chain's steps from `GET /api/articles/chain` ("5 of 10 steps to run, from …"), then **Make the + video** (`POST /api/articles/chain`) → the article's Iterations tab, where the chain runs as a umtool job. + - **Video from a recording / from a sweep report / A song** → `NewProjectMenu` (restyled onto Field/Input/Select; + new props `kind` (fixed, no kind select), `inline`, `reports`, `fromLabel`/`fromHint`, `submitLabel`, `onCancel`) + → `POST /api/projects/new` (`scaffoldReportVideo`, the song scaffold). The report line offers every project of the + sweep-report kind on disk (`lib/projects/create.mjs`, which holds the make → kind mapping, so no page names a kind), + then "A path typed by hand…". + - **Keys:** `j`/`k` (and the arrows) glide the lit line down the left column and into the right — `LitList` gains an + opt-in `columns` prop so the head follows the line's left edge too (off everywhere else); Enter on a line opens its + form on its first field (`data-autofocus`, focused once the list's fieldset is live — a server-rendered form's + `autoFocus` never runs); Escape closes it and puts the focus back on the line's button. Inside a form `j`/`k` type. + The open form is the address (`history.replaceState` to `?make=`), so a reload or a link lands on it. + - **The policy chip** (`lib/create/policy.mjs`, unit-tested): the Meter dot and "Generation: balanced · Claude Code: + sweeps · API: report revisions, research · local: video revisions, drafts" — routes grouped by where they run, the + seven draft tasks as "drafts" when they agree, the two revisions as "revisions" when they agree — linking + `/settings/generation`. A red dot and "the editor did not answer" when it did not. +- **Addresses** (`redirects.mjs`, two P5 rows, 307): `/` **with a `from` query** → `/create` (a `has` row; the query + passes through, so the editor's `/?from=<slug>/<id>` lands on `/create?from=…`, which opens "Video from a recording" + prefilled — the Inbox no longer carries the form, and `/` without `from` is untouched); `/articles/new` → + `/create?make=article` (its page is deleted; `/drafts` redirects to Create itself until P6). `lib/hrefs.ts`: + `createHref({make, from, case, article})`, `MAKES`/`isMake`, `settingsHref`; `newArticleHref` is Create's article + line, `generationPolicyHref` is `/settings/generation`; `homeHref` lost `from`. +- **The rail and ⌘K:** **+ Create** is a link to `/create` (Signal edge and `aria-current` on it; no place is lit there — + `create` maps to no place in `AppNav`); the palette's create actions are the eight lines (`new-article` kept its id; + `new-project` became `new-video-recording` and five more), plus Create among the places. Work's two header links are + one **+ Create**. +- **`/settings/generation`** (`app/settings/generation/page.tsx`): r28's `PolicyPanel`, moved unchanged — routes, + presets, models (the policy's **extractor** is its own select there: Claude or local, as `settings.generation` + allows; `ExtractorSelect` stays the per-sweep override on the article form), caps, the key FILE's path and whether it + is there — and **Spend today**: the ledger's rows for the UTC day, job by job (time, task, article and iteration + linking its Iterations tab, the models it called, USD), against the daily cap, and the last seven days on a Meter bar + (`lib/settings/spend.mjs`, unit-tested). The head says the policy in one line. +- **`/settings/system`** gains the maintenance a terminal did (`components/system/Maintenance.tsx`, + `lib/system/actions.ts`, `lib/system/storage-rows.ts`, `lib/system/roots.mjs`): + - **Roots** — `umtool doctor`'s, now one module the CLI imports too: reports, the media root (or "= reports") and + the drive's problem, the cache and whether an index exists, a leftover old cache. `GET`/`POST /api/doctor` carry + `roots` (POST also sizes the old cache). + - **Index** — records, how many are for projects that are gone, when rebuilt, the store's path. **Rebuild…** runs + `umtool index --rebuild` as a umtool job ("Index rebuild" in the Running list); **Prune…** drops the stale records in + process (`pruneIndex`; the plan is the new read-only `indexPrunePlan` in `lib/projects.ts`). + - **Storage** — every project's `out/` (here, on media, DRIVE MISSING, none) and, for one with a manifest, its + deliverables switch and directories; **Move out…** (only when a media root is set), **Move back…**, **Deliverables to + media… / home…**, and every `out/` at once. A move runs `umtool storage …` as a umtool job ("Move out <project>"), + the same CLI a terminal runs; deliverables reuse `moveDeliverablesSteps`. + - **Plan, then confirm** (`components/system/ActionPlan.tsx`, the DeletePlan pattern): the trigger asks for the plan + (`POST /api/system/{index,storage} {…, dryRun: true}` — a dry run of the movers: what it touches with sizes, what + refuses, what is worth knowing), the plan takes the focus, and only its confirm (words naming the result: "Drop 2 + records", "Move out") acts; **Keep it** (or Escape) closes it, nothing written, focus back on the trigger. The confirm + re-reads the plan and refuses (409, with the plan) if it now refuses; a project is named by id, never a path; a busy + project (a pipeline process in it) is refused alone, skipped in an "all". + +**Commits** (`ux/p5`, from `main` `794a112b`): + +| sha | what | +|---|---| +| `63cc7294` | `/create` and its forms, the two P5 redirect rows, the hrefs, + Create as a link, ⌘K's create lines, Work's + Create, `/settings/generation`, the system actions behind plans, `LitList`'s `columns`, `NewProjectMenu` restyled with Create's props, `NewArticleForm`'s estimate and props, `rootsReport` shared with the CLI, unit tests (create 5, settings 2, hrefs +1) | +| `3411c0f2` | `create.spec` (10) and `settings.spec` (7); `article-new`, `inbox`, `shell`, `redirects`, `projects` follow Create; `test:scripts` runs `lib/create` and `lib/settings`; the system jobs named for the Running list | +| `a942547c` | a plan takes the focus (its confirm, else Keep it), Escape keeps it, closing returns to its button | +| (this commit) | this record, `[Unreleased]` bullets | + +**Gates.** + +| Gate | Result | +|---|---| +| repo-wide `tsc --noEmit` | clean at `63cc7294` and at the tip; `pnpm --filter umtool typecheck` clean at every commit | +| umtool unit (`node --test umtool/lib/*.test.mjs umtool/lib/*/*.test.mjs umtool/report-to-video/*.test.mjs`) | 835 tests, 833 pass, 2 skipped, 0 fail (new: `create.test.mjs` 5, `settings.test.mjs` 2, `hrefs` +1) | +| `pnpm --filter umtool test` | 16/16 | +| `pnpm run test:scripts` (reads the capped build) | 986 tests, 984 pass, 2 skipped, 0 fail | +| capped umtool `next build` (corpus linked, `MemoryMax=5G`, heavy slot `--build --estimate 5120`) | exit 0; compiled 24.6 s, 81 s wall, 1.39 GB max RSS; the link removed | +| full umtool e2e (`pnpm --filter umtool run e2e`, detached, queued ~8 min behind `ux-p4a2`) at `a942547c` | **417 tests: 411 passed, 0 failed, 6 skipped** (the song-data skips), 7.5 min; `create.spec` 10/10, `settings.spec` 7/7 | + +Before it, dev-mode runs (`E2E_MODE=dev` through the queue, no prebuild) while two other lanes' servers held ~5 GB: +`create` + `settings` 13/17 then 17/17 (the four reds were `toHaveURL`'s 5 s against a dynamic page's first dev compile — +the navigations after an action now `waitForURL` 20 s — and a stub log not written yet); the touched specs 54/57 with +`last-page:55`, `shell`'s theme reload ("Page crashed") and `work:42` red under memory pressure in dev mode — all three +green in the start-mode suite above. + +**Screenshots and keys.** Job scratch `p5-shots/` (20): `/create`, `/create?make=article`, `/create?from=testchan%2Fvid1` +(the editor's hand-off, the recording's form open), `/settings/generation`, `/settings/system` with the index rebuild's +plan open — each at 1366×768 and 1440×900, dark and light, on the e2e fixture under the start-mode build. Against the +canvas's Create: the same two columns of grouped lines (Research · Article | Video · Song), the lit line's Signal edge +and notch with its filled button, the outline buttons at rest, the policy chip at the head's right with the Meter dot; +differences: the line subtitles carry live counts ("Fixture board · 3 quotes", "1 found"), the rail's + Create has no +`c` key (below), and an open form sits under its line. Every form fits 1366×768 with its line; the article form at +1366 is the tallest (it fits; with "research" chosen its autonomy row adds a line and the column scrolls). Keyboard +only (production build, reduced motion): the rail's 11 stops, the chip, then the list as ONE stop (the lit line, dashed +1 px), then its line buttons (P1's lit-list Tab order); every control the 2 px Signal ring; `j`/`k`, Enter, Escape as +above; on Settings · system the plan opens on its confirm (or Keep it) and Escape returns to its trigger. + +**Found and left.** +- **No `c` key for + Create.** The canvas's rail shows `+ Create c`. A bare `c` is the board's copy key (R2) and other + pages' own; a global one would race them. ⌘K "create" reaches every line. +- **"Pick from the archive" for a recording** is the editor's hand-off (`/?from=`) or a pasted `<channel>/<id>` / share + URL; there is no recording search on the form (Research is where recordings are found). +- **The sweep-report line lists what the walk calls a sweep report**, an article's sweep iteration in the store among + them (the fixture's `articles/p5-board/iterations/1` after the board hand-off) — the walk's existing behaviour. +- **Settings · system's "tools & disk" says `index off`** when every summary was served from memory (P3's + `indexHealth()` counts only index reads), while the new Index panel says the store's records. Not changed: P3's panel. +- **A storage move's plan is a dry run of the movers, per project**: `move-out --all` measures every project's `out/` + (a tree walk each) before it says anything; on the real reports root with a media root set that can take seconds. + Not run against the real REPORTS_ROOT here (the e2e fixture has no media root: the moves are proved refused, and the + CLI's own `storage.spec` proves the movers). +- **`/articles/new`'s page is deleted**; common still reserves the article id `new` (`registry.ts:353`) — still right: + the redirect shadows `/articles/new`. OPERATING.md, `umtool/docs/*` and FACTS still name `/articles/new` and the + policy's old home; they ride the redirect until P6 rewrites the docs. +- Not touched (other lanes'): `app/projects/**` (its `+ new project` form is `NewProjectMenu`, restyled here, same + contracts), `components/projects/**`, `lib/pieces/tabs.mjs`, `lib/inbox/what.mjs`, `e2e/urls.ts`.