agentleFS
weave-osweave-os/router/db/CLAUDE.md

router / db

CLAUDE.md5.6k starsChanged 2 months agoApache-2.0View on GitHub

Mirror notice. Source for generated AGENTS.md. Edit this file, then run make generate-agent-guides; CI rejects drift. Migrations + SQLC query sources. Read root CLAUDE.md first. Adapter that consumes these lives in ../internal/postgres — see its CLAUDE.md. After touching anything in queries/, run make generate and commit the regenerated ../internal/sqlc/ alongside the query change. CI fails if generated code drifts from sources.

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the weave-os/router repository that our weekly crawl found: only 4 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 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.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always wrap migrations in BEGIN.

    line 14
  2. Very specific:

    Never create migration files manually — use make migrate-create NAME=<name>.

    line 15
  3. Distinctive:

    Every query gets an explanatory comment (SQLC turns it into godoc on the generated function).

    line 25
  4. Very specific:

    After touching anything in queries/, run make generate and commit the regenerated ../internal/sqlc/ alongside the query change.

    line 30

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

db — CLAUDE

Mirror notice. Source for generated AGENTS.md. Edit this file, then run make generate-agent-guides; CI rejects drift.

Migrations + SQLC query sources. Read root CLAUDE.md first. Adapter that consumes these lives in ../internal/postgres — see its CLAUDE.md.

Layout

  • migrations/ — NNNN_<name>.up.sql + .down.sql pairs, sequential numbering.
  • queries/<table>.sql — SQLC query sources.

Migration conventions

  • Always wrap migrations in BEGIN; ... COMMIT;.
  • Never create migration files manually — use make migrate-create NAME=<name>.
  • Down migrations must be precise rollbacks. No IF EXISTS guards. Don't separately drop indexes when dropping tables.
  • organization_id + created_by are opaque external identifiers — never add foreign keys to tables outside the router's own schema. Such tables don't exist in this project.
  • Soft-delete via deleted_at TIMESTAMP on tables that need lifecycle. Hot-path queries filter WHERE deleted_at IS NULL.

Query conventions

  • Always named params (@param::varchar), never numbered ($1).
  • Always include type casts so SQLC inference is unambiguous.
  • Query names use consistent prefixes: Insert*, Upsert*, Get*, Update*, Delete*.
  • Every query gets an explanatory comment (SQLC turns it into godoc on the generated function).
  • No-rows single-row queries return an error — caller checks errors.Is(err, sql.ErrNoRows).

Regeneration

After touching anything in queries/, run make generate and commit the regenerated ../internal/sqlc/ alongside the query change. CI fails if generated code drifts from sources.

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.