KB-691C rev 2

IU-Centered 4 Mothers + Event Foundation — Patch Report Rev1 → Rev2 → Rev2.MP1-6 (DOC-ONLY, 2026-05-27)

22 min read Revision 2
patch-reportrev2rev2-mp1-6iu-centered4-mothersdelta-mapaddedclarifiedescalateddeferredrejected-reshapedkeep-as-isreconciliationverification-checklistmp-logdoc-only2026-05-27

IU-Centered 4 Mothers + Event Foundation — Patch Report (Rev1 → Rev2 → Rev2.MP1-6)

Path: knowledge/dev/requirements/v0.6-iu-4mothers-event-foundation-rev2/01-patch-report.md Status: DRAFT (revision 2; MP1–MP6 patch log appended) — DOCUMENT ONLY. Companion to 00-requirement-brief-rev2.md. Chờ user duyệt. Date: 2026-05-27 Macro alignment: matches user's directive to encode IU_4MOTHERS_EVENT_FOUNDATION_REQUIREMENT_DESIGN_PATCH_2000X style patch as a document-only revision (no production mutation, no implementation, no final OSS selection). MP source: GPT Council Review iu-4mothers-event-requirement-rev2-gpt-review-2026-05-27.md — verdict ACCEPT_WITH_MINOR_PATCHES_BEFORE_USER_APPROVAL.


§0. Sources fed into Rev2

# Source KB path / origin Vai trò trong Rev2
S1 Rev1 Requirement Brief knowledge/dev/requirements/iu-mow-mot-event-foundation-requirements.md Baseline (superseded by Rev2)
S2 Rev1 Master Design knowledge/dev/design/iu-mow-mot-event-foundation-design.md Background; KHÔNG sửa lần này — Master Design Rev2 chờ duyệt brief
S3 Law Extraction Plan (Điều XX) knowledge/dev/design/law-extraction-plan-application-process-workflow-task.md Reference; KHÔNG đụng (forbidden law enactment)
S4 Rev1 Roadmap knowledge/dev/implementation/iu-4mothers-event-foundation-roadmap.md Reference; KHÔNG sửa (forbidden implementation)
S5 OSS Critique Rev1 knowledge/dev/design/assembly-first-open-source-integration-critique.md Inputs cho §15 labels (Rev2 brief)
S6 Patch Instruction knowledge/dev/requirements/iu-centered-4mothers-event-design-patch-instruction-2026-05-27.md Primary patch source
S7 GPT Council Review knowledge/dev/reports/architecture/iu-4mothers-event-foundation-council-review-gpt-2026-05-27.md Patch source #2
S8 GPT Council Addendum knowledge/dev/reports/architecture/iu-4mothers-event-foundation-council-review-gpt-addendum-2026-05-27.md Patch source #3
S9 GPT Recheck After Drive Upload knowledge/dev/reports/architecture/iu-4mothers-event-foundation-gpt-recheck-after-drive-upload-2026-05-27.md Primary reconciliation source for 4 mẹ mở rộng.txt + Bắt sự kiện của PG(3).docx
S10 4 mẹ mở rộng.txt (user upload) Not in Drive search; reconciled via S9 OSS strategy + must-not-miss checklist + 4 Mothers vision
S11 Bắt sự kiện của PG(3).docx (user upload) Not in Drive search; reconciled via S9 Event 5-layer industry-standard lessons
S12 Memory file project-iu-4mothers-event-foundation-requirement-design-pass-2026-05-27 Local memory Live state snapshot 2026-05-27
S13 Memory file feedback-oss-tool-adoption-state-vocab-fit-and-config-first-test Local memory Gate A/B in §15
S14 GPT Council Review of Rev2 (this round) knowledge/dev/reports/architecture/iu-4mothers-event-requirement-rev2-gpt-review-2026-05-27.md MP1–MP6 patch source for revision 2

Drive note (MP2-revised): 4 mẹ mở rộng.txtBắt sự kiện của PG(3).docx raw source đã có qua uploaded files trong phiên rev1; KHÔNG xuất hiện trong Drive search nhưng đã accessible via uploaded files trong session đó. Rev2 sử dụng S9 (GPT recheck report) làm accessible consolidation source. Nếu Council cần direct raw-source audit → raw files sẽ được upload vào KB ở vòng document-only riêng (chưa làm vì Rev2 patch round chỉ vá brief). KHÔNG claim raw source tuyệt đối không truy cập được.


§1. Rev1 gap (one-line)

Rev1 đặt IU làm registry tham chiếu từ workflow/task; Rev2 nâng IU thành đơn vị lắp ráp tái sử dụng mà mọi step/task/form/output/event lắp quanh. 4 Mothers từ "có pointer sang IU" → "khuôn đúc đúc quy trình quanh IU".


§2. Delta map (Rev1 → Rev2)

§2.1 ADDED (mục mới hoàn toàn)

Rev2 § Item Source
§0 User Approval Gate (mandatory front section) S7, S9
§2 IU-Centered Doctrine (D2.1–D2.6) S6 §0, §2
§3 Information Unit as Process Brick (11-field requirement) S6 §2.2
§4 IU Bundle / Step Pack (typed composition) S6 §2.3
§7.1 Standard Process View User handoff + S10
§7.2 Runtime Progress View User handoff + S10
§7.3 9-state model + traffic-light + icon/text (transition matrix → Master Design) User handoff (chốt)
§7.4 Governance UI (problem-only, summary, AI/worker status, drill-down, DLQ replay, heartbeat/silent worker, event lag) S9 §6, S11
§8 IU Event Contract (refs-only payload) S6 §2.7
§9 KG Feedback Loop (Điều 39 active) S6 §2.8
§10 Usage Evidence Registry S6 §2.9
§12 Old Infrastructure Coverage Matrix (27 rows) User handoff + S12 + codebase trace
§13 Constitution / Law Clause Matrix S9 §3, S7
§14 PG Maximization Map S9 §4
§15 OSS Candidate Strategy với 7 labels (Gate A/B) S9 §5, S13
§16 Điều 34 DRAFT decision path (3 nhánh, không enact, không merge) User custom answer
§17 Acceptance Criteria (13 items + PARTIAL conditions) S6 §4
§18 Agreed Details Completeness Checklist (30 rows) S9 §8
§19 Open Decisions Register (15 items) S9 §9
§20 Forbidden block (binding for Rev2 lifecycle) User handoff

§2.2 CLARIFIED (đã có trong Rev1, được sửa wording / bổ sung binding)

Rev2 § Rev1 wording Rev2 wording Lý do
§5.1 MOW "MOW orchestrates" "MOW = IU Assembly Orchestrator — không duplicate IU content" Patch instruction §2.4
§5.2 MOT "4 vùng UI (HEADER/MOIT/MOUT/HƯỚNG DẪN)" "4 vùng UI render từ ref, không copy; instruction = IU/IU bundle" Patch instruction §2.5
§5.3 MOIT "field_registry + input_form_registry" "field_registry entries link tới IU; direct vs staging = config policy gắn vào form/field/task context" Patch instruction §2.6
§5.4 MOUT "output_table_registry + DOT Function Registry" "Output/reference/report blocks = IU-backed views; report khai báo iu_id source + SQL/DOT function link" Patch instruction §2.6
§6.4 Realtime gateway "Nuxt SSE in-process? hoặc tách microservice?" (open) "Nuxt server route MAY host SSE shell; không đọc trực tiếp outbox tail / LISTEN-NOTIFY; gọi backend gateway abstraction; permission filter backend-side" S9 §7
§6.1 Producer "Event type phải đăng ký trong event_type_registry trước khi emit" + "Producers chỉ produce events; KHÔNG chứa business execution logic" S11
§6.2 Broker "Phân biệt event bus vs job queue" + "Queue không tự chạy script. Queue chỉ schedule/route; chỉ worker mới execute" S11
§6.3 Consumer "ACK/NACK/retry/timeout/idempotency/replay" + "trace_id (W3C shape) + correlation_id + parent_span_id luôn carry; idempotency key bắt buộc" S11 + S13
§11 Boundary "No double ownership" + 6 dòng Expanded matrix với 13 dòng, làm rõ "only NEW concern = 4 Mothers application layer" S9 §3

§2.3 ESCALATED (Rev1 mơ hồ → Rev2 binding)

Rev2 § Trước Sau Lý do
§2 D2.3 "Workflow/task tham chiếu IU" No duplicate text invariant (binding) Build-once-reuse-many
§2 D2.5 "Workflow 2-3 bước, 100+ bước" Uniform assembly primitive — 500-step explainable as 500 IU bricks/bundles (acceptance) User handoff
§7.3 Status text generic 9 states binding với semantic + traffic-light + icon/text User handoff option 1
§9 KG "Knowledge graph law" reference KG feedback loop active (đề xuất add edge / bundle / split / merge / no-action) S6 §2.8
§15 OSS OSS critique rev1 có 31-row matrix nhưng wording "reject" cứng 7 labels với gate state-vocab + config-first; không reject forever S9 §5

§2.4 DEFERRED (Rev1 dự định nhưng push sang Master Design Rev2)

Item Rev2 § ghi defer Đích sau
Step state machine transition table §7.3 Master Design Rev2
executor_class_registry schema §19 OD3 Master Design Rev2
dlq_replay_request schema §19 OD10 Master Design Rev2
idempotency_registry schema §19 OD11 Master Design Rev2
state_machine_registry placement §19 OD9 Master Design Rev2
Generic proposal table vs per-domain §19 OD2 Master Design Rev2
Event schema compatibility mode §19 OD8 Master Design Rev2
IU version policy (pin vs upgrade) §19 OD15 Master Design Rev2
dot_function_registry ownership/naming §19 OD13 Master Design Rev2
Realtime gateway technology pick §19 OD4 Phase 1 review
Temporal/Camunda re-evaluation trigger §19 OD6 Phase 6 review
CDC threshold (Benthos/NATS) §19 OD5 Phase 4+

§2.5 REJECTED / RESHAPED (Rev1 hard claims softened theo Council)

Rev1 claim Rev2 reshape Lý do
"reject pg-boss/Graphile forever" L2 reject_as_core_owner + L5 future_adapter_slot_preserved + L7 not_a_second_SoT S9 §5 (không nói "forever")
"reject Temporal" L2 + L3 + L4 (re-evaluate post-Phase 6) S9 §5
"reject Camunda" L2 + L6 (sandbox/reference for BPMN patterns) S9 §5
"Hasura reject" L2 + L6 S9 §5
"Directus realtime reject" L2 (boundary violation app plane) + L6 (admin diagnostics if approved) S9 §5
"Watermill reject" L3 + L6 S9 §5
"Adopt W3C trace_id later" L1 confirmed_invariant — adopt NOW S13 (memory feedback)

§2.6 KEEP-AS-IS (Rev1 nội dung giữ nguyên)

Item Rev1 § Rev2 §
Business hierarchy 6 tầng §5.1 C4 checklist
JFT definition §5.2 C5
Trigger types (4 loại + AND/OR) §5.3 C6
Scale targets (1M IU / 10k workflow / 100k task / 2..500 step / phút..năm) §11 C12
20 non-negotiable constraints §4 Mapped vào §11 + §13
Live state survey snapshot (61 IU/queue/task/workflow tables) §1 §12 (mở rộng thêm hệ thống cũ)

§3. Reconciliation chi tiết với uploaded sources

§3.1 4 mẹ mở rộng.txt (via S9 reconciliation)

Lesson Rev2 § encoding Trạng thái
4 Mothers vision MOW/MOT/MOIT/MOUT §5 (re-framed quanh IU)
Assembly First candidate strategy §15 (7 labels)
Must-not-miss checklist (4 Mothers / Event 5 / Assembly First / Hierarchy / JFT / Trigger / MOW UI / MOT layout / MOIT / MOUT / Governance UI / Scale / IU compat) §18 Agreed Details Completeness Checklist ✓ (30 rows)
OSS concerns (pg-boss/Graphile/Temporal/Camunda/Airflow/Benthos/NATS/Redis/Hasura/Directus/Watermill) §15 với 7 labels
Next-step governance §0 User Approval Gate + §19 Open Decisions

§3.2 Bắt sự kiện của PG(3).docx (via S9 reconciliation)

Lesson Rev2 § encoding Trạng thái
Event-driven architecture 5 logical layers §6 (Layer 1-5)
Producers chỉ produce, không execute §6.1 + §6.6 row 1 ✓ binding
Event bus ≠ job queue §6.2 + §6.6 row 2 ✓ binding
Workers consume + execute; queue không tự chạy script §6.2 / §6.3 + §6.6 row 3 ✓ binding
Nuxt không connect trực tiếp core queue §6.4 + §6.6 row 4 ✓ binding
Realtime gateway mandatory §6.4 + §6.6 row 5 ✓ binding
DLQ / retry / replay / poison isolation §6.5 + §6.6 row 6 ✓ binding
ACK/NACK / timeout / idempotency / replay là part of consumption §6.3 + §6.6 row 7 ✓ binding
Schema Registry + distributed tracing = governance primitives §6.1 (register-before-emit) + §6.3 (W3C trace_id) + §6.6 row 8 ✓ binding
Governance UI: exceptions / summary counts / concise worker-AI status / drill-down §7.4 + §6.6 row 9 ✓ binding
Industry tools: Benthos / NATS / Hasura / pg-boss / Graphile / Temporal §15 labels (không tool pick) ✓ labels-only

§3.3 Forbidden compliance evidence

Forbidden Rev2 evidence
Không PG mutation Brief có §0 User Approval Gate + §20 Forbidden; chỉ đọc PG state qua memory snapshot
Không Directus mutation Brief KHÔNG yêu cầu Directus write; §12 row 23 đặt Directus boundary read-only/staging
Không Qdrant / vector §12 row 21 giữ vector_sync_enabled=false; brief KHÔNG ingest business Qdrant ở vòng này (KB upload là doc-management, không phải production vector_sync)
Không migration Brief không nhắc bất kỳ migration nào; §19 OD list là Open Decisions, không phải mig task
Không DOT command run Brief tham chiếu DOT catalog nhưng KHÔNG kích hoạt run nào
Không law enactment §16 chỉ decision path; KHÔNG enact Điều 34; KHÔNG draft Điều XX
Không implementation §0 + §20 cấm; brief chỉ document
Không final OSS tool selection §15 chỉ 7 labels, KHÔNG tool pick / version pin / CI step

§4. Verification checklist (Rev2 brief integrity)

# Check Pass
V1 IU-centered doctrine §2 hiện diện và binding
V2 IU brick fields §3 đủ 11 fields theo patch instruction §2.2
V3 IU bundle §4 với 4 sub-rules R4.1-R4.4
V4 4 Mothers §5 re-framed quanh IU (MOW assembles, MOT envelopes, MOIT context-aware, MOUT IU-backed views)
V5 Event 5-layer §6 reconcile checklist §6.6 cover 9 lessons từ Bắt sự kiện của PG(3).docx
V6 UI §7 có Standard + Runtime + 9-state + Governance
V7 9 states với traffic-light + icon + text label đầy đủ
V8 IU Event Contract §8 refs-only payload
V9 KG feedback §9 active proposals
V10 Usage evidence §10 với 8 signal types
V11 No-double-ownership matrix §11 ≥13 dòng
V12 Old Infra Coverage §12 ≥27 dòng (rev1 + 4 mẹ + codebase trace: Directus flows / pg_cron legacy / signal/event_outbox legacy / iu_piece_collection / iu_three_axis_envelope) ✓ (31 rows)
V13 Constitution matrix §13 cover Hiến pháp v4.6.3 + Điều 7/28/30/31/32/33/34/35/37/38/39/45 + vector law
V14 PG Maximization Map §14 cover ≥18 artifacts
V15 OSS labels §15 đúng 7 nhãn + 2 gates
V16 Điều 34 §16 chỉ decision path; 3 nhánh; 4 tiêu chí
V17 Acceptance criteria §17 PASS condition + PARTIAL condition
V18 Completeness checklist §18 ≥30 rows ✓ (36 with MP1-6)
V19 Open Decisions §19 ≥15 items ✓ (15)
V20 Forbidden §20 đầy đủ 9 cấm
V21 500-step assembly acceptance §17 row 13
V22 No duplicate text invariant §2 D2.3
V23 Heartbeat caller (Điều 45 §15.5) §6.3 + §7.4.6
V24 W3C trace_id adopt NOW §6.3 + §15 L1
V25 MOT KHÔNG executor (Điều 45 §11.5) §5.2 + §6.3
V26 MP1 evidence_level column applied
V27 MP2 raw-source wording corrected
V28 MP3 waiting sublabels (facet, not core state)
V29 MP4 a11y traffic-light (WCAG 2.1 AA, color-blind safe, aria-label)
V30 MP5 workflow roll-up principle (red>yellow>green)
V31 MP6 final approval gate line at §21

§5. Open issues to surface to user before Master Design Rev2

(Đây không phải thiết kế; chỉ là điểm cần user/Council quyết trước khi Master Design Rev2.)

  1. OD1 Điều 34 decision — promote / merge / keep-draft. Brief đã framing nhưng cần Council quyết để Master Design Rev2 không vướng.
  2. OD12 Step states above 9 — có nên adopt thêm paused/retrying/escalated/cancelled ngay từ Master Design Rev2 hay không. Brief defer; Master Design có thể đề xuất nhưng cần user nodding.
  3. OD15 IU version policy — pin vs auto-upgrade vs hybrid; ảnh hưởng tới resume-safe long-running workflow (§5.1 MOW).
  4. OD4 Realtime gateway implementation — Nuxt SSE shell vs separate Node gateway vs Centrifugo later. Brief default Nuxt SSE shell calling backend abstraction.
  5. OD2 Generic proposal table vs per-domain — ảnh hưởng tới workflow_change_requests reuse vs tạo bảng mới cho IU/MOT/MOIT/MOUT proposals.
  6. Raw-source audit (MP2-revised) — Council có yêu cầu direct audit raw 4 mẹ mở rộng.txt + Bắt sự kiện của PG(3).docx không? Nếu có → mở vòng document-only riêng để upload 2 raw files vào KB. Nếu không → Rev2 dùng GPT recheck report làm consolidation source là đủ.
  7. Candidate registries survey (MP1-related)field_registry / input_form_registry / output_table_registry / dot_function_registry (Rev2 §12 rows 28-31, evidence_level=candidate_requires_survey) cần PG survey trong Master Design Rev2 trước khi reuse.

§6. Suggested next macro (after user approves Rev2 brief)

IU_4MOTHERS_EVENT_FOUNDATION_MASTER_DESIGN_REV2_DOCUMENT_ONLY_2000X — sản xuất Master Design Rev2 + Step State Machine Registry + OSS Critique Rev2 + Macro Report. Vẫn DOCUMENT ONLY, không production mutation.

Sau Master Design Rev2 được duyệt → mới chuyển sang implementation macro chuỗi IU_POST_CUT_AUTOWIRE_* etc. theo memory roadmap.


§7. File set produced this round

File Size hint Status (rev)
00-requirement-brief-rev2.md ~45 KB revision 2 (MP1–MP6 applied)
01-patch-report.md (this file) ~20 KB revision 2 (MP1–MP6 log appended)

KB upload revision 1 (phiên trước, 2026-05-27): completed cho cả 2 doc qua mcp__claude_ai_Incomex_KB__upload_document để reviewer GPT đọc trực tiếp. KB re-upload revision 2 (phiên này, 2026-05-27 sau MP1–MP6): completed sau khi áp MP1–MP6. Production PG/Directus/business-Qdrant/vector_sync KHÔNG bị chạm (forbidden tuân thủ).


§8. MP1–MP6 patch log (applied 2026-05-27 revision 2)

Source: GPT Council Review knowledge/dev/reports/architecture/iu-4mothers-event-requirement-rev2-gpt-review-2026-05-27.md revision 1, verdict ACCEPT_WITH_MINOR_PATCHES_BEFORE_USER_APPROVAL.

MP Tóm tắt Targeted Rev2 brief sections Status
MP1 Old Infra Coverage Matrix: thêm cột evidence_level (5 levels: verified_live / KB_reported / legacy_trace / candidate_requires_survey / known_gap) cho TẤT CẢ rows; thêm 4 candidate registry rows (field_registry / input_form_registry / output_table_registry / dot_function_registry) với evidence=candidate_requires_survey; thêm GAP G7. §12 (27→31 rows + 5-level taxonomy header) ✓ applied
MP2 Raw-source wording: raw source ĐÃ có qua uploaded files trong phiên rev1 (KHÔNG phải tuyệt đối không truy cập); Rev2 dùng GPT recheck report làm accessible consolidation source; raw upload deferred theo Council request — sẽ làm ở vòng document-only riêng nếu Council yêu cầu direct raw-source audit. header note + §17 PARTIAL conditions + §5 row 6 (this report) ✓ applied
MP3 Waiting sublabels/facets cho UI: waiting_dependency / waiting_human / waiting_external / waiting_time_gate. Ghi rõ đây là facet/UI label, KHÔNG phải core state mới — 9-state floor giữ nguyên. Sublabel share Yellow traffic-light. Schema lưu sublabel defer Master Design. §7.3.6 (new) ✓ applied
MP4 Accessibility cho traffic-light UI: không color-alone; icon + text label + tooltip/short reason bắt buộc; WCAG 2.1 AA contrast (≥4.5:1 text, ≥3:1 icon); color-blind safe palette với shape/icon/pattern bổ sung; high-contrast/dark mode hoạt động; aria-label cho screen reader; palette/icon token declare-by-config trong design-system registry. §7.3.7 (new) ✓ applied
MP5 Workflow status roll-up principle (requirement-level): red>yellow>green; workflow KHÔNG green nếu có mandatory active step red; skipped/not_applicable KHÔNG tính incomplete; optional step không kéo; rules config-driven trong PG registry; transition matrix + edge cases defer Master Design Rev2. §7.2.6 (new) ✓ applied
MP6 Final approval gate line cuối brief: "Next macro may begin only after user explicitly approves this Requirement Rev2 or approves a minor-patch version." §21 end ✓ applied

Reconciliation rà soát toàn bộ (PASS):

Agreed item Vị trí trong Rev2 brief revision 2
IU là trung tâm; workflow 2..500 bước lắp từ IU-backed step hoặc IU bundle §2 D2.1, D2.5, §3, §4, §17 row 13
No duplicate text invariant §2 D2.3
IU version pinning (active workflow pin, future workflow theo policy) §2 D2.6, §5.1, §19 OD15
4 Mothers quanh IU: MOW/MOT/MOIT/MOUT §5
Standard Process View + Runtime Progress View §7.1, §7.2
9-state UI + traffic-light + icon/text §7.3
Governance UI problem-first (summary, exception, DLQ replay/rescue, heartbeat/silent worker, event lag, drill-down) §7.4
Event 5-layer (producer / broker-event-bus / consumer-worker-executor / realtime gateway / DLQ-recovery-governance) §6 (5 sub-layers + §6.6 reconcile checklist)
Queue không tự chạy script; worker mới execute §6.2 + §6.3
Nuxt không đọc core queue/outbox/NOTIFY trực tiếp §6.4
Event payload chỉ mang signal/ref, không body nặng §6.2 + §8 IU Event Contract
ACK/NACK, timeout, idempotency, replay, schema registry, trace_id/correlation_id §6.3 + §8
Old infra coverage §12 (31 rows + evidence_level per MP1)
Constitution / Law Matrix §13
PG Maximization Map §14
OSS strategy chỉ candidate labels, không final tool §15
Điều 34 chỉ decision path §16
Waiting sublabels (facet) §7.3.6 (MP3)
Traffic-light accessibility §7.3.7 (MP4)
Workflow status roll-up principle §7.2.6 (MP5)
Final approval gate §21 (MP6)

End patch report (revision 2 — MP1–MP6 applied).