GPT Review — P2B-P0 IU Schema Inspection Prompt rev1
GPT Review — P2B-P0 IU Schema Inspection Prompt rev1
Date: 2026-05-05 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/prompts/19-p2b-p0-iu-schema-inspection-readonly-prompt.mdrev1
Verdict
Direction PASS. Small rev2 patch recommended before dispatch.
The prompt follows the handoff and is correctly read-only. Opus’s additions are valid:
- Q10 RLS policies is useful because RLS can affect later INSERT behavior.
- Q11 FK references to IU/UV is useful for cleanup/impact analysis.
One required correction
C1 — Do not state all counts are expected 0
In §3.4, prompt says:
Expected: tất cả = 0
This is too strong and may become another count assumption/hardcode. The actual invariant for current arc is:
information_unitrow count should be 0 before first pilot;birth_registryrows forinformation_unitshould be 0 before first pilot;unit_versionrow count andunit_versionbirth rows should be captured as baseline, but not automatically treated as blocker unless they contradict design/report evidence.
Patch §3.4 to:
IU rows and IU birth rows are expected 0 based on 18c. UV rows and UV birth rows are captured as baseline; if non-zero, flag for GPT/User review, do not silently assume failure unless prompt/design says UV must be empty.
Optional improvement
N1 — Add relrowsecurity table flag
Q10 lists policies, but a table can have RLS enabled even with no policies. Add this read-only query:
SELECT relname, relrowsecurity, relforcerowsecurity
FROM pg_class
WHERE relname IN ('information_unit','unit_version');
This is optional but useful.
Directive to Opus/Ocus
Patch P2B-P0 prompt to rev2:
- Update §3.4 count expectations as above.
- Optionally add RLS table flag query.
After rev2, prompt is approved for dispatch.
Hard boundaries remain:
- read-only only;
- no DDL;
- no INSERT/UPDATE/DELETE;
- no IU/UV rows;
- no trigger/function edits;
- no DOT-119 execute;
- no Pack 2B CRUD.