repo-fit
AGENTS.md1 starsChanged 59 days agoMITView on GitHub
A small, balanced foundation for any repository, technical or notes, for Claude Code and Codex. Version is in VERSION. Maintainer: Jimmy Sadek. Read README.md for the commands and CHANGELOG.md for what changed.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
A foundation, not a second brain: No semantic search, wiki, graph or memory database.
- Distinctive: line 11
Add a piece only after a measured gap: Keep the always-loaded core block small.
- Very specific: line 15
Read first: detect, then audit.
- Distinctive: line 20
Do not save audit or detect output about real repos here.
- Very specific: line 26
Before you commit: run node --test (no dependencies, about 40 seconds).
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.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
repo-fit · Working agreements for every assistant
A small, balanced foundation for any repository, technical or notes, for Claude Code and Codex. Version is in VERSION. Maintainer: Jimmy Sadek. Read README.md for the commands and CHANGELOG.md for what changed.
Scope guard (the maintainer's decisions, 29 Sep 2026)
- A foundation, not a second brain. No semantic search, wiki, graph or memory database. Never claim more than the scripts really do. Keep the wording modest.
- Two front doors: a new repo gets the Starter kit. An existing repo gets detected, audited and adopted step by step, and adapts to what it already has.
- Adaptability is core. Detect the machine and the repo first (CLIs, logins, Git host, existing tools and rule files), then offer, then ask. Never force GitHub, Node, Obsidian or any tool. Never install a missing tool or log in for the user. Updating a tool the user already has is allowed only through
tools, under the rules below. Offer a host feature only when the remote is that host and its CLI is logged in there. - Guidance stays current. Claims about Claude Code, Codex and models live in
guidance/, dated, sourced and refreshed. Never state a vendor fact from memory. - Add a piece only after a measured gap. Keep the always-loaded core block small.
Rules for changing other repos
- Read first:
detect, thenaudit. Both are read-only. - Changes go through
apply(dry run, diff, backup, receipt, undo). Each step needs the user's yes to that exact dry run. - Moves, deletes, secrets and big files are never automated. Adding a remote goes only through
connect: an empty private repo, never a push. - Updating a tool goes only through
tools --update ... --apply, runs only the tool's own updater, and happens without asking only if the user opted in withprefsand the need is real. - Respect a repo's own rules. Example: a repo that says "commit only when asked" runs with
--autosave off --hooks briefand without the core rules block. - Do not save audit or detect output about real repos here. This repo may become public.
How to work here
- Branch
dev. The user's branch guard blocks commits onmainandmaster. Commit locally. Never push unasked. - Node only, no dependencies. Test on throwaway copies. A pilot on a real repo needs the user's approval for the exact files.
- Before you commit: run
node --test(no dependencies, about 40 seconds). Every bug you fix gets a test that fails without the fix. Then update README, CHANGELOG and the guidance if the change touches them. - Reports go in
claudedocs/.
Where things are
| Path | What |
bin/repo-fit.mjs | The command: init, status, update, detect, audit, apply, skip, undo, connect, tools, prefs, guidance check |
lib/ | detect, audit, adapt (what a repo already has: own checks, hooks, caps, protected paths, rule conflicts), apply, core (renders the core block with the repo's paths), connect, tools, versions, prefs. Not copied into repos |
scripts/playbook/ | brief, check, autosave, lib. Copied into every repo, version-stamped |
kits/ | Starter kit and per-tool files |
core/AGENTS.core.md | The managed rules block |
guidance/ | Dated notes from official sources, and the refresh routine |
SKILL.md | The setup interview (at the root, so npx skills add installs the whole tool as one skill) |
claudedocs/ | Research reports and the search data behind them |
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.

