> **Feature plan:** [Step 1](./plain_default_site_step1_solution_assessment.md) · [Step 2](./plain_default_site_step2_feature_description.md) · [Step 3](./plain_default_site_step3_development_plan.md) · [Step 4](./plain_default_site_step4_implementation_summary.md)

Debug mode: enabled

Effort study: `railspike-effort` / `v3/plain_default_site`; [cycle ledger](../effort_ledger/plain_default_site.md). Standing P2 enrollment.

Extended estimates: enabled

**Cycle estimate: 0.85**

Branch `feature/plain_default_site` from `origin/main` `aa95b4cf`. Planning commits `dfda29e` (Step 1), `2e7e0be` (Step 2), `3a80131` (Step 3).

## Step 4 Entry

2026-11-30T06:35Z: Step 3 projection reaffirmed, **0.85 projected total**. Stage estimates copied from Step 3: 0.20, 0.30, 0.15, 0.10, 0.10, 0.10. Claude, single exposed rater.

Baseline: on `aa95b4cf`, the smoke set plus `SiteProfileRegistryTest` and `PresentationProfileMatrixTest` gave 518 run, 518 passed. No failures were pre-existing.

## Stage 1 - Plain profile as the default

**Original estimate: 0.20** (unchanged)

- Changes:
  - `SiteProfileRegistry`: new first entry `plain`, with Auto over Light/Dark, the general themes (Engagify, Gloss and Ochre included; no site themes), browser namespace `plain`, editorial `plain`, the same layout slots as zenmemes today (app navigation, list cards), and no page themes, strip tags, calendar zone or app name. `DEFAULT_SITE_ID` is `plain`, and validation requires it.
  - `PresentationSlotRegistry`: the editorial fallback and the first choice are `plain`.
  - `ProfilePresentationContent`: a `plain` editorial entry, a copy of the generic qdb entry with "Temporarily Busy" copy.
  - `zenmemes` is unchanged.
  - `SiteProfileRegistryTest`: the default is now plain, plus new tests that plain is unbranded and that validation requires the plain fallback; plain added to the manifest-name check (its manifest name is "Plain").
- Verification:
  - `./v3 test SiteProfileRegistryTest PresentationProfileMatrixTest`: 22 run, 22 passed.
  - Smoke set with the default flipped (before the test changes above): 15 failures. These are Stage 2's work: `BoardListTest` (2), `GalleryPageTest` (1) and `LocalAppSmokeTest` (11) assume zenmemes, plus `SiteProfileRegistryTest` (1), now fixed. Well under the split threshold of about 40 files, so Stage 2 stays one stage; the full-suite count is unknown.
- Notes:
  - Retrospective stage-work assessment: **0.15**.

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Stage 2 - Tests follow the new default

**Original estimate: 0.30** (unchanged)

- Changes:
  - `tests/run.php`: a test class may declare `const SITE_ID = '<profile>'`, and each of its tests then runs under that profile; the runner restores the setting afterwards. Before this, seven test files each carried their own `withSite()` helper, and tests that clear `FORUM_SITE_ID` in `finally` change it for whatever runs next in the same process. The constant is set once per class and reset per test, so a class can't leak its profile into the next one.
  - `SITE_ID = 'zenmemes'` added to `LocalAppSmokeTest`, `BoardListTest` and `GalleryPageTest`, which check ZenMemes behavior (the Zen strip, page themes, Gloss, the busy copy and its storage keys).
  - Tests about the default now expect plain: `LocalAppSmokeTest::testBoardPageRendersActiveSiteProfilePerFormSiteId` (unset is plain; zenmemes is checked by name), `DeploymentSettingsTest` (`FORUM_SITE_ID: plain (default)`), `PlatformDocsPageTest`, `ProfilePresentationContentTest` (the fallback is plain, "Temporarily Busy"), and `ThreadThemeTest` (page theme set on plain).
  - Found by the tests: the Agents page needs the profile's agent prompts, so plain would have lost `/agent/`. The three prompts are generic (origin and display name only), so they moved into one shared `AGENT_PROMPTS` constant used by both plain and zenmemes. `PresentationProfileMatrixTest` now expects the agent entry points on plain too, except the home-page link, which lives in the first-visit intro that only ZenMemes has. Giving plain an intro is new copy, so it stays out of scope.
  - Pre-existing failure fixed: `ProfileThemePresentationTest` failed on `aa95b4cf` (it expected flag-gated Zalgo and Vaporgeist in the theme menu while their flags are off). It now computes the expected list with `ThemeRegistry::permitted()`.
- Verification:
  - Serial run of the smoke set plus every test file that mentions zenmemes, Gloss, the Zen strip, the busy copy, `FORUM_SITE_ID` or `SiteProfileRegistry` (69 files): 1251 run, 1251 passed. The full suite was not run.
  - Browser tests that mention zenmemes but start a server without a site ID: `browser_keychain`, `compose_layout_stability`, `visit_history`, `image_content_browser` and `offline_card_extra_line` all passed (`npm install` of the existing `playwright-core` dev dependency, not committed). The other 50 browser tests that mention zenmemes set `FORUM_SITE_ID` themselves; not run.
  - Python tests that mention the site set it explicitly (`zenmemes` or `qdb`); not run.
- Notes:
  - **Pre-existing, not fixed here:** the same 69-file run with `--jobs=4` fails 20–36 tests with "Read model unavailable (schema_identity_mismatch / metadata_unreadable)" and signing errors, on `aa95b4cf` and on this branch alike; serially they all pass. Parallel workers seem to share read-model or queue state. `./v3 fulltest` uses every core, so it may hit this too. Recorded for Ilya as a separate item; the fix is in the test harness, not in this cycle's files.
  - Retrospective stage-work assessment: **0.35** (the agent-prompt discovery and the pre-existing fix).

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Stage 3 - No ZenMemes branding on a plain site

**Original estimate: 0.15**
**Revised estimate: 0.30** (2026-11-30, before the seed and icon work; new understanding, same scope). A fresh `./v3 start` turned up two more carriers of ZenMemes material, both covered by Step 2 requirement 3: the content every new install is seeded with, and the default favicon and home-screen art (the "Z" mark).

- Changes:
  - **Seed content.** New installs were seeded from the test fixture `tests/fixtures/parity_minimal_v1`, which pins "The Rules of ZenMemes.com" and names the instance `zenmemes`. They now start from the new `resources/local_seed/` (`LocalRepositoryBootstrap`). It's the same demo thread, reply and operator key, without the rules thread and its pin label, and with instance name `plain`; it has a README. `initializeLocalRepository()` takes an optional seed path, and tests that load the fixture through it now pass the fixture path explicitly. The fixture itself is unchanged. Existing installs already have `state/local_repository`, so they're untouched.
  - **Icons.** `FaviconRegistry`: the `default` slot is the new unbranded `/assets/favicon-plain.ico` (a list mark, 16/32/48 px), and a new `zenmemes` slot keeps `/favicon.ico`, the app-icon PNGs and the launch images at their current paths, so installed ZenMemes apps keep their icon. The zenmemes profile selects it. Plain has no home-screen art, like the other sites without it.
  - **Literals.**
    - Push overflow and test notifications are titled with `PushNotifier::siteTitle()`, the active profile's manifest name; `PushApiController::TEST_PAYLOAD` became `testPayload()`.
    - Engagify's five jokes read the name from the page's existing `apple-mobile-web-app-title` meta.
    - The legacy `zenmemes-theme` key migration in `layout.php` is only output for the zenmemes namespace.
    - Two Platform Docs descriptions and the Zen strip flag description no longer name ZenMemes.
    - A CSS comment that gets inlined into pages was reworded.
  - The static `public/manifest.webmanifest` is not served: `FrontController` renders the manifest for every request. It's left alone and recorded here.
  - New `PlainSiteTest`: a fresh install with no site ID renders 16 pages and the manifest with no "zen ?memes" anywhere, uses the plain favicon with no touch icon, no Zen strip and Light/Dark; busy copy and push titles name the active site (plain, then zenmemes).
  - Tests updated: `PresentationSlotRegistryTest` (favicons per site, including plain; both default `.ico` files have 16 and 32 px images), `LocalAppSmokeTest` manifest icons (app icons follow the `zenmemes` slot; seed tests copy `resources/local_seed` and check it has no ZenMemes text), `FastNavigationLayoutTest` (launch images are ZenMemes', so it pins zenmemes), `PushApiTest`, `PushNotifierTest` (`SITE_ID = 'zenmemes'`).
- Verification:
  - Serial run of the smoke set plus every test file that mentions zenmemes, Gloss, the Zen strip, the busy copy, the site ID, the registry, favicons, app icons, the bootstrap or push (78 files): 1279 run, 1279 passed. The full suite was not run.
  - Browser: `theme_scripts.cjs` (Engagify start/stop), `local_message_pull.mjs` and `local_message_send.mjs` (use the bootstrap) passed.
  - A fresh clone with `./v3 start` was used to find the leaks above; the acceptance run on the finished branch is Stage 6.
- Notes:
  - Still mentioning zenmemes.com on purpose: the known import source on `/start/` and `/local/` (decided in Step 1), and the source-address example in `LocalDevelopmentRemote`'s error message, which belongs with it.
  - `/favicon.ico` still ships as ZenMemes' Z for existing installs, but plain pages don't link it. Moving it out of the default checkout belongs to the per-site-folders round (Option B).
  - Retrospective stage-work assessment: **0.35**.

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Stage 4 - The tour is ZenMemes-only

**Original estimate: 0.10** (unchanged)

- Changes:
  - New profile field `tour` (validated true/false, default off; `zenmemes` sets it) and `SiteProfileRegistry::tour()`, following the `gettingStarted`/`musicSection` pattern.
  - Gated in four places:
    - `FrontController` serves neither `/assets/tour/…` snapshots nor the `/assets/tour.html` redirect without it.
    - `TourSnapshots::needsRefresh()` is false, so the task worker and the high-traffic refresh never start one.
    - `TourSnapshots::refresh()` refuses with "This site has no tour…", which `./v3 tour refresh` reports through its existing failure line.
    - Tools → Operations hides the Tour snapshots row, and its refresh action answers "Unknown action."
- Verification:
  - `TourSnapshotsTest` now pins `SITE_ID = 'zenmemes'`, plus a new `testPlainSiteHasNoTour` (registry, needsRefresh, launcher, refresh refusal, Operations page without the row while the rest renders): 11 run, 11 passed.
  - Smoke set plus `TourSnapshotsTest`, `WebServerRoutingTest`, `LocalAppSmokeTest`, `SiteProfileRegistryTest`, `PlainSiteTest` and `PresentationProfileMatrixTest`: 533 run, 533 passed. The full suite was not run.
  - `/assets/tour.html` and `/assets/tour/` on a fresh plain install: checked in Stage 6.
- Notes:
  - Retrospective stage-work assessment: **0.10**.

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Stage 5 - Docs and concepts

**Original estimate: 0.10** (unchanged)

- Changes:
  - New concept [site profile](../../concepts/site_profile.md). Presentation slots, deployment configuration and tour snapshot each link to it and state what changed: the plain fallbacks, unset means plain, and the tour is per profile.
  - `docs/runbooks/production_deploy.md`:
    - the profile list now includes `plain` and `jetlag`, and says unset is `plain`;
    - the static HTML folder rule is corrected;
    - a short **ZenMemes after the plain default** section says to add `FORUM_SITE_ID => 'zenmemes'` before Deploy now, how to check it, and how to recover.
  - README "Local exploration": a fresh `./v3 start` is plain; `FORUM_SITE_ID=zenmemes ./v3 start` shows ZenMemes.
  - `docs/reference/v3_cli.md` names no default profile, so it's unchanged. Its zenmemes.com mentions are real hostnames for commands that target zenmemes.com.
  - PF-20261030-F42 (busy copy without hardcoded branding): Workflow `blocked`, Evidence `locally-verified`, with a dated note. It is blocked until deployed with the setting on zenmemes.com.
- Verification:
  - `git diff --check`: clean.
  - Every relative link in the changed docs resolves.
  - Other servers: chouse, qdb, mitrapclub and jetlag show their own branding today, which is only possible if they already set `FORUM_SITE_ID`, so the new default leaves them unchanged. This is inferred, not checked on those hosts.
- Notes:
  - The Stage 3 commit carried a `Feedback: PF-20261030-F42` trailer without the item update; that update is here, and this commit carries the trailer too. Completed commits are not amended.
  - Retrospective stage-work assessment: **0.10**.

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Stage 6 - Acceptance and handoff

**Original estimate: 0.10** (unchanged)

- Changes:
  - `TourSnapshotsTest::testPlainSiteHasNoTour` also drives `FrontController`: `/assets/tour.html` and `/assets/tour/` are not served on plain and are served on zenmemes. This covers the Apache path, which sends `.html` under `assets/` through PHP.
- Verification:
  - **Fresh clone, normal entry.** A clone of this branch started with no `FORUM_SITE_ID` (`./v3 start`) gave HTTP 200 for 18 pages, and none of them name ZenMemes:
    - home, board, a thread, Recent, About, Tools, Operations, Docs, Agents, Agent start, Calendar, Users;
    - manifest, `llms.txt`, `skill.md`.
    - The exceptions are `/`, `/local/` and `/start/`. They mention zenmemes.com only as the import source (decided in Step 1). `/assets/tour/` returns 404. `./v3 status` shows `FORUM_SITE_ID: plain (default)`, and `./v3 tour refresh` says "This site has no tour."
  - **Browser (Chrome, playwright-core).**
    - The board in Light and Dark has the "plain" wordmark, Auto mapped to Light/Dark, no Zen strip, and only the plain favicon (no touch icon).
    - Engagify on plain reads "Plain is better in the app" and "the best of Plain"; it was screenshotted and checked.
  - **ZenMemes unchanged.** Board, thread, About, Tools, Operations, Docs and Agent start were rendered with `FORUM_SITE_ID=zenmemes` from `main` (`aa95b4cf`) and from this branch on the same repository, then diffed after normalizing fingerprints, hashes and times. The only differences are:
    - the legacy theme-key script, which has the same behavior with a comment;
    - the CSS comment;
    - the two Platform Docs descriptions;
    - the docs count, from this cycle's new docs.
    - The ZenMemes manifest, favicon, touch icon and 11 launch images are byte-identical (manifest MD5 equal).
  - `./v3 status` with `FORUM_SITE_ID=zenmemes`: `FORUM_SITE_ID: zenmemes (environment)`.
  - `TourSnapshotsTest`: 11 run, 11 passed.
  - **Pending, Ilya's:** zenmemes.com after Deploy now with `FORUM_SITE_ID => 'zenmemes'` in its private file (the home page shows the Zen memes, Gloss and the name zenmemes; `./v3 status` says `private file`).
- Notes:
  - Limitation: the local dev router (`public/router.php`) serves every file under `/assets/` directly, so on a plain `./v3 start` `/assets/tour.html` still answers with its redirect, which leads to a 404. Apache goes through the gate.
  - Retrospective stage-work assessment: **0.10**.

## Final review

- Diff from `aa95b4cf`: 60 files, +983/−90 including plans and docs (corrected after the Stage 6 commit, which gave a wrong count). No duplicated components: the profile fields, the favicon slot, the `SITE_ID` test hook and the `tour()` gate follow existing patterns. `resources/local_seed/` copies part of a test fixture on purpose, so tests and new installs can change independently.
- Checks:
  - Passed: the focused serial runs listed per stage (largest: 78 files, 1279 tests), plus browser tests `browser_keychain`, `compose_layout_stability`, `visit_history`, `image_content_browser`, `offline_card_extra_line`, `theme_scripts`, `local_message_pull` and `local_message_send`.
  - Not run: the full suite and the other browser and Python tests.
  - Pre-existing: `ProfileThemePresentationTest` failed on `aa95b4cf` and is fixed (Stage 2). Parallel (`--jobs=4`) runs fail with read-model or signing errors on `aa95b4cf` too; not fixed here; see Stage 2 notes.
  - Pending: zenmemes.com acceptance.

## Cycle retrospective

2026-11-30, Claude, single exposed rater. **Retrospective scope assessment: 1.05**, against the 0.85 Step 3 projection. The delivered scope grew within Step 2 requirement 3: the new-install seed and the default icon art were found only by running a fresh clone. The rest was the agent-prompt discovery and the pre-existing test fix. This is a scope assessment, not measured time. Maintainer comfortable-fit judgment: pending.

*— Claude · 2026-11-30 UTC · Model: claude-opus-5-5*

## Acceptance (2026-12-01)

- Merged in PR #494 on 2026-11-30 (`9262a18`). The maintainer set `FORUM_SITE_ID=zenmemes` on zenmemes.com and deployed.
- Checked from outside on 2026-11-30: zenmemes.com serves the new code (the zenmemes-only theme-key script is present) with the ZenMemes name, favicon and theme.
- The maintainer checked zenmemes.com on 2026-12-01: "zenmemes looks fine." **Accepted.**
- Follow-ups: [plain_about_copy](../plain_about_copy/plain_about_copy_one_shot.md) (merged with #494), [collapse_same_author_default_off](../collapse_same_author_default_off/collapse_same_author_default_off_one_shot.md) (PR #498), local_tour_link (PR #503). Remaining work is in the [fresh install checklist](../fresh_install_checklist.md).
