task 12 context - xopherdeep/do-it-for-the-xp GitHub Wiki
Earlier tasks you consume (on this branch; read with chemx read <file> --outline / --symbol=<name>):
- T2
src/lib/services/core/packs/projects/movingOut.ts(the Moving Out type: its four phases and the roof's Hand Over the Keys),src/lib/services/core/packs/movingPack.ts(MovingAnswers, themove-*quests, categoriescat-move-<phase>,movingBeastId). - T4
src/lib/services/projects/projectChores.ts(ProjectChorewithcustom,WHOLE_HOUSE_ID,rehomeChores). - T8/T10
src/lib/services/projects/projectService.ts(startProject,settleReadyFloors, ...). - T9
src/lib/services/projects/projectWizard.ts(ProjectDraft,newProjectDraft,projectIdOf) andsrc/app/SideMenu/XpSettings/components/XpProjectWizardModal.vue. - T11 the finish (credits, trophy sheet in Hometown).
Rulings (decided; follow them):
-
prefillMovingOut(answers, openMoveQuests, heroes)lives in a pure module (e.g.src/lib/services/projects/movingOutPrefill.ts) withtests/unit/movingOutPrefill.spec.ts. An openmove-*quest becomes acustomchore on its phase (from its categorycat-move-<phase>), keeping its name, size and assignees;campandunpackquests are left out; a quest whose phase is not a Moving Out phase is left out (say which in the report). The rooms come from the last Moving House answers; with no answers, the default house. - The wizard opens pre-filled: give
XpProjectWizardModalan optional initial draft (or type id + prefill) prop, so the Moving House entry opens it on Moving Out with the prefill and the wizard keeps every rule (dates, reward, one active project). Do not duplicate the wizard. - Building the Moving Out project from the prefill retires the Old House: remove the
gen-move-housetemple record, delete the openmove-*quests that were carried into the draft as chores (they live in the tower now; leaving them would put every chore on the board twice), keep every paid quest and its log, and keep thecamp/unpackquests on the board. Reset the heroes' saved runs in the Old House (forgetOldHouseWalks,src/lib/services/core/packs/movingTempleReset.ts). Pin each part with a spec case. - The Old House spot in Hometown hides when the active or the last project is Moving Out (any status but
abandoned; an abandoned Moving Out run brings the Old House back only if its temple record still exists, otherwise it stays hidden). Keep the existing family data: never wipe a store. - Removal: delete
buildMovingTemple,movingTempleBackup,src/lib/services/core/packs/movingTemple.ts,src/lib/services/core/packs/movingTemple/houseRecord.ts,tests/unit/movingTemple.spec.tsand the houseRecord specs only oncechemx q -g "buildMovingTemple"andchemx q -g "houseRecord"find no importer outside them. KEEPhouseRooms.ts,housePlanner.ts,movingTempleReset.ts(if still used) andtests/unit/movingHouseFixtures.ts(Task 6's matrix imports it; earlier ruling R6). Repoint anything else that imported the deleted modules. - The Cypress spec
tests/e2e/specs/moving-temple.spec.js(andmoving-pack.spec.jsif it walks the Old House build) exercises the removed builder: update it to the new flow (the moving entry opens the wizard on Moving Out) or remove the parts that test the deleted code; say which in the report. CI's E2E smoke on master runs onlynew-hero,party-style specs listed in.github/workflows/tests.yml; check that none of them reaches the removed code. - The e2e walk (
tests/e2e/specs/project-tower.spec.js, 390x844,cy.seedWorld(),cy.tapToWakeAudio()) follows the brief. The credits show the makers' names and roles only (owner ruling 2026-10-27: no ages anywhere); assert "Xopher Pollard aka XP" and never an age. Run it on this worktree's OWN dev server: the shared :8100 serves the main checkout's files, not yours. These two raw commands are allowed for this task only, from the worktree root:- start:
pnpm vue-cli-service serve --port 8123in the background (orpnpm exec ionic serve --port 8123 --no-openif the vue-cli one does not serve the app the way ionic does); wait untilcurl -s localhost:8123answers; - run:
pnpm vue-cli-service test:e2e --headless --browser chrome --url http://localhost:8123 --spec tests/e2e/specs/project-tower.spec.js(Cypress 8; screenshots land in tests/e2e/screenshots); - ALWAYS stop the server when done, by port:
lsof -ti:8123 | xargs -r kill(neverpkill -f: it kills the shell). A dev server costs 2-5 GB: start it once, run the spec as often as you need, stop it. If the walk cannot pass for a reason outside this task (a seed fixture gap, an unrelated screen bug), report DONE_WITH_CONCERNS with the failing step and the screenshot path rather than weakening the walk.
- start:
- Do not commit screenshots or videos (the lead commits by path; list only source files in your report).
- From Task 11:
XpProjectWizardModal.vuealready takes an optionaltypeIdprop (the trophy's "Start again" uses it); extend that same entry for the Moving Out prefill (e.g. an optional initial draft) instead of adding a second way in. The finish lives insrc/hooks/useProjectFinish.ts,src/lib/services/projects/projectFinish.ts,CreditsRoll.vueandProjectTrophySheet.vue; the credits show roles and names fromsrc/lib/services/copy/credits.ts. - Audit ratchet (CI gate): add no new hazards. Keep each file you touch at 500 lines or fewer if it was under (HomeTown.ts, PacksSettings.vue), name every condition before its
ifbut never name a boolean only to return it, no long repetitiveswitch, function complexity 12 or under. Before you report, runchemx auditat the worktree root and include itsgate:line (ignore the modified chemx-ratchet.json: the local chemx rewrote it; the lead never commits it). Deleting files lowers counts; that is fine.