AGENTS.md Generator

Generator / Guides / Keep AGENTS.md up to date

Keep AGENTS.md up to date

An AGENTS.md written once drifts as dependencies, scripts and tools change. Automate the parts that can be detected and keep the human parts by hand.

Why files go stale

Commands get renamed, test runners change and new frameworks arrive, but nobody edits the file that tells agents how the project works. Stale instructions are worse than none, because agents follow them.

Separate generated and hand written text

Wrap the generated rules in comment markers and keep project specific notes outside them. A tool can then rewrite the block safely. The AGENTS.md generator uses agents-md-generator start and end comments for this.

Open a pull request on a schedule

A weekly GitHub Actions workflow rescans manifests, lockfiles and file names, regenerates the block and opens a pull request only when something changed. You review the diff like any other change.

The generator produces this workflow for you, with permissions and an optional adopt switch for repositories that already have an AGENTS.md.

Fail pull requests that drift

A second workflow runs the same scan in check mode. If a dependency change should have updated the file, the check fails and tells the author to run the updater.

Tune the result

Add a small .agents-md.json to include or exclude packs and to override commands that detection cannot know. Review every update, because detection reads dependencies and file names and can miss technologies that live only in code.

Generate your AGENTS.md

More guides