Archilyzer · Source

archilyzer

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

commit c15e5f4e42e1d0f4d2fe5f8007d068c6bd959488
parent f479d89dbad138988a75176cb5f756e6ce449814
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 13 Oct 2026 17:00:12 -0400

docs: deleting an article, an iteration, a project or a take — REPORT.md (generated), OPERATING.md, umtool/docs; the umtool media-root variables a delete reads, declared

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

Diffstat:
MENVIRONMENT.md | 3+++
MOPERATING.md | 30++++++++++++++++++++++++++++++
MREPORT.md | 8++++++++
Mcommon/lib/envVars.ts | 3+++
Mcommon/lib/report/docs.ts | 32++++++++++++++++++++++++++++++++
Mumtool/docs/e2e.md | 1+
Mumtool/docs/projects.md | 16+++++++++++++++-
Mumtool/docs/report-video.md | 8++++++++
Mumtool/docs/sites.md | 7+++++++
9 files changed, 107 insertions(+), 1 deletion(-)

diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md @@ -87,6 +87,9 @@ Tokens, credentials and knobs a running process reads. Most configuration is not | `CLAUDE_DIGEST_MODEL` | the CLI's default | The model the metered digest lane asks `claude` for when settings name none. | common/lib/digestApps.ts | | `NITTER_INSTANCES` | a built-in list | Comma-separated Nitter instances for the X fallback fetcher, in order of preference. | common/social/xNitterFetcher.ts | | `ARCHILYZER_X_BROWSER` | the first of `chromium`, `google-chrome`, `google-chrome-stable`, `chrome` on PATH, else Playwright's bundled Chromium | The Chromium-family browser /settings' "Connect X account" opens (a path, or a name looked up on PATH), and a forum-thread channel's "Connect forum session" too. It is launched without the automation signals, in the X session profile (or the forum host's profile); a value that is not an executable refuses the connect rather than opening another browser. | common/social/xBrowser.ts | +| `UMTOOL_MEDIA_DIR` | unset (no media root: a project link's target is kept) | umtool's media root, where a tiered project's `out/` (and its deliverables) are linked to. Read by `archilyzer reports delete` and the editor's `delete-article` / `delete-iteration` too: an iteration project's link that is exactly its mirror there is removed with its target. Its other uses are documented in [umtool/docs](umtool/docs/README.md). | common/lib/report/delete.ts, umtool (lib/paths.mjs) | +| `REPORTS_DIR` | `~/reports` (or the parent of `SONG_REPORTS_DIR`) | umtool's reports root, the tree its projects hang off; with `UMTOOL_MEDIA_DIR`, it says where a project's media mirror is (`<media>/<path relative to it>`) for a delete. | common/lib/report/delete.ts, umtool (lib/paths.mjs) | +| `SONG_REPORTS_DIR` | unset | umtool's um-song deliverables tree; when `REPORTS_DIR` is unset, its parent is the reports root a delete reads (as umtool does). | common/lib/report/delete.ts, umtool (song/paths.mjs) | | `UMTOOL_URL` | unset (no link; the MCP's `notes` off) | umtool's front door; when set, the video page links to it, and the MCP's `notes` tool reads the operator's notes there and writes a reply as the agent's (e.g. `http://localhost:3050`). | editor/app/channels/[slug]/videos/[id]/page.tsx, mcp/src/archivalTools.ts | | `TRANSCRIPT_SITE_URL` | — | MCP server: one published archive to read over HTTP. | mcp/src/sources.ts | | `TRANSCRIPT_HUB_URL` | — | MCP server: a hub, federating every archive it lists. | mcp/src/sources.ts | diff --git a/OPERATING.md b/OPERATING.md @@ -252,6 +252,36 @@ pnpm ops report-draft --json '{"task":"sweep","article":"example-article","i editor's queues, holds and cooldowns (one stream, real gaps, backing off on a 429), never yt-dlp or gallery-dl by hand. Keep a local-only subject on no site. +## Delete an article, an iteration, a project or a take + +```sh +pnpm archilyzer reports delete example-article # the plan; nothing is written +pnpm archilyzer reports delete example-article --apply +pnpm archilyzer reports delete example-article --apply --force # a published one: unpublished first +pnpm archilyzer reports delete example-article --iteration 3 --apply +pnpm ops delete-article --json '{"id":"example-article","dryRun":true}' +pnpm ops delete-iteration --json '{"id":"example-article","n":3}' +``` + +- Every delete is a **plan** first: each path that would go with its size, what is kept and why, what refuses. In + umtool the buttons are **Delete article** (the article's page), **Delete i<n>** (its Iterations tab), **Delete + project** (a report-video project's page) and **Delete take <id>** (its takes page); each shows the plan and acts + only on **Confirm delete**. +- **An article** takes its directory (report, video, history, notes, iterations), its iterations' video projects + under the projects root and its staged exports. Refused while published or named by a site page with no report of + its own (force unpublishes and drops the page), and while any iteration runs. +- **An iteration** takes `iterations/<n>/` and its project. Refused: the current article or video, the iteration + the article's report came from, a running one, one another iteration revises or copies. Its number is never + reused. +- **A project** takes its directory, and its `out/` or deliverables on the media drive when they are its own media + copy. Refused while a umtool job works in it, when it is an article's current video or a running iteration's + project, and (unless **delete anyway**) when its manifest names an article with a video attached. +- **A take** takes `takes/<id>/`. The take the project's manifest is (what the deliverable is built from) needs + **delete anyway**. Its verdict and the notes on it are kept. +- Kept always: the generation usage ledger, the shared prepared-media cache (the next prepare prunes it), the git + history of `transcripts/`, a deployed site until it is rebuilt. Nothing outside the known roots is touched; a link + is removed as a link. + ## Publish ```sh diff --git a/REPORT.md b/REPORT.md @@ -136,6 +136,14 @@ An article made or revised by a model keeps each generation as an **iteration**, - An iteration's video project is off the corpus disk, in `<settings.generation.projectsRoot>/<id>/i<n>/` (blank: `~/reports/articles`). - `archilyzer reports iterations <id>` lists an article's iterations; `pnpm ops get iterations <id>` reads them from the editor. +## Deleting an article or an iteration + +`archilyzer reports delete <id> [--iteration <n>] [--apply] [--force]` (also `pnpm ops delete-article` / `delete-iteration`, and umtool's **Delete article** and **Delete i<n>**) deletes through the registry (`lib/report/delete.ts`). Without `--apply` it prints the plan and writes nothing: every path that would go with its size, what is kept and why, and what refuses. + +- **An article:** its directory (report, video, poster, stills, history, notes, iterations), each iteration's video project under the projects root, and its staged exports. Refused while it is published, or while a site's `pages` names its id with no report of its own (`--force` unpublishes it and drops that page first, through the registry and the site's writer); refused while any iteration is queued or running, force or not. A site page that is the site's own report of the same id is a different document and is not touched. +- **An iteration:** `iterations/<n>/` and its project. Refused, with no override: the current article, the iteration its `report.json` came from, the current video, a queued or running one, and one another iteration revises or copies. Its number is retired (`current.json` `highest`): no later iteration is numbered `n` again. +- **Kept:** the generation usage ledger (spend history), the shared prepared-media cache (the next prepare prunes it), the git history of `transcripts/`, and a published build until it is rebuilt. Nothing outside the articles directory, the projects root and the export staging is removed; a link is removed as a link, and its target only when it is the project's own umtool media copy (`UMTOOL_MEDIA_DIR`). + ## Checking quotes `archilyzer reports verify-quotes <report.json> | --article <id>` checks every quote against its record as compose does (token recall, on every track) and names a quote that matches a served `en` rewrite but not `en-orig` (`en-orig-drift`). A quote that passes recall but is not verbatim (case, punctuation and curly quotes aside) within ±90 s of its cited second is **`inexact`**: a warning, printed and counted, that does not change the exit code; compose and publish do not use it. A GENERATED quote must pass that strict check: a finding whose quote fails it is dropped. The statuses: `ok`, `drift`, `en-orig-drift`, `inexact`, `missing-record`, `no-cues`, `missing-post`, `unreadable`. diff --git a/common/lib/envVars.ts b/common/lib/envVars.ts @@ -123,6 +123,9 @@ const DECLARED: EnvVarDecl[] = [ { name: "CLAUDE_DIGEST_MODEL", audience: "runtime", default: "the CLI's default", readBy: "common/lib/digestApps.ts", doc: "The model the metered digest lane asks `claude` for when settings name none." }, { name: "NITTER_INSTANCES", audience: "runtime", default: "a built-in list", readBy: "common/social/xNitterFetcher.ts", doc: "Comma-separated Nitter instances for the X fallback fetcher, in order of preference." }, { name: "ARCHILYZER_X_BROWSER", audience: "runtime", default: "the first of `chromium`, `google-chrome`, `google-chrome-stable`, `chrome` on PATH, else Playwright's bundled Chromium", readBy: "common/social/xBrowser.ts", doc: "The Chromium-family browser /settings' \"Connect X account\" opens (a path, or a name looked up on PATH), and a forum-thread channel's \"Connect forum session\" too. It is launched without the automation signals, in the X session profile (or the forum host's profile); a value that is not an executable refuses the connect rather than opening another browser." }, + { name: "UMTOOL_MEDIA_DIR", audience: "runtime", default: "unset (no media root: a project link's target is kept)", readBy: "common/lib/report/delete.ts, umtool (lib/paths.mjs)", doc: "umtool's media root, where a tiered project's `out/` (and its deliverables) are linked to. Read by `archilyzer reports delete` and the editor's `delete-article` / `delete-iteration` too: an iteration project's link that is exactly its mirror there is removed with its target. Its other uses are documented in [umtool/docs](umtool/docs/README.md)." }, + { name: "REPORTS_DIR", audience: "runtime", default: "`~/reports` (or the parent of `SONG_REPORTS_DIR`)", readBy: "common/lib/report/delete.ts, umtool (lib/paths.mjs)", doc: "umtool's reports root, the tree its projects hang off; with `UMTOOL_MEDIA_DIR`, it says where a project's media mirror is (`<media>/<path relative to it>`) for a delete." }, + { name: "SONG_REPORTS_DIR", audience: "runtime", default: "unset", readBy: "common/lib/report/delete.ts, umtool (song/paths.mjs)", doc: "umtool's um-song deliverables tree; when `REPORTS_DIR` is unset, its parent is the reports root a delete reads (as umtool does)." }, { name: "UMTOOL_URL", audience: "runtime", default: "unset (no link; the MCP's `notes` off)", readBy: "editor/app/channels/[slug]/videos/[id]/page.tsx, mcp/src/archivalTools.ts", doc: "umtool's front door; when set, the video page links to it, and the MCP's `notes` tool reads the operator's notes there and writes a reply as the agent's (e.g. `http://localhost:3050`)." }, { name: "TRANSCRIPT_SITE_URL", audience: "runtime", default: "—", readBy: "mcp/src/sources.ts", doc: "MCP server: one published archive to read over HTTP." }, { name: "TRANSCRIPT_HUB_URL", audience: "runtime", default: "—", readBy: "mcp/src/sources.ts", doc: "MCP server: a hub, federating every archive it lists." }, diff --git a/common/lib/report/docs.ts b/common/lib/report/docs.ts @@ -197,6 +197,38 @@ export function renderReportMarkdown(): string { "iterations <id>` reads them from the editor.", ); out.push(""); + out.push("## Deleting an article or an iteration"); + out.push(""); + out.push( + "`archilyzer reports delete <id> [--iteration <n>] [--apply] [--force]` (also `pnpm ops " + + "delete-article` / `delete-iteration`, and umtool's **Delete article** and **Delete i<n>**) " + + "deletes through the registry (`lib/report/delete.ts`). Without `--apply` it prints the plan " + + "and writes nothing: every path that would go with its size, what is kept and why, and what " + + "refuses.", + ); + out.push(""); + out.push( + "- **An article:** its directory (report, video, poster, stills, history, notes, iterations), " + + "each iteration's video project under the projects root, and its staged exports. Refused " + + "while it is published, or while a site's `pages` names its id with no report of its own " + + "(`--force` unpublishes it and drops that page first, through the registry and the site's " + + "writer); refused while any iteration is queued or running, force or not. A site page that " + + "is the site's own report of the same id is a different document and is not touched.", + ); + out.push( + "- **An iteration:** `iterations/<n>/` and its project. Refused, with no override: the " + + "current article, the iteration its `report.json` came from, the current video, a queued " + + "or running one, and one another iteration revises or copies. Its number is retired " + + "(`current.json` `highest`): no later iteration is numbered `n` again.", + ); + out.push( + "- **Kept:** the generation usage ledger (spend history), the shared prepared-media cache " + + "(the next prepare prunes it), the git history of `transcripts/`, and a published build " + + "until it is rebuilt. Nothing outside the articles directory, the projects root and the " + + "export staging is removed; a link is removed as a link, and its target only when it is " + + "the project's own umtool media copy (`UMTOOL_MEDIA_DIR`).", + ); + out.push(""); out.push("## Checking quotes"); out.push(""); out.push( diff --git a/umtool/docs/e2e.md b/umtool/docs/e2e.md @@ -38,6 +38,7 @@ rendered over a deliverable would be indistinguishable from a person doing it. | `gone-fixture` | its source is gone — the preflight must block it | | `no-origin-fixture` / `localhost-fixture` | the two defects that shipped | | `takes-fixture` | takes **write** `takes/verdicts.json` — two groups, a take with no preview, one skipped take.json, a work dir that is not a take | +| `delete-fixture` | `article-delete.spec.ts` **deletes** a take of it, then the project (`e2e/fixtures/delete-fixture.mjs`, with the article `psi`; the spec writes its draft `omega` itself, since `articles.spec.ts` counts the store's rows) | | `bike-fixture` | the third kind | | `find/` | shadowed by a tool page | | `deep/nested/solo-fixture` | a pass-through chain, for the collapse | diff --git a/umtool/docs/projects.md b/umtool/docs/projects.md @@ -63,7 +63,20 @@ address of its own; it is listed with an `info` decision and reached the same wa `RESERVED_BROWSE` is asserted by an e2e spec to equal the real directory listing of `app/browse/`, so a tenth tool page cannot quietly make a project unreachable. -## Adding a kind +## Deleting a project + +**Delete project** on a report-video project's page (`POST /api/projects/delete`, +`lib/report/delete.mjs`) is the "new project" door's other half. It shows the +plan first — the directory with its size and its biggest parts, and, for an +`out/`, `clips/` or `share-*` that `umtool storage` linked to the media root, +that media copy — and removes it on **Confirm delete**. Refused: a project that +is a link or is reached through one, one a umtool job is working in, an +article's current video (an iteration project `current.json` names) or a running +iteration's project. A project whose manifest names an article with a video +attached needs **delete anyway** (the article keeps its attached copy). Any +other link is removed as a link; its target is kept and named. Nothing outside +`REPORTS_ROOT` and `MEDIA_ROOT` is touched, and neither root itself. + **A registry entry and one view. Nothing else.** @@ -91,6 +104,7 @@ fail when somebody special-cases a kind in a page — which no page test can see | `lib/projects/{report,song,sweep}.mjs` | per-kind reading | | `lib/projects/core.mjs` | the CLI's assembled view | | `lib/projects.ts` | the app's façade: caching, dispatch, the index | +| `lib/report/delete.mjs` | deleting a project or a take: the plan, then the delete | | `lib/project-types.ts` | types only, **no `node:` import ever** | ## Discovered by getting it wrong once diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md @@ -715,6 +715,14 @@ Each take also takes notes (a `take` anchor) and timed notes on its preview; the verdicts and those notes reach the agent through `umtool notes <project>`, which lists every take with its verdict and note ([notes.md](notes.md)). +**Delete take <id>** on a take's card shows the plan (`takes/<id>/` with its +size) and removes it on **Confirm delete** (`POST /api/report/takes/delete`, +`lib/report/delete.mjs`). The take whose `video.manifest.json` is byte for byte +the project's own — what the deliverable is built from — needs **delete +anyway**; a umtool job working in the project refuses. Its verdict row and the +notes on it are kept: the agent reads them back, and a verdict on a take that is +gone shows as missing. + ## Operator notes, timed notes and the generated-manifest guard Notes on a project live in `<project>/notes.json` (shape and CLI: diff --git a/umtool/docs/sites.md b/umtool/docs/sites.md @@ -52,6 +52,13 @@ a `report-draft` job the EDITOR runs, asked over its ops API with the shared | **Cancel** | `job cancel` on its editor job; the log's last lines are polled every 2.5 s while it runs | | **Make the video** | the chain (`lib/report/chain.mjs`) as a umtool job: its ten steps, each one's status, resume or **from** a step, cancel | | **compare** | tick two, then **Compare iN and iM** | +| **Delete iN** | the plan (its directory and its project, with sizes; what refuses), then **Confirm delete** — common's `deleteIteration` under the registry's lock. Refused: the current article or video, the iteration the article's report came from, a running one, one another revises or copies | + +**Delete article** (on any article of the store, in the making too) shows the +plan — the article's directory, its iterations' projects, its staged exports, +what is kept — and deletes on **Confirm delete** (common's `deleteArticle`; a +chain of it running here refuses). A published article offers **delete anyway**, +which unpublishes it first. `/articles?deleted=<id>` says what went. The list shows each one's kind, model, parent, copy, status, cost per model, minutes, ops applied and refused, and checks; which is the article and which the