global constraints - xopherdeep/do-it-for-the-xp GitHub Wiki

Global Constraints (part 2)

  • You work in your own isolated git worktree branched from origin/master; run pnpm install --frozen-lockfile --prefer-offline first. 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). Never git stash.
  • Use chemx only. Run only the spec(s) your brief names, one at a time: chemx test tests/unit/<Name>.spec.ts. Never raw pnpm test|typecheck|lint|jest or npx jest, never a bare chemx test, never chemx 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", "") against BEAST_LIBRARY[].theme.
  • Game rules go in pure modules under src/lib/services/** (or src/lib/engine/**) with jest specs; screens stay thin. New components use <script setup lang="ts">; pages keep defineComponent with a sibling .ts/.scss.
  • In-world text comes from the copy catalogue (src/lib/services/copy/catalog/, three voices) through useCopy(); in-world prompts use useRevealPrompt(), never Ionic alerts. Sounds use play$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 (isBossRoom in authoredDoors.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.
⚠️ **GitHub.com Fallback** ⚠️