agentslint
A tool to keep AGENTS.md instructions honest as the repository changes.
agentslint is a static referential-integrity checker for AI agent instruction files. It finds stale file paths, broken internal links, missing command targets, and undeclared development tools before an agent follows outdated guidance.
services/api/AGENTS.md:18: error[path-exists]: path does not exist: src/legacy.py
services/web/AGENTS.md:27: error[npm-script]: npm script does not exist in services/web/package.json: verify
AGENTS.md:42: warning[scope-ambiguous]: make command has multiple applicable Makefiles: services/api/Makefile, services/web/Makefile
agentslint: checked 3 instruction files; 2 errors, 1 warning
The validator reads repository content but never executes commands from AGENTS.md, imports application code, installs project dependencies, or accesses external URLs.
Why agentslint?
Agent instructions are operational documentation. A renamed test, moved service, removed script, or retired formatter can silently turn correct guidance into a bad plan. Ordinary code tests rarely catch that drift because the Markdown itself did not change.
agentslint check . scans every tracked root and nested AGENTS.md, even when those files are unchanged. It checks the current working tree against the repository structure and manifests that the instructions describe.
Use it to:
- Catch references to files and directories that were moved or deleted.
- Verify internal Markdown links, heading anchors, globs, and path templates.
- Check Make targets, npm scripts, Python modules, pytest nodes, Go tests, and dbt selectors without running them.
- Detect development tools still named in instructions after their declarations were removed.
- Surface ambiguous project scopes before an agent chooses the wrong service.
- Add a focused, read-only integrity check to local development, pre-commit, and CI.
Install
agentslint requires Python 3.11 or newer.
Run it without a persistent installation:
uvx agentslint check .
Or install it permanently onto your machine with uv:
uv tool install agentslint
Then run:
$ agentslint check .
agentslint: checked 1 instruction file; no issues found
Quick start
No configuration is required for conventional repositories. From anywhere inside a Git repository:
agentslint check .
agentslint discovers tracked AGENTS.md files recursively and uses the Git index as its canonical repository inventory. Staged additions count; deleted and untracked references do not count unless an untracked root is explicitly configured. Outside a Git worktree, agentslint falls back to a filesystem walk with standard dependency and VCS directories excluded.
To check one subtree or instruction file while retaining repository-wide resolution:
agentslint check services/frontend
agentslint check services/frontend/AGENTS.md
Use --strict when warnings about ambiguity or unsupported syntax should also fail:
agentslint check . --strict
What it validates
| Reference | Validation |
|---|---|
| Paths and directories | Resolves tracked paths in the instruction file, repository-root, and inferred project scopes; preserves file/directory expectations. |
| Globs and templates | Requires globs to match and established templates to have a concrete tracked example; creation destinations only require a valid parent. |
| Markdown links | Checks relative files and GitHub-style heading anchors. External URLs are intentionally skipped. |
| Shell examples | Tokenizes supported inline, indented, and fenced shell examples while tracking explicit cd changes. |
| Make | Finds the applicable Makefile, literal targets, and local static includes without asking Make to parse the file. |
| npm and pnpm | Checks scripts, lifecycle commands, directory options, and literal workspace selectors against the applicable package.json. |
| Python, Poetry and uv | Resolves scripts, local modules, nested test commands, declared distributions, project scripts, and project-directory options. |
| pytest | Resolves paths and literal file.py::Class::test_name nodes with Python's AST, without collecting tests. |
| Go | Resolves go test packages and simple literal -run test names from the applicable module. |
| dbt | Resolves model, source, and tag selectors from committed project sources or configured manifests. |
| Managed tools | Checks tools against pyproject, requirements, Node, Go, and pre-commit inventories; prohibited mentions are skipped. |
Dynamic shell expressions and selectors that cannot be proven statically produce warnings instead of being evaluated. The tool favors an explicit ambiguity diagnostic over silently selecting one plausible project.
Exit codes and output
| Exit code | Meaning |
|---|---|
0 |
No errors. Warning-only runs also return 0 unless --strict is set. |
1 |
At least one confirmed validation error, or a warning under --strict. |
2 |
Invalid configuration or an internal execution error. |
Text output is the default and ends with the number of instruction files checked plus error and warning totals. GitHub annotations and versioned JSON are also available:
agentslint check . --format text
agentslint check . --format github
agentslint check . --format json
Configuration
See Configuration.
GitHub Actions
See GitHub Actions.
Safety and boundaries
agentslint treats repository content as untrusted input:
- Documented shell commands, Makefiles, tests, dbt projects, and application modules are never executed or imported.
- Validation is local and read-only apart from normal tool caches and report output.
- External links are not fetched.
- Paths are constrained to the repository.
- Input files are size-bounded and parsed with data-only readers.
It checks whether instructions refer to real repository objects. It does not judge whether the advice is strategically correct, prove that a command succeeds at runtime, rewrite documentation, or replace language-specific tests and linters.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentslint-0.1.0.tar.gz.
File metadata
- Download URL: agentslint-0.1.0.tar.gz
- Upload date:
- Size: 86.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
884a7e89415aaacd65cec86d20df4bc8434a08922959686ea1e8c1add2edfe96
|
|
| MD5 |
5610b9f6b63419bda44b2b2685596d53
|
|
| BLAKE2b-256 |
f430323ff0640e6f91feccb35aa88e048aafeedf48b0d6264d0cde6eddf28f08
|
Provenance
The following attestation bundles were made for agentslint-0.1.0.tar.gz:
Publisher:
ci_cd.yaml on jyablonski/agentslint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentslint-0.1.0.tar.gz -
Subject digest:
884a7e89415aaacd65cec86d20df4bc8434a08922959686ea1e8c1add2edfe96 - Sigstore transparency entry: 2278702399
- Sigstore integration time:
-
Permalink:
jyablonski/agentslint@ae268a4c2dc9e9e8c198c70741ba7dbe0899cc26 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jyablonski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yaml@ae268a4c2dc9e9e8c198c70741ba7dbe0899cc26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentslint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentslint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47d20e40ee2b3e89581adc5caeb59cafc75c030f5b4a5512a0ea98f5f6bcf625
|
|
| MD5 |
01a2739516993a0e8d233773ef4cd7cd
|
|
| BLAKE2b-256 |
811eea9910891201a4e7b1bd696a82559293157775b7f4f947c9ebce621f1fa3
|
Provenance
The following attestation bundles were made for agentslint-0.1.0-py3-none-any.whl:
Publisher:
ci_cd.yaml on jyablonski/agentslint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentslint-0.1.0-py3-none-any.whl -
Subject digest:
47d20e40ee2b3e89581adc5caeb59cafc75c030f5b4a5512a0ea98f5f6bcf625 - Sigstore transparency entry: 2278702471
- Sigstore integration time:
-
Permalink:
jyablonski/agentslint@ae268a4c2dc9e9e8c198c70741ba7dbe0899cc26 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jyablonski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yaml@ae268a4c2dc9e9e8c198c70741ba7dbe0899cc26 -
Trigger Event:
push
-
Statement type: