Thank you for improving P-Type. Keep changes focused, accessible, responsive, and supported by executable evidence.
Use Node.js 24.4+ and npm 11.4.2+:
npm ci --ignore-scripts
python -m pip install --require-hashes -r requirements-quality.txt
pre-commit install
pre-commit run --all-files- Create a topic branch from the current default branch.
- Add or update tests with the behavior change.
- Preserve strict TypeScript: do not add
any, non-null assertions, or suppression comments to bypass a defect. - For UI work, verify keyboard operation, meaningful accessible names, focus visibility, reduced motion, and narrow as well as desktop layouts.
- Update README or
docs/whenever behavior, configuration, controls, dependencies, deployment, or content changes. - Follow AGENTS.md, update the canonical PLAN.md, and
run
npm run qualityandpre-commit run --all-files. Do not suppress an unresolved historical credential to manufacture a passing release gate. - Open a pull request that explains the outcome, risk, and verification.
Formatting-only changes should remain separate from behavioral refactors when
possible so review history stays useful. Do not commit generated dist/,
coverage/, local environment files, editor state, logs, or user save data.
Vitest enforces measured global floors: 94% statements, 82% branches, 97%
functions, and 95% lines. jsdom covers application orchestration, UI, state, content loaders, and
domain logic. Scene tests exercise real frame callbacks with the React Three test renderer;
Production WebGL integration still requires the browser gate. Browser automation
must use isolated profiles, --mute-audio, and zero test audio volumes.
An accessibility regression is a functional regression. Component tests use axe-core where a meaningful rendered surface exists, but automated checks do not replace keyboard and responsive browser verification.
- Use an imperative, scoped commit subject such as
fix: preserve the selected trivia answer. - Keep the lockfile synchronized with
package.json. - Never commit credentials, private keys, tokens, or production user data.
- Report any release or browser verification limitation explicitly.
- Commit reviewable increments regularly and open/update a PR during delivery.
- Every commit runs the complete
quality:codeaggregate. CI runsquality, adding the required reachable-history scan.ci:parityrejects missing or conditional gates. Run the full local aggregate before merge and report any remaining history blocker in a draft PR; never bypass hooks.
Run npm run test:red after gate, behavior, fixture, or tool changes. The harness
uses a disposable repository, verifies intended diagnostics and nonzero exits,
restores exact bytes in all outcomes, and proves restored green. A focused drill
can be selected by name, for example npm run test:red -- "trivia retry".