KB-5EDB
SSOT — P3D IU / Text-as-Code Completed State + Remaining Work
13 min read Revision 1
ssotcompleted-stateremaining-workp3dinformation-unittext-as-code2026-05-10
SSOT — P3D IU / Text-as-Code Completed State + Remaining Work
Date: 2026-05-10 Author: GPT-5.5 Thinking / Incomex Hội đồng AI Basis: GPT audit + Opus matrix + additional KB verification Purpose: Prevent rebuilding already completed work; provide unified state before next roadmap/pack.
0. Verdict
Opus matrix is directionally correct and materially useful, but must be corrected before becoming SSOT.
Major corrections:
tbl_event_outboxis nowpublished, not draft/pending publish.- P3D4C2U / event_outbox display is no longer pending; route
/knowledge/registries/event_outboxis live and filter UI PASS. - Pack 23 P3C2/P3C3/P3C4 are not merely pending prompts; execution reports show PASS. The minimum IU edit/save/policy path is more complete than Opus matrix stated.
- Fixed counts such as collection_registry=166, entity_enrichment=57K+, birth_registry=70K+ should be treated as historical/report counts unless live-verified before use.
- Some items under “laws enacted” must remain evidence-path based; do not rely on memory without reading current law docs.
1. Correct classification rules
- RUNTIME: code/data already executed and verified in PG/Nuxt/Directus. Do not rebuild; only extend/fix.
- DESIGN/CONTRACT: approved or accepted design; implement against it, do not redesign casually.
- PROMPT/READY/PENDING: prompt/design prepared but not yet executed, or spec not uploaded.
- LANDMINE/PENDING: risks or unfinished items that must be hard-boundaried.
2. RUNTIME — already done / do not rebuild
2.1 TAC pipeline
- Text has been cut into information units / logical units.
- PG contains 3 publications / 86 units.
- Round-trip 0 drift achieved.
- Directus collections exposed.
- Nuxt
/knowledge/lawsshows 3 publications. - Core TAC tables exist:
tac_publication,tac_logical_unit,tac_unit_version,tac_publication_member. render_order/ publication assembly exists.- Đ38/P7A segmentation reference exists.
Key evidence:
knowledge/dev/laws/dieu38-trien-khai/reports/gpt-vision-to-reality-and-roadmap-2026-05-01.mdknowledge/dev/laws/dieu38-trien-khai/reports/p10b-*knowledge/dev/laws/dieu38-trien-khai/tham-khao/p7a-segmentation-reference-76-units.md
2.2 Nuxt laws reader
/knowledge/lawslisting exists.- Reader page renders/assembles publication.
- Tree/reader/review/debug design exists with some UI parts deferred.
Key evidence:
knowledge/dev/laws/dieu38-trien-khai/reports/p10d-2b-parallel-tac-laws-screen-2026-04-30.md
2.3 IU native create machinery — Pack 22 COMPLETE
fn_iu_createcanonical writer active.fn_iu_create_plandry-run active.fn_iu_verify_invariantsactive.- IU Creation Gateway enforced.
- Direct INSERT/UPDATE into
information_unit/unit_versionblocked unless canonical writer marker is used. - Gateway README published.
Key evidence:
knowledge/dev/laws/dieu44-trien-khai/reports/22-pack-closure-iu-native-create-and-gateway.mdknowledge/dev/laws/dieu44-trien-khai/readme/iu-create-gateway-readme.md
2.4 IU edit/save machinery — Pack 23 P3B/P3C runtime
Correction to Opus matrix: this is more complete than “prompt pending”.
- P3B schema executed:
unit_edit_draft,unit_edit_comment, policy/config foundations. - P3C1 safe edit draft functions PASS.
- P3C2 apply/wrapper functions PASS:
fn_iu_apply_edit_draft,fn_iu_editdeployed. - P3C3 natural save router PASS:
fn_iu_savedeployed. - P3C4 policy switch + agent context PASS: policy switched to
require_review; agent context pack/report exists.
Key evidence:
knowledge/dev/laws/dieu44-trien-khai/reports/23-p3b-iu-edit-draft-schema-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3c1-iu-edit-draft-safe-functions-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3c2-iu-apply-edit-functions-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3c3-iu-natural-save-router-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3c4-iu-policy-and-agent-context-report.md
2.5 P3D IU notification runtime
- P3D1 PASS: IU notification schema/functions.
- P3D2 PASS: notification triggers + board + per-actor read state.
- Functions include unread/mark-read/notification board behavior.
- Runtime active for limited use.
Key evidence:
knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d1-notification-schema-functions-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/23-p3d2-notification-triggers-report.md
2.6 Universal event_outbox display
Correction to Opus matrix: not draft/pending now.
event_outboxexists as universal/global event substrate.table_registryrowtbl_event_outboxispublished.- Page URL
/knowledge/registries/event_outboxexists. - Permission #1483 uses safe metadata allowlist; unsafe fields denied.
- Label changed: “Phân loại payload” → “Phân loại dữ liệu”.
- Filter UI config PASS.
- Current events are
event_domain=system; noinformation_unitevent yet, so “Thông tin” filter remains deferred.
Key evidence:
registries/table_registry/tbl_event_outboxknowledge/dev/laws/dieu44-trien-khai/reports/p3d4c2u-resume-notification-display-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/p3d4c2x-event-outbox-filter-ui-config-patch-report.mdknowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d4c2x-filter-pass-and-iu-filter-deferred-2026-05-10.md
2.7 Foundation graph/registry/data
universal_edgesexists in CAT-130 with 2199 rows reported.collection_registryand description-policy foundations exist.- H11a/H11b split and description guard work exist by reports.
entity_enrichment,birth_registry,meta_catalogfoundations exist, but fixed counts must be treated as report-time counts unless live-verified.
Key evidence:
registries/meta_catalog/CAT-130knowledge/dev/laws/dieu44-trien-khai/reports/description-policy-option1-runtime-execution-report.mdknowledge/dev/laws/dieu44-trien-khai/reports/dot119-repair-p1-metadata-ddl-seed-report.md
3. DESIGN / CONTRACT — do not casually redesign
- P38-XC / IU profile schema exists.
- IU-0 / UMC 10 elements contract exists as design/standard.
- Đ38 P5 schema draft v0.2 exists as design notation, not necessarily production DDL.
- Đ38 Phụ lục / text-unit governance and segmentation references exist.
- P3D4C0X universal PG-to-outside signal architecture exists as design.
- Vector boundary rule exists: vector sub-chunk must remain within one
logical_unit_id + unit_version_id; vector is projection, not SoT.
Key evidence:
knowledge/dev/laws/dieu44-trien-khai/design/04-information-unit-profile-schema.mdknowledge/dev/laws/dieu44-trien-khai/design/07-iu0-index-and-core.mdknowledge/dev/laws/dieu38-trien-khai/P5-schema-draft-v0-2.mdknowledge/dev/laws/dieu44-trien-khai/design/23-p3d4c0x-universal-event-outbox-notification-architecture.mdknowledge/dev/laws/dieu38-trien-khai/reports/gpt-vision-to-reality-and-roadmap-2026-05-01.md
4. PROMPT / PENDING / NEED DECISION
4.1 P3D requirements/spec 50KB
- Target path
knowledge/dev/laws/dieu44-trien-khai/requirements/p3d-information-unit-text-as-code-requirements-spec.mdis currently NOT_FOUND from GPT check. - Opus claim that spec was written but MCP timeout prevented upload is plausible but content is not verified in Agent Data.
- Required action: recover/retry upload from old Opus session or re-author from verified matrix.
4.2 Some future implementation packs remain pending
- Diff/patch/merge/revert/blame full Git-like ops.
- Full PR/proposal workflow beyond current draft/apply/save foundations.
- Typed-edge vocabulary expansion and impact traversal.
- Test coverage per IU.
- Semantic lint.
- Build/release bundles beyond current render proof.
- Package/module system.
- Vector chunk table/sync proof.
- Metadata enrichment governance for IU.
- IU event emission into universal
event_outboxwithevent_domain='information_unit'.
5. LANDMINE / HARD BOUNDARY
- Do not run old DOT-119 v1 scripts that can clobber
fn_birth_registry_autov2 / no-clobber behavior. - Do not drop or replace
fn_birth_registry_autov2 without explicit reviewed pack. - Do not direct-write into
information_unitorunit_version; use canonical writer path. - Do not rebuild Pack 22 or Pack 23 P3B/P3C runtime from scratch.
- Do not rebuild event_outbox display path; extend only if new requirement exists.
- Do not add “Thông tin” filter until real
event_domain='information_unit'events exist. - Treat historical counts as snapshots; live-verify before using counts as gates.
6. Remaining work — corrected roadmap buckets
Bucket 1 — Recover/chốt spec and completed-state matrix
- Recover/upload P3D requirements/spec 50KB or re-author from this SSOT.
- Create final completed-state matrix with evidence and status.
- Freeze “do-not-rebuild” list.
Bucket 2 — IU canonical contract reconciliation
- Reconcile TAC logical_unit model with IU native machinery (
information_unit/unit_version). - Decide mapping/convergence: TAC units vs IU units, aliases, canonical_address pattern, lifecycle semantics.
- Confirm 16 canonical concepts / UMC / profile fields before more DDL.
Bucket 3 — Git-like text operations
- Extend current create/edit/save/apply base into:
- diff;
- patch hunks;
- merge/conflict;
- revert;
- blame/change attribution.
Bucket 4 — PR/proposal workflow
- Confirm Model D Hybrid / proposal separation.
- Bind Đ32 approval system to IU proposals.
- Add review states, reviewer actors, transitions, audit trail.
Bucket 5 — Parent-child / containment
- Define and implement hierarchy/containment contract.
- Prevent cycles.
- Preserve child identity during parent render/build/vectorization.
Bucket 6 — Typed traceability / impact analysis
- Extend edge type vocab beyond existing types.
- Add traversal/query functions for impact analysis.
- Link laws/designs/process/code/test/report/context.
Bucket 7 — Test coverage + semantic lint
- Unit-level test coverage model.
- Semantic lint for metadata, edge direction, contradictions, approval gaps, vector boundary, release coverage.
Bucket 8 — Build/render/release pipeline
- Generalize current render proof into build artifacts:
- full document;
- process document;
- traceability matrix;
- agent context pack;
- release bundle.
Bucket 9 — Vector boundary and sync
- Implement vector chunk metadata only after IU/version boundary is finalized.
- Enforce one vector chunk belongs to exactly one IU/version.
- Ensure vector remains projection, not SoT.
Bucket 10 — Metadata enrichment governance
- Add confidence, provenance, reviewer, reversibility, and change log for IU metadata enrichment.
- Prevent silent overwrite of authoritative metadata.
Bucket 11 — IU event emission into universal event_outbox
- Emit events for IU created/updated/reviewed/vectorized/enriched/built/released.
- Use
event_domain='information_unit'or governed equivalent. - Only then activate “Thông tin” filter.
Bucket 12 — UI last
- UI follows after data/contracts/events exist.
- Must follow Điều 28/generated/template governance.
7. Corrected percent view
Approximate, not a gate:
- TAC cut/render proof: high completion for pilot scope.
- IU create/edit/save/review foundation: materially more advanced than previously listed.
- Full text-as-code industry standard: still incomplete; major missing pieces are diff/merge/revert/blame, PR workflow, test coverage, typed impact graph, semantic lint, release bundles, vector sync, metadata enrichment, and IU event emission.
Do not use a single percent as authority. Use bucket status and evidence paths.
8. Next action before any new work
- User/GPT accept this corrected SSOT or request edits.
- Recover/upload Opus 50KB spec if possible.
- If unavailable, re-author requirements/spec from this SSOT.
- Only after acceptance, write next directive for Opus/Codex.