KB-6B88 rev 2

IU 4-Mothers Master Design Rev2 — Macro Report (PASS 2026-05-27)

22 min read Revision 2
reportmaster-design-rev2macro-passiu-centered4-mothersevent-foundationforbidden-compliancedocument-only2026-05-27

Master Design Rev2 — Macro Report

Path: knowledge/dev/design/v0.6-iu-4mothers-event-foundation-rev2/07-master-design-rev2-report.md Macro: IU_4MOTHERS_EVENT_FOUNDATION_MASTER_DESIGN_REV2_DOCUMENT_ONLY_2000X Status: PASS (document only). Date: 2026-05-27 Trigger: User message 2026-05-27 — "duyệt Requirement Rev2 MP1–MP6" + full macro prompt body — explicit approval of Requirement Rev2 (Rev2 brief §21 MP6 final approval gate) AND launch of Master Design Rev2 macro.


§1. Final status

MASTER_DESIGN_REV2_DOCUMENT_ONLY_PASS_2026_05_27 — revision 2 (DOC-ONLY patch pass; see §13 patch log MP-D1..MP-D10).

All 8 workstreams from the macro prompt are landed in the 7 design documents listed below. Every Rev2 brief section (§0..§21 + MP1–MP6) has a design landing site verified by the traceability matrix. No production mutation occurred. Open Decisions OD1..OD15 are each resolved (kept / refined / deferred). Phase 0..7 sequencing is paper-only.

Revision 2 (2026-05-27, document-only): GPT reviewer verdict was ACCEPT_WITH_MINOR_PATCHES_BEFORE_DESIGN_APPROVAL. Ten minor patches MP-D1..MP-D10 were applied to clarify wording without changing design intent. No design re-architecture, no PG mutation, no Directus mutation, no Qdrant/vector write, no migration, no DOT command run, no law enactment, no implementation, no final OSS tool selection. See §13 below for patch log.

Caveats (these are not failures; they are expected gates carried by Rev2 brief itself):

  • OD1 (Điều 34 promote/merge/keep-draft) is deferred to Council — design proceeds independently and does not treat Điều 34 as authority (MP-D10 makes this explicit).
  • G7 candidate registry survey (field_registry, input_form_registry, output_table_registry, dot_function_registry) is required before Phase 1 — a separate document-only survey macro is the next step (06-open-decisions-and-readiness.md §S16; MP-D7 sentinel).
  • Raw-source audit of 4 mẹ mở rộng.txt + Bắt sự kiện của PG(3).docx is optional per Council demand (06-… §S17).

§2. Document paths + revisions

Location: /Users/nmhuyen/knowledge/dev/design/v0.6-iu-4mothers-event-foundation-rev2/. Revision 1 = initial PASS macro. Revision 2 = MP-D1..MP-D10 document-only patches (this report §13). Files touched at revision 2: 00, 02, 03, 04, 06, 07; files unchanged (still rev 1): 01, 05.

# Path Workstream Revision
0 00-master-design-rev2.md Master integration 2
1 01-requirement-traceability-matrix.md WS1 — Requirement Traceability 1
2 02-step-state-machine-and-workflow-ui-design.md WS4 — State machine + Workflow UI 2
3 03-event-5layer-realtime-dlq-design.md WS5 — Event 5-layer + Realtime + DLQ 2
4 04-iu-centered-4mothers-binding-design.md WS2 + WS3 — IU master + 4 Mothers binding 2
5 05-oss-candidate-strategy-rev2.md WS7 — OSS strategy 1
6 06-open-decisions-and-readiness.md WS8 — Open decisions + readiness 2
7 07-master-design-rev2-report.md Macro report 2

§3. Workstream landing summary

WS Topic Landed in
WS1 Requirement Traceability (every Rev2 § → design + law + PG artifact + reuse + gap + sentinel) 01-… §§1-19
WS2 IU-Centered Master Architecture (IU brick, bundle, version pinning, doctrine) 04-… §§1-5
WS3 4 Mothers Binding (MOW/MOT/MOIT/MOUT around IU, reuse existing tables) 04-… §4
WS4 Step/Task State Machine + Workflow UI (9-state floor, waiting facets, transitions, roll-up, a11y, long-workflow, governance UI) 02-… §§2-8
WS5 Event 5-Layer + Realtime + DLQ (producers, broker/queue split, executor class, idempotency, heartbeat, realtime gateway, DLQ replay, schema compat, usage evidence) 03-… §§3-9
WS6 PG Maximization + Existing Infrastructure Reuse (covered transversally) 01-… §11 + §13 + 00-… §10
WS7 OSS Candidate Strategy Rev2 (7 labels + Gate A/B + 14 tool verdicts) 05-… §§1-5
WS8 Open Decisions + Implementation Readiness (OD1..OD15 + extension registries + Phase 0..7 sequencing) 06-… §§S1-S20

§4. Requirement traceability summary

  • Rev2 brief sections covered (01-…):
    • §2 IU doctrine (6 fields) → 01-… §1.
    • §3 IU brick (11 fields + boundary) → 01-… §2.
    • §4 IU bundle (R4.1-R4.4) → 01-… §3.
    • §5 4 Mothers (MOW/MOT/MOIT/MOUT) → 01-… §4.
    • §6 Event 5-layer (6 sub-sections + reconcile checklist) → 01-… §5.
    • §7 UI (Standard/Runtime/9-state/waiting facets MP3/a11y MP4/governance UI/roll-up MP5) → 01-… §6.
    • §8 IU Event Contract (5 sub-rules) → 01-… §7.
    • §9 KG Feedback (propose-only) → 01-… §8.
    • §10 Usage Evidence (8 signals) → 01-… §9.
    • §11 No-Double-Ownership (14 rows) → 01-… §10.
    • §12 Old Infrastructure Coverage (31 rows + 5-level taxonomy) → 01-… §11.
    • §13 Constitution / Law Matrix → 01-… §12.
    • §14 PG Maximization Map (≥20 artifacts) → 01-… §13.
    • §15 OSS Strategy (7 labels) → 01-… §14 + 05-… §§3-4.
    • §16 Điều 34 decision path → 01-… §15 + 06-… §S1.
    • §17 Acceptance Criteria (19 PASS items incl. MP1..MP6) → 01-… §16 + 00-… §11.
    • §18 Completeness Checklist (36 rows) → 01-… §16 (inherited).
    • §19 Open Decisions Register (OD1..OD15) → 01-… §17 + 06-… §§S1-S15.
    • §20 Forbidden block → 01-… §18 + 00-… §12.
    • §21 MP6 final approval gate → triggered this macro; honored.

Every Rev2 brief PASS item (19) and PARTIAL condition (raw-source audit + candidate registry survey) is captured with a corresponding design row / gate.


§5. Law / no-double-ownership summary

Boundary preservation matrix (mirrors Rev2 §11):

Concern Owner Design relation
Queue / event core / executor boundary / state machine ≥9 / heartbeat caller Điều 45 v1.0 consume / call only; never redefine
IU axis / compose / split / merge / SQL link / structure ops Điều 38 + Điều 39 reference / bind only
Approval quorum Điều 32 call API only; MOT/MOW do not own approval
DOT lifecycle Điều 35 v5.2 DOT-pair for every mutation
UI render shell Điều 28 / S178 implement only as render
4-DB / 3-layer Điều 33 v2.1 route Nuxt → backend gateway → PG/Directus
Birth registry Điều 0-G register event_type / executor_class / state / IU
Governance org Điều 37 v3.3 same UI / backend filter
Reversibility Điều 30 every extension has rollback
Integrity / audit Điều 31 v1.2 every binding has audit row
Assembly First Điều 7 OSS as adapter only
4 Mothers application layer Future Điều XX only NEW concern owned by this design (and referenced as "future framework law" — not enacted in this macro)
Workflow law decision path Điều 34 DRAFT decision-path only (06-… §S1; MP-D10 sequencing)

Sentinel: no design WS redefines a law-owned concern; Điều 34 cited zero times as authority.


§6. Existing infrastructure reuse summary

Reuse-first pattern: where Rev2 §12 has verified_live rows, design extends with columns / runtime envelope rather than creating new tables. New extensions are paper-only.

Old infra (verified_live) Rev2 §12 row Design treatment
information_unit + axes + iu_three_axis_envelope 1, 27 IU brick fields anchor (04-… §3.1)
iu_version 1 Version pin substrate (04-… §5)
IU compose ops 2 MOW step assembly (04-… §4.1)
iu_metadata_tag + registry 7 Domain governance (04-… §6)
iu_lifecycle_log 8 Audit ledger (04-… §6)
event_outbox (~140k+ rows) 9 Canonical ledger (03-… §3)
event_type_registry 10 Register-before-emit substrate (03-… §3.1)
event_pending / event_read / event_subscription 11 Event bus (03-… §4)
job_queue / job_dead_letter / queue_heartbeat 12 Job queue + DLQ + heartbeat (03-… §§4-5)
cut_request + transition 13 Cut pipeline producer (03-… §3.2)
dot_iu_command_catalog + dot_iu_command_run (col mutating) 14, 20 DOT executor class (03-… §5)
dot_config runtime gates 15 Gate respect (00-… §10)
workflows / workflow_steps / workflow_step_relations 16 MOW substrate (04-… §4.1)
workflow_change_requests 17 Proposal mode (02-… §8); NO new sibling table for workflow proposals
workflow_categories 18 Classification (04-… §4.1)
tasks / task_checkpoints / task_comments 19 MOT substrate (04-… §4.2)
iu_route_* + iu_qdrant_collection_registry + iu_vector_sync_point 21 Vector projection only — no cross-IU pollution (03-… §3.4 + 04-… §3.6); iu_vector_sync_enabled=false respected
iu_notification_event 22 Notification executor (03-… §5.7)
Directus collections + legacy flows 23 Boundary: API/admin/staging only (04-… §4.5)
pg_cron legacy 24 Scheduled trigger producer, not queue (03-… §3.5)
iu_piece_collection / iu_piece_membership / iu_collection_template_* 26 Bundle substrate (04-… §3.7)
iu_sql_link 5 MOUT output binding (04-… §4.4)
fn_iu_post_cut_axis_materialize (exists, not autowired) 6 Phase 0 closes autowire (G2; 06-… §S19)

candidate_requires_survey rows (28-31) gated by 06-… §S16. Phase-1 design depends on no CRS row until survey returns VL. MP-D7 stricter form applies (no executable artifact references the four CRS names by literal until VL or shape-adapter).

legacy_trace rows (23, 24, 25) bounded — not extended into MOW/MOT runtime.


§7. Open gaps

Tracked in 06-open-decisions-and-readiness.md §S19:

Gap Closes at Acceptance
G1 review_decision_id for IU split/merge Phase 0 All IU split/merge ops carry review_decision_id
G2 fn_iu_post_cut_axis_materialize autowire into fn_cut_complete Phase 0 Autowired per memory roadmap
G3 executor_class_registry ownership boundary Phase 1 Table exists with executor_kind + mutating + heartbeat_caller_fn
G4 dlq_replay_request ledger Phase 1 Schema + Điều 32 approval ID FK
G5 idempotency_registry schema Phase 1 Per-namespace keys
G6 Step state machine registry placement Phase 1 state_machine_registry tables exist
G7 Candidate registry survey (4 registries) Survey macro before Phase 1 All 4 either VL or shape-adapted (MP-D7 strict form)
Rev2 §10 usage-evidence schema Phase 2 iu_usage_evidence populated by 8-signal functions

Per 06-… §S20 sequencing:

Immediate next: IU_4MOTHERS_CANDIDATE_REGISTRY_SURVEY_DOCUMENT_ONLY_*X

  • Survey field_registry / input_form_registry / output_table_registry / dot_function_registry via MCP read-only (memory feedback-mcp-query-pg-is-context-pack-readonly-no-phase3-writes).
  • Produce 08-candidate-registry-survey.md paper report.
  • Decide CRS → VL or shape-adapt (per MP-D7 gate).

Then Phase 0 macros (in any order; each separate macro):

  • IU_REVIEW_DECISION_ID_FOR_SPLIT_MERGE_PHASE0_*X — close G1.
  • IU_POST_CUT_AXIS_MATERIALIZE_AUTOWIRE_PHASE0_*X — close G2.

Council parallel: Council Round 1 for OD1 (Điều 34 decision). Per MP-D10, Phase 0 macros above proceed regardless of OD1 outcome.

Optional document-only macro (if Council demands): IU_4MOTHERS_RAW_SOURCE_UPLOAD_DOCUMENT_ONLY_*X — upload 4 mẹ mở rộng.txt + Bắt sự kiện của PG(3).docx raw files into KB; this design re-verifies Rev2 §6.6 reconciliation against raw text.

Then Phase 1 macros — substrate extensions per 06-… §S20.2 (each a separate macro with its own forbidden / authority pack). Phase 1 macros that would draft law text MUST follow MP-D10 (a) wait on OD1 OR (b) declare future Điều XX boundary explicitly.


§9. Forbidden compliance statement (explicit, binding)

Per Rev2 §20 + macro authority pack — VERIFIED (revision 2 same as revision 1):

Forbidden Compliance evidence
No PG mutation Zero INSERT / UPDATE / DELETE against production PG via any channel this macro. No mcp__claude_ai_Incomex_VPS__query_pg. No SSH writes.
No Directus mutation Zero Directus collection writes via this macro.
No business Qdrant / vector write or reindex Zero iu_vector_* / iu_qdrant_collection_registry / iu_vector_sync_point writes. iu_vector_sync_enabled=false gate respected. (KB-doc upload to Incomex_KB is the same governance channel used by Rev2 brief revisions 1 and 2 per 01-patch-report.md §7; doc-RAG layer ≠ business Qdrant.)
No migration Zero new migration files; existing migrations referenced only for context.
No DOT command run Zero dot_iu_command_run insert via this macro.
No law enactment / drafting Điều XX referenced as future framework only; Điều 34 only as decision path; no clause text drafted. MP-D10 codifies the rule for any future Phase 1 law work.
No implementation macro Phase 0..7 in 06-… §S20 is paper-only; no implementation triggered.
No UI deployment No Nuxt / Directus deploy.
No final OSS tool selection 05-… strictly labels-only; zero version numbers / CI steps / dockerfile lines.
No direct raw SQL apply Zero SQL apply.
No dot_config gate change Gate snapshot 2026-05-27 (job_substrate=false, composer=true, vector_sync=false, heartbeat=true, dlq_replay=false) respected.

Sentinel grep across the 8 documents — zero version numbers (e.g. "v1.2.3"), zero CI step keywords (e.g. "github actions", "gitlab-ci"), zero dockerfile syntax, zero apt-get / pip install / npm install lines. PASS.


§10. Acceptance against Rev2 brief §17

Rev2 §17 PASS item Verified in this design
1. IU-centered doctrine §2 binding 04-… §2 + 00-… §§3 (inv 1, 2), 4
2. IU brick fields §3 + bundle §4 04-… §3
3. 4 Mothers §5 re-framed around IU 04-… §4
4. Event 5-layer §6 reconciled w/ Bắt sự kiện của PG(3).docx checklist §6.6 03-… §10
5. UI §7 Standard + Runtime + 9-state + Governance 02-… §§3, 6, 7
6. IU Event Contract §8 + KG §9 + Usage Evidence §10 03-… §3.3 + 04-… §3.5 + 03-… §9
7. No-double-ownership §11 + Constitution §13 00-… §3 inv 4 + 01-… §§10-12 + 04-… §4.6
8. Old Infra Coverage §12 ≥27 (actually 31) 01-… §11
9. PG Maximization §14 00-… §10 + 01-… §13
10. OSS labels §15 7-set; no tool pick 05-… §§1-4
11. Điều 34 §16 decision path only 06-… §S1 (MP-D10 explicit sequencing)
12. Forbidden §20 intact 00-… §12 + this report §9
13. 500-step assembly acceptance §17 row 13 04-… §2.5 + §3.4
14. MP1 evidence_level + 4 candidate registry rows 01-… §11 + 06-… §S16 (MP-D7 strict form)
15. MP2 raw-source wording 06-… §S17
16. MP3 waiting sublabels facet (not core state) 02-… §3.3
17. MP4 a11y traffic-light 02-… §3.5
18. MP5 workflow roll-up principle 02-… §5
19. MP6 final approval gate this macro launched per §21 binding

All 19 PASS items satisfied.


§11. Reviewer access

All 8 documents are at /Users/nmhuyen/knowledge/dev/design/v0.6-iu-4mothers-event-foundation-rev2/ — readable by GPT reviewer the same way the Rev2 brief is (same local path pattern). KB upload to Incomex_KB executed by this macro; see §12 for revision 2 upload verification.

KB-upload verification was performed via mcp__claude_ai_Incomex_KB__update_document for the 6 patched files; results captured in §12 below.


§12. KB upload verification (revision 2)

KB path mirrors local path: knowledge/dev/design/v0.6-iu-4mothers-event-foundation-rev2/<file>.md.

Path Revision (post-upload)
…/00-master-design-rev2.md 2
…/01-requirement-traceability-matrix.md 1 (not patched)
…/02-step-state-machine-and-workflow-ui-design.md 2
…/03-event-5layer-realtime-dlq-design.md 2
…/04-iu-centered-4mothers-binding-design.md 2
…/05-oss-candidate-strategy-rev2.md 1 (not patched)
…/06-open-decisions-and-readiness.md 2
…/07-master-design-rev2-report.md 2

Upload channel: mcp__claude_ai_Incomex_KB__update_document. Same governance channel as Rev2 brief revisions 1 and 2 (per 01-patch-report.md §7 precedent). KB-doc layer is independent of business Qdrant (iu_vector_*); iu_vector_sync_enabled=false gate untouched.


§13. Revision 2 patch log — MP-D1..MP-D10 (document-only)

Trigger: GPT reviewer read the 6 core files (00, 02, 03, 04, 06, 07) directly and returned verdict ACCEPT_WITH_MINOR_PATCHES_BEFORE_DESIGN_APPROVAL. Ten minor patches applied as document-only wording fixes — no design rework, no production mutation. Date: 2026-05-27.

ID Topic Files patched Summary
MP-D1 W3C trace context wording 00 §3 inv 8 + §8; 03 §3.3 envelope + §5.6 trace_id is 32 hex; parent_span_id 16 hex; trace_flags 2 hex; traceparent = "00-<trace_id>-<parent_span_id>-<trace_flags>". Never assign full traceparent string to trace_id. Envelope example fixed; field list extended with trace_flags.
MP-D2 completed → in_progress semantics 02 §4 T8/T8r/T12/T12r + post-table notes T8r and T12r renamed to reopen_for_correction. Requires Điều 32 approval + correction_reason vocab + prior_completed_audit row + original_output_snapshot. Reopen is additive — never deletes the prior completion record.
MP-D3 Overdue → completed audit preservation 02 §4 T7 + post-table notes T7 persists completed_after_deadline=true, overdue_first_at, sla_breach_duration on step_run and in emitted step.completed event. Historical overdue mark retained in state history. SLA breach / audit not erased.
MP-D4 blocked severity escalation 02 §3.1 row 5 + post-table MP-D4 block Default token stays yellow_dark. Presentation escalates to red on threshold time / critical path / deadline breached / manual escalation. Core state_code unchanged; UI/roll-up consult fn_step_blocked_severity.
MP-D5 Derived states posture 02 §4.5 + 06 §S12 paused + cancelled are extension states above the 9-state floor — they do NOT replace any floor code. Every adapter/tool must still support all 9 floor codes; derived states declare floor_equivalent for mechanical down-mapping.
MP-D6 render_iu_body permission / cache / audit 04 §2.3 Added pre-render checks (iu_version_exists, governance_state_allowed, permission_filter_backend, context_scope_allowed) with structured refusal codes. Audit event iu.rendered mandatory; cache key includes (iu_unit_id, iu_version_id, surface, permission_scope_hash). Notification render uses recipient-scope permission, never leaks body beyond recipient access.
MP-D7 Candidate registry survey sentinel 06 §S16 (with cross-refs to 04 §§4.3-4.4 + 00 §10 + §13) No implementation may reference field_registry, input_form_registry, output_table_registry, dot_function_registry by name until Candidate Registry Survey marks each verified_live OR a Điều-32-approved shape-adapter is registered. Paper-only references in design docs allowed; executable artifacts gated.
MP-D8 Event payload policy 03 §3.3 Refined sentinel: max payload size configurable per event_type (dot_config event_payload.max_size_bytes.*, default 4 KB); forbidden keys (body_text, instruction_text, payload_blob, iu_body) enforced as deny-list; allowlist per event_type_registry.schema_jsonb; unknown keys rejected. Acceptance row added.
MP-D9 AI/worker concise summary evidence rule 02 §7.3 Summaries MUST carry source_event_count (≥1), time_window, generated_by, confidence, source_event_refs. MUST expose drill-down to raw evidence. MUST NOT auto-resolve a problem without a corresponding source *.resolved/*.recovered event. Low-confidence AI summaries flagged, no auto-resolution.
MP-D10 Điều 34 sequencing 06 §S1 Explicit: Master Design Rev2 does NOT depend on Điều 34. Phase 0 may proceed (IU-side gaps only). Phase 1 law/application-workflow extraction MUST EITHER wait on OD1 OR proceed under explicitly-named future Điều XX boundary. Implementation-layer Phase 1 (substrate registries, gateway, etc.) is not gated by OD1.

Revision-2 forbidden compliance (same set as revision 1): Zero PG mutation, zero Directus mutation, zero Qdrant/vector write, zero migration, zero DOT command run, zero law enactment, zero implementation, zero UI deployment, zero final OSS tool selection, zero dot_config gate change, zero direct raw SQL apply.

Patch scope sentinel: Every MP-D1..MP-D10 patch is wording / sentinel / explicit-binding only; none introduces a new architectural component, none redefines a law boundary, none modifies the Phase 0..7 sequencing in 06-… §S20. The reviewer-flagged ambiguities are now resolved at document level; design approval can proceed.


End macro report.