task 9 brief - xopherdeep/do-it-for-the-xp GitHub Wiki
Files:
- Modify:
tools/temples/classic/dress.ts(awind-templeplan),tools/temples/classic/overrides/wind-temple.json - Generated:
src/lib/engine/temples/wind-temple.ts - Test:
tests/unit/WindTemple.spec.ts,tests/unit/ClassicTemples.spec.ts(Wind joinsCLASSIC_IDS)
Interfaces: consumes Task 6's Wind JSON and Task 7's dress step.
- Step 1: Rewrite the failing tests in
WindTemple.spec.ts:- the 17 Eagle cells hold the JSON's contents: 6 key drops or key chests, map, compass,
big-chest→ Wind's relic, the boss at (1,4) and the Master Room at (1,5); - the old man's cell (2,0) is the shop;
- the owner's 4 rooms (3,5), (4,4), (4,5), (5,5) are exactly today's rooms: the Boss Key chest, the key room, the cobweb-widow miniboss, the teleport;
- every beast is a wind beast, and the plan keeps all 9 of today's quests.
dust-bunny-king(3) is the miniboss in the Eagle's must-clear room nearest the boss door, placed by the override.
- the 17 Eagle cells hold the JSON's contents: 6 key drops or key chests, map, compass,
- Step 2: Run
chemx test tests/unit/WindTemple.spec.ts. Expected: FAIL. - Step 3: Implement the Wind plan. The override re-adds the owner's 4 rooms and their sides verbatim. The Big Key stays in the owner's east chest, so no Big Key comes from Zelda (Level 1 has none).
- Step 4: Run
WindTemple.spec.ts,ClassicTemples.spec.tsandShippedTemplesAudit.spec.ts. Expected: PASS. - Step 5: Commit
feat(temples): the Wind Temple's rooms follow Zelda's Eagle one to one.
- Wind is dressed by the same tool as the eight LTTP temples (
tools/temples/classic/dress.tsand its modules; plans inCLASSIC_PLANSindressPlans.ts; read the Storm and Earth entries and theminibossRoomsfield Task 8 added). Wind's source istools/temples/classic/dungeons/wind-temple.json(Task 6): 18 cells — the 17 Eagle cells on 1F plus the bow basement as floor B1 holding thebig-chest, linked by a teleport pair to (0,1); the Triforce cell has no schema flag (room name "Eagle Triforce", cell (1,5));enemies: 1per enemy room means "at least one". - The owner's 4 east rooms come back through
tools/temples/classic/overrides/wind-temple.json(or a dress-side override), verbatim from today'ssrc/lib/engine/temples/wind-temple.ts(git show 61d7b718:src/lib/engine/temples/wind-temple.ts): L0503 at (3,5) the Boss Key chest (dungeon: "master-key"), M0404 at (4,4) the Key room (monsterType: "small"), m0504 at (4,5) the cobweb-widow miniboss, T0505 at (5,5) the teleport; with their sides. - Today Wind is the guard's "R2: no Boss Key" because the JSON has none; with the owner's L0503 back it must solve with no R-reasons, pass the audit, and need the Boss Key.
The owner's route to his Boss Key is: bomb the cracked wall between (1,2) and (0,2) -> the circle at (0,1) -> the circle at (5,5) -> his east rooms -> the Boss Key at (3,5); the temple shop S0002 at (2,0) (Zelda's old man's room) sells the Bomb before the wall. In Zelda, (0,1) is the push-block stairway to the bow basement, which holds Wind's relic. Keep BOTH: the circle at (0,1) rides down to the basement (B1) where the relic chest sits, and a second circle in the basement rides on to (5,5). The basement floor therefore holds an arrival circle, the relic chest and a departure circle (three cells on B1). The route is: wall -> (0,1) -> basement (relic) -> (5,5) -> east rooms -> Boss Key. Record the added cells in classicReport.
- The plan keeps all 9 of today's Wind quests (see today's file and docs/Quest-Rooms-Spec.md section 11);
dust-bunny-king(3) is a miniboss in the Eagle's must-clear room nearest the boss door (useminibossRooms); the cobweb-widow miniboss stays in the owner's m0504. - The old man's room (2,0) is the shop (S0002, special item and Bomb as today); keep Wind's relic (the Wind Whistle per
src/lib/services/temples/ChestLoot.tsWIND_WHISTLE, or today's plan's relic — check which the old file and today's plans use) in the basement's big-chest. -
tests/unit/WindTemple.spec.tsis rewritten as the plan's Task 9 says, adjusted to the basement being floor B1 (the 17 Eagle cells on 1F hold the JSON's contents except the big-chest, which is on B1). - ClassicDungeonGuards / ClassicTemples / ShippedTemplesAudit: Wind joins CLASSIC_IDS (out of SHIPPED_IDS); every guard green.
chemx test tests/unit/WindTemple.spec.ts, 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). Audit npx --yes [email protected] audit --no-index --unroll > /tmp/audit-t9.txt 2>&1 (no file you touch may newly appear under LINE_BUDGET_FILE / CONTROL_FLOW_INLINE_BOOLEAN / TYPE_COLOCATION / HOOK_RETURN_OVERLOAD / UNGUARDED_LOGGING), then git checkout -- chemx-ratchet.json.
- 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.