- English is the primary language for all repository content, including documentation, PRDs, plans, code comments, examples, UI source strings, and commit/PR text.
- Write new and updated content in English regardless of the language used in the request, unless another language is explicitly required. Follow the translation and localized-test-fixture rules below for localization.
- Install Node.js 22.14.0+ and pnpm 9.7.1.
- Run
pnpm installin the repo root to bootstrap all workspace packages. - Use
pnpm devto start the server and client concurrently for local development. - Run
pnpm buildto generate production assets. - Prefer reusing existing hooks, components, utilities, and other project assets instead of creating new implementations.
- Treat all tRPC HTTP inputs as JSON wire values; objects such as
Datearrive in their serialized form unless a transformer is explicitly configured. - For date inputs, use
z.coerce.date<Date>()at the server boundary, or validate an ISO date string and convert it before use. - Cover the serialized wire value in route tests. Do not test date inputs only by passing a native
Datedirectly to a caller.
All user-facing copy must be written in English and wrapped with the project's t() translation function. Do not add Chinese copy directly in source code.
Do not use {{count}} as a translation interpolation variable. Use {{num}} or another descriptive name, with a matching key in t() options, for example: t('{{num}} items', { num: total }).
When generating code, do not modify any JSON files in src/client/public/locales. These translations are managed separately.
- Record every successful authenticated persistent create, update, and delete operation, plus permission and API key changes, in the workspace audit log.
- Prefer the shared audited workspace mutation procedures. If an endpoint bypasses them, write the audit log explicitly after success. Include the actor, action, target, and redacted changed fields; never persist secrets.
- CI configuration is under
.github/workflows. - Run
pnpm check:typeandpnpm buildto mirror CI checks. - Execute
pnpm testto run Vitest across packages (orpnpm -r testfor individual packages). - Focus on one test with
pnpm vitest run -t "<test name>". - Do not use Chinese text in test cases; use Spanish for localized test fixtures and assertions.
- Title your PR using Angular commit style, e.g.
feat: add new feature.