# Contributing to RentalDriveGo Web

## Required runtime

Use Node.js `24.17.0` and pnpm `11.9.0`. Exact dependency versions and the frozen lockfile are part of the architecture contract, not optional decoration.

## Before editing

1. Read `docs/PHASE_12_HANDOFF_v1.0.md` for component rules.
2. Check `docs/IMPLEMENTATION_ISSUE_REGISTER_v1.1.csv` before adding copy, routes, claims, destinations, integrations, or evidence.
3. Preserve `contracts/phase9` byte-for-byte.
4. Consume component-facing tokens from `src/styles/component-tokens.css`.
5. Use translation resources and route IDs rather than hard-coded visible copy or paths.

## Required checks

```bash
pnpm install --frozen-lockfile
pnpm validate
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test:unit
SITE_ORIGIN=http://127.0.0.1:3000 PUBLIC_RELEASE_APPROVED=false pnpm build
pnpm test:e2e
```

Before packaging a reviewed release candidate:

```bash
pnpm manifest:generate
pnpm validate:package
```

Do not regenerate visual snapshots merely to silence a failure. A consistently wrong screenshot is still wrong, just more organized.

## Architecture changes

Changes to routing, localization loading, token authority, theme persistence, CSP, styling system, state management, metadata generation, or the server/client boundary require an ADR before implementation.

## Phase 14 integration rules

- Keep all vendor access behind typed server-side adapters.
- Never add personal data to URLs, analytics, logs, snapshots, or browser storage.
- Preserve the immutable Phase 9 form field contract unless an approved contract revision is supplied.
- Production demo submission must fail closed until legal, CRM, retention, duplicate, and operational decisions are approved.
- Browser tests use fictional `.test` identities and must never contact real services.
- Run `npm run validate:phase14`, `npm run typecheck`, `npm run test:unit`, `npm run test:integration`, and `npm run build` before proposing a change. The authoritative release environment remains Node 24.17.0 with pnpm 11.9.0.
