Agent-friendly linter
Coding agents (Claude Code, Cursor, Aider, Copilot Chat, Codex)
write real code in real repos every day, and they make
structurally-typical mistakes: stray .bak files,
committed console.logs, files in unconventional
locations. Generic linters tell humans about these. alint
also tells the agent, in a shape the agent can read
without re-parsing.
Four things alint does for agent workflows
1. The agent output format
Every alint violation can carry an agent_instruction
string, written for an agent to act on, not a human to read. Run:
alint check --format agent …and you get a JSON document where each violation includes a deterministic, machine-readable instruction:
{
"violations": [
{
"rule": "filename_case",
"file": "src/myComponent.tsx",
"expected": "kebab-case (per .alint.yml)",
"agent_instruction": "Rename src/myComponent.tsx to src/my-component.tsx and update all imports."
}
]
} It's a string field on the rule definition, not an ML-powered fix generator. The point is that the rule author writes the remediation once, in language the agent understands, instead of the agent re-deriving it from a human-targeted error message. Full schema: alint check --format agent.
2. Bundled agent-hygiene@v1 ruleset
A drop-in ruleset for the most common agent-typical mistakes:
extends:
- alint://bundled/agent-hygiene@v1
Catches: .bak / .orig files left in
commits, console.log / print() debugging
in committed code, accidentally-committed node_modules/
or target/, TODO(agent): comments
without an issue ref, files outside conventional directories.
Full rule list:
/docs/bundled-rulesets/agent-hygiene/.
3. Bundled agent-context@v1 ruleset
The companion ruleset that ensures your repo teaches the
agent the conventions it should follow, via the file
conventions that have settled across the agent ecosystem
(AGENTS.md, .cursorrules,
.clauderules, .windsurfrules):
extends:
- alint://bundled/agent-context@v1
Asserts: an agent-config directory exists, an
AGENTS.md (or equivalent) lives at repo root, and
the agent-config content lines up with the conventions the rest
of the repo expects. Full rule list:
/docs/bundled-rulesets/agent-context/.
4. The export-agents-md subcommand
The companion to agent-context: instead of writing
AGENTS.md by hand and hoping it stays in sync with
your lint rules, alint export-agents-md generates
(or splices) the rule-derived section from your active config:
# Print the generated section to stdout
alint export-agents-md
# Write/replace a file
alint export-agents-md --output AGENTS.md
# Splice between <!-- alint:start --> / <!-- alint:end -->
# markers in an existing AGENTS.md
alint export-agents-md --inline --output AGENTS.md
Every rule with a message: becomes one bullet the
agent reads in its pre-prompt, so the agent sees exactly the
rules it will be checked against — no drift between
AGENTS.md and .alint.yml. Wire it into
a pre-commit hook or a CI job to keep AGENTS.md
re-synced on every config change.
Why this matters
Once coding agents are in your contributor mix, the lint loop
becomes agent-driven: the agent makes a change, CI runs alint,
alint emits agent-format JSON, and the agent reads its own
violations and self-fixes. The agent_instruction
field makes that loop deterministic instead of having the agent
re-derive the remediation from a natural-language error string
on every run.
The framing is collaborative. Agents are users of the lint output, and alint serves them the same way it serves humans. See the comparison page for the agent-aware-output row in the feature matrix.
Get started with the agent surfaces in two commands:
brew install asamarts/alint/alint
alint check --format agent