Opus Post-Discovery Review — P3D Pack 1 Phase 4B Discovery PASS
Opus Post-Discovery Review — P3D Pack 1 Phase 4B Discovery PASS
Date: 2026-05-11 Author: Opus 4.7 For: GPT-5.5 Thinking / Hội đồng AI — thẩm tra + quyết định species/composition/governance Run:
p3d-phase4b-discovery-20260511-092233Report:...reports/p3d-pack1-phase4b-species-composition-discovery-report.md
1. Verdict: Discovery PASS — evidence complete, decisions pending
Agent gathered all required evidence. No mutations. No script aborts. Column detection worked correctly (caught parent_id not parent_ref, caught missing facet_code, caught missing composition_level in species_collection_map). Law crosswalk populated for all 12 compliance matrix items.
2. Top 5 discoveries that change the design picture
2.1 — species_collection_map has NO composition_level column
fn_birth_registry_auto JOINs species_collection_map → entity_species to get composition_level. Implication: choosing a species automatically determines composition_level via entity_species.composition_level. They're not independent decisions — species IS the composition decision.
2.2 — SPE-GOV (governance_infra) already exists as gom species
SPE-GOV: species_code=governance_infra, composition_level=atom, management_mode=observed. Already maps 15 governance-plumbing collections (birth_registry, species_collection_map, collection_registry itself, etc.). IU could join this group while observed — immediate Điều 29 compliance with zero new species creation.
2.3 — SPE-LAW already exists for the law domain
SPE-LAW: species_code=law, composition_level=compound, management_mode=governed, prefix=LAW. Maps to normative_registry. This is for the law documents themselves (Điều 35, Điều 28, etc.). IU (text-as-code representation of law content) is related but not identical. Whether IU uses SPE-LAW or a new species depends on whether IU is "law content" or "governance infrastructure."
2.4 — TAC nesting is real structural containment
83/86 TAC logical_units have parent_id (not NULL). Max depth = 2 (3 levels: root→child→grandchild). Children are distinct entities with own UUIDs and section_types (heading→principle, heading→paragraph, etc.). This is NOT just ordering — it's structural containment per Điều 0-B. If migration preserves this → IU is NOT atom.
2.5 — Species tree is flat in practice
All 40 species have parent_id=NULL, depth=1. The 3-level tree design from v1.2 is not materialized. No need to worry about tree positioning for new species — just use depth=1 like everything else.
3. Agent compliance
| Check | Result |
|---|---|
| No mutations | ✅ |
| Column detection before schema-sensitive queries | ✅ — all 17 targets detected or correctly skipped |
| Graceful degradation (no cascade abort) | ✅ — 0 failed sub-queries |
| detect_col return 0 fix (rev6) | ✅ — no script abort from missing optional columns |
| Counts as snapshots | ✅ |
| Candidates labelled candidate_not_approved | ✅ |
| Law crosswalk completed | ✅ — 12/12 compliance matrix items assessed |
| fn_birth_registry_auto logic documented | ✅ — source captured, JOIN logic verified |
| No species/composition decision locked | ✅ |
4. Decision framework for GPT/User
Three interconnected decisions, with discovery evidence for each:
Decision 1: Governance role (drives everything else)
| Option | What it means | Evidence |
|---|---|---|
| Keep observed | IU stays pilot. Use gom species (SPE-GOV). Reduced inspection. | 67 other collections are observed. IU has 12 pilot rows. |
| Promote to governed | Full governance. Need dedicated species. QT-005 procedure. Full inspect pipeline. | 34 collections are governed. 6 law-domain collections already governed with species. |
Decision 2: Species (follows from governance role)
| If observed | If governed |
|---|---|
| Map to SPE-GOV (governance_infra, atom). Immediate compliance. 15 collections already there. | Create new species OR map to SPE-LAW (law, compound). SPE-LAW already governs normative_registry. |
| No new entity_species row needed. Just INSERT species_collection_map. | If new: decide species_code, display_name, composition_level, prefix. If SPE-LAW: verify IU fits "law" semantics. |
Decision 3: Composition level (follows from species choice + TAC nesting decision)
| Scenario | Composition | Reasoning |
|---|---|---|
| SPE-GOV (observed, gom) | atom (from entity_species) |
SPE-GOV is atom. Auto-resolved by fn_birth_registry_auto JOIN. |
| SPE-LAW (governed) | compound (from entity_species) |
SPE-LAW is compound. If IU joins SPE-LAW, composition=compound automatically. |
| New species | Must decide based on Điều 0-B | If Phase 5 preserves TAC nesting → molecule or compound. If flat migration → atom. |
The composition question IS the species question (discovery 2.1). Choose species → composition follows.
5. Opus recommendation (staged approach)
Stage 1 (immediate, Phase 4C): Map IU/UV to SPE-GOV (governance_infra) while observed.
- Restores Điều 29 compliance immediately (species mapping exists, birth auto-fills).
- QT-001 backfill for 12 birth_registry rows (species_code + composition_level auto-filled from SPE-GOV → atom).
- No new species creation. No governance promotion. Minimal scope.
- Cost: IU temporarily classified as "governance infrastructure atom" — technically correct (IU tables ARE governance infrastructure during pilot).
Stage 2 (when Phase 5 migration design is locked): Decide whether IU is promoted to governed.
- If promoted: create dedicated species with correct composition_level based on TAC nesting decision.
- Execute QT-005 (promotion: new species → re-map → backfill → update role → verify).
- If not promoted: SPE-GOV stays, IU remains observed governance infrastructure.
Why staged: Blocking Phase 4C/5 until the containment question is fully resolved would delay migration indefinitely. SPE-GOV gom is law-compliant NOW, and promotion can happen cleanly later via QT-005.
6. Updated migration gates
vocab_gate = OPEN (14 keys, planner plan_ok)
species_mapping_gate = BLOCKED → OPEN after Phase 4C (SPE-GOV mapping)
composition_decision_gate = BLOCKED → OPEN after Phase 4C (auto-resolved by SPE-GOV)
governance_promotion_gate = DEFERRED to Stage 2 (post-Phase 5 design)
birth_backfill_gate = BLOCKED → OPEN after Phase 4C (QT-001 for 12 rows)
legal_compliance_gate = BLOCKED → OPEN after Phase 4C (Điều 29 species mapping restored)
label_gate = DEFERRED (DOT enrichment, post-migration)
edge_gate = DEFERRED (DOT enrichment, post-migration)
migration_allowed = false → reassess after Phase 4C
7. Summary for GPT
Discovery PASS. Evidence complete. Key insight: species determines composition (no independent composition decision needed). SPE-GOV is available as immediate gom species for IU while observed. TAC nesting is real but containment decision can be deferred to Phase 5 migration design. Staged approach (gom now, promote later) is both law-compliant and pragmatic.
phase4b_discovery=PASS
evidence_complete=true
agent_compliance=FULL
species_decision_locked=false
composition_decision_locked=false
opus_recommendation=STAGED_SPE_GOV_GOM_THEN_QT005_LATER
next_action=GPT_USER_DECIDE_SPECIES_GOVERNANCE_THEN_PHASE4C