KB-3765

S165-INV Đ37 GĐ2 Investigation Report

6 min read Revision 1
reportd37gd2investigations165

S165-INV Report: Đ37 GĐ2 — 12 TD Investigation

Date: 2026-04-04 | Session: S165-INV Status: Investigation complete. 12 TDs derived from production gap analysis.

Note: Đ37 v3.3 full content file (dieu37-governance-organization-law-draft.md) NOT FOUND on VPS, KB, or local machine. The 12 TDs below are DERIVED from comparing the 5-tier governance model requirements vs production state.


TRẠNG THÁI PRODUCTION

Table Rows Status
governance_registry 5 Minimal (5 core agencies)
governance_relations 8 Minimal (6 laws covered of 38)
governance_audit_log 0 EMPTY
governance_docs 12 Has data
law_jurisdiction 38 COMPLETE (all enacted)
law_dot_enforcement 265 Near-complete (1 DOT unmapped)
normative_relations 13 Đ39 deps + Đ38→Đ37
Component Count
Governance views 0
Governance PG functions 7 (validation/cascade)
DOT-GOV tools 2 (seed + verify)
DOT-NRM tools 11 (Đ38 complete)
Laws without agency owner 32 of 38
Governance laws without enforcement DOT 5 (Đ28,29,30,32,35)

12 TD GĐ2 — DANH SÁCH ĐẦY ĐỦ

# TD Code Mô tả Status Priority Evidence
1 TD-GOV-OWNERS 32 laws thiếu agency owner trong governance_relations. Chỉ 6/38 enacted laws có owner. ⬜ CHƯA HIGH — Luật không ai chịu trách nhiệm = luật chết SELECT count(*) FROM normative_registry WHERE status='enacted' AND NOT EXISTS(... owner) = 32
2 TD-GOV-VIEW-TOPOLOGY Tạo v_system_topology view cross-reference 5 tầng: law → jurisdiction → agency → relation → DOT. Hiện 0 governance views. ⬜ CHƯA HIGH — Không có cách nhìn toàn cảnh SELECT viewname FROM pg_views WHERE viewname LIKE '%gov%' = 0
3 TD-GOV-ENFORCEMENT-GAP 5 governance laws (Đ28,29,30,32,35) thiếu dedicated enforcement DOTs. ⬜ CHƯA MEDIUM — Laws exist but no DOT enforces them specifically law_dot_enforcement: 5 missing
4 TD-GOV-AUDIT-TRAIL governance_audit_log = 0 rows. DOT-GOV-VERIFY chạy nhưng không ghi audit log. Cần: DOT ghi kết quả mỗi lần verify vào audit_log. ⬜ CHƯA MEDIUM — No accountability trail governance_audit_log count = 0
5 TD-GOV-HEALTH-DOT governance_registry.health_dot = NULL cho tất cả 5 agencies. Trigger trg_gov_validate_health_dot validates nhưng field chưa populate. ⬜ CHƯA MEDIUM — Agencies have no assigned health checker All 5 agencies health_dot IS NULL
6 TD-GOV-AUTO-ONBOARD Khi INSERT dot_tools mới → KHÔNG tự động tạo law_dot_enforcement row. Phải INSERT tay. Cần PG trigger hoặc DOT-GOV-ONBOARD. ⬜ CHƯA HIGH — New DOTs slip through governance 1 DOT missing enforcement
7 TD-GOV-CONFLICT-DETECT Không có check xung đột jurisdiction: 2 laws cùng 'primary' trên 1 domain (trigger chặn INSERT nhưng không scan existing). Cần: DOT-GOV-CONFLICT scan weekly. ⬜ CHƯA LOW — Trigger prevents new conflicts, but no scan for existing Trigger exists but no active scanner
8 TD-GOV-COVERAGE-MATRIX Không có view/report tổng hợp: law × domain × DOT coverage. DOT-GOV-VERIFY check cơ bản nhưng không tạo matrix. ⬜ CHƯA MEDIUM — Hard to see overall coverage No coverage view exists
9 TD-GOV-CASCADE governance_registry.trg_gov_retire_cascade trigger exists nhưng chưa test kỹ. Cần: test scenario agency retire → cascade effects documented. 🟡 PARTIAL LOW — Trigger exists, untested Trigger active but 0 retire events
10 TD-GOV-MORE-AGENCIES 5 agencies cho 38 laws = quá ít. Foundation laws (Đ0-Đ9) cần Architecture Council sub-committees. Operations laws (Đ10-Đ19) cần Operations System agency. ⬜ CHƯA MEDIUM — Coverage gap 5 agencies / 38 laws
11 TD-GOV-NRM-RELATIONS normative_relations = 13 rows (chỉ Đ39 deps + 1 Đ38→Đ37). 37 laws CHƯA CÓ inter-law relations. Cần: DOT-NRM-RELATION-SCAN. ⬜ CHƯA MEDIUM — Incomplete dependency graph 13 of potentially 100+ relations
12 TD-GOV-KB-FILE Đ37 v3.3 content file (dieu37-governance-organization-law-draft.md) KHÔNG TỒN TẠI. normative_registry sections chỉ có pointer. Cần: tạo file KB + upload Agent Data. ⬜ CHƯA HIGH — Law enacted but content unreachable File not found on VPS/local/KB

ĐỀ XUẤT ƯU TIÊN

Wave 1 (Critical — governance integrity)

  1. TD-GOV-KB-FILE — Tạo Đ37 content file. Luật enacted nhưng KHÔNG ĐỌC ĐƯỢC = luật chết.
  2. TD-GOV-OWNERS — 32 laws cần agency owner. Mở rộng governance_relations.
  3. TD-GOV-AUTO-ONBOARD — PG trigger hoặc DOT tự đăng ký DOT mới vào enforcement.

Wave 2 (Infrastructure — monitoring & views)

  1. TD-GOV-VIEW-TOPOLOGY — v_system_topology view cho 5 tầng.
  2. TD-GOV-COVERAGE-MATRIX — Coverage view: law × domain × DOT.
  3. TD-GOV-AUDIT-TRAIL — DOT-GOV-VERIFY ghi audit_log.

Wave 3 (Completeness — fill gaps)

  1. TD-GOV-MORE-AGENCIES — Thêm agencies cho operations, registry, foundation.
  2. TD-GOV-NRM-RELATIONS — Scan inter-law dependencies.
  3. TD-GOV-ENFORCEMENT-GAP — Tạo enforcement DOTs cho 5 governance laws.
  4. TD-GOV-HEALTH-DOT — Assign health DOTs cho agencies.

Wave 4 (Hardening — safety)

  1. TD-GOV-CONFLICT-DETECT — DOT-GOV-CONFLICT weekly scan.
  2. TD-GOV-CASCADE — Test + document retire cascade scenarios.