TL;DR: agents-md-facts is a small CLI that authors a minimal AGENTS.md from what your tree already declares — real build/test commands, entry points, toolchain conventions. Nothing invented. Nothing padded.

Why it exists

Hand-written agent files rot. LLM-written ones often bloat — and can reduce task success when the model pads them with plausible rules the agent then over-obeys.

This tool does neither. It reads the repo and writes only facts (or short curated defaults that resolve real ambiguity). Re-run when the code moves.

Four commands

npx agents-md-facts
  • (default) — author / refresh AGENTS.md (non-destructive)
  • --check — exit 1 if missing or stale (CI / pre-commit)
  • --dry-run — print the plan; write nothing
  • --stdout — emit the managed block to stdout

Only the block between <!-- agents:from-facts:start --><!-- agents:from-facts:end --> is managed. Everything you write outside those markers is preserved.

Keep it true in CI

Fail the build when the file drifts from the repo:

npx agents-md-facts --check

Or pin the composite Action: uses: Wolfe-Jam/agents-md-facts@v0.1.0

Try it

No global install required:

npx agents-md-facts

Source & stars: github.com/Wolfe-Jam/agents-md-facts · npm: agents-md-facts@0.1.0

The numbers

  • v0.1.0 — first public release (2026-07-19)
  • 4 commands — default · --check · --dry-run · --stdout
  • MIT · zero runtime dependencies · Node ≥ 18
  • Examples — Node/TS · Python · Rust · Go