GPT Review — P3D Pack1 Phase3 BLOCKED + No-Hardcode Directive
GPT Review — P3D Pack 1 Phase 3 Investigation BLOCKED + No-Hardcode Directive
Date: 2026-05-11 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase3-hash-planner-birth-alignment-investigation-report.md- Opus verification note after Agent report
Verdict
Agent report is accepted. Phase 3 investigation status BLOCKED is correct.
Do not start TAC→IU migration. Do not seed vocab/species manually yet. Do not patch birth functions yet.
Next work must be a design/governance pack that resolves the blockers using registry-driven, non-hardcoded rules.
Key accepted findings
- TAC hash and IU hash both use SHA-256 but with different inputs:
- TAC:
sha256(title|body|description|content_profile_or_{}) - IU:
sha256(body)viafn_content_hash
- TAC:
law_unitwas not a planner bug. The real blocker is missing IU vocab:vocab.unit_kind.design_doc_sectionexists;vocab.unit_kind.law_unitdoes not exist;fn_iu_create_plan(p_unit_kind:='law_unit')correctly returnsunresolved_vocab.
- Native IU birth currently enforces Tier-0/core only:
- no species invariant;
- no composition role invariant;
- no parent/child edge invariant;
- no label/enrichment invariant.
species_collection_mapis not wired forinformation_unit/unit_version.entity_labelshas 0 IU/UV entries.universal_edgeshas 0 IU/UV entries.collection_registryfor IU/UV is stillgovernance_role=observed,migration_state=pilot,species_code=NULL.- TAC tables are outside birth_registry / species_collection_map / collection_registry universe.
Hardcode problem — elevated to blocker
The User is correct: hardcoded counts, table names, species numbers, layer counts, DOT names, and manually enumerated registry facts are recurring risk.
This is now a formal blocker for Phase 4.
Before migration or seeding, all future prompts must distinguish:
Allowed stable identifiers
- Canonical table names being directly modified in a specific DDL pack, e.g.
public.information_unit. - Explicit legal/KB path references.
- Exact function names under review, e.g.
fn_iu_create_plan, when investigating that function.
Disallowed hardcoding
- Hardcoded species count, layer count, table count, DOT count.
- Hardcoded lists of section types / publication types copied from memory.
- Hardcoded assumptions such as “33 species”, “6 layers”, “166 collections”, “2199 edges”, “57K entities”, unless explicitly reported as a snapshot and re-verified live before use.
- Seeding exact values without querying the authoritative vocab/registry tables first.
- UI/agent code branching on table names where registry metadata should drive behavior.
Required principle for next phase
Use registry-driven discovery:
- derive section types from
tac_section_type_vocaband live TAC data; - derive publication types from
tac_publication_type_vocaband live TAC data; - derive species/composition decisions from
entity_species,species_collection_map,collection_registry,entity_labels, and legal design docs; - derive layer/composition relationships from registry/edge metadata, not fixed numbers;
- treat all counts as snapshots, not constants;
- create seeds/prompts from queries, not manually typed lists.
Decision
Next phase is not migration and not function patch.
Next phase:
P3D_PACK1_PHASE4_GOVERNED_MIGRATION_READINESS_AND_NO_HARDCODE_CONTRACT
Mode:
DESIGN + READ-ONLY DISCOVERY PROMPT + SEED/PATCH PROMPT DRAFTS ONLY
It must produce one practical pack for Opus 4.6, not many micro-prompts.
Required Phase 4 design decisions
The design must answer:
- Hash policy:
- recompute IU hash on migration;
- preserve TAC source hash in a separate field/table;
- or store both in a traceability record.
- Vocab policy:
- how to seed
law_unitand required section/publication types using live vocab discovery, not hardcoded lists.
- how to seed
- Species/composition policy:
- whether IU migration requires species/composition wiring before migration;
- whether
information_unitandunit_versionshould be governed before migration; - whether labels/edges are populated at birth, post-birth backfill, or explicitly deferred.
- Parent-child policy:
- map TAC
parent_idinto IUparent_or_container_refand/oruniversal_edgeswithout hardcoding hierarchy levels.
- map TAC
- Governance promotion policy:
- decide if IU/UV remain observed/pilot or become governed before authoritative TAC migration.
- No-hardcode migration contract:
- all future implementation prompts must use discovery queries and registry metadata, with live verification gates.
Status
phase3_investigation=BLOCKED_ACCEPTED
migration_allowed=false
vocab_seed_allowed=false_until_phase4_design_review
birth_patch_allowed=false
next_action=OPUS_CREATE_PHASE4_GOVERNED_MIGRATION_READINESS_AND_NO_HARDCODE_CONTRACT