Skip to content

Commit 2dd592f

Browse files
committed
docs(agents): map the new ratchets and lint rules in the guardrail table
1 parent 1cf37ca commit 2dd592f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎CLAUDE.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The `'use client'` server boundary, the app/worker runtime env split, and featur
8282

8383
## Code Conventions
8484

85-
- **Naming**: components PascalCase (`WorkflowList`); hooks `use*`; files kebab-case (`workflow-list.tsx`); constants SCREAMING_SNAKE_CASE; interfaces PascalCase with a suffix (`WorkflowListProps`); stores `stores/<feature>/store.ts`. A file never repeats its folder's name (`lib/logs/views.ts`, not `lib/logs/log-views.ts`; `utils/date.ts`, not `utils/date-utils.ts`); `check:file-names` enforces this.
85+
- **Naming**: components PascalCase (`WorkflowList`); hooks `use*`; files kebab-case (`workflow-list.tsx`); constants SCREAMING_SNAKE_CASE; interfaces PascalCase with a suffix (`WorkflowListProps`); stores `stores/<feature>/store.ts`. A file never repeats its folder's name (inside `logs/`, `views.ts` not `log-views.ts`; inside `utils/`, `date.ts` not `date-utils.ts`); `check:file-names` enforces this.
8686
- **Imports**: absolute (`@/...`) only, never relative (a barrel `index.ts` re-exports its own siblings relatively). A folder with 3+ exports gets an `index.ts` barrel; never re-export from a non-barrel file. `import type` for type-only imports. Order and lazy-loading through barrels: `.claude/rules/sim-imports.md`.
8787
- **TypeScript**: no `any` and no non-null `!` (use precise types or `unknown` with guards; `check:explicit-any` ratchets both); no export nothing imports (`check:unused-exports`); a props interface for every component; `as const` for constant objects/arrays; explicit ref types (`useRef<HTMLDivElement>(null)`).
8888
- **Unused bindings** fail lint (biome `noUnusedVariables`, `noUnusedFunctionParameters`): delete the dead variable, import, or parameter and update callers; write `catch {}` when the error is unused. Prefix `_` only for a parameter that must hold its position because a later one is used. `const { a, ...rest } = obj` to omit keys is allowed. The rules carry no autofix, so `bun run lint` will not rename anything for you.
@@ -150,7 +150,7 @@ A diff that touches `packages/db/migrations/**` also runs `bun run check:migrati
150150

151151
| Written rule | Enforced by |
152152
| --- | --- |
153-
| Formatting, lint, no `nanoid`/`uuid` imports | `bun run lint` (biome) |
153+
| Formatting, lint, no `nanoid`/`uuid` imports, no unused variables or parameters | `bun run lint` (biome) |
154154
| `@sim/utils` over inline idioms (`Math.random`, `crypto.randomUUID`, `JSON` clone, `instanceof Error` message, `setTimeout` sleep) | `check:utils` |
155155
| `apps → packages` only; realtime import bans | `check:boundaries`, `check:realtime-prune` |
156156
| Route contracts, no `zod` in routes or clients, `requestJson`, boundary annotations | `check:api-validation:strict`, `check:api-contract-routes`, `check:route-verbs` |
@@ -164,8 +164,11 @@ A diff that touches `packages/db/migrations/**` also runs `bun run check:migrati
164164
| Canvas sentences, BYOK wiring, fork-dependent subblocks, reachable tool params | `check:canvas-sentences`, `check:byok-providers`, `check:fork-dependent-coverage`, `check:tool-param-reachability` |
165165
| Central mocks, colocated tests, script tests collected | `check:test-patterns`, `check:script-tests` |
166166
| Zero-downtime migrations | `check:migrations <base>` |
167-
| Unused files, exports, dependencies | `check:dead-code` (knip) |
167+
| Unused files, exports, types, dependencies (exports and types ratcheted) | `check:unused-exports` (knip) |
168+
| No `any` or non-null `!` (ratcheted), no suppressions of either | `check:explicit-any` |
169+
| kebab-case file names; no file repeating its folder's name | `check:file-names` |
170+
| No banner separators or commented-out code | `check:comment-hygiene` |
168171
| Skills and rules projections in sync; guidance references resolve | `check:skills`, `check:guidance-refs` |
169172
| Generated artifacts fresh (tool metadata, docs, catalog, CLI/MCP/OpenAPI surfaces) | the `*:check` entries in `check:audits` |
170173

171-
Rules not in this table (logging, comments, naming, imports, styling, state ownership, caching) are enforced by review only; follow them as written.
174+
Rules not in this table (logging, the rest of comment style and naming, imports, styling, state ownership, caching) are enforced by review only; follow them as written.

0 commit comments

Comments
 (0)