agentic-mode
AGENTS.md1 starsChanged 3 days agoMITView on GitHub
Repo facts and the human/agent co-operation contract for this repository. This repo is the agentic-mode methodology, so it dogfoods its own rules. It states what is true here and what "done" requires; it does not tell you which tool, model, or dispatch to use. Read README.md first, then this. - The canonical source of the agentic-mode documentation contract: doctrine, an executable RUNBOOK, document templates, a config-driven checker, harness adapters, and a worked example. - Harness-neutral core (iron rule). Nothing in…
- Reads credentials
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 33,398 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 repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 20
Project-neutral: No hardcoded brands, hosts, IP literals, or absolute machine paths anywhere.
- Very specific: line 22
Portable skills (iron rule): Every SKILL.md under adapters/claude-code/plugins/*/skills/ and every file it references must resolve by paths …
- Distinctive: line 37
Do not split any of these without changing that distribution contract.
- Very specific: line 59
Run the gate on this repo (must exit 0).
- Distinctive: line 68
Run the gate on the worked example (must exit 0):
- Distinctive: line 74
Run the checker fire-demo suite (must exit 0):
- Distinctive: line 80
Run the review-eval demo suite (must exit 0):
- Distinctive: line 86
Run the sync fire-demo suite (must exit 0):
- Very specific: line 92
Run the team-kit plugin eng tests (must exit 0.
- Distinctive: line 130
Verify the plugin vendored copies are in sync with the canon (must exit 0):
- Very specific: line 146
If the checker's behavior changed, checker/config.example.json and the checker's module docstring are updated to match.
- Very specific: line 148
If the doc-set changed, the templates and RUNBOOK.md's layout/schema stay in sync (the config schema is stated in exactly one place — …
- Very specific: line 152
If a playbooks/ file, tests/check_template_renders.py, or a vendored core file (RUNBOOK.md, doctrine/BOOTSTRAP-CORE.md, templates/, …
- Distinctive: line 170
Code wins over a stale instruction file: When an instruction file (this file, a playbook, a template, an adapter contract, or a guide) …
- Distinctive: line 179
Stop and ask a human before any of these, even if permissions allow it:
- Very specific: line 197
Do not commit __pycache__/, .venv/, or the example's runtime tasks.json.
- Distinctive: line 199
Never push directly to main — open a merge/pull request instead.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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
AGENTS.md — agentic-mode
Repo facts and the human/agent co-operation contract for this repository. This
repo is the agentic-mode methodology, so it dogfoods its own rules. It states
what is true here and what "done" requires; it does not tell you which tool,
model, or dispatch to use. Read README.md first, then this.
Project Scope
- The canonical source of the agentic-mode documentation contract: doctrine, an executable RUNBOOK, document templates, a config-driven checker, harness adapters, and a worked example.
- Harness-neutral core (iron rule). Nothing in
doctrine/,RUNBOOK.md,templates/, orchecker/may name a specific agent product, model, or proprietary tool. (The checker's built-inHARNESS_DENY_WORDSlist is itself a list of harness names — detection data, not prose; this rule governs document text.) Harness-specific content lives underadapters/. The one exception is rootCLAUDE.md: a single import line (@AGENTS.md) so a session that autoloads that filename receives this contract, with no second copy of the rules. - Project-neutral. No hardcoded brands, hosts, IP literals, or absolute machine paths anywhere. The worked example uses a fictional project.
- Portable skills (iron rule). Every
SKILL.mdunderadapters/claude-code/plugins/*/skills/and every file it references must resolve by paths relative to its own skill directory. Never use a harness-injected variable (${CLAUDE_PLUGIN_ROOT}and the like) or an absolute path: the open skills CLI installs these same directories into other agents' skill folders, where such a variable is undefined. See Development Commands for the check. Adapter operational detail lives inadapters/claude-code/AGENTS.md. - Hard-metric exemptions. The checker intentionally exceeds normal
per-file line limits because Phase C copies it whole as a zero-dependency
drop-in.
templates/intentionally exceeds normal per-directory file-count limits because the toolkit/RUNBOOK selects its files by document role, project type, and CI platform, and the plugin vendors the directory verbatim.tests/review-evals/score_review.pyintentionally exceeds normal per-file line limits for the same reason as the checker: a zero-dependency drop-in (pure stdlib,--selftest) consumed whole by the eval demo runner. Do not split any of these without changing that distribution contract.
Key Files
README.md/README-ZH.md: onboarding (English / Traditional Chinese).RUNBOOK.md: the single executable protocol (bootstrap/adopt, Phases A–D).checker/check_agentic_docs.pyandchecker/config.example.json: the gate and every knob. This repo's own gate config isagentic-mode/config.json.adapters/claude-code/AGENTS.md: adapter contract (plugins, marketplace, vendoring, team-kit).examples/minimal-cli/: a complete contract that passes the checker.
Doctrine and templates are reached from RUNBOOK.md. Playbooks are reached from README.md. The test suites are the commands below.
Development Commands
- Byte-compile the checker:
python3 -m py_compile checker/check_agentic_docs.py- Run the gate on this repo (must exit 0). It enforces this file's line limit,
these commands, and the entry points in
agentic-mode/config.json.docs.requirementsanddocs.validationalias this file — the checker requires those keys, and this repo has no separate layer for them:
python3 checker/check_agentic_docs.py --config agentic-mode/config.json- Run the gate on the worked example (must exit 0):
python3 checker/check_agentic_docs.py --config examples/minimal-cli/agentic-mode/config.json --root examples/minimal-cli- Run the checker fire-demo suite (must exit 0):
sh tests/run_fire_demos.sh- Run the review-eval demo suite (must exit 0):
sh tests/run_review_eval_demos.sh- Run the sync fire-demo suite (must exit 0):
sh tests/run_sync_demos.sh- Run the team-kit plugin eng tests (must exit 0; requires
jqon PATH):
sh adapters/claude-code/plugins/team-kit/eng/tests/run-tests.sh- Byte-compile the global instruction-file detector and run its selftest (must exit 0):
python3 -m py_compile adapters/claude-code/plugins/global-claude/skills/global-claude/scripts/detect_global_claude.py && python3 adapters/claude-code/plugins/global-claude/skills/global-claude/scripts/detect_global_claude.py --selftest- Sweep for leftover template placeholders in the example (prints
cleanand exits 0 only when grep exits 1; a match or a grep error fails):
rc=0; grep -rn '{{' examples/minimal-cli || rc=$?; if [ "$rc" -eq 1 ]; then echo clean; elif [ "$rc" -eq 0 ]; then echo FOUND; exit 1; else echo "grep error: exit ${rc}"; exit "$rc"; fi- Render every Markdown template under all eight states of the three optional docs, prove the worked example's regions, and inject the faults the check must refuse (must exit 0):
python3 tests/check_template_renders.py --selftest && python3 tests/check_template_renders.py- Byte-compile the doc linter and lint its own playbook (must exit 0):
python3 -m py_compile playbooks/scripts/doc_lint.py
cd playbooks && python3 scripts/doc_lint.py DOC-LINTER.md- Byte-compile the OKF linter and run its selftest (must exit 0):
python3 -m py_compile playbooks/scripts/okf_parse.py playbooks/scripts/okf_lint.py playbooks/scripts/okf_selftest.py
python3 playbooks/scripts/okf_lint.py --selftest- Verify the plugin vendored copies are in sync with the canon (must exit 0):
python3 scripts/sync_plugins.py --check- Validate the marketplace + plugin manifests parse, and prove the skills carry no harness-injected path variable (the sweep prints
cleanand exits 0 only when grep exits 1; a match or a grep error fails):
python3 -m json.tool .claude-plugin/marketplace.json >/dev/null && echo ok
rc=0; grep -rn 'PLUGIN_ROOT' adapters/claude-code/plugins || rc=$?; if [ "$rc" -eq 1 ]; then echo clean; elif [ "$rc" -eq 0 ]; then echo FOUND; exit 1; else echo "grep error: exit ${rc}"; exit "$rc"; fiChange Flow (What "Done" Requires)
- Code / doctrine / template edited.
- If the checker's behavior changed,
checker/config.example.jsonand the checker's module docstring are updated to match. - If the doc-set changed, the templates and
RUNBOOK.md's layout/schema stay in sync (the config schema is stated in exactly one place —RUNBOOK.md). - The worked example still passes the gate, and this repo's own gate
(
agentic-mode/config.json) exits 0 (see Development Commands). - If a
playbooks/file,tests/check_template_renders.py, or a vendored core file (RUNBOOK.md,doctrine/BOOTSTRAP-CORE.md,templates/,checker/) changed,python3 scripts/sync_plugins.pywas run so the plugin copies match, and--checkexits 0. Never hand-edit a vendored copy underadapters/claude-code/plugins/. (Exception: thefable5,commander,idea-to-spec,pstack,team-kit, andglobal-claudeplugins are self-canonical — not vendored and not in the sync MANIFEST — so their files are edited in place. Seeadapters/claude-code/AGENTS.md.) README.mdandREADME-ZH.mdstay information-equivalent when either changes.
Sign-Off Points
- The author does not sign off their own completion claim on asserted evidence. Completion is proven by the checker's objective output or a fresh-context read-back — not by "looks fine."
- A change to the checker must ship with both a passing example run and a
demonstration that the new/changed check fires when violated; the fire-demo
suite (
tests/run_fire_demos.sh) provides this demonstration mechanically. - Code wins over a stale instruction file. When an instruction file (this file, a playbook, a template, an adapter contract, or a guide) disagrees with existing code or with a command that actually runs, follow the code and report each mismatch in the final reply. Do not silently rewrite working code to match the stale doc. Updating the doc is the normal fix; changing the code still follows Change Flow.
Stop-and-Ask (do NOT proceed silently)
Stop and ask a human before any of these, even if permissions allow it:
- Changing the
config.jsonschema (breaks every downstream repo's config). - Adding a harness name into the neutral core (
doctrine/,RUNBOOK.md,templates/,checker/) — it belongs inadapters/. - Irreversible deletion of files or history; force-pushing; publishing.
- CI / release configuration changes, or anything touching credentials.
- A user premise the evidence contradicts — report the evidence first, then stop. A doc-vs-code mismatch follows Sign-Off (follow the code, report it).
Change-Flow Boundary (defer to WORKFLOW)
- Move changes through review per your platform's workflow. Boundary test: if a rule names a platform CLI or a platform-specific comment style, it belongs in a WORKFLOW doc/adapter, not here.
Git Hygiene
- Do not commit
__pycache__/,.venv/, or the example's runtimetasks.json. - Explicit file staging; never commit secrets or
.envvalues. - Never push directly to
main— open a merge/pull request instead.
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.

