agentleFS
ConfabulousDevConfabulousDev/confab-web/CLAUDE.md

confab-web

CLAUDE.md15 starsChanged 3 months agoMITView on GitHub

Main web repo. CLI lives in https://github.com/ConfabulousDev/confab (separate repo). Cross-cutting rules Claude would get wrong by default. Add to this file only when the rule is (a) cross-package, (b) non-obvious from reading the code, and (c) Claude would get it wrong without the instruction. If it's tied to one package, put it in that package's README. If it's tied to one subtree, put it in backend/CLAUDE.md or frontend/CLAUDE.md. Backend API is documented in backend/API.md. Keep it up to date when…

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
  1. Distinctive:

    Before adding new logic, check the package README for an existing helper.

    line 24
  2. Very specific:

    Search before creating: kata search "<keywords>" --agent.

    line 52
  3. Very specific:

    Prefer updating existing issues over duplicates (kata comment, kata label add, kata edit).

    line 53
  4. Very specific:

    Default to --agent for ordinary reads and mutations.

    line 54
  5. Very specific:

    If work is incomplete, label needs-review and comment what remains rather than closing.

    line 56
  6. Very specific:

    Never kata delete or kata purge without explicit user authorization.

    line 57

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

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

Confab Development Notes

Main web repo. CLI lives in https://github.com/ConfabulousDev/confab (separate repo).

What belongs in this file

Cross-cutting rules Claude would get wrong by default. Add to this file only when the rule is (a) cross-package, (b) non-obvious from reading the code, and (c) Claude would get it wrong without the instruction. If it's tied to one package, put it in that package's README. If it's tied to one subtree, put it in backend/CLAUDE.md or frontend/CLAUDE.md.

API documentation

Backend API is documented in backend/API.md. Keep it up to date when modifying API endpoints, request/response schemas, or authentication.

Documentation maintenance

Two audiences, two doc trees:

  • Internal docs (READMEs, CLAUDE.md files, backend/API.md, CONFIGURATION.md, SELF-HOSTING.md) — for contributors. When changing code, update the corresponding package/module README. Keep current: file lists, exported API descriptions, invariants, dependency lists, extension checklists. If a change spans multiple packages, also check the index READMEs (backend/internal/README.md, frontend/src/README.md) and this file.
  • User-facing docs site (docs/ — Starlight, published at docs.confabulous.dev) — for end users and self-hosters. When changing user-visible behavior (new config var, new feature, changed CLI flow), update the corresponding page under docs/src/content/docs/. The sidebar tree is in docs/astro.config.mjs.

Documentation that contradicts the code is worse than no documentation.

Shared-code locations (DRY)

Before adding new logic, check the package README for an existing helper. Grep the package first; duplicating a regex, a SQL fragment, or a utility across packages is the most common source of drift.

  • backend/internal/analytics/ — analytics compute, per-provider dispatch, smart recap, trends, org analytics, search index.
  • backend/internal/auth/ — auth middleware, OAuth providers, demo identity, read-only enforcement.
  • backend/internal/db/ — shared DB types/helpers, session visibility CTE, repo-filter SQL fragments (incl. read-time fork→upstream resolution from per-session git_info), codex sidecar.
  • backend/internal/models/ — domain types and provider identity (NormalizeProvider, AllowedProviders, legacy alias map).
  • frontend/src/providers/ — per-provider transcript adapters behind a shared ProviderAdapter interface; frontend/src/utils/providers.ts — cosmetic registry (icon/label/color).
  • frontend/src/utils/tokenStats.ts — canonical TokenUsage shape and provider-keyed pricing table.
  • For shared DB structs (SessionDetail, SessionListItem, …): use the shared column-list/Scan-target helpers and add a wire-level integration test. Full procedure in backend/CLAUDE.md.

Per-area conventions

  • Backend commands, sharded tests, dead-code tools → backend/CLAUDE.md.
  • Frontend build/lint/test, Storybook, theme, knip → frontend/CLAUDE.md.
  • Docs site (Starlight) — sentence case, IA, source-of-truth pages → docs/CLAUDE.md.

Skills

  • /add-session-card — full playbook for new analytics cards (DB migration, collector, types, store, compute, frontend Zod schema + component + registry, Storybook).
  • /cut-release — tag, write release notes (with rigorous migration + API verification), publish via gh.
<!-- BEGIN KATA (managed by `kata init --with-agents`) -->

kata issue tracker

This project uses kata as its shared issue ledger. Run kata quickstart at the start of each session for the full agent contract. The short version:

  • Search before creating: kata search "<keywords>" --agent.
  • Prefer updating existing issues over duplicates (kata comment, kata label add, kata edit).
  • Default to --agent for ordinary reads and mutations; use --json only when a script needs structured data.
  • Close only verified work: kata close <ref> --done --message "<scope + verification>" --commit <sha>.
  • If work is incomplete, label needs-review and comment what remains rather than closing.
  • Never kata delete or kata purge without explicit user authorization.
<!-- END KATA -->

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.