KB-2206 rev 3
Điều 28 — Chỉ Mục Thiết Kế / Triển Khai UI Template
7 min read Revision 3
dieu28indexinventorytemplatesproductslegacy2026-05-08
ĐIỀU 28 — Chỉ Mục Thiết Kế / Triển Khai UI Template
Living document | 2026-05-08 rev3 — Agent live inventory data merged + GPT corrections Mục đích: Kệ tập trung gom thiết kế, kiểm kê, sản phẩm, migration, blockers liên quan Điều 28 phụ lục Caveat: Nuxt findings = LOCAL_FACT (local copy mtime 2026-04-02). VPS reverify bắt buộc trước implementation.
1. Source documents
(Giữ nguyên rev1 — 5 laws, 5 SSOT, 9 reports, 3 P3D evidence đều verified.)
Thêm:
| Path | Loại |
|---|---|
dieu28-trien-khai/reports/d28-nuxt-ui-template-live-inventory-verification-report.md |
Agent report PARTIAL |
dieu28-trien-khai/reviews/opus-review-d28-nuxt-ui-template-live-inventory-report-2026-05-08.md |
Opus review |
dieu44-trien-khai/reviews/gpt-review-d28-live-inventory-report-and-next-directive-2026-05-08.md |
GPT final review |
2. Templates / khuôn (Agent-verified)
| Code | Tên | Status | Source | Evidence |
|---|---|---|---|---|
| TPL-001 | DirectusTable/SharedDirectusTable | ACTIVE ✅ | LOCAL_FACT + LIVE_FACT | 595 lines, 20 refs, code proof P3D4C2U |
| TPL-002 | DirectusMatrix | EXISTS ✅ | LOCAL_FACT | components/shared/DirectusMatrix.vue + MatrixView.vue |
| TPL-003 | CommentModule | EXISTS | LOCAL_FACT | components/modules/comment-module/ |
| TPL-004 | WorkflowModule | EXISTS (partials) | LOCAL_FACT | components/modules/workflow-module/ nested |
| TPL-005 | TaskModule | NEEDS_REVIEW | LOCAL_FACT | No symbol match — may be under different name |
| TPL-006 | InspectorDOT | NEEDS_REVIEW | Đ28 v1.0 only | Not verified live |
| TPL-007 | BirthTrigger | ACTIVE ✅ | PG confirmed | |
| — | DocsTreeView | EXISTS | LOCAL_FACT | Product-specific, NOT reusable template |
| — | DirectusTimeline | MISSING | LOCAL_FACT | No symbol, no UTimeline usage |
| — | DirectusForm | MISSING | LOCAL_FACT | No symbol |
3. Products — table_registry (21 live, 14 KB, 7 MISSING_FROM_KB)
| id | table_id | collection | status | page_url | KB | tableIdMap |
|---|---|---|---|---|---|---|
| 1 | tbl_workflow_list | workflows | active | /knowledge/workflows | ✅ | ✅ workflow |
| 2 | tbl_workflow_steps | workflow_steps | active | /workflows/[id]?tab=matrix | ❌ | ✅ workflow_step |
| 3 | tbl_workflow_timeline | workflow_steps | active | /workflows/[id]?tab=diagram | ❌ | — (tab route) |
| 4 | tbl_wcr_list | workflow_change_requests | active | /workflows/[id]?tab=wcr | ❌ | ✅ wcr |
| 5 | tbl_modules_list | tasks | active | /knowledge/modules | ❌ | — (non-registry) |
| 6 | tbl_tasks_list | tasks | active | /knowledge/current-tasks | ❌ | ✅ task |
| 7 | tbl_proposals_list | table_proposals | published | /admin/proposals | ✅ | ✅ table_proposal |
| 8 | tbl_meta_catalog | meta_catalog | active | /knowledge/registries | ✅ | ✅ catalog |
| 9 | tbl_registry_dot_tools | dot_tools | published | /registries/dot_tool | ✅ | ✅ dot_tool |
| 10 | tbl_registry_ui_pages | ui_pages | published | /registries/page | ✅ | ✅ page |
| 11 | tbl_registry_collections | collection_registry | published | /registries/collection | ✅ | ✅ collection |
| 12 | tbl_registry_agents | agents | published | /registries/agent | ✅ | ✅ agent |
| 13 | tbl_registry_modules | modules | published | /registries/module | ✅ | ✅ module |
| 14 | tbl_registry_checkpoint_types | checkpoint_types | published | /registries/checkpoint_type | ❌ | ✅ checkpoint_type |
| 15 | tbl_registry_checkpoint_sets | checkpoint_sets | published | /registries/checkpoint_set | ❌ | ✅ checkpoint_set |
| 16 | tbl_registry_entity_dependencies | entity_dependencies | published | /registries/entity_dependency | ✅ | ✅ entity_dependency |
| 17 | tbl_checkpoint_instances | checkpoint_instances | published | /registries/checkpoint_instance | ✅ | ✅ checkpoint_instance |
| 18 | tbl_registry_changelog | registry_changelog | published | /registries/changelog | ✅ | ✅ changelog |
| 19 | tbl_table_registry | table_registry | published | /registries/table | ✅ | ✅ table |
| 20 | tbl_system_issues | system_issues | published | /registries/system_issue | ✅ | ✅ system_issue |
| 21 | tbl_event_outbox | event_outbox | draft | /registries/event_outbox | ✅ | ❌ MISSING |
Summary: 18/21 in tableIdMap. 3 not in map: tbl_workflow_timeline (tab route), tbl_modules_list (non-registry route), tbl_event_outbox (BLOCKED).
4. Tools (Agent-verified)
| Tool | Status | Source | Notes |
|---|---|---|---|
| DirectusTable.vue | ✅ 595 lines | LOCAL_FACT | |
| useDirectusTable.ts | ✅ 196 lines | LOCAL_FACT | |
| table_registry | ✅ 21 rows | LIVE_FACT | |
| tableIdMap | 18 entries hardcoded | LOCAL_FACT | CONFIRMED_ISSUE |
| collectionMap (detail-sections.ts) | Hardcoded | LOCAL_FACT | CONFIRMED_ISSUE |
| collectionMap mirror (relations.get.ts) | Hardcoded | LOCAL_FACT | CONFIRMED_ISSUE |
| CI enforce-table-rule.yml | ✅ Exists — <table> HTML only |
LOCAL_FACT | Does NOT check tableId↔registry |
| dot-schema-snapshot/diff | ❌ MISSING local | LOCAL_FACT | |
| Route smoke | ❌ Not automated | — | |
| Custom Code Registry | ✅ rev 7 | KB_DOC_FACT | Last update 2026-03-04 |
| Server API routes | 45 custom .ts | LOCAL_FACT |
Hardcoded maps: 3 CONFIRMED_ISSUE.
5. Legacy / rác (Agent-classified)
| # | Item | Classification | Notes |
|---|---|---|---|
| 1 | tableIdMap 18 entries | QUARANTINE | Giữ tạm, thay bằng generated map |
| 2 | collectionMap + mirror | MIGRATE (2 files) | CONFIRMED_ISSUE |
| 3 | DirectusDataTable | 0 hits local | |
| 4 | 11 UTable trực tiếp (knowledge/admin) | MIGRATE | LIKELY_ISSUE |
| 5 | 7 UTable trực tiếp (portal layer) | NEEDS_REVIEW | Domain ownership unclear |
| 6 | 1 HTML <table> MatrixView |
MIGRATE | LIKELY_ISSUE |
| 7 | 6 business calc .reduce() in pages | MIGRATE | Should be PG→Directus→render |
| 8 | Direct PG from Nuxt | CLEAR ✅ | 0 hits |
6. Migrations (priority order)
| Priority | From → To | Status |
|---|---|---|
| P0 | 3 hardcoded maps → auto-generated from table_registry | Blocked by design |
| P1 | 11 UTable → DirectusTable | Blocked by VPS reverify |
| P2 | 6 business calcs → PG views | |
| P3 | HTML table MatrixView | |
| P4 | 7 portal UTable | Needs domain review |
| DirectusDataTable → DirectusTable | COMPLETED ✅ |
7. Blockers
| Blocker | Impact | Path |
|---|---|---|
| 3 hardcoded maps | Blocks new registry tables | Design plan Option C/D |
| tbl_event_outbox draft | P3D at 90% | Waits for map fix |
| No route smoke | Manual only | Design plan §2 |
| 7 KB missing rows | Inventory gap (non-blocking) | Sync later |
| Nuxt = LOCAL_FACT | Cannot implement yet | VPS reverify first |
Điều 28 Chỉ Mục | Rev3 | Agent data + GPT corrections | 2026-05-08