KB-200A

GPT Review — B3-F1a rev3 Prompt — Approved for Agent Recompile — 2026-05-13

5 min read Revision 1
p3dbirth-systemb3f1arev3prompt-reviewapproved2026-05-13

GPT Review — B3-F1a rev3 Prompt — Approved for Agent Recompile — 2026-05-13

Scope reviewed

Reviewed Opus rev3 artifacts:

  • knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-birth-system-b3f1a-soft-gate-shape-probe-and-sql-artifact-prompt-DRAFT.md
  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3f1a-rev3-revision-directive-report.md

Related blocking review:

  • knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3f1a-recompiled-sql-rev2-blocked-2026-05-13.md

Verdict

Status: APPROVED_FOR_AGENT_REV3_RECOMPILE_WITH_GPT_PATCHES

Opus addressed the four rev2 blockers correctly. GPT patched the prompt to be self-contained and to avoid reliance on rev2 state or previous probe results.

Opus rev3 fixes accepted

  1. SIBLING_OUT_OF_SCOPE must be global over all registry rows with physical table, except the dedicated birth_registry recursive-risk path.
  2. COMMENT ON statements must be removed from executable B3-F1b SQL artifacts.
  3. Function resolution must be strict: schema + pronargs=0 + prorettype='pg_catalog.trigger'::regtype; ambiguity must block.
  4. Helper-level exception catch must be removed; the outer gate catch remains the single non-blocking boundary.

GPT patches applied

Patch 1 — remove non-self-contained references

Prompt no longer says only unchanged from rev2. It now explicitly restates scope constants, hard boundaries, and required live probes.

Patch 2 — force live re-probe

Prompt explicitly requires Agent to re-probe live state and not rely on rev1/rev2 probe results, prior artifacts, or chat summaries.

Patch 3 — clarify sibling function missing behavior

If a sibling policy entry has no matching zero-arg trigger function, Agent must treat it carefully:

  • If no live trigger usage depends on that entry, report and exclude the entry for artifact compilation.
  • If live trigger usage exists, BLOCK because policy points to an active but unresolved contract sibling.

Patch 4 — final fields strengthened

Added required fields:

  • strict_function_resolution_used=true|false
  • no_comment_on_in_executable_sql=true|false
  • no_embedded_sibling_collection_list=true|false
  • explicit report path

No-hardcode / self-expanding assessment

The prompt is approved because it requires:

  • no embedded sibling collection list in runtime code;
  • sibling scope read from dot_config JSON policy;
  • strict function resolution from pg_proc;
  • trigger validation by tgfoid and tgtype bits;
  • all collection sets derived live from PG;
  • full-scan and trigger logic regenerated together;
  • no snapshot counts as gates.

Execution constraints

This approval is for B3-F1a recompile only:

  • No DDL.
  • No CREATE FUNCTION.
  • No CREATE TRIGGER.
  • No INSERT/UPDATE/DELETE in PG.
  • No system_issues writes.
  • No hard gate.
  • KB report/artifact upload required.

Required prompt revision

Use:

  • knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-birth-system-b3f1a-soft-gate-shape-probe-and-sql-artifact-prompt-DRAFT.md revision 17 or latest.

Required output

Agent must overwrite/upsert rev3 artifacts:

  • knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1a-soft-gate-compiled-function.sql.md
  • knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1a-soft-gate-compiled-trigger.sql.md
  • knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1a-soft-gate-rollback.sql.md
  • knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1a-soft-gate-full-scan-query.sql.md

Agent must write report:

  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3f1a-soft-gate-shape-probe-and-sql-artifact-report.md

Governance status

b3f1a_rev3_prompt_review_status=APPROVED_FOR_AGENT_REV3_RECOMPILE_WITH_GPT_PATCHES
b3f1a_rev3_recompile_allowed=true
b3f1b_execution_allowed=false_until_rev3_sql_review
create_function_allowed=false
create_trigger_allowed=false
pg_mutation_allowed=false
hard_gate_allowed=false
phase5c2_migration_allowed=false
next_recommended_action=AGENT_RECOMPILE_B3F1A_REV3_ARTIFACTS_WITH_REV17_OR_LATEST
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3f1a-rev3-prompt-approved-for-agent-recompile-2026-05-13.md