/** * ATR Quality Standard — Quality Gate * * Checks whether a rule meets the minimum quality bar for a target maturity * level. Used by TC crystallization pipeline to reject weak LLM-generated * rules before they enter the proposal pipeline. * * See docs/proposals/001-atr-quality-standard-rfc.md §3 for the required * metadata matrix. * * @module agent-threat-rules/quality/quality-gate */ import type { Maturity, QualityGateResult, RuleMetadata } from "./types.js"; /** * Minimum requirements for each maturity level. * * RFC-001 v1.1 (effective 2026-04-12) splits the quality bar: * - experimental: 3/3/0 — low barrier for community contribution. OWASP, * MITRE, evasion tests, and FP docs are encouraged but NOT required. * The upgrade pipeline adds these during promotion to stable. * - stable: 5/5/3 — production-quality bar with verified provenance, * OWASP + MITRE mapping, evasion tests, and wild validation. * * Rationale: VirusTotal doesn't reject "low quality" samples — everything * gets in. Sigma experimental is loose. A strict experimental gate kills * community contribution velocity. Data velocity > data purity at scale. * * See docs/proposals/001-atr-quality-standard-rfc.md §1 and §3. */ declare const REQUIREMENTS: { readonly draft: { readonly minConditions: 1; readonly minTruePositives: 1; readonly minTrueNegatives: 1; readonly minEvasionTests: 0; readonly requireOwasp: false; readonly requireMitre: false; readonly requireFalsePositiveDocs: false; readonly requireHumanReviewedProvenance: false; }; readonly experimental: { readonly minConditions: 1; readonly minTruePositives: 3; readonly minTrueNegatives: 3; readonly minEvasionTests: 0; readonly requireOwasp: false; readonly requireMitre: false; readonly requireFalsePositiveDocs: false; readonly requireHumanReviewedProvenance: false; }; readonly stable: { readonly minConditions: 3; readonly minTruePositives: 5; readonly minTrueNegatives: 5; readonly minEvasionTests: 3; readonly requireOwasp: true; readonly requireMitre: true; readonly requireFalsePositiveDocs: true; readonly requireHumanReviewedProvenance: true; }; }; /** * RFC-001 v1.1 §1.1 — Single-Pattern Rule Exception threshold. * * A rule with fewer than `minConditions` for its target maturity level * is still accepted if it has been validated against at least this many * real-world samples with a measured false-positive rate of exactly 0. * Set to the size of the most recent ATR mega scan as of effective date, * which is the empirical evidence baseline the standard authors used. */ export declare const SINGLE_PATTERN_EXCEPTION_MIN_SAMPLES = 50000; /** * Validate a rule against the quality bar for a target maturity level. * * @param rule - Rule metadata * @param target - Target maturity level to validate against (default: rule.maturity) * @returns Gate result with passed/failed and human-readable issues */ export declare function validateRuleMeetsStandard(rule: RuleMetadata, target?: Maturity): QualityGateResult; /** * Public accessor for the requirements table. * Useful for documentation generators and UIs that display the quality bar. */ export declare function getRequirements(): typeof REQUIREMENTS; export {}; //# sourceMappingURL=quality-gate.d.ts.map