# Coverage Matrix

This matrix proves what from the conversation and the v4 document is represented in the executable package.

| Source idea | Requirement | Implemented by | Runtime evidence |
| --- | --- | --- | --- |
| Sistema Unico v4 canonico | v4 is the top-level authority | `douglas-kernel/source/douglas_SISTEMA_UNICO_v4.md` | environment lock hash |
| Douglas Kernel v3 | Kernel v3 is preserved as detailed appendix | `douglas-kernel/source/douglas_kernel_FINAL_v3.md` | environment lock hash |
| Harness is C0 | Case Harness is not separate; it is Camada 0 | `case.ps1`, `case.config.json` | phase logs, `summary.json` |
| Preflight -> Implement -> Verify -> Review -> Close -> Retro | Repeatable workflow with gates | `scripts/phases/*.ps1` | `decision-trace.jsonl` |
| Enforce, don't instruct | Gates block by exit code | runner + phase scripts | nonzero exit stops run |
| Measure, don't assume | Pass rates, hashes, evals, traces | eval runner, evidence manifest | `evaluation-report.json`, `evidence-manifest.json` |
| Every failure becomes data | Failure data is persisted | retro and failure ledger | `failures.jsonl`, failure JSON |
| Record and replay | Replay run from trace | `scripts/replay-run.ps1` | `replay-report.md` |
| Five pillars | Evaluation, Observability, Data Foundation, Orchestration, Governance | `scripts/write-production-ai-report.ps1` | `production-ai-pillars.json` |
| Evaluation owner | Test library has an owner | `evaluation.owner.json` | pillar report owner warnings |
| Prompt versioning | Prompt changes keep intent | `prompt-registry.jsonl`, `scripts/register-prompt-version.ps1` | registry entries |
| PII prevalidation | Sensitive data is checked before action | `scripts/pii-prevalidate.ps1` | `pii-prevalidation.json` |
| Incident playbook | Detect, diagnose, contain, fix, prevent | `incident-playbook.md`, `scripts/open-incident.ps1` | incident artifacts when opened |
| Model last | Model changes require eval/rerun | `model-change-policy.md` | governance policy |
| Integrity vs epistemology | Keep integrity facts separate from truth claims | Kernel config, evidence policy | trace, audit, eval reports |
| Logs to ledger bridge | Write a causal stream, not only loose logs | `ledger/append-event.ps1`, `ledger/verify-stream.ps1` | `ledger-stream.jsonl`, `ledger-check.json`, `final-ledger-check.json` |
| Payload commitment | Event core commits to object/payload hash | ledger scripts | `ledger-stream.jsonl` |
| Session identity | Each phase has local SessionCert placeholder | ledger scripts | ledger events |
| Charter | Objective is an artifact | `charter.json`, `scripts/validate-charter.ps1` | `charter-check.json` |
| No objective, no promotion | Charter is required by governance | `governance.policy.json`, preflight validator | preflight exits nonzero if missing |
| Succession | Avoid bus-factor 1 sovereignty | `sovereignty/succession.policy.json` | `sovereignty-check.json` |
| Red-team | Attack checks are required | `verification/redteam.config.json`, `scripts/run-redteam.ps1` | `redteam-report.json` |
| Phi properties | Invariants become checklist | `verification/phi.properties.json` | red-team report and v4 readiness |
| Loop throughput/cost | Speed must model cost and bottleneck | `loop-economics.json`, validator | `loop-economics-check.json` |
| C4 Federation | Capsule/.dcpkg is future layer | documented as roadmap | v4 layer status says roadmap |
| C5 Enrichment | Benchmark/slots/currency is future layer | documented as roadmap | v4 layer status says roadmap |
| C6 Market/Application | Sensing/venture/brokerage is future layer | documented as roadmap | v4 layer status says roadmap |
| Front operacional | Provide a human-facing console for the system | `front/index.html`, `front/app.js`, `front/styles.css`, `front/data.js` | dashboard shows final run status |
| Comunicacao com o sistema | Messages enter through a governed channel instead of bypassing gates | `COMMUNICATION_PROTOCOL.md`, `scripts/send-message.ps1`, `server.js`, `start-system.cmd`, front `Comunicar` tab | `.case/inbox/*`, optional harness run |
| Chat tipo Codex | Human can converse with the system and choose a model | front `Chat` tab, `chat.config.json`, `/api/chat-models`, `/api/chat` | `.case/chat/*`, provider status |

Coverage status:

- Executable today: C0, partial C1, partial C2, scaffold C3.
- Roadmap: C4-C6, real PKI SessionCert, MMR, TLA+/Alloy model-checking, Shamir material, calibrated digital twin.

Do not claim more than the matrix and the latest run artifacts prove.
