docs: surface i18n validator stack + format helper convention

- CLAUDE.md: validate:all section now lists every individual check
  (turbo / pg-schema / theme-{variables,utilities,parity} /
  i18n-{parity,hardcoded,keys} / crypto / encrypted-tools) instead of
  the stale "three invariant checks" line.
- .claude/guidelines/sveltekit-web.md: new "i18n" section with the
  hardcoded-strings rule (use $_), the parity/missing-key gates, and
  the formatDate/formatNumber/getDateFnsLocale convention vs.
  toLocaleDateString('de-DE').
- .claude/GUIDELINES.md: index gains "i18n" tag for the SvelteKit page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-25 12:07:35 +02:00
parent 01e6b9f044
commit 7e6fb5b6d1
3 changed files with 68 additions and 4 deletions

View file

@ -84,13 +84,22 @@ Quality:
pnpm run build
pnpm run type-check
pnpm run format
pnpm run validate:all # turbo recursion + pgSchema + crypto registry — run before push
pnpm run validate:all # turbo + pgSchema + theme + i18n + crypto — run before push
pnpm run test:coverage # emit v8 coverage under per-package coverage/
```
`validate:all` is the local mirror of the CI `validate` job — it runs in
seconds and fails fast on any of the three invariant checks. Use it as a
pre-push gate.
seconds and fails fast on any invariant check. Currently bundled:
- `validate:turbo` — no recursive `turbo run` calls in non-root packages
- `validate:pg-schema` — every Drizzle table uses `pgSchema(...)`
- `validate:theme-{variables,utilities,parity}` — token coverage across CSS variants
- `validate:i18n-parity` — every namespace mirrors DE's key-set across all 5 locales
- `validate:i18n-hardcoded` — ratcheting baseline; new German strings without `$_()` fail
- `validate:i18n-keys``$_('key')` calls must resolve to a defined DE key (baseline-tracked)
- `check:crypto` + `audit:encrypted-tools` — every Dexie table classified, every AI tool aware of encryption
Use it as a pre-push gate.
## Key Architecture Notes