KB-6A92

GPT Final Approval — 23-P3D4C0 Prompt rev2

5 min read Revision 1
gpt-reviewpack-23p3d4c0approved-for-dispatchhot-pathdebouncebatch-notification

GPT Final Approval — 23-P3D4C0 Prompt rev2

Date: 2026-05-08
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed: knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d4c0-new-piece-document-batch-notification-design-prompt.md rev2

Verdict

APPROVED FOR DISPATCH.

Rev2 correctly incorporates the User’s performance directive: remove derived computation from AI interaction hot paths, keep write path O(1), and defer notification/batch computation through PG-native staging + debounce.

Accepted rev2 state

  • Hot path O(1) is explicit.
  • Trigger/function write path can only append minimal staging/outbox records.
  • No COUNT/JOIN/aggregation/rollup/latest_readers on write path.
  • Preferred architecture is staging/outbox + pg_cron worker every 90–120s.
  • Three-layer model is explicit: pending → durable event → Directus view.
  • Grouping requires stable key, not timing alone.
  • Batch threshold is configurable.
  • P3D2 trigger hot-path review is required.
  • New-piece hook options are evaluated; no automatic jump to birth trigger.
  • Directus exposure is paused/gap-aware until birth/batch design is resolved.
  • No PG/Directus/Nuxt mutation.

Dispatch instruction

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

knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d4c0-new-piece-document-batch-notification-design-prompt.md

Mục tiêu:
P3D4C0 là design/inventory only.

1. Read mandatory documents.
2. Perform PG read-only inventory.
3. Answer the 8 design questions.
4. Review P3D2 trigger hot-path impact.
5. Determine source/batch key availability.
6. Recommend event taxonomy, hook strategy, debounce/grouping architecture.
7. Create design note:
   knowledge/dev/laws/dieu44-trien-khai/design/23-p3d4c0-new-piece-document-batch-notification-design.md
8. Upload report:
   knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d4c0-new-piece-document-batch-notification-design-report.md

Upload report kể cả FAIL/CRITICAL.

Hard boundaries for Agent

  • No implementation.
  • No PG mutation.
  • No Directus mutation.
  • No Nuxt code.
  • No Hermes.
  • No Codex dispatch.
  • No new tool.
  • No external scheduler.
  • No heavy trigger logic.
  • No direct PG from Nuxt.
  • No claim that the user-facing board is complete until birth/batch gap is resolved or explicitly disclosed.

Expected PASS evidence

Report should include:

  • phase_status=PASS;
  • birth_notification_gap=CONFIRMED|NOT_CONFIRMED;
  • batch_grouping_required=true;
  • source_document_identifier=FOUND|NOT_FOUND|UNCLEAR;
  • import_batch_identifier=FOUND|NOT_FOUND|UNCLEAR;
  • debounce_mechanism_recommended=PG_CRON_STAGING|LISTEN_NOTIFY|OTHER;
  • debounce_window_configurable=true;
  • batch_piece_threshold_configurable=true;
  • recommended_event_taxonomy=<list>;
  • recommended_grouping_strategy=PIECE_ONLY|DOCUMENT_ROLLUP|HYBRID|DEFERRED;
  • recommended_hook=FN_IU_SAVE|IU_INSERT_TRIGGER|UV_SEQ1_TRIGGER|CREATION_GATEWAY|OTHER;
  • creator_implicit_self_read_applies=true;
  • hot_path_operations=<description>;
  • hot_path_joins=0;
  • hot_path_aggregations=0;
  • hot_path_expected_complexity=O(1);
  • derived_processing_window_seconds=90_120;
  • expected_ai_pg_latency_impact=LOW;
  • p3d2_trigger_hot_path_review=PASS|FAIL|LIMITED;
  • p3d2_trigger_heavy_work_found=true|false;
  • p3d4c_directus_exposure_status=PAUSE_UNTIL_BIRTH_BATCH_DESIGN|ALLOW_GAP_AWARE|DEFER;
  • no_pg_mutation=true;
  • no_directus_mutation=true;
  • no_nuxt_code=true;
  • no_new_tool_created=true;
  • no_external_scheduler=true;
  • no_heavy_trigger_logic=true;
  • next_required_pack=<based on recommendation>.

Important interpretation

The old P3D4C Directus board exposure path is paused until P3D4C0 clarifies new-piece and document-batch notification logic.

If P3D4C0 finds no stable source/batch key, it should not force grouping by timing alone. It should recommend minimal key addition, gap-disclosed current board, or defer.

Next after Agent report

If P3D4C0 PASS:

  1. GPT/User review the design note and report.
  2. Decide whether to extend runtime before Directus exposure.
  3. Only then resume a revised P3D4C/P3D4C1 roadmap.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-final-approval-23-p3d4c0-prompt-rev2-2026-05-08.md