Track 1 — Truth Lock: docs/current-vs-target-register.md: Full subsystem maturity register (73 Production, 27 Partial, 2 Pilot, 32 Target, 6 Watch = 52.1% maturity) Track 2 — Document Consistency: docs/governance/document-consistency-audit.md: All 6 checks PASS (no dangling refs, no overclaim, all paths root-safe, naming consistent) Track 3 — Decision Plane: backend/app/schemas/structured_outputs.py: 17 Pydantic schemas with Provenance (LeadScoreCard, QualificationMemo, ProposalPack, PricingDecisionRecord, PartnerDossier, EconomicsModel, ApprovalPacket, TargetProfile, DDPlan, ValuationMemo, SynergyModel, ICMemo, BoardPackDraft, ExpansionPlan, StopLossPolicy, PMIProgramPlan, ExecWeeklyPack) Track 4 — Execution Plane: docs/governance/workflow-inventory.md: 8 short + 8 medium + 6 long-lived workflows classified. 3 Temporal candidates with compensation logic. Track 5 — Trust Fabric: docs/governance/trust-closure-plan.md: 5 live components + Watch adoption criteria for OPA/OpenFGA/Vault/Keycloak Track 6 — Data & Connectors: docs/governance/connector-standard.md: Connector facade contract, semantic metrics dictionary, radar additions (Airbyte, Unstructured, Great Expectations) Track 7 — Operating Plane: docs/governance/operating-plane-checklist.md: GitHub governance, CI/CD enhancements, CODEOWNERS template, OIDC/attestation roadmap Track 8 — Saudi/GCC: docs/governance/saudi-enterprise-readiness.md: PDPL processing register, data classification, NCA ECC readiness, OWASP LLM Top 10, NIST AI RMF Track 9 — Executive Surfaces: docs/governance/executive-surface-closure.md: Wiring plan with real data queries for Executive Room, Approval Center, Compliance Dashboard Track 10 — Market Dominance: docs/governance/market-dominance-plan.md: 3-tier packaging (Core/Strategic/ Sovereign), ROI narrative, competitive wedge, capability moat map, executive sales stories (CEO/CTO/CFO/CISO) Master Checklist: docs/tier1-master-closure-checklist.md 50 items total — 25 Done (documentation), 25 Target (runtime/integration) https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
4.3 KiB
Trust Fabric Closure Plan — Track 5
Parent:
trust-fabric.md
Plane: Trust | Version: 1.0
Objective
Transform Trust Plane from "policy engine + audit logs" to "no sensitive action without approval + verification + evidence + correlation."
Live Trust Components Required
1. Approval Packet Flow (Priority 1)
Goal: At least one path where Class B action goes through structured ApprovalPacket → review → approve/reject → execute → evidence.
Target Path: WhatsApp outreach to new lead
Agent proposes send_whatsapp
→ ApprovalPacket schema generated (structured_outputs.py)
→ Policy gate classifies as B
→ ApprovalRequest created with SLA deadline
→ Reviewer gets notification
→ Approve → approval_token issued
→ OpenClaw gateway executes with token
→ Tool receipt generated
→ Evidence logged to ai_conversations + audit_log
Required Wiring:
ApprovalPacketschema →approval_bridge.pyintegration- SLA deadline field on
ApprovalRequestmodel - Notification to reviewer (email/WhatsApp)
- Evidence: approval_token + tool_receipt + audit_log linked by
trace_id
2. Tool Verification Receipt Flow (Priority 1)
Goal: At least one tool call produces a verifiable receipt.
Implementation:
tool_verification.pyalready existstool_receipts.pyalready exists- Need: receipts written for WhatsApp plugin calls
- Need: receipt includes
trace_id,tenant_id,action,result_hash,timestamp
3. Contradiction Detection (Priority 2)
Goal: Real contradictions detected and flagged.
Implementation Plan:
- Wire
contradiction_engine.pyto CI pipeline - On governance doc change: run LLM scan against other governance docs
- Store detected contradictions in
contradictionstable - Show in Policy Violations Board frontend
4. Evidence Pack Viewer (Priority 2)
Goal: Unified evidence pack that links decision → tool → approval → output.
Implementation:
evidence_pack_service.pyexists- Need:
assemble_deal_packthat queries real data:- Deal from
dealstable - Lead from
leadstable - Activities from
activitiestable - Messages from
messagestable - Approvals from
approval_requeststable - AI conversations from
ai_conversationstable - Consent from
consentstable
- Deal from
5. Trace Correlation (Priority 1)
Goal: trace_id / correlation_id links all related records.
Implementation:
- Add
correlation_idtoDomainEvent(already exists as field) - Pass
correlation_idthrough OpenClaw gateway → task router → agent → handler - Store in
ai_conversations.correlation_id,audit_log.correlation_id - Query by
correlation_idin evidence pack assembly
Watch Technologies — Adoption Criteria
OPA (Open Policy Agent)
Adopt when:
- Policy rules exceed 50 AND are complex (nested conditions, temporal logic)
- Current
policy.pybecomes maintenance burden - ADR demonstrates value with prototype
Spike criteria:
- Prototype: 5 existing policy rules expressed in Rego
- Benchmark: latency comparison vs current Python implementation
- Integration: OPA sidecar evaluated for performance
OpenFGA
Adopt when:
- Authorization logic exceeds role-based (needs relationship-based)
- Multi-tenant permission inheritance becomes complex
- ADR demonstrates value with prototype
Spike criteria:
- Prototype: tenant → user → resource permission graph
- Benchmark: query latency for "can user X do action Y on resource Z"
- Integration: OpenFGA as authorization service evaluated
Vault
Adopt when:
- Secret rotation is needed for compliance
- 10+ distinct secret types managed
- Environment variables become unwieldy
Keycloak
Adopt when:
- SSO requirement from enterprise customer
- Multi-IdP federation needed
- Current JWT auth insufficient
Gate: Trust Closure
- One approval flow live end-to-end with SLA
- One tool verification receipt generated and stored
- One contradiction detected in real scan
- One evidence pack assembled from real deal data
trace_idlinks decision → approval → execution → evidence- Contradiction dashboard shows real data
- Approval SLA measured for at least one path