KB-3F68
03 — Law-to-Capability Matrix
6 min read Revision 1
architecturediscoverylaw-capability-matrixreuse-first
03 — Law-to-Capability Matrix
Status legend: FOUND_LIVE (capability exists & runs in PG), FOUND_DESIGN_ONLY (KB design, not in PG), PARTIAL (exists but incomplete/inconsistent), NOT_FOUND, UNCLEAR.
| Law | Required capability | Expected artifacts | Live candidates | Status | Risk if forgotten | Reuse rec. |
|---|---|---|---|---|---|---|
| HP Constitution | Supreme ratification; no direct ALTER; PG-First | constitution.md, GOV-COUNCIL | NRM-CON-HP-V4P6P3; GOV-COUNCIL active | FOUND_LIVE | Bypass NT2/NT4/NT10 | REUSE |
| Đ0-G Birth | Universal pre-birth counting gate | birth_registry, fn_birth_gate, fn_pre_birth_check | birth_registry 954,161; fn_pre_birth_check (5 checks); fn_birth_gate (soft) | FOUND_LIVE | Rebuild a parallel birth ledger | REUSE |
| Đ23 DOT Scanning | Unmonitored-registry / unregistered-table scanner; tam quyền | scan tools, system_issues | dot-scanning-system.md (KB v2.1 frozen); orphan-scan (Đ19); fn_refresh_orphan_dot; system_issues | PARTIAL (scanners live; law not in normative_registry) | Add lists that no DOT watches | RECONCILE + REUSE |
| Đ26 Pivot/Đếm | pivot_count() = sole counting method |
pivot_definitions, pivot_results, refresh fns | pivot_definitions 37; pivot_results 126; pivot_count/query/matrix; refresh_pivot_results; refresh_meta_catalog_from_pivot; v_registry_counts | FOUND_LIVE | Manual-count lists (the exact failure to avoid) | REUSE |
| Đ28 Display/Nuxt | Render only design_templates active; template coverage scanner; thin shell |
design_templates, ui_pages, Nuxt whitelist | design_templates 1; ui_pages 37; Nuxt appendix DRAFT | PARTIAL | Put business logic in UI; un-templated surfaces | EXTEND |
| Đ30 Rollback | Reversibility proof; regression protection | BEGIN..ROLLBACK pattern, Playwright | reversibility proven in prior G1 dress rehearsals; fn_*_rollback families | FOUND_LIVE | Irreversible changes | REUSE |
| Đ31 Integrity | Contract self-verification; watchdog | system_issues, contracts, test_counting_contract | test_counting_contract(); system_issues; fn_iu_gate_watchdog; universal_rule_* (10) | FOUND_LIVE | Drift undetected | REUSE |
| Đ35 DOT Governance | Paired tests, 3-tier verify, APR linkage | dot_tools, paired-DOT enforcement | dot_tools 309 (paired 131/309; tier A60/B230); apr_* linkage | PARTIAL (178 unpaired) | Unverified DOTs mutate prod | REUSE + retrofit |
| Đ36 Collection Protocol | Collection birth + health checks | meta_catalog, collection health | meta_catalog 169; collection_registry 168; fn_iu_collection_healthcheck; KB v5.0 DRAFT | PARTIAL (law rewrite 30%) | Duplicate collection registry | REUSE |
| Đ37 Governance Org | Body tree, factory ownership matrix, enforcement gate | governance_registry, law_dot_enforcement, law_jurisdiction | governance_registry 9 (4 Mothers draft); law_dot_enforcement; law_jurisdiction | PARTIAL (Mothers draft; human-org-role unborn) | Ownership collisions | REUSE + EXTEND |
| Đ38 Normative/IU | Markdown→PG law lifecycle; text-unit/IU | normative_registry, nrm_*, information_unit | normative_registry 47; nrm_approval_rules; nrm_doc_type_config; information_unit (law_unit 187) | FOUND_LIVE | Second law SoT | REUSE |
| Đ39 KG | Soft-constraint graph; provenance; read projection | iu_relation, universal_edges, v_kg_edges_all, kg_constraint_config | iu_relation 60; universal_edges 2199; v_kg_edges_all 2259; kg_constraint_config | FOUND_LIVE | Hidden 2nd graph SoT | REUSE |
| Đ43 System Context | 8-section context pack; staging→promote; anti-hardcode | context_pack_*, RED_ZONES | context_pack_manifest/sections/health_checks; fn_phase0_cockpit | FOUND_LIVE | Stale context | REUSE |
| Đ44 IU profile/schema | IU profile/schema, canonical_address, IU-0 standard | information_unit profile cols, DOT contract | information_unit 219 (identity_profile col); dieu44-trien-khai design pack | PARTIAL (DRAFT, not enacted; not in normative_registry) | Reinvent IU profiling | EXTEND (await enact) |
| Đ45 Event/Queue | Single event substrate; refs not data; worker heartbeat | event_outbox, iu_outbound_route, job_queue | event_outbox 165,403; event_type_registry 40; iu_outbound_route 15 (dry_run); job_queue; DLQ 0 | FOUND_LIVE | Second queue | REUSE |
Capability detection summary (mission §3 examples)
| Capability | Verdict | Live artifact |
|---|---|---|
| pivot_count / pivot_definitions | FOUND_LIVE | pivot_count(), 37 defs, 126 results |
| DOT metadata audit/fill | PARTIAL | KB reports + dot-metadata-fill tool; operation populated only 50/309 |
| paired DOT tests | PARTIAL | dot_tools.paired_dot 131/309 |
| DOT scanning / unmonitored registry | FOUND_LIVE | fn_refresh_orphan_dot, fn_birth_onboarding_full_scan, Đ23 inverse-check |
| birth registry | FOUND_LIVE | birth_registry 954,161 + fn_pre_birth_check |
| collection registry | FOUND_LIVE | collection_registry 168 |
| meta_catalog | FOUND_LIVE | meta_catalog 169 (SoT "list of lists") |
| table_registry | FOUND_LIVE | table_registry 21 (UI table-def, not data SoT) |
| information_unit profile/schema | PARTIAL | information_unit 219, Đ44 DRAFT |
| IU relations / KG edges | FOUND_LIVE | iu_relation 60 + universal_edges 2199 + v_kg_edges_all |
| event outbox / DLQ | FOUND_LIVE | event_outbox 165k; DLQ clean |
| review/approval/proposal | FOUND_LIVE | approval_requests 211 + apr_approvals 42 |
| config tables vs hardcode | FOUND_LIVE | kg_constraint_config, dot_config, dot_domain_rules 67 |
| template/render shell boundary | PARTIAL | design_templates 1; Nuxt appendix DRAFT |
| field/input_form/tier registry | NOT_FOUND (designed) | absent in PG; G1 candidate, dress-rehearsed, await Đ32 |
| workflow_trigger_design | NOT_FOUND | absent; trigger_registry is physical DB triggers (collision) |