Pokemon Infinite Fusion Nuzlocke tracker with strict run-state invariants.
- Use
pnpmfor all package operations.
- Framework/runtime: Next.js 16 + React 19.
- State management: Valtio for app run-state, TanStack Query for server/cache state.
- Validation and schemas: Zod for runtime data boundaries.
- Keep repo-wide policy guidance minimal; put directory rules in local
AGENTS.mdfiles. - For targeted testing workflows, run the smallest relevant checks first before broader validation.
- When work touches game-rule behavior or run-state logic, read relevant domain docs listed in
docs/agents/domain/README.mdand localAGENTS.mdreferences. - Keep new guidance failure-mode-driven: prefer local
AGENTS.mdfor path scope and narrow skills for repeated non-obvious implementation errors. - Validation workflow for changed work: run
pnpm type-check, thenpnpm test:run, thenpnpm validatewhen scope is broad/cross-cutting. - React Compiler is enabled: omit routine
useCallback,useMemo, andReact.memoin compiler-covered components and hooks. For a hook-shaped helper without Hooks or JSX that needs referential stability (such as a context value), add a"use memo"directive.
- Use Helium against a production build on an isolated local port; record CPU/network/cache conditions when measuring performance.
- Clear the app origin's local/session storage, IndexedDB, Cache Storage, and service-worker registration before reproducing cold-state behavior.
- For CLS investigations, use a
PerformanceObserverto capture shifted DOM sources; do not attribute shifts from Lighthouse output alone. - If Helium cannot attach on Nix, launch its Playwright Chromium through
devenv shellwith remote debugging port0; direct launches can fail on missing runtime libraries.
Before any git commit or git push, run pnpm exec fallow audit --format json --quiet --explain. If the verdict is fail, fix the reported findings before retrying. Treat JSON runtime errors like { "error": true, ... } as non-blocking.
Audit defaults to gate=new-only: only findings introduced by the current changeset affect the verdict. Inherited findings on touched files are reported under attribution and annotated with introduced: false, but do not block the commit. Set [audit] gate = "all" in fallow.toml to gate every finding in changed files.