KB-3546

D28 — Nuxt/UI/Template Live Inventory Verification Report

22 min read Revision 1
dieu28reportinventoryverificationread-only2026-05-08

D28 — Nuxt/UI/Template Live Inventory Verification Report

Date: 2026-05-08 Agent: Claude Opus 4.7 (1M context) — local workstation execution Prompt rev: 2 Status: PARTIAL (live Directus + KB verified; Nuxt grep performed against LOCAL working copy at /Users/nmhuyen/Documents/Manual Deploy/web-test/web — see §0 caveat)


§0. Execution caveat — codebase source

  • Nuxt code was inspected on the local working copy at /Users/nmhuyen/Documents/Manual Deploy/web-test/web, not on VPS SSOT (/opt/incomex per memory).
  • Most-recent .vue/.ts mtime in local web/ = 2026-04-02 (~36 days before report date 2026-05-08).
  • VPS may have changes not present locally. All Nuxt findings are LOCAL_FACT (subset of LIVE_FACT) — must be re-verified on VPS before any action.
  • Live Directus query went to https://directus.incomexsaigoncorp.vn (auth via .env.local admin email/password). KB list went to Agent Data MCP. These are LIVE_FACT.

Attestation

d28_appendix_status=DRAFT_FOR_INVENTORY
read_only_attestation=true
file_writes=0          # only the report itself, via upload_document (allowed by prompt §C6)
directus_mutations=0   # all GET-only
pg_mutations=0
deploy_actions=0
nuxt_edits=0
package_installs=0
final_route_option_selected=false

§1. table_registry reconciliation

total_live_rows=21              # source: GET /items/table_registry (LIVE_FACT)
total_kb_docs=14                # source: list_documents path=registries/table_registry/ (LIVE_FACT)
missing_from_kb_count=7
orphaned_kb_count=0

1A. Live rows (21) — LIVE_FACT

id table_id collection status page_url module
1 tbl_workflow_list workflows active /knowledge/workflows M-002
2 tbl_workflow_steps workflow_steps active /knowledge/workflows/[id]?tab=matrix M-002
3 tbl_workflow_timeline workflow_steps active /knowledge/workflows/[id]?tab=diagram M-002
4 tbl_wcr_list workflow_change_requests active /knowledge/workflows/[id]?tab=wcr M-002
5 tbl_modules_list tasks active /knowledge/modules M-003
6 tbl_tasks_list tasks active /knowledge/current-tasks Core
7 tbl_proposals_list table_proposals published /admin/proposals M-003
8 tbl_meta_catalog meta_catalog active /knowledge/registries (none)
9 tbl_registry_dot_tools dot_tools published /knowledge/registries/dot_tool (none)
10 tbl_registry_ui_pages ui_pages published /knowledge/registries/page (none)
11 tbl_registry_collections collection_registry published /knowledge/registries/collection (none)
12 tbl_registry_agents agents published /knowledge/registries/agent (none)
13 tbl_registry_modules modules published /knowledge/registries/module (none)
14 tbl_registry_checkpoint_types checkpoint_types published /knowledge/registries/checkpoint_type (none)
15 tbl_registry_checkpoint_sets checkpoint_sets published /knowledge/registries/checkpoint_set (none)
16 tbl_registry_entity_dependencies entity_dependencies published /knowledge/registries/entity_dependency (none)
17 tbl_checkpoint_instances checkpoint_instances published /knowledge/registries/checkpoint_instance (none)
18 tbl_registry_changelog registry_changelog published /knowledge/registries/changelog (none)
19 tbl_table_registry table_registry published /knowledge/registries/table (none)
20 tbl_system_issues system_issues published /knowledge/registries/system_issue (none)
21 tbl_event_outbox event_outbox draft /knowledge/registries/event_outbox (none)

1B. KB synced docs (14) — LIVE_FACT

tbl_checkpoint_instances, tbl_event_outbox, tbl_meta_catalog, tbl_proposals_list, tbl_registry_agents, tbl_registry_changelog, tbl_registry_collections, tbl_registry_dot_tools, tbl_registry_entity_dependencies, tbl_registry_modules, tbl_registry_ui_pages, tbl_system_issues, tbl_table_registry, tbl_workflow_list

1C. Reconciliation

MISSING_FROM_KB (live rows without registries/table_registry/<table_id> doc) — 7 rows:

  1. tbl_workflow_steps
  2. tbl_workflow_timeline
  3. tbl_wcr_list
  4. tbl_modules_list
  5. tbl_tasks_list
  6. tbl_registry_checkpoint_types
  7. tbl_registry_checkpoint_sets

(Index doc previously stated "6 unreconciled" — actual count is 7. Index needs amend.)

ORPHANED_KB_DOC: 0. All 14 KB docs map to live rows.

Source classification: LIVE_FACT (both sides queried live in this session).

1D. Route-resolution evidence — LIVE_FACT

rows_collection_equals_entityType_token=1     # only event_outbox (collection=event_outbox, page_url tail=event_outbox)
rows_page_url_convention_match=13              # /knowledge/registries/{entityType} pattern (rows 9-21)
rows_needing_exception=8                       # rows 1-8 (workflow tabs, modules, current-tasks, /admin/proposals, /knowledge/registries index)
runtime_query_auth_issue=NEEDS_REVIEW          # Public Access role allowlist for table_registry not verified live in this session
final_route_option_selected=false

Notes for §C5 of prompt:

  • "Collection = entityType" direct match is rare because most live collection values are plural (workflows, agents, modules, checkpoint_types, …) while tableIdMap keys (and the entityType URL segment) are singular. Naive collection==entityType resolution would fail for ≥ 18 / 21 rows; only event_outbox aligns.
  • "page_url ends with /{entityType}" is the most reliable convention (13/21), but the 8 exception rows include the operationally important workflow detail tabs and tasks/modules pages. Any final design must accommodate query-string ?tab= variants and non-/knowledge/registries/ routes.
  • LAW does not select option (per appendix §5). Evidence above is for design plan only.

§2. Templates / khu mẫu — status (LOCAL_FACT)

Template File Lines Status Source classification
TPL-001 DirectusTable / SharedDirectusTable components/shared/DirectusTable.vue 595 EXISTS + 20 in-repo references across pages/composables LOCAL_FACT
useDirectusTable composable composables/useDirectusTable.ts 196 EXISTS LOCAL_FACT
TPL-002 DirectusMatrix components/shared/DirectusMatrix.vue (not measured) EXISTS + components/templates/MatrixView.vue wrapper + pages/knowledge/registries/species/index.vue consumer LOCAL_FACT (upgrade vs index.md "Planned")
DirectusTimeline MISSING in local. No DirectusTimeline symbol; no <UTimeline>/<UStepper> usages found LOCAL_FACT
DirectusForm MISSING in local. No DirectusForm symbol LOCAL_FACT
DocsTreeView components/DocsTreeView.vue (not measured) EXISTS + KnowledgeTreeItem.vue, KnowledgeTree.vue, composables useKnowledgeTree.ts, useTaxonomyTree.ts; consumed by pages/knowledge/index.vue and pages/knowledge/[...slug].vue LOCAL_FACT
TPL-003 CommentModule components/modules/comment-module/CommentModule.vue (+ partials) (not measured) EXISTS + consumed by pages/knowledge/[...slug].vue and pages/knowledge/workflows/[id].vue LOCAL_FACT
TPL-004 WorkflowModule components/modules/workflow-module/... (referenced as ModulesWorkflowModulePartialsStepsTimeline, …InlineWcrPopup, …WcrIntakePanel) (not measured) EXISTS as nested partials LOCAL_FACT
TPL-005 TaskModule not directly grep-named as TaskModule.vue NEEDS_REVIEW: useWorkflows.ts and types/workflows.ts reference "WorkflowModule" only; no TaskModule symbol matched. May be implemented under different name (current-tasks pages exist) LOCAL_FACT / NEEDS_REVIEW
Workflow supervisor UI pages/knowledge/workflows/index.vue, pages/knowledge/workflows/[id].vue EXISTS as workflow pages. "Supervisor" string appears only in components/ai/CreateDiscussionModal.vue (Gemini description) and pages/admin/super-session.vue (role label). No dedicated supervisor template. LOCAL_FACT

§3. Tools

3A. Hardcoded tableIdMap — LOCAL_FACT (CONFIRMED_ISSUE)

File: pages/knowledge/registries/[entityType]/index.vue (lines 39–58) Entry count: 18

catalog              -> tbl_meta_catalog
table                -> tbl_table_registry
module               -> tbl_registry_modules
workflow             -> tbl_workflow_list
workflow_step        -> tbl_workflow_steps
wcr                  -> tbl_wcr_list
dot_tool             -> tbl_registry_dot_tools
page                 -> tbl_registry_ui_pages
collection           -> tbl_registry_collections
task                 -> tbl_tasks_list
agent                -> tbl_registry_agents
checkpoint_type      -> tbl_registry_checkpoint_types
checkpoint_set       -> tbl_registry_checkpoint_sets
entity_dependency    -> tbl_registry_entity_dependencies
table_proposal       -> tbl_proposals_list
checkpoint_instance  -> tbl_checkpoint_instances
changelog            -> tbl_registry_changelog
system_issue         -> tbl_system_issues

Coverage gap vs live (21 rows):

  • event_outbox → tbl_event_outbox: NOT in tableIdMap (live row 21, status=draft).
  • Workflow tabs tbl_workflow_timeline and tbl_wcr_list are accessed via workflow detail page, not via [entityType] route — so missing from tableIdMap is by design (NEEDS_REVIEW for the design plan, not a defect of this map).
  • Net: route /knowledge/registries/event_outbox will resolve tableId='' until either tableIdMap is amended or dynamic resolution lands. (Prompt forbids amending — flag only.)

Other hardcoded maps found (LOCAL_FACT, classification noted):

  • config/detail-sections.ts:227collectionMap: Record<string, string> (entity→collection map). CONFIRMED_ISSUE for §0-AU/§5 of appendix.
  • config/detail-sections.ts:252 — reverse collection→entityType derived from above.
  • server/api/discovery/relations.get.ts:19 — comment "mirrors collectionMap in detail-sections.ts" → second hardcoded mirror. CONFIRMED_ISSUE.
  • server/api/registry/matrix.get.ts:66, 81 — runtime collectionMap, entityMap built from data (not hardcoded). FALSE_POSITIVE for the hardcoded-map concern.

3B. Nuxt session middleware — LOCAL_FACT

middleware/session.global.ts (1031 bytes, mtime 2026-02-15):

  • PUBLIC_PREFIXES = ['/knowledge', '/posts', '/projects', '/blueprints', '/help']
  • Public routes skip session cookie creation (P28 CDN fix). /knowledge/registries/* falls under /knowledge → public-cacheable.
  • middleware/auth.ts exists (1034 bytes) — content not inspected here.

3C. dot-schema tools — LOCAL_FACT

grep dot-schema-snapshot|dot-schema-diff across web/, tools/, scripts/, *.ts/.sh/.js (excluding node_modules/.nuxt/.output): 0 hits. find for *dot-schema*: 0 files. → MISSING in this checkout (NEEDS_REVIEW vs VPS).

3D. CI enforce-table-* — LOCAL_FACT

  • File present: /.github/workflows/enforce-table-rule.yml (NB: name is enforce-table-rule.yml, not enforce-table-module.yml per Index/Prompt).
  • Trigger: pull_request on web/**/*.vue.
  • Check: greps <table HTML usage; allows files with <!-- TABLE-EXCEPTION: reason --> comment; otherwise fails CI.
  • Does NOT check tableId↔table_registry compliance, custom-code-registry membership, or DirectusTable usage. Scope = HTML-table block only.
  • Other workflows present: nuxt-ci.yml, guard_critical_files.yml, required-docs-guard.yml, dieu31-vps-setup.yml, e2e-test.yml, sync-check.yml, deploy.yml, post-deploy-e2e.yml, ops-smoke.yml, deploy-vps.yml.

3E. Custom Code Registry — KB_DOC_FACT

knowledge/dev/ssot/custom-code-registry.md: revision 7, last update 2026-03-04 (per body). Content truncated at 500 chars in summary read; only one entry visible in the snippet (web/server/middleware/strip-knowledge-cookie.ts). Total entries not counted (NEEDS_REVIEW: full read needed via get_document_for_rewrite if exact count required, but prompt forbids rewrite — leave as KB_DOC_FACT, count=unknown).

custom_code_registry_status=EXISTS
custom_code_registry_revision=7
custom_code_registry_last_update=2026-03-04
custom_code_registry_entries=NEEDS_REVIEW

§4. Legacy / rác (classified per §C2)

4A. DirectusDataTable references — LOCAL_FACT

Grep result: 0 hits outside node_modules/.nuxt/.output. Classification: FALSE_POSITIVE for "should be replaced". Migration appears already complete (matches assembly-step3-deploy-report.md historical claim). Index entry "DirectusDataTable.vue (639 lines) MIGRATE or DELETE" is STALE_OR_UNCONFIRMED.

4B. Direct <UTable> outside DirectusTable.vue — LOCAL_FACT (20 hits)

File Line Classification Notes
layers/portal/components/TaskList.vue 106 NEEDS_REVIEW Portal layer — separate concern from /knowledge
layers/portal/components/TaskWidget.vue 96 NEEDS_REVIEW Portal layer
layers/portal/components/MessageList.vue 129 NEEDS_REVIEW Portal layer
layers/portal/components/InvoiceWidget.vue 62 NEEDS_REVIEW Portal layer
layers/portal/pages/portal/projects/index.vue 143 NEEDS_REVIEW Portal layer
layers/portal/pages/portal/billing/invoices/[id].vue 182 NEEDS_REVIEW Portal layer
layers/portal/pages/portal/billing/invoices/index.vue 199 NEEDS_REVIEW Portal layer
components/registries/SectionDependency.vue 83 LIKELY_ISSUE Inside registry shared section — should consider DirectusTable
components/registries/SectionRelation.vue 103 LIKELY_ISSUE Same as above
components/shared/DirectusMatrix.vue 200 FALSE_POSITIVE Internal to TPL-002 implementation
components/modules/workflow-module/partials/ProcessRegistryView.vue 313 LIKELY_ISSUE Listed in Index P1 as 389-line MIGRATE candidate
pages/admin/users.vue 13 NEEDS_REVIEW Admin route, may be acceptable
pages/knowledge/pivot/index.vue 46 LIKELY_ISSUE /knowledge route
pages/knowledge/registries/index.vue 552, 638, 669 LIKELY_ISSUE Registries index uses 3 raw UTables; CONFIRMED contains business-calc reductions (see 4F)
pages/knowledge/registries/system_issue/index.vue 70 LIKELY_ISSUE
pages/knowledge/registries/system_issue/[issue_class].vue 80 LIKELY_ISSUE
pages/knowledge/registries/system_issue/[issue_class]/[sub_class].vue 61 LIKELY_ISSUE
pages/knowledge/registries/health/index.vue 87 LIKELY_ISSUE

Counts: CONFIRMED_ISSUE=0, LIKELY_ISSUE=11, NEEDS_REVIEW=8, FALSE_POSITIVE=1.

4C. Custom HTML <table> — LOCAL_FACT (1 hit)

File Line Classification
components/templates/MatrixView.vue 154 LIKELY_ISSUE — would trip enforce-table-rule.yml unless TABLE-EXCEPTION comment present (not verified inline)

4D. Direct PG access from Nuxt — LOCAL_FACT

Grep from 'pg'|require('pg')|knex|sequelize|prisma|createPool: 0 hits outside node_modules. Classification: FALSE_POSITIVE as a concern — no direct PG client usage in Nuxt code. Confirms appendix §13 compliance.

4E. Hardcoded entity/collection maps elsewhere — LOCAL_FACT

Already enumerated in §3A. CONFIRMED_ISSUE = 3 (pages/knowledge/registries/[entityType]/index.vue:39, config/detail-sections.ts:227, server/api/discovery/relations.get.ts:19). FALSE_POSITIVE = 1 (server/api/registry/matrix.get.ts — runtime, not hardcoded).

4F. Business calculation in pages — LOCAL_FACT

grep .reduce(\|aggregate\|.sum\b pages/:

  • pages/knowledge/registries/index.vue:152, 153, 161, 162.reduce summing delta_plus, delta_minus, record_count, orphan_count across level details. Classification: LIKELY_ISSUE (appendix §13 — should be PG view → Directus → Nuxt render).
  • pages/knowledge/registries/[entityType]/index.vue:100, 101 — total record_count and orphan_count via .reduce. Classification: LIKELY_ISSUE (same reasoning).

Counts: LIKELY_ISSUE=6, sample only — full audit not performed (prompt allowed head -30).

4G. Server APIs — LOCAL_FACT

web/server/ exists. web/server/api/ subdirs: agent, agent-data, ai, directus, discovery, docs, health.get.ts, knowledge, registries, registry, transitive, workflows. Total .ts route files: 45.

Classification counts (across §4)

grep_confirmed_issues=3        # the three hardcoded maps
grep_likely_issues=18          # 11 (4B) + 1 (4C) + 6 (4F)
grep_false_positives=2         # DirectusDataTable absent; no direct PG client
grep_needs_review=8            # portal layer + admin + TaskModule presence

§5. Page / route inventory — LOCAL_FACT

total_pages=52 (count of *.vue in pages/).

Tree highlights: pages/knowledge/registries/[entityType]/{index,[id]}.vue is the dynamic registry shell (where tableIdMap lives). Static specialised pages in pages/knowledge/registries/: all/, changelog/, health/, index.vue, matrix/, species/, system_issue/, taxonomy/, unmanaged/. Workflow pages: pages/knowledge/workflows/{index,[id]}.vue. Tasks: pages/knowledge/current-tasks/{index, [id], [id]/[tab]}. Approvals: pages/approval-desk/{index,[id]}.vue.

Full listing captured in transcript (52 entries; abbreviated here per prompt format).


§6. Data source summary

live_facts_count=8              # §1 reconciliation, §1D evidence, §3D CI exists, §3B middleware, §4D no-PG-client, §4G server-route count, §1A live rows, §1B KB list
local_facts_count=14            # §2 templates, §3A tableIdMap, §3C dot-schema-missing, §4A-§4G grep findings (subset of live, but limited to local checkout)
kb_doc_facts_count=2            # §3E custom-code-registry, §1B KB list
historical_report_facts_count=0 # none promoted to facts; index references treated as STALE_OR_UNCONFIRMED until live-verified
stale_or_unconfirmed_count=4    # index "Planned DirectusMatrix" (now LOCAL_FACT EXISTS), index "6 unreconciled" (actually 7), index "DirectusDataTable 639 lines" (0 hits), custom-code-registry full entry count

(LOCAL_FACT is a subset of LIVE_FACT in this report's taxonomy: queried directly in this session, but bound to the local checkout's currentness.)


§7. Cleanup taxonomy (provisional, NEEDS council review)

Per appendix §8 categories, applied only to items with strong evidence:

KEEP=4
  - components/shared/DirectusTable.vue (TPL-001 active)
  - composables/useDirectusTable.ts
  - components/shared/DirectusMatrix.vue (TPL-002 active per LOCAL_FACT)
  - components/DocsTreeView.vue (active)

MIGRATE=14
  - 11 LIKELY_ISSUE pages with raw <UTable> in /knowledge or /admin scope (§4B)
  - 1 custom <table> in MatrixView.vue (§4C)
  - 2 hardcoded maps in config/detail-sections.ts and server/api/discovery/relations.get.ts (§3A)

QUARANTINE=1
  - tableIdMap @ pages/knowledge/registries/[entityType]/index.vue:39
    Reason: Appendix §5 marks as critical gap; design-plan must replace, but until then code must remain to keep registry routes working.

DELETE=0
  (No clearly orphaned code identified within scope.)

UNKNOWN=10
  - 7 portal-layer UTable usages (§4B) — domain ownership unclear
  - TPL-005 TaskModule presence (§2)
  - 6 business-calc reductions in pages (§4F) — may be legitimate UI aggregation per case
  - dot-schema-snapshot/dot-schema-diff tooling (§3C)

(Only KEEP is asserted with confidence. Other buckets are evidence packets, not commitments.)


§8. Items the prompt explicitly forbade — confirmed NOT done

nuxt_edit=NO
directus_mutation=NO
pg_mutation=NO
file_writes=NO     # report upload only (allowed by §C6)
publish=NO
deploy=NO
package_install=NO
tableIdMap_amended=NO
event_outbox_added_to_tableIdMap=NO
tbl_event_outbox_published=NO
p3d_resume=NO
final_route_option_selected=NO
d28_appendix_finalized=NO

  1. VPS reverification of §2/§3/§4 — local checkout is ~36 days behind. A claude-go agent on VPS should re-run the §2-§4 greps against /opt/incomex before any cleanup pack is written. (Reference memory: feedback_git_commit_after_vps_edit.md — VPS = SSOT.)
  2. Reconcile gap = 7 (not 6) — index doc d28-ui-template-design-implementation-index.md line "6 unreconciled table_registry rows" should be amended after council review (not by this report).
  3. Custom Code Registry full entry count — needs explicit read; prompt forbade rewrite, so count remains UNKNOWN.
  4. Public Access role allowlist for table_registry collection — not queried in this session (would need /permissions?filter[role][_null]=true&filter[collection][_eq]=table_registry GET). Required for §1D runtime_query_auth_issue resolution.

Verification block

no_nuxt_edit=true
no_directus_mutation=true
no_pg_mutation=true
no_file_writes=true               # only report upload, allowed by §C6
no_publish=true
no_deploy=true
scope=READ_ONLY_INVENTORY
d28_appendix_status=DRAFT_FOR_INVENTORY
final_route_option_selected=false
report_uploaded=PASS

D28 Live Inventory Verification Report | 2026-05-08 | READ-ONLY | PARTIAL (local-checkout-bound) | Opus 4.7

Back to Knowledge Hub knowledge/dev/laws/dieu28-trien-khai/reports/d28-nuxt-ui-template-live-inventory-verification-report.md