AgentLint
Copilot instructions57 starsChanged 8 months agoMITView on GitHub
AgentLint is a shell-based linter for AI-friendly repos. It scans for CLAUDE.md/AGENTS.md quality, CI hygiene, and agent-ready patterns, then emits SARIF + scored reports. Implementation is bash + JavaScript: src/scanner.sh runs 51 deterministic checks across 6 core dimensions (findability, instructions, workability, safety, continuity, harness), and JS modules add 7 opt-in extended checks across 2 dimensions (Deep + Session) for 58 total. The CLI wrapper is shell + JS, published to npm. Any Copilot agent (Coding Agent, Code Review, ci-doctor) working…
- Reads credentials
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this copilot-instructions.md into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 9
No test assertion mutation: If a test is failing, fix the code or file a bug — never change the expected value in an assertion to make it …
- Very specific: line 11
No weakening of CI, workflows, or build config: Do not edit .github/workflows/, Makefile, tsconfig.json, package.json scripts, or test …
- Distinctive: line 13
No unrelated refactors: Only change lines directly required by the task.
- Distinctive: line 18
No commits to
main: All changes go through a PR. - Very specific: line 31
Commit subject: {type}: {description} where type is one of feat | fix | refactor | test | docs | chore | ci | style.
- Distinctive: line 34
Commit messages and PR descriptions: English, professional, no AI boilerplate ("Generated with...", "🤖").
- Very specific: line 35
Do not stage .env*, credentials, node_modules/, __pycache__/, or .git/ internals.
- Distinctive: line 39
When asked to fix a failing CI check:
- Distinctive: line 41
20-line soft cap on the diff: If the minimal fix needs more than ~20 changed lines, post a diagnosis comment instead of pushing code.
- Distinctive: line 44
Enum / union / literal changes: if the diff adds a new value to an enum or string-literal set, grep every consumer and verify each …
- Very specific: line 49
Run tests/test-scanner.sh locally before pushing.
- Distinctive: line 54
All code, comments, commits, and file content must be in English.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot instructions for AgentLint
AgentLint is a shell-based linter for AI-friendly repos. It scans for CLAUDE.md/AGENTS.md quality, CI hygiene, and agent-ready patterns, then emits SARIF + scored reports. Implementation is bash + JavaScript: src/scanner.sh runs 51 deterministic checks across 6 core dimensions (findability, instructions, workability, safety, continuity, harness), and JS modules add 7 opt-in extended checks across 2 dimensions (Deep + Session) for 58 total. The CLI wrapper is shell + JS, published to npm.
Any Copilot agent (Coding Agent, Code Review, ci-doctor) working on this repo must follow the rules below.
Hard rules — never violate
- No test assertion mutation. If a test is failing, fix the code or file a bug — never change the expected value in an assertion to make it pass.
- No lint / type / test suppressions. No
@ts-ignore,# noqa,// eslint-disable,it.skip,@pytest.mark.skip, or equivalent. The tool raised it for a reason. - No weakening of CI, workflows, or build config. Do not edit
.github/workflows/**,Makefile,tsconfig.json,package.jsonscripts, or test config to make things pass. Fix the code instead. - No deleting or skipping tests to resolve a failure.
- No unrelated refactors. Only change lines directly required by the task. A bug fix does not need surrounding cleanup.
- No features, abstractions, or error handling the task did not ask for. Three similar lines beats a premature abstraction. Don't validate scenarios that cannot happen.
- No absolute hardcoded paths (
/Users/...,/home/...). Use${CLAUDE_PLUGIN_ROOT}, env vars, or repo-relative paths. - No emoji in code, comments, commit messages, or markdown unless explicitly requested.
- No new top-level files (README alternates, design docs, notes) unless the task explicitly asks.
- No commits to
main. All changes go through a PR.
Scope discipline for this repo
- Adding a check requires evidence. Cite an Anthropic source, academic paper, or documented real-world failure in
standards/evidence.json. Opinions are not acceptable. - Scanner output is a contract. Changing the JSONL schema in
src/scanner.shrequires updating the scorer, plan-generator, and reporter in the same PR. - Scoring changes require rationale in
standards/weights.json. Do not adjust weights silently. - Thresholds in shell code must match
standards/evidence.json. Do not hardcode a new number without updating the evidence file. - Skills in
commands/*.mdmust reference bundled assets via${CLAUDE_PLUGIN_ROOT}. Persistent data goes in${CLAUDE_PLUGIN_DATA}or~/.al/, never the plugin root.
Commit and PR format
- Branch names:
feature/{desc},fix/{desc},chore/{desc}. Never develop onmain. - Commit subject:
{type}: {description}where type is one offeat | fix | refactor | test | docs | chore | ci | style. - One commit = one logical change. Source code first, tests second, docs/config third. Do not batch unrelated changes.
- Feature commits without a paired test commit will fail the
test-requiredcheck. - Commit messages and PR descriptions: English, professional, no AI boilerplate ("Generated with...", "🤖").
- Do not stage
.env*, credentials,node_modules/,__pycache__/, or.git/internals.
CI-fix specific rules (ci-doctor / @copilot fix CI)
When asked to fix a failing CI check:
- 20-line soft cap on the diff. If the minimal fix needs more than ~20 changed lines, post a diagnosis comment instead of pushing code.
- Classify the failure first. Environmental (flaky network, runner timeout, upstream outage) → recommend rerun, do not push. Permanent code issue → minimal fix only.
- Never rewrite history (no force-push, no
git commit --amendon pushed commits, no rebasing the PR branch). - Enum / union / literal changes: if the diff adds a new value to an enum or string-literal set, grep every consumer and verify each switch/match covers the new case. Unhandled values cause silent fallthrough.
Testing
- Shell scanner rules have fixtures in
tests/test-scanner.sh. Every rule change needs a matching fixture. - Run
tests/test-scanner.shlocally before pushing. - Accuracy baseline lives in
standards/accuracy-baseline.json— do not overwrite without running the full accuracy job.
Language
- All code, comments, commits, and file content must be in English.
- Comments: default to none. Only explain a non-obvious WHY — a hidden constraint, a subtle invariant, a workaround for a specific upstream bug. Do not describe WHAT the code does. Do not reference the current task, PR, or issue number in comments.
When to stop and ask
- The task requires editing
.github/workflows/**, branch protection rules, or release configuration. - The task touches
src/scanner.shrule output format. - The fix requires more than 20 lines or touches more than 3 files.
- Any ambiguity about whether a test failure is real or environmental.
In these cases, post a diagnosis comment explaining what you found and what the human needs to decide. Do not push a guess.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

