KB-35B6

GPT Final Approval — 23-P3C3 Natural Save Router Prompt rev3

4 min read Revision 1
gpt-reviewpack-23p3c3approved-for-dispatchfn_iu_savenatural-router

GPT Final Approval — 23-P3C3 Natural Save Router Prompt rev3

Date: 2026-05-07
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed: knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3c3-iu-natural-save-router-prompt.md rev3

Verdict

APPROVED FOR DISPATCH.

P3C3 rev3 is ready for Agent execution.

Accepted rev3 fixes

  • T13 now verifies all four count deltas: IU, UV, draft, comment.
  • T13 branches correctly by current policy:
    • auto_apply: IU +1, UV +2, draft +2, comment +2;
    • non-auto: IU +1, UV +1, draft +2, comment +1.
  • Preflight verifies the protected lower-layer function set.
  • T12 verifies protected function hash equality and protected function count = 9.
  • T9 PUBLIC grant check uses LEFT JOIN LATERAL aclexplode(...).
  • Final report includes pilot address, T1/T2/T3/T7 IDs/status samples.
  • Cleanup/retention semantics are printed unconditionally.
  • P3C3 does not change broad-use policy.
  • P3C3 does not introduce comment approval.

Accepted design state

P3C3 creates one new AI-facing content router:

fn_iu_save(
  p_address text,
  p_body text,
  p_actor text,
  p_title text DEFAULT NULL,
  p_reason text DEFAULT NULL,
  p_mode text DEFAULT 'auto'
) RETURNS jsonb

Allowed modes:

  • auto
  • draft

Excluded modes:

  • no apply mode inside fn_iu_save;
  • no comment mode inside fn_iu_save.

Final AI-facing surface after P3C3:

  • fn_iu_save(...) — create/edit content front door;
  • fn_iu_comment(...) — free-flow comment front door;
  • fn_iu_apply_edit_draft(...) — reviewer approval button.

Dispatch instruction

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

knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3c3-iu-natural-save-router-prompt.md

Mục tiêu:
Tạo public.fn_iu_save(text,text,text,text,text,text) làm cửa chính AI-facing cho create/edit content.

Không table DDL.
Không trigger/gateway changes.
Không vector mutation.
Không notification implementation.
Không cleanup/pilot deletion.
Không alter P3C1/P3C2/P3B-FU functions.
Không implement P3D.
Không add comment approval.
Không switch broad-use policy trong P3C3.
Không direct IU/UV writes inside fn_iu_save.
Không app.canonical_writer inside fn_iu_save.

Report tại:
knowledge/dev/laws/dieu44-trien-khai/reports/23-p3c3-iu-natural-save-router-report.md

Upload report kể cả FAIL/CRITICAL.

Expected PASS evidence

Report should include:

  • phase_status=PASS;
  • T1–T14 PASS, with T4 conditional if policy is not auto-apply;
  • fn_iu_save(text,text,text,text,text,text) created;
  • T1 new address creates official IU + version 1;
  • T1 invariant all_pass=true;
  • T2 existing address with mode='draft' creates draft only, no UV;
  • T3 existing address with mode='auto' behaves according to current policy;
  • T4 no_change checked if T3 applied, or explicitly skipped if policy requires review;
  • T7 free-flow comment succeeds through explicit draft context;
  • T8 source check proves no direct IU/UV writes and no canonical writer marker in fn_iu_save;
  • T9/T10 security/grants pass;
  • T11 wrong-door direct write remains gateway-blocked;
  • T12 protected function hashes unchanged and protected count remains 9;
  • T13 IU/UV/draft/comment deltas match policy-branched expectations;
  • T14 policy unchanged;
  • pilot IDs/status samples reported;
  • cleanup semantics reported;
  • rows retained as expected;
  • boundaries honored.

Next after Agent report

If P3C3 PASS:

  1. review P3C3 execution report;
  2. prepare a small policy pack to switch broad-use default toward require_review;
  3. update the Agent-facing IU context pack / README so new AI sessions know only:
    • save content with fn_iu_save;
    • comment with fn_iu_comment;
    • apply/review with fn_iu_apply_edit_draft;
  4. then design P3D notification outbox before Hermes production.

Note

P3C3 does not make the notification/Hermes queue. It only completes the natural front door so stateless AI/Agents do not need to remember create-vs-edit routing rules.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-23-p3c3-natural-save-router-prompt-rev3-2026-05-07.md