Agent Prompt — Phase 5C2-R0 Resume Plan — TAC→Information Unit — DESIGN ONLY — 2026-05-14
Agent Prompt — Phase 5C2-R0 Resume Plan — TAC→Information Unit — DESIGN ONLY — 2026-05-14
Mission
Draft the Phase 5C2-R0 Resume Plan for TAC→information_unit migration after Birth System completion.
This is a DESIGN / READ-ONLY PLAN ONLY task. Do not execute migration. Do not write PG data. Do not mutate code/schema/UI/vector. The output is a design plan and report that GPT/Opus/User will review before any execution gate.
Current verified position
Read first:
-
Agent live investigation:
knowledge/dev/laws/dieu44-trien-khai/reports/agent-readonly-investigation-iu-current-position-before-next-design-2026-05-14.md -
Opus review of Agent report:
knowledge/dev/laws/dieu44-trien-khai/reviews/opus-review-agent-readonly-investigation-iu-current-position-2026-05-14.md -
GPT acceptance:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-agent-readonly-investigation-iu-current-position-accept-dispatch-5c2-r0-2026-05-14.md -
Current handoff:
knowledge/dev/laws/dieu44-trien-khai/handoffs/handoff-p3d-pack1-return-to-phase5c2-after-birth-complete-2026-05-14.md
Verified current state:
birth_system_complete_live_confirmed=true
phase5c2_resume_allowed=true
phase5c2_execution_allowed=false
bulk_migration_allowed=false
ui_cutover_allowed=false
f6_dot119_iu_birth_trigger_done_confirmed=true
pack2b_execution_done=true (P1 birth-fire pilot; no separate closure doc)
iu_core_tables_live=true
iu_core_functions_live=true
iu_gateway_enforced=true
pack23_edit_save_functions_live=true
tac_dieu35_live_verified=true
rev4_revalidation_required=true
vector_efficiency_alert=NONE
Read required references
Birth / IU current contract
knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b2-contract-design-rev3.mdknowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-post-eld-b3f-delta-verification-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/22-pack-closure-iu-native-create-and-gateway.mdknowledge/dev/laws/dieu44-trien-khai/readme/iu-create-gateway-readme.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3c4-iu-policy-and-agent-context-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/19-p2b-p1-iu-pilot-insert-and-birth-fire-report.md
TAC / Phase 5C2 historical docs
knowledge/dev/laws/dieu44-trien-khai/reviews/opus-review-tac-ui-baseline-pass-5c2-prerequisite-satisfied-2026-05-12.mdknowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase5c2-dieu35-hybrid-pilot-migration-prompt-DRAFT.mdknowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5c2-rev4-self-contained-operational-prompt-patch-report.mdknowledge/dev/laws/dieu44-trien-khai/design/p3d-phase5c2-impact-addendum-after-multidimensional-design.mdknowledge/dev/laws/dieu44-trien-khai/design/p3d-pack1-phase5-tac-to-iu-migration-design.mdknowledge/dev/laws/dieu44-trien-khai/design/p3d-pack1-iu-canonical-contract-and-tac-iu-reconciliation-design.md
Laws / principles
knowledge/dev/laws/constitution.mdknowledge/dev/laws/dieu44-trien-khai/principles/p3d-terminology-and-multidimensional-entity-db-principle-2026-05-12.md
Hard boundaries
Absolutely forbidden:
No execution.
No DB write.
No DDL.
No DML.
No INSERT/UPDATE/DELETE/TRUNCATE/MERGE.
No mutating function execution.
No TAC writes.
No IU migration rows.
No bulk migration.
No UI cutover.
No Nuxt/Directus code or config change.
No schema mutation.
No trigger/function patch.
No birth-system change.
No vector/Qdrant mutation.
No outbox worker/event emission creation.
No old rev4 prompt execution.
No rollback execution.
Allowed:
Read KB.
Read live PG catalogs/tables with SELECT only.
Read code/files read-only if needed.
Produce design and report documents in KB.
If a check would require mutation, mark it BLOCKED_BY_NO_MUTATION_BOUNDARY and continue.
Live evidence requirements
Use read-only live PG verification to refresh and include current evidence. Historical counts are references only.
Verify:
A. TAC source live state
- TAC source tables exist:
tac_publicationtac_logical_unittac_unit_versiontac_publication_member
DIEU-35live publication exists.- Current
DIEU-35member count, render_order min/max/distinct, section_type distribution. - Current join path from publication → member → unit_version → logical_unit.
- TAC counts before any future migration.
B. IU target live state
information_unit,unit_versionschema summary.- Current IU/UV row counts.
- Current IU canonical addresses and namespaces; explicitly account for the 12 existing pilot/test rows.
fn_iu_create,fn_iu_create_plan,fn_iu_verify_invariantscurrent signatures.- Gateway enforcement state.
- Pack 23 policy:
iu_edit.policy.default_mode=require_review. trg_birth_information_unitandbirth_registrycoverage for IU rows.identity_profilelocation and JSONB use.
C. Rev4 revalidation
Build a matrix:
| rev4 assumption | current live truth | status | required patch for 5C2-R0 |
|---|
Must include at least:
- rev4 uses migration-write mode; R0 must be read-only design/dry-run.
- rev4 predates Birth Rev3 ELD contract.
- rev4 predates Pack 22 canonical writer / gateway enforcement.
- rev4 predates Pack 23 require_review policy.
- rev4 predates live 12-row IU pilot namespace.
- rev4 assumes authority vocab / species mapping; verify live.
- rev4 TAC→UI preservation still valid.
- rollback strategy must use exact keys only; no pattern deletion.
D. TAC→IU mapping design
Design a live-derived mapping, not executable DML.
Must cover:
- Source TAC concepts and resolved columns.
- Target IU/UV concepts and resolved columns.
- Mapping from TAC logical unit + unit version to
fn_iu_createinputs. - How to preserve provenance: TAC source IDs, content hash, render_order, section_type, parent hierarchy, publication context.
- How to represent TAC hierarchy under D3a hybrid: metadata/identity_profile, not UI cutover.
- How to avoid collision with existing IU pilot/test rows.
- How to choose pilot namespace for future execution.
- How to handle existing
pilot.iu0.test-001and other pilot rows: do not delete; classify as pre-existing pilot namespace.
E. Migration options
Define options and recommend one:
- 5C2-R0 — read-only mapping/dry-run artifact only, no writes.
- 5C2-R1 — future one-publication / DIEU-35 pilot after GPT/User approval.
- 5C2-R2 — future controlled batch after R1 PASS.
- UI cutover — explicitly out-of-scope future pack only.
For each option, specify:
- risks;
- validation;
- rollback concept;
- UI impact;
- birth impact;
- hardcode risk;
- scale risk;
- required approval.
F. Validation criteria for future execution
Define exact validation plan for future execution artifact, without running it:
- row accounting;
- no TAC source mutation;
- IU/UV created count equals source count;
- birth row coverage count;
- species/composition correctness;
- content hash correctness;
- render_order fidelity;
- identity_profile/provenance completeness;
fn_iu_verify_invariantsuse, if safe during future execution;- exact-key rollback capture;
- TAC→UI remains untouched.
G. Required next gate
State what GPT/Opus/User must review before any migration execution.
Deliverables
Create exactly two KB documents:
- Design:
knowledge/dev/laws/dieu44-trien-khai/design/p3d-phase5c2-resume-tac-to-information-unit-migration-plan.md
- Report:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-phase5c2-resume-plan-report.md
Required final response fields
phase5c2_r0_design_status=PASS|PARTIAL|BLOCKED
no_mutation_performed=true|false
live_pg_verified=true|false
tac_dieu35_verified=true|false
tac_member_count=<N>
tac_render_order_verified=true|false
iu_target_verified=true|false
iu_existing_rows_count=<N>
rev4_revalidation_required=true
rev4_revalidation_matrix_complete=true|false
birth_rev3_integrated=true|false
pack22_fn_iu_create_integrated=true|false
pack23_require_review_integrated=true|false
tac_ui_preservation_integrated=true|false
recommended_option=5C2-R0_READONLY_MAPPING_DRYRUN|5C2-R1_PILOT|BLOCKED
phase5c2_execution_allowed=false
bulk_migration_allowed=false
ui_cutover_allowed=false
vector_work_allowed=false
next_required_review=GPT_OPUS_USER_REVIEW_PHASE5C2_R0_PLAN
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-phase5c2-resume-plan-report.md
Notes
- Do not overfit to rev4. Rev4 is a pattern library, not the active execution target.
- Do not use historical counts as gates unless live-verified.
- Do not use hardcoded table/column assumptions without live introspection.
- If not certainly right, mark UNKNOWN/BLOCKED and explain what read-only evidence is missing.
- Prefer one coherent design package over many micro-prompts.