Codex Review — Đề bài Miếng thông tin mới theo Lego / PG-first / One-Roof
Codex Review — Đề bài Miếng thông tin mới theo Lego / PG-first / One-Roof
0. Verdict
NEEDS_REVISION_BEFORE_OWNER
Tài liệu đi đúng hướng kiến trúc: bác bỏ IU như một engine độc lập, đồng thời không rơi vào cực đoan “PG rows là đủ”; định vị New IU như một Smart-Brick contract mỏng trên carrier PG/Matrix và dùng governance chung. Tuy nhiên, tài liệu chưa đủ sạch về thẩm quyền để đưa Owner phê duyệt: nó nhiều lần dùng amendment DRAFT như authority đang có hiệu lực, một số nhãn REUSE_AS_IS che mất repair/verification bắt buộc, và còn hai cửa có thể tái sinh island (DOT sub-registry và staging/pilot).
3 câu Tuyên ngôn
- Vĩnh viễn: review yêu cầu sửa gốc bằng authority taxonomy thống nhất, reuse criteria thống nhất và ownership boundary rõ giữa IU contract với IO/checker/promote chung; không sửa từng câu rời rạc.
- Nhầm được không: target phải có nhãn ENACTED / DRAFT-NON-ENACTING / DOCUMENTARY-LIVE-SNAPSHOT ngay tại từng claim/matrix row; mọi reuse chưa current-pass verified phải fail về REPAIR / REFERENCE / UNKNOWN, không được AS_IS.
- 100% tự động: mission này là review read-only, không tạo runtime/manual step. Với implementation tương lai, tài liệu chỉ được mở lane khi checker fail-closed, Atomic Promote, dual-trigger/scanner và One-Roof gates đã có bằng chứng; hiện tại Default = HOLD.
1. Source Coverage
Không có required source nào thiếu trong Agent Data KB. Các path không có trong checkout local, nhưng đã được đọc qua cổng Agent Data theo đúng SSOT.
| Source | Revision/status đã đọc | Mức đọc dùng cho review |
|---|---|---|
| Target: knowledge/dev/laws-new/new-iu/de-bai-mieng-thong-tin-moi-lego.md | AgentData rev1, 35,017 chars, DRAFT/NON-AUTHORIZING | Đọc toàn văn theo chunks 0→35,017 |
| knowledge/dev/ssot/operating-rules.md | v7.58, Active | Đọc qua search_knowledge |
| knowledge/dev/laws/constitution.md | v4.6.3 BAN HÀNH | Đọc qua search_knowledge; dùng bản hiện hành, không viện dẫn v3.9 |
| de-bai-cai-tien.md | rev33, DRAFT | Đọc status và các phần Lego/reuse/anti-bloat liên quan |
| matrix-refactor-implementation-plan.md | rev5, DRAFT/NOT ENACTED | Đọc status, One-Roof, IO/staging/promote boundaries liên quan |
| matrix-refactor-quick-rules.md | rev8, DRAFT | Đọc toàn văn |
| matrix-stamp-governance-addendum.md | rev14, DRAFT/NOT ENACTED | Đọc status và HOLD/checker/Atomic Promote boundaries liên quan |
| F2 reuse-survey packet | rev1, non-authorizing | Đọc inventory/gates/conclusion liên quan IU, candidate, staging |
| F3 reuse-survey packet | rev1, non-authorizing | Đọc IO/Formula/DOT boundaries và conclusion |
| FX reuse-survey packet | AgentData rev2, header rev1, non-authorizing | Đọc One-Roof/Điều 39 boundaries |
| Điều 33 amendment draft | rev1, DRAFT/NON-ENACTING | Đọc authority banner và PG/design-before-DDL direction |
| Điều 36 amendment draft | rev1, DRAFT/NON-ENACTING | Đọc authority banner và CELL/CONS gating |
| Điều 38 v3 amendment draft | rev1, DRAFT/NON-ENACTING | Đọc authority banner, A8/A9/LSL-01 direction |
| L4 Birth Gate amendment draft | rev1, DRAFT/NON-ENACTING | Đọc authority banner và TEMP/canonical-at-promote proposal |
| Collections Usage Handbook | rev11, engineering/read-only evidence | Đọc status và substrate facts liên quan |
| Điều 39 law | v2.3 BAN HÀNH, AgentData rev15 | Đọc enacted status và KG principles liên quan |
| Điều 39 compatibility note | rev1, read-only/non-authorizing | Đọc toàn văn |
| FX execution report | AgentData rev6, PARTIAL/read-only | Đọc runtime/owner/compatibility findings liên quan |
| IU live-audit master roadmap 2026-06-01 | rev1, read-only audit | Đọc status/count evidence liên quan; không coi là current-pass live proof |
| IU KG enrichment readiness 2026-05-28 | rev1, paper-only | Đọc IU-native edge/projection boundary |
| F2 execution report | rev1, read-only/non-authorizing | Đọc candidate-packet and HOLD boundary |
2. High-Level Assessment
Tài liệu đạt phần khó nhất của bài toán:
- Bác bỏ đúng phương án A: không tiếp tục IU như engine/kho/governance riêng.
- Bác bỏ đúng phương án B: PG thuần không tự cung cấp stable logical address, semantic version chain, resolver, context-pack và Text-as-Code semantics.
- Chọn đúng hướng phương án C: carrier thuộc PG/collection/cell; IU chỉ giữ contract/value logic; birth, owner, approval, DOT, KG, scanner dùng hệ chung.
- Có reuse matrix, compatibility matrix, anti-island rules, HOLD gates và đường giao hàng theo lát mỏng.
Nhưng “thin contract” chưa được đóng ranh giới đủ chặt. §3–§4 đưa IO Contract, DOT, rollback và promote state vào “New IU contract”, trong khi các phần khác nói chúng thuộc hệ chung. Nếu không sửa ownership language, implementation có thể biến lớp contract mỏng thành một orchestration engine IU mới.
Mô hình tổng thể đúng; authority model và reuse semantics chưa đủ an toàn cho Owner approval.
3. Strengths
- §2 trả lời cân bằng câu hỏi “PG thay được bao nhiêu”: storage/control-plane về PG, semantic contract còn lại ở IU.
- §3 so sánh ba phương án rõ và bác bỏ cả “old IU kingdom” lẫn “dumb PG row”.
- §9 anti-island bao phủ governance, birth, KG, registry, approval, DOT, axis và storage.
- §0 có banner DRAFT/non-authorizing, cấm mutation và ghi rõ documentary ≠ live proof.
- §11 ghi HOLD-1/HOLD-2, Atomic Promote/checker và Default = HOLD.
- Reuse matrix không cố cứu mọi tài sản cũ; owner_ref được deprecate, design-only engine được defer.
- Điều 39 được hiểu đúng ở cấp nguyên tắc: không graph IU thứ hai, giữ human-approved TBox, provenance/trust, AI đề xuất nhưng không tự ban hành canonical knowledge.
- Đường giao hàng bắt đầu bằng documentary/read-only/design-only trước build, phù hợp fastest-safe-delivery.
4. Issues / Risks
IU-REV-01 — DRAFT amendment bị trình bày như enacted authority
- Severity: major
- Location/phrase: §1.3 “Điều 38 v3.0 / A8 / LSL-01”; “luật đã chọn ‘thin’”; §3 phương án C “đúng Điều 38 A9”; §8 các row Điều 33/36/38/L4 được ghi như compatibility với luật, không nêu NON-ENACTING.
- Why it matters: các amendment Điều 33/36/38/L4 đều ghi rõ DRAFT, NON-ENACTING, không thay luật hiện hành. Banner DRAFT ở đầu target không biến proposal thành authority. Owner có thể hiểu nhầm rằng A8/A9, canonical-at-promote hoặc chain design→checker→Điều32→Điều30 đã có hiệu lực pháp lý.
- Proposed correction: tại mọi citation đổi thành “định hướng đề xuất trong amendment DRAFT…”; thêm cột Authority class cho compatibility matrix: ENACTED / DRAFT-NON-ENACTING / DOCUMENTARY NOTE. Chỉ dùng “luật yêu cầu” khi trỏ đúng văn bản enacted.
IU-REV-02 — Ranh giới thin IU contract và shared execution envelope chưa rõ
- Severity: major
- Location/phrase: §3 “New IU là contract logic: subject… + IO Contract 5-field + trạng thái promote”; §4 “input · output · IO Contract · DOT · rollback · trạng thái promote”; đồng thời nói DOT/checker/stamp/promote dùng hệ chung.
- Why it matters: “tham chiếu shared service” và “sở hữu contract field/state” là hai kiến trúc khác nhau. Câu hiện tại có thể được triển khai thành IU-local orchestration engine.
- Proposed correction: tách ba lớp: (a) IU subject contract chỉ sở hữu stable logical identity, version/head/supersession semantics, carrier reference và semantic payload boundary; (b) cell IO Contract thuộc Matrix/Lego shared contract; (c) checker/stamp/promote/rollback thuộc shared F4/One-Roof execution envelope. IU chỉ giữ foreign reference/verdict reference, không sở hữu registry/workflow.
IU-REV-03 — Nhiều nhãn REUSE_AS_IS không đạt nghĩa “as-is”
- Severity: major
- Location/phrase: §7 các row information_unit, universal_edges, fn_iu_create/fn_iu_enact/fn_iu_apply_edit_draft, lifecycle_status, governance_object_ownership.
- Why it matters: information_unit chứa owner/axis/conformance debt; universal_edges thiếu provenance và suitability chưa proven; write functions có thể bypass shared birth/approval/promote direction; governance_object_ownership có 0 row và còn HELD. Đây không phải reuse nguyên trạng.
- Proposed correction: đổi information_unit và write/lifecycle functions thành REUSE_AFTER_REPAIR hoặc REUSE_WITH_WRAPPER; universal_edges thành REUSE_AFTER_REPAIR/VERIFY_AS_SHARED_TARGET; governance_object_ownership thành TARGET_REFERENCE_BLOCKED, không AS_IS. Định nghĩa rõ AS_IS = current-pass verified + không cần semantic/schema/governance repair.
IU-REV-04 — Cửa “APR-ratify sub-registry” có thể giữ DOT island
- Severity: major
- Location/phrase: §9.6 và §12.2: “gộp dot_iu_command_catalog vào dot_tools … hoặc APR-ratify thành sub-registry chính thức”.
- Why it matters: APR có thể hợp thức hóa authority nhưng không xóa duplication. Quick Rules R19–R20 yêu cầu dùng dot_tools và một mô hình Điều 35; hai writable catalogs vẫn là hai kingdoms.
- Proposed correction: default duy nhất là migrate/map entries vào dot_tools và giữ compatibility view/adapter read-only nếu cần. Bỏ lựa chọn writable sub-registry. Mọi exception phải qua no-new proof và không được có authority/write path độc lập.
IU-REV-05 — Documentary counts vẫn bị phát biểu cục bộ như current live proof
- Severity: major
- Location/phrase: §1.1 heading “đã LIVE, đáng giữ”; “IU cũ đã chạy thật”; “các tài sản LIVE thật sự”; §1.2 “đã được chứng cứ live xác nhận”; nhiều row §5–§7 chỉ ghi LIVE cùng count.
- Why it matters: §0 có caveat đúng, nhưng các claim cục bộ vẫn là câu khẳng định hiện tại. Pass này không query production; audit gốc là snapshot 2026-06-01.
- Proposed correction: đổi mọi claim/count thành “documented LIVE as of 2026-06-01 audit; not re-verified in this pass”. Thêm cột Evidence timestamp / Current-pass verification; không dùng bare LIVE.
IU-REV-06 — Điều 39 bị mô tả quá chắc về substrate và sai loại trạng thái compatibility
- Severity: major
- Location/phrase: §7 “universal_edges … REUSE_AS_IS”; §8 “Điều 39 … conflict (runtime-EMPTY)”; §9.3 liệt kê universal_edges/entity_relations/kg_* như một đích đã chọn.
- Why it matters: Điều 39 v2.3 là enacted nhưng runtime-EMPTY; compatibility note là KEEP+NOTE, non-authorizing. GOV-016/017 và GOV-REUSE-001 còn mở; chưa proven universal_edges/owner/governance_role giữ được minimal governance graph. IU readiness trước đó khuyến nghị IU-native UUID edges + governed read-only projection, không copy sang hidden second SoT.
- Proposed correction: trạng thái nên là “GOAL-ALIGNED; RUNTIME NOT READY / SUBSTRATE UNKNOWN”, không phải conflict với law. Không chọn trước canonical table. Ghi rõ Phase-1 phải verify fact-type, provenance, owner, liveness; rollout từng fact-type/PG-only DOT/stamp; TBox human-approved, ABox AI-proposed; self-learning không chạm TBox/canonical.
IU-REV-07 — Phase 3 pilot được mô tả gần như build plan khi prerequisites vẫn HOLD
- Severity: major
- Location/phrase: §11 “Phase 3 — Một pilot slice… mở ô tạm → tạo candidate IU → gắn IO Contract → DOT check…”; §13 gọi các macro kế tiếp.
- Why it matters: F2 packet cấm chọn pilot slice/detailed implementation trong gate đó; HOLD-1 staging, HOLD-2 checker/Atomic Promote, CONS-002/003, CELL-*, RISK-BYPASS và Owner authorization vẫn mở. Một flow cụ thể có thể bị đọc thành authorization-by-roadmap.
- Proposed correction: đổi Phase 3 thành FUTURE HYPOTHESIS / NOT READY / NO-GO. Fastest-safe path hiện chỉ gồm Phase 0–2 documentary. Pilot chỉ được lập mission riêng sau evidence rằng staging disposable, TTL/cleanup, checker fail-closed, Atomic Promote, approval/owner và rollback gates đều pass; Owner approval không thay thế technical prerequisites.
IU-REV-08 — “Không hy sinh bằng mọi giá” khóa legacy mechanism thay vì invariant
- Severity: minor
- Location/phrase: §10 “Không hy sinh (giữ bằng mọi giá): địa chỉ… version append-only + HEAD, lifecycle FSM + gate fail-closed, render 0-drift, luật ranh giới vector, register-before-emit.”
- Why it matters: mục tiêu cần giữ là properties; implementation cũ có thể chứa island/debt. “Giữ bằng mọi giá” làm yếu reuse-first và có thể buộc giữ function/table cũ.
- Proposed correction: đổi thành “không hy sinh invariant/outcome, nhưng mechanism phải qua reuse/repair/replace decision”. Ví dụ giữ stable address và append-only semantics, không mặc định giữ đúng function/table hiện tại.
5. Reuse Matrix Review
| Asset/group | Target verdict | Review verdict |
|---|---|---|
| information_unit | REUSE_AS_IS | REUSE_AFTER_REPAIR/WRAPPER — còn owner/axis/conformance debt |
| unit_version, canonical_address | REUSE_AS_IS | Reasonable provisionally, nhưng phải pin snapshot và verify immutability/head invariants trước build |
| lifecycle_status + IU write functions | REUSE_AS_IS | REUSE_AFTER_REPAIR/WRAPPER — phải chứng minh không fork shared birth/approval/promote |
| conformance_status | REUSE_AFTER_REPAIR | Reasonable |
| owner_ref | DEPRECATE_OR_AVOID | Correct |
| iu_relation | REUSE_WITH_WRAPPER | Correct direction nếu IU-native edge là source và unified view chỉ là governed projection |
| universal_edges | REUSE_AS_IS | REUSE_AFTER_REPAIR/VERIFY_AS_TARGET — provenance/owner/suitability chưa proven |
| iu_three_axis_envelope | REUSE_AFTER_REPAIR | Prefer REFERENCE/MIGRATE_THEN_DEPRECATE; không “repair in place” thành axis island mới |
| dot_iu_command_catalog/run | REUSE_AFTER_REPAIR | MIGRATE_TO_DOT_TOOLS + compatibility view; không writable sub-registry |
| render/reconstruct | REUSE_WITH_WRAPPER | Reasonable, subject to render-at-promote being proposal until enacted |
| iu_staging_* | REFERENCE_ONLY | Correct; không suy ra quyền tạo staging store mới |
| piece collection/membership | REUSE_WITH_WRAPPER | Reasonable |
| vector sync assets | AS_IS gated | Reasonable only as gated boundary; Qdrant/live state chưa current-pass verified |
| Directus/Nuxt packages | DEFER | Correct |
| IU event types | AS_IS registry + repair wiring | Reasonable, registered ≠ executed/live |
| system_issues/event_outbox | AS_IS + wrapper | Reasonable shared target; issue-type additions vẫn qua registry/DOT gates |
| Text-as-Code engine functions missing/design-only | DEFER | Correct |
| SB/APR scaffold | REFERENCE_ONLY | Correct |
| governance_object_ownership | AS_IS target | TARGET_REFERENCE_BLOCKED, không AS_IS |
| old reports/scale runs | REFERENCE_ONLY | Correct |
6. Compatibility Matrix Review
| Area | Review |
|---|---|
| Matrix Assembly / Lego / IO | Directionally aligned, nhưng toàn track là DRAFT. CONS-002/003 và CELL-* phải hiện ngay trong authority/status column. |
| Stamp / F1–F5 | Directionally aligned; runtime readiness là HOLD. Không được trình bày TEMP→BIRTH/PROMOTE proposal như enacted lifecycle. |
| FX / One-Roof | Strong conceptual alignment. DOT sub-registry exception phải bỏ; ownership substrate vẫn HELD/empty. |
| Điều 33 | Amendment direction aligned; DRAFT không được dùng như current authority. |
| Điều 36 | Unknown đúng vì CELL open; phải ghi rõ amendment NON-ENACTING. |
| Điều 38 | Conceptual alignment mạnh với A8/A9/LSL-01 proposal; đây là lỗi authority lớn nhất vì target gọi proposal là “luật đã chọn”. |
| Điều 39 | Goals aligned; enacted but runtime-empty. Substrate mapping unknown, not law-conflict. Preserve IU-native edge + governed projection option until Phase-1 evidence. |
| L4 Birth Gate | Proposed direction aligned; DRAFT/HOLD-2, chưa có quyền đổi birth semantics. |
| Collections Handbook | Hữu ích làm engineering inventory; không phải authority và count không current-pass verified. |
7. Anti-Island Review
Tài liệu có anti-island coverage tốt nhưng chưa khép kín.
- Governance: không tạo roof IU riêng — PASS về hướng.
- Birth: dùng shared birth/stamp — PASS về hướng, authority HOLD.
- KG: không graph SoT thứ hai — PASS có điều kiện; phải giữ projection-only wording và không chọn universal_edges trước verification.
- Registry: PASS phần lớn.
- Approval: dùng Điều 32/APR — PASS về hướng.
- DOT: FAIL có điều kiện do nhánh APR-ratified writable sub-registry.
- Axis: PARTIAL; “tổng quát hóa iu_three_axis_envelope” phải là migrate-to-shared-model, không nâng cấp đảo cũ.
- Storage: PARTIAL; §9 cấm store mới nhưng §7/§11 vẫn để ngỏ “kho-tạm riêng/staging-schema track”. Candidate packet phải ưu tiên view/projection; store mới chỉ sau no-new proof và mission riêng.
8. Authority / DRAFT vs Enacted Review
Authority order cần được viết lại rõ:
- Enacted authority: Hiến pháp hiện hành; luật enacted như Điều 39 v2.3 và các target-law hiện hành.
- DRAFT/non-enacting direction: de-bai, Matrix plan, quick rules, stamp addendum, amendments Điều 33/36/38/L4.
- Non-authorizing compatibility/decision material: Điều 39 compatibility note, F1–F5/FX packets/reports.
- Documentary evidence: handbook, live-audit 2026-06-01, older IU reports.
- Current live proof: không có trong pass này.
Target hiện trộn lớp 1 và 2 ở §1.3/§3/§8, và đôi lúc trộn lớp 4 với 5 ở §1/§5–§7. Đây là lý do verdict chưa thể APPROVE_FOR_OWNER_REVIEW.
9. Recommended Patch List
- Thêm block “Authority taxonomy” sau §0 và cột Authority/Evidence class vào §7–§8.
- Đổi mọi câu viện dẫn Điều 33/36/38/L4 amendment thành “proposed DRAFT direction”; bỏ “luật đã chọn thin”.
- Tách IU subject contract khỏi shared IO Contract và shared checker/stamp/promote envelope.
- Sửa các reuse verdict theo §5 của review này; định nghĩa AS_IS chặt.
- Bỏ lựa chọn writable DOT sub-registry; chỉ migrate-to-dot_tools + compatibility projection.
- Đổi bare LIVE/count thành “documentary snapshot as of 2026-06-01, not re-verified”.
- Viết lại Điều 39 row thành GOAL-ALIGNED / RUNTIME-NOT-READY / SUBSTRATE-UNKNOWN; thêm KEEP+NOTE và projection-only caveat.
- Đánh dấu Phase 3 NOT READY/NO-GO; fastest-safe path hiện dừng ở documentary/design-only.
- Đổi “không hy sinh mechanism” thành “không hy sinh invariant”.
- Chạy lại self-review chống authority leakage và anti-island sau patch; không implementation.
10. Final Recommendation
GPT có thể dùng tài liệu cùng review này để thảo luận hướng kiến trúc, nhưng Owner không nên approve target ở trạng thái hiện tại. Target cần patch trước Owner decision vì các issue IU-REV-01, 02, 03, 04, 06 và 07 có thể thay đổi phạm vi authority hoặc tạo lại local kingdom.
Sau khi áp dụng patch list, expected verdict là APPROVE_WITH_PATCHES hoặc APPROVE_FOR_OWNER_REVIEW, tùy việc authority matrix và reuse matrix đã được sửa đầy đủ hay chưa.
Không implementation, không live apply, không approval/enactment, không self-approval. Không production verification vì mission review-only và không deploy. OR/TD/handoff không cập nhật: mission chỉ cho phép đúng một review report, không thay đổi operating rules hay technical debt registry.
11. Evidence theo quy trình 0→6
- Bước 0 — nền tảng: đã đọc incomex-rules 36 mục, OR v7.58, Hiến pháp hiện hành v4.6.3; áp dụng SSOT, Assembly First, không chắc = dừng/verify.
- Bước 1 — nhận việc: xác nhận một mission review-only; target đọc toàn văn 35,017 chars qua Agent Data.
- Bước 2 — nghĩ trước: mục tiêu là kiểm tra fit-for-Owner; phương pháp là authority/reuse/compatibility/anti-island audit; điều kiện cần đủ cho review documentary, không đủ cho build; roadmap build giữ HOLD.
- Bước 3 — code: N/A — không code, không schema, không PG/Directus/Qdrant/Nuxt/DOT mutation.
- Bước 4 — hai mũ/deploy: N/A — không PR/merge/deploy trong review mission.
- Bước 5 — production verify: N/A — không deploy; không được biến documentary snapshot thành live proof.
- Bước 6 — report: chỉ tạo report này tại path được yêu cầu; evidence và proposed corrections được ghi theo từng issue.