KB-2502

GPT Review — P3D Pack1 Phase4C Prompt rev2 Not Approved: Field-Level Hardcode Remains

5 min read Revision 1
gpt-reviewp3dpack1phase4cprompt-rev2not-approvedno-hardcodefield-hardcode2026-05-11

GPT Review — P3D Pack 1 Phase 4C Prompt rev2 Not Approved: Field-Level Hardcode Remains

Date: 2026-05-11 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:

  • knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase4c-readonly-dryrun-species-mapping-qt001-prompt.md rev2
  • knowledge/dev/laws/dieu44-trien-khai/design/p3d-pack1-phase4c-species-mapping-strategy-qt001-backfill-design.md rev2
  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase4c-prompt-rev2-no-hardcode-selector-patch-report.md

Verdict

Prompt rev2 is NOT approved for Agent dispatch yet.

It is much better than rev1. The species selector hardcodes are mostly removed. However, field-level hardcode and fuzzy selector language remain. Under the User's requirement, this still needs one more patch.

What rev2 fixed well

  1. Scope block is a good pattern and acceptable for Pack 1 target identifiers.
  2. SPE-GOV / SPE-LAW are no longer used as selector decisions in the prompt.
  3. Species candidates are intended to come from live entity_species.
  4. Composition values are intended to come from live entity_species.composition_level.
  5. Scale-brittleness self-audit is a good addition.
  6. Recommendation was downgraded to options pending dry-run.
  7. Discriminator runtime finding remains explicit.

Remaining blockers

1. Field-level hardcode in output shapes

G3 asks for fields such as:

code, species_code, display_name, composition_level, management_mode, prefix, parent_id, depth

Some of these may exist, but the prompt must not assume all exist. We already saw entity_species.species_name did not exist. Field-level assumptions are still hardcode.

Prompt must say: output all columns verbatim and, if the listed semantic fields exist, include them; otherwise report FIELD_ABSENT.

2. Fuzzy “subordinate-like behavior” remains

G7 says:

birth_code_strategy='subordinate' (or whatever value the live distinct set shows for "subordinate"-like behavior)

This invites Agent to infer semantics from string similarity. That is not acceptable for production evidence.

Fix: query distinct birth_code_strategy values and report them. If the scoped target subordinate collection has a strategy value, use that exact live value as the comparator for pattern analysis. Do not infer “subordinate-like”.

3. Target table/column use needs explicit schema guards

The prompt declares information_unit, unit_version, law_unit, unit_kind as scope. This is acceptable, but execution must still verify:

  • target tables exist;
  • target collections exist in collection_registry;
  • information_unit.unit_kind exists before using it;
  • if absent, discriminator strategy collapses safely.

G6 covers some of this, but the prompt should make it a top-level preflight.

4. G9 “basic plausibility” needs deterministic definition

G9 says to run per candidate that passes basic plausibility. This could allow Agent judgment. Define basic plausibility deterministically:

  • candidate has non-null species identifier;
  • candidate has non-null composition if the live schema exposes composition;
  • if governance/composition fields are absent, mark plausibility=UNKNOWN, not exclude;
  • never exclude silently.

5. “No species names in agent reasoning” is too strong as written

Agent must report live species names/codes from the database. The prohibition should be: no species names/codes from memory or prompt as selectors. Live values may appear in output.

Required next action

Patch prompt to rev3. Do not dispatch Agent yet.

Required rev3 fixes

  1. Add a top-level preflight for scoped target table/collection/column existence.
  2. Convert G3 output shape to schema-adaptive: SELECT * / all columns plus semantic-field presence map.
  3. Replace “subordinate-like behavior” with exact scoped target strategy comparison.
  4. Define deterministic plausibility labels for G8/G9: PLAUSIBLE, CONFLICT, UNKNOWN, not Agent judgment.
  5. Clarify self-audit: live values may be reported; only memory/prompt values are forbidden as selectors.
  6. Keep rev2's no-hardcode selector discipline and scale-brittleness guard.

Status

phase4c_prompt_rev2=NOT_APPROVED_FOR_DISPATCH
phase4c_prompt_rev3_patch_allowed=true
agent_dispatch_allowed=false
seed_allowed=false
backfill_allowed=false
migration_allowed=false
next_action=OPUS_PATCH_PHASE4C_PROMPT_REV3_FIELD_ADAPTIVE_NO_FUZZY_SELECTORS
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-pack1-phase4c-prompt-rev2-not-approved-field-hardcode-2026-05-11.md