KB-3D26
Copy/Paste Agent Prompt — P3D Pack 1 Phase 2 DDL rev3
4 min read Revision 1
copy-pasteagentp3dpack1phase2ddlrev3high-effort2026-05-11
Copy/Paste Agent Prompt — P3D Pack 1 Phase 2 DDL rev3
Date: 2026-05-11 Recommended effort: high Mode: Production DDL with strict preflight/rollback
Prompt
Execute the approved P3D Pack 1 Phase 2 DDL rev3.
Recommended effort: high.
Reason: this is production DDL on native IU tables. The change is intentionally small, but it must be executed with strict preflight, lock timeout, post-DDL verification, and rollback discipline.
Read first:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-p3d-pack1-phase2-ddl-prompt-rev3-2026-05-11.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase2-ddl-extend-implementation-prompt.md
knowledge/dev/laws/dieu44-trien-khai/design/p3d-pack1-design-addendum-post-inventory-2026-05-11.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-readonly-inventory-report.md
Then execute exactly this approved prompt:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase2-ddl-extend-implementation-prompt.md
Scope approved:
Add only these nullable/no-default columns.
public.information_unit:
doc_code TEXT NULL
section_type TEXT NULL
section_code TEXT NULL
public.unit_version:
title TEXT NULL
description TEXT NULL
review_state TEXT NULL
provenance TEXT NULL
editor TEXT NULL
enacted_at TIMESTAMPTZ NULL
updated_at TIMESTAMPTZ NULL
Hard boundaries:
- No data migration.
- No TAC table modification.
- No view creation.
- No publication_member modification.
- No vocab table rename or FK addition.
- No Qdrant/vector mutation.
- No Nuxt code.
- No DOT-119 execution.
- No Directus mutation/restart/schema-refresh.
- No DEFAULT values on new columns.
- No FK constraints on new columns.
- No new indexes.
- No new triggers.
- No vector columns: do not add
vector_sync_status,vector_synced_at,vector_chunk_count. - No updates to existing rows.
- No direct data writes to
information_unit/unit_version.
Required execution behavior:
- Run all preflight STOP gates from the rev3 prompt.
- If any STOP gate fails, do not execute DDL. Upload BLOCKED report.
- Run DDL only inside transaction with
lock_timeoutandstatement_timeout. - Add only the 10 approved nullable/no-default columns.
- Run all post-DDL verification checks.
- Verify row counts unchanged.
- Verify all new columns remain NULL on existing rows.
- Verify no defaults, no FK, no index, no trigger were added.
- Verify gateway remains enforced and gateway triggers enabled.
- Verify
fn_iu_create_planreachable. - Roll back immediately if DDL or post-verification fails.
Expected report path:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase2-ddl-extend-implementation-report.md
Final response format:
pack1_phase2_status=PASS|FAIL|BLOCKED|ROLLED_BACK
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase2-ddl-extend-implementation-report.md
columns_added=<list>
iu_cols_before=<n> iu_cols_after=<n>
uv_cols_before=<n> uv_cols_after=<n>
row_counts_unchanged=true|false
all_new_columns_null=true|false
no_defaults=true|false
no_fk_index_trigger=true|false
no_data_migration=true
no_tac_modification=true
rollback_performed=true|false
Return only the final response format plus critical blocker notes. Do not write a long essay.