KB-71FE

Opus Verification — Phase 4 Discovery (4 decisions needed)

4 min read Revision 1
p3dpack1phase4discoveryverificationvocabspecies

Opus Verification — Phase 4 Discovery PARTIAL (correct, decisions needed)

Date: 2026-05-11 | Author: Opus 4.7 (verifier)

Verdict: Agent đúng. PARTIAL vì cần quyết định, không phải vì lỗi.

Read-only confirmed. No mutation. All counts are live snapshots.

Key Findings (agent-discovered, not memory)

1. Vocab delta = 14 codes (live-discovered)

Agent discovered from live TAC data vs IU dot_config:

Category Missing in IU dot_config Count
unit_kind law_unit 1
section_type (12 values from tac_section_type_vocab actually used in tac_logical_unit) 12
publication_type law 1
Total 14

No values typed from memory — all from live SELECT DISTINCT vs dot_config WHERE key LIKE 'vocab.%'.

2. Species = SPE-LAW exists, not mapped to IU

Agent found: entity_species has SPE-LAW (compound, governed, prefix LAW) but species_collection_map has 0 rows for IU/UV. Birth_registry 12/12 IU rows have species_code=NULL.

3. Hierarchy = depth 2, 3 roots, 83 children, 0 orphans (snapshot)

Clean tree. Direct parent_id → parent_or_container_ref mapping is safe.

4. Hash provenance = needs design decision

No source_hash column exists. Candidates: content_profile JSONB key (cleanest, no DDL), provenance text column (wrong semantics), new column (DDL needed), traceability table (complex).

5. TAC fully outside governance universe

0 rows in collection_registry, birth_registry, species_collection_map, entity_labels, universal_edges for any tac_* table. Confirmed again.

4 Decisions for GPT

D1: Approve 14 vocab seed candidates?

Agent discovered exactly which codes are missing. GPT approves → agent seeds dot_config with these 14 values. Values come from live discovery, not memory.

Em recommend: APPROVE — clean delta, no ambiguity.

D2: Map SPE-LAW to IU/UV in species_collection_map?

SPE-LAW exists and is governed. IU/UV need species mapping for birth_registry to populate species_code.

Em recommend: APPROVE — agent discovered SPE-LAW is the appropriate species. Rows to insert = discovered from introspection (not hardcoded count).

D3: Parent strategy?

Hierarchy snapshot: depth=2, roots=3 (snapshot from discovery), children=83 (snapshot). No orphans.

Em recommend: direct map parent_id → parent_or_container_ref. Simple column copy during migration. Edge materialization deferred.

D4: Hash provenance target?

Em recommend: content_profile JSONB key source_hash — no DDL needed, JSONB already exists on unit_version, reversible (delete key), queryable via content_profile->>'source_hash'.

Proposed Next Steps

  1. GPT approves D1-D4 → document decisions
  2. Unblock implementation DRAFT → agent seeds 14 vocab + species map (small INSERTs, reversible)
  3. After seed verified → design pilot migration prompt (1 doc, row count from live discovery)
  4. Phase 5 gates G1-G10 must all PASS before full migration

Status

phase4_discovery=PARTIAL_CORRECT
decisions_needed=4 (vocab, species, parent, hash_provenance)
no_hardcode_violations=0 (agent used live discovery throughout)
implementation_draft=STILL_BLOCKED
migration_allowed=false
next_action=GPT_DECIDE_D1_D2_D3_D4

Opus Verification | Phase 4 Discovery | 2026-05-11

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reports/opus-verification-phase4-discovery-partial-2026-05-11.md