GPT Final Approval — 23-P3D4C0X Prompt rev2
GPT Final Approval — 23-P3D4C0X 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-p3d4c0x-universal-event-outbox-notification-architecture-review-prompt.mdrev2
Verdict
APPROVED FOR DISPATCH.
P3D4C0X rev2 is now sufficiently general. It correctly reframes the work from IU-specific notification into a universal PG-to-outside signal/notification architecture for all Incomex domains.
This is a design/inventory/review task only. No implementation or mutation is allowed.
Accepted rev2 state
- P3D4C1 IU-specific implementation remains paused.
- The target problem is now general PG signal/notification outward flow, not only IU notification.
- The architecture is explicitly 5-layer:
- Fact capture / O(1) hot path;
- Deferred processing / worker;
- Durable event + read state;
- Notification/routing;
- Exposure/delivery.
- Rev2 separates actor from recipient.
- Rev2 covers recipients: humans, AI agents, governance agencies, roles/groups, system services.
- Rev2 covers PG signal channels: Directus projection, agent SQL inbox, Nuxt via Directus, DOT/ops health, LISTEN/NOTIFY seam, future adapters as seam only.
- Rev2 requires event envelope contract and safe payload classification.
- Rev2 generalizes grouping/debounce beyond IU: DOT run id, context-pack build id, workflow id, entity species, agency checkpoint batch.
- Rev2 evaluates notification lifecycle states but allows Phase 1 simplicity.
- Rev2 preserves
not activity logboundary. - Rev2 requires IU migration/compatibility strategy and forbids breaking existing IU functions without compatibility.
- Rev2 requires deeper Điều 43/context-pack/DOT overlap assessment.
- Rev2 requires law ownership/jurisdiction recommendation.
- Rev2 requires PG-first exploitation checklist.
Dispatch instruction to Opus/Agent
Đọc prompt từ KB rồi thực hiện:
knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d4c0x-universal-event-outbox-notification-architecture-review-prompt.md
Mục tiêu:
P3D4C0X là architecture design review only.
1. Read all mandatory laws and Pack 23/P3D context.
2. Perform read-only inventory where required.
3. Build domain × event type × actor/frequency matrix.
4. Design the 5-layer PG-to-outside signal architecture.
5. Define event envelope contract.
6. Define recipient/subscriber/routing model.
7. Define notification lifecycle with Phase 1 vs Later classification.
8. Generalize grouping/debounce rules.
9. Map PG signal channels.
10. Evaluate universal vs per-domain table/worker/read-state strategy.
11. Recommend IU migration/compatibility strategy.
12. Deep-assess Điều 43/DOT/context-pack overlap.
13. Recommend law ownership/jurisdiction.
14. Define inclusion criteria so this does not become general activity log.
15. Create design note:
knowledge/dev/laws/dieu44-trien-khai/design/23-p3d4c0x-universal-event-outbox-notification-architecture.md
16. Upload report:
knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d4c0x-universal-event-outbox-notification-architecture-review-report.md
Upload report kể cả FAIL/NEEDS_MORE_INVENTORY.
Hard boundaries for Agent
- No implementation.
- No PG mutation.
- No Directus mutation.
- No Nuxt code.
- No Hermes.
- No Codex dispatch.
- No external scheduler/tool/service.
- No P3D4C1 resume or patch during this task.
- No new runtime tables/functions/triggers.
- No change to existing
iu_notification_*runtime. - No body/raw payload/vector/secret exposure.
- Do not solve grouping/routing in Directus or Nuxt.
- Do not duplicate Điều 43/DOT/context-pack machinery.
- Do not claim IU board complete.
Required evidence/report fields
Report must include at least:
phase_status=PASS|FAIL|NEEDS_MORE_INVENTORY
laws_surveyed=<count>/13
domain_event_matrix=PASS|FAIL
five_layer_design=PASS|FAIL
event_envelope_proposed=PASS|FAIL
recipient_model_proposed=PASS|FAIL
lifecycle_states_evaluated=PASS|FAIL
lifecycle_phase1_defined=PASS|FAIL
grouping_generalized=PASS|FAIL
signal_channels_mapped=PASS|FAIL
table_strategy_proposed=PASS|FAIL
iu_migration_strategy=A|B|C|D
dieu43_deep_assessed=PASS|FAIL
law_ownership_proposed=PASS|FAIL
directus_strategy=PASS|FAIL
inclusion_criteria_defined=PASS|FAIL
pg_first_checklist=PASS|FAIL
not_activity_log_boundary=PASS|FAIL
recommendation=UNIVERSAL_FIRST|UNIVERSAL_WITH_IU_COMPAT|IU_SPECIFIC_JUSTIFIED|PHASED_CONVERGENCE
no_pg_mutation=true
no_directus_mutation=true
no_nuxt_code=true
next_required_pack=<based on recommendation>
Review emphasis for Agent
The strongest expected output is not a table list. It is a jurisdiction-safe, cross-law architecture that lets PG emit governance-significant signals outward once, and lets all domains consume the same substrate through filtered views/functions/projections.
Agent should explicitly protect the rule:
AI/PG hot path = O(1) append only.
Derived processing = deferred worker.
Directus/Nuxt = projection/display only.
Next after Agent report
GPT/User review P3D4C0X report/design note.
Only after that review may we decide whether the next implementation prompt is:
- universal core implementation;
- universal core with IU compatibility wrappers;
- phased convergence;
- or a justified narrower exception.
P3D4C1 remains paused until this decision is made.