agentleFS
Antonio-TresolAntonio-Tresol/daemon/CLAUDE.md

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
  1. Very specific:

    All TypeScript, strict mode, no any types, no type assertions unless justified with comment

    line 18
  2. Very specific:

    Every new function/component MUST have a corresponding .test.ts file

    line 19
  3. Distinctive:

    Use Vitest for unit tests, Playwright for e2e

    line 20
  4. Very specific:

    Test files live next to source: foo.ts → foo.test.ts

    line 21
  5. Very specific:

    No barrel exports (index.ts re-exports) — import directly from source files

    line 23
  6. Distinctive:

    Prefer composition over inheritance

    line 24
  7. Very specific:

    Use satisfies over as for type narrowing

    line 25
  8. Distinctive:

    Use agent teams for parallel work when tasks are independent

    line 27

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 + infrastructure
  • src/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/app
  • src/entities/ → entity models and display components — cannot import from features/app
  • src/features/ → feature slices (timeline, failures, improvements, session, harness) — cannot import from app
  • src/app/ → Next.js pages — composes features

Rules

  • All TypeScript, strict mode, no any types, no type assertions unless justified with comment
  • Every new function/component MUST have a corresponding .test.ts file
  • 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 satisfies over as for 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.