agentsmd

Local CLI · zero dependencies

AGENTS.md goes stale. This catches it.

A stale AGENTS.md is worse than none — it confidently tells a coding agent to run commands that no longer exist. agentsmd checks yours against what the repository actually contains.

AGENTS.md — checked against the repo health 52/100
## Commands - Build: `pnpm build` - Test: `pnpm test` - Lint: `pnpm lint` ## Structure - `apps/api` - `packages/database`
✓ pnpm build exists
✓ pnpm test exists
✗ no lint script did you mean pnpm lint:all?
✗ packages/database does not exist renamed to packages/db in April

Every finding is traced to a file in your repo. Nothing is inferred.

npx github:trtin/agentsmd check

Node 20+. No API key, no network calls, no account.

Three commands

init

Writes AGENTS.md from what the repo actually contains — commands verified against package.json, packages from your workspace globs, frameworks from real dependencies.

check

Reports where the document and the repo disagree, with a health score. Read-only. Add --ci to fail a build on drift.

update

Shows a diff of what changed and applies it with --write. Only ever touches the generated sections.

Your writing is safe

Only content between the markers is managed. Your rules, your architecture notes, your warnings — all preserved byte-for-byte by update.

A file with no markers is never touched at all, so you can run check against a hand-written AGENTS.md before letting the tool write anything.

The intended shape: let it own the mechanical sections, and write the judgment yourself.

<!-- agentsmd:commands --> ## Commands - Install: `pnpm install` - Test: `pnpm test` <!-- /agentsmd:commands --> ## House rules Controllers stay thin. Business logic belongs in services. Never edit generated files.

What check finds

FindingMeaning
stale-commandA documented script no longer exists — with a suggestion when it was renamed
wrong-pathA referenced file or directory is gone
undocumented-projectA workspace package the document never mentions
unsupported-claimThe document says npm but the repo uses pnpm
missing-fileNo AGENTS.md at all

Why deterministic

No model, no network, no API key. The same repository always produces the same output and the same score, which is what makes it safe to run in CI.

The rule the whole tool is built on: never emit a claim the repo doesn't evidence. A generator that invents a command is producing exactly the staleness it exists to catch — so there's a test asserting the generator's own output always scores 100.

It also documents the environment variables your code actually reads, by name. Values are never collected and .env files are never opened — only source.

Written in TypeScript. Zero runtime dependencies.