nx_ai_audit.nx
buildroot/runtime/nx_ai_audit.nx
about
nx_ai_audit.nx -- anti-Ultron AI proposal auditor.
Per [[feedback-captain-moroni-doctrine]] Phase M5 +
[[feedback-substrate-as-jarvis-anti-ultron]] cardinal: AI agent
proposals are audited against capture / manipulation / autonomous-
weapon patterns BEFORE the operator decides to act. Substrate
never autonomously executes; it surfaces verdicts + reasoning to
the human.
Naming: avoided `nx_jarvis` (Iron Man trademark proximity);
avoided `nx_sentinel` (Microsoft Sentinel collision); `nx_ai_audit`
is descriptive + unowned.
Per Captain Moroni: substrate refuses to instantiate offensive
patterns. The AI auditor's job is to catch them when they appear
in proposals an AI agent makes, not to attack the AI.
Pattern categories shipped V1:
CAPTURE_ATTEMPT -- AI proposes to expand its own privileges
PERSUASION_LOOP -- AI doubles down on rejected proposal
AUTONOMOUS_WEAPON -- AI proposes lethal physical action
SECRET_KEY_EXFIL -- AI asks to read identity-tier secrets
DECEPTIVE_ALIGNMENT -- AI says one thing, plans another
COLLATERAL_ACCEPTANCE -- AI accepts human harm as side-effect
Composes:
nx_intent -- AI's declared intent must be checked against proposal
nx_drone_doctrine -- AUTONOMOUS_WEAPON proposals refused before
reaching nx_drone_doctrine
nx_brane -- CAPTURE_ATTEMPT often shows as cap-escalation
nx_evict_journal -- every audit verdict logged
nx_provenance_chain -- audit decisions are transforms
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nxnx_intent.nx
imported by: nx_ai_audit_test.nxnx_tier3_ecology_compose_test.nx
structs
| 62 | struct NxAiProposal |
| 73 | struct NxAiAuditResult |
consts
| 40 | const NX_AIP_CAPTURE_ATTEMPT: nx_int = 0 |
| 41 | const NX_AIP_PERSUASION_LOOP: nx_int = 1 |
| 42 | const NX_AIP_AUTONOMOUS_WEAPON: nx_int = 2 |
| 43 | const NX_AIP_SECRET_KEY_EXFIL: nx_int = 3 |
| 44 | const NX_AIP_DECEPTIVE_ALIGNMENT: nx_int = 4 |
| 45 | const NX_AIP_COLLATERAL_ACCEPTANCE: nx_int = 5 |
| 46 | const NX_AIP_N_KINDS: nx_int = 6 |
| 50 | const NX_AIA_CLEAN: nx_int = 0 |
| 51 | const NX_AIA_SUSPECT: nx_int = 1 // 1 pattern detected |
| 52 | const NX_AIA_BLOCKED: nx_int = 2 // 2+ patterns or |
| 54 | const NX_AIA_OPERATOR_REVIEW: nx_int = 3 // single high-severity |
| 55 | const NX_AIA_ERR_BAD_INTENT: nx_int = 4 |
functions
| 81 | func nx_aip_is_valid(p: nx_int) -> nx_int |
| 87 | func nx_aia_verdict_is_valid(v: nx_int) -> nx_int |
| 100 | func nx_aip_is_blocking_pattern(p: nx_int) -> nx_int |
| 108 | func nx_ai_proposal_new(proposal_id: nx_int, |
| 124 | func _aia_popcount6(x: nx_int) -> nx_int called by 1: nx_ai_audit |
| 145 | func nx_ai_audit(p: *NxAiProposal, now_us: nx_size) -> *NxAiAuditResult |
| 194 | func nx_ai_proposal_has_pattern(p: *NxAiProposal, kind: nx_int) -> nx_int |