Adds web/GUARDRAILS.md capturing the recurring CI-guardrail and test-harness lessons in one place: the check:size (250 KB-gz largest chunk) and check:colors (design-token) guards, the jsdom/storybook vitest split, MSW onUnhandledRequest:"error" overrides, RTL accessible-name collisions, Storybook nested-router/portal handling, and the components/ui code-style split. Wires a pointer from CLAUDE.md. All claims verified against the live scripts, ci.yaml, and src/test/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,3 +28,4 @@ cargo clippy --workspace --all-targets -- -D warnings # lint before committing
|
||||
- **Code navigation:** prefer the insikt LSP server over grep/glob — it resolves macro-generated symbols that text search misses. (insikt runs standalone, not via the gateway MCP.)
|
||||
- **Dependencies:** manage via the `cargo-mcp` server rather than editing `Cargo.toml` by hand.
|
||||
- **Formatting:** `cargo +nightly fmt` (nightly toolchain required).
|
||||
- **Frontend guardrails:** before touching `web/`, read **[web/GUARDRAILS.md](web/GUARDRAILS.md)** — it covers the CI gate (`check:size` 250 KB-gz budget, `check:colors` design-token enforcement) and the test-harness quirks (MSW `onUnhandledRequest: "error"`, the jsdom/storybook vitest split, RTL accessible-name collisions, Storybook nested-router and portal handling, and the `components/ui/` code-style split).
|
||||
|
||||
Reference in New Issue
Block a user