P11E — Checker Proof Design
P11E — Checker Proof Design (P11E-A POLISH)
Trạng thái: P11E-A POLISH (uploaded) | Phiên: S190+ (2026-05-02) Stage: Logical Proof Design only — runtime proof bằng data thật defer Pilot Tier 1 Path:
knowledge/dev/laws/dieu38-trien-khai/closure/p11e-checker-proof-design.mdPhụ thuộc: P11A inventory rev 1 + P38-XC final rev 1 + P44-3 Profile Registry rev 1 + P44-4A Relation Edge Conformance rev 1 + P44-5A Update Mechanism rev 1 + P11C closure note rev 1 + P11D-A polish final rev 1 + P6 Checker/DOT v0.2 (precedent) Workflow: outline PASS → full draft S190 → P11E-A polish (uploaded) → P11 proof phase đầy đủ P11E-A polish (S190+ 2026-05-02) áp dụng 6 chỉnh GPT review + 7 trả lời Q11-Q17 + 2 bổ sung Opus: (1) đổichecker_status→checker_run_statusxuyên suốt; (2) namingAP-CHECKER-C{group}-{TYPE}-{SEQ}(AP = Analysis Proof, KHÔNG phải DOT thật, KHÔNG liên quan APR Đ32) — tách hoàn toàn với P6 naming; (3) thêm §4.5 Checker outcome truth table 4 case + note per-claim level; (4) tách C2 thành C2a Legal Phase 1 + C2b Non-legal (profile/design-doc/object) defer; (5) annotate "NON-NORMATIVE EXAMPLE" mọi schema/registry sketch; (6) chốt path uploadclosure/.
§0. Tóm tắt 5 dòng cốt lõi
- P11E = Checker Proof Design ở tầng logical — chứng minh về mặt thiết kế rằng các miếng thông tin có thể tự phát hiện drift/sai lệch khi (a) số liệu thay đổi, (b) version refs thay đổi, (c) relation edges gãy, (d) text-code/config/PG binding lệch. Không phải runtime proof (defer Pilot Tier 1).
- 4 nhóm checker C1-C4 với naming
AP-CHECKER-C{group}-{TYPE}-{SEQ}(proof-layer prefix, KHÔNG phải DOT thật): C1 Numeric (a fact + b threshold) / C2 Version (a Legal Phase 1 + b Non-legal defer) / C3 Information-unit relation consistency wrapper (primary owner P44-5A) / C4 Text Binding 3 sub-scope (C4a Config + C4b PG + C4c Code). - Severity 4 mức P6 (BLOCK/ERROR/WARN/INFO) — runtime drift dùng ERROR/WARN/INFO; BLOCK chỉ pre-commit gate. Dimension thứ 2
checker_run_status(ran_clean / ran_with_drift / not_ready / error_running) tách NOT_READY khỏi severity scale. - Readiness contract general principle: No extracted metadata →
checker_run_status='not_ready'+severity='INFO', NOT FAIL. Truth table 4 case clear NOT_READY ≠ drift thật. - Boundary nghiêm: KHÔNG SQL thật / KHÔNG DDL / KHÔNG code / KHÔNG mở P44-6 / KHÔNG execute audit / KHÔNG đặt tên DOT thật / mọi schema sketch là NON-NORMATIVE EXAMPLE. Sau P11E: P11 proof phase đầy đủ. P44-6 + Pilot defer Đ44 enacted v1.0.
§1. P11E là gì + boundary
§1.1 Mục tiêu
P11E = Checker Proof Design cho TAC Information Unit + extension cho mọi unit_kind.
Trả lời câu hỏi thiết kế:
"Nếu các
information_unitcó metadata extraction (numeric_claims / version_refs / topic_labels / code_bindings / config_bindings / pg_object_bindings) trongcontent_profileJSONB + relation edges trong universal_edges (SSOT), liệu có thể thiết kế checker layer phát hiện drift khi: (a) số liệu thay đổi, (b) version refs lệch, (c) relation edges gãy, (d) text-binding mismatch?"
P11E chứng minh về mặt thiết kế — bằng 4 checker catalog logical + pipeline + readiness matrix + truth table — rằng câu trả lời là CÓ trong khuôn khổ hiện hữu. Runtime proof bằng data thật defer Pilot Tier 1.
§1.2 P11E LÀM (13 việc)
| # | Việc | Section |
|---|---|---|
| 1 | Inputs inherited (P11A + P38-XC + P44-3/4A/5A + P11C/D + P6 precedent) | §2 |
| 2 | Severity model kế thừa P6 4 mức + scope rule runtime ERROR/WARN/INFO; BLOCK pre-commit only | §3 |
| 3 | Checker readiness contract — general principle "No metadata → NOT_READY/INFO, not FAIL" + dimension thứ 2 checker_run_status + outcome truth table |
§4 |
| 4 | Naming convention AP-CHECKER-C{group}-{TYPE}-{SEQ} — proof-layer prefix, tách với P6 + DOT thật |
§5 (header) |
| 5 | Catalog C1 Numeric (fact + threshold sub-groups) | §5.1 |
| 6 | Catalog C2 Version (a Legal Phase 1 + b Non-legal defer) | §5.2 |
| 7 | Catalog C3 Information-unit relation consistency wrapper (relation + composition orphan; P44-5A primary owner) | §5.3 |
| 8 | Catalog C4 Text Binding 3 sub-scope (C4a Config + C4b PG + C4c Code) | §5.4 |
| 9 | Pipeline 6 step + auto-fix policy align P44-5A | §6 |
| 10 | Mapping checker ↔ metadata fields | §7 |
| 11 | Checker Readiness Matrix | §8 |
| 12 | OPEN/TD + Risk/Conflict check | §9 + §10 |
| 13 | Scope recap + Roadmap + Self-audit + AP-CLOSE | §11-§14 |
§1.3 P11E KHÔNG LÀM (10 guardrails)
- KHÔNG SQL thật — chỉ logical query pattern.
- KHÔNG DDL — không tạo schema mới (numeric claim vocab, source_of_truth registry — defer P44-6).
- KHÔNG code — không trigger function, không cron job, không Nuxt component.
- KHÔNG execute audit/query trên production (kể cả read-only).
- KHÔNG mở P44-6 Implementation Realization (defer Đ44 enacted v1.0 + APR cấp high).
- KHÔNG sửa P38-XC, P44-3/4A/5A, P11A/C/D, P6, Đ22, Đ35, Đ4, Đ0-B.
- KHÔNG đặt tên DOT thật — chỉ Role: prefix cho recurring + Procedure: prefix cho one-shot. AP-CHECKER- prefix là proof-layer naming, KHÔNG phải DOT thật, KHÔNG liên quan APR Đ32.*
- KHÔNG claim runtime proof bằng data thật — wording "Logical Proof Design" xuyên suốt.
- KHÔNG mở rộng sang Đ39 KG implementation / Qdrant / Đ34 BPMN / Directus UI / Nuxt UI.
- KHÔNG hardcode threshold số / schedule cụ thể / DOT name / vocab list. Mọi schema sketch là NON-NORMATIVE EXAMPLE.
§1.4 Phép thử nhanh sa đà
Nếu thấy đang viết:
- SQL chạy được → STOP, đổi sang "logical pattern".
- DDL
CREATE TABLEnumeric_claim_vocab / source_of_truth_registry → STOP, defer P44-6. - DOT name thật (vd
dot_information_unit_numeric_drift_checker) → STOP, dùng Role: hoặc AP-CHECKER-* (proof-layer). - AP-CHECKER prefix bị hiểu thành DOT thật hoặc APR queue → STOP, ghi rõ "proof-layer naming".
- Schema sketch không có "NON-NORMATIVE EXAMPLE" annotation → STOP, thêm ngay.
- "P11E đã proof runtime…" → STOP, sửa "P11E chứng minh về mặt thiết kế…".
- Mở rộng implementation Đ39/Qdrant/BPMN/UI → STOP, defer.
- Cascade retire trong checker layer → STOP, vi phạm 2 layer separation P44-5A §8.6.
- Auto-fix scope mới ngoài P44-5A (A3 + INV-DUAL-3) → STOP, C1/C2/C4 chỉ auto-suggest.
- Helper làm SSOT → STOP, vi phạm P44-4A §7.7.2.
§2. Inputs inherited
§2.1 Từ P11A inventory (Gap D foundation)
| ID | Item | Reference P11A |
|---|---|---|
| I-A-1 | 86 units / 3 publications (D28/D32/D35) — production state | §1 |
| I-A-2 | 3 JSONB profiles GIN-indexed — chưa populate, all {} |
§2 #14-16 |
| I-A-3 | universal_edges 2199 rows — chưa có TAC edges populate | §2 #17-19 |
| I-A-4 | fn_tac_log_checker_issue function tồn tại — không có drift checker logic cụ thể |
§2 #27 |
| I-A-5 | Gap D items aspirational (numeric claims, entity mentions, version refs, code bindings) — không có infrastructure | §2 #22-25 |
| I-A-6 | Top 3 Next Proofs đề xuất Proof 4 implicit Checker (P11E) | §5 |
§2.2 Từ P38-XC final
| ID | Item | Reference P38-XC |
|---|---|---|
| I-XC-1 | UMC 10 elements + Q8 "Tôi có lệch không?" thuộc Cap-9 Checker (Tier 4) | §2.1 + §3.2 |
| I-XC-2 | UMC U10 conformance_status — Tier 0 default open, DOT update Tier 4 |
§5.2 |
| I-XC-3 | Cap-9 self-meta-audit recursive — terminal cap max 1 level (defer P44-5) | §8.1 + §8.3 |
| I-XC-4 | DOT state fields cho checker layer | §7.3 + §9.5 |
| I-XC-5 | Optional Enrichment metadata fields (Tier 2) | §7.3 |
§2.3 Từ P44-3 / P44-4A / P44-5A / P11C / P11D / P6
(Inputs giữ nguyên như full draft S190 §2.3-2.7 — không repeat content.)
| Source | Items chính kế thừa |
|---|---|
| P44-3 | INV-P4 + Optional Enrichment (Đ44 §9.1) + Profile lifecycle 4 status |
| P44-4A | universal_edges SSOT + A1-A4 + INV-DUAL-1..4 + cycle detection depth ≤ 4 + cấm fallback to helper |
| P44-5A | 3 tầng kiểm + DOT Contract Matrix Cap-4/5 với Role:/Procedure: prefix + autofix_enabled start-OFF + 2 layer separation + Sunset Condition Evaluator + INV-DUAL-1/2 với 6 guard chặt |
| P11C | universal_edges SSOT chốt; implementation defer P44-6 + Pilot Tier 1 |
| P11D | Logical Proof Design pattern + anti-pattern (cấm bypass universal_edges, cấm fallback to helper) |
| P6 | Taxonomy 5 nhóm + Severity 4 mức + "Checker detects, Healer fixes separately" + Phase 1/2 + Coverage matrix |
§2.4 Boundary với P6 + P44-5A (anti-overlap)
| Layer | Cover gì | Owner | P11E relationship |
|---|---|---|---|
| P6 Checker DOT | Schema invariants P5/P5b — TAC structural integrity | P6 v0.2 | P11E không trùng — semantic metadata layer dựa P6; naming tách qua AP-CHECKER prefix |
| P44-5A Cap-4/5 Checker | Edge entries universal_edges — E1-E8 + A1-A4 + INV-DUAL + cycle | P44-5A | P11E C3 = wrapper layer logical; primary owner P44-5A |
| P11E (đang thiết kế) | Drift của miếng thông tin so với source thực | (mới — P11E) | C1-C4 logical proof; runtime defer Pilot |
→ P11E đứng trên P6 + P44-5A, không re-design cùng scope.
§3. Severity model — kế thừa P6 + scope rule runtime
Quyết định GPT chỉnh #2 + Q7: Giữ severity 4 mức P6 nguyên. P11E runtime drift sau commit dùng ERROR/WARN/INFO; BLOCK chỉ pre-commit gate.
§3.1 Severity 4 mức (kế thừa P6 §3)
| Severity | Định nghĩa | P11E scope apply |
|---|---|---|
| BLOCK | Reject at gate — máy chặn không cho commit state mới | Pre-commit gate only. Runtime drift sau commit KHÔNG dùng BLOCK. |
| ERROR | Critical drift — log + escalate APR; không tự fix; không block traffic | Runtime drift critical (broken relation, invalid version reference, broken binding) |
| WARN | Drift cần review — log + nhắc; có thể auto-suggest fix | Runtime drift mức trung bình |
| INFO | Monitoring — log only, không escalate | Runtime status (NOT_READY, low confidence, missing optional metadata) |
§3.2 BLOCK scope rule
BLOCK chỉ apply cho gate TRƯỚC khi commit state mới:
| Gate type | BLOCK apply? | Ví dụ P11E |
|---|---|---|
| Birth gate (Object/metadata mới INSERT) | ✅ | Pre-enact: numeric_claims thiếu source_of_truth ref → BLOCK pre-enact |
| Pre-enact gate (proposed → enacted) | ✅ | Pre-enact: version_refs trỏ retired version → BLOCK transition |
| Pre-transition gate (active → deprecated) | ✅ | Tương tự |
| Pre-commit metadata gate (populate metadata sau enact) | ✅ | Metadata commit: claim_extractions không resolvable → BLOCK metadata commit |
| Runtime drift detection (sau khi state đã commit) | ❌ — dùng ERROR/WARN/INFO | C1-C4 runtime checkers |
§3.3 Severity per checker group
| Checker group | Pre-commit gate severity | Runtime drift severity | Auto-fix mức |
|---|---|---|---|
| C1 Numeric | (rare — defer khi metadata extraction mature) | ERROR / WARN / INFO | KHÔNG auto-fix; auto-suggest only |
| C2 Version | BLOCK pre-enact (refs retired version) | ERROR / WARN / INFO | KHÔNG auto-fix; auto-suggest only |
| C3 Wrapper | BLOCK pre-enact (orphan endpoint) | ERROR / WARN / INFO | Inherit P44-5A scope (A3 + INV-DUAL-3 candidate) |
| C4 Text Binding | BLOCK pre-enact (binding unresolvable) | ERROR / WARN / INFO | KHÔNG auto-fix; auto-suggest only |
§3.4 Phân biệt với P6 BLOCK
P6 BLOCK = structural birth/pre-enact gate of P5/P5b checkers (vd BG-LU-01 address unique). P11E BLOCK = metadata semantic gate (pre-enact text + pre-commit metadata).
→ Không trùng P6 — P6 BLOCK structural; P11E BLOCK metadata semantic.
§4. Checker readiness contract (general principle)
Quyết định GPT chỉnh #4 + bổ sung Opus #1: Rule "No metadata → NOT_READY/INFO, not FAIL" là general principle áp dụng cho mọi checker phụ thuộc Optional Enrichment metadata (C1, C2, C4).
§4.1 Principle statement
Một checker chỉ được phép FAIL/ERROR/WARN khi metadata input hợp lệ tồn tại. Khi metadata không tồn tại hoặc empty, checker trả về
checker_run_status='not_ready'+severity='INFO', KHÔNG FAIL.
§4.2 Lý do principle
| Lý do | Diễn giải |
|---|---|
| Tránh proof bị hiểu thành runtime proof | P11A Gap D #21-25 aspirational; FAIL khi metadata empty = false positive flood + claim runtime proof |
| Optional Enrichment principle (Đ44 §9.1) | Optional fields → DOT enrichment INFO không block |
| Phân biệt drift thật vs metadata chưa populate | Metadata empty ≠ drift |
| Pilot path rõ ràng | NOT_READY → APR/pilot decide khi populate metadata → checker chuyển sang ran_clean / ran_with_drift |
§4.3 Dimension thứ 2 checker_run_status (P11E-A polish: đổi tên từ checker_status)
Quyết định GPT Q11 + chỉnh #1: tách dimension; tên
checker_run_statusrõ hơn — trạng thái 1 lần chạy, không phải trạng thái instance.
Dimension 1 — Severity (kế thừa P6): BLOCK / ERROR / WARN / INFO.
Dimension 2 — checker_run_status (mới P11E):
| checker_run_status | Định nghĩa | Severity tương ứng |
|---|---|---|
ran_clean |
Lần chạy hoàn tất, không phát hiện drift | (no issue logged) |
ran_with_drift |
Lần chạy hoàn tất, phát hiện drift | BLOCK / ERROR / WARN tuỳ drift type |
not_ready |
Metadata input không tồn tại / empty / chưa hợp lệ → checker không thể chạy | INFO (logged for awareness) |
error_running |
Checker bị lỗi runtime (timeout, cannot resolve source) → escalate operational | ERROR (operational, không phải drift) |
Output structure logical (NON-NORMATIVE EXAMPLE — không tạo schema mới trong P11E; storage format defer P44-6):
CheckerOutput {
checker_id: <vd "AP-CHECKER-C1-NUM-01">,
checker_run_status: <ran_clean|ran_with_drift|not_ready|error_running>,
severity: <BLOCK|ERROR|WARN|INFO>,
affected_units: [<canonical_address>],
drift_details: {<per checker type>},
recommended_action: <auto_suggest|escalate|defer|none>,
ran_at: <iso8601>,
metadata_state: {required: [...], present: [...], missing: [...]}
}
§4.4 Apply principle per checker group
| Checker | Required metadata input | Behavior khi empty/missing |
|---|---|---|
| C1 Numeric | numeric_claims[] hoặc claim_extractions[] |
not_ready + INFO |
| C2a Legal | version_refs[] filter type=law + version_anchor_ref |
not_ready + INFO |
| C2b Non-legal | version_refs[] filter type∈{profile, design_doc, object} |
not_ready + INFO |
| C3 Wrapper | universal_edges entries + Object lifecycle | (không depend Optional metadata — luôn ready khi universal_edges có data; xem §5.3) |
| C4a Config binding | config_bindings[] |
not_ready + INFO |
| C4b PG binding | pg_object_bindings[] |
not_ready + INFO |
| C4c Code binding | code_bindings[] |
not_ready + INFO |
§4.5 Checker outcome truth table (P11E-A polish: thêm mới theo GPT chỉnh #3)
Quyết định GPT chỉnh #3: Truth table 4 case clear NOT_READY ≠ drift thật.
| Metadata exists? | Source of Truth available? | Drift found? | checker_run_status |
severity | Issue logged? |
|---|---|---|---|---|---|
| ❌ No | — | — | not_ready |
INFO | Optional (single log per metadata state change) |
| ✅ Yes | ❌ No | — | error_running hoặc not_ready (tuỳ rule) |
ERROR (operational) hoặc INFO | Yes nếu operational error |
| ✅ Yes | ✅ Yes | ❌ No | ran_clean |
(n/a) | No |
| ✅ Yes | ✅ Yes | ✅ Yes | ran_with_drift |
BLOCK / ERROR / WARN tuỳ drift type + gate scope | Yes |
Note quan trọng (bổ sung Opus #2): Truth table apply per claim/binding/ref level, KHÔNG per unit. Nếu 1 unit có 5 claims trong
numeric_claims[], mỗi claim được evaluate độc lập; có thể 3 claimsran_clean+ 2 claimsran_with_drifttrong cùng 1 lần chạy. Aggregate cấp unit quaaffected_units[]field trong CheckerOutput.
§4.6 Promotion path: NOT_READY → READY
| Stage | Condition | Action |
|---|---|---|
| NOT_READY (current) | Metadata extraction infrastructure chưa có | Checker INFO log; không escalate |
| PARTIAL_READY | Metadata schema chốt + 1 family pilot populate | Checker chạy on populated subset; báo cáo coverage % |
| READY | Metadata extraction infrastructure mature + populate phổ thông | Checker fully active; severity routing apply normally |
Threshold coverage cụ thể (vd "≥80% units có metadata populate" → READY): không chốt số trong P11E — defer Pilot benchmark (OPEN P11E-ι, kế thừa Q14 GPT). Wording: "threshold pilot-defined".
§5. Checker catalog — 4 nhóm
Quyết định GPT chỉnh #2: Naming convention
AP-CHECKER-C{group}-{TYPE}-{SEQ}.AP = Analysis Proof — proof-layer prefix. AP-CHECKER là KHÔNG phải DOT name thật, KHÔNG liên quan APR (Đ32 cấp medium/high). Tên DOT thật chốt P44-6/APR registration; AP-CHECKER chỉ identifier trong P11E logical proof. Tách hoàn toàn với P6 naming (
{TYPE}-{DOMAIN}-{SEQ}= BG/PE/DOT-LU/UV/PUB/...) để tránh collision.
§5.1 C1 — Numeric Claim Drift
Quyết định GPT Q2: C1 tách 2 sub-group fact + threshold trong cùng C1.
§5.1.1 Scope
C1 phát hiện drift khi text claim về số liệu khác source thực:
- Sub-group C1a Fact drift: text claim count/value/percentage khác registry actual.
- Sub-group C1b Threshold drift: text claim threshold/rule khác hiện hành.
§5.1.2 Sub-checkers
| ID | Sub-checker | Sub-group | Severity (runtime) | Source comparison |
|---|---|---|---|---|
AP-CHECKER-C1-NUM-01 |
Count drift (text count vs registry count) | C1a Fact | ERROR/WARN | normative_registry, dot_config counts, external SoT |
AP-CHECKER-C1-NUM-02 |
Value drift (text value vs config value) | C1a Fact | ERROR/WARN | dot_config values, external SoT |
AP-CHECKER-C1-NUM-03 |
Percentage/ratio drift | C1a Fact | WARN | Source per claim |
AP-CHECKER-C1-NUM-04 |
Threshold drift (text rule vs active rule) | C1b Threshold | ERROR | normative_registry rules + active version |
AP-CHECKER-C1-NUM-05 |
Numeric reference resolution (claim refs → resolvable) | C1a/b shared | WARN | source_of_truth registry (defer P44-6) |
§5.1.3 Metadata input (NON-NORMATIVE EXAMPLE — không tạo schema mới trong P11E)
content_profile.numeric_claims = list of:
{
claim_text: <quoted text from body>,
claim_type: enum(count|value|percentage|threshold|reference),
claim_value: <parsed numeric>,
claim_unit: <optional>,
source_of_truth_ref: {
registry: <normative_registry|dot_config|external>,
identifier: <ref to source>
},
extracted_at: <iso8601>,
extraction_method: enum(manual|agent_extraction), // agent defer Đ39
extraction_provenance: {creator, method, timestamp, source_context}
}
NON-NORMATIVE EXAMPLE: Schema sketch trên là minh hoạ logical concept, KHÔNG phải JSON Schema validation, không phải DDL table. P11E không tạo
numeric_claimsschema mới hoặcsource_of_truth_registrytable mới — defer P44-6 + APR.
§5.1.4 Boundary với P6 DOT-UV-04
P6 DOT-UV-04 (hash recompute) = checksum integrity structural (text body modify post-enact = vi phạm immutability).
C1 numeric drift = semantic drift — text body không đổi (hash vẫn match) nhưng số liệu trong text không còn đúng so với source thực hiện hành.
→ C1 không overlap P6 DOT-UV-04. 2 layer khác mục đích.
§5.1.5 Status maturity
NOT_READY (Phase 2 defer) — Đ39 mature + numeric_claims extraction infrastructure cần trước. Logical contract chốt P11E; runtime defer Pilot Tier 1.
§5.1.6 Auto-fix scope
KHÔNG auto-fix — text post-enact immutable. Auto-suggest update reference cho AP-CHECKER-C1-NUM-05 (suggest đúng source ref) defer OPEN P11E-ζ.
§5.2 C2 — Version Reference Drift (P11E-A polish: tách C2a + C2b)
Quyết định GPT chỉnh #4 + Q15: C2 tách C2a Legal Phase 1 (ready khi populate) + C2b Non-legal logical/defer (profile/design-doc/object versions chưa stable).
§5.2.1 Scope split
| Sub-group | Scope | Source comparison | Maturity |
|---|---|---|---|
| C2a Legal normative refs | Text refs luật/normative document (Đ38/Đ44/Đ35/Đ32/...) qua normative_registry 39 articles | normative_registry + supersedes chain + lifecycle vocab | Phase 1 — logical proof có thể runtime sau populate version_refs[] |
| C2b Non-legal version refs | Text refs profile versions (P44-3), design-doc versions (P38-XC, P44-* docs), object versions (component, dot, profile, family) | Profile Registry + Family Registry lifecycle + universal_edges supersedes per family + design-doc registry (defer) | Logical/defer — profile/design-doc version metadata chưa đủ ổn định |
Lý do tách (theo GPT): Profile/design-doc versions (vd "P44-3 rev 1", "P38-XC final") chưa có normative authority mạnh như legal articles — thường ở stage controlled-draft hoặc rev iterate nhanh. Coi cùng readiness với legal refs sẽ làm proof bị mơ hồ. Tách hai để Phase 1 có scope rõ.
§5.2.2 C2a Sub-checkers (Legal Phase 1 — ready để populate khi pilot)
| ID | Sub-checker | Severity (runtime) | Severity (pre-enact) | Source |
|---|---|---|---|---|
AP-CHECKER-C2-VER-01 |
Reference targets active legal version | ERROR (refs retired) / WARN (refs deprecated) | BLOCK pre-enact | normative_registry active + lifecycle_status |
AP-CHECKER-C2-VER-02 |
Legal supersedes chain integrity (chain unbroken? cycle?) | ERROR | BLOCK pre-enact | universal_edges supersedes edges (filter law owner) |
AP-CHECKER-C2-VER-03 |
Deprecated/retired propagation cho law refs | WARN | (n/a) | normative_registry lifecycle transitions |
AP-CHECKER-C2-VER-04 |
Version anchor resolvable cho legal | WARN | BLOCK pre-enact | normative_registry + tac_unit_version + lifecycle |
§5.2.3 C2b Sub-checkers (Non-legal — logical/defer, KHÔNG ready Phase 1)
| ID | Sub-checker | Severity (runtime) | Source | Defer reason |
|---|---|---|---|---|
AP-CHECKER-C2-VER-05 |
Profile version refs resolvable (P44-3) | ERROR/WARN | Profile Registry lifecycle | Profile_role vocab chưa stable; profile populate chưa đủ |
AP-CHECKER-C2-VER-06 |
Design-doc refs resolvable (P38-XC, P44-* design docs) | WARN | Design-doc registry (chưa tồn tại — defer) | Design-doc registry chưa có; rev nhanh |
AP-CHECKER-C2-VER-07 |
Object version refs (component, DOT, family) | ERROR/WARN | Family Registry + Object lifecycle + universal_edges supersedes | Multi-family lifecycle populate chưa đủ; Đ39 mature dependency |
§5.2.4 Metadata input (NON-NORMATIVE EXAMPLE — không tạo schema mới trong P11E)
content_profile.version_refs = list of:
{
ref_text: <quoted text, vd "Đ38 v2.3" cho legal, "P44-3 rev 1" cho non-legal>,
ref_type: enum(law|profile|design_doc|component|dot|object),
ref_target: {
registry: <normative_registry|profile_registry|family_registry|design_doc_registry|...>,
identifier: <ref code>,
version: <version label hoặc null nếu refs latest>
},
extracted_at: <iso8601>,
extraction_method: enum(manual|agent_extraction),
extraction_provenance: {creator, method, timestamp, source_context}
}
NON-NORMATIVE EXAMPLE: Schema sketch logical, KHÔNG phải DDL. P11E không tạo
version_refsschema hoặcdesign_doc_registrytable — defer P44-6 + APR.
§5.2.5 Status maturity
| Sub-group | Maturity | Pre-condition for ready |
|---|---|---|
| C2a Legal | PARTIAL_READY | version_refs[] populate cho 86 units (manual or extraction); supersedes chain populated trong universal_edges (filter law owner) |
| C2b Non-legal | NOT_READY | C2a PASS + Đ39 mature + multi-family populate + design-doc registry chốt |
§5.2.6 Auto-fix scope
KHÔNG auto-fix — text post-enact immutable. Auto-suggest update reference cho AP-CHECKER-C2-VER-01 (suggest active version) defer OPEN P11E-ζ.
§5.3 C3 — Information-unit Relation Consistency Wrapper
Quyết định GPT chỉnh #1 + Q4: Đổi tên + ghi rõ wrapper proof; primary owner P44-5A Cap-4/5.
§5.3.1 Scope + boundary với P44-5A
C3 = wrapper proof layer chứng minh các lỗi edge của P44-5A "hiện ra" như drift của information_unit và được gắn vào affected_units[].
| Aspect | P44-5A Cap-4/5 Checker | C3 Wrapper |
|---|---|---|
| Owner primary | ✅ P44-5A | ❌ (wrapper only) |
| Detection | ✅ Audit chiều A1-A4 + INV-DUAL-1..4 + cycle | (gọi qua P44-5A APIs hoặc đọc system_issues) |
| Output domain | Edge-level issues | Information-unit-level issues (gắn affected_units[] từ edge issues) |
| Auto-fix | ✅ A3 + INV-DUAL-3 candidate (P44-5A §8.2) | ❌ Không auto-fix; chỉ relay severity |
§5.3.2 Sub-checkers (wrapper — naming AP-CHECKER prefix)
| ID | Sub-checker | Source (P44-5A) | Severity (runtime) |
|---|---|---|---|
AP-CHECKER-C3-REL-01 |
A1 Orphan source — affected units list | P44-5A §10 A1 | ERROR |
AP-CHECKER-C3-REL-02 |
A2 Orphan target — affected units list | P44-5A §10 A2 | ERROR |
AP-CHECKER-C3-REL-03 |
A3 Missing reverse — affected units list | P44-5A §10 A3 | WARN |
AP-CHECKER-C3-REL-04 |
A4 Vocab violation — affected units list | P44-5A §10 A4 | ERROR |
AP-CHECKER-C3-REL-05 |
INV-DUAL-1 (helper có, universal_edges thiếu) | P44-5A §9.3 | ERROR |
AP-CHECKER-C3-REL-06 |
INV-DUAL-2 (universal_edges có, helper thiếu) | P44-5A §9.4 | ERROR |
AP-CHECKER-C3-REL-07 |
INV-DUAL-3 (status mismatch) | P44-5A §9.5 | WARN |
AP-CHECKER-C3-REL-08 |
Composition cycle detected | P44-5A §11 | ERROR |
AP-CHECKER-C3-REL-09 |
Relation cycle (references, depends_on, uses) |
P44-5A §11.1 (extension) | ERROR |
§5.3.3 Wrapper API design (Q13 GPT đã PASS — hybrid)
Quyết định GPT Q13: C3 wrapper hybrid — default đọc
system_issues, real-time có thể gọi P44-5A APIs sau này; defer P44-6.
| Mode | Khi dùng | Implementation |
|---|---|---|
Default: Đọc system_issues mà P44-5A đã log |
Periodic audit, dashboard view | Subscribe system_issues events filter checker_id ∈ Cap-4/5 → map affected_objects[] → information-unit-level issue |
| Real-time: Gọi P44-5A APIs (defer P44-6) | User query 1 unit cụ thể, immediate state check | API get_unit_relation_health(unit_id) returns C3 status (defer P44-6 design) |
§5.3.4 Composition orphan handling
Quyết định GPT Q4: C3 include cả relation + composition orphan, nhưng wrapper.
AP-CHECKER-C3-REL-08 (composition cycle) + AP-CHECKER-C3-REL-09 (relation cycle) cùng wrapper. Composition cycle owner primary = P44-5A §11 Cap-5 Cycle Detector; C3 wrapper proof từ góc nhìn information_unit.
§5.3.5 Status maturity
CONTRACT_READY — P44-4A + P44-5A đã chốt logical contract. Runtime proof defer Pilot Tier 1 (cần populate edges thật cho 86 units + DOT instances active).
§5.3.6 Auto-fix scope
Inherit P44-5A scope nguyên — C3 wrapper KHÔNG mở rộng auto-fix. Cụ thể:
- A3 missing reverse: candidate sau APR/pilot (
autofix_enabledstart-OFF). - INV-DUAL-3 status sync: candidate sau APR/pilot.
- Tất cả khác: KHÔNG auto-fix.
§5.4 C4 — Text Binding Drift (3 sub-scope)
Quyết định GPT chỉnh #3: C4 tách 3 sub-scope; C4b/C4c chỉ logical contract, defer Đ33/P44-6.
§5.4.1 3 sub-scope
| Sub-scope | Mô tả | Maturity |
|---|---|---|
| C4a Text ↔ Config binding | Text refs config flag/parameter trong dot_config | Logical proof có thể runtime sau populate (dot_config tồn tại) |
| C4b Text ↔ PG object binding | Text refs PG table/column/index/function | Logical contract only; runtime defer Đ33 introspection enacted |
| C4c Text ↔ Code/function binding | Text refs code function/class/file path | Logical contract only; runtime defer code AST infrastructure |
§5.4.2 C4a Sub-checkers (Text ↔ Config binding)
Bổ sung Opus #3 + Q12 GPT: C4a scope chỉ dot_config system-level, EXCLUDE vocab framework binding (Đ24 cross-cutting APR).
| ID | Sub-checker | Severity (runtime) | Source |
|---|---|---|---|
AP-CHECKER-C4a-CFG-01 |
Config binding resolvable (text refs dot_config[<key>] — key tồn tại) |
ERROR | dot_config table |
AP-CHECKER-C4a-CFG-02 |
Config value match (text describe value = current value) | WARN | dot_config table |
AP-CHECKER-C4a-CFG-03 |
Config flag deprecated/retired (text vẫn refs deprecated key) | WARN | dot_config + lifecycle |
Vocab framework binding excluded: vocab framework anchor (vd unit_kind vocab) thuộc Đ24 + OPEN P38-X-11 cross-cutting APR; defer OPEN P11E-η.
§5.4.3 C4b Sub-checkers (Text ↔ PG object binding) — logical only
| ID | Sub-checker | Severity (runtime) | Source |
|---|---|---|---|
AP-CHECKER-C4b-PG-01 |
PG table binding resolvable | ERROR | pg_catalog (defer Đ33 read-only path) |
AP-CHECKER-C4b-PG-02 |
PG column binding resolvable | ERROR | pg_catalog |
AP-CHECKER-C4b-PG-03 |
PG function binding resolvable (text refs fn_*) |
WARN | pg_catalog |
AP-CHECKER-C4b-PG-04 |
PG index binding resolvable | INFO | pg_catalog |
AP-CHECKER-C4b-PG-05 |
SCMR mapping consistency | WARN | P44-2 SCMR + pg_catalog |
Logical contract only — execute introspection defer Đ33 enacted + P44-6 implementation. OPEN P11E-δ.
§5.4.4 C4c Sub-checkers (Text ↔ Code/function binding) — logical only
| ID | Sub-checker | Severity (runtime) | Source |
|---|---|---|---|
AP-CHECKER-C4c-CODE-01 |
DOT name binding resolvable (text refs DOT name — DOT đăng ký dot_registry) | WARN | dot_registry |
AP-CHECKER-C4c-CODE-02 |
Code function binding resolvable (text refs file path / function name) | WARN | codebase AST (defer) |
AP-CHECKER-C4c-CODE-03 |
API endpoint binding resolvable | WARN | API registry (defer) |
Logical contract only — execute code AST analysis defer (cần infra mới ngoài Đ33). OPEN P11E-η + P11E-θ.
§5.4.5 Metadata input chung (NON-NORMATIVE EXAMPLE — không tạo schema mới trong P11E)
content_profile.code_bindings = list of:
{
binding_text: <quoted text from body>,
binding_type: enum(config|pg_table|pg_column|pg_function|pg_index|dot_name|code_function|api_endpoint),
binding_target: {
registry: <dot_config|pg_catalog|dot_registry|codebase|api_registry>,
identifier: <ref>
},
binding_value: <optional>,
extracted_at: <iso8601>,
extraction_method: enum(manual|agent_extraction),
extraction_provenance: {creator, method, timestamp, source_context}
}
NON-NORMATIVE EXAMPLE: Schema sketch logical, KHÔNG phải DDL. P11E không tạo
code_bindingsschema, không tạoapi_registrytable — defer P44-6 + APR.
§5.4.6 Status maturity per sub-scope
| Sub-scope | Maturity | Pre-condition for ready |
|---|---|---|
| C4a Config | PARTIAL_READY | code_bindings[] populate cho subset; dot_config có sẵn |
| C4b PG | NOT_READY | Đ33 read-only introspection path enacted + P44-6 |
| C4c Code | NOT_READY | dot_registry mature + code AST infrastructure (post-Tier 4) |
§5.4.7 Auto-fix scope
KHÔNG auto-fix — text post-enact immutable. Auto-suggest update binding cho AP-CHECKER-C4a-CFG-01/02 defer OPEN P11E-ζ.
§6. Logical checker pipeline 6 step
Inherit Đ22 v1.2 pattern (P44-5A §8.1) + 2 layer separation (P44-5A §8.6).
1. DETECT
→ Checker chạy detect_query (per sub-checker)
→ Đầu tiên check readiness (§4): metadata input có tồn tại không?
- Empty/missing → checker_run_status='not_ready' + severity='INFO' → log + dừng
- Hợp lệ → tiếp tục
→ Output: candidate drift entries
2. CLASSIFY SEVERITY
→ Tra severity table (§3.3) per drift type + per family maturity (M0-M4)
→ Pre-commit gate: BLOCK applicable
→ Runtime: ERROR/WARN/INFO only
→ Tra checker outcome truth table (§4.5) để xác định checker_run_status
3. CREATE ISSUE
→ Insert vào system_issues với fields:
{checker_id, checker_run_status, severity, affected_units[], drift_details JSONB,
recommended_action, ran_at, metadata_state}
4. OPTIONAL FIX RECOMMENDATION
→ Sub-checker generate suggested_fix (logical, không execute)
→ Auto-fix CHỈ nếu autofix_enabled=true (start-OFF default per P44-5A §8.3)
→ Auto-fix scope giới hạn: C3 inherit P44-5A (A3 + INV-DUAL-3); C1/C2/C4 KHÔNG auto-fix
→ C1/C2/C4 chỉ auto-suggest (logical recommendation); APR/human apply
5. HUMAN/APR REVIEW (Q16 GPT đã PASS)
→ Severity ERROR/BLOCK → escalate APR cấp medium/high (Đ32)
→ WARN → log + scheduled review hoặc human pull review on-demand
→ INFO (including not_ready) → log only
6. CLOSE / DEFER / ESCALATE
→ Issue closed sau fix verified (re-run detect, confirm clean)
→ Defer nếu condition chưa thoả (vd metadata extraction chưa mature)
→ Escalate APR cấp medium/high theo severity matrix
§6.1 Anti-mutation guardrail (kế thừa P44-5A §8.6 — 2 layer separation)
| Layer | P11E checkers (C1-C4) được phép | C1-C4 KHÔNG được phép |
|---|---|---|
| Edge/metadata layer | Mark drift state, log issue, recommend fix, auto-suggest | Mutate text body (text post-enact immutable) |
| Object lifecycle layer (Đ4) | (n/a — không touch) | Cascade retire/deprecate Object; modify lifecycle state |
| Edge SSOT layer (P44-5A) | Wrapper read P44-5A issues → log to information-unit level | Mutate edge entries; bypass P44-5A primary owner |
§6.2 Auto-fix policy align P44-5A §8.2
| Drift type | Severity | Auto-fix scope | autofix_enabled default |
|---|---|---|---|
| C1 Numeric drift | ERROR/WARN | KHÔNG auto-fix; auto-suggest only | n/a (no auto rule) |
| C2 Version drift | ERROR/WARN | KHÔNG auto-fix; auto-suggest only | n/a |
| C3-REL-01/02/04 (A1/A2/A4) | ERROR | KHÔNG auto-fix (P44-5A §8.2) | n/a |
| C3-REL-03 (A3 missing reverse) | WARN | Auto-fix candidate | start-OFF, opt-in sau APR/pilot |
| C3-REL-05 (INV-DUAL-1) | ERROR | Quarantine + escalate; 6 guard exception (P44-5A §9.3) | start-OFF, exception only |
| C3-REL-06 (INV-DUAL-2) | ERROR | Auto-fill candidate với 6 guard (P44-5A §9.4) | start-OFF, opt-in sau APR/pilot |
| C3-REL-07 (INV-DUAL-3 status) | WARN | Auto-sync theo SSOT (P44-5A §9.5) | start-OFF, opt-in sau APR/pilot |
| C3-REL-08/09 (cycle) | ERROR | KHÔNG auto-fix (P44-5A §11) | n/a |
| C4 binding drift | ERROR/WARN | KHÔNG auto-fix; auto-suggest only | n/a |
§6.3 Wire re-check pattern (Đ22 v1.2)
Sau khi auto-fix (C3 only):
- Re-run detect_query trên unit subset đã fix.
- Confirm drift fixed (no more issue).
- Close
system_issuesentry vớiauto_fixed=true+ audit trail. - Re-check fail → reopen issue + escalate.
C1/C2/C4 không có wire re-check vì không auto-fix; chỉ track suggested_fix application qua APR/human.
§7. Mapping checker ↔ metadata fields
§7.1 Mapping table
| Checker group | Required metadata fields | Source of truth | Output |
|---|---|---|---|
| C1 Numeric | content_profile.numeric_claims[], claim_extractions[], source_of_truth_ref per claim |
normative_registry, dot_config, external SoT | Drift report per claim với severity |
| C2a Legal | content_profile.version_refs[] filter type=law, version_anchor_ref |
normative_registry (39 articles), universal_edges supersedes (filter law owner), lifecycle vocab | Stale law ref report |
| C2b Non-legal | version_refs[] filter type∈{profile, design_doc, object} |
Profile Registry + Family Registry + universal_edges supersedes per family + design-doc registry (defer) | Stale non-legal ref report |
| C3 Wrapper | universal_edges entries (E1-E8 + INV-DUAL state), reverse-index, Object lifecycle | universal_edges (SSOT), helper rows (Dual transitional) | Orphan/broken/drift list mapped to affected_units |
| C4a Config | content_profile.config_bindings[] (subset code_bindings) |
dot_config table | Unresolvable config binding list |
| C4b PG | content_profile.pg_object_bindings[], SCMR mapping, physical_target_ref |
pg_catalog (defer Đ33), P44-2 SCMR | Unresolvable PG binding list |
| C4c Code | content_profile.code_bindings[] |
dot_registry, codebase AST (defer) | Unresolvable code binding list |
Mọi metadata field tham chiếu trên là NON-NORMATIVE EXAMPLE — schema final defer P44-6.
§7.2 Cross-cutting metadata (mọi checker dùng)
| Field | Mục đích | Source |
|---|---|---|
content_hash |
Verify text body không đổi từ baseline; xác định khi nào drift xuất hiện | tac_unit_version core column |
conformance_status (UMC U10) |
Aggregate conformance theo SCMR; DOT update Tier 4 | UMC U10, P38-XC §5.2 |
last_check_at |
DOT state field cho biết last run | DOT writes (Tier 4) |
last_check_result |
Last checker output summary | DOT writes |
drift_flag |
Boolean signal có drift không | DOT writes |
enrichment_status |
Progress của enrichment Tier 2-5 | DOT writes |
topic_provenance (P11D) |
Topic label provenance | content_profile.topic_labels[].topic_provenance |
§7.3 Boundary metadata thuộc layer khác
| Layer | Metadata không thuộc P11E |
|---|---|
| P6 structural | body, content_hash, lifecycle_status, version_label, version_seq (core columns checked by P6) |
| P44-3 Profile Registry | profile_code, schema_definition, required_fields_set, optional_fields_set, g_groups_covered |
| P44-5A DOT state | last_identity_check_at, last_publication_audit_at, dots_active_for_unit (DOT-managed Tier 4) |
§8. Checker Readiness Matrix (P11E-A polish: cập nhật C2 split + AP-CHECKER naming)
Quyết định GPT chỉnh #5 + bổ sung Opus #5: thêm Phase + Pre-condition cột.
§8.1 Matrix tổng hợp
| Checker (AP-CHECKER prefix) | Metadata required | Source of truth required | Ready now? | Runtime proof? | Phase | Pre-condition for ready |
|---|---|---|---|---|---|---|
| C1a Fact (NUM-01..03) | numeric_claims[] populate filter type∈{count,value,percentage} |
normative_registry, dot_config, external SoT registry | ❌ NOT_READY | ❌ Defer Pilot | Phase 2 | Đ39 mature + numeric extraction infra + source_of_truth registry mature |
| C1b Threshold (NUM-04..05) | numeric_claims[] populate filter type=threshold |
normative_registry rules + active version | ❌ NOT_READY | ❌ Defer Pilot | Phase 2 | Cùng C1a + threshold rule registry mature |
| C2a Legal (VER-01..04) | version_refs[] populate filter type=law |
normative_registry 39 articles + supersedes chain (filter law owner) | ⚠️ PARTIAL_READY | ⚠️ Phase 1 logical | Phase 1 | version_refs[] populate cho 86 units (manual or extraction) + supersedes chain populated |
| C2b Non-legal (VER-05..07) | version_refs[] filter type∈{profile, design_doc, object} |
Profile Registry + Family Registry + universal_edges supersedes per family + design-doc registry (defer) | ❌ NOT_READY | ❌ Defer | Phase 2 | C2a PASS + Đ39 mature + multi-family populate + design-doc registry chốt |
| C3 Wrapper relation orphan (REL-01..04) | universal_edges entries | universal_edges (SSOT) | ✅ CONTRACT_READY | ⚠️ Defer Pilot Tier 1 | Phase 1 | TAC edges populate (Pilot Tier 1) + P44-5A Cap-4/5 active |
| C3 Wrapper composition orphan (REL-08) | universal_edges contains/belongs_to + composition_role | universal_edges + parent_or_container_ref | ✅ CONTRACT_READY | ⚠️ Defer Pilot Tier 1 | Phase 1 | Cùng C3 relation + Cap-5 Cycle Detector active |
| C3 Wrapper INV-DUAL (REL-05..07) | helper rows + universal_edges entries | universal_edges (SSOT) | ✅ CONTRACT_READY | ⚠️ Defer Pilot Tier 1 | Phase 1 | Dual transitional family active (TAC tac_publication_member) + DOT instances active |
| C3 Wrapper relation cycle (REL-09) | universal_edges relation entries | universal_edges + cycle detector | ✅ CONTRACT_READY | ⚠️ Defer Pilot Tier 1 | Phase 1 | Cap-4/5 Cycle Detector extension active |
| C4a Config binding (CFG-01..03) | config_bindings[] populate |
dot_config table | ⚠️ PARTIAL_READY | ⚠️ Defer | Phase 1-2 | config_bindings[] populate + dot_config schema chốt |
| C4b PG binding (PG-01..05) | pg_object_bindings[] populate |
pg_catalog (read-only Đ33 path) | ❌ NOT_READY | ❌ Defer | Phase defer | Đ33 enacted + read-only introspection + P44-6 |
| C4c Code binding (CODE-01..03) | code_bindings[] populate |
dot_registry + codebase AST | ❌ NOT_READY | ❌ Defer | Phase defer | dot_registry mature + code AST (post-Tier 4) |
§8.2 Phase summary
| Phase | Checkers ready | Total |
|---|---|---|
| Phase 1 (logical contract ready, runtime defer Pilot Tier 1) | C2a Legal + C3 (relation/composition/INV-DUAL/cycle) + C4a (PARTIAL) | 5-6 sub-groups |
| Phase 2 (logical only, runtime defer Đ39 + APR cấp medium) | C1a + C1b + C2b | 3 sub-groups |
| Phase defer (logical only, runtime defer Đ33/post-Tier 4) | C4b + C4c | 2 sub-scopes |
§8.3 Maturity progression flow
NOT_READY → PARTIAL_READY → CONTRACT_READY → READY
↓ ↓ ↓ ↓
infra metadata contract runtime
chưa có schema chốt chốt logical active
+ 1 family + DOT regis- + populate
pilot tered phổ thông
Threshold coverage cụ thể (vd "≥80% units" → READY): pilot-defined (Q14 GPT), không chốt số trong P11E.
→ P11E hiện ở stage CONTRACT_READY cho C3 + PARTIAL cho C2a + C4a; NOT_READY cho rest. Promotion qua APR + pilot evidence (defer P44-6).
§8.4 P11E phase độc lập P6 phase (Q17 GPT đã PASS)
| Phase classification | P6 phase | P11E phase | Cross-reference |
|---|---|---|---|
| Phase 1 | Structural rollout (BG + PE + DOT ERROR core) | Metadata maturity (logical contract ready, runtime defer Pilot) | P6 §11; P11E §8.2 |
| Phase 2 | Structural deferred (WARN/INFO + golden path) | Metadata defer Đ39 + APR | P6 §12; P11E §8.2 |
→ 2 hệ phase độc lập, chỉ cross-reference. Không trộn lẫn.
§9. OPEN / Technical Debt
§9.1 OPEN items (10 items)
| ID | Item | Resolve khi |
|---|---|---|
| OPEN P11E-α | Numeric claim extraction infrastructure (claim_text parsing + claim_value parsing + source_of_truth resolution) | Đ39 mature + Addendum §2.3 enacted |
| OPEN P11E-β | Source-of-truth registry (chốt source per claim type; tránh ambiguity multiple sources) | APR + Authority Map alignment + P44-6 |
| OPEN P11E-γ | Version authority map (active version per object class) — C2b expansion | APR + Đ37 alignment + Phase 2 |
| OPEN P11E-δ | PG object binding introspection mechanism (read-only Đ33 path) | P44-6 + Đ33 enacted |
| OPEN P11E-ε | Severity threshold số (low confidence cutoff cho NOT_READY → READY transition; drift cluster %) | Pilot Tier 1 + benchmark |
| OPEN P11E-ζ | Auto-suggest implementation cho C1/C2/C4 (logical contract pattern + APR review template) | APR + pilot evidence + P44-6 |
| OPEN P11E-η | C4a vocab framework binding boundary (vd unit_kind vocab anchor — thuộc Đ24 cross-cutting hay C4a?) |
OPEN P38-X-11 + cross-cutting APR |
| OPEN P11E-θ | C4c code AST analysis infrastructure (post-Tier 4) | Future post-Tier 4 |
| OPEN P11E-ι | NOT_READY → READY promotion criteria — coverage % threshold pilot-defined (Q14 GPT) | APR + pilot |
| OPEN P11E-κ | C3 wrapper API design hybrid (Q13 PASS — system_issues default + APIs realtime) — chi tiết defer P44-6 | P44-6 + P44-5A implementation |
§9.2 Technical Debt (6 items)
| ID | Item | Resolve khi |
|---|---|---|
| TD P11E-1 | Populate metadata fields thật (numeric_claims, version_refs, code_bindings, config_bindings, pg_object_bindings) trên 86 units | Pilot Tier 1 + Đ39 mature |
| TD P11E-2 | DOT registration cho C1-C4 (Role: + Procedure: → real DOT names dot_registry; AP-CHECKER là proof-layer naming, KHÔNG phải DOT thật) | P44-6 + Đ44 enacted v1.0 |
| TD P11E-3 | Đ22 self-healing extension cho P11E (auto-suggest pattern; review queue infrastructure) | Đ22 amend hoặc P44-6 |
| TD P11E-4 | C4b PG introspection function (read-only Đ33 path) | P44-6 + Đ33 enacted |
| TD P11E-5 | Schedule + threshold final per checker (cron cadence, severity cutoff, batch size) | P44-6 + benchmark |
| TD P11E-6 | Output system_issues schema extension cho checker_run_status dimension + metadata_state field |
Đ22 amend hoặc P44-6 |
§10. Risk / Conflict check
| # | Risk / Conflict | Severity | Mitigate |
|---|---|---|---|
| R1 | Trùng scope với P6 Checker DOT | High | §1 + §2.4 phân biệt rõ; AP-CHECKER prefix tách hoàn toàn với P6 naming |
| R2 | Trùng scope với P44-5A Cap-4/5 Checker | High | §5.3.1 ghi rõ C3 = wrapper logical; primary owner P44-5A |
| R3 | C1/C2b/C4 aspirational — không thể runtime proof | High | Wording "Logical Proof Design" + readiness contract §4 + truth table §4.5; runtime defer Pilot |
| R4 | C2 Version drift đụng supersedes chain Cap-4 |
Medium | Cap-4 owner edge integrity; C2 owner text-vs-edge consistency |
| R5 | C4b vi phạm Đ33 introspection | Medium | OPEN P11E-δ defer Đ33 enacted; P11E logical only |
| R6 | Auto-fix expansion vi phạm P44-5A autofix_enabled start-OFF |
High | §6.2 force align P44-5A: C1/C2/C4 không auto-fix; C3 inherit P44-5A scope |
| R7 | Helper làm SSOT (vi phạm P44-4A §7.7.2) | High | C3-REL-05/06/07 align P44-5A §8.2 + §9.3-9.4 với 6 guard chặt |
| R8 | DOT name hardcode | High | §1.3 guardrail nghiêm; AP-CHECKER prefix là proof-layer, KHÔNG phải DOT thật |
| R9 | Mở rộng implementation/UI/Qdrant | Medium | §1.3 guardrail 9 + §11; defer post-Tier 4 |
| R10 | NOT_READY false positive flood | Medium | §4.4 readiness check first; chỉ log NOT_READY 1 lần per metadata state change (defer rate-limit P44-6) |
| R11 | Severity threshold số chốt sai do thiếu evidence | Medium | OPEN P11E-ε defer Pilot |
| R12 | Conflict với Đ4 lifecycle (P11E tự cascade retire) | High | Kế thừa P44-5A §8.6; C1-C4 chỉ flag, không cascade |
| R13 | Anti self-contradiction P11E ↔ P11C ↔ P11D | Medium | universal_edges SSOT (P11C); query không bypass helper (P11D AP-1); checker không re-design audit (P44-5A) — kiểm §13 |
| R14 | Severity model BLOCK gây hiểu nhầm runtime block | High | §3.2 scope rule rõ: BLOCK pre-commit gate only; runtime ERROR/WARN/INFO |
| R15 | C4a vs Đ24 vocab framework boundary không rõ | Medium | Bổ sung Opus + OPEN P11E-η: C4a chỉ dot_config system-level, EXCLUDE vocab framework |
| R16 (P11E-A polish) | Schema sketch hiểu nhầm thành DDL | Medium | NON-NORMATIVE EXAMPLE annotation tại mọi schema sketch (§4.3, §5.1.3, §5.2.4, §5.4.5) |
| R17 (P11E-A polish) | AP-CHECKER prefix nhầm với DOT thật hoặc APR Đ32 | Medium | §5 header + §1.3 guardrail 7 ghi rõ "AP = Analysis Proof, KHÔNG phải DOT thật, KHÔNG liên quan APR Đ32" |
| R18 (P11E-A polish) | C2 Phase 1 lẫn legal vs profile/design-doc | Medium | §5.2 tách C2a Legal + C2b Non-legal rõ rệt |
→ Tổng: 8 High + 10 Medium + 0 Low. Tất cả mitigate trong P11E logical scope. Không Critical.
Anti self-contradiction check:
- P11E ↔ P11C: universal_edges SSOT consistent ✅
- P11E ↔ P11D: query không bypass helper consistent ✅
- P11E ↔ P44-4A: provenance bắt buộc + INV-DUAL guard 2 chiều consistent ✅
- P11E ↔ P44-5A: 2 layer separation + autofix_enabled start-OFF + Role/Procedure prefix consistent ✅
- P11E ↔ P6: severity 4 mức kế thừa, naming AP-CHECKER tách hoàn toàn, scope phân biệt structural vs semantic ✅
§11. Scope recap — what P11E must NOT do
§11.1 Recap 10 guardrails (§1.3)
- KHÔNG SQL thật.
- KHÔNG DDL.
- KHÔNG code.
- KHÔNG execute audit/query.
- KHÔNG mở P44-6.
- KHÔNG sửa P38-XC, P44-3/4A/5A, P11A/C/D, P6, Đ22, Đ35, Đ4, Đ0-B.
- KHÔNG đặt tên DOT thật. AP-CHECKER là proof-layer naming, KHÔNG phải DOT thật, KHÔNG APR Đ32.
- KHÔNG claim runtime proof bằng data thật.
- KHÔNG mở rộng Đ39 KG / Đ34 BPMN / Qdrant / Directus UI / Nuxt UI.
- KHÔNG hardcode threshold/schedule/vocab list. Mọi schema sketch là NON-NORMATIVE EXAMPLE.
§11.2 Phép thử cuối
| Câu hỏi | Action |
|---|---|
| Tôi đang viết SQL chạy được? | STOP — đổi sang "logical pattern" |
Tôi đang viết DDL CREATE TABLE? |
STOP — defer P44-6 |
| Tôi đang đặt tên DOT thật hoặc dùng AP-CHECKER như DOT thật? | STOP — AP-CHECKER là proof-layer; DOT thật dùng Role: |
| Tôi đang viết "P11E đã proof runtime"? | STOP — sửa "P11E chứng minh về mặt thiết kế" |
| Tôi đang dùng BLOCK cho runtime drift? | STOP — BLOCK chỉ pre-commit gate |
| Tôi đang để checker FAIL khi metadata empty? | STOP — readiness contract §4 yêu cầu NOT_READY/INFO |
| Tôi đang mở rộng auto-fix C1/C2/C4? | STOP — chỉ auto-suggest |
| Tôi đang re-design audit chiều A1-A4? | STOP — primary owner P44-5A |
| Tôi đang thiết kế cascade retire trong checker? | STOP — vi phạm 2 layer separation |
| Tôi đang truy cập pg_catalog trực tiếp trong C4b? | STOP — cần Đ33 read-only path; defer |
| Tôi đang dùng helper làm SSOT trong C3? | STOP — vi phạm P44-4A §7.7.2 |
| Tôi đang viết schema sketch không có "NON-NORMATIVE EXAMPLE" annotation? | STOP — thêm ngay |
| Tôi đang gộp C2a legal + C2b non-legal cùng readiness? | STOP — tách 2 maturity khác nhau |
§12. Roadmap sau P11E
§12.1 P11E uploaded — P11 series proof phase đầy đủ
| # | Stage | Status | Note |
|---|---|---|---|
| P11A | Inventory + Gap analysis | ✅ Uploaded (2026-05-01) | Source of truth |
| P11B | Metadata profile proof (Gap A) | ⏸ Skipped | P44-3 đã cover |
| P11C | Relation edges proof (Gap B) | ✅ Closed (2026-05-02) | P44-4A + P44-5A cover design |
| P11D | Topic View proof (Gap C) | ✅ Closed (2026-05-02) | Logical Proof Design |
| P11E | Checker proof (Gap D) | ✅ Uploaded (2026-05-02) | Logical Proof Design |
| P11F | Vector/KG projection (Gap E) | ⏸ Defer | Đ39 mature + NĐ-36-01 Phần 5 |
P11 proof phase: ✅ đầy đủ — completes Gap D.
§12.2 P44-6 vẫn defer
Đến khi: Đ44 enacted v1.0 + APR cấp high + 2 family pilot. P44-6 không mở ngay.
§12.3 Đề xuất bước kế tiếp (theo định hướng User S190+)
User định hướng: KHÔNG mở P44-6 ngay. Ưu tiên đóng gói + đưa miếng thông tin vào sử dụng sớm. Bước kế tiếp = IU-0 — Information Unit Minimum Standard & Packaging Plan (outline) để chốt schema chuẩn chung Incomex (không riêng TAC/Đ38) + slice-based editing workflow + pilot dogfooding.
§13. Self-audit P11E-A polish
- ✅ Không SQL thật / DDL / code — chỉ logical pattern + NON-NORMATIVE EXAMPLE annotations.
- ✅ Không runtime claim bằng data thật — wording "Logical Proof Design" + readiness matrix §8 + truth table §4.5 + R3 disclaimer.
- ✅ universal_edges là SSOT — C3 wrapper không bypass; C3-REL-05/06/07 align P44-4A §7.7.2 + P44-5A §9.3-9.4.
- ✅ 6 chỉnh GPT P11E-A polish applied 100%: (1)
checker_status→checker_run_statusxuyên suốt; (2) AP-CHECKER prefix naming + clarification "không DOT thật, không APR Đ32"; (3) §4.5 outcome truth table 4 case + per-claim note; (4) C2 tách C2a Legal + C2b Non-legal; (5) NON-NORMATIVE EXAMPLE annotation mọi schema; (6) pathclosure/chốt. - ✅ 7 trả lời Q11-Q17 GPT applied: Q11 dimension thứ 2 + tên / Q12 C4a exclude vocab / Q13 C3 hybrid / Q14 threshold pilot-defined / Q15 C2b defer / Q16 ERROR APR + WARN scheduled / Q17 P11E phase độc lập P6.
- ✅ 2 bổ sung Opus P11E-A: (1) AP prefix clarification rõ trong §5 header + §1.3 + §11.1; (2) Truth table per-claim note dưới §4.5.
- ✅ OPEN P11E-α..κ + TD P11E-1..6 rõ với resolve path defer (§9).
- ✅ P44-6 deferred — không khởi động trong P11E-A.
- ✅ Anti self-contradiction P11E ↔ P11C ↔ P11D ↔ P44-4A ↔ P44-5A ↔ P6: PASS (§10 R13 + §13 cross-check).
- ✅ Naming convention độc lập P6: P6 dùng
{TYPE}-{DOMAIN}-{SEQ}(BG/PE/DOT-LU/UV/...); P11E dùngAP-CHECKER-C{group}-{TYPE}-{SEQ}. Không collision.
§14. AP-CLOSE
§14.1 P11E-A polish diff (so với P11E full draft S190)
6 chỉnh GPT:
- Đổi
checker_status→checker_run_status— xuyên suốt §0, §4.3 (header + table + output structure), §4.4, §4.5 (truth table column), §6 (pipeline), §8.1 (matrix), §9.2 TD-6, §11.2. - Naming
AP-CHECKER-C{group}-{TYPE}-{SEQ}— §5 header + clarification + apply mọi sub-checker ID trong §5.1, §5.2 (cả C2a + C2b), §5.3, §5.4. - §4.5 Checker outcome truth table — thêm mới với 4 case core + per-claim note (bổ sung Opus #2).
- C2 split — §5.2 reorganize hoàn toàn: C2a Legal Phase 1 (VER-01..04) + C2b Non-legal defer (VER-05..07); cập nhật §4.4 + §7.1 + §8.1 + §10 R18.
- NON-NORMATIVE EXAMPLE annotations — thêm tại §4.3 (CheckerOutput), §5.1.3 (numeric_claims), §5.2.4 (version_refs), §5.4.5 (code_bindings), §7.1 footer.
- Path
closure/chốt — header + §12.1 + reflexive note "không lưỡng lự".
7 trả lời Q11-Q17 đã apply trong full draft + refine wording trong polish.
2 bổ sung Opus:
- (1) AP prefix clarification rõ trong §5 header + §1.3 guardrail 7 + §11.1.
- (2) Truth table per-claim note dưới §4.5.
Risk thêm: R16 schema sketch DDL confusion / R17 AP prefix DOT/APR confusion / R18 C2 legal vs non-legal mix.
§14.2 Chưa làm (cố tình — kỷ luật scope)
- ❌ Không SQL thật / DDL / code / migration script / mutate production.
- ❌ Không thiết kế numeric_claim_vocab table, source_of_truth_registry table.
- ❌ Không execute audit/query trên production.
- ❌ Không mở P44-6.
- ❌ Không sửa P38-XC, P44-3/4A/5A, P11A/C/D, P6, Đ22, Đ35, Đ4, Đ0-B.
- ❌ Không đặt tên DOT thật.
- ❌ Không claim runtime proof bằng data thật.
- ❌ Không mở rộng sang Đ39 KG / Đ34 BPMN / Qdrant / Directus UI / Nuxt UI.
- ❌ Không tạo decision log.
§14.3 P11E KHÔNG CHỐT (defer table)
| # | Không chốt | Defer đến |
|---|---|---|
| (i) | numeric_claims schema final + extraction infrastructure | Đ39 mature + P44-6 |
| (ii) | source_of_truth_registry schema | APR + P44-6 |
| (iii) | version_refs schema final + extraction (cả C2a + C2b) | Đ39 mature + P44-6 |
| (iv) | code_bindings/config_bindings/pg_object_bindings schema | P44-6 |
| (v) | DOT names thật cho C1-C4 (AP-CHECKER là proof-layer, không DOT thật) | P44-6/APR |
| (vi) | Schedule cụ thể cho C1-C4 cron | P44-6 + benchmark |
| (vii) | Severity threshold số (low confidence cutoff, drift cluster %) | Pilot + benchmark |
| (viii) | Auto-suggest implementation pattern + APR review template | OPEN P11E-ζ + P44-6 |
| (ix) | C4a vocab framework boundary (Đ24 vs C4a) | OPEN P38-X-11 + cross-cutting APR |
| (x) | C4b PG introspection mechanism | Đ33 enacted + P44-6 |
| (xi) | C4c code AST infrastructure | Post-Tier 4 + future |
| (xii) | NOT_READY → READY promotion criteria coverage % threshold | APR + pilot (pilot-defined) |
| (xiii) | C3 wrapper API design hybrid implementation | P44-6 + P44-5A implementation |
| (xiv) | system_issues schema extension cho checker_run_status dimension |
Đ22 amend hoặc P44-6 |
| (xv) | C2b Non-legal expansion (profile/design-doc/object versions) full activation | C2a PASS + Đ39 mature |
| (xvi) | Design-doc registry (cho C2b VER-06) | APR + future |
§14.4 Sau P11E uploaded — định hướng IU-0
User định hướng (S190+): KHÔNG mở P44-6 ngay. Mở IU-0 — Information Unit Minimum Standard & Packaging Plan (outline) để:
- Chốt schema chuẩn chung Incomex (không riêng TAC/Đ38).
- Định nghĩa packaging tối thiểu để dùng ngay.
- Vector contract align P5 INV-CHUNK-SINGLE-UV.
- Protection guardrails cho schema/code miếng thông tin.
- Slice-based editing workflow để tránh rewrite docs dài.
- Pilot dogfooding với docs Đ44/P38/P11/IU-0.
P44-6 defer cho đến khi Đ44 enacted v1.0 + APR cấp high + IU-0 PASS.
P11E-A POLISH | S190+ (2026-05-02) | Soạn: Opus 4.7 | Outline PASS S190 → Full draft S190 → P11E-A polish 6 chỉnh GPT review (checker_run_status rename + AP-CHECKER naming + outcome truth table + C2 split C2a/C2b + NON-NORMATIVE EXAMPLE annotations + path closure/ chốt) + 7 trả lời Q11-Q17 + 2 bổ sung Opus (AP prefix clarification + truth table per-claim note) | Stage: Logical Proof Design only — runtime proof defer Pilot Tier 1 | Phụ thuộc: P11A inventory + P38-XC final + P44-3 + P44-4A + P44-5A + P11C/D closures + P6 v0.2 precedent | Self-audit Hiến pháp + 10 guardrails + 6 chỉnh GPT P11E-A + 7 Q + 2 bổ sung + anti self-contradiction P11E ↔ P11C ↔ P11D ↔ P44-4A ↔ P44-5A ↔ P6: PASS, không phát hiện xung đột | Trạng thái: uploaded knowledge/dev/laws/dieu38-trien-khai/closure/p11e-checker-proof-design.md