# Articles on the homepage — the homepage is the reports' export, umtool their editor Status: RATIFIED 2026-10-11 — the operator took every recommendation (D1–D5 below as recommended); handed to the main session to schedule. **Scheduled (operator, 2026-10-11): release 26, after release 25 (local TTS).** A7 (the data move) runs dry first and takes its own go. ## Why Today a report is published by a site (`site.json` `reports`, `plans/report-sites.md`). That forces every article into one archive's frame, and an article about someone with no public archive needs a "report-only" site (`search: false`) just to exist. Moving articles to the project homepage: - each export site stands alone — it is an archive, not an archive plus a magazine; - no report-only sites; - every article in one place, browsable across archives; - one model: **umtool edits an article, the homepage exports it** (as the editor edits a corpus and an export site renders it). No report has ever been published (every one of the 28 listed today is on a private site), so nothing moves under a reader: no redirects, no compatibility routes, no old URLs kept. ## What stays on a site: site pages A site keeps **special pages** — an article that belongs to that archive, like Jeralyzer's co-host watch. Same document format, same renderer, same moments, but hosted by the site and linked from its nav by title, not listed in a "Reports" index. `site.json` `reports` becomes `pages` (ordered ids), served at `/pages//`; moments stay at `/m//` and keep linking into the site's own corpus. Nothing else about a site changes (`citedChannels` stays — a page may cite a channel the site does not publish). ## The model | | Article (homepage) | Site page | |---|---|---| | Files | `transcripts/reports//` — report.json, video.mp4, poster.jpg, stills/, sources/, history-git/, notes.json | `transcripts/sites//reports//` (unchanged) | | Published list | `transcripts/reports/index.json` `published: [ids]` (ordered; an unlisted dir is a draft) | `site.json` `pages` | | Citable | any channel in the corpus | the site's `channels` + `citedChannels` (unchanged) | | Audience | report.json `audience: "public" \| "private"`, **default private** | the site's audience | | Moment "open in the archive" | the listed public site that publishes the channel (`channel-sites.json`, absolute `siteUrl`); none → no link | the site's own corpus (relative) | | Rendered by | homepage `/articles/`, `/articles//`, `/articles//history/`, `/m//` | export `/pages//`, `/m//` | | Edited/reviewed in | umtool `/articles/` (notes.json beside report.json) | umtool `/sites//` (unchanged) | `index.json` and `audience` are written through one writer (`common/lib/report/registry.ts`, the `patchSite` equivalent) and `pnpm ops articles-config` — generators outside the repo call that, never write the file. ## Two homepage builds The homepage is public; most articles are not. So the homepage builds twice from one source: - **public** — `archilyzer build homepage` (as today) + every published article with `audience: "public"`. Deploys to `archilyzer` as today. - **private** — `archilyzer build homepage --private` → its own out dir, every published article, served locally (`pnpm --filter homepage start:private`, its own port). Never deployable: the build stamps `audience: "private"` and `deploy homepage` refuses it, exactly as `deployAudienceProblem` refuses a private site. Audit on the public `homepage/out` (`builtHomepageProblem`): refuse any article or moment whose report is private, and any private X post media (`postsVisibility`) — the shape of `builtAudienceProblem` + `citedBuildProblem`. The source mirror is untouched. ## Slices - **A1 — share the renderer.** Move `export/app/components/reports/{ReportIndex,ReportArticle,MomentArticle, ReportHistory,parts}.tsx` and `export/app/lib/reports.ts`'s reader to `common/components/report/` and `common/lib/report/`, parameterised by base paths (`/articles/` vs `/pages/`) and the corpus-link resolver. Export renders exactly what it did. (No dependency.) - **A2 — the article store.** `transcripts/reports/`, `index.json`, `audience`, the registry writer, the ops action, schema docs (REPORT.md). `composeReports` split: a resolver over a citable set + an output root, so the same stage feeds a site (its set) and the homepage (the corpus). (No dependency.) - **A3 — homepage articles.** `compose homepage` gains the reports stage (into `homepage/public`: articles, moments, clips, posts, history, exports, feeds with `PROJECT_URL` as the absolute base); routes `/articles/…` and `/m/…`; nav "Articles"; the home page shows the latest few. `/articles/` renders an honest empty index on a `build:nodata` tree, so the nav stays unconditional (`homepage/app/lib/nav.ts`). (A1, A2.) - **A4 — the private build + gates.** `--private`, its out dir and port, the stamp, the deploy refusal, the public audit, tests for each refusal. (A3.) - **A5 — sites: reports → pages.** `site.json` `pages`, `/pages//`, nav links by title, the Reports index and the search-off home-as-index removed; `search: false` sites retired (validation refuses one with no pages). (A1.) - **A6 — umtool + editor.** umtool `/articles` (list, article, evidence, notes) beside `/sites`; the editor's prepare/export queue gains an Articles tab (the Reports tab keeps site pages). `reports prepare/export/ check/verify-quotes/attach-video` take `--article ` or `` + id. (A2.) - **A7 — move the data.** A one-off script (dry-run first): every listed report except site pages → `transcripts/reports/`, history-git and notes.json moved with it, `index.json` written in the old order, `audience: "private"` on all. The report-only private site is then empty and retired. Generators in `~/reports/*` switch from `patchSite` to the registry writer (listed in the runbook). (A2, A6.) A1, A2, A5 run in parallel; then A3 → A4; A6 → A7. Gates: tsc, unit, e2e export + homepage + umtool, the private-data grep, a public homepage build whose audit passes with zero articles public. ## Decisions (operator, ruled 2026-10-11: as recommended) - **D1** — Private articles live in a local-only private homepage build (above). Alternative: they stay on their private sites until made public. *Recommended: the private build — one place for all articles.* - **D2** — `audience` defaults to private; going public is an explicit `articles-config` per article. *Recommended.* - **D3** — Route names: `/articles/` on the homepage, `/pages//` on a site. *Recommended* ("reports" stays the internal/code word). - **D4** — A public article may cite a channel no public site publishes (its clips and posts are hosted by the homepage, as a cited site's are today). *Recommended yes*, with the post-visibility rule unchanged. - **D5** — Which current reports are site pages: proposed `jeralyzer-private/cohosts` only; every other listed report becomes an article. ## Record ### A2, as shipped The article store and its one writer, and the reports stage split into a resolver over a host and a writer into an output root (branch `r26/store`, Lane B). - **Store.** `paths.articlesDir` = `ARTICLES_DIR`, else `/reports` (ENVIRONMENT.md). An article is `reports//` (report.json and its siblings, as a site's report); `reports/index.json` `{"published": [ids]}` is the ordered published list; report.json `audience` `"public" | "private"`, absent = private (D2). `common/lib/report/store.ts` names where a store's report directories and staging live (`ReportStore`: a site's, `.export-index/sites//`; the articles', `.export-index/articles/`). - **Writer.** `common/lib/report/registry.ts` — locked (withJsonFileLock in-process around an O_EXCL `reports/.registry.lock` across processes; a dead or 60 s-old holder is taken over; a live one waited for up to 10 s), validated (an index names ids once; only a sound article is published; a patch may not add a problem; a whole document must be sound), atomic (writeJsonAtomic; configureArticle checks everything before writing either file). API: `configureArticle(id, {audience?, published?, position?})`, `setPublished(id, bool, {position?})`, `setArticlesOrder(ids)`, `patchArticle(id, patch | fn)`, `writeArticle(doc, {keepAudience?})`; readers `readArticlesIndex`, `listArticles`, `readArticleState`, `publishedArticleIds(audience)`, `listArticleDirs`; `ArticleRegistryError` for every refusal. - **Ops.** `pnpm ops articles-config {"id", "audience"?, "published"?, "position"?}` → configureArticle; usage, COMMANDS.md. REPORT.md (generated) documents both stores and the writer. - **Compose split.** `common/publish/reportHost.ts`: `siteReportHost(paths, site)` (its `reports`, `channels` + `citedChannels`, its audience, relative corpus links) and `articlesReportHost(paths, {audience, siteUrl?, channelSiteUrl?, published?})` (index.json narrowed to the build's audience, any channel of the corpus — D4 —, the post visibility rule by the build's audience, absolute archive links only where `channelSiteUrl` names a site, PROJECT_URL as the base). `resolveReports({paths, host})` / `composeHostReports({paths, host, publicDir})`; `resolveSiteReports` / `composeReports` are the site's wrappers. reportMedia, reportExportFiles and reportHistory gained store-based twins of their site paths. Every existing compose test passes unedited. | Commit | What | |---|---| | d1975fcf | common: the article store, index.json, audience, the registry writer, REPORT.md | | 9e33e439 | publish: the reports stage over a host, into any output root | | 490c1ca9 | editor: `pnpm ops articles-config` | ### A6, as shipped | Commit | What | |---|---| | ec53dcb8 | cli: `reports prepare|export|check|verify-quotes|attach-video --article ` | | c0f0f894 | editor: the Articles tab, `/sites/articles`; prepare/export jobs over the articles | | 2e1fd460 | umtool: `/articles`, the article page and evidence walk shared with `/sites`, notes on `articles/` | | 47a31113 | cli: `reports move-to-articles` — A7's script, dry run by default | - **CLI.** `--article ` in place of a site or a report.json. prepare and export work over `articlesWorkHost`: every published article plus the named one (a draft may be readied), so one cache serves both homepage builds; an article's history commits as "Archilyzer "; attach-video writes `video` through `patchArticle`. - **Editor.** `/sites/articles` — a static segment beside `/sites/[siteId]`, linked from `/sites` (no nav entry: "fold, do not add"); a site named `articles` is shadowed there, as one named `new` is. Rows, publish/unpublish, ↑/↓, Make public/private through the registry; Fetch missing evidence, Prepare evidence media, Export articles on the reports queue, spec `params.articles: true` (slug `articles`), replayed as such. The ops `reports-prepare` and `reports-export` routes take `{"articles": true}` (prepare also `{"article": id}`). - **umtool.** `ARTICLES_DIR` beside `SITES_DIR`; an article is `articles/` to every reader — the media and evidence routes (`?site=articles`), notes targets and `umtool notes articles/`, a manifest's `"article"`. The nav's "articles" opens `/articles` (`/sites` still marks it). The article page and the evidence walk are shared components. A site named `articles` is shadowed in umtool. The existing notes tests now pass a temp article store of their own. - **A7 script, not run.** `archilyzer reports move-to-articles [--keep /,…] [--drafts] [--apply]`; tested on a temp corpus only. **Gates.** tsc, every package: clean per commit. common 3793/3793 (an earlier full run had one `relocateChannelMedia.test.ts` reconcile failure under load; that file alone 44/44 twice); editor unit 264/264; test:scripts 836 (834 pass, 2 skipped); mcp 306/306; export unit 118/118; homepage unit 23/23. umtool capped build with the corpus linked: compiled in 17.4 s, rc 0. e2e (single specs, foreground): editor `articles.spec.ts` 1/1 (its run built the editor, 79 s); umtool `articles.spec.ts` + `sites.spec.ts` 6/6, `article-notes.spec.ts` + `article-evidence.spec.ts` 12/12; export `e2e:report` `report-site.spec.ts` 23/23. No export or homepage build: neither app's code changed. **Left for the merge.** View hrefs are `/reports/…` (lib/report/views.ts); the homepage's `/articles/` (A3) and a site's `/pages/` (A5) need the base decided there. A5's `reports` → `pages`: the move script reads `pages ?? reports` and writes `reports` with patchSite, and a search-off site emptied by the move would be refused by A5's validation — the merge adapts both. REPORT.md still names site.json `reports`. ### A1, as shipped The report renderer shared (branch `r26/renderer`, Lane A): one renderer for a site's pages and the homepage's articles. - **Components** — `export/app/components/reports/{ReportIndex,ReportArticle,MomentArticle,ReportHistory,parts}.tsx` moved to `common/components/report/`. `ReportArticle` and `ReportHistory` take `base` (the view switch's page.json, the history's links); `MomentArticle` takes `corpusHref` (the corpus link resolver; default the view's `corpusUrl`); `ReportIndex` takes `empty` (an empty index's words). `NotOnCitedSite` stays in export (`export/app/components/NotOnCitedSite.tsx`): it is a site's. - **Reader** — `common/lib/report/reader-server.ts`: `createReportReader({publicDir, base})` (index, ids, page, history, the only/first report, moments) and `reportMetadata`, shaped as Next's `Metadata` without importing `next` (its globals would reach every package importing common/lib). `export/app/lib/reports.ts` binds it to the site's public dir and base. - **Base** — `common/lib/report/routes.ts`: `ReportBase` (`//`), `SITE_REPORTS_BASE`, `isReportBase`, `reportBaseDir`. Every path helper in `views.ts` and `revisions.ts` takes the base last, defaulting to a site's. - **Export renders what it did** — the cited fixture built before and after: the same 17 HTML files; with build ids and chunk names normalised, 15 byte-identical, the other two differing only in the RSC client-chunk list of the view switch and the second revision's commit (the fixture's report.pdf carries a creation date, so that commit differs run to run); the rendered markup (scripts stripped) 17/17 identical; CSS identical. | Commit | What | |---|---| | 8535c36d | common: the report renderer shared — components and reader in common, parameterised by base | **Gates.** tsc clean; common 3782/3782 (+10: reader-server.test.ts 7, renderer.test.ts 3; the architecture test green); export unit 118/118; export `e2e:report` 46/46 (36.7 s, one run, foreground); the byte comparison above. ### A5, as shipped A site's reports are its pages (branch `r26/renderer`, Lane A), and the base is a host's. - **`pages`** — site.json `pages` (ordered report ids) replaces `reports`; SITE.md regenerated. Four live site.json files carried `reports` (key names counted offline, nothing written), so for release 26 only a file's `reports` reads as `pages` when it has none, and is never written; a patch naming `reports` is refused (`site.json "reports" is now "pages"`) so a generator outside the repo fails loudly instead of being dropped. `citedChannels` unchanged. - **Served at `/pages//`** — `SITE_REPORTS_BASE` is `/pages/`: the views under `public/pages/`, the routes `export/app/pages/[reportId]` and `…/history`, the audits (`pages/` in the cited allowlist, the history-clone audit, the hub's report-data check), the `_headers` feed types, corpus.json's `reports.index`, llms.txt, the sitemap. Compose still clears a `public/reports/` an older compose left; a cited build holding one is refused. - **Nav by title, no index** — the header links each page by its title after Ask AI (a search-off site: its pages alone, none with one). The Reports index route is gone, and so is the search-off home-as-index: a search-off site's home is its first page (with none, "No pages"). - **D5** — `siteSearchProblem`: a save (writeSite, so the form, patchSite and every writer) with search off and no pages is refused. The editor's site form lists **Pages**. - **The host's base (the orchestrator's merge asks)** — `ReportHost.base`: `/pages/` for a site, `/articles/` (`ARTICLES_REPORTS_BASE`) for the homepage, threaded through compose (every path written, index entries, cited-in hrefs, stills, video, downloads, feeds, the history page, view and clone; `reportPublicEntries(base)` is what it clears), the exports (the page link, the evidence pack's report files) and the history. `siteReportHost` publishes `pages`; `reports check` and umtool's sites views read it. - **A7's order hazard** — the move script writes `pages` and RETIRES a search-off site it empties: the patch that drops its last page turns search on in the same write, so it saves as an empty site (no channels, no pages) rather than being refused; the plan line reads `retire : search off and no pages left — saved with search on, as an empty site; delete it on /sites`. Nothing is deleted by the script. - **Reserved site ids** — `articles` and `new` are refused by writeSite and the editor's save (`reservedSiteIdProblem`): the editor's `/sites/articles` and `/sites/new` and umtool's `articles/` would hide them. No live site has either id. - **ComposeReportsError** names its host: "the site's pages" or "the articles". | Commit | What | |---|---| | dad37ab9 | sites: reports become pages — site.json `pages`, served at /pages//, linked by title | | 0a7ad151 | merge r26/integration; the host's base, A7's retire, reserved ids, the error's wording | **Gates.** tsc clean per commit. common 3806/3806; export unit 117/117 (the forward-to-home and index tests replaced by first-page and nav-by-title ones); editor unit 264/264; mcp 306/306; homepage unit 23/23; test:scripts 836 (833 pass, 3 skipped). Builds: `pnpm --filter export exec next build` rc 0 (`/pages/[reportId]`, `/pages/_none` placeholders; the one Turbopack NFT warning, via `common/lib/ttsApps.ts`, predates this branch); umtool capped build with the corpus linked rc 0 (compiled 8.9 s); the editor's e2e production build (rebuilt by the sites-crud run). e2e (single runs, foreground): export `e2e:report` 46/46 (32.3 s, fresh build after the merge); export `header.spec.ts` 33/33 (3.7 min); editor `sites-crud.spec.ts` + `articles.spec.ts` 21/21 (20 + 1; sites-crud gained "a site with search off and no pages is refused on save" and checks the legacy key saves as `pages`). **Left.** umtool's e2e sites fixture (`umtool/e2e/fixtures/sites-fixture.mjs`) still writes `reports` — read as `pages` this release; it should write `pages` before the legacy read is removed. The editor's Reports tab still says "Reports" (the tab keeps site pages, A6). corpus.json's spec is not bumped for the `/pages/` paths: no report was ever published, and readers follow `reports.index`. ### A3, as shipped The homepage publishes the articles (branch `r26/store`, Lane B; merged with A5 at 7f8a0809). | Commit | What | |---|---| | ed9716f6 | homepage: compose's reports stage under `/articles/`, the routes, the nav, the latest few | | 7f8a0809 | merge r26/integration (A5): A5's host base taken over A3's shim; umtool's sites fixture → `pages` | - **Compose.** `compose homepage` runs `composeHostReports` over `articlesReportHost(paths, {audience, siteUrl: PROJECT_URL, channelSiteUrl})` into homepage/public: `articles/`, `m/`, `media/` (clips, captures), history, exports, feeds. `channelSiteUrlOf(channelSites, sites)` gives a moment's record the first listed site that publishes its channel (its `siteUrl`), else no link. The build is stamped `homepage-build.json` `{format, version, audience, articles}`. `--private` / `--allow-missing-media` on `compose homepage`. - **Base.** A3 first threaded the host's base through compose, feeds (an optional `base`), history and exports with a shim for the views' own paths; A5's `ReportHost.base` (views.ts builders taking the base) replaced the shim at the merge, and `ARTICLES_REPORTS_BASE` (A5's name) is the one constant. - **App.** `homepage/app/lib/articles.ts` binds the shared reader to `public/` under `/articles/` (`E2E_ARTICLES_PUBLIC_DIR` outside a production build). Routes `/articles/`, `/articles/[reportId]/`, `/articles/[reportId]/history/`, `/m/[...moment]/` render the shared components in PageShell, a placeholder param and an honest empty state with none. Nav: "Articles" in HEADER_NAV (and so the footer); the md nav's link gap is 16 px below lg so five links and a three-link social row fit 768 px. The front page's "Latest Articles" (newest three by date, "All articles") shows only when there are articles. ### A4, as shipped | Commit | What | |---|---| | 1c064557 | homepage: the private build and the public build's audit | | eee153fc | cli: the usage test names `build homepage --private` | - **Private build.** `archilyzer build homepage --private` → compose `--private`, `next build` with `HOMEPAGE_DIST_DIR=out-private` (next.config `distDir`; Next exports there and keeps its build in `.next`), its stamp checked, then the articles removed from homepage/public (`clearHomepageArticles`). `pnpm --filter homepage start:private` serves it (`HOMEPAGE_PRIVATE_PORT`, 3032). homepage/out is never touched; nothing deploys out-private. - **Audit.** `common/lib/builtHomepage.ts` `homepageAudienceProblem(outDir, {paths?, settings?})`, asked by `builtHomepageProblem` (deploy stage with paths + settings, the publish status, and the public build after `next build`, which fails on it): a private stamp; an article under `out/articles/` whose report.json is not `audience: "public"` now (or gone); a moment whose `citedIn` names a non-public article or no article; an X channel's moment or `media/posts/` capture while `social.x.visibility` is private. **Gates (A3 + A4, after the A5 merge).** tsc every package: clean. common 3816 (the two `_cli.test.ts` usage assertions updated for `--private`, then 26/26); editor unit 264/264; test:scripts 836 (833 pass, 3 skipped); mcp 306/306; export unit 117/117; homepage unit 25/25. New tests: `lib/builtHomepage.test.ts` 5, `bin/compose-homepage.test.ts` 3, `publish/build.test.ts` +1 (both builds through seams), `publish/deployStage.test.ts` +1 (the deploy refuses a private build and a private article), `homepage/app/lib/articles.test.ts` 2. Homepage e2e, the whole suite, one foreground run: 110/110 in 2.3 min (a first run, before the nav gap fix, failed `social.spec.ts` "768 and 1280 px … in one bar": the fifth link made the social row scroll at 768). umtool `sites.spec.ts` + `articles.spec.ts` 6/6 on the `pages` fixture. `build:nodata` homepage build: rc 0, `/articles/` the empty index, `/articles/_none` and `/m/_none` placeholders. Over a temp corpus (one public, one private article, a listed site, a real ffmpeg clip prepared with `reports prepare --article`): the public build rc 0 carrying `open` alone, audit null, its links under `/articles/open/`; flipping `open` private refuses that out ("carries the article \"open\", which is not public"); the private build rc 0 into out-private with both, its stamp refused for deploy, homepage/public left without articles; a public build with zero public articles rc 0, stamp `articles: []`. ## As it went (release 26, 2026-10-11) - Lanes: A (A1 renderer → A5 pages) and B (A2 store → A6 umtool/editor/CLI, then A3 → A4), merged `--no-ff` into `r26/integration` as each finished: A1 `64723a12`, A2/A6 `207bb1eb`, A5 `a6a55c9c`, A3/A4 `0b0079f5`. - Main had moved by one plans-only commit (the release-25 mirror record); merged into `r26/integration` (`be4b0523`), then `git merge --ff-only` on main. ## Gates (tip `0b0079f5`; `be4b0523` differs only in `plans/archive/releases.md` (entry `release-25.md`)) - Privacy counts over `515a9ac7..0b0079f5` (21 commits): all 0; one identity. - typecheck green; `docs env|files|cli --check` and `settings example --check` green. - `pnpm test`: 4 reds, all in `scripts/queue-lock.test.mjs` (timing under the parallel run; queue-lock untouched by the release) — the file alone 37/37. - Builds: editor, export, homepage, umtool green. - `pnpm e2e:all`: homepage 110/110, umtool 290 + 6 skipped, export 276/276, export-hub 39/39, export-report 46/46, editor 686 + 2 red + 12 skipped. The reds alone: `backfill.spec.ts:463` (a checkbox click before hydration) 20/20; `site-scope.spec.ts` red on a different test in each run (`:362` in the suite, `:243` alone, `:424` in an earlier round), then 13/13 twice alone — a flake of the file, not of the release. ## Rollout (2026-10-11) - Editor: `zHEldzbbAL1rxVSONWLU5` (was `XS9QCmFhdVixBVob7eLcl`), restarted with only the auto-lane runners active; smoke `SMOKE_FAIL=0`; `/sites/articles` 200. - umtool: `uaB2WR860Ara-arQ4-y8u`; `/articles` 200. - Source check passed (main `be4b0523`, audit clean, gitleaks clean); homepage to production (`archilyzer`, live check ok): `compose-homepage: 0 public article(s), 0 moment(s)`; live `/articles/` is the empty index. - Public sites: not rebuilt (the export's `/reports/` → `/pages/` move changes nothing a public site serves: no public site lists a report). - A7: dry run clean — 27 to move (11 candalyzer, 6 hasanalyzer-private, 6 jasolyzer-private, 4 jeralyzer-private), all published and private; `jeralyzer-private/cohosts` kept as a page; candalyzer then retired (search off, no pages). Awaiting the operator's go; not applied. - The live mirror's clone, 5 min after: head `1712301d`, 2,942 commits; name/email/suffix/session-link/trailer counts all 0; one identity. - **A7 applied (operator's go, 2026-10-12):** 27 reports moved to `transcripts/reports/` (index.json: 27 published, all `audience: "private"`); `jeralyzer-private/cohosts` kept as a page; candalyzer left empty (search on, no pages) — its deletion on /sites is the operator's. Then `reports prepare --article` over every published article and `build homepage --private` (log `~/reports/release-26/tmp/a7-private-homepage.log`); view with `pnpm --filter homepage start:private`.