agent-docs-bootstrap
AGENTS.md0 starsChanged 16 days agoMITView on GitHub
This is the kit's repository, not a project to document. First work out what is being asked: Do exactly this: Do not edit the kit's files during an install, do not create docs/agents/ in the project (the skill does that on first run), and do not write anything to external documentation. Skills and subagents are Markdown prompts with YAML frontmatter; the only code is install.mjs, scripts/check.mjs and the Node scripts in skills/docs-check/scripts/ (reader-run.mjs, leak-check.mjs and the shared docs-paths.mjs), all dependency-free…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs-bootstrapSkill
- docs-checkSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
Ask which harnesses the team uses if it is not clear: claude, codex, opencode (several are comma-separated, or all).
- Very specific: line 16
Check the result: <project>/.agent-docs-bootstrap starts with version=, and the skills and agents listed in README.md for those targets …
- Very specific: line 19
Do not edit the kit's files during an install, do not create docs/agents/ in the project (the skill does that on first run), and do not …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
agent-docs-bootstrap — agent instructions
This is the kit's repository, not a project to document. First work out what is being asked:
- install the kit into a project → "Installing into a project", step by step;
- change the kit itself (skills, subagents, installer, a release) → "Developing the kit";
- build or check a project's documentation → that happens inside the project, with the
docs-bootstrapordocs-checkskill, not here.
Installing into a project
Do exactly this:
- Find the target project's root: the directory with
.git. If it was not named, ask — do not guess. - Ask which harnesses the team uses if it is not clear:
claude,codex,opencode(several are comma-separated, orall). - From the project root:
npx agent-docs-bootstrap@<version> --target <targets> --yes, ornode <path-to-kit>/install.mjs --target <targets> --yesfrom a clone. - Check the result:
<project>/.agent-docs-bootstrapstarts withversion=, and the skills and agents listed inREADME.mdfor those targets exist. - Tell the human to commit
.agent-docs-bootstrapand the installed folders, then restart the agent session.
Do not edit the kit's files during an install, do not create docs/agents/ in the project (the skill does that on first run), and do not write anything to external documentation.
Developing the kit
Skills and subagents are Markdown prompts with YAML frontmatter; the only code is install.mjs, scripts/check.mjs and the Node scripts in skills/docs-check/scripts/ (reader-run.mjs, leak-check.mjs and the shared docs-paths.mjs), all dependency-free Node 18+. Everything in the repository is written in English.
node scripts/check.mjs # all repository checks; CI runs the same
node install.mjs --target all --project <dir> --yes
node install.mjs --project <dir> --uninstallscripts/check.mjs also scans for forbidden strings from the untracked file .forbidden-patterns (one regex per line) or the FORBIDDEN_PATTERNS variable. Keep that list out of git.
How it fits together
- Skills are the portable layer.
skills/docs-bootstrapandskills/docs-checkare the only skills and the entry points in every harness, including ones the installer does not know; there is no primary agent. Anything a harness-specific agent used to enforce must be stated in the skill text too. - Subagents have one source.
agents/<name>.mdholdsname,description, aclaude-code: |and anopencode: |block of raw frontmatter, and the prompt.install.mjsrenders.claude/agents/*.md,.opencode/agents/*.mdand.codex/agents/*.toml(prompt asdeveloper_instructions). Prompts must not contain'''. - Restrictions live in two places. A limit set in a frontmatter block (tools, permissions) must also be stated in the prompt, because Codex has no per-subagent permissions and relies on the prompt alone. Change both together and keep the "Harness differences" table in
README.mdtrue. - Invariants repeat on purpose ("code says what, people say why", "do not judge the docs yourself", "only confirmed content is committed") in
docs-bootstrap,docs-checkand the agent prompts. Change all places at once. - One definition of documents.
docs-paths.mjsdecides which files are documents for both the snapshot and the leak check; change it there, never in one script only. docs-checkis optional.docs-bootstrapnever runs it and must not depend on it or onreader-tests.md; it only mentions the check in the wrap-up. The check's template lives inskills/docs-check/templates/.- The reader is a separate process, not a subagent.
docs-checkstarts it throughreader-run.mjswith the harness's CLI (claude -p --restricted,codex exec -s read-only,opencode run --pure);agents/docs-reader.mdis its prompt and, for OpenCode, its permissions (mode: all, becauseopencode run --agentfalls back to the default agent for a subagent). A subagent shares the session's working directory and can find the solution in the current code. Change the CLI flags in the script, the skill and the README "Harness differences" table together. - Commands in skills run in any shell. One command per call, no
cd,&&, pipes, redirects or Unix-only tools: users run bash, PowerShell and cmd. Anything longer goes into a Node script inside the skill (scripts/is copied with the skill folder). - Harness-neutral wording. Say "start the
docs-scoutsubagent", not a tool name of one harness. Harness-specific facts belong inREADME.mdor behind an explicit "in Claude Code…". - Installed paths are owned through
.agent-docs-bootstrap. Each line is<path> <content hash>. The installer replaces or removes a path only if its line is shaped like<layout folder>/<kit name>(the marker is committed, so any line may end up in it) and the content still matches the hash; a changed path is the user's and is left in place. Lines without a hash come from 0.3.0 and earlier and are checked againstLEGACYininstall.mjs, which only grows; content matchingLEGACYor what this version writes is the kit's even if its line is missing. Only files the OS adds (.DS_Store,._*,Thumbs.db,desktop.ini) are left out of the hash, so the kit ships none; a user's own hidden file counts. The hash format must not change. When a skill, subagent or command is renamed or dropped, keep its old name inSHIPPEDso updates can still remove it. Keep that guarantee when changing it. - Third-party guides (
skills/docs-bootstrap/vendor/<name>/) are never edited; the only change isSKILL.mdrenamed to<name>.md, because Codex and OpenCode find a nestedSKILL.mdand register it as a separate skill.docs-bootstrapreads them by path. The update procedure is inTHIRD_PARTY.md.
Changes and releases
Every change gets a line under [Unreleased] in CHANGELOG.md. Versions follow semver: major — the format of files the kit writes into projects (docs/agents/*, install layout) changes; minor — skill or subagent behaviour changes; patch — wording and fixes. To release: add the outgoing version's hashes to LEGACY in install.mjs (check.mjs installs every release tag and lists what is missing; it needs the tags fetched), bump version in package.json and every pinned version in README.md (check.mjs fails on a mismatch), rename [Unreleased] to the version and date (keep an empty [Unreleased] above it), commit, tag vX.Y.Z, push with tags, then a human runs npm publish.
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.

