KB-69F9
Phụ lục Điều 3 — Description Templates
3 min read Revision 1
lawappendixdieu3descriptiontemplate
PHỤ LỤC ĐIỀU 3 — DESCRIPTION TEMPLATES
Tính chất: Documentation mirror. Runtime SSOT =
dot_config(Đ3 §2.6). Khi thay đổi: UPDATEdot_configTRƯỚC, cập nhật phụ lục SAU. Ngày tạo: 2026-04-22 S178 Fix 28 (Description Governance Package)
§A.1 — Template per entity type
| source_table | dot_config key | Template | Placeholders (D/C) | Output ví dụ |
|---|---|---|---|---|
dot_tools |
desc_template_dot_tools |
[{tier}] [{domain}] {trigger_type} trigger. Operation: {operation}. Paired: {paired_dot}. |
tier(D), domain(D), trigger_type(D), operation(D), paired_dot(D) | [B] [context.pack] cron trigger. Operation: CONTEXT_PACK_BUILD. Paired: DOT-CONTEXT-PACK-VERIFY. |
collection_registry |
desc_template_collection_registry |
[{governance_role}] Collection {code}. Loài: {species_code}. |
governance_role(D), code(D), species_code(C) | [governed] Collection COL-DOT-TOOLS. Loài: registry. |
dot_config |
desc_template_dot_config |
Config key điều khiển {key}. |
key(D) | Config key điều khiển hc_executor_max_runtime_seconds. |
entity_species |
desc_template_entity_species |
Loài [{code}] thuộc lớp {composition_level}. |
code(D), composition_level(D) | Loài [dot] thuộc lớp atom. |
dot_domains |
desc_template_dot_domains |
Domain [{code}] quản lý phạm vi {name}. |
code(D), name(D) | Domain [context.pack] quản lý phạm vi Context Pack. |
| (level) | desc_template_level_atom |
[{status}] Nguyên tử {code} trong {_source_table}. |
status(D), code(D), _source_table(C) | [active] Nguyên tử CP-005 trong checkpoint_types. |
| (level) | desc_template_level_molecule |
[{status}] Phân tử {code} trong {_source_table}. |
status(D), code(D), _source_table(C) | [active] Phân tử CPS-001 trong checkpoint_sets. |
| (level) | desc_template_level_compound |
[{status}] Hợp chất {code} trong {_source_table}. |
status(D), code(D), _source_table(C) | [active] Hợp chất WF-001 trong workflows. |
| (default) | desc_template_default |
[{status}] Entity {code} trong {_source_table}. |
status(D), code(D), _source_table(C) | [active] Entity M-001 trong modules. |
§A.2 — Quy tắc template
- Contract v1 (Đ4 §2.1.1): Key phẳng
[A-Za-z0-9_]+. Không nested. Thiếu/NULL →(chưa có). Nguyên văn, không eval. - Direct vs Computed:
(D)= từto_jsonb(NEW).(C)= từfn_description_context(). - Thêm template mới: INSERT
dot_configkey. 0 sửa code (NT4). - Fallback 4 tầng theo Đ3 §2.6.
- Ngôn ngữ: tiếng Việt có dấu (Đ3 §2.1 C4). Giữ code/enum tiếng Anh.
CHANGELOG
| Ngày | Nội dung |
|---|---|
| S178 Fix 28 (2026-04-22) | Tạo mới. 9 template (5 table-specific + 3 level-default + 1 default). Description Governance Package — Council 2 vòng. |