An AI agent rule standard with provenance tracking
Every rule has a confidence score you can compute yourself, and under the current gates a rule moves up a level only on the evidence that level asks for. A rule file can record who set each framework mapping. The formula is public and the code is open source, so anyone can recompute it.
npm install [email protected]- 101,280
- Real agent skills and MCP definitions scanned across 5 registries (engine v2.0.0, as of 2026-04-13)
- 1,434
- Items flagged by that scan (as of 2026-04-13)
Confidence is a number, not an opinion
Every component is computed from measurable facts. Run it yourself — the formula is public.
confidence = 0.4 × precision + 0.3 × wild + 0.2 × coverage + 0.1 × evasion(1 − wild_fp_rate) × 100Measured false-positive rate on real-world corpora.
min(wild_samples / 10,000, 1) × 100How much real data the rule has survived.
min(conditions / 5, 1) × 100Detection depth: the distinct attack layers covered.
min(documented_evasions / 5, 1) × 100Honest acknowledgment of known bypass techniques.
- 90–100
- Very High
- Blocking candidate; verify on your own traffic first
- 60–79
- Medium
- Alert-only with monitoring
- <40
- Draft
- Do not deploy
Two-dimensional compliance model
Separating 'does the rule have the metadata' from 'who verified it'. The LLM participates only at authoring time; the detection core itself is deterministic regex / AST matching and calls no LLM at evaluation time.
- Dimension 1: technical compliance
Does the rule have the required metadata? Detection conditions, test cases, OWASP and MITRE references, false positive documentation. Machine-verifiable in under a millisecond.
validateRuleMeetsStandard(rule)- Dimension 2: trust compliance
Who verified the metadata? human-reviewed, community-contributed, auto-generated, or llm-generated. Stable promotion requires verified provenance — not just presence.
metadata_provenance: { mitre_atlas: human-reviewed }
Why this matters
Traditional rule standards (Sigma, YARA, OWASP CRS) treat compliance as binary — either the metadata is there or it is not. This creates a perverse incentive: vendors pad metadata to pass the check without doing the underlying review work.
ATR separates the two dimensions. Auto-generated mappings can pass the experimental gate for fast iteration. A rule promoted to stable today must have its provenance reviewed by a person.
A rule moves up on evidence
Five rungs: draft, experimental, test, stable, deprecated. Each gate is explicit and mechanical — a rule now moves up on the evidence it has accumulated, never on how long it has sat in the repository. Stable rules older than these gates are being brought up to them; the research page has the progress. When quality regresses, a pull request demotes the rule, and a person reviews it before it merges.
GateValid schema · ≥1 TP + 1 TN · no ReDoS
DeployNot deployed
Gate3+ TP + 3+ TN · CI pass · OWASP + MITRE mapping encouraged (not required) · evasion tests encouraged (not required)
DeployAlert-only
GateCanary observation passed · wild FP measured · no unresolved false-positive reports in the canary window
DeployAlert-only, promotion candidate
GateWild-validated (1,000+ samples) · FP rate ≤ 0.5% · human-verified provenance · ≥3 evasion tests
DeployCandidate for blocking; run it on your own traffic first
GateSuperseded or demoted · retained for provenance · engines MUST NOT enable by default
DeployOff by default
Demotion
Every week each stable rule is re-run against the whole current benign corpus. A rule that matches any benign sample is demoted from stable to test in an automatically opened pull request: it leaves the blocking lane but keeps alerting in the alert and hunt lanes. That pull request goes through CI and human review like any other rule change. The benign corpus grows as confirmed false-positive reports are added to it.
Maturity decides what a rule is allowed to do
The ladder is not just a label — it drives three detection lanes. Each lane is an explicit tradeoff between which maturities it admits and how much false positive it tolerates.
- enforce lane · Narroweststable only
- Admits only rules whose maturity is stable. It gives up recall for precision, and it is the lane to use when a match blocks something. Run it on your own traffic before you turn blocking on.
- alert lane · Alertstable + test · for alerting
- Adds promotion-candidate test rules, surfacing more of the attack surface. It is meant for alerts that a person reads.
- hunt lane · Widest (default)every effective rule, advisory
- Runs every rule as an advisory signal, giving threat hunters maximum visibility. It flags more than the enforce lane does. The engine and the Claude Code hook do not block in this lane by default; the Mastra, OpenShell and NemoClaw adapters block high and critical matches unless their settings are changed.
Six steps between a pull request and npm
Every rule takes the same path, whoever drafted it. Steps 2 to 4 run in CI, and their criteria are in the public workflows.
- 1
Pull request
Rules come from CVE and advisory sweeps, benchmark-miss mining and contributors. Whether a person or an LLM drafted it, a rule reaches main only through a pull request.
- 2
Schema and own tests
The rule must match the schema, its framework mappings must be on the allowlists, and it must catch every true positive it lists.
- 3
Benign corpus
A new rule may not fire on the public benign skill corpus or on the corpus of text that mentions attacks without being one, and may not match any other rule's true negatives.
- 4
Regex safety
Regexes must pass the ReDoS gate and the RE2 portability check. Known older problems are tracked in a baseline that may shrink but not grow.
- 5
Maintainer review
A maintainer reviews and merges. A pull request that promotes a rule to stable must also stay at zero false positives on the benign corpus, or CI fails.
- 6
Staged release
After a maintainer pushes a version tag, CI stages the release on npm, and it goes live only once a maintainer approves it with 2FA.
How ATR compares to existing rule standards
Sigma, YARA, OWASP CRS, and Suricata solved this for malware, SIEM, WAF, and IDS. AI agents do not have an equivalent standard yet.
| Feature | ATR | Sigma | YARA | OWASP CRS | Suricata |
|---|---|---|---|---|---|
| Maturity ladder with explicit gates | yes | yes | no | yes | yes |
| Formula-based confidence score (0–100) | yes | no | no | no | partial |
| Wild validation required for production | partial | no | no | no | no |
| Per-field provenance tracking | partial | no | no | no | no |
| Automatic demotion on quality regression | partial | no | no | no | no |
| Open-source reference implementation | yes | yes | yes | yes | yes |
- Maturity ladder with explicit gates
- ATRyesSigmayesYARAnoOWASP CRSyesSuricatayes
- Formula-based confidence score (0–100)
- ATRyesSigmanoYARAnoOWASP CRSnoSuricatapartial
- Wild validation required for production
- ATRpartialSigmanoYARAnoOWASP CRSnoSuricatano
- Per-field provenance tracking
- ATRpartialSigmanoYARAnoOWASP CRSnoSuricatano
- Automatic demotion on quality regression
- ATRpartialSigmanoYARAnoOWASP CRSnoSuricatano
- Open-source reference implementation
- ATRyesSigmayesYARAyesOWASP CRSyesSuricatayes
The three marked partial are requirements in RFC-001 that the rules are still being brought up to. Demotion goes through a pull request that a person reviews. How far that has got
Run the validator yourself
Every function is pure, open-source, and documented. Score your own rules — or ours — in under a minute.
npm install [email protected]
import {
parseATRRule,
computeConfidence,
validateRuleMeetsStandard,
} from 'agent-threat-rules/quality';
const rule = parseATRRule(yamlContent);
const score = computeConfidence(rule);
const gate = validateRuleMeetsStandard(rule, 'stable');
console.log('Confidence:', score.total); // 0-100
console.log('Passes stable:', gate.passed);
console.log('Issues:', gate.issues);The formula is public, and anyone can recompute it.
The formula and the scoring library are public. Any scanner can score rules on the same axes with the same library and check the result itself.
Interests: the maintainer founded and controls PANGUARD AI, INC., which sells AI agent security products built on ATR.
