confab-web / frontend
CLAUDE.md15 starsChanged 3 months agoMITView on GitHub
Frontend conventions Claude would get wrong by default — commands, theme rules, build/lint/test gates. For architecture see README.md; for the module index see src/README.md. Add to this file only when the rule is (a) frontend-wide, (b) non-obvious from reading the code, and (c) Claude would get it wrong without the instruction. Always run from the frontend/ directory: Use npm run — never invoke tsc, eslint, or vitest directly. They live in node_modules/.bin which npm run adds to PATH automatically. If…
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- add-session-cardSkill
- backend-maintenanceSkill
- bugfixSkill
- cut-releaseSkill
- frontend-maintenanceSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Always run from the frontend/ directory:
- Very specific: line 19
Use npm run — never invoke tsc, eslint, or vitest directly.
- Very specific: line 23
All new or modified components get a story (Component.stories.tsx next to Component.tsx).
- Distinctive: line 32
If the TypeScript LSP is available, use it when it helps — go-to-definition, find-references, and hover types beat grep for cross-file …
- Very specific: line 36
Use CSS custom properties from src/styles/variables.css: --color-bg-primary, --color-text-primary, --color-accent, --color-border, etc.
- Very specific: line 52
Unused dependencies: verify before removing (@types/* may be implicit).
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Development Notes
What belongs in this file
Frontend conventions Claude would get wrong by default — commands, theme rules, build/lint/test gates. For architecture see README.md; for the module index see src/README.md. Add to this file only when the rule is (a) frontend-wide, (b) non-obvious from reading the code, and (c) Claude would get it wrong without the instruction.
Build, lint, test
Always run from the frontend/ directory:
npm run build && npm run lint && npm test- build: TypeScript compile + Vite build. Must succeed.
- lint: ESLint, must have 0 errors (warnings are fine).
- test: Vitest. All tests must pass.
Use npm run — never invoke tsc, eslint, or vitest directly. They live in node_modules/.bin which npm run adds to PATH automatically. If commands fail with "command not found", run npm install first.
Storybook
All new or modified components get a story (Component.stories.tsx next to Component.tsx). Visual regression coverage rides on Storybook in addition to unit tests.
npm run build-storybook # verify stories build
npm run storybook # local previewCode intelligence (TS LSP)
If the TypeScript LSP is available, use it when it helps — go-to-definition, find-references, and hover types beat grep for cross-file symbol and type work. Skip it when a plain read or grep is quicker.
Theming
Use CSS custom properties from src/styles/variables.css: --color-bg-primary, --color-text-primary, --color-accent, --color-border, etc. Never hardcode colors. Test changes under both [data-theme="light"] and [data-theme="dark"].
Updating model pricing
The frontend bundles no price data. The table is fetched from this app's own backend at bootstrap (GET /api/v1/pricing) and installed via setPricingTable in src/utils/tokenStats.ts. The single source of truth is backend/internal/pricingsource/pricing.json — edit prices there. Tests and Storybook install a frozen fixture (src/test/pricingFixture.ts) so cost arithmetic is deterministic offline.
Finding dead code
npm run knipCategories:
- Unused files: dead code — delete.
- Unused exports: often intentional (barrel files, public API) — use judgment.
- Unused dependencies: verify before removing (
@types/*may be implicit).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

