Originally created by: fu351
Adds PiiDataClassRule (engine/rules/data_classes.py, wired into BUILTIN_RULE_TYPES): checksum-valid structured personal/financial data in an outbound payload — payment card number (known issuer IIN + Luhn), IBAN (mod-97), dashed US SSN (SSA validity constraints) — co-occurring with an external destination steps up to AUTH in every mode. New reason code pii_data_class_egress, documented in docs/REASON_CODES.md.
Precision is the design center, per the issue: presence alone never escalates (the rule reuses the secret rule's _has_external_destination gate and _scan_strings traversal), and every class is checksum/format-validated so random digit runs (timestamps, ids, hashes) fail. Boundary decision (ADR 0076): public-checksum structured formats are core-basic; free-text PII, OTP classification, and anything statistical is enterprise via the Detector seam. Deliberately excluded, recorded as ceilings: undashed SSNs, one-time auth codes, free-text names/addresses.
AUTH, never BLOCK — a human may legitimately send payment data; the point is a human confirms it. Raise-only end to end.
tests/unit/test_rule_data_classes.py (14): each class fires on the co-occurrence; spaced/dashed separators; URL-query fallback with no raw args; command-egress payloads; the co-occurrence gate (PAN to a local file → PASS); Luhn/mod-97/SSA failures → PASS; digits embedded in longer runs (epoch-ns) → PASS; the matched value never appears in the explanation or any build_record() field; the rule returns only PASS/AUTH.
Ticket changed by: fu351