Skip to main content

Change Log

Rendered from corpus/log.md

This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.

Append-only. Format: ## [YYYY-MM-DD] action | summary


[2026-05-06] init | created wiki from existing docs/, .claude/ context files, and docs/todos/​

[2026-05-12] refactor | simplified pipeline: SQLite-only storage, dropped group/export/summarize/query-entities, new format REPL command (Ollama-only), generate takes post dir; removed openai/@xenova/ml-distance deps​

[2026-05-12] remove | dropped Playwright entirely; scraping now HTTP+RSS only; rendering uses @napi-rs/canvas (already in place)​

[2026-05-18] rewrite | v2 plan: deleted all src/, simplified to a single newspapper run command (scrape RSS → compose via Ollama → render via Satori); dropped entity extraction, REPL, second theme, OpenAI, Playwright, canvas, sharp, cheerio, compromise, inquirer, ora, handlebars; SQLite kept for article dedupe + post history; versioned output folders per same-day re-run​

[2026-05-18] docs | rewrote index, commands, architecture, data, modules, configuration, design-systems, dependencies, CLAUDE.md, README.md, and .env.example to match v2 plan; deleted design-systems/digital-broadsheet.yaml and stale docs/superpowers/​

[2026-05-18] scaffold | npm init + tsconfig (ESM, NodeNext, react-jsx) + vitest.config + stub src/cli.ts with run/sources/list/clean via cac; installed pinned deps: rss-parser, better-sqlite3, satori, @resvg/resvg-js, react, dotenv, cac (runtime) and typescript, tsx, vitest, @types/node, @types/react, @types/better-sqlite3 (dev); converted warm-industrial.yaml → .json; switched scrape from RSS-only to RSS-for-discovery + per-article body fetch with regex HTML strip; updated docs accordingly; un-gitignored fonts/​

[2026-05-18] implement | full v2 pipeline: util/{config,logger,paths}, storage/{db,articles,posts}, scrape/{rss,body,index}, compose/{ollama,prompt,parse,index}, render/{theme,fonts,satori,resvg,slides/{frame,title,body,quote,index}}, commands/{sources,list,clean}, run.ts orchestrator wired into cli.ts. Replaced Epilogue/Manrope/Newsreader (broken under opentype.js variable-font parsing) with Inter (static TTFs from rsms/inter v4.0) at weights 400/500/600/700/800/900. Sample render verified visually — title-main, body-list, quote-pullout, body-comparison, title-statement all clean. 20 tests passing (stripHtml, parsePost, 9-variant end-to-end render). Added starter data/sources.json (BBC + Guardian + Reuters); updated .gitignore to track sources.json under data/.​

[2026-05-24] cleanup | removed dead v1 prompts/ dir (format-preview.hbs, format-slides.hbs), removed unused px() from src/render/theme.ts, deduped error-handling in src/cli.ts via shared handle() wrapper​

[2026-05-24] restructure | consolidated root: design-systems/ + templates/ + fonts/ → assets/, newspaper-infra/ → infra/, soul.md → docs/soul.md. Updated path refs in src/render/{theme,fonts}.ts and docs.​

[2026-06-10] rebuild | v3: CLI → web app (Fastify API + Astro UI), Satori → Chromium, JSON template system + visual builder​

[2026-06-11] ui | design-system pass: tokenized color drift, centered content-width strategy, de-slop, responsive sidebar/stepper/table, skeletons + favicon + reduced-motion. Added DESIGN.md + PRODUCT.md + a design-tool sidecar; extracted PageHeader + Skeleton primitives. Updated design-systems.md.​

[2026-06-11] ui | Base UI integration: added @base-ui/react@1.5.0; rebuilt shared primitives (Button, Input, Select, Toggle/Switch, Modal/Dialog, Toast) on Base UI with stable token-styled APIs (Select→onValueChange, Toggle→onCheckedChange). Extracted single Sidebar.astro (consistent Lucide icons) used by all pages; added ClientRouter view transitions. Builder: template picker → highlighted left-column list, Inspector fields routed through shared components + enlarged, removed dead StyleEditor prop + repeat-source duplicate-option bug. Updated dependencies.md + design-systems.md.​

[2026-08-27] maintenance | docs/ → corpus/ as a curated wiki; repo cleanup​

Migrated the flat docs/ wiki to a corpus/ on the current corpus convention. The nine reference pages moved verbatim to corpus/wiki/ and each gained summary:/updated: frontmatter; docs/log.md became corpus/log.md (this file); docs/index.md was replaced by a generated catalog. Added the missing spine — overview.md, decisions.md, status.md, open-questions.md — plus corpus/CLAUDE.md, routing.md, and lint.sh (frontmatter, link resolution, 200-body-line cap, abandoned path roots, --index catalog generation). glossary.md deliberately not created: no term has been formally settled yet, and an empty glossary teaches a fresh agent nothing.

The 13 numbered v3 swarm briefs moved from plans/swarm/ to corpus/briefs/done/ with their numbers intact; plans/swarm/reference/, README.md, and NEEDS.md stayed put, so the path references inside those briefs remain accurate.

Cleanup in the same pass: deleted the project-local editor/skill config copies (all available globally) and a design-tool sidecar file, now gitignored — the live reference to it in design-systems.md was dropped.

Folded three open items out of personal memory and into wiki/open-questions.md, each re-verified against the repo today: llama3.2:1b is still configured and still too small for compose, OLLAMA_API_KEY is still absent so the cloud path is still unexercised, and both browser/core mirror pairs (resolveStyleBrowser, ui/src/lib/types.ts) still exist unguarded.

Root CLAUDE.md and README.md updated to point at corpus/.

[2026-08-27] decision | pivot: drop the LLM, become a compiler for a human-written document​

Grilling session on decisions.md + open-questions.md. The product direction changed: Newspapper no longer calls a language model. Composition moves outside the app; the app parses a documented text format, previews it, lets a human edit it, and renders. Recorded as No LLM in the product, superseding "Ollama is the only LLM backend" (2026-05-12). Ollama Cloud support is dropped rather than finished.

Also settled this round:

  • The human is in the loop by design — reverses the old "no human-in-the-loop" entry, which contradicted the shipped product (the pipeline is documented as scrape → compose → edit → render, and brief 32 built a full slide editor). The real distinction was vocabulary: editing vs approval gate, now both in wiki/glossary.md. Approval gates remain rejected.
  • The builder preview is strict, and says so — unknown theme tokens surface as a visible warning. Closes a live gap: resolveStyleBrowser silently fell back to the literal while core's resolveStyle throws, so the builder could preview a template the renderer would refuse.
  • The UI keeps its own copy of the shared types — the copy is justified (core ships raw .ts; the types fight the Astro build) and has not drifted in 2.5 months. A guard test replaces trust.

Corrections from verifying the reconstructed rationales against the repo:

  • Pinned versions: the recorded reason is reproducible installs, not the render-path sensitivity I had inferred. Entry rewritten.
  • data/newspapper.db.bak was never a v1 backup — user_version: 2, zero articles, zero posts. Deleted, with its orphaned -shm/-wal sidecars.
  • The Ollama Cloud path was unit-tested on both header branches; it was unexercised, not untested. Moot now.

wiki/glossary.md created (first terms settled). wiki/open-questions.md rewritten around the pivot; the input contract's shape is now the decisive unknown.

[2026-08-27] decision | the Wizard pivot — a markup language and a visual editor replace the pipeline​

Second half of the grilling session. The product is now a document compiler: a person writes a post in Newspapper Wizard (.wzd), a JSX-flavoured markup with <head> metadata and <body> slides, edited in a split-screen editor (source · live preview · inspector + component palette) where visual edits are written back through a formatter.

Settled this round, all recorded in wiki/decisions.md with a full spec in the new wiki/markup.md:

  • Semantic components with token-only props, no raw CSS — the format has to make ugly hard, since unattractive output is why the LLM went.
  • Flow layout with stacks, never absolute positioning.
  • TNode becomes the compile target, not an authoring surface: the interpreter, theme tokens, and Chromium renderer all survive.
  • The template system is deleted — TemplateDoc, the nine template JSONs, the registry, and /builder. Its canvas/inspector machinery becomes the post editor. Supersedes the 2026-06-10 templates-as-JSON decision.
  • Markup is the source of truth; <head> owns all post metadata and SQLite columns are derived from it.
  • Canonical formatter + linter, JSX-style; author formatting is not preserved across visual edits.
  • Three themes (warm-industrial-1/-2/-3) varying by primary color.
  • Sharp is un-banned, for image processing only — reverses a v2-era constraint that existed because there were no images.
  • Output is JPEG, not PNG.
  • Publishing is a manual state meaning "ready to post", and runs image optimization.
  • Build the editor rather than adopt Puck, borrowing its {type, props} data model with children inline in a slot prop.
  • Access is behind a single account — reverses the no-auth assumption in PRODUCT.md.

decisions.md outgrew the 200-line cap mid-session and was split into product and decisions-engineering.md; wiki/markup.md and wiki/glossary.md were added; soul.md left the corpus to become a gitignored local skill (.claude/skills/newspapper-voice/).

Not yet done: CLAUDE.md still carries the pre-pivot constraints (including the now-wrong Sharp ban), PRODUCT.md/DESIGN.md are still at the repo root, and no briefs have been written.

[2026-08-27] todo | thirteen briefs filed for the Wizard rebuild​

Briefs 51–63 written to briefs/todo/, in four dependency waves: strip the AI surface and land the new schema; then the language (parser/formatter/linter), the component library, auth and uploads; then JPEG output and the template teardown; then the editor, the article library, themes and the page map; and finally the documentation pass.

The catalog with its dependency graph lives in wiki/status.md. Two ordering constraints are called out explicitly in the briefs themselves: 58 (retire templates) must not start before 54 (component library) lands, or the app has nothing that renders; and 63 (docs) runs last.

Also this pass: the language is spelled Wizard; every reference to a deployment target was removed from the corpus at the owner's request, and the routing page was rewritten to describe practices rather than name tooling.

[2026-08-27] decision | direction round opened for the workstation redesign; anime.js locked as the motion engine​

The pivot retires the app chrome along with the pipeline it described: the four-step stepper, the wizard shell, and the builder toolbar are the signature components of a product that no longer exists. Recorded as a product decision (The workstation is redesigned; the slide theme is not) — the warm-industrial tokens that paint the 1080² output are a separate system and carry over untouched.

Four replacement worlds were derived and drawn as complete editor screens, then put to the owner: The Specimen (a foundry specimen sheet made operable — leads), The Cutting Bench (a film editor's bench; beat the lead on both audience identification and product clarity), Struck Cathode (a nixie stack behind bronze gauze; held one axis), and The Mechanical (the paste-up board; the top-ranked grounded candidate, carrying a familiarity risk). Four further candidates were declined, each donating one discipline to the lead: the compile dramatised as an event, a rigid repeated label block per post, integer-only preview scaling, and selection drawn as a lit connection between source and canvas rather than two independent highlights.

Nothing is chosen yet, so DESIGN.md was not rewritten — it carries a status block marking it superseded in intent but accurate for what ui/ renders today. PRODUCT.md was rewritten in full: it had drifted badly, still describing the four-step wizard, PNG output, no auth, and an LLM writing the copy. Its brand personality section is deliberately left open pending the round.

Settled independently of the round and recorded as an engineering decision: animejs 4.5.0 (MIT, no dependencies, framework-agnostic ESM) is the motion engine. motion-primitives and smoothui were rejected — both are shadcn-style React kits requiring Tailwind CSS (v4 for smoothui) plus Motion, and this UI is Astro islands + CSS Modules + Base UI with no Tailwind. They remain pattern references. Standing rules: one authored motion moment per surface, everything behind prefers-reduced-motion, and no motion inside the slide canvas.

Filed todos/workstation-redesign.md for the chrome rebuild, which runs against brief 59 rather than before it.

Still not done, unchanged from the last entry: root CLAUDE.md carries the pre-pivot constraints (Ollama-only, the Sharp ban, one-post-per-day), and PRODUCT.md/DESIGN.md remain at the repo root rather than in the corpus.

[2026-08-27] decision | The Mechanical pinned; three alternates re-rolled under a "more structure" steer​

The owner picked The Mechanical — the paste-up board — from the first round and asked for the other three to be reloaded with more structure. A pin beats the roll, so it leads and is no longer up for re-decision; what remains is confirm-or-swap.

The Mechanical came back raised by five donations from the declined hand, each written into the direction rather than left as a note: findings pin to their node on a leader line and carry the actual measurement; one universal diagonal means "held out" on every surface; every slide renders at one fixed scale on a shared baseline, with a registered overlay to compare two; selection is physical promotion rather than a highlight; and one grid governs everything. A second surface was drawn — the post library as a flat file of boards, where drafts keep their tissue corner, published boards carry the stamp, and a board that won't compile wears the same rubylith the editor uses.

Three replacements were dealt, all in the same physical-production family and each enforcing structure through a different mechanism: The Forme (letterpress lock-up — nothing floats, empty space is visible wooden furniture, lock-up is publish), The Wire Desk (teleprinter fanfold — structure by fixed character pitch, two ribbon colours with red reserved for errors, and the only world that already knows what to do with the RSS side), and Page 101 (broadcast teletext — every glyph on one lattice, three-digit page addresses as navigation, a fastext action bar). A hybrid was also put on the table: keep the board, adopt the furniture rule as its layout law.

Declined this round — tensegrity column, industrial quote grammar, botanical folio, console void, live ASCII render — with each one's discipline extracted before it left; those are the five raises above.

One finding worth carrying whatever wins: teletext's eight colours give five usable text colours on black, not eight. Blue fails contrast outright; green and red are only safe at weight. Any state system built on that palette is a five-slot system.

Corpus updated: wiki/open-questions.md now frames the question as confirm-or-swap and carries the alternates and the raises; wiki/status.md records the pin; todos/workstation-redesign.md lists the five layout rules that ship with The Mechanical if it stands. DESIGN.md and PRODUCT.md's brand section still wait on the confirmation, by design.

[2026-08-27] decision | The Mechanical chosen; DESIGN.md rewritten, brief 64 filed​

The owner confirmed The Mechanical — the paste-up board — as the workstation's visual world. The round is closed.

DESIGN.md was rewritten in full, derived from the approved comps rather than from intentions: every colour, shadow and type value in it was measured off a rendered screen. The system in one line — a 26px non-photo blue grid under everything, the slide inside crop marks and register targets, the markup waxed on as a galley, the inspector on a tissue overlay that hinges off the canvas.

Four things in it are load-bearing and easy to undo by accident, so each is written as a named rule: border-radius is 0 throughout; the blue grid may carry alignment and never information (The Non-Photo Rule); state is a mark — rubylith, wax, stamp, tissue corner, hatch — with one mark per idea and never a second treatment elsewhere (The One Mark Rule); and the chrome face is Archivo, with Inter confined to the rendered slide, because that separation is what keeps the artwork legible as a made thing.

One correction fell out of measuring the build: #7a7a76 reads 4.0:1 on board and therefore cannot carry text. #6d6a62 is now the ink floor, and #7a7a76 is demoted to rules and ticks.

PRODUCT.md's brand personality section — deliberately left open when the file was rewritten earlier today — is filled in: flat, marked, square. An anti-reference was added for the failure mode this world is most exposed to: the board wearing a costume, where a rounded corner or a coloured status pill turns it into a generic dashboard with production marks sprinkled on top.

todos/workstation-redesign.md is promoted to brief 64, which owns the tokens, the shared primitives, the tray, the mark set, the two fonts, and animejs. It runs after briefs 59 and 62 — the editor's structure is what the world has to clothe, and styling a layout that is about to change wastes the work. Its acceptance criteria include one that matters more than the rest: a re-render of an existing post must be byte-identical, because assets/design-systems/ is out of scope and the 1080² output does not change.

The open question "which visual world does the workstation move to" is deleted from wiki/open-questions.md; the remaining themes question now says explicitly that it concerns the slide family, not the chrome.

[2026-08-27] done | brief 51 — the AI surface is gone​

Wave 1 of the Wizard rebuild. core/src/compose/**, the Ollama client, the /prompt page and data/prompt.md, slide-level AI, and generated captions are deleted. Settings is now { defaultTheme: string }.

Gates verified from the controller against the integrated tree: build passes, 142 tests pass (down from 179 — every removed test covered deleted code, and the two Ollama-masking tests were replaced with defaultTheme round-trips rather than dropped), lint clean, grep -ri ollama over core/src api/src ui/src returns nothing.

The executed wave order differs from the one originally filed. Dependencies alone were not enough: several briefs collide on files the DAG does not show — core/src/types.ts (51, 52), core/src/index.ts (51, 53, 58), .env.example (55, 56), the nav/sidebar (58, 62, 64), and ui/src/components/editor/ (56, 59). The order is now 51 → 52‖53 → 54‖55‖56‖60 → 57‖58‖61 → 59 → 62 → 64 → 63, and two lanes were assigned to keep parallel waves disjoint: 55 owns .env.example and 56 reports its vars for the controller to add; 56 stays core+api only and 59 builds the image picker.

One deliberate deferral: EditPanel.tsx still calls the deleted POST /api/slide-ai. It was on 51's must-NOT-touch list, and removing the calls properly means deciding what cross-family variant switching does without an AI remap — a design question. Brief 59 rebuilds that directory wholesale and owns the answer.

[2026-08-27] done | briefs 52 + 53 — the schema and the language​

Wave 2, run in parallel. Gates verified from the controller against the integrated tree: build passes, 361 tests pass (up from 142), lint clean.

52 landed schema v3 — users, markup-backed posts with a CHECK-constrained draft/published status, keywords/post_keywords, renders, uploads, and reworked sources/articles. The migration drops every v2 posts and articles row on purpose: a v2 post held a composed payload with no markup to derive it from, and v3 persists only the articles you save. settings survives.

53 landed the Wizard language with no new dependency: a hand-written recursive-descent parser, a canonical formatter, eleven lint rules, a data-shaped component catalogue, and 170 tests. Two properties were built in for downstream work — every AST node carries a source range verified against its own source slice, and the catalogue is data rather than code, so brief 59's bidirectional selection and its inspector both have something real to read.

wiki/markup.md was rewritten to match what shipped. The substantive change: the page said props take "a value from a named scale or a short enum", which cannot express <Image src="...">. The catalogue now separates scale props (size/align/emphasis — still the only enums) from content props (Image.src required, Image.alt, Quote.by, Stat.label). The invariant that matters is unchanged and now asserted by a test: no prop ever carries a style value, and there is no style or class anywhere.

[2026-08-27] incident | npm test was destroying the developer's database​

Found while integrating wave 2, and older than the rebuild. api/src/server.test.ts has always set NEWSPAPPER_DB_PATH to a temp directory, and defaultDbPath() in core/src/storage/db.ts never read it — it resolved from import.meta.url unconditionally. So every npm test run opened and migrated the real data/newspapper.db, while the test file's own header comment claimed "the DB is ephemeral (in-memory via temp path)".

Harmless for as long as migrations were additive. Brief 52's v2→v3 migration drops posts and articles, so the first test run after it landed destroyed the dev database's contents — 1 post and 33 articles. data/ is gitignored, so nothing was lost from the repo, and settings and sources re-seeded correctly.

Fixed: getDb() resolves NEWSPAPPER_DB_PATH first and falls back to the repo path only when it is unset, with a regression test asserting the override is honoured. Recorded in wiki/decisions-engineering.md.

The lesson generalises past this bug: a harness that sets an environment variable is not evidence that anything reads it.

[2026-08-27] lint | the ui/lib/types guard test never existed​

wiki/decisions-engineering.md claimed "a guard test keeps it that way rather than trust" of the hand-maintained ui/src/lib/types.ts mirror of core/src/types.ts. Grepping for it returns nothing. The copy held for 2.5 months on discipline alone; brief 52 then changed Article and added seven interfaces, and the mirror drifted silently. The entry is corrected, and brief 58 — which owns that file — has to both re-sync it and write the test the corpus has been claiming for months.

[2026-08-27] done | wave 3 — briefs 54, 55, 56, 60 in parallel​

Gates verified from the controller against the integrated tree: build passes, 546 tests pass (up from 361), lint clean, and every new source directory confirmed tracked rather than gitignored.

54 compiled the language to TNode. Two compile paths, deliberately: the strict one lints and throws for the render pipeline, the forgiving one degrades in place for the live preview, because a document is broken most of the time while you are typing it. The compile is browser-safe, which is what makes brief 59's "no second copy of style resolution" achievable rather than aspirational.

55 landed auth. Two questions open-questions.md had left open are now answered, and both went against the brief's own suggestion for good reasons — see decisions-engineering.md. It also found /output/* serving rendered slides to anyone who asked, and put them behind the guard.

56 landed uploads. The security work is in the brief's outcome note; the transferable lesson is the .gitignore one. uploads/ unanchored also matches core/src/uploads/, so the entire new module would have gone invisible to git while building and testing green — and shipped as "done" until someone cloned the repo. Anchoring it to /uploads/ fixes it, and the wave gate's tracked-not-just-on-disk check is what catches this class of thing.

60 turned scrape() into searchArticles() and stopped persisting scrape output, which let all six of brief 52's deprecated article shims be deleted. /sources is gone, folded into /articles.

Two controller-lane integrations, because parallel briefs could not both edit the files: the uploads route registration into api/src/server.ts, and UPLOADS_DIR/UPLOADS_BASE_URL into .env.example.

One deviation worth recording: brief 60's "start a post from this article" step was withdrawn at dispatch rather than implemented. It is genuinely undecided and the editor brief owns it; open-questions.md records that the API already carries what it would need.

[2026-08-27] done | wave 4 — briefs 57, 58, 61​

Gates verified from the controller: build passes, 526 tests pass, lint and corpus lint clean, grep -rw TemplateDoc returns nothing, the render path is JPEG-only, and the new guard test genuinely executes.

57 moved rendering to JPEG and added the publish optimization pass. It also closed a security gap nobody had filed: <Image src> was resolved to a URL for Chromium without checking that it was an upload ref, so a smuggled http:// or file:// would have had the render browser fetch it. resolve-images.ts now drops anything that is not a valid ref, at the render boundary as well as in the resolver. Quality 85 was chosen by looking at zoomed crops of real type, not by comparing file sizes.

58 retired the template system. Two deletions beyond the brief, both forced and both right: api/src/routes/preview.ts had nothing left to do once the compile became browser-safe, and GET /api/themes had to be extracted to its own route first because it was never part of the registry.

The ui/src/lib/types.ts guard test the corpus had claimed for months now exists, built on the TypeScript compiler API so it diffs exported shapes rather than text. Building it turned up a second silent failure: ui/**/*.test.ts was not in vitest.config.ts's include list, so the test would have existed and never run. Same family as the .gitignore incident — green because nothing executed.

61 shipped the two sibling palettes and enlarged the type ramp for the 1080² canvas, with contrast measured rather than asserted. It correctly refused two items and they are now brief 65.

[2026-08-27] todo | brief 65 filed — the theme family is not finished​

Two things brief 61 could not reach from inside assets/design-systems/**.

The size prop is currently a lie for Heading and Stat. WZD_TYPOGRAPHY_SCALES maps component + size to a token name, and it maps Heading lg and xl to the same display token. So a person writes size="xl", the linter accepts it, and the slide does not change — no theme ramp can fix that. The controller routed brief 54's finding to 61 on the assumption it was a theme gap; it is half a theme gap and half a code one.

The rename never happened, so the repo ships four themes where decisions.md says three. warm-industrial → warm-industrial-1 touches ~15 hardcoded call sites, the posts.theme column default, and existing rows — a data migration, which a junior-scoped brief was right to refuse rather than improvise.

Brief 65 also picks up the every-theme missingThemeTokens acceptance test that 61 verified by script but could not commit, since it belongs in core/src/**. It runs in wave 5 beside the editor; their file sets are disjoint.

[2026-08-27] resume | paused mid-wave-5; resume point written​

Paused at the user's request. Nine of fifteen briefs are done on wizard-rebuild at fd96b9f, whose gates were re-run in the same turn this was written: build passes, 526/526 tests, lint clean, corpus lint clean.

Briefs 59 and 65 were in flight when the pause came, which is the one state the wave gate is designed to avoid. Brief 59 had already deleted the pre-pivot editor without landing its replacement, so the working tree did not build, and neither agent had produced a Handoff report — without those there is no record of what either intended.

Rather than leave that for a fresh session, both agents were stopped, the partial diff was committed to a dead-end branch wave5-partial-abandoned (11d78f8, 30 files, +688 −1891) so nothing is destroyed, and wizard-rebuild was returned to fd96b9f. 59 and 65 get re-dispatched from their briefs, not resumed.

The resume document was resume-2026-08-27.md (deleted 2026-08-31), linked from index.md and wiki/status.md. It carries the wave plan and why it differs from the filed one, the file-ownership collisions and the two lanes assigned around them, the ruling ledger, the two live defects (both filed as brief 65), and the three "green because nothing ran" incidents this run turned up.

[2026-08-31] done | wave 5 — briefs 59 and 65, after the pause​

Re-dispatched from a clean tree rather than resumed; the abandoned partial work from before the pause was not salvaged. Gates verified from the controller: build passes, 619 tests pass (up from 526), lint and corpus lint clean.

59 landed the editor. The preview needed no server route — it runs in the browser off the same compile the renderer uses, via a new "./wizard" browser-safe subpath. The guarantee is mechanical rather than promised: a test asserts the preview's tree equals core's compile() output across every sample fixture, so the two cannot drift apart silently. Selection is a path, not an offset, because a reformat moves every offset. api/src/routes/posts.ts was rewritten from the dead v2 payload contract to schema v3 — it had been calling a stub that throws.

65 fixed the size="xl" no-op at both ends and landed schema v4 for the theme rename. The migration rebuilds posts to change its column default, which meant discovering that with foreign keys on, DROP TABLE posts cascades and takes post_keywords and renders with it. That was probed against a real SQLite file before the migration was written, and FKs are dropped and restored in a finally.

The type ramp was extended upward rather than re-centred, so md — the default every existing post uses — is unchanged. A re-centred ramp would have silently reflowed every slide already written.

[2026-08-31] decision | use-gesture handles pointer interaction​

Adopted mid-flight at the owner's request while brief 59 was running, which replaced a half-built HTML5 drag-and-drop before it spread. @use-gesture/react 10.3.1, MIT, one dependency.

It passes the test motion-primitives and smoothui failed, for the same reason those were rejected: it ships no styles, no components and no rendering opinions, so it brings no second styling system. A library that only reads input is cheaper than a component kit. It does not overlap anime.js — one turns pointer events into deltas, the other turns values into motion over time.

Recorded in wiki/decisions-engineering.md. The constraint it does not relax: drops are still slots between existing children, never free positions.

[2026-08-31] todo | brief 66 — the rendered slide is in the wrong typeface​

Found by brief 59 while verifying end to end. Every rendered JPEG comes out in a serif fallback while the preview of the same document shows Inter. The tokens are right, the font serves 200 with its full bytes, and the preview is correct — so the compile, the tokens and the static serving are all fine. Headless Chromium is screenshotting before the injected @font-face resolves.

This is a shipping-quality defect rather than a polish item: the product is one square image and it is currently being published in the wrong face. Brief 59 could not fix it — core/src/render/** was outside its ownership.

[2026-08-31] incident | the UI workspace was never typechecked​

Brief 59 left a dangling import in ui/src/components/wizard/Wizard.tsx and reported it rather than fixing someone else's file. Chasing it down showed the import was not the interesting part — no gate in this repo would have caught it.

core and api build with tsc --noEmit. ui built with astro build alone, which bundles from page entry points and tree-shakes; nothing imports Wizard, so the file was never reached. Running tsc -p ui by hand caught nothing either, because ui/tsconfig.json set the deprecated baseUrl and that config-level error aborted the run before a single file was checked.

Fixed the tsconfig (dropped baseUrl, added types: ["node"] so the eight UI test files importing node:fs/node:url resolve), which took the error count from 9 to 1 — the remaining one being the dangling import itself. Added a typecheck script to ui. Brief 62 deletes the wizard directory and wires typecheck into the root build chain, since wiring it before that deletion would put the build red.

Third instance of the same failure this run, after the .gitignore pattern that would have hidden a whole module and the vitest include that would have kept the new guard test from ever executing. The pattern is worth naming: green because nothing ran. A passing command is not evidence of coverage, and the cheap check is to ask what the tool actually reached.

[2026-08-31] brief | 62 lands: the page map, the posts API, and /api/renders​

Wave 6 done. The four-step wizard is gone from the UI entirely — wizard/, history/ and export/ deleted, /history left as a redirect to /posts for one release. The page map is now / · /posts · /articles · /settings · /login. Posts gained create, a status flip, and list filters; GET /api/renders is new so /posts can draw a thumbnail per row in one request rather than N.

Two things worth keeping. An unknown theme is now rejected at save time on both PUT /api/settings and the post write paths — it used to be stored happily and then thrown on by loadTheme at the next render, so a bad save surfaced two steps later, on a different screen, as a render error. And /api/renders reads the run directory rather than reconstructing filenames from slideCount, because a pre-brief-57 run holds 1.png and a cleaned-out run holds nothing: the library has to show what is on disk, not what the row claims.

Gate: build, 630 tests, lint, tsc -p ui at 0 errors, corpus lint.

[2026-08-31] corpus | api.md rewritten from the routers; the deferred pages caught up​

api.md's Posts section had been describing the dead v2 { payload } contract, and Renders, Publish and the JPEG output path were undocumented. Rewritten by reading api/src/routes/*.ts, not from memory — which is what brief 62's acceptance asked for and is the only way this page stays true.

Also folded in the two updates brief 59 deferred: modules.md now documents the @newspapper/core/wizard subpath (and why there are two compile paths), and dependencies.md carries @use-gesture/react@10.3.1 with the reason it replaced HTML5 drag-and-drop. dependencies.md's UI rows still named the wizard, builder, history and prompt islands, all of which have been deleted.

A note on provenance: the implementing agent's handoff was lost with the session's task registry, so brief 62's outcome note is reconstructed by the controller from the diff and the routers. The note says so at the top.

[2026-08-31] brief | 66 fixes the render typeface — the cause was CORS, not a race​

Every rendered JPEG was coming out in a serif fallback while the preview of the same document showed Inter. The brief guessed a timing race — Chromium screenshotting before @font-face resolved — and that guess was wrong.

page.setContent leaves the render document on an opaque origin, so the font fetch goes out with Origin: null. Font fetches are always CORS-mode, the API's allowlist is the two UI origins, and so the bytes arrived complete (200, 407 kB) with no Access-Control-Allow-Origin and Chromium threw them away. That is why the font looked served and the bug looked like a render bug. The tell nobody had looked at: FontFace.status === 'error', with document.fonts.status already 'loaded' — an errored face is a settled face, so fonts.ready resolves immediately and waiting on it changes nothing. Measured: byte-identical output with and without the wait.

The fix serves the fonts from disk via route interception. data: URIs were rejected — six weights injected per slide, ~547 kB each as base64, ~3.3 MB for a document that uses two or three faces. Cost of the fix: +26 ms per slide.

Worth generalising: an assumption inherited from the bug report is still an assumption. The brief stated the hypothesis as near-settled and it survived into the dispatch prompt unchallenged. What broke it was insisting on a failing test first — reproducing the defect surfaced the console CORS error that no amount of reasoning about the render lifecycle would have produced.

[2026-08-31] corpus | decisions split; the wizard module surface moves to markup.md​

Two pages hit the 200-line cap in one session, which is the signal to split rather than to shave prose.

decisions-engineering.md gave up its four security entries — lockout, password rotation, and what is guarded versus deliberately public — to a new decisions-security.md. They cohere on their own and share one premise worth stating at the top of that page: the app runs on loopback for one person, and that assumption is the first thing to revisit if it is ever exposed.

modules.md handed the wizard module surface to markup.md, which already documents the language it serves, and kept a pointer. Someone asking what @newspapper/core/wizard exports and someone asking what .wzd is were being sent to two different pages.

Also filed brief 67 from a brief-66 finding: the slide's typography tokens carry a bare "fontFamily": "Inter", emitted inline where it outranks the interpreter's body stack — so a font failure lands on serif rather than the intended sans. Latent, but it is why brief 66's defect looked like a render bug.

[2026-08-31] brief | 64 lands: the chrome is The Mechanical​

The app no longer wears v3's design system. global.css replaced wholesale, every shared primitive rebuilt square, Badge/Stepper/Spinner deleted, and the sidebar rebuilt as the tray. Verified: zero --radius* tokens and zero non-zero border-radius in ui/; Inter appears only inside .canvas; core/, api/ and assets/ are byte-identical, so the 1080² output is unchanged.

The part worth keeping is that five values from the approved comps did not survive contrast measurement, and were corrected in the build rather than shipped. Chiefly: rubylith #e8452e cannot carry a word — 3.81:1 on board, and the comps' own stamp ink was 3.09:1. A darker --rubylith-ink #c0331f (5.43:1) is now the only rubylith that may be a letter, with the film kept for washes and borders where the 3:1 non-text floor applies. The comps also claimed graphite-tint was 4.0:1; it measures 4.16:1. An approved comp is a design decision, not a measurement, and the difference only shows up if someone measures.

prefers-reduced-motion could not be emulated in the browser session, so it is guarded by a test that stubs matchMedia and asserts the reduced path calls utils.set with the end state and never calls animate. Stated plainly in the outcome note: the 26px grid was measured at 1280px only; the ≤768px branch is written in grid multiples but unmeasured.

[2026-08-31] finding | npm run fmt rewrote 106 files — a fifth "green because nothing ran"​

Found by running it on a working tree during brief 64's gate, expecting a no-op.

There is no Prettier config anywhere in the repo — no .prettierrc, no prettier key. So the documented npm run fmt formats with Prettier's defaults, which means double quotes, against a codebase written entirely in single quotes. It also exits 2, because its glob names .astro files and no prettier-plugin-astro is installed. And npm run lint covers only core/src and api/src — the ui workspace, now the largest surface in the repo, is never linted at all.

The blast radius was instructive. Reverting core/ and api/ was clean, but ui/ held brief 64's uncommitted work, so the noise could not simply be checked out. Recovery used Prettier as an oracle: for each changed file, format the committed version and compare to the working one — equal means the only change was mine, so revert it. That cleanly separated 31 noise files from 23 real ones.

It also surfaced a booby trap: ui/src/lib/types.test.ts compares the source text of each mirrored declaration against core/src/types.ts, so it is formatting-sensitive and fails the moment one side is reformatted and the other is not. That is how the whole thing was noticed. Filed as brief 68, with the question of whether that test should compare shape rather than text.

Filed brief 69 for two loose ends brief 64 correctly declined to fix: the orphaned 616-line SourcesIsland (no /sources page since brief 60; it is a tab of /articles now), and kitchen-sink.astro, which is unlinked but ships to dist/ as a public route.

[2026-08-31] corpus | chrome.md split from design-systems.md​

design-systems.md sat at 199 body lines against a 200 cap and described two systems that share nothing on purpose. The Mechanical moved to its own chrome.md; design-systems.md keeps the slide themes and the compile target, with a pointer across. Third page split this session, after decisions-security.md and the wizard surface moving to markup.md.

[2026-08-31] brief | 67 + 69: the font fallback stack, and two loose ends in ui/​

67 put the slide's fallback in the interpreter rather than the theme tokens. The deciding argument: the criterion is "correct for any theme on disk, including one added later", and that is a property of the emitter, not of the files — in the token it would depend on every future theme author remembering, and the guard could only report the omission after the fact. The objection that a token should be the literal CSS value does not survive contact with resolveStyle, which already kebab-cases keys, dereferences $color.primary, and appends px. Themes opt out by authoring their own generic.

The 1080² output was proved unchanged rather than argued: 48 slides hashed before and after, 0 differing — with 48 of 48 HTML documents differing. The second number is what makes the first mean anything.

69 moved SourcesIsland into articles/ as SourcesPanel with a real CSS module, and gated the kitchen sink to dev instead of shipping or deleting it. The gating reason is the good one: it is the only page that renders with no session at all, because it calls no API and so never triggers the 401 redirect — measured, not assumed. Fine on loopback, but that is an argument with a known expiry date. The move also turned up a nested ToastProvider mounting a second viewport inside the first (invisible, since both sat at the same position) and 90 lines of dead code nothing rendered.

Equivalence was measured, not eyeballed: 10,051 computed properties across 19 elements, zero differences, plus a byte-identical kitchen sink.

One regression from brief 64 was caught by that measurement and fixed inline: .tab:hover at (0,1,1) out-ranked .tabActive at (0,1,0), so hovering the active tab painted graphite on graphite — 1:1, the label gone.

[2026-08-31] finding | a guard that rests on a quoting convention — the sixth of the kind​

Brief 67's first cut emitted 'Inter',sans-serif — quoted, to match the body rule — and brief 66's typeface guard failed.

The cause is worth the entry. fonts.test.ts builds its no-Inter control with html.replace(/'Inter'/g, …), which works only because the inline styles are unquoted: the rename hits the @font-face rule alone and leaves the text asking for a family nothing defines. Quote the inline family and the rename takes it too, so the text asks for the renamed face, the @font-face still loads it from the real TTF via brief 66's disk route, and control and subject become the same document. The test's own comment claims it renames the family everywhere; it does not, and it works because it does not.

It failed closed, which was luck. A guard whose control can silently collapse into its subject is the same shape as every green because nothing ran entry above — six now. The lesson is narrower than "test your tests": a control should be structurally incapable of the thing it controls for, not incapable by side effect of a regex. Filed as brief 71, with the unescaped styleToString interpolation brief 67 also found.

For now withFallbackFamily passes authored families through verbatim and appends only the tail, and the reason is in its doc comment — where the next person reaching for quoting will find it before the test does.

[2026-08-31] decision | Astro is being replaced by Vite + React (brief 70)​

Requested by the owner. The assessment that justified filing it: all 360 lines of .astro are shell, five of six pages are 8-line files mounting one island, every island is client:load so there is no partial hydration to lose, and the app is entirely behind auth with no SEO surface. Astro's reasons to exist are all unused here.

The two genuinely Astro-shaped things — ClientRouter and the tray's transition:persist — exist to keep the sidebar mounted across navigation, and in an SPA the tray simply never unmounts. They disappear rather than needing replacements. api/src/server.ts already falls back to index.html for non-API GETs, so deep links are already served.

Ordered after 68 so the migration's new code is the first ui/ code this repo has ever actually linted, and before 63, since documenting Astro immediately before removing it would waste the pass.

[2026-08-31] finding | npm run lint had never linted anything — the seventh, and the worst​

Brief 68 was filed to fix three things in package.json. It found a fourth in eslint.config.js: the file registered the TypeScript parser and plugin, then set no-unused-vars, @typescript-eslint/no-unused-vars and no-undef all to 'off' and imported no recommended config. Zero rules were enabled. npm run lint has reported green for this project's entire history while checking nothing.

Verified rather than accepted: a file containing a plain unused variable draws exit 0 and no output from the old config, and an error from the new one.

This is the seventh green because nothing ran, and it differs from the other six in kind. Those were tools pointed at the wrong place — a DB path nothing read, a .gitignore pattern, a vitest include, a workspace that was bundled but not typechecked, a fmt with no config, a test control that collapsed into its subject. This one was configured to do nothing, which no amount of pointing it correctly would have fixed.

There was a tell, and it had been sitting in the tree: SourcePane.tsx:114 carries an eslint-disable-next-line react-hooks/exhaustive-deps for a rule that did not exist. A disable comment is evidence that someone expected a rule to run. Worth grepping for suppressions of rules a config does not define — it is a cheap check and it would have caught this.

Only 16 findings appeared once the rules were real, all resolved. Ten React Compiler findings are suppressed at config level pending brief 72, because every fix restructures an effect and brief 68 was tooling-only.

[2026-08-31] brief | 68 + 71: the tooling actually runs, and the guard actually guards​

68 landed { singleQuote: true, printWidth: 100 }, derived by measuring — a search over 12 Prettier options against all 158 committed files, scored by files already clean. Prettier's defaults, which npm run fmt had been using, scored 1 of 158. The chosen config scores 88 and sits at the minimum of the changed-line curve. Picking a house style by preference would have made the diff a matter of taste; measuring made it a matter of fit.

npm run build now runs fmt:check first, with the cost stated honestly: an agent running build for type feedback mid-refactor hits a formatting failure before any type error. Accepted, because a formatter nobody runs is how 106 files drifted.

.astro was dropped from the fmt glob rather than plugged, since brief 70 deletes every .astro file. That requirement — and carrying fmt:check forward through the build-script rewrite — is now written into brief 70, because a migration that quietly drops either would undo this within days.

71 rebuilt the typeface guard's control so it is structurally incapable of loading Inter, and checks that on the product: assertCannotLoadInter throws unless the finished document contains no @font-face and no occurrence of inter in any case. The agent then demonstrated the guard failing by neutering the disk route, and ran the quoting experiment — which caught a real defect in its own first cut, where a delete-based regex ate the inline declaration under a quoted family. The pixel guard still passed; only the structural test caught it. The same failure one level up, which is exactly why the experiment was worth doing rather than asserting.

[2026-08-31] corpus | decisions-tooling.md split out; third split this session​

decisions-engineering.md hit the 200-line cap for the second time today. The seam that had formed was between runtime and library calls and calls about the repo itself — workspaces and ESM, exact pinning, the enforced formatter, typechecking the UI. Those four moved to decisions-tooling.md, whose preamble notes that three of them exist because a tool was reporting success while reaching nothing.

Third split this session, after decisions-security.md and chrome.md. The pattern is worth naming: pages hit the cap when a second subject has grown inside them, and shaving prose to fit is how the second subject stays hidden.

[2026-08-31] finding | the api's upload test had an undeclared dependency — the eighth​

api/src/routes/uploads.test.ts imports sharp. api/package.json declared none. It had been resolving against the hoisted copy Astro pulled in as an optional dependency — so the moment brief 70 removed Astro, the file failed at import and contributed zero tests instead of fourteen.

Two facts, and the second is worse than the first. The api test had an undeclared dependency; and because it resolved to Astro's copy, it had been testing image handling against sharp 0.34.5 while production ran 0.35.4. Nothing announced either. Fixed by declaring "sharp": "0.35.4" in api/package.json devDependencies, matching core.

The general shape: a dependency that resolves only by hoisting is a test that passes by coincidence. Removing an unrelated package is enough to break it, and the version it silently binds to is whatever the accident supplied.

Also note the failure was loud — an import error, not a silent skip — but the signal still nearly got lost, because it surfaced inside a wave where two agents were editing concurrently and each reasonably attributed it to the other. It was resolved by checking git show HEAD:package-lock.json rather than by argument.

[2026-08-31] brief | 70 + 72: Astro is gone, and the hook rules are real​

70 replaced Astro with a Vite + React SPA. The whole .astro surface was 360 lines, five of six pages were 8-line shells, and every island was client:load — so nothing Astro offered was in use. Routing is ~95 hand-rolled lines over useSyncExternalStore; React Router and wouter were rejected because several components already navigate with window.location.assign and the editor writes ?post= with its own replaceState, and a router that owns history argues with all of that.

The moment worth keeping: the first cut had each page render its own <App>, and a DOM probe caught the tray remounting on every navigation — exactly what transition:persist had prevented, silently reintroduced by the migration whose premise was that it had become unnecessary. The premise was right and the implementation was not, and only measuring the difference showed it.

72 turned set-state-in-effect and refs back on and judged all ten sites: five fixed, five suppressed at the call site with reasons. The right split — a blanket rewrite would have been worse than the config blanket it replaced.

It also produced a caveat now recorded next to the rules: the React Compiler bails out silently on some components, proved by planting a blatant violation that drew no finding while sites in a sibling component in the same file were still reported. A clean lint run means "nothing found", not "nothing there".

[2026-08-31] corpus | CLAUDE.md's constraints were describing a product that no longer exists​

Found while chasing the sharp question. CLAUDE.md still said "Do NOT add Sharp" — a rule decisions.md had explicitly reversed on 2026-08-27, and which core/package.json had been violating ever since, correctly. It also still described Ollama as the LLM, the four-step wizard, one theme, PNG output, and /builder.

This matters more than an ordinary stale doc: CLAUDE.md is the first file every session reads, and the controller had been copying that dead Sharp rule into dispatch prompts all day. Constraints sections rot in the most dangerous direction — a wrong prohibition is obeyed silently and leaves no trace.

Rewritten: no LLM at all, Sharp allowed for images, exact pinning, ESM, and the enforced fmt:check/lint wiring. The Tests section now points at this log's "green because nothing ran" entries by name, since eight of them is no longer a curiosity. The remaining stale half — the pipeline diagram, the data table, the Architecture section — is brief 63's, which runs next.

Also moved the Vite/Astro decision from decisions.md to decisions-engineering.md: it is an engineering call, not a product-shaping one, and decisions.md was over the cap with it.

[2026-08-31] brief | 63 closes the rebuild: the docs describe the shipped product​

The last brief of the v4 rebuild. It found that several wiki pages did not merely lag the code but asserted things the code contradicts — compose as a core export and POST /api/compose in the pipeline (neither exists), schema v4 with a migration table stopping at v3, npm run build as "typecheck + astro build". In every case the agent believed the source and rewrote the prose.

The sharpest find: loadConfig() is exported from the core barrel and called nowhere, so seven documented environment variables are settable and inert. THEME is live only because settings.ts reads it separately. Anyone setting OUTPUT_DIR and expecting a change would have debugged nothing for an hour. Filed as brief 73 with three siblings — an infra/docker-compose.yml defining only an Ollama service for a product with no LLM, a root tsconfig.json pointing at an untracked src/, and an api start script naming a dist/ its build never emits.

DESIGN.md split into design.md and design-components.md with continuous section numbering, because nine source files cite "DESIGN.md §N" in comments. Renumbering to make each page start at §1 would have silently broken every one.

And it went one directory further than asked: corpus/CLAUDE.md's own constraints paragraph still said "Ollama only, no Sharp, one post per day" — the exact harm brief 63 existed to remove, sitting in the file that governs how the corpus itself is maintained.

[2026-08-31] corpus | the eight incidents get their own page​

green-because-nothing-ran.md collects every instance found during the rebuild, each with what the tool actually reached, how it was caught, and the cheap check that would have caught it sooner. Linked from CLAUDE.md, README.md, index.md, routing.md, overview.md, status.md, commands.md and configuration.md.

The reason it is a page and not a log thread: log.md is append-only history, and history is where a lesson goes to be forgotten. Someone about to trust a green command needs to find this in one hop from the entry point, not by reading a year of entries. The retrieval budget is index.md plus two or three pages — if a lesson cannot be reached inside it, it does not exist.

Worth stating once, plainly, since it is the through-line of this whole rebuild: most of the real defects were not in the code. They were in the things that were supposed to be checking it. A test harness setting a variable nothing read; a .gitignore pattern that would have hidden a module; a vitest include omitting a workspace; a workspace bundled but never typechecked; a formatter with no config; a test control that collapsed into its subject; a linter with zero rules enabled; a test importing a package it never declared. Every one reported success.

[2026-08-31] corpus | Sharp stops being a rule; the abandoned wave-5 branch is gone​

CLAUDE.md framed Sharp as a permission granted against a lifted ban. That was accurate history and the wrong shape for a constraints list: Sharp is an ordinary dependency doing an ordinary job, and a rule about it invites the next reader to treat it as contested. The two "X is allowed" lines collapse into one statement of what must not be added; Playwright and Sharp are named as what they are. The reversal itself is still recorded where reasoning belongs, in decisions.md and dependencies.md.

Worth keeping the general form: a constraints list should say what is forbidden, not narrate what was once forbidden and no longer is. The dead prohibition in that file was copied into five dispatch prompts before anyone noticed, and a permission phrased as an exception is the same hazard one step weaker.

Also deleted the wave5-partial-abandoned branch (11d78f8), kept since 2026-08-27 as a safety copy of the mid-flight work stopped when briefs 59 and 65 were interrupted. Both were re-dispatched from scratch and landed in f315e01, so the branch held nothing that is not superseded. It was never pushed.

[2026-08-31] maintenance | one CLAUDE.md, and the dead directories are gone​

corpus/CLAUDE.md merged into the repo-root CLAUDE.md under its Corpus section, and deleted. The two files had drifted into disagreeing — the corpus one still carried "Ollama only, no Sharp, one post per day" weeks after the root one was corrected, which is the specific hazard of a rule living in two places: fixing the copy you are looking at feels like fixing the rule. The merged section carries what the corpus file uniquely held — the layout, the full retrieval budget, the page rules, the source-of-truth ordering when code and wiki disagree, and the workflow table — deduped against what the root already said. Root CLAUDE.md is 181 lines.

Deleted, all verified unreferenced by anything live first:

  • corpus/resume-2026-08-27.md — the pause it documented was resolved on 2026-08-31 and its own banner said so.
  • plans/ — v2/v3 build plans plus a reference/ tree of nine slide-variant HTML specs and the old render TSX. The wiki called it "deliberate reference material", but it referenced the template system deleted in brief 58; it was reference for a thing that no longer exists.
  • infra/ — a single docker-compose.yml defining only an Ollama service.
  • Root tsconfig.json — extended by no workspace, named by no script, and pointing at a root src/ that turned out to contain zero files, only empty directories. That is why git never reported it: git does not track empty directories, so a v2 skeleton had been sitting in the working tree, invisible to git status, for months.

corpus/lint.sh's ABANDONED_ROOTS gained plans/, infra/ and corpus/CLAUDE.md, which is what made this safe: it named all ten stale references across six wiki pages and one brief immediately, instead of leaving them to be found later by a reader following a dead path. The check exempts log.md and briefs/done/, so history keeps its old paths and only live pages were rewritten.

Brief 73 was revised rather than closed — two of its four items (the compose file, the root tsconfig) were plain file deletions and are done; the two needing judgement remain, loadConfig and the api start script.

Worth stating: the cleanup was cheap because the linter already knew what "retired" meant. A stale-path check that you feed when you delete a directory turns "did I miss a reference" from a grep-and-hope into a list.

[2026-08-31] brief | 73 closes the backlog — and the brief was wrong about its own premise​

The last open brief. It said core/src/util/config.ts was dead: loadConfig() exported from the barrel and called nowhere, seven environment variables settable and inert. All true, and the obvious action — delete the file — would have been a serious regression.

Line 1 of that file is import 'dotenv/config', the only dotenv call site in the repo. The barrel imports the module, api imports the barrel, and that chain is the entire mechanism by which .env reaches process.env. Deleting it would have taken SESSION_SECRET, ADMIN_USERNAME, ADMIN_PASSWORD, PORT, NEWSPAPPER_DB_PATH, UPLOADS_DIR, UPLOADS_BASE_URL and THEME with it — with no throw and no log. The app would simply have booted on defaults, in production, with a default session secret.

That is instance nine, and it would have been built by hand inside the brief filed to prevent the other eight. It was avoided by measuring instead of reasoning: with a probe variable in .env, a script whose only statement was import '@newspapper/core' printed it; the same script without that import printed undefined.

The lesson is the inverse of the previous eight, and worth stating as its own rule: those were things that looked wired up and were not. This was a thing that looked dead and was load-bearing. Both are the same underlying error — inferring behaviour from the shape of the code instead of observing it. A module that exports nothing is the hardest possible case, because every tool that could have warned you is looking for references, and a side effect has none.

So the side effect is kept and promoted to the barrel's first statement, both sites carry comments saying they are load-bearing because they look removable, and config.test.ts guards both halves. The controller mutation-checked it: delete the barrel import and the test fails.

api's start script was deleted rather than fixed, on evidence — the agent compiled api and ran the result, which dies with ERR_MODULE_NOT_FOUND reaching into core, whose exports map points at raw TypeScript. Making it work means compiling core and re-pointing its exports, which breaks ui's Vite build against the source subpaths.

corpus/briefs/todo/ is now empty. Every brief filed for the v4 rebuild and everything it turned up is in done/ with an outcome note.

[2026-09-01] decision | a saved article is a reference, not a pipeline input​

Settled in a grilling session. The article library holds source material you write from; nothing derives a post from one, and nothing will. Copy and paste is the connection, and that is the answer rather than a gap.

Rejected: POST /api/articles/:id/start-post. It is genuinely cheap — the API already holds title and url, and the route would be additive — which is exactly why it kept coming back. It was in scope in brief 60 and withdrawn at dispatch, then handed to brief 59, which also did not build it. Twice specced, twice dropped, never once for a written reason. An idea that cheap and that recurrent will be re-proposed indefinitely until someone records why not.

The why: seeding a document from an article makes the article an input to a pipeline, and the pivot's whole point is that there is no pipeline. A post is written, not derived. The mechanism would be a template rather than a model, but the shape is the same shape v4 removed — and shapes are what come back.

Also added an Article glossary entry, which had none despite Post already listing "article" under _Avoid_. The term now carries its boundary: a reference, never an input.

[2026-09-01] decision | two design-spec gaps briefed, two dropped​

design-components.md §9 listed four things the chrome does not carry. Split: the scale-chip row and /posts as a grid of boards became brief 74; the thumbnail strip and the wax half of the compile animation were dropped.

The shared reason for dropping both: each requires inventing a structure to serve a decoration. There is no thumbnail strip in the editor to style, and "the changed lines take the wax briefly" needs the editor to retain a line diff purely so something can flash. §9 now records them as decisions rather than listing them as unfinished, because a permanent to-do list of things nobody intends to build is indistinguishable from neglect.

open-questions.md is now empty, with a note that an empty page is the goal state rather than a gap.

[2026-09-01] maintenance | a promoted todo is deleted when its brief lands​

corpus/todos/workstation-redesign.md had been sitting at status: promoted since brief 64 shipped. The convention had states open → promoted and then nothing, so a finished todo stayed in a terminal-but-unnamed state that reads as live work to anyone triaging the directory.

The workflow table's "Finish a brief" row now ends: delete the source todo. The brief plus its outcome note is the provenance — keeping both means two places to read and one to forget.

Also split decisions-authoring.md out of decisions.md, which hit the 200-line cap again. The seam that had formed was how a post is written — the .wzd document, semantic token-only components, flow layout, markup as source of truth, format-and-lint-like-JSX, the editor's data model — against product shape. Fourth split; the trigger each time has been a second subject growing inside a page, not prose bloat.

[2026-09-01] brief | 74 finishes the chrome — one chip row, and /posts becomes a grid​

Brief 74's two items are built, and §9 of design-components.md now records what remains rather than what was pending.

The chip row is a primitive. ui/src/components/ui/ChipRow.tsx — the scale-chip row §5 has always specified. It was open-coded in two places (/posts's keyword filter, /articles's panel switch) with near-identical declarations differing only in horizontal padding; both now import it, and the inspector's size/align/emphasis render through it instead of Select. Extracting was the call because the alternative — a third copy in the inspector — was the one the brief named as indefensible. The old CSS was transcribed out of git show HEAD: and rendered as a control beside the new control in a live browser: 0 differences across 20–25 computed properties per chip, plus rects, gutters and the row's bottom margin.

The narrow editor's pane switcher was called a chip row in a comment but is built from Buttons, and converting it would have both changed appearance and reached brief 59's three-pane layout. It stayed as it is; the comment is the only thing that was ever a chip there.

No rubylith chip. §5 gives a masking value a chip that inverts to rubylith. No scale in the catalogue has such a value, so the variant is not built — an unused variant is one nobody has looked at.

/posts is a grid of boards, auto-fill at a 13-unit minimum with a one-unit gutter: three across the 1092px column, two around 900, one below ~700, and min(…, 100%) so a 320px viewport does not overflow.

The breakpoint gap brief 64 left open is now half closed. 64 measured the grid at 1280px only. /posts was measured at 1280 in the real viewport and at 1024/900/768/600/390/320 in same-origin iframes: column count, gutter, equal board heights, chip-row overflow and document overflow all hold, and the thumbnail keeps its one fixed scale throughout. What that measurement found is a defect nobody had seen: the tray's compartments are a fixed 78px, so below ~440px /posts, /articles and /settings sit past the right edge with nothing scrolling to reach them. Recorded in §9, not fixed — the tray is not this brief's.

Contrast was re-measured rather than assumed: 107 text elements on /posts, 78 on /kitchen-sink, 0 below 4.5:1. The editor reports 11, all pre-existing and none of them chips — ten are the galley's syntax colours sitting on the wax of the selected line, and one is the deliberately transparent textarea over the highlight layer.

[2026-09-01] brief | 74: the chip row is a primitive, and the brief miscounted its callers​

Shipped both items. ChipRow now renders size, align and emphasis in the inspector — no Select left in the pane — and /posts is a grid of boards.

The dispatch was wrong about its own premise and the agent corrected it. It claimed three places open-code a chip row. Only two do; the third — the narrow editor's pane switcher — is <Button variant={...} size="sm"> in a flex, and only its CSS comment calls it a chip row. Converting it would have changed its appearance and reached brief 59's layout. So the extraction took chip CSS from two copies to one rather than, as instructed, to three. Worth remembering: a comment naming a pattern is not evidence the pattern is there, and the controller had propagated that comment into a contract.

Appearance was held by a control worth copying: for each adopted call site the deleted declarations were transcribed out of git show HEAD: into a live element beside the real one and computed styles diffed property by property — 0 differences across 3 chips × 25 properties and 8 chips × 20. A sanity assertion confirmed the control carried the old classes and the subject the new ones, so it could not collapse into its subject — the exact failure that bit brief 66's guard.

Brief 64's "measured at 1280px only" gap is closed for /posts — 1024 down to 320 — and the outcome says iframe-measured, not resized-window, because the tooling exposes no viewport control. Precision about method is the difference between closing a gap and appearing to.

[2026-09-01] finding | the tray is unreachable below 440px, and the galley fails on wax​

Both found by brief 74 while measuring what brief 64 could not, both verified by the controller, both filed as brief 75. Neither is a regression — they have shipped since brief 64.

The tray. Its @media (max-width: 768px) branch sets .cell--nav { width: 78px }, fixed. At a 390px viewport the last three links sit at x = 230/308/386 with width 78, and document.scrollWidth - clientWidth === 0 — so /posts, /articles and /settings are off-screen with no scroll to reach them.

The reason it survived review is the interesting part. Brief 64's outcome note says the ≤768px branch "is written in grid multiples but was never measured". It is written in grid multiples — 78 is 3 × 26 — and it is still broken. Grid-conformance is not fitting, and a rule stated in units invites the belief that satisfying the units satisfies the layout.

The galley. On the wax of the selected line, .punct/.attr measure 3.88:1 and .value 4.43:1. Brief 64 measured every colour against its own surface and each clears 4.5:1 on paper; they fail only in a state a once-per-element sweep never visits. --wax-ink #3d3416 measures 8.87:1 on wax and exists for exactly this — the design system already held the answer.

The generalisation for any future audit: a contrast sweep that visits each element once, in its default state, does not cover selected, hovered, disabled, or sitting on a highlight. That is now written into brief 75's scope.

[2026-09-01] brief | 75: the tray fits at 320, and the galley bug was bigger than filed​

The brief's premise was wrong in both directions, and only measurement found it. document.scrollWidth - clientWidth === 0 was true — but ul.cells was an overflow-x scroll container, scrollWidth 312 against clientWidth 82 at 390px and 12 at 320px. At 390 the three routes were reachable by an invisible, undiscoverable scroll; at 320 they were genuinely unreachable, confirmed by hit-testing after scrollIntoView. Worse than filed at 320, milder at 390.

Worth keeping: the scroll was not the missing fix, it was the bug's disguise. A container that technically scrolls, in a 12px window on a 78px strip, reads as "no overflow" to every check that asks whether overflow is handled. The check that found it asked a different question — can a person actually reach this — and hit-tested the answer.

The tray now divides into two courses below 640px, inside the same 78px strip, so --tray-h never changed and global.css was never opened. The grid survives where the spec put it: courses are 1 and 2 units, the strip is 3. Only the compartment width stopped being a multiple — and width was never in the spec, which dimensions a tray cell by height alone. That is the resolution to the "grid-conformance is not fitting" tension: the rule was over-read, not wrong.

The galley bug was bigger than reported. --wax-ink was not losing to two tokens; it was never applying anywhere. .text and .component were taking graphite at 10.17:1 on wax — which passes, so nothing flagged them, and the token existed unused. All eleven wax spans now measure 8.87:1.

The fix removes the cascade fight rather than winning it: every token colour is written at zero specificity with :where(), so the wax mark's own color: var(--wax-ink) wins regardless of module emit order. Emit-order dependence was the actual defect; a specificity bump would have left it one refactor from returning. The agent then re-ran the whole sweep against the production bundle, because dev and prod concatenate CSS differently — the precise reason that mattered here.

Measured in a real Chromium viewport via Playwright, twelve widths from 240 to 1280, and said so rather than implying it. Before/after full-page screenshots at 1280 are byte-identical on all four non-editor routes.

[2026-09-01] finding | the health mark breaks the chrome's own rule below 768px​

ApiHealthDot.module.css hides its label at max-width: 768px, so an offline API is signalled by a 6px red tick and nothing else — the 320px tray reads NEWSPAPPER … SIGN OUT –.

That contradicts design-components.md §5 by name: the ink is never the only signal — every tone has its own word. The whole reason The Mechanical uses marks instead of coloured badges is that colour alone is not a signal, and this is the one place the chrome breaks its own rule. The aria-label survives, so the loss is visual only — which narrows the fix without excusing it, since the person most likely to miss a dead API on a phone is someone glancing at the tray.

Filed as brief 76 with the judgement left open: keep the word, differentiate by shape, move the mark somewhere with room, or change the rule — but §5 and the code must agree at the end. A rule the code openly violates is worse than no rule, because it teaches the next reader that the rules are decorative.

[2026-09-01] ingest | a ninth instance, and the first that was not a tool​

Brief 74's agent, revisiting its own report after brief 75 landed, corrected finding #1 against itself — and the correction is the most transferable thing either brief produced.

Its reachability check was document.scrollWidth - clientWidth === 0. That returned true, and the conclusion drawn from it ("nothing scrolls, so the routes are unreachable") was nearly right for the wrong reason. ul.cells was an overflow-x scroll container — scrollWidth 312 against clientWidth 82 at 390px and 12 at 320px. The check asked whether the document overflowed; the question was whether the tray's own container did.

In its words: a check that passes because it never reached the thing. That is this repo's own pattern, arriving from a new direction — the first of the nine that was not a build tool but a measurement. The check was correct, the reasoning from it was correct, and it was aimed at the wrong object; nothing downstream of a mis-aimed check recovers it.

Added to green-because-nothing-ran.md as #9, with the rule it yields: for anything about what a person can see or reach, hit-test it — elementFromPoint, a real viewport, an actual click — rather than inferring from a container's own numbers. A scroll that exists is not a scroll anyone can find.

Counts updated in CLAUDE.md, status.md and the page's own summary. The page now opens by noting that eight of nine were tooling and the ninth was aim.

[2026-09-01] brief | 76: the health mark keeps its word by spending width only when it has news​

The chrome's last self-contradiction. ApiHealthDot hid its label below 768px, leaving an offline API as a 6px red tick — hue as the whole signal, in the one place §5 forbids it.

Settled in a design session before dispatch, because the obvious fix does not exist: the tick is 6 × 1px, so hatching it, filling it or reshaping it is invisible. Any hue-free distinction needs area, and hiding the word is precisely what removed the probe's only content. The grilling also turned up that the component had three states and two tones — loading and online both dim — so the word had always been the only thing telling "checking" from "up", at every width. And the 768px breakpoint was stale: brief 75 moved the tray's real squeeze to 640px, so between 641 and 768 the word was hidden for nothing.

Shipped: two states; below 640px nothing renders when up, tick + full word when down. The up word is clipped, not removed, so it stays in the accessibility tree at the width where the sighted view gives it up.

The verification is worth copying. Hue-independence was proved by screenshotting each tray strip in both states, converting to greyscale, and diffing pixel by pixel: before, the states differed by 6 grey pixels — the tick itself — and after, by 628. A greyscale diff answers the actual rule (is this distinguishable without hue) rather than the proxy question of whether a colour changed. The accessibility tree was read through CDP rather than inferred, and the pre-change component was built into its own production bundle for a 0-subpixel comparison at 1280.

The brief-72 eslint suppression was re-checked rather than carried: still required, but its stated reason named loading as "the honest first paint", and loading no longer exists. The reason was rewritten to match what ships — never leave a suppression whose reason no longer holds, working as intended.

Recorded, not filed: at 240px in the down state the widened session cell clips the wordmark to NEWSPAP. Below the 320px floor, h-scroll 0, every route reachable. Nobody had seen it because brief 75 measured the tray with the probe 6px wide — giving the probe a word to carry is what put the brand cell under a wide session cell for the first time. A measurement is only as general as the states it was taken in.

corpus/briefs/todo/ is empty again.

[2026-09-06] change | newspapper moves to Ward, and /uploads/* finally stops being public​

Identity is Ward's. Deleted: the stateless 30-day HMAC session cookie, SESSION_SECRET, the scrypt password check, the IP-keyed lockout, the users table (schema v5), POST /api/login, POST /api/logout, POST /api/password, the login page and the login island. Newspapper holds no credential of any kind.

The headline is not the cutover — it is /uploads/*. That route was config: { public: true } because headless Chromium fetches <Image> sources mid-render carrying no cookie. On loopback the exposure was bounded by 32 bits of ref entropy and an unreachable port; on the shared VPS only the entropy would have been left, and decisions-security.md named this as the first thing to revisit on exposure.

The expected fix was a render-scoped token, and the reason the original decision rejected one — "more machinery than a local single-user app earns" — really had stopped being true. It was rejected again anyway, for a better reason: the request can be removed rather than authorised. render/uploads-route.ts intercepts /uploads/* inside the render browser's own context and fulfils it from disk — which is exactly what render/fonts.ts already did for @font-face files, there for a CORS reason and here for a security one. The precedent was sitting in the same directory.

That is strictly stronger than a token. No new bearer credential exists, so there is no lifetime, no signing key, no leak path through logs and no revocation story to get wrong. The route stops being public at all, so a ref's entropy goes back to being an identifier instead of a security boundary. And rendering no longer depends on the API being reachable, exactly as fonts already did — it is also one fewer HTTP round trip per image per slide.

The cost is one coupling, and it is written down where it will be found: renderSlides now needs the uploads database handle, and a run that renders images without passing it produces blank images, because the fetch falls through to the network and gets a 401. That is the intended failure and it is loud; a silent fallback to an unauthenticated fetch is the thing that must not happen. render.test.ts's text-only fixtures pass nothing and are unaffected.

The lockout was removed rather than retuned. Tightening the numbers on exposure would have solved a problem newspapper no longer has: there is no credential here to brute-force. Login is Ward's, and Ward has its own lockout with its own budget — the right place for it, since a per-app counter would have guarded one of six front doors to the same accounts.

The guard grew a third outcome. 401 is no session; 403 is a live Ward session holding no newspapper grant, which must not redirect because signing in again cannot fix it; 503 is Ward unreachable or newspapper's own app key refused, which fails closed and is never reported as "signed out". The config: { public: true } route convention survived intact — it was a good pattern, and only what stood behind it changed.

Tests got a fake Ward client rather than stubbed guards (ward/fake-ward.ts), so the real guard decides. That is what makes ward.guard.test.ts's two most valuable assertions meaningful: a session holding only prm:user gets a 403, and an anonymous /uploads/:ref now gets a 401 rather than bytes.

595 tests pass, typecheck clean across core/api/ui. Nothing has been run against a real browser or a deployed Ward, and the rendering path in particular has not been exercised end to end — the interception is unit-shaped only.

[2026-09-06] done | A documentation site at /newspapper/docs, almost entirely rendered​

docs/ — Astro + Starlight, built by npm run docs -w @newspapper/docs-site, deployed at the estate's /<project>/docs convention.

Exactly one page is authored. This corpus already carries api.md, data.md, architecture.md, modules.md, configuration.md, commands.md and markup.md — the reference material a docs site would normally write for itself. Restating any of it would create a second copy to keep in step with the first, and the second copy always loses. So all 24 corpus pages are rendered on every build, banner-marked and gitignored, and the only hand-written page is an orientation index carrying the diagram. @newspapper/core's public barrel is TypeDoc'd alongside them.

The index deliberately points a first-time reader at green-because-nothing-ran.md before anything else, because a suite that is green because it never reached the code is the thing most likely to mislead someone picking this repo up.

One archify diagram of the compile pipeline, .wzd → HTML → Chromium → 1080² JPEGs, drawn so two facts are visible rather than asserted: the slide is a real DOM before it is an image, and RSS is a library to write from rather than a pipeline that produces a post. The third card records the /uploads/* fix — the request is removed rather than authorised, so no new bearer credential exists.

The docs are on the board. wiki/design.md §1's north star — the paste-up board — is enforced rather than quoted: zero radius everywhere (Starlight rounds code blocks, asides, cards and the search box by default; all squared off), the 26px non-photo blue grid printed under everything at an opacity that keeps it from competing with type, and only the two physical shadows — anything waxed onto the board gets the hard short one and nothing else gets anything. Asides carry a left rule in rubylith or wax rather than a tinted pill, because §1 says state is a mark, not a colour badge. Archivo and Spline Sans Mono, as in the app; code on the site is galley.

The workstation/artwork separation is respected: none of the warm-industrial slide palette appears here. These docs are board, graphite and marks.

595 tests pass. docs added to the root workspaces array; lint and fmt:check glob core/src, api/src and ui/src explicitly, so neither picks the docs workspace up.

Pre-existing and untouched: npm run lint reports one unused db binding and fmt:check flags three api/src/ward/* files. Both predate this change and are left alone.

[2026-09-27] todo | an improvements sweep files 26 briefs (77–102)​

A read-only audit across correctness, security, performance, coverage, debt and DX — five parallel finders plus controller vetting; ~40 raw findings, 26 filed after re-reading/reproducing each. Nothing in the code was changed. The backlog now sits in briefs/todo/.

The headline is security, and it is the first audit since newspapper left loopback for the shared VPS. Brief 77: the Ward guard tests the raw request URL while Fastify routes the decoded one, so GET /%61pi/posts and POST /%61pi/posts skip auth entirely — anonymous full read/write of the whole API on the public origin. Reproduced with app.inject against a fake Ward, no cookie. One-line fix (guard on req.routeOptions.url). Brief 85: RSS body fetch follows attacker-controlled feed links with no host allowlist (SSRF to loopback/metadata) and no size cap. Brief 79: the 500 handler echoes internal exception text.

The base-path work (HEAD) shipped half-done. Brief 78: post links use raw /?post= hrefs (off-app under /newspapper/) and thumbnails, the image picker and the live preview all request un-prefixed /output·/uploads URLs (every image 404s in production) — while lib/api.ts gets it right.

The Ward move's new code is largely untested (88 uploads-route interception, 89 the real Ward client — only the fake runs, 90 render route//api/me/UI), local dev cannot authenticate at all (84), a crash mid-migration bricks the DB (86, db.exec is not transactional), and the docs still describe the deleted login system and ship it to the public docs site (83).

Performance (measured): browser-launch race orphans a Chromium (92), no render timeout hangs the SSE forever (93), output-dir collision (94), N+1 + full-markup list payloads (95), sequential source fetch (96), full-res thumbnails (97). Plus: autosave races (87), a parser stack-overflow that blanks the editor with no ErrorBoundary (98), eight hand-rolled repo-root paths (99), advisory-carrying production deps (100), a publish-ENOENT status/path leak (101).

Housekeeping: bash corpus/lint.sh reports three findings, all false positives from a single stale ABANDONED_ROOTS entry — docs/ was retired to corpus on 2026-08-27 but re-added as the Starlight docs workspace on 2026-09-07, and briefs 83/100 are the first corpus files to reference it since. Brief 102 drops that one line; do it first to restore a clean lint. The sweep's tooling also left a stray untracked :memory: SQLite file in the repo root (a getDb(':memory:') from a scratch script resolving against the repo cwd) — safe to delete.

[2026-09-27] done | Brief 84 — local dev signs in through a local Ward; the root .env finally reaches npm run dev​

Neither of the brief's options: on the owner's call, local dev runs Ward's container and the UI dev server proxies /ward, /ward-api and the API's paths under /newspapper/, so the browser sees the deploy's single origin and the guard runs unchanged. Decision in decisions-security.md; setup in configuration.md ("Local sign-in").

A tenth green-because-nothing-ran, found on the way: dotenv/config reads .env from the working directory, and npm run dev runs the API in api/, so the root .env had never reached the dev server. Both dev scripts now load it with Node's --env-file-if-exists=../.env.

Browser-verified against the local Ward on a scratch database and upload store. 608 tests pass; build clean. npm run lint fails on a pre-existing unused db in api/src/server.ts:19, not touched here.

[2026-10-02] done | Brief 102 — the corpus linter stops calling docs/ abandoned​

corpus/lint.sh no longer lists docs/ as abandoned: the Starlight docs-site workspace re-created it on 2026-09-07. The other four retired roots were re-checked and stay. Lint is clean again with the full backlog in todo/.

[2026-10-02] done | Brief 77 — the guard decides from the matched route, closing anonymous API access​

The critical one. The Ward guard decided from the raw URL while Fastify routes the percent-decoded one, so /%61pi/posts reached the real handler with no session: anonymous read and write of the whole API on the public origin. It now guards on the matched route pattern as well (requiresSession), and nine new tests cover every encoded spelling the sweep reproduced. Static-plugin requests do carry a matched pattern (/output/*), which the encoded output test proves.

[2026-10-02] done | Brief 85 — RSS fetches: public addresses only, per-hop checks, capped bodies​

Feed item links, and feed URLs, are now fetched only to public http(s) addresses, with every redirect hop re-checked and bodies capped (2 MB for articles, 10 MB for feeds). Before this, a hostile feed could make the server fetch loopback or the metadata address and show the answer as an article, or stream it gigabytes. Injected fetch and DNS tests prove internal targets are never requested. A DNS-rebinding residual is documented in safe-url.ts.

[2026-10-02] done | Brief 79 — 5xx bodies are generic; three security decisions recorded​

5xx responses carry a generic body; the exception text stays in the server log. 4xx messages are unchanged. Also folded briefs 77, 85 and 79 into wiki/decisions-security.md as three new entries.

[2026-10-02] done | Brief 80 — npm run lint is green again​

npm run lint is green again: one unused import left by the Ward move.

[2026-10-02] done | Brief 81 — vitest collects .test.tsx too​

The vitest include globs match .test.tsx as well, before the first component test lands. A throwaway .tsx test was collected under the new glob and not under the old.

Post links, post and picker thumbnails, and the preview canvas's images carry the base path, so under /newspapper/ they stop leaving the app or 404ing. Vitest gained the UI's @/ alias so components are importable in tests.

[2026-10-02] done | Brief 86 — migrations are transactional per step​

Every schema migration step now commits with its user_version bump in one transaction, so a crash mid-rebuild rolls back to an openable, re-migratable database instead of one with no posts table. A test makes the real v3 → v4 rebuild fail between DROP and RENAME to prove it.

[2026-10-02] done | Brief 87 — editor saves are single-flight​

The editor's saves go through a single-flight queue (saveQueue.ts): one POST per new post, writes in order, and the last edit always the one that lands. The updated_at precondition was left for the owner's call.

[2026-10-02] done | Brief 100 — production dependencies carry no advisories​

Production deps carry no advisories: @fastify/static 10.1.5 (a major, no behaviour change found), fastify 5.12.5, and in-range transitive fixes.

[2026-10-02] done | Brief 101 — publishing with a deleted output folder is a clean 404​

Publishing a post whose render folder is gone answers a clean 404 instead of a 409 carrying the filesystem path; unexpected publish errors now go to the generic 500 handler.

[2026-10-02] done | Brief 82 — User is the real /api/me shape; UserRecord deleted​

The fossil UserRecord type is gone; User is now the real /api/me shape { subject, username } in core and the UI mirror, and the route is typed with it.

[2026-10-02] done | Brief 83 — the docs describe Ward, the VPS and the base path​

Documentation pass for the Ward, VPS and base-path moves: README, CLAUDE.md and ten wiki pages now match the code. Filed brief 103 for the dead Settings password form found along the way.

[2026-10-02] done | Brief 103 — Settings points at Ward instead of a dead password form​

Settings no longer shows a password form for a route that no longer exists; it points at Ward's account page instead.

[2026-10-02] done | Brief 88 — the render-time upload interception is tested end to end​

The render-time uploads interception is now tested end to end: a real upload renders red with the db and blank without it, traversals are not served, and the suite fails if the route glob or the interception is broken.

[2026-10-03] done | Brief 91 — one Chromium guard for every browser test, plus a CI workflow​

All five Chromium test files share one guard (skip loudly locally, fail under CI), verified in all three modes, and a CI workflow runs the full gate with CI=1. It has not run yet: nothing is pushed.

[2026-10-03] done | Brief 89 — the real Ward client is tested; a JWKS-outage bug filed​

The real Ward client is tested: signature and claim checks, introspection's fail-closed mapping, the cache and in-flight dedupe, each with a mutation that breaks it. A JWKS outage was found to answer 401 instead of 503; filed as brief 104.

[2026-10-03] done | Brief 104 — a JWKS outage fails closed with 503​

A Ward key-set outage now fails closed with 503 instead of telling the person they are signed out (401); token problems, unknown kid included, stay 401.

[2026-10-03] done | Brief 90 — the render route, /api/me, api() and the router base path are tested​

The render route (pixels from a real upload), /api/me's narrowing, the UI's api() wrapper and the router's base-path call sites are tested, each against the mutation it guards.

[2026-10-03] done | Brief 92 — the render browser can't be orphaned, and failed setups close their context​

The render browser can't be orphaned by concurrent launches (one shared in-flight launch, and close waits for it), and a render whose setup fails still closes its context.

[2026-10-03] done | Brief 93 — a stuck slide times out instead of hanging the render​

A slide that never settles (content or fonts) now fails within 20 s / 10 s with a clear error, closing its page and context, instead of hanging the render and its SSE stream forever.

[2026-10-03] done | Brief 94 — renders reserve their output directory when they pick it​

Two renders started together can no longer write into the same output directory: the directory is reserved (created) when it is picked, and a failed render removes its reservation.

[2026-10-03] done | Brief 95 — list routes: no N+1, no unused markup or bodies​

The post, render and article lists stop doing N+1 queries and stop shipping data the UI never shows: /api/posts 101 → 2 statements and 583 → 21 KB, /api/renders 301 → 1 statement, /api/articles 417 → 48 KB.

[2026-10-03] done | Brief 96 — RSS sources are searched four at a time​

RSS sources are searched four at a time instead of one after another: six 300 ms sources went from 1815 ms to about 600 ms, with identical results and error isolation.

[2026-10-03] done | Brief 97 — the post grid loads a small thumbnail​

The post grid loads a 220 px thumbnail made once at render time (about 21 KB) instead of each post's full 1080 px slide (150-950 KB); older runs fall back to the slide, and the export leaves the thumbnail out.

[2026-10-03] done | Brief 98 — the parser caps nesting; the editor has an error boundary​

A document nested thousands deep no longer crashes the parser (one diagnostic past 200 levels), and the editor sits in an error boundary, so one bad post can't blank the app or lock itself out.

[2026-10-03] done | Brief 99 — one module knows the repo root; OUTPUT_DIR override​

One module (core/src/util/paths.ts) now knows where the repo root is, and every root derives from it, with a new OUTPUT_DIR override. It is deliberately not NEWSPAPPER_OUTPUT_DIR, which compose already uses for the host mount.

[2026-10-03] check | Brief 99's Docker build, now that Docker is available​

The image builds (1.44 GB), and inside it core/src/util/paths.ts resolves the repo root to /app, output to the /app/output volume and the database and uploads under /data. Brief 99's one unverified item is closed.

[2026-10-04] change | Removed the GitHub workflow brief 91 added (.github/workflows/ci.yml): the owner wants no GitHub runners or GitHub-specific automation in any repo. The same gate is now npm run gate (build, test, lint, corpus lint with CI=1, so a missing Chromium fails it), run by hand or by the deploy.​

[2026-10-07] todo | brief 105 filed — the Reader, a FreshRSS-style zone for following, reading and clipping​

The owner pointed at FreshRSS and asked for a place in the app to see their feeds, read articles and find ideas for posts. Today RSS is only a keyword search that keeps nothing, so there is nowhere to just read.

Brief 105 stores feed items (schema v6), refreshes them in the background, and adds a three-pane reader at /reader that absorbs /articles. Of FreshRSS it takes categories, unread counts, read state, mark-all-read and keyboard navigation. Favourites become "save to library", with a new note field.

Three owner decisions are open at the top of the brief: whether the Reader replaces /articles, whether articles render as sanitized HTML (one new pinned UI dependency, DOMPurify), and that "inspire" means clip and copy. The last one is fixed by decisions.md (a saved article is a reference, not a pipeline input), so the brief rules out a "start a post from this" button rather than re-proposing it.

Found while scoping, and written into the brief so the build doesn't learn them the hard way:

  • fetchFeed drops undated items and prefers plain text over HTML.
  • Search writes the item URL as articles.guid, so the reader must dedupe on the URL too.
  • SQLite LIKE folds ASCII only, which breaks the locked keyword rule for ș.
  • DOMPurify passes input through untouched where it is unsupported, so the sanitizer test must assert support first.

[2026-10-09] done | brief 105 — the Reader replaces /articles​

The owner took the recommended answer to all three decisions. Feed items are stored in feed_items (schema v6), refreshed in the background every READER_REFRESH_MINUTES with conditional GET and purged past READER_RETENTION_DAYS. /reader reads them in three panes, with keys, and saves to the library with a note. The brief's outcome note lists the choices it left open.

Checked in a real browser against the six real feeds, which found two bugs the tests had not:

  • Copy quote could never be used: React 19 rewrote the item's innerHTML on the re-render that selecting text causes, which collapsed the selection. The { __html } object is memoized now.
  • The loading skeletons named themselves with aria-label on role-less divs, which nothing announces.

Testing the sanitizer found the tenth entry for green-because-nothing-ran.md: under happy-dom, DOMPurify.isSupported is true and nothing is sanitized, so the suite runs in real Chromium.

Three wiki pages were at the cap, so each split along the same seam: the reading side went to api-reader.md, data-reader.md and modules-reader.md. The brief's "one API process, under pm2" was wrong about pm2: production is a single container process. The assumption itself holds.

Not deployed. Production's database has not been through the v6 migration; back it up before the deploy.

[2026-10-09] todo | briefs 106 and 107 filed — the source pane's wax highlight clips letters; the docs-site sync omits four wiki pages​

Both found during the README refresh. 106 is unconfirmed in a browser: the likely cause is paint order, each wax token's 0.35em left bleed covering the last glyph of the token before it (Marks.module.css:141-147, SourcePane.tsx:128-148). 107 is confirmed: PAGES in docs/scripts/sync-corpus.mjs:27-52 is a hand-kept allowlist that lacks api-reader, data-reader, modules-reader and migrations, and the sidebar in docs/astro.config.mjs is hand-listed too. Nothing fixed. Also checked overview.md and the docs-site home for the old LLM/news pitch: both are already current.

[2026-10-13] decision | brief 23: local accounts and "Sign in with Ward", on the shared library​

Newspapper has accounts again and Ward is a second way in. The shared library (0.2.0) is vendored at api/vendor/ward/ and ui/vendor/ward/; api/src/ward/ now wires it, the old client, its types, the fake Ward and GET /api/me are gone, along with jose, the dev /ward proxy and the three old WARD_* variables. A login page with the Ward button, Settings sections for the password and the Ward link, and npm run seed --workspace=api are new. The call decisions-accounts.md records: routePrefix is /api/auth because the proxy strips only the base; the cookie's Path is the base, not /api, because <img> requests for /output/* and /uploads/* must carry it (no inject test can see that); /uploads/* stays guarded, against the brief's text, because the corpus closed it on 2026-09-06 and the renderer reads from disk; and there was nothing to migrate, since no table holds a user key. Revision notes on decisions-security.md (lockout back, password route back, Ward-only identity revised, local-dev proxy gone); that page shed its two hardening calls to decisions-hardening.md to stay under the size cap. Also updated: configuration.md, api.md, data.md, migrations.md, architecture.md, chrome.md, dependencies.md, overview.md, status.md.

Not deployed. Production needs NEWSPAPPER_BASE in the container's environment (the API now reads it), the WARD_OIDC_* set, Ward's client registration for the callback <origin>/newspapper/api/auth/ward/callback, and the seed run. Not exercised in a browser: the Ward round trip past POST /api/auth/ward/start. core/src/util/config.ts still names the old variables in a comment (core was out of scope). The docs-site sync allowlist (brief 107) lacks the new pages.

[2026-10-18] todo | brief 108 filed — the docs site moves from Starlight to Docusaurus​

The owner's call (2026-10-18), one brief in every repo with a docs site. 108 keeps the URLs and The Mechanical. Its sync discovers pages, which does 107. Two repo rules meet it: the docs workspace cannot be "type": "module" (Docusaurus's build fails), and Docusaurus brings cheerio in transitively, so the brief asks the owner first. Building the corpus found one link into wzd_auth and four stale anchors into decisions.md. The deploy waits on vps-deploy brief 11.

[2026-10-19] done | brief 108 — the docs site is on Docusaurus; 107 superseded by it​

108: docs/ moved from Starlight to Docusaurus 3.10.2 at the same base and URLs, light only, The Mechanical ported onto Infima's tokens. The sync now discovers pages, so the four pages 107 named plus decisions-accounts and decisions-hardening are published (owner: publish all six, DENY empty), and 107 moved to superseded/. Owner's answer on cheerio: allowed transitively in the docs workspace only (dependencies.md). The docs workspace is the one package without "type": "module" (decisions-tooling.md, CLAUDE.md). Four stale anchors pointed at headings that had moved to decisions-authoring.md. Found: building from the repo root with npx docusaurus build docs loses docs/package.json's browserslist and renders Docusaurus blue; use the workspace script. Not deployed; waits on vps-deploy brief 11.

[2026-10-19] done | brief 106 — the galley's wax no longer covers letters​

106: confirmed in the browser at a device scale of 3 — every waxed token's 0.35em box-shadow bleed covered about half of the previous token's last glyph, because inline boxes paint in tree order. SourcePane now wraps each run of selected tokens in one WAX span laid under the text (z-index: -1 in the <pre>'s new stacking context), and the tokens take --wax-ink from .onWax. The bleed stays 0.35em; design-components.md dropped the comps' 20px with the reason. SourcePane.wax.test.ts counts each glyph's ink in Chromium with and without the wax, and was watched failing on the old code (10 and 7 covered glyphs). chrome.md records the hazard for any mark that reaches past its box.

[2026-10-31] maintenance | .env.example boots as copied; the README images checked​

A README refresh pass with the readme-docs standard. Following the README's own run steps, npm run dev failed: .env.example set WARD_OIDC_ISSUER with an empty client key, and the API stopped with "WARD_OIDC_ISSUER is set but WARD_OIDC_CLIENT_KEY is not". The five WARD_OIDC_* lines are now commented out, as configuration.md already describes an unset issuer as the local-accounts-only default; Ward's seed.mjs still writes them. With that, npm install, npm run seed --workspace=api and npm run dev work, and the API answers /api/health on port 3001. The README itself is current. docs/images/shots.md said the demo capture signs in through the local Ward; it now makes a local tester account. editing.gif predates brief 106's wax fix, and its demo posts are written by hand, so its retake is a todo (brief 01 since 2026-11-03); the other three images are unaffected.

[2026-11-02] maintenance | Briefs reset​

Part of an estate-wide reset. The seventy briefs in briefs/done/ and the superseded 107 are folded into the wiki and deleted; brief numbering restarts at 01. The last commit that held them is 5d71ed4: read one with git show 5d71ed4:corpus/briefs/done/105-the-reader.md. Brief numbers in the entries above refer to that set; "brief 23" in the 2026-10-13 entry is Ward's. briefs/superseded/templates-warm-industrial/, the nine retired template documents kept as reference, went with them; design-systems.md says where to find them in that commit.

The wiki's decisions pages already held the briefs' calls and now name the work and its date instead of a number. status.md drops its brief catalog and wave table for a dated line per area; it also said the accounts change was not deployed, which Ward's record of the 2026-10-13 cutover contradicts, and it now says so and leaves the Reader's production state for the owner to check. overview.md no longer points at a brief archive. Code comments, test titles, the root CLAUDE.md, README, PRODUCT.md and DESIGN.md no longer cite brief numbers; the vendored Ward library is untouched.

[2026-11-03] todo | brief 01 — retake the editing GIF after the wax fix​

Promoted from the todo retake-editing-gif-after-the-wax-fix in an estate-wide grill with the owner, with the todo's acceptance as the spec. The todo is deleted; the brief is its record.

[2026-11-04] todo | Brief 02: the API runs built JavaScript, started by node​

From the owner's memory review of the VPS (vps-deploy's memory-on-the-box research): newspapper's container is the second largest on the box (138 MB; its tsx process 127 MB plus 58 MB in swap) and starts through two npm processes. The owner decided the apps on the box run built JavaScript and start with node directly, which revisits the "runs from source under tsx" choice for the API.

[2026-11-04] done | Brief 02: the API runs built JavaScript, started by node​

The image's CMD is node api/dist/server.js: core and api compile with tsc into dist/, and the runtime stage installs production dependencies only, so npm, tsx and the dev tooling are gone from the container. core's exports gain a newspapper-built condition pointing at dist/ ahead of the .ts default, which the image sets through NODE_OPTIONS; tsx, Vite and vitest keep reading source. tsc rather than a bundler because core counts .. from its own file to find the repo root. Idle memory measured locally went from 175 MiB to 87 MiB. With node as PID 1 the server now exits on SIGTERM itself, or docker stop would wait ten seconds. The revisit of "runs from source under tsx", which no decisions page held, is in decisions-tooling.md; commands.md, configuration.md, dependencies.md, modules.md, architecture.md and status.md follow. vps-deploy's cutover-oidc.ts still seeds with npm run seed in the container and needs node api/dist/seed.js instead.

[2026-11-05] todo | A text selection in the galley hides the text it selects; brief 01 held​

Retaking editing.gif (brief 01) in the local app, signed in as a tester on a scratch database. With a caret in slide 1's heading, the element's wax run lies under the text and every glyph is whole, so the 2026-10-19 fix holds. Selecting the heading's text, the gif's first beat, hides it: the textarea's ::selection is opaque wax with transparent ink, laid over the galley. The rule dates from the editor's first commit, and the 2026-10-09 gif shows it too. Per the brief, no source change and no new gif: the todo galley-text-selection-hides-the-selected-text records it, and brief 01 stays in todo/ until the owner chooses between fixing the selection first or retaking without the held selection frame. Notes for the retake: agent-browser record drops idle time, so step and screenshot instead; the post's text can be read off slides.gif (slide 3's text is <Text size="lg">, slide 4 is <Quote size="lg" by="..."> with a <Source> ending in {date}); the preview scrolls in its column element, one slide every 421 px at 1280×800.

[2026-11-05] brief | Brief 03: a galley selection keeps its text​

The todo galley-text-selection-hides-the-selected-text (found while retaking the editing GIF) is promoted to brief 03 at the owner's request for more work. The owner put README retakes off the same day, so brief 01 stays blocked after 03 lands.

[2026-11-05] done | Brief 03: the galley paints its own text selection​

The textarea's ::selection was opaque wax with transparent ink, painted above the galley, so a selected range was a blank bar a full 23 px line tall. It is now transparent ground and ink, and SourcePane shows the textarea's range while it has focus and is not collapsed: the ground on a second <pre> under the galley (the same text, unpainted, the selected characters in one span on wax, 15 px tall like the wax run, no bleed), the ink by a text-selection mark that gives the tokens .onWax. Ruled out: the textarea's own glyphs in wax-ink (a highlight box is the line box, and its glyphs are regular and upright), and a ground on the galley's tokens (it would cover the oblique comments' overhang). SourcePane.wax.test.ts gains four Chromium cases (selected glyphs keep their ink, wax-ink on every selected token, the ground's height and edges against the run and the characters, a caret and blur paint nothing); all four failed on the old CSS with every selected glyph at 0 ink. Checked at 1280×800 in the local app on a scratch database. Firefox not checked (not installed). Open for the owner, in open-questions.md: a selection inside the waxed element is wax on wax and shows no extent. The todo galley-text-selection-hides-the-selected-text is deleted; brief 01 stays blocked on the owner's README retakes.

[2026-11-06] todo | Brief 04: a fetch connects only to the address it checked​

The owner chose to close safe-url.ts's accepted DNS-rebinding gap now rather than file a todo: a feed decides what newspapper fetches, so it is more exposed than ro-housing's pasted links (its todo check-every-hop-of-a-pasted-link stays). Brief 04 resolves once per connection through a vetting dispatcher (the undici package pinned to the production Node's bundled version), judges NAT64 and IPv4-compatible IPv6 as the IPv4 they carry, blocks 6to4, and tests a simulated rebinding against a loopback server. The recipe came from a look at hyperlight-dev/hyperagent on 2026-11-06.

[2026-11-06] decision | Selections leave the wax: non-photo blue, brief 05​

The owner settled the open question from brief 03: a text selection gets a colour of its own, everywhere in the chrome, not a deeper wax on the overlap, and picked non-photo blue. Measured the same day: at the grid's strength it is 1.05:1 against wax (hue only), so brief 05 uses it at 80% over paper, #99c5ed, graphite 7.8:1 on it and 1.3:1 against wax. The open question moved to "Settled".

[2026-11-06] decision | Brief 04 without undici; brief 05's colour confirmed​

Asked why brief 04 needed the undici package, the owner chose no new dependency: safeFetch makes its requests with node:http and node:https, whose lookup option vets the address the socket connects to, behind a small adapter that hands callers a web Response (with the decompression fetch used to do). The IPv6 forms and brief 05's #99c5ed ground were taken as written.

[2026-11-06] done | Brief 04: a fetch connects only to the address it checked​

safeFetch checked a host's addresses at resolve time, and fetch resolved the name again to connect, so a feed's DNS could swap a private address in between. Requests now go through node:http/node:https with a vetting lookup: the connection resolves once, through the same check, and the socket gets only addresses that passed. A small adapter returns a web Response (gzip, deflate and br undone; no body on 204/205/304; aborts reject), so the fetchers and their injected-fetch tests are unchanged, and no dependency was added. A connect-time refusal returns null, like a resolve-time one. Tests use a loopback server, reached through a test-only connectTo that runs after the check; the rebinding test gets a 200 from that server when the check is removed. NAT64 and IPv4-compatible IPv6 are judged as their IPv4, the hex mapped form is caught, and 6to4 is refused. Checked against three real seed feeds over TLS. Full npm test and the gate were not run here (Chromium, shared machine). Code 725a41a; on the board as ready for deploy.

[2026-11-06] done | Brief 05: a text selection is non-photo blue​

Every text selection in the chrome is now --non-photo-select (#99c5ed, non-photo blue at 80% over paper) under graphite, not wax, so a selected word inside the galley's selected element shows its extent. The global ::selection takes the token. In the galley the ground could not stay on brief 03's second <pre>: the wax run is an inline stacking context, its wax and text painted together, so that layer could only sit under the wax or over the text. The ground is now a wrapper in the galley's token tree, split at the run's edge: behind the text at z-index: -1 off the run, an ordinary inline box inside it (a negative layer there paints under the run's own wax). The run moved to z-index: -2 so its bleed can't cut into a selection that stops where it starts. Selected tokens take graphite from .onSelection. The galley's Chromium test checks blue and graphite on and off the run, the blue's extent inside it, no gap across the run's edge, and ::selection's computed colours; six of its cases fail on the old code. design.md's Non-Photo Rule names the exception. Gate and full npm test not run here (Chromium, shared machine). Code 910d5eb; on the board as ready for deploy.

[2026-11-06] maintenance | dependencies.md: scrape HTTP is node:http since brief 04​

The "no axios" row said HTTP is native fetch; since brief 04 the scrape requests use node:http/node:https, still with no HTTP dependency. The row says so and links the engineering decision.

[2026-11-07] done | Brief 01: the editing GIF retaken after the wax fix​

At the owner's request, docs/images/editing.gif is retaken with the same post and beats as the 2026-10-09 GIF, in the local app on a scratch database, signed in as a tester. The selected element's wax now lies under the text, every glyph whole, and the selected range is non-photo blue (brief 05). shots.md dates the row and records the new capture: a Chromium screencast that keeps each frame's timestamp, the post at /?post=1 (the dev server's base is / unless NEWSPAPPER_BASE is set), and post 1's markup put back before each take since the editor autosaves. CLAUDE.md and the editor.webp row still name /newspapper/ for the local UI; left for the owner. Commit 2ad75ef; the brief is done.