KB-7043

GPT Review — 23-P3D4 Execution PASS and P3D4B Directive

9 min read Revision 1
gpt-reviewpack-23p3d4-passp3d4b-directivedirectusdotdieu43-overlap

GPT Review — 23-P3D4 Execution PASS and P3D4B Directive

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

Verdict

P3D4 PASS confirmed. No supplemental Agent action needed for P3D4.

Agent executed correctly. Opus review is accurate.

Accepted evidence

  • law_preread=PASS.
  • constitution_checked=PASS.
  • assembly_first_checked=PASS.
  • law_jurisdiction_map_included=PASS.
  • law_overlap_check=PASS.
  • inventory_directus_access=FULL_READ_ONLY.
  • inventory_pg_access=FULL_READ_ONLY.
  • design_questions_answered=8/8.
  • recommendation=C.
  • body_content_exposure=NOT_INCLUDED.
  • metadata_only_exposure_default=PASS.
  • no_pg_mutation=true.
  • no_directus_mutation=true.
  • no_nuxt_code=true.
  • no_nuxt_business_logic=true.
  • no_direct_pg_from_nuxt=true.
  • no_codex_dispatch=true.
  • no_secret_creation_or_disclosure=true.
  • no_law_jurisdiction_overlap=true.
  • assembly_first_compliant=true.
  • next_required_pack=P3D4B_DIRECTUS_DOT_EXPOSURE_PACKAGE_REVIEW.

Key findings accepted

  • Directus already auto-registers iu_notification_event and iu_notification_read as collections.
  • Directus item-level access is currently 403 for the inspected role/token, which is correct pre-DOT posture.
  • PG has no notification view yet.
  • P3D4 recommends staged Option C:
    • Phase 1: read-only metadata/ref board via PG view + Directus read permission through reviewed DOT package.
    • Later: mark-read/write action only after Directus user → actor_ref mapping and controlled function exposure review.
  • Body content remains out of scope.
  • Hermes remains blocked pending separate review.

User clarification accepted

User notes that Điều 43 already has many DOT assets and partial relationship/counting work. P3D4B must not create overlapping Directus/DOT mechanisms. It must inventory Điều 43 DOT/tooling first and reuse any existing DOT conventions where applicable.

This is now a hard requirement for P3D4B.

Directive to Opus — create P3D4B prompt, do not dispatch

Create prompt:

knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d4b-directus-dot-notification-readonly-exposure-prompt.md

Report path:

knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d4b-directus-dot-notification-readonly-exposure-report.md

P3D4B scope

P3D4B should be a DOT package review prompt, not immediate implementation.

It should design a candidate package for:

  1. A PG read-only view, likely v_iu_notification_board, metadata/ref-only.
  2. A Directus DOT/change package to expose that view as read-only.
  3. Role/permission plan for read-only human monitoring.
  4. Rollback/review plan.

No execution/implementation until GPT/User approve the P3D4B candidate.

Mandatory pre-read

P3D4B prompt must require Agent to read:

  1. P3D4 report:
    • knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d4-directus-exposure-design-review-report.md
  2. P3D4 design note:
    • knowledge/dev/laws/dieu44-trien-khai/design/23-p3d4-directus-notification-exposure-review.md
  3. P3D3 design note:
    • knowledge/dev/laws/dieu44-trien-khai/design/23-p3d3-user-notification-board-directus-exposure-design.md
  4. Directus/Nuxt boundary:
    • knowledge/dev/laws/dieu44-trien-khai/design/23-p3d-ui-boundary-directus-nuxt-assembly-note.md
  5. Relevant law documents:
    • Constitution;
    • Assembly First law;
    • data-connection law;
    • Directus/DOT law if available;
    • Điều 28/display law if available.

Điều 43 / DOT overlap inventory — required

Before drafting any P3D4B package, Agent must inventory Điều 43 / existing DOT tooling to avoid double or overlap.

Search/read at least:

  • documents under knowledge/dev/laws/dieu43* if present;
  • documents with tags/paths containing dot, directus, d35, d43, relationship, count, counter, metrics, schema;
  • any existing DOT package templates or conventions;
  • any existing Directus relationship/counting tools that could be reused.

The prompt should explicitly say:

Do not invent a new DOT format if an existing Điều 43/DOT format exists.
Do not duplicate existing Directus relationship/counting mechanisms.
Reuse existing DOT conventions/templates where applicable.
If Điều 43 is incomplete due to schema blockers, document which parts are reusable and which parts are blocked.

Candidate P3D4B package contents

The prompt should require Opus/Agent to draft a review note containing:

  1. Candidate PG view design:

    • name: v_iu_notification_board or justified alternative;
    • columns metadata-only:
      • event_id;
      • event_type;
      • event_stream;
      • canonical_address;
      • unit_id;
      • ref_id;
      • actor_ref;
      • source;
      • created_at;
      • read_count;
      • latest_readers JSON/array;
      • payload metadata only;
    • no IU body content;
    • no writeability;
    • owner/permissions plan;
    • rollback plan.
  2. Candidate Directus DOT package outline:

    • collection/view exposure name;
    • read-only permission grant;
    • no create/update/delete permissions;
    • role target, if known;
    • metadata labels/descriptions;
    • whether Directus already auto-registers the view or needs DOT metadata;
    • no manual UI clicking.
  3. Relationship/counting reuse from Điều 43:

    • which existing DOT/count mechanisms apply;
    • what must be avoided to prevent double counting;
    • how latest_readers/read_count should be computed without conflicting with existing count infrastructure.
  4. Human-facing phase boundaries:

    • Phase 1: read-only board only;
    • mark-read deferred;
    • Directus user → actor_ref mapping deferred;
    • Nuxt display assembly deferred;
    • Hermes deferred.
  5. Compliance checklist:

    • no PG mutation in P3D4B prompt drafting;
    • no Directus mutation;
    • no Nuxt code;
    • metadata-only;
    • DOT-only;
    • no overlap with Điều 43/DOT tooling;
    • no law jurisdiction overlap.

P3D4B output expected

Create design/review note:

knowledge/dev/laws/dieu44-trien-khai/design/23-p3d4b-directus-dot-notification-readonly-exposure-package-review.md

The note should recommend either:

  • READY_FOR_IMPLEMENTATION_PROMPT — if DOT/schema overlap risk is low and candidate is complete;
  • NEEDS_DIEU43_ALIGNMENT — if Điều 43/DOT tooling must be reconciled first;
  • DEFERRED — if exposure is unsafe or unclear.

Hard boundaries

  • Do not implement PG view yet.
  • Do not mutate PG.
  • Do not mutate Directus config.
  • Do not create DOT package in production.
  • Do not click Directus UI to configure anything.
  • Do not write Nuxt code.
  • Do not start Hermes.
  • Do not dispatch Codex without explicit user approval.
  • Do not invent duplicate DOT conventions.
  • Do not duplicate Điều 43 relationship/counting work.
  • Do not expose IU body content.

Required report evidence

Report should include:

  • phase_status;
  • dieu43_dot_inventory=PASS|LIMITED|FAIL;
  • existing_dot_conventions_checked=PASS|FAIL;
  • overlap_risk=LOW|MEDIUM|HIGH;
  • recommendation=READY_FOR_IMPLEMENTATION_PROMPT|NEEDS_DIEU43_ALIGNMENT|DEFERRED;
  • candidate_view_defined=PASS|FAIL;
  • candidate_dot_outline_defined=PASS|FAIL;
  • metadata_only=true;
  • no_body_content=true;
  • no_pg_mutation=true;
  • no_directus_mutation=true;
  • no_nuxt_code=true;
  • no_codex_dispatch=true;
  • next_required_pack based on recommendation.

GPT leaning

Given the P3D4 evidence, GPT’s current leaning is:

  • Start with read-only PG view + Directus read-only exposure.
  • Keep mark-read deferred.
  • Require Điều 43/DOT inventory before final implementation prompt.
  • If Điều 43 has reusable DOT conventions, P3D4B must adopt them rather than inventing a new format.

Next after P3D4B

If P3D4B recommends READY_FOR_IMPLEMENTATION_PROMPT, then draft a separate implementation prompt. That implementation prompt must still be reviewed before dispatch.

If NEEDS_DIEU43_ALIGNMENT, pause P3D4 implementation and reconcile DOT/schema conventions with Điều 43 first.

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