P3D Pack 1 Phase 5 — Dry-Run Prompt rev2 Patch Report
P3D Pack 1 Phase 5 — Dry-Run Prompt rev2 Field-Adaptive Patch Report
Date: 2026-05-11 Author: Opus 4.7
Status flags
phase5_dryrun_prompt_rev2_status=PATCHED
semantic_field_registry=true
deterministic_resolution=true
no_fuzzy_selectors=true
no_column_names_from_memory=true
no_composition_interpretation_by_agent=true
bounded_function_output=true
ambiguous_field_handling=true
requires_GPT_User_review_before_dispatch=true
Paths
Prompt rev2: ...prompts/p3d-pack1-phase5-readonly-dryrun-tac-to-iu-migration-prompt.md (rev 2)
Report: ...reports/p3d-pack1-phase5-dryrun-prompt-rev2-field-adaptive-patch-report.md
Top 4 fixes from rev1
-
§0.1 Semantic candidate field registry — 11 concepts (address_field, content_body, content_hash, provenance_profile, parent_ref, sort_order, section_type, lifecycle, publication_link, title_field, description_field), each with candidate labels + listed tables. Deterministic resolution: 0=ABSENT, 1=USE, >1=AMBIGUOUS (reported, not silently picked). No "or similar."
-
G6 no longer assumes body/content_hash/content_profile — uses concept IDs
content_body,content_hash,provenance_profile. If any concept is ABSENT on a table → that sub-query skipped. If AMBIGUOUS → reported. -
G7 no composition interpretation — agent lists ALL live composition_level values from entity_species, groups species by composition_level, presents ALL groups as candidates. Agent does NOT say "simplest" or "allows containment." GPT/User interprets via Điều 0-B.
-
G8/G9 bounded output — function analysis limited to: identity_args, parameter names, return type, trigger inventory. G9 extracts
NEW.<field>references from gate source, checks each against target schema, labels SATISFIED/GAP/UNKNOWN. No agent interpretation of function behavior.
What triggered this
rev1 still had:
canonical_address or similar(fuzzy)body,content_hash,content_profileas assumed field names- "simplest composition" agent interpretation
- "analyze source" open-ended function analysis
All eliminated in rev2 via semantic field registry + deterministic rules + bounded output.
Honest pattern acknowledgment
This is the pattern across Phase 4B-5: I fix hardcode at one level, leave it at the next level down. Species names → fixed. Column names → caught again. Semantic assumptions → caught again. The root cause: I write from knowledge instead of from discovery. The semantic field registry forces the prompt to always ask PG "what columns do you have?" before referencing ANY field. This should break the pattern at the structural level, not just the instance level.
Confirmation
phase5_dryrun_prompt=REV2_READY_FOR_GPT_REVIEW
next_action=GPT_REVIEW_PHASE5_DRYRUN_PROMPT_REV2