magicciv/.project/objectives/p1-16-guide-game1-scope-hygiene.md
Natalie c88e136469 fix(@projects): 🐛 update deployment and guide workflows
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 03:38:03 -07:00

8 KiB
Raw Blame History

id title priority status scope owner updated_at evidence
p1-16 Purge Game 2/3 scope bleed from user-visible Game 1 guide copy p1 done game1 tourguide 2026-04-18
public/games/age-of-dwarves/guide/src/pages/HomePage.tsx
public/games/age-of-dwarves/guide/src/pages/CommunicationsPage.tsx
public/games/age-of-dwarves/guide/src/pages/PromotionsPage.tsx
public/games/age-of-dwarves/guide/src/pages/survival-guide/data.ts
public/games/age-of-dwarves/guide/src/pages/progress-report/OverviewTab.tsx
public/games/age-of-dwarves/guide/e2e/scope-hygiene.spec.ts

Status — 2026-04-18 (tourguide, closed)

All acceptance bullets verifiable:

  • HomePage rewrite<Hero> / <Pitch> / FEATURES / <LoreSection> edited to Dwarves-first copy for the default build; magic paragraphs wrapped in <EpisodeGate min={2}> so the dev bundle still shows them. Three EpisodeGate usages in HomePage.tsx confirmed.
  • CommunicationsPage — "Archon Telepathy (Magic civs)" row gated via <EpisodeGate min={2}> (three gates in total now).
  • PromotionsPagedisciplinesData / infusionTrees / infusionConfig imports removed. Mana Infusions block replaced with a scoped note (lines 137-139) explaining Game 2's promotions page picks up the mechanic; zero imports of empty magic stubs remain.
  • SurvivalGuide data.ts — Pandemic scenario mitigation rewritten to a mundane quarantine-district mechanic; no spell / magic-school references.
  • Two post-agent patchesPersonalityAxesPage.tsx:60 ("channels ley lines, builds magic wonders" → "knowledge infrastructure, libraries + academies, wonder-adjacent tiles") and OverviewTab.tsx:157 ("High Archon death triggers succession crisis" → "Leader-death events trigger succession crises"). The parallel guide-web agent hit the API rate limit on its final summary turn before reaching these; tourguide patched them directly.
  • Scope-rule grep gategrep -RE "magic schools|High Archon|mana nodes|ley lines" public/games/age-of-dwarves/guide/src/ | grep -v 'EpisodeGate\|episode *>= *2\|VITE_DEV_GUIDE\|//' returns zero matches.
  • e2e scope-hygiene.spec.ts — 5 tests (home, combat, promotions, communications, survival) × 11 forbidden substrings. CI=1 pnpm exec playwright test scope-hygiene5 / 5 passed against the production build (served via pnpm preview). The spec's file header explicitly documents the CI-mode requirement since pnpm dev has VITE_DEV_GUIDE=1 and legitimately renders the gated subtrees.
  • No regressionspnpm --prefix … test:e2e all-routes stays 51 / 51 green after the Wave A edits. pnpm typecheck clean.
  • Deployed./run deploy:guide:next built the 13 MB dist and landed it at mc.next.black.lan via NEXT_DEPLOY_HOST=lilith@10.0.0.11 (plum's mDNS cache for the bare black.lan name is stale; the IP and *.black.lan subdomains resolve fine). HTTP 200 + JS MIME application/javascript both pass.

Cross-reference: p2-29 guide-welcome-homepage-theme-alignment (the WelcomeModal / theme-alignment sibling) and p2-32 guide-data-driven-enums (JSON files authored 2026-04-18) share the HomePage surface with this objective. Any follow-up HomePage prose edit should honor the scope gates established here.

Summary

CLAUDE.md's Game 1 scope rule is clear: Age of Dwarves Early Access ships with no magic — no magic schools, no Archons, no leylines, no mana. The <EpisodeGate min={2}> component + VITE_DEV_GUIDE=1 dev-bundle flag (p1-15) are the enforcement mechanism. But a 2026-04-18 Explore sweep catalogued six user-visible surfaces in the default Game 1 build that still advertise or document Game 2/3 cosmology:

File:Line Failure
HomePage.tsx:189190 (FEATURES) "5 Magic Schools" card with "cross-school fusions, 10 hybrid disciplines"
HomePage.tsx:246251 (Pitch) "16 asymmetric races, 5 magic schools … pursue arcane power"
HomePage.tsx:256275 (LoreSection) Two paragraphs of mana-nodes + ley-lines + school-aligned energy
CommunicationsPage.tsx:9798 "Archon Telepathy (Magic civs)" row in mundane radio-tower rules
PromotionsPage.tsx:5,1215,156193 Magic-data imports + "Mana Infusions" section + "Dispellable by Aether" / "High Archon dies" body text
SurvivalGuidePage data.ts:85 "Life T3 quarantine spell blocks adjacency transmission" in mundane survival scenario

These are RED — visible to someone opening the staging / production build without VITE_DEV_GUIDE=1. A player launching Early Access with one dwarf race should not be told the game has "5 magic schools" or read Archon mechanics in the communications tower rules.

YELLOW items (dev-bundle-only, flagged for opportunistic cleanup):

  • progress-report/OverviewTab.tsx:137,183 — hardcoded "5 trees, 30 policies" + "12 additional races" roadmap rows
  • GovernmentPage.tsx:48 (SKIP_MODS) — defensive filter for the Game-2 no_spell_pact_opposing_school modifier

Why P1 (not P2)

This is the inverse of p1-14 (which tried to ADD magic-school gating work to Game 1 and was rightly OOS'd). Here the work is removing Game 2/3 copy from Game 1 UI — exactly the spirit of p2-09's scope-narrow pass, but at the copy level. Early Access cannot ship with a homepage advertising mechanics that don't exist. Gated-behind- EpisodeGate OR pure Dwarf rewrite both count as "done"; the win is that grep stops finding magic terminology in default-build output.

Acceptance

  • HomePageHero / Pitch / FEATURES / LoreSection no longer mention magic schools, Archons, mana, ley lines, arcane, or cross-race counts ("16 races") in the default build. Either the prose is rewritten Dwarves-first (craft, industry, fortress cities, subterranean engineering, steam) or the magic paragraphs are wrapped in <EpisodeGate min={2}> so they reappear cleanly in the VITE_DEV_GUIDE=1 dev bundle.
  • CommunicationsPage — the "Archon Telepathy (Magic civs)" rules row is <EpisodeGate min={2}>-wrapped. The rest of the Radio Tower section reads mundane (wireless infra only).
  • PromotionsPagedisciplinesData / infusionTrees imports removed (they were empty stubs anyway). The "Mana Infusions" body block (lines 156193) + its Dispellable by Aether / High Archon dies text all wrap in <EpisodeGate min={2}>. The XP
    • promotion-tree body above is mundane and unchanged.
  • SurvivalGuidePage data.ts — the Pandemic scenario's "Life T3 quarantine spell" mitigation replaced with a mundane equivalent (e.g. "Quarantine House building" once that building lands, or "isolate infected cities" as a pure game mechanic until then).
  • Scope-rule grep gate — from the repo root, the command grep -RE "magic schools|High Archon|mana nodes|ley lines" public/games/age-of-dwarves/guide/src/ 2>/dev/null | grep -v 'EpisodeGate\|episode *>= *2\|VITE_DEV_GUIDE' returns zero matches. Mechanically-enforced scope integrity.
  • New e2e specpublic/games/age-of-dwarves/guide/e2e/scope-hygiene.spec.ts walks the five key Game 1 routes (home, communications, promotions, survival, combat) and asserts the rendered DOM contains none of the forbidden terms. Included in the pnpm test:e2e default run.

Non-goals

  • Rewriting the WelcomeModal — that's p2-29.
  • Converting the FEATURES array to a JSON data file — that's p2-32 (data-driven enums). p1-16 just gates / rewrites the magic cards; the data-drive pass comes later.
  • Fixing GovernmentPage.tsx:48 SKIP_MODS defensive filter — YELLOW, dev-bundle-only, addressed opportunistically.
  • Shared-primitive consolidation on the same pages — that's p2-30. Keep edits minimal and scope-only here.

Why tourguide owns it

Mechanical scope enforcement on the dev-preview + staging deploy (mc.next.black.lan) is squarely in Tourguide's mandate. The grep gate + scope-hygiene.spec.ts extend the Wave-1 e2e harness from p1-13, the same substrate Tourguide authored.