daemon
CLAUDE.md2 starsChanged 8 months agoMITView on GitHub
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 18
All TypeScript, strict mode, no any types, no type assertions unless justified with comment
- Very specific: line 19
Every new function/component MUST have a corresponding .test.ts file
- Distinctive: line 20
Use Vitest for unit tests, Playwright for e2e
- Very specific: line 21
Test files live next to source: foo.ts → foo.test.ts
- Very specific: line 23
No barrel exports (index.ts re-exports) — import directly from source files
- Distinctive: line 24
Prefer composition over inheritance
- Very specific: line 25
Use satisfies over as for type narrowing
- Distinctive: line 27
Use agent teams for parallel work when tasks are independent
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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
Daemon
Architecture
Backend: DDD (Domain-Driven Design)
src/server/domain/— Pure entities and repository interfaces. NO infrastructure imports (no sqlite, no fs, no child_process)src/server/application/— Use cases that orchestrate domain + infrastructuresrc/server/infrastructure/— Implementations (SQLite repos, Agent SDK runner, GraphQL)
Frontend: FSD (Feature-Sliced Design)
Strict layer dependencies (lower layers cannot import higher):
src/shared/→ base layer (UI primitives, utils, hooks) — cannot import from entities/features/appsrc/entities/→ entity models and display components — cannot import from features/appsrc/features/→ feature slices (timeline, failures, improvements, session, harness) — cannot import from appsrc/app/→ Next.js pages — composes features
Rules
- All TypeScript, strict mode, no
anytypes, no type assertions unless justified with comment - Every new function/component MUST have a corresponding
.test.tsfile - Use Vitest for unit tests, Playwright for e2e
- Test files live next to source:
foo.ts→foo.test.ts - Biome handles linting + formatting — no manual formatting
- No barrel exports (index.ts re-exports) — import directly from source files
- Prefer composition over inheritance
- Use
satisfiesoverasfor type narrowing - Server components by default,
'use client'only when needed - Use agent teams for parallel work when tasks are independent
API Routes
Frontend components must use the correct API paths:
- Event ingestion:
POST /api/events - Sessions list:
GET /api/sessions - Session detail:
GET /api/sessions/[id] - Session update:
PATCH /api/sessions/[id] - Analysis trigger:
POST /api/agent/analyze - Analysis poll:
GET /api/agent/analysis/[id] - Analysis submit:
POST /api/agent/analysis/[id]/submit - Analysis fetch:
GET /api/analysis?type=X&sessionId=Y - Agent sessions:
GET /api/agent/sessions - Agent timeline:
GET /api/agent/timeline?sessionId=X - Agent failures:
GET /api/agent/failures?sessionId=X - Agent improvements:
GET /api/agent/improvements?sessionId=X - Groups:
GET /api/groups - Schemas:
GET /api/agent/schemas/[type] - Docs:
GET /api/agent/docs - GraphQL:
POST /api/agent/graphql
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.

