KB-12D2
Copy/Paste Agent Prompt — P3D Pack 1 Phase 3 Hash Planner Investigation
3 min read Revision 1
copy-pasteagentp3dpack1phase3hashplannerreadonlymedium-high2026-05-11
Copy/Paste Agent Prompt — P3D Pack 1 Phase 3 Read-Only Hash + Planner Investigation
Date: 2026-05-11 Recommended effort: medium-high Mode: Read-only investigation only
Prompt
Run the approved P3D Pack 1 Phase 3 read-only hash + planner investigation.
Recommended effort: medium-high.
Reason: this is read-only, but it requires careful function/trigger/source/config inspection and hash hypothesis analysis. No mutation is allowed.
Read first:
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-p3d-pack1-phase3-readonly-investigation-prompt-rev2-2026-05-11.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase3-readonly-hash-planner-investigation-prompt.md
knowledge/dev/laws/dieu44-trien-khai/design/p3d-pack1-phase3-hash-planner-compatibility-design.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase2-ddl-extend-implementation-report.md
Then execute exactly the approved investigation prompt:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase3-readonly-hash-planner-investigation-prompt.md
Goal:
Investigate two blockers before any TAC→IU migration:
- TAC
content_hashalgorithm differs from IUcontent_hash. fn_iu_create_plan(..., unit_kind='law_unit', ...)resolves todesign_doc_section.
Hard boundaries:
- No DDL.
- No DML.
- No INSERT/UPDATE/DELETE.
- No function/trigger patch.
- No migration.
- No Directus mutation.
- No Qdrant/vector mutation.
- No DOT-119 execution.
- No data writes to
information_unitorunit_version. - SELECT/source inspection only.
Required checks:
- Verify Phase 2 columns exist and row counts are stable.
- Inspect triggers on
tac_unit_versionandunit_version. - Inspect functions containing
content_hash,sha256, ormd5. - Test TAC hash hypotheses using UTF8, bytea, trim, LF-normalized, and composite body/title/description/profile variants.
- Confirm IU hash rule.
- Inspect full
fn_iu_create_planandfn_iu_createsource. - Inspect
dot_configand kind/vocab/section-related tables. - Probe
fn_iu_create_planonly forlaw_unit,design_doc_section, andunknown_kind. - Do not call
fn_iu_create.
Expected report path:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase3-hash-planner-investigation-report.md
Final response format:
phase3_investigation_status=PASS|PARTIAL|BLOCKED
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase3-hash-planner-investigation-report.md
hash_algorithm_tac=<summary>
hash_algorithm_iu=<summary>
law_unit_status=<summary>
no_mutation_performed=true
next_recommended_action=<short>
Return only the final response format plus critical blocker notes. Do not write a long essay.