Follow-up to AGENTS.md From Facts, the 0.1.0 post in the AGENTS.md series.
TL;DR: Everything 0.1.0 authored is still authored (setup & build, tests, where things live with its key files, conventions, guardrails, definition of done, security & secrets, commit & PR); 0.2.0 adds to it. Detection reads what the repo declares (its scripts, manifests, workflows, folders and guides) and never judges what a command does.
In Plain English
Old state. agents-md-facts 0.1.0 wrote a block of facts into AGENTS.md: how to install, build and test, where things live, and the house rules. An agent still had to open the workflow files to find out what CI checks, and look through package.json to learn what runs before a release.
Fix. 0.2.0 reads more of what the repo already declares: its GitHub Actions workflows, its publish scripts, its Python project file. It copies what's there and says plainly when something isn't.
New state. The agent gets those answers from the block, without searching. Every section 0.1.0 wrote is still in it.
What's new in the block
| Fact | What the block says |
|---|---|
| CI | The workflows that run on pull requests and pushes, with each step that runs the repo's own scripts or its toolchain's commands, shown whole. Other steps are counted, never copied. |
| Before a release | What npm publish runs first (prepublishOnly, then prepack), or the release script. For a publishable package with neither: that npm publish runs no checks first. |
| No CI | A git repo with no GitHub Actions workflows says so. |
| Python | Entry points from [project.scripts] and [tool.poetry.scripts]. Configured ruff, mypy and black next to pytest, through uv run or poetry run when the lockfile says so. |
| Where things live | Each top-level folder git tracks, with the scripts that use it, and the entry points exactly as bin, exports or main declare them. |
| Runtime | As declared: a package.json repo is Node.js unless engines names Bun and not Node. |
A CI section, from a small pnpm repo:
.github/workflows/ci.yml (on pull_request)
# job test · ubuntu-latest
pnpm --filter widget test
npx tsc --noEmit
# 2 other steps in the file
A Python repo with uv.lock, ruff and mypy configured, and no workflows:
uv sync # install dependencies
uv run pytest
uv run ruff check .
uv run mypy .
- tally.cli:main — the tally command ([project.scripts])
No GitHub Actions workflows (.github/workflows/).
Why it matters
An agent that knows the facts spends its effort on the task, not on finding out how the repo works. We ran goose (CLI 1.57) on one repo with each version and asked what runs before a release: with 0.1.0 it took 2 shell calls and 66.8k tokens; with 0.2.0, 0 shell calls and 21.9k tokens. That's one run on one repo, so read it as a sign, not a benchmark.
Also in 0.2.0
-
The pre-commit hook works. It runs
npx agents-md-facts@0.2.0 --check, so it needs Node and network (pre-commit 3.2.0 or later). -
The GitHub Action runs its own version by default, not
latest. - CI runs on Windows too, so CRLF checkouts and paths are tested for real.
- Markers count only on a line of their own, and a file with two start markers is not written. Your text outside the block stays yours.
Upgrading from 0.1.0: run npx agents-md-facts once. The output changed, so --check reports the old file as stale until you refresh it.
Not claimed
- The goose numbers are one run on one repo.
- There's no
--versionyet: an unknown flag runs the default and writes the file. Rejecting unknown flags is next. - A Python repo's title uses the folder name, not the name in
pyproject.toml.
Try it
npx agents-md-facts # write or refresh the block
npx agents-md-facts --check # exit 1 if AGENTS.md is missing or stale
In CI:
- uses: Wolfe-Jam/agents-md-facts@v0.2.0
Before each commit:
- repo: https://github.com/Wolfe-Jam/agents-md-facts
rev: v0.2.0
hooks:
- id: agents-md-facts
MIT · GitHub · npm · release notes
Questions, nits, suggestions: tell us what you want to see next, here or on GitHub.
Top comments (0)