"""ACGS-Lite Constitution package — governance rule definitions and analysis.

Eagerly loads hot-path-critical types (Constitution, Rule, Severity, etc.).
All other symbols are lazy-loaded via ``_LAZY_REGISTRY`` on first access.
"""

from __future__ import annotations

import importlib
from typing import Any

from .abac import (
    CLASS_CONFIDENTIAL,
    CLASS_INTERNAL,
    CLASS_PHI,
    CLASS_PII,
    CLASS_PUBLIC,
    CLASS_SECRET,
    CLASS_TOP_SECRET,
    REGION_APAC,
    REGION_EU,
    REGION_GLOBAL,
    REGION_UK,
    REGION_US,
    RISK_CRITICAL,
    RISK_HIGH,
    RISK_LOW,
    RISK_MEDIUM,
    TIER_AUTONOMOUS,
    TIER_PRIVILEGED,
    TIER_RESTRICTED,
    TIER_STANDARD,
    EvaluationContext,
)
from .analytics import (
    _KW_NEGATIVE_RE,
    _NEGATIVE_VERBS_LIST,
    _NEGATIVE_VERBS_RE,
    _POSITIVE_VERBS_SET,
    classify_action_intent,
    governance_decision_report,
    score_context_risk,
)
from .autonomy_ratio import (
    ActionCommitment,
    CommitmentRatioState,
    CommitmentRatioTracker,
    classify_action,
)
from .boundaries import BoundaryViolation, PolicyBoundary, PolicyBoundarySet
from .core import AcknowledgedTension, Constitution, Rule, RuleSynthesisProvider, Severity
from .deduplication import (
    DuplicationReport,
    ExactDuplicateGroup,
    NearDuplicatePair,
    SubsetRedundancy,
    deduplicate,
    find_duplicates,
)
from .intent_alignment import (
    ActionAlignmentRecord,
    IntentAlignmentState,
    IntentAlignmentTracker,
    IntentProfile,
)
from .interpolation import (
    context_coverage,
    extract_placeholders,
    render_constitution,
    render_rule,
    render_text,
    validate_context_schema,
)
from .memoization import CacheStats, MemoizedConstitution
from .metrics import (
    AuditEntry,
    AuditLedger,
    GovernanceCostModel,
    GovernanceEvent,
    GovernanceForecaster,
    GovernanceMetrics,
    GovernanceSession,
    GovernanceSLO,
    RuleEffectiveness,
    create_governance_event,
)
from .obligation_engine import ObligationEngine, ObligationRecord, ObligationSpec, ObligationStatus
from .routing import GovernanceRouter
from .snapshot import ConstitutionSnapshot, capture_snapshot
from .templates import ConstitutionBuilder
from .versioning import ChangelogEntry, GovernanceChangelog, RuleSnapshot
from .weighted_policy import RulePenalty, WeightedConstitution, WeightedEvaluationResult

# ── Declarative lazy-load registry ────────────────────────────────────────────
# Maps symbol_name → (module_name, domain).
# __getattr__ imports the module on first access.
# To add a new symbol: add ONE line to this dict. That's it.
#
# Domains organise 80 modules into 5 virtual sub-packages:
#   core        — Foundation types, rule definitions, builders, ABAC
#   lifecycle   — Policy versioning, amendments, migration, rollout, export
#   enforcement — Runtime enforcement, access control, trust, delegation
#   monitoring  — Metrics, behavioral tracking, observability, anomaly detection
#   analysis    — Quality analysis, simulation, compliance, reporting

_LAZY_REGISTRY: dict[str, tuple[str, str]] = {
    # ── editor ─────────────────────────────────────────────────────────
    "RuleDraft": ("editor", "lifecycle"),
    "ConstitutionDiff": ("editor", "lifecycle"),
    "ConstitutionVersion": ("editor", "lifecycle"),
    "ConstitutionEditor": ("editor", "lifecycle"),
    "ConstitutionVersionControl": ("editor", "lifecycle"),
    "merge_constitutions": ("editor", "lifecycle"),
    # ── lifecycle ─────────────────────────────────────────────────────────
    "Amendment": ("amendments", "lifecycle"),
    "AmendmentProtocol": ("amendments", "lifecycle"),
    "AmendmentStatus": ("amendments", "lifecycle"),
    "AmendmentType": ("amendments", "lifecycle"),
    "Vote": ("amendments", "lifecycle"),
    "DecisionFlip": ("rollout", "lifecycle"),
    "RolloutStage": ("rollout", "lifecycle"),
    "RolloutStageMetrics": ("rollout", "lifecycle"),
    "PolicyRolloutPipeline": ("rollout", "lifecycle"),
    "PolicyWaiver": ("waivers", "lifecycle"),
    "WaiverRegistry": ("waivers", "lifecycle"),
    "WaiverStatus": ("waivers", "lifecycle"),
    "PolicyVersionMigrator": ("migration", "lifecycle"),
    "MigrationPlan": ("migration", "lifecycle"),
    "MigrationResult": ("migration", "lifecycle"),
    "MigrationStatus": ("migration", "lifecycle"),
    "RuleMigrationStep": ("migration", "lifecycle"),
    "RuleAction": ("migration", "lifecycle"),
    "PolicyLifecycleOrchestrator": ("policy_lifecycle", "lifecycle"),
    "ManagedPolicy": ("policy_lifecycle", "lifecycle"),
    "PolicyState": ("policy_lifecycle", "lifecycle"),
    "LifecycleGate": ("policy_lifecycle", "lifecycle"),
    "GateType": ("policy_lifecycle", "lifecycle"),
    "TransitionResult": ("policy_lifecycle", "lifecycle"),
    "RolloutPlan": ("policy_lifecycle", "lifecycle"),
    "TransitionRecord": ("policy_lifecycle", "lifecycle"),
    "OrchestratorTransitionResult": ("policy_lifecycle", "lifecycle"),
    "GateEvaluation": ("policy_lifecycle", "lifecycle"),
    "PolicyExporter": ("policy_export", "lifecycle"),
    "GovernanceFeatureFlag": ("feature_flag", "lifecycle"),
    "FlagManager": ("feature_flag", "lifecycle"),
    "FlagStatus": ("feature_flag", "lifecycle"),
    "FlagChangeEvent": ("feature_flag", "lifecycle"),
    "ChangeRequestManager": ("change_request", "lifecycle"),
    "ChangeRequest": ("change_request", "lifecycle"),
    "ChangeRequestStatus": ("change_request", "lifecycle"),
    "ChangeType": ("change_request", "lifecycle"),
    "ChangeRequestEvent": ("change_request", "lifecycle"),
    "TagRegistry": ("tags", "lifecycle"),
    "TagStats": ("tags", "lifecycle"),
    "RuleTemplate": ("rule_template", "lifecycle"),
    "RuleTemplateRegistry": ("rule_template", "lifecycle"),
    "InstantiationRecord": ("rule_template", "lifecycle"),
    "GovernanceAttestation": ("attestation", "lifecycle"),
    "AttestationRegistry": ("attestation", "lifecycle"),
    # ── enforcement ───────────────────────────────────────────────────────
    "PolicyDecisionPoint": ("enforcement", "enforcement"),
    "PolicyEnforcementPoint": ("enforcement", "enforcement"),
    "PolicyDecision": ("enforcement", "enforcement"),
    "EnforcementResult": ("enforcement", "enforcement"),
    "EnforcementPolicy": ("enforcement", "enforcement"),
    "EnforcementAction": ("enforcement", "enforcement"),
    "DecisionOutcome": ("enforcement", "enforcement"),
    "PEPNetwork": ("enforcement", "enforcement"),
    "GraduatedEnforcer": ("graduated_enforcement", "enforcement"),
    "EnforcementLevel": ("graduated_enforcement", "enforcement"),
    "EscalationPolicy": ("graduated_enforcement", "enforcement"),
    "ViolationRecord": ("graduated_enforcement", "enforcement"),
    "EscalationEvent": ("graduated_enforcement", "enforcement"),
    "GovernanceEmergencyOverride": ("emergency", "enforcement"),
    "EmergencyOverride": ("emergency", "enforcement"),
    "OverridePolicy": ("emergency", "enforcement"),
    "OverrideScope": ("emergency", "enforcement"),
    "OverrideStatus": ("emergency", "enforcement"),
    "GovernanceCircuitBreaker": ("circuit_breaker", "enforcement"),
    "CircuitBreakerPolicy": ("circuit_breaker", "enforcement"),
    "CircuitState": ("circuit_breaker", "enforcement"),
    "CircuitEvent": ("circuit_breaker", "enforcement"),
    "FallbackPolicy": ("circuit_breaker", "enforcement"),
    "GovernanceRateLimiter": ("ratelimit", "enforcement"),
    "RateLimitPolicy": ("ratelimit", "enforcement"),
    "RateLimitResult": ("ratelimit", "enforcement"),
    "RateLimitAction": ("ratelimit", "enforcement"),
    "AutonomySphere": ("guardian", "enforcement"),
    "GuardianGate": ("guardian", "enforcement"),
    "QuarantinedAction": ("quarantine", "enforcement"),
    "GovernanceQuarantine": ("quarantine", "enforcement"),
    "QuarantineStatus": ("quarantine", "enforcement"),
    "TimeoutPolicy": ("quarantine", "enforcement"),
    "GovernanceEscrow": ("escrow", "enforcement"),
    "EscrowedAction": ("escrow", "enforcement"),
    "EscrowPolicy": ("escrow", "enforcement"),
    "EscrowApproval": ("escrow", "enforcement"),
    "EscrowStatus": ("escrow", "enforcement"),
    "TimeoutAction": ("escrow", "enforcement"),
    "PolicySandbox": ("sandbox", "enforcement"),
    "SandboxReport": ("sandbox", "enforcement"),
    "SandboxOutcome": ("sandbox", "enforcement"),
    "GovernanceAccessControl": ("access_control", "enforcement"),
    "AccessPolicy": ("access_control", "enforcement"),
    "AccessRole": ("access_control", "enforcement"),
    "AccessCondition": ("access_control", "enforcement"),
    "AccessCheckResult": ("access_control", "enforcement"),
    "AccessDecision": ("access_control", "enforcement"),
    "Permission": ("access_control", "enforcement"),
    "ConsentManager": ("consent", "enforcement"),
    "ConsentRecord": ("consent", "enforcement"),
    "ConsentStatus": ("consent", "enforcement"),
    "LawfulBasis": ("consent", "enforcement"),
    "DataSubjectRight": ("consent", "enforcement"),
    "RightsRequest": ("consent", "enforcement"),
    "ContractTerm": ("contracts", "enforcement"),
    "GovernanceContract": ("contracts", "enforcement"),
    "ContractRegistry": ("contracts", "enforcement"),
    "ContractStatus": ("contracts", "enforcement"),
    "BreachRecord": ("contracts", "enforcement"),
    "BreachSeverity": ("contracts", "enforcement"),
    "DisputeResolution": ("contracts", "enforcement"),
    "VerifiableDelegationToken": ("delegation_token", "enforcement"),
    "DelegationTokenAuthority": ("delegation_token", "enforcement"),
    "DelegationScope": ("delegation_token", "enforcement"),
    "VerificationResult": ("delegation_token", "enforcement"),
    "TokenStatus": ("delegation_token", "enforcement"),
    "InterAgentGovernanceProtocol": ("interagent_protocol", "enforcement"),
    "DelegationLink": ("interagent_protocol", "enforcement"),
    "DelegationChain": ("interagent_protocol", "enforcement"),
    "DelegationResult": ("interagent_protocol", "enforcement"),
    "AuthorizationResult": ("interagent_protocol", "enforcement"),
    "TrustScoreManager": ("trust_score", "enforcement"),
    "TrustConfig": ("trust_score", "enforcement"),
    "TrustEvent": ("trust_score", "enforcement"),
    "TrustTier": ("trust_score", "enforcement"),
    "PolicyBallot": ("voting", "enforcement"),
    "CondorcetVoting": ("voting", "enforcement"),
    "BallotStatus": ("voting", "enforcement"),
    "QuorumManager": ("quorum", "enforcement"),
    "GateState": ("quorum", "enforcement"),
    "GateStatus": ("quorum", "enforcement"),
    "VoteRecord": ("quorum", "enforcement"),
    "SpotCheckAuditor": ("spot_check", "enforcement"),
    "AuditPolicy": ("spot_check", "enforcement"),
    "SpotCheckResult": ("spot_check", "enforcement"),
    "TrustAdjustment": ("spot_check", "enforcement"),
    "ValidatorProfile": ("spot_check", "enforcement"),
    "CaseManager": ("claim_lifecycle", "enforcement"),
    "CaseConfig": ("claim_lifecycle", "enforcement"),
    "CaseRecord": ("claim_lifecycle", "enforcement"),
    "CaseState": ("claim_lifecycle", "enforcement"),
    "ValidatorPool": ("validator_selection", "enforcement"),
    "ValidatorSelector": ("validator_selection", "enforcement"),
    "SelectionPolicy": ("validator_selection", "enforcement"),
    "SelectionResult": ("validator_selection", "enforcement"),
    "SelectionProof": ("validator_selection", "enforcement"),
    "ValidatorInfo": ("validator_selection", "enforcement"),
    # ── monitoring ────────────────────────────────────────────────────────
    "NearMissRecord": ("nearmiss", "monitoring"),
    "NearMissTracker": ("nearmiss", "monitoring"),
    "DriftSignal": ("drift", "monitoring"),
    "GovernanceDriftDetector": ("drift", "monitoring"),
    "GovernanceAnomalyDetector": ("anomaly", "monitoring"),
    "AnomalySignal": ("anomaly", "monitoring"),
    "GovernanceObservabilityExporter": ("observability_exporter", "monitoring"),
    "MetricPoint": ("observability_exporter", "monitoring"),
    "HistogramMetric": ("observability_exporter", "monitoring"),
    "HistogramBucket": ("observability_exporter", "monitoring"),
    "DecisionTrace": ("observability_exporter", "monitoring"),
    "SLAManager": ("sla", "monitoring"),
    "SLATarget": ("sla", "monitoring"),
    "SLAMetricType": ("sla", "monitoring"),
    "SLAObservation": ("sla", "monitoring"),
    "SLABreach": ("sla", "monitoring"),
    "CostBudgetManager": ("cost_budget", "monitoring"),
    "CostBudget": ("cost_budget", "monitoring"),
    "UsageRecord": ("cost_budget", "monitoring"),
    "RecordStatus": ("cost_budget", "monitoring"),
    "ResetPeriod": ("cost_budget", "monitoring"),
    "BudgetBreach": ("cost_budget", "monitoring"),
    "IncidentManager": ("incident", "monitoring"),
    "Incident": ("incident", "monitoring"),
    "IncidentSeverity": ("incident", "monitoring"),
    "IncidentPhase": ("incident", "monitoring"),
    "TimelineEntry": ("incident", "monitoring"),
    "GovernanceNotificationBus": ("notification", "monitoring"),
    "GovernanceNotification": ("notification", "monitoring"),
    "Subscriber": ("notification", "monitoring"),
    "DeliveryRecord": ("notification", "monitoring"),
    "NotificationPriority": ("notification", "monitoring"),
    "DeliveryStatus": ("notification", "monitoring"),
    "GovernanceMetadataStore": ("metadata_store", "monitoring"),
    "MetadataEntry": ("metadata_store", "monitoring"),
    "MetadataDiff": ("metadata_store", "monitoring"),
    "MetadataScope": ("metadata_store", "monitoring"),
    "CausalChainTracker": ("causal_chain", "monitoring"),
    "ChainPattern": ("causal_chain", "monitoring"),
    "ChainStep": ("causal_chain", "monitoring"),
    "ChainMatch": ("causal_chain", "monitoring"),
    "ChainAlert": ("causal_chain", "monitoring"),
    "ChainCheckResult": ("causal_chain", "monitoring"),
    "builtin_patterns": ("causal_chain", "monitoring"),
    "SessionContractTracker": ("session_contract", "monitoring"),
    "BehaviorContract": ("session_contract", "monitoring"),
    "ContractDivergence": ("session_contract", "monitoring"),
    "ContractCheckResult": ("session_contract", "monitoring"),
    "SessionReport": ("session_contract", "monitoring"),
    "DivergenceType": ("session_contract", "monitoring"),
    "Obligation": ("obligations", "monitoring"),
    "ObligationSet": ("obligations", "monitoring"),
    "ObligationPredictor": ("obligation_prediction", "monitoring"),
    "ObligationState": ("obligation_prediction", "monitoring"),
    "BreachPrediction": ("obligation_prediction", "monitoring"),
    "PortfolioRisk": ("obligation_prediction", "monitoring"),
    # ── analysis ──────────────────────────────────────────────────────────
    "GovernanceTestCase": ("testing", "analysis"),
    "TestCaseFailure": ("testing", "analysis"),
    "TestSuiteResult": ("testing", "analysis"),
    "GovernanceTestSuite": ("testing", "analysis"),
    "GovernanceEngineFn": ("test_suite", "analysis"),
    "AssertionResult": ("test_suite", "analysis"),
    "TestReport": ("test_suite", "analysis"),
    "TestOutcome": ("test_suite", "analysis"),
    "RuleMetrics": ("rule_metrics", "analysis"),
    "ScenarioOutcomeMetrics": ("rule_metrics", "analysis"),
    "EvalReport": ("rule_metrics", "analysis"),
    "compute_eval_report": ("rule_metrics", "analysis"),
    "SimulationResult": ("simulation", "analysis"),
    "SimulationReport": ("simulation", "analysis"),
    "simulate_constitution_change": ("simulation", "analysis"),
    "DecisionDelta": ("counterfactual", "analysis"),
    "CounterfactualReport": ("counterfactual", "analysis"),
    "CounterfactualGovernance": ("counterfactual", "analysis"),
    "GovernancePolicySimulator": ("policy_simulator", "analysis"),
    "ActionDelta": ("policy_simulator", "analysis"),
    "CandidateReport": ("policy_simulator", "analysis"),
    "SimulationComparisonReport": ("policy_simulator", "analysis"),
    "GovernancePolicyFuzzer": ("policy_fuzzer", "analysis"),
    "FuzzCase": ("policy_fuzzer", "analysis"),
    "FuzzReport": ("policy_fuzzer", "analysis"),
    "RuleCoverage": ("policy_fuzzer", "analysis"),
    "PolicyLinter": ("policy_linter", "analysis"),
    "LintReport": ("policy_linter", "analysis"),
    "LintIssue": ("policy_linter", "analysis"),
    "LintSeverity": ("policy_linter", "analysis"),
    "LintCode": ("policy_linter", "analysis"),
    "RuleCoverageResult": ("subsumption", "analysis"),
    "SubsumptionReport": ("subsumption", "analysis"),
    "CrossConstitutionCompliance": ("subsumption", "analysis"),
    "RuleProvenanceGraph": ("provenance", "analysis"),
    "ProvenanceEdge": ("provenance", "analysis"),
    "ProvenanceRelation": ("provenance", "analysis"),
    "RuleNode": ("provenance", "analysis"),
    "GovernanceReplay": ("replay", "analysis"),
    "ReplayReport": ("replay", "analysis"),
    "ReplayedDecision": ("replay", "analysis"),
    "HistoricalDecision": ("replay", "analysis"),
    "ComplianceCertificate": ("certificate", "analysis"),
    "CertificateAuthority": ("certificate", "analysis"),
    "CertificateStatus": ("certificate", "analysis"),
    "ComplianceMapper": ("compliance_mapping", "analysis"),
    "RegulatoryFramework": ("compliance_mapping", "analysis"),
    "ControlMapping": ("compliance_mapping", "analysis"),
    "CoverageGap": ("compliance_mapping", "analysis"),
    "RegulatoryHorizonScanner": ("regulatory_scanner", "analysis"),
    "RegulatoryRequirement": ("regulatory_scanner", "analysis"),
    "RegulatoryFrameworkVersion": ("regulatory_scanner", "analysis"),
    "RuleMappingEntry": ("regulatory_scanner", "analysis"),
    "CoverageGapItem": ("regulatory_scanner", "analysis"),
    "RemediationTicket": ("regulatory_scanner", "analysis"),
    "ScanReport": ("regulatory_scanner", "analysis"),
    "DataClassifier": ("data_classification", "analysis"),
    "SensitivityLevel": ("data_classification", "analysis"),
    "HandlingRequirement": ("data_classification", "analysis"),
    "ClassificationPolicy": ("data_classification", "analysis"),
    "ClassificationResult": ("data_classification", "analysis"),
    "ClassificationAuditEntry": ("data_classification", "analysis"),
    "RetentionManager": ("retention", "analysis"),
    "RetentionPolicy": ("retention", "analysis"),
    "RetentionCategory": ("retention", "analysis"),
    "RetentionStatus": ("retention", "analysis"),
    "RetainedArtifact": ("retention", "analysis"),
    "PurgeRecord": ("retention", "analysis"),
    "GovernanceDecisionExplainer": ("decision_explainer", "analysis"),
    "DecisionExplanation": ("decision_explainer", "analysis"),
    "RuleSummary": ("decision_explainer", "analysis"),
    "ExplanationDetail": ("decision_explainer", "analysis"),
    "ExplanationFormat": ("decision_explainer", "analysis"),
    "RefusalReasoningEngine": ("refusal_reasoning", "analysis"),
    "RefusalDecision": ("refusal_reasoning", "analysis"),
    "RefusalReason": ("refusal_reasoning", "analysis"),
    "RefusalSuggestion": ("refusal_reasoning", "analysis"),
    "SemanticRuleSearch": ("semantic_search", "analysis"),
}

# Module cache to avoid repeated importlib calls
_MODULE_CACHE: dict[str, Any] = {}


def __getattr__(name: str) -> object:
    entry = _LAZY_REGISTRY.get(name)
    if entry is None:
        raise AttributeError(name)
    module_name = entry[0]
    mod = _MODULE_CACHE.get(module_name)
    if mod is None:
        mod = importlib.import_module(f".{module_name}", __name__)
        _MODULE_CACHE[module_name] = mod
    return getattr(mod, name)


def modules_by_domain(domain: str | None = None) -> dict[str, list[str]]:
    """Return module names grouped by domain. Pass domain='lifecycle' etc. to filter."""
    grouped: dict[str, set[str]] = {}
    for _sym, (mod, dom) in _LAZY_REGISTRY.items():
        if domain and dom != domain:
            continue
        grouped.setdefault(dom, set()).add(mod)
    return {d: sorted(mods) for d, mods in sorted(grouped.items())}


__all__ = [
    # eagerly loaded — core types
    "Severity",
    "Rule",
    "RuleSynthesisProvider",
    "AcknowledgedTension",
    "Constitution",
    "classify_action_intent",
    "score_context_risk",
    "governance_decision_report",
    "render_text",
    "render_rule",
    "render_constitution",
    "extract_placeholders",
    "context_coverage",
    "validate_context_schema",
    "MemoizedConstitution",
    "CacheStats",
    "CommitmentRatioTracker",
    "CommitmentRatioState",
    "ActionCommitment",
    "classify_action",
    "ObligationEngine",
    "ObligationSpec",
    "ObligationRecord",
    "ObligationStatus",
    "IntentAlignmentTracker",
    "IntentProfile",
    "ActionAlignmentRecord",
    "IntentAlignmentState",
    "WeightedConstitution",
    "WeightedEvaluationResult",
    "RulePenalty",
    "EvaluationContext",
    "TIER_RESTRICTED",
    "TIER_STANDARD",
    "TIER_PRIVILEGED",
    "TIER_AUTONOMOUS",
    "CLASS_PUBLIC",
    "CLASS_INTERNAL",
    "CLASS_CONFIDENTIAL",
    "CLASS_PII",
    "CLASS_PHI",
    "CLASS_SECRET",
    "CLASS_TOP_SECRET",
    "REGION_EU",
    "REGION_US",
    "REGION_UK",
    "REGION_APAC",
    "REGION_GLOBAL",
    "RISK_LOW",
    "RISK_MEDIUM",
    "RISK_HIGH",
    "RISK_CRITICAL",
    "find_duplicates",
    "deduplicate",
    "DuplicationReport",
    "ExactDuplicateGroup",
    "SubsetRedundancy",
    "NearDuplicatePair",
    "GovernanceEvent",
    "create_governance_event",
    "GovernanceMetrics",
    "GovernanceSLO",
    "GovernanceCostModel",
    "GovernanceForecaster",
    "GovernanceSession",
    "RuleEffectiveness",
    "AuditEntry",
    "AuditLedger",
    "BoundaryViolation",
    "PolicyBoundary",
    "PolicyBoundarySet",
    "GovernanceRouter",
    "ConstitutionSnapshot",
    "capture_snapshot",
    "ConstitutionBuilder",
    "RuleSnapshot",
    "ChangelogEntry",
    "GovernanceChangelog",
    "_NEGATIVE_VERBS_LIST",
    "_NEGATIVE_VERBS_RE",
    "_POSITIVE_VERBS_SET",
    "_KW_NEGATIVE_RE",
    # lazy-loaded — all registry symbols
    *_LAZY_REGISTRY.keys(),
]
