KB-4EA0

GPT Final Approval — 22-P2 Main Functions Prompt rev12

3 min read Revision 1
gpt-reviewpack-22p2fn-iu-createrev12dispatch-approved

GPT Final Approval — 22-P2 Main Functions Prompt rev12

Date: 2026-05-06
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed: knowledge/dev/laws/dieu44-trien-khai/prompts/22-p2-iu-native-create-main-functions-prompt.md rev12

Verdict

APPROVED FOR DISPATCH.

Rev12 closes the shell-verdict PASS-ảo risks identified in rev11.

Accepted state

  • Prompt is self-contained.
  • No raw birth_registry insert.
  • No CREATE OR REPLACE.
  • No global set -e; errors are captured explicitly so report can always be uploaded.
  • Env defaults used for PG connection: PG_CONTAINER, PG_USER, PG_DB.
  • Address generation is strict and init failures do not skip report.
  • Manual placeholder substitution is not used.
  • P1 helpers are checked by exact signatures.
  • Main function conflicts block by name.
  • Unique guard requires real sole-key canonical_address unique constraint.
  • FK is exactly-one and duplicate FK names block.
  • fn_iu_create is complete-or-nothing and verifies full invariants before returning created.
  • Existing incomplete states are explicitly health/remediation states, not success.
  • Post-commit verify is machine captured.
  • Function existence check is machine captured.
  • Final verdict requires: INIT_EXIT=0, PSQL_EXIT=0, POST_EXIT=0, POST_COMMIT_STATUS=PASS, FCHECK_STATUS=PASS.
  • Report fields include init/sql/post/fcheck/diag exits and readiness.

Dispatch instruction

Đọc prompt từ KB rồi thực hiện:

knowledge/dev/laws/dieu44-trien-khai/prompts/22-p2-iu-native-create-main-functions-prompt.md

Prompt là single bash script. Chạy nguyên khối. ALWAYS upload report + log bất kể kết quả.

Report tại:
knowledge/dev/laws/dieu44-trien-khai/reports/22-p2-iu-native-create-main-functions-report.md

Notes for Agent

  • If phase_status=PASS, P2 is passed and P3 readiness may be READY.
  • If any condition fails, report still must be uploaded and P3 readiness is BLOCKED.
  • Do not cleanup pilot row.
  • Do not retry or modify SQL.
  • Do not create adapter/DOT registration/default seed/Pack 2C work in P2.

Summary

Rev12 is sufficiently hardened for the writer-phase pilot. The remaining risk is runtime execution risk, not prompt design risk; the prompt now captures and reports those failures instead of hiding them.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-22-p2-main-functions-prompt-rev12-2026-05-06.md