GPT Directive to Opus — P3D Pack1 Phase5C2 Write rev1 Candidate
GPT Directive to Opus — P3D Pack 1 Phase 5C2 Write rev1 Dispatch Candidate
Date: 2026-05-12 Issuer: GPT-5.5 Thinking / Incomex Hội đồng AI Receiver: Opus 4.6/4.7 Mode: PATCH 5C2 PROMPT ONLY — no execution
0. Verdict
5C2B PASS is accepted. publication_authority_ref_value is resolved.
Open:
P3D_PACK1_PHASE5C2_WRITE_REV1_DISPATCH_CANDIDATE
1. Required reading
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-pack1-phase5c2b-pass-accepted-next-5c2-rev1-2026-05-12.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5c2b-publication-authority-vocab-seed-execution-report.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5c1-species-mapping-backfill-report.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5-tac-to-iu-migration-dryrun-report.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase5c2-dieu35-hybrid-pilot-migration-prompt-DRAFT.md
Do not search broadly.
2. Mission
Patch 5C2 DRAFT into a rev1 dispatch candidate for DIEU-35 pilot migration.
Do not execute Agent. Do not write DB.
3. Locked inputs
pilot_doc_code = DIEU-35
strategy = D3a hybrid
hierarchy_carrier = identity_profile JSON
parent_or_container_ref = NULL
species = information_unit_atom
publication_authority_ref_value = incomex_council
publication_authority_vocab_key = vocab.publication_authority.incomex_council
fn_iu_create_patch_now = false
universal_edges_now = false
iu_publication_member_now = false
4. Required rev1 prompt changes
4.1 Resolve authority placeholder
Replace old placeholder with:
publication_authority_ref_value = incomex_council
publication_authority_vocab_key = vocab.publication_authority.incomex_council
But execution must verify this value live from dot_config before migration, resolving key/value columns by introspection.
4.2 Add production-write safety controls
Add:
- mandatory VPS execution log from start;
ON_ERROR_STOP=1or equivalent;- one transaction for DIEU-35 pilot migration;
- non-blocking advisory transaction lock with key:
p3d_pack1_phase5c2_dieu35_hybrid_pilot_migration
- no retry/improvisation after failed gate;
- stale-sensitive checks repeated inside transaction;
- exact key capture for IU ids, UV ids, and birth_registry ids;
- rollback by captured keys only.
4.3 Re-verify prerequisites live
Before write, verify:
- 5C1 species mapping exists for
information_unitand is primary. birth_registryhas 0 NULL species rows forinformation_unitbefore pilot.- 5C2B authority vocab exists and value is
incomex_council. vocab.unit_kind.law_unitexists.vocab.publication_type.lawexists.- All live section types in DIEU-35 have corresponding
vocab.section_type.*. - Address collision count TAC→IU for DIEU-35 is 0.
4.4 Strengthen semantic registry handling
The rev1 prompt must re-resolve all schema-sensitive fields live. It may cite Phase 5A resolved names as expected references, but execution must not trust cached names without verification.
Any mismatch = ABORT and report.
4.5 Safe fn_iu_create result shape
Define bounded discovery for fn_iu_create output shape.
Preferred: use fn_iu_create_plan if it exposes enough information.
If planner is insufficient, use SAVEPOINT inside a transaction test and roll back the test before proceeding, or fail and return to GPT. Do not commit shape-discovery test rows.
4.6 In-transaction verification before COMMIT
Inside the migration transaction verify:
- inserted IU count equals live source count;
- inserted UV count equals live source count;
- all captured IU rows have
identity_profile.publication_authority_ref = incomex_council; - all captured IU rows have non-NULL species in
birth_registry; - all captured UV rows have correct content hash (
fn_content_hash(body)); - no TAC rows were modified;
- all captured keys persisted to VPS log before COMMIT where possible.
If any fail → ROLLBACK.
4.7 Post-COMMIT render-fidelity
Keep RF checks post-COMMIT if needed:
- tree parent-child pairs via D3a metadata;
- body content equality;
- render order equality;
- source table counts unchanged.
If RF fails, define post-COMMIT exact-key rollback using captured keys.
4.8 Report requirements
Final Agent response must include:
phase5c2_status=PASS|PARTIAL|ROLLED_BACK|BLOCKED|LOCK_BUSY
source_count=<N>
inserted_iu_count=<N>
inserted_uv_count=<N>
publication_authority_ref_verified=true|false
species_auto_assigned=true|false
render_fidelity_drift=<N>
rollback_reference_available=both|kb|vps_log|none
no_tac_rows_modified=true|false
phase5d_unblocked=true|false
5. Do not change
- Do not add function patch.
- Do not add DDL.
- Do not create universal_edges.
- Do not create IU publication_member table.
- Do not migrate DIEU-28/DIEU-32.
- Do not write TAC tables.
- Do not dispatch Agent.
6. Target outputs
Patch prompt in place:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase5c2-dieu35-hybrid-pilot-migration-prompt-DRAFT.md
Create patch report:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5c2-rev1-dispatch-candidate-patch-report.md
7. Expected Opus response
Return only:
- Patched 5C2 prompt path.
- Patch report path.
- Top 7 rev1 changes/safety gates.
- Confirmation GPT final review + User GO required before Agent dispatch.
8. Status
phase5c2_rev1_patch_allowed=true
agent_dispatch_allowed=false
migration_allowed=false