agentleFS
alipajandalipajand/agent-context-doctor/AGENTS.md

agent-context-doctor

AGENTS.md1 starsChanged 2 months agoMITView on GitHub

This is a TypeScript Node.js CLI project. You are an implementation agent. agent-context-doctor (acd) is a deterministic CLI that audits agent instruction files for quality, safety, contradictions, and stale commands. It is not an AI product. Do not do any of the following without explicit approval: All five must pass with zero errors before you consider work complete. The only file the tool writes is the optional Markdown report via --output. Paths are resolved relative to the audited repo root.…

  • 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,638 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.

The file

We split this AGENTS.md into the rules it gives an agent

10 rules. About 1 is common, 7 are distinctive, and 2 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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
  1. Distinctive:

    Do not: do any of the following without explicit approval:

    line 12
  2. Distinctive:

    Add LLM or AI API calls of any kind

    line 14
  3. Distinctive:

    Add telemetry, analytics, or any outbound network calls

    line 15
  4. Common:

    Add authentication or credential handling

    line 16
  5. Very specific:

    Write to any file outside the audited repo path (only --output writes are allowed)

    line 21
  6. Distinctive:

    Add dependencies that make external network requests

    line 22
  7. Distinctive:

    All five must pass with zero errors before you consider work complete.

    line 41
  8. Very specific:

    All source files live under src/.

    line 45
  9. Distinctive:

    Do not add comments that narrate what the code does — only explain non-obvious intent

    line 49
  10. Distinctive:

    After completing work, provide:

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS — agent-context-doctor

This is a TypeScript Node.js CLI project. You are an implementation agent.

What this project is

agent-context-doctor (acd) is a deterministic CLI that audits agent instruction files for quality, safety, contradictions, and stale commands. It is not an AI product.

Absolute constraints

Do not do any of the following without explicit approval:

  • Add LLM or AI API calls of any kind
  • Add telemetry, analytics, or any outbound network calls
  • Add authentication or credential handling
  • Build a web server, web app, or browser UI
  • Change the binary name (acd) or existing command names (audit, list)
  • Modify .acdrc schema in a breaking way
  • Change the AuditResult JSON shape in a backward-incompatible way
  • Write to any file outside the audited repo path (only --output writes are allowed)
  • Add dependencies that make external network requests

Tech stack

  • TypeScript, ESM, Node.js ≥ 18
  • pnpm
  • commander, fast-glob, zod, picocolors
  • vitest for tests, tsx for dev, prettier for formatting

Commands to run before finishing

pnpm format:check   # formatting
pnpm typecheck      # TypeScript
pnpm lint           # also TypeScript (same as typecheck)
pnpm test           # vitest — all tests must pass
pnpm build          # tsc compilation to dist/

All five must pass with zero errors before you consider work complete.

Code conventions

  • All source files live under src/; tests under tests/
  • Each audit check is a pure function in src/audit/checks/
  • Cross-file logic goes in auditRepo.ts, not in individual checks
  • No any types; no ts-ignore comments
  • Do not add comments that narrate what the code does — only explain non-obvious intent

Safe-write behavior

The only file the tool writes is the optional Markdown report via --output. Paths are resolved relative to the audited repo root. Do not add any other file-write operations without approval.

Final report

After completing work, provide:

  1. Files changed — list every file modified or created
  2. Commands run — show the output of pnpm test, pnpm typecheck, pnpm build
  3. Tests added — list new test cases and their purpose
  4. Known limitations — anything intentionally deferred
  5. Recommended next steps — what to improve next

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.