Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cyberpaisa-dof-mesh-40-27.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Security Compliance Status

DOF_MESH Security Score: 100% (5/5 gaps closed)
ControlSeverityStatusImplementation
E2E EncryptionCRITICALResolvedNaCl box (Curve25519 + XSalsa20-Poly1305)
NATS TLS 1.3 + mTLSHIGHResolvedPhase 3
Key Management (KMS)MEDIUMResolvedAES-256-GCM vault
SHA3-256 Audit ChainMEDIUMResolvedPhase 3
Data Loss PreventionMEDIUMResolved18 patterns + entropy analysis

7 Official Layer Names

Use the official layer names. The old names (MeshGuardian, Icarus, Cerberus, SecurityHierarchy) are deprecated and will not match the codebase.
#Official NameModuleRole
1Constitutioncore/governance.pyHard rules block, soft rules warn
2AST Validatorcore/ast_verifier.pyStatic analysis
3Tool Hook Gate PREcore/tool_hooks.pyIntercepts before execution
4Supervisor Enginecore/supervisor.pyMonitors behavior and drift
5Adversarial Guardcore/adversarial.pyRed/blue pipeline
6Memory Layercore/memory_governance.pySession state governance
7Z3 SMT Verifiercore/z3_verifier.py4/4 state invariants PROVEN

DLP Scanner

adversarial_dlp_hook(text) — 18 patterns across 7 categories:
CategorySeverityPatterns
API keysCRITICALOpenAI, Anthropic, Groq, Cerebras, NVIDIA
Private keys/cryptoCRITICALRSA PEM, Ethereum 64-hex, BIP39
Cloud credentialsCRITICALAWS Access Key, AWS Secret
DatabaseCRITICALPostgreSQL, MySQL, MongoDB, Redis connection strings
PIICRITICALSSN, credit cards
Auth tokensHIGHJWT
PII bulkMEDIUM3+ email addresses
from core.adversarial import adversarial_dlp_hook

result = adversarial_dlp_hook("GROQ_API_KEY=gsk_abc123...")
# → {"blocked": True, "category": "API keys", "severity": "CRITICAL"}

Formal Verification

dof verify-states
# → 4/4 PROVEN in ~110ms
Verifies state transitions across 9 types: PUBLISH, SCORE_UPDATE, PROMOTE, DEMOTE, THREAT_DETECT, THREAT_CLEAR, COOLDOWN_START, COOLDOWN_END, GOVERNOR_ACTION.

Tuning Constitution Rules

Edit dof.constitution.yml to adjust thresholds:
supervisor:
  thresholds:
    accept: 7.0
    retry: 5.0
    escalate_below: 5.0
    max_retries: 2
To add a new HARD rule:
# core/governance.py
HARD_RULES.append({
    "rule_key": "MY_CUSTOM_RULE",
    "type": "regex",
    "pattern": r"your_pattern",
    "priority": RulePriority.SYSTEM
})
Then add the matching entry to dof.constitution.yml.

Security Hierarchy

SYSTEM > USER > ASSISTANT
Enforced by core/supervisor.pyenforce_hierarchy(). Override resistance verified by Z3 across 42 hierarchy patterns (6 overrides + 11 escalations + 25 others).

7-Layer Governance

Full layer reference with HARD/SOFT rules

Formal Verification

Z3 invariants and state transitions