diff --git a/CLAUDE.md b/CLAUDE.md index 80112d90..564fe6dc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -126,7 +126,7 @@ history was deleted because it had drifted from the real schema. Treat the schem files, as the source of truth. **Declare multi-column uniqueness as `uniqueIndex('uq_…').on(a, b)`, never `unique('uq_…').on(a, b)`** — -drizzle-kit mis-diffs named composite unique *constraints* and re-creates them on every push, which used +drizzle-kit mis-diffs named composite unique _constraints_ and re-creates them on every push, which used to stop `db:push` on an unanswerable truncate prompt. Same for any foreign key whose generated name would exceed Postgres's 63-character identifier limit: name it explicitly. See `src/databases/CLAUDE.md` → "Composite keys" before adding either. @@ -170,7 +170,7 @@ ahead of everything, and it re-verifies the token itself so it covers routes tha survive the next door; refusing to boot does. So **adding a router means adding one line to `CAPABILITIES`**. If the surface genuinely is not -user-gated, add it to `EXEMPT_API_PREFIXES` in `totality.ts` *with a reason* — an unexplained exemption +user-gated, add it to `EXEMPT_API_PREFIXES` in `totality.ts` _with a reason_ — an unexplained exemption is how the hole happened the first time. The frontend hook `useCapabilities` **fails open** on purpose: hiding a dock icon is a courtesy, the @@ -219,12 +219,11 @@ so it rewrites every uncommitted file — including work in progress that isn't up as unexplained whitespace churn in someone else's diff. Run `bunx prettier --write ` on the files you actually touched. `bun format` is only safe when the tree is otherwise clean. - ## Code Style - **Paradigm**: functional — pure functions, immutability, composition - **TypeScript**: strict, no `any`. Type-only imports are required (`verbatimModuleSyntax`). -- **Comments**: minimal, and about *why*. Don't narrate what the code already says. +- **Comments**: minimal, and about _why_. Don't narrate what the code already says. - **Async**: always async/await - **Exports**: named only, no defaults - **Files**: `PascalCase.tsx` for components, `kebab-case.ts` for everything else @@ -323,7 +322,7 @@ link-focusable). Half the app still does this; none of the new code should. `f35c145`); **react-router's ``** for nav chrome, so active state comes from the router. The hand-rolled `isActive` in `Dock`/`Header` is scheduled for replacement (audit Phase 4) — don't copy it. A disabled entry renders as a ``; a disabled `` is not a thing. A control that - *mutates* rather than navigates stays a `