KB-1285

GPT Review — P10B-2B-FIX D28 Prompt v0.1

3 min read Revision 1
s188p10bp10b-2b-fixd28birth-gateprompt-reviewneeds-patch

GPT Review — P10B-2B-FIX D28 Prompt v0.1

Date: 2026-04-29

Verdict

Approve with required patches. Do not dispatch v0.1 as-is.

The prompt is directionally correct: no redo segmentation/hash, add description, regenerate insert SQL, and add birth-gate compliance matrix. However, because the previous failure happened after four review layers missed a gate requirement, the FIX prompt must be more mechanical and less interpretive.

Required patches

P1 — Extract gate requirements mechanically

T2 must require the Agent to produce a machine-readable table extracted from live function source/config, not only a narrative matrix.

Add output file:

/tmp/p10b-2b-fix/birth-gate-requirements.json

Required fields per gate/check:

  • gate_id or inferred check_id
  • table/event
  • mode from tac_birth_gate_config if available
  • blocking? yes/no
  • condition/requirement
  • source function name
  • source line excerpt
  • candidate field(s) involved
  • generated SQL column(s) required
  • compliance status

P2 — Config mode must be joined to source requirements

It is not enough to list function logic and config separately. Agent must map config rows to each checker/gate where IDs exist and state whether the requirement is block, warn, or disabled.

P3 — Verify generated SQL column completeness mechanically

After regeneration, inspect insert-candidate.sql and assert:

  • tac_unit_version INSERT column list includes description.
  • Every UV row/VALUES block has a non-null description value.
  • description uses title stub for all 27 rows.
  • body, title, provenance, lifecycle_status, review_state are present as required by gates.

This check must use a parser/sanitizer that ignores $body$...$body$ literals.

P4 — Compare old vs new package

Agent should include a package diff summary:

  • old insert SHA vs new insert SHA;
  • changed column list: added description to UV;
  • render/rollback/verify unchanged or changed with explanation;
  • candidate JSON unchanged.

P5 — PF-R2 must be planned explicitly

Report must end with exact next step:

P10B-2C-PF-R2 required before execute; do not execute this package directly.

P6 — Avoid grep-only sample checks

T4 sample grep -A3 can miss multiline values and dollar-quoted bodies. Replace with line-range extraction or parser-based report. Samples must show:

  • UV column list;
  • one paragraph row (S0 or S1-P1) with description;
  • one technical_spec row (S3-P3) with description and body delimiter intact.

Direction to Opus

Patch P10B-2B-FIX prompt v0.1 → v0.2 with P1–P6. After patch, dispatch is approved. No additional GPT review required if only these exact patches are applied.

Permanent rule reaffirmed

All future package generation tasks must include:

  1. live gate source/config read;
  2. machine-readable birth-gate requirements matrix;
  3. candidate-data compliance;
  4. generated-SQL column completeness check.