Skip to content
Agent Threat Rules (ATR)中文
RFC-001 · Quality Standard

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.

Draft·spec 1.0.1 (dated 19 October 2026)·npm 4.3.1·page generated 1 December 2026·canonical /spec·editor Adam Lin
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)
The formula

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
Precision
40%
(1 − wild_fp_rate) × 100

Measured false-positive rate on real-world corpora.

Wild validation
30%
min(wild_samples / 10,000, 1) × 100

How much real data the rule has survived.

Coverage
20%
min(conditions / 5, 1) × 100

Detection depth: the distinct attack layers covered.

Evasion docs
10%
min(documented_evasions / 5, 1) × 100

Honest acknowledgment of known bypass techniques.

What a score allows
90–100
Very High
Blocking candidate; verify on your own traffic first
60–79
Medium
Alert-only with monitoring
<40
Draft
Do not deploy
The differentiator

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.

The ladder

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.

draft

GateValid schema · ≥1 TP + 1 TN · no ReDoS

DeployNot deployed

experimental

Gate3+ TP + 3+ TN · CI pass · OWASP + MITRE mapping encouraged (not required) · evasion tests encouraged (not required)

DeployAlert-only

test

GateCanary observation passed · wild FP measured · no unresolved false-positive reports in the canary window

DeployAlert-only, promotion candidate

stable

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

deprecated

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.

Detection lanes

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 · Narrowest
stable 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 · Alert
stable + 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.
The gauntlet

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. 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. 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. 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. 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. 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. 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.

The landscape

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.

Maturity ladder with explicit gates
ATRyes
Sigmayes
YARAno
OWASP CRSyes
Suricatayes
Formula-based confidence score (0–100)
ATRyes
Sigmano
YARAno
OWASP CRSno
Suricatapartial
Wild validation required for production
ATRpartial
Sigmano
YARAno
OWASP CRSno
Suricatano
Per-field provenance tracking
ATRpartial
Sigmano
YARAno
OWASP CRSno
Suricatano
Automatic demotion on quality regression
ATRpartial
Sigmano
YARAno
OWASP CRSno
Suricatano
Open-source reference implementation
ATRyes
Sigmayes
YARAyes
OWASP CRSyes
Suricatayes

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

Verify it yourself

Run the validator yourself

Every function is pure, open-source, and documented. Score your own rules — or ours — in under a minute.

Install
npm install [email protected]
Score any rule
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.