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
Who's talking about weave-os/router
- sudosubin/agents.nix“agent-skills.github.weave-os.router: 0.2.23 → 0.2.28”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-skills.github.weave-os.router: init at 0.2.23”GitHub · Oct 3, 2026
- PyTorchKR/landscape“[Add] Weave Router (weave-os/router)”GitHub · Oct 3, 2026
- datarelay-labs/datarelay-atlas“[Roadmap] Adaptive Model Routing — Weave Router reference / cache-aware switching”GitHub · Oct 2, 2026
The biggest 4 of 4 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cmd/AGENTS.mdAGENTS.md
- db/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cmd/CLAUDE.mdCLAUDE.md
- debug-claude-sessionSkill
- debug-codex-sessionSkill
- pr-merge-readySkill
- test-claude-locallySkill
- test-codex-locallySkill
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
- Very specific: line 14
Always wrap migrations in BEGIN.
- Very specific: line 15
Never create migration files manually — use make migrate-create NAME=<name>.
- Distinctive: line 25
Every query gets an explanatory comment (SQLC turns it into godoc on the generated function).
- Very specific: line 30
After touching anything in queries/, run make generate and commit the regenerated ../internal/sqlc/ alongside the query change.
≈ “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
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.sqlpairs, 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 EXISTSguards. Don't separately drop indexes when dropping tables. organization_id+created_byare 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 TIMESTAMPon tables that need lifecycle. Hot-path queries filterWHERE 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.
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.

