Data loss prevention (DLP) scan: any attempt to write PII/payment data to Spine is logged and blocked.
Quarterly audit: query all Spine data; confirm 100% non-sensitive.
Test:
npm run test:spine-data-boundaries
# Should verify: spine.write({customerId: 'c123'}) -> REJECTED
Law 3: System B Does Not Bulk-Store Sensitive Records
What it means: System B stores only assignment metadata (contractor → state, project ID); not NDAs or payment logs.
Enforcement:
Schema: System B tables allow only {contractorId, stateBric, projectId, timestamp}.
DLP: any row insertion with NDA/payment field is blocked.
RPC validation: any call from System B to write sensitive data to non-assigned state is rejected.
Test:
npm run test:system-b-boundaries
# Should verify: system-b.write({nda_text: '...'}) -> REJECTED
Law 4: State BRICs Are Fully Isolated
What it means: Each state owns its data; cross-state data flow is zero.
Enforcement:
Separate database accounts per state (IAM principal per state).
Network routing: no direct inter-state connectivity except via System B (and only for work assignment).
Encryption keys: separate KMS key per state; key policy forbids cross-state operations.
Audit: monitor for any cross-state data flow; incident if detected.
Test:
npm run test:state-isolation
# Should verify:# - state-ca.read(state-tx.data) -> DENIED# - state-tx.read(state-ca.data) -> DENIED# - system-b routing to correct state -> OK
Law 5: Owners Room Is Restricted
What it means: MFA-only, no bulk export, restricted IP, immutable audit log.
Enforcement:
VPN + IP allowlist (configurable); no public internet access.
MFA required for login and for any approval action (dual-auth for state activation).
Session timeout: 30 min idle, 4 hour hard limit.
Audit log: immutable; every action is logged with user ID, timestamp, IP, MFA proof.
Bulk export blocker: API call to bulk-download sensitive data is rejected; audit logged.
Test:
npm run test:owners-room-security
# Should verify:# - login without MFA -> DENIED# - bulk export -> DENIED# - approval without dual-auth -> DENIED
Law 6: Compliance Gate Precedes Business Calls
What it means: Sales calls, notifications, outreach disabled by default; enabled only after compliance sign-off.
Enforcement:
Flag: COMPLIANCE_APPROVED = false at startup.
Compliance Agent is the first subprocess to run; it ingests regulations and produces signed artifact.
Business-call gate: every outbound call checks flag and artifact signature; deny if missing.
On approval: flag set to true and artifact stored in read-only vault.
npm run test:compliance-gate
# Should verify:# - outbound call without artifact -> DENIED# - outbound call with expired artifact -> DENIED# - outbound call with valid artifact -> OK
Law 7: Stitch Brick Integrity
What it means: Every micro-brick has SHA-256 digest + Merkle log + consensus replication. Mismatch = auto-heal.
Enforcement:
Write: compute SHA-256, append to Merkle log, replicate via Raft, store signed checkpoint.
Periodic: every 6 hours, run verification job on all micro-bricks; log results.
Heal: on mismatch, quarantine node, restore from checkpoint, replay log, rejoin quorum.
Test:
npm run test:stitch-brick-integrity
# Should verify:# - write micro-brick -> digest stored -> can retrieve and verify# - corrupt one byte -> detection within 6h verification window# - corrupt one replica -> majority consensus continues# - corrupted node heals and rejoins quorum
Law 8: No Implicit Network Trust
What it means: Every BRIC-to-BRIC call is authenticated and authorized; deny-by-default.
Enforcement:
mTLS sidecar: all traffic between BRICs uses TLS with certificate validation.
Service mesh: Istio/Linkerd policy enforces allow-lists per BRIC.
Call validation: PermissionChecker verifies caller contract before executing.
Audit: every call logged with caller, target, operation, result, timestamp.
Test:
npm run test:zero-trust
# Should verify:# - public → system-b (no mTLS) -> DENIED# - system-b → state-bric (mTLS, allowed) -> OK# - state-bric → spine (not in permissions) -> DENIED
Part 2: Incident Response Runbooks
Incident: Prompt Injection Detected
Detection:
Overseer monitors agent output for control sequences, unusual JSON escaping, or encoded payloads.
Threshold: first occurrence is logged; 3+ in 24h triggers automatic escalation.
Response Steps:
Create incident ticket (immutable ID).
Notify Spine (sets AI_RISK_LEVEL = HIGH).
Close business-call gate (gate flag = false).
Compliance Agent is notified; begins review.
Owner is alerted via Owners Room (requires VPN access).
Recovery:
Compliance Agent reviews incident and determines remediation (agent prompt update, model version rollback, etc.).
Upon approval, gate flag is set back to true; release signed artifact.
Incident post-mortem is logged and stored in append-only audit.
Timeline:
Detection: < 1 min (Overseer runs continuously).
Gate close: immediate.
Review: 1-24 hours (depends on complexity).
Remediation approval: owner decision.
Incident: Data Corruption Detected (Stitch Brick Mismatch)
Detection:
Periodic verification job recomputes SHA-256 on all micro-bricks.
Mismatch triggers automatic quarantine.
Response Steps:
Quarantine affected node (remove from quorum).
Attempt restore from last good checkpoint + log replay.
If restore succeeds: node rejoins quorum.
If restore fails: provision new node from secure supply-chain image, replay log.
Forensic image captured for post-mortem.
Testing:
Rotate between test scenarios monthly (before launch):
Corrupt 1 byte in one replica; verify detection and heal.
Disable one replica; verify majority continues.
Force a full replica replacement; verify consensus restores.
Timeline:
Detection: < 1 min (periodic job).
Heal: < 5 min (checkpoint restore + log replay).
Replacement: < 30 min (if needed).
Incident: Credential Leak Detected
Detection:
Pre-commit hook and CI/CD secret scanning (TruffleHog).
Runtime secret detector (e.g., Vault audit logs for unauthorized access).