paiml-mcp-agent-toolkit
AGENTS.md171 starsChanged 4 months agoMITView on GitHub
Welcome to the paiml-mcp-agent-toolkit (PMAT) codebase! PMAT is a zero-config AI context generation and code quality toolkit. When making code changes, ensure that PMAT quality gates (via the pmat-quality-feedback.sh hook) pass. If it fails, fix the code according to the feedback! PMAT is contract-first: a rule's behaviour is declared in contracts/*.yaml and bound to the code by #[provable_contracts_macros::contract(...)], so the contract is checked by the build rather than by review. Write or update the contract before the code it governs.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- dogfoodSkill
- Deep Context Generation with PMATSkill
- Multi-Language Project Analysis with PMATSkill
- Code Quality Analysis with PMATSkill
- Automated Refactoring with PMATSkill
- Technical Debt Tracking with PMATSkill
- dogfoodSkill
- Deep Context Generation with PMATSkill
- Multi-Language Project Analysis with PMATSkill
- Code Quality Analysis with PMATSkill
- Automated Refactoring with PMATSkill
- Technical Debt Tracking with PMATSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Use the PMAT CLI via the configured MCP Server for quality checks and analysis.
- Very specific: line 8
Follow the rules defined in .agents/rules/ for all operations.
- Very specific: line 12
When making code changes, ensure that PMAT quality gates (via the pmat-quality-feedback.sh hook) pass.
- Very specific: line 21
Run pmat verify before every commit.
- Distinctive: line 44
Before trusting any new gate, apply the defect it targets and confirm it turns red, then restore and confirm it turns green again.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md 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
Antigravity Global Rules for PMAT
Welcome to the paiml-mcp-agent-toolkit (PMAT) codebase! PMAT is a zero-config AI context generation and code quality toolkit.
Agent Guidelines
- Use the PMAT CLI via the configured MCP Server for quality checks and analysis.
- Follow the rules defined in
.agents/rules/for all operations. - Maintain test coverage above 95% (as detailed in the rules).
- Adhere to the autonomous verify loop protocol for self-correction.
When making code changes, ensure that PMAT quality gates (via the pmat-quality-feedback.sh hook) pass. If it fails, fix the code according to the feedback!
Contract-first, and how it is enforced
PMAT is contract-first: a rule's behaviour is declared in contracts/*.yaml and
bound to the code by #[provable_contracts_macros::contract(...)], so the
contract is checked by the build rather than by review. Write or update the
contract before the code it governs.
Run pmat verify before every commit. It runs the gate set CI enforces —
format, complexity, satd, clippy, tests — fail-fast, so green here means green
in CI. The pre-commit hook and pmat quality-gate both skip clippy and tests;
pmat verify does not.
pmat comply check audits the 157 registered rules. Two of them are worth
knowing before you touch a number in a config file:
- CB-2101 (threshold coherence) — every scalar threshold in
.pmat-metrics.tomlmust bind to a metric in.pmat-ratchet.toml. A limit that is breached at HEAD, or so far from the measurement that nothing could ever reach it, fails. An unbound threshold fails too: a number enforced by nothing reads as enforcement and enforces nothing. - CB-2102 (ratchet) — baselines may only improve. The gate does not read the
number; it re-runs the
commandrecorded beside it. A metric that cannot be measured FAILS, because "we could not measure it" must never be recorded as "it did not regress".
That last rule generalises, and it is the one to internalise: a measurement with no failing condition is indistinguishable from a correct one. Prefer the compiler over a text search whenever the question is "does this construct appear in shipped code" — pmat is a linter, so its own source contains as data every pattern it hunts, and grepping it for a defect marker returns its own detectors. Before trusting any new gate, apply the defect it targets and confirm it turns red, then restore and confirm it turns green again.
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.

