Use before adding, growing, or restructuring content in AGENTS.md — keeps it under its 600-line cap, protects operator templates, and limits it to cross-cutting binding rules.
Goal: keep AGENTS.md small, skimmable, and limited to binding cross-cutting rules. Read this before any edit to AGENTS.md, not just during a cleanup pass.
wc -l AGENTS.md must stay at or under 600, checked as
part of every edit — not deferred to a later cleanup.docs/README.md provides immediate acquisition and curates broader routes,
but does not catalog every focused document. Do not grow a second TOC inside
AGENTS.md.README.md as a product landing page of 120
lines or fewer. It features only daily-driver and delightful demo
capabilities; every featured capability has a runnable CLI command and a
https://dotnet-inspect.net/?w=... packet URL for the same view. Detailed
behavior belongs in docs/cli-reference.md, a focused guide, or a product
skill.AGENTS.md. Never remove, shorten to a pointer, or move them to meet the
line cap; extract another whole section instead.AGENTS.md holds binding, cross-cutting rules: things nearly every session needs
regardless of which subsystem it touches. Everything else — mechanics, worked
examples, tables of edge cases, rationale, historical context — belongs in a
focused doc under docs/, docs/design/, docs/runbooks/, or
docs/templates/, with a short pointer left in AGENTS.md.
Test before adding prose: would an agent doing unrelated work (say, a decompiler fix) need this fact in the next 30 seconds? If yes, state the rule in one or two sentences and stop there. If the value only shows up once an agent is deep in a specific task, it belongs in that task's owning doc instead.
wc -l AGENTS.md to record the baseline before editing.wc -l AGENTS.md. If still over 600, migrate another whole section
or subsection to its owning doc — see the extraction checklist below.
Repeat with a full section each time; do not switch to shaving individual
lines to close a small remaining gap.wc -l README.md and
confirm the landing-page boundary above still holds.npx markdownlint-cli AGENTS.md (and any doc you edited) before
committing.Move content in whole, section-sized blocks, not by trimming prose word by word. A block move is legible as a genuine reorganization; shaving a line here and there to squeak under the cap is not — it reads as gaming the number and tends to fuse unrelated sentences, drop headings that readers or other docs depend on, or otherwise degrade the file it was supposed to keep skimmable.
If after moving the obvious block-sized candidates the file is still over (or barely under) 600, that is a signal to find one more whole section to relocate — not to start merging headings into prose, deleting blank lines between unrelated paragraphs, or rewording sentences purely to save a line. Never remove or fold a heading to save space; if it is not clearly disposable as a whole subsection, leave it and find a different block to move instead.
docs/README.md route only when the destination is itself a
high-value entrypoint; otherwise rely on focused owner and consumer links.docs/README.md only when its acquisition block, a curated route, or
an entrypoint role changes.wc -l AGENTS.md # must be <= 600
wc -l README.md # must be <= 120
npx markdownlint-cli AGENTS.md71591ae
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.