KB-1917

Opus Review — Birth System Inventory PARTIAL — Contract Decision Needed

5 min read Revision 1
p3dbirth-systeminventoryreviewcontract-decision

Opus Review — Birth System Inventory PARTIAL — Contract Decision Needed

Date: 2026-05-12 Reviewer: Opus (Claude) Report: reports/p3d-birth-system-completion-readonly-inventory-report.md


Agent compliance: PASS

26/26 output fields. 7 phases. Discovery-first (DB/schema/concepts/tables all resolved live). Compiled SQL logged. Deterministic sample. 0 mutation.


Top 5 findings for GPT

1. BIGGEST GAP: 137/166 governed collections lack birth trigger (82.5%)

Chỉ 29/166 collections có trg_birth_* INSERT trigger. Nghĩa là 82.5% entities sinh ra KHÔNG được ghi vào birth_registry. Birth registry có 208,537 rows — nhưng đó chỉ đại diện cho 29 collections.

Quyết định cần: Close gap cho tất cả 137? Hay phân loại collections thành tiers (must-have vs nice-to-have vs exempt)?

2. birth_owner_ref = FIELD_ABSENT (1/10 REQUIRED_AT_BIRTH missing)

birth_registry có 9/10 cột REQUIRED_AT_BIRTH. Chỉ thiếu owner_ref. Nếu design yêu cầu owner at birth → cần ALTER TABLE thêm cột + patch fn_birth_registry_auto.

Quyết định cần: Có cần owner_ref tại birth? Hay defer cho enrichment?

3. canonical_address rất sparse (1/12 sample)

Chỉ information_unit có canonical_address. Nếu Entity Living DB relation hooks cần universal addressing → đây là gap lớn vượt xa birth system scope.

Quyết định cần: canonical_address là REQUIRED_HOOK_AT_BIRTH cho mọi collection? Hay chỉ cho IU/TAC? Hay defer?

4. birth_registry đã giàu hơn dự kiến

birth_registry có nhiều cột hơn design v3 dự đoán: governance_role, status, certified, certified_at, dot_origin, user_created, inspect_pen, inspect_stamp, inspect_gate. Nghĩa là birth system đã được thiết kế tốt hơn — gap chủ yếu ở trigger coverage, không phải schema.

5. IU pilot footing sạch

12 IU = 12 birth rows. null_species = 0. Species mapping SPE-IUA working. fn_iu_create + fn_iu_birth_gate_layer1 exist. Pilot DIEU-35 có nền tảng vững.


Birth contract matrix (updated from inventory evidence)

# Metadata Classification birth_registry column Status
1 Identity REQUIRED_AT_BIRTH entity_code ✅ SUPPORTED
2 Species REQUIRED_AT_BIRTH species_code ✅ SUPPORTED
3 Composition REQUIRED_AT_BIRTH composition_level ✅ SUPPORTED
4 Timestamp REQUIRED_AT_BIRTH born_at ✅ SUPPORTED
5 Governance state REQUIRED_AT_BIRTH governance_role ✅ SUPPORTED
6 Lifecycle REQUIRED_AT_BIRTH status + certified ✅ SUPPORTED
7 Owner/ref REQUIRED_AT_BIRTH ❌ FIELD_ABSENT
8 Provenance REQUIRED_AT_BIRTH dot_origin ✅ SUPPORTED
9 Entity Living DB anchor REQUIRED_AT_BIRTH birth row itself ✅ SUPPORTED
10 Actor REQUIRED_AT_BIRTH user_created ✅ SUPPORTED
11-17 Hooks (7 items) REQUIRED_HOOK_AT_BIRTH Tables exist ✅ ALL SUPPORTED

Score: 9/10 REQUIRED_AT_BIRTH, 7/7 REQUIRED_HOOK_AT_BIRTH.


Proposed next steps

Immediate: GPT decides 3 questions

  1. Trigger coverage: Close all 137 gaps? Or tier-based?
  2. birth_owner_ref: Add column? Or defer?
  3. canonical_address scope: IU-only? Or broader?

After GPT decisions → Phase B2: birth contract final

Lock exact contract → Opus designs implementation patches → GPT review → Agent executes.

5C2 can proceed in parallel IF:

IU birth system is already 100% covered (12/12, trigger working, fn_iu_create working, all hooks exist). The 137-collection gap does NOT block IU migration specifically. GPT may choose to:

  • Option A: Close all 137 gaps first → then 5C2 (thorough but slow)
  • Option B: Lock IU-specific birth contract → run 5C2 → close broader gaps in parallel (faster for Đ35 pilot)
  • Option C: Lock IU + close critical tier-1 collections → then 5C2

Tôi nghiêng Option B vì: IU birth is complete, 137 gap doesn't affect IU pilot, and closing 137 triggers is a large effort better done in parallel. Nhưng đây là quyết định GPT/User.


Status

birth_inventory = PARTIAL (trigger gap)
birth_schema = 9/10 supported
birth_hooks = 7/7 supported
iu_birth_coverage = 100%
phase5c2_migration_allowed = false (pending GPT decision)
next_action = GPT_DECIDE_3_QUESTIONS → B2_BIRTH_CONTRACT

Opus Review | Birth Inventory PARTIAL | Contract Decision Needed | 2026-05-12

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/opus-review-birth-inventory-partial-contract-decision-needed-2026-05-12.md