GPT Review — P3D Pack1 Phase4 Discovery + No-Hardcode Decisions
GPT Review — P3D Pack 1 Phase 4 Discovery + No-Hardcode Decisions
Date: 2026-05-11 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase4-governance-vocab-discovery-report.md- Opus verification after Agent discovery
Verdict
Discovery accepted. Phase 4 remains PARTIAL because implementation decisions are now required. Migration remains blocked.
The Agent report is sufficiently detailed and no-hardcode compliant. It confirms the system must not proceed to TAC→IU migration until governed-prep is executed and reviewed.
No-hardcode enforcement decision
From this point forward, any implementation prompt that contains manually enumerated seed lists without a live-delta generation step is rejected.
Allowed pattern:
live discovery query → compute delta → execute delta only → report exact rows inserted/updated
Rejected pattern:
INSERT fixed list copied from a report/design/memory
Numeric counts may appear only as run snapshots, not constants or logic conditions.
Accepted discovery findings
- The current live delta snapshot reported 14 missing vocab candidates: unit_kind, publication_type, and section_type candidates.
- The number 14 is not a constant; it is the result of this discovery run.
SPE-LAWexists inentity_speciesas a governed law-domain species, but no mapping exists for IU/UV.information_unit/unit_versionare stillobserved/pilotincollection_registry.- TAC hierarchy is clean in the snapshot, but depth/root/child counts are snapshots only.
- No real
source_hashcolumn exists;unit_version.content_profileis the current JSONB carrier candidate.
Four decisions
D1 — Vocab seed policy
Approved in principle, not approved as fixed 14-row seed.
Phase 4 implementation may seed IU vocab deltas only by recomputing live deltas at execution time.
The required categories are:
- missing
vocab.unit_kind.*needed by the active migration contract; - missing
vocab.section_type.*derived from live TAC-used section types; - missing
vocab.publication_type.*derived from live TAC-used publication types.
STOP if:
- live delta differs from the discovery report and the prompt has no rule to handle it;
- target
dot_configschema is not exactly(key,value,description,updated_at)or compatible; - any candidate key already exists with a conflicting value.
D2 — Species mapping policy
Approved in principle using live-discovered species and target collections.
Do not hardcode “2 rows”. Phase 4 implementation may seed species_collection_map for the discovered target collections that require mapping, using a uniquely resolved law species.
Resolution rule:
- Discover target collections from
collection_registrywhere collection name is in the current native IU target set for migration. - Resolve law species from
entity_speciesusing live query, preferring a unique governed law-domain species such asspecies_code='law'/ prefixLAW/code='SPE-LAW'if uniquely found. - Use discovered
composition_levelfrom the species row, not a typed constant.
STOP if:
- zero or multiple plausible law species are found;
- target collection rows are missing;
- existing
species_collection_maprows conflict; - required columns differ from expected discovered schema.
D3 — Parent/composition policy
Parent pointer is approved for migration design; edge materialization remains deferred.
For Phase 5 pilot migration design:
- copy TAC
parent_idinto IUparent_or_container_refthrough an ID mapping, not by assuming depth; - verify no orphans/cycles at execution time;
- do not materialize
universal_edgesin the first migration unless a separate edge-materialization design is reviewed.
composition_role must not be hardcoded from a fixed layer model. If stored, it must be derived from a registry-backed composition contract or marked as deferred. For the next implementation-prep pack, treat composition role as deferred unless a live registry/contract source is found.
D4 — Hash provenance target
Use unit_version.content_profile JSONB as the provisional traceability carrier, but only after a namespaced key contract is documented and tested.
Do not create a new column in Phase 4. Do not use content_hash for TAC source hash.
Recommended JSONB path:
content_profile.source_hashes.tac_v1
Required fields at migration time:
source_hashes.tac_v1.algorithm
source_hashes.tac_v1.input_recipe
source_hashes.tac_v1.value
source_hashes.tac_v1.source_table
source_hashes.tac_v1.source_id
This is not a migration approval. It is a design decision for the next prompt.
Phase 4 next action
Opus must revise/create a Phase 4 implementation-prep prompt that is safe to dispatch for governance/vocab/species preparation only.
The prompt must:
- recompute live deltas at execution time;
- seed only computed deltas;
- seed species mapping only if unique law species and target collections are resolved live;
- avoid collection governance promotion for now;
- avoid migration;
- avoid universal_edges materialization;
- document the
content_profile.source_hashes.tac_v1contract but not backfill any TAC data yet; - include STOP gates and rollback.
What remains blocked
- TAC→IU migration.
- collection_registry promotion to governed/active.
- edge materialization.
- birth-gate expansion.
- direct species/composition enforcement at birth.
- any hardcoded seed list.
Status
phase4_discovery=ACCEPTED_PARTIAL
no_hardcode_policy=ENFORCED
vocab_seed_policy=APPROVED_IN_PRINCIPLE_DISCOVERY_DELTA_ONLY
species_mapping_policy=APPROVED_IN_PRINCIPLE_LIVE_UNIQUE_RESOLUTION_ONLY
parent_pointer_policy=APPROVED_FOR_PHASE5_DESIGN
edge_materialization=DEFERRED
hash_provenance_target=CONTENT_PROFILE_SOURCE_HASHES_TAC_V1_CONTRACT
migration_allowed=false
next_action=OPUS_PATCH_PHASE4_IMPLEMENTATION_PREP_PROMPT_FROM_DECISIONS