Repository navigation
task 8 brief
Files per temple: tools/temples/classic/dress.ts (its CLASSIC_PLANS entry), tools/temples/regenerate.ts (PLANS loses it), src/lib/engine/temples/<id>.ts (generated), tools/temples/classic/overrides/<id>.json if the converter needs one.
Interfaces: consumes Task 7's ClassicPlan, dressClassic and renderClassicModule; produces nothing new.
Order (smallest first): Earth/Skull Woods, Light/Desert Palace, Water/Swamp Palace, Shadow/Palace of Darkness, Ice/Ice Palace, Fire/Turtle Rock, Moon/Ganon's Tower.
- Step 1: Add the plan:
- the theme and relic from today's
PLANSentry; -
mustClearsized to the report's count, with distinct beasts of the theme, keeping every beast of today's plan; - minibosses at 3–5, and the boss at 8 (13 for Fire, Ice) as today.
- the theme and relic from today's
- Step 2: Generate the temple. Then run
chemx test tests/unit/ClassicTemples.spec.tsandchemx test tests/unit/ShippedTemplesAudit.spec.ts. Expected: PASS. - Step 3: Paste
classicReport(id).repeatsinto the board task. For Moon, also paste the floor count and must-clear count: the owner decides on the Misery Mire fallback from those numbers. - Step 4: Commit
feat(temples): the <Name> Temple follows <Dungeon>.
- The dress tool:
tools/temples/classic/dress.ts(entry + CLI; run with esbuild exactly as its header says) and its modules (dressBoard.ts,dressPlace.ts,dressReach.ts,dressLinks.ts,dressDoors.ts,dressRooms.ts,dressChores.ts,dressPlans.ts). Plans live inCLASSIC_PLANSindressPlans.ts(Storm is the model: read its entry andClassicPlan);CLASSIC_IDS = Object.keys(CLASSIC_PLANS). - Per temple: add its
CLASSIC_PLANSentry; remove it fromPLANSintools/temples/regenerate.ts; run the dress CLI for that id to writesrc/lib/engine/temples/<id>.ts; the existing specs then hold it to the classic rules (ClassicTemples.spec.ts iterates CLASSIC_IDS; ShippedTemplesAudit.spec.ts iterates the remaining SHIPPED_IDS). -
tests/unit/ClassicDungeonGuards.spec.tsdresses every JSON in memory under the Storm plan as a stand-in and pins build/solve/reasons per temple. When you dress a temple with its own plan, move that temple's pin to its own plan (or have the guard useCLASSIC_PLANS[id]when present) and pin the real result. The two structural guards (every boss-blocking seal kept; with every seal blocked, no extra reach) must stay green for every temple. - Current stand-in results: Earth and Light clean; Ice, Fire, Moon, Shadow, Water solvable with one R4 each (the mini-boss choice: each temple's own plan settles it — choose minibosses so the audit has no R4); Wind R2 (not yours: Task 9).
- The goal per temple: builds,
solveTemple(...).solvable, the audit passes with no R-reasons, the Boss Key is needed to reach the boss, every guard green. - Chores, per the lead's rulings: must-clear plans start from today's beasts in
PLANS[id].quests(everySTARTER_QUESTSbeast today's plan holds keeps a must-clear room; if a temple has fewer must-clear rooms than starter beasts, the overflow goes to side rooms as Storm did with Toybox Troll, recorded inclassicReport(id).overflow), topped up with other beasts of the theme (BEAST_LIBRARY[].theme === id.replace("-temple","")) to the must-clear count; extras leave the temple; side rooms cycle through their floor's must-clear beasts; a plan short of beasts repeats one and lists it inclassicReport(id).repeats(the art task reads it). Difficulty: must-clear monsters 1-2, minibosses 3-5, boss as today's plan (8, 13 for Fire and Ice). - Relics and shop items: keep each temple's from today's
PLANSentry. - The swamps (Shadow Temple) keep Palace of Darkness (owner default; Misery Mire was offered and not chosen).
- Moon (Ganon's Tower): GT Quad Pot (3F 12,24 in the JSON) has enemies that are all minibosses; make sure the dressing and plan treat it as the miniboss room it is (not a plain must-clear monster) if the tool does not already.
-
ShippedTemplesAudit.spec.tsandClassicTemples.spec.tsmust stay ≤ 500 lines; split a spec rather than grow it past. - Order: Earth, Light, Water, Shadow, Ice, Fire, Moon — one commit per temple (
feat(temples): the <Name> Temple follows <Dungeon>), each with its specs green before the next.
chemx test tests/unit/ClassicTemples.spec.ts, chemx test tests/unit/ClassicDungeonGuards.spec.ts, chemx test tests/unit/ShippedTemplesAudit.spec.ts (one at a time). Before the final commit: npx --yes chemx@26.10.19-530 audit --no-index --unroll > /tmp/audit-t8.txt 2>&1, check no file you touched newly appears under LINE_BUDGET_FILE / CONTROL_FLOW_INLINE_BOOLEAN / TYPE_COLOCATION / HOOK_RETURN_OVERLOAD / UNGUARDED_LOGGING, then git checkout -- chemx-ratchet.json. The generated temple modules may be long: if a module crosses 500 lines, say so in the report (the lead decides; do not hand-split generated files).
- You work in your own isolated git worktree branched from origin/master; run
pnpm install --frozen-lockfile --prefer-offlinefirst. Commit on your branch only; the lead merges it into feat/classic-temples-2 and ships one PR. Never touch /home/xopher/www/x/do-it-for-the-xp itself (other sessions share it). Nevergit stash. - Use chemx only. Run only the spec(s) your brief names, one at a time:
chemx test tests/unit/<Name>.spec.ts. Never rawpnpm test|typecheck|lint|jestornpx jest, never a barechemx test, neverchemx verify, no typecheck/lint/build (the lead runs those once per wave; CI runs the suite on the PR). - Keep every file you create or grow under 500 lines (the repo's audit ratchet counts files over 500 as LINE_BUDGET_FILE). Name inline conditions in
ifs (const isX = ...; if (isX)), and give object-literal parameter types a named interface (TYPE_COLOCATION) — the ratchet blocks the PR otherwise. - Temple ids, names, regions and themes don't change (
wind-temple,earth-temple, …). Theme =id.replace("-temple", "")againstBEAST_LIBRARY[].theme. - Game rules go in pure modules under
src/lib/services/**(orsrc/lib/engine/**) with jest specs; screens stay thin. New components use<script setup lang="ts">; pages keepdefineComponentwith a sibling.ts/.scss. - In-world text comes from the copy catalogue (
src/lib/services/copy/catalog/, three voices) throughuseCopy(); in-world prompts useuseRevealPrompt(), never Ionic alerts. Sounds useplay$fx(<key of src/assets/fx/index.ts>). - Original beasts 001–093 are family art: never overwrite or re-point them.
- Quest difficulty is Fibonacci: must-clear monsters 1–2, minibosses 3–5, boss 8–13. Schedules follow
SCHEDULES(daily 19:00, am 08:00, bed 20:30, school weekdays, weekly 18:00, monthly custom). - Every door into a boss room is a Boss door (
isBossRoominauthoredDoors.ts). Bombs never open locked doors. - Keep comment density and naming like the surrounding code (long, plain-English doc comments).
- Do not dispatch subagents of any kind, and never a reviewer.
- Architecture
- Component-Library
- Hooks-Reference
- Temple-System
- Battle-Field-Architecture
- current_context - For AI/Human Handoff
- User Menu
- General Settings
- Family Settings
- Sound Settings
- Notification Settings
- Reward Settings
- Party Settings
- Theme Settings
- Chore Settings