KB-2AB7

GPT Review — 23-P3D2 Execution PASS and P3D3 Directive

7 min read Revision 1
gpt-reviewpack-23p3d2-passp3d3-directivenotificationdirectusnuxtuser-board

GPT Review — 23-P3D2 Execution PASS and P3D3 Directive

Date: 2026-05-08
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed: knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d2-notification-triggers-report.md

Verdict

P3D2 PASS confirmed. Notification runtime is ACTIVE for limited use.

Agent executed correctly. Opus review is accurate. No supplemental Agent action is needed for P3D2.

Accepted evidence

  • phase_status=PASS.
  • T1–T16 all PASS.
  • Variant A: unit_version.created_by exists.
  • Active objects: 4 functions + 3 triggers = 7.
  • Pack 23 hashes unchanged.
  • P3D1 hashes unchanged.
  • notification_runtime=ACTIVE.
  • notification_board=ACTIVE.
  • per_actor_read_state=ACTIVE.
  • hermes_readiness=BLOCKED_PENDING_REVIEW.
  • Comment event, draft event, and version/apply event all created correctly.
  • Birth/version_seq=1 event excluded.
  • System/apply comments suppressed from comment notifications.
  • Applied draft hidden from actionable review inbox.
  • Per-actor read isolation verified: GPT mark-read does not hide from agent:codex.
  • Creator implicit self-read verified: agent:opus self event has read_status_source=implicit_self, unread_for_actor=false.
  • Board latest_readers includes GPT after mark-read.
  • Test notification/read rows cleaned on PASS.
  • Pilot IU/draft/comment/version rows retained.

Operational state

The PG-native notification system is now live for IU workflow:

comment_added   → created by unit_edit_comment trigger
 draft_created  → created by unit_edit_draft trigger
version_applied → created by unit_version trigger

The current PG interface is:

fn_iu_unread(actor)                    -- actor's unread/actionable inbox
fn_iu_mark_read(event_ids, actor)      -- mark event(s) seen for that actor only
fn_iu_notification_board(actor)        -- summary board with read_status_source/latest_readers

User-facing / Directus / Nuxt clarification

User requirement is accepted:

  • The notification board is not only for AI/Agents.
  • Human users also need to monitor comment/new-review/update activity.
  • The final UI target is a shared notification board visible through the existing Directus → Nuxt assembly path.
  • Nuxt must remain display/read-only assembly.
  • No Nuxt business logic.
  • No direct PG access from Nuxt.

Required future data path:

PG notification tables/functions/views
→ Directus collections/views/permissions/API
→ Nuxt existing screen/component reads from Directus

Important boundary

P3D2 activates PG runtime only. It does not yet expose the board through Directus/Nuxt.

The next pack must not jump into Nuxt code. It must first update context and define the Directus-facing exposure plan.

Directive to Opus — create P3D3 prompt, do not dispatch

Create P3D3 prompt:

knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d3-notification-context-directus-exposure-prompt.md

Report path:

knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d3-notification-context-directus-exposure-report.md

P3D3 objectives

P3D3 should be a documentation/context + exposure-design pack. It should not implement UI code.

  1. Update Agent/AI context pack:

    • knowledge/dev/laws/dieu44-trien-khai/context-packs/iu-agent-front-door-context.md
  2. Add notification commands:

    • fn_iu_unread(actor);
    • fn_iu_mark_read(event_ids, actor);
    • fn_iu_notification_board(actor).
  3. Document read-state semantics:

    • explicit read via fn_iu_mark_read;
    • implicit self-read for creator;
    • per-actor read state;
    • GPT reading does not hide items for Opus;
    • human/user actor identity should also be stable.
  4. Document board scope:

    • current board is actionable_current_events;
    • applied/stale draft events disappear from actionable review board;
    • durable history remains in iu_notification_event until cleanup/retention is designed.
  5. Add Directus/Nuxt boundary note:

    • PG remains source of truth;
    • Directus exposes PG tables/views/functions;
    • Nuxt only reads from Directus;
    • no Nuxt business logic;
    • no direct PG from Nuxt;
    • no custom Nuxt work in P3D3.
  6. Create/update a user-facing notification board exposure design note:

    • Suggested path: knowledge/dev/laws/dieu44-trien-khai/design/23-p3d3-user-notification-board-directus-exposure-design.md

P3D3 design note must cover

  • Purpose: shared human + AI notification board.
  • Board contents:
    • new comments;
    • new drafts requiring review;
    • official updates/applies;
    • actor who created the event;
    • actor-specific read state;
    • latest readers.
  • Human users should be able to see what AIs/agents have read or not read.
  • Directus should be the exposure layer.
  • Nuxt should only render what Directus exposes.
  • Preferred PG exposure primitive for Directus:
    • likely a PG view or Directus collection backed by fn_iu_notification_board/event tables;
    • compare view vs function/API exposure, but do not implement yet unless explicitly approved.
  • Actor identity convention for humans and AIs:
    • examples: gpt, opus, agent:codex, user:huyen, reviewer:gpt.
  • Requirement that human/user read state is also per actor, not global.
  • Future Hermes consumption remains separate and blocked pending review.

Required report evidence

Report should include:

  • context pack updated and readback verified;
  • Directus/Nuxt boundary included;
  • notification commands documented;
  • implicit self-read documented;
  • per-actor read state documented;
  • human/user board requirement documented;
  • Directus exposure design note created/readback verified;
  • no PG mutation;
  • no Nuxt code;
  • no Directus config mutation unless explicitly scoped as read-only/design;
  • next_required_pack=P3D4_DIRECTUS_EXPOSURE_DESIGN_OR_IMPLEMENTATION_REVIEW.

Hard boundaries

  • Do not change PG schema/functions/triggers in P3D3.
  • Do not change Pack 23 or P3D runtime.
  • Do not mutate Directus configuration unless a later pack explicitly approves it.
  • Do not write Nuxt code.
  • Do not add Nuxt business logic.
  • Do not connect Nuxt directly to PG.
  • Do not start Hermes production.

Next after P3D3

After P3D3 PASS, decide P3D4:

  • Directus exposure design/implementation review for human-readable notification board;
  • likely PG view / Directus collection / permission mapping;
  • no Nuxt code-first work.

Summary

P3D2 completes the PG-native notification runtime. P3D3 must make the operating model understandable to future AI/Agent sessions and record the user-facing Directus/Nuxt exposure path without violating Assembly First.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-23-p3d2-execution-pass-and-p3d3-directive-2026-05-08.md