Integration Audit — Nuxt × Agency OS × Directus Gap Analysis
Integration Audit — Nuxt × Agency OS × Directus Gap Analysis
Date: 2026-02-28 | Source: S 89 (Claude Code CLI audit) | Type: Read-only gap analysis Scope: Toàn bộ Nuxt frontend, Agency OS layers, Directus collections + flows, Agent Data connections
1. NUXT PAGES — Route Inventory
| Metric | Count |
|---|---|
| Total page routes (main pages/) | 32 |
| Portal layer pages (layers/portal/) | 17 |
| Proposals layer pages (layers/proposals/) | 1 |
| Grand total page files | 50 |
URL Accessibility (19 tested on vps.incomexsaigoncorp.vn)
| Status | Count | Routes |
|---|---|---|
| 200 OK | 15 | /, /knowledge, /knowledge/current-tasks, /posts, /login, /register, /profile, /projects, /approval-desk, /blueprints, /help, /auth/signin, /knowledge/modules, /knowledge-tree, /forgot-password |
| 404 Not Found | 4 | /about, /contact, /help/getting-started, /tools |
Accessibility rate: 15/19 = 79% (4 ghost routes — referenced in UI but no page file exists)
2. AGENCY OS USAGE
| Category | Available | Actually Used | % |
|---|---|---|---|
| Portal layer pages | 17 | 0 (portal not activated) | 0% |
| Proposals layer pages | 1 | 0 (no data) | 0% |
| os_* CRM collections | 24 | 0 (all empty) | 0% |
| block_* content blocks | 25 | 0 (all empty) | 0% |
| Portal layer .vue files | 34 | 0 | 0% |
Agency OS utilization: ~0% — CRM/Portal/Proposals/Content-blocks features completely unused. Project uses Directus purely as headless CMS for custom collections.
3. DIRECTUS COLLECTIONS — Data Status
21 collections WITH data
| Collection | Rows | Used by Nuxt? |
|---|---|---|
| knowledge_documents | 117 | Yes (useKnowledge) |
| task_comments | 53 | Yes (useTasks) |
| checkpoint_types | 31 | No (Directus-only flows) |
| agent_views | 22 | Yes (useAgentViews) |
| ai_discussion_comments | 17 | Yes (useAIDiscussions) |
| feedbacks | 9 | No |
| languages | 8 | No (Directus config) |
| ai_discussions | 7 | Yes (useAIDiscussions) |
| checkpoint_rules | 7 | No (Directus-only flows) |
| navigation_items | 6 | No |
| tasks | 4 | Yes (useTasks) |
| help_articles | 3 | No (layer only) |
| pages | 3 | No |
| doc_reviews | 3 | No |
| help_collections | 2 | No (layer only) |
| navigation | 2 | No |
| navigation_navigation_items | 2 | No |
| page_blocks | 2 | No |
| posts | 2 | No (composable exists but 2 posts) |
| content_requests | 2 | Yes (useContentRequests) |
| globals | 1 | No |
75 collections EMPTY — includes all os_* (24), all block_* (25), plus 26 others.
Data density: 21/96 = 22% collections have data.
4. CONNECTION MAP
┌─────────────────────────────────────────────────────────┐
│ NUXT SSR (vps.incomexsaigoncorp.vn) │
│ │
│ Composables (client+SSR): │
│ useKnowledge ──────┐ │
│ useTasks ──────────┤ │
│ useAgentViews ─────┤── readItems() ──► DIRECTUS │
│ useContentRequests─┤ via useDirectus() (8055) │
│ useAIDiscussions ──┤ @directus/sdk v19.1.0 │
│ useBlueprints ─────┘ │
│ │
│ Server API routes: │
│ /api/knowledge/* ──┐ │
│ /api/ai/search ────┤── httpx ──► AGENT DATA (8000) │
│ /api/agent-data/* ─┘ via agentDataAuth.ts │
│ /api/agent/health ─┘ │
│ │
│ /api/directus/[...path] ── proxy ──► DIRECTUS (8055) │
│ /api/health ── local health check │
└─────────────────────────────────────────────────────────┘
┌──────────────────────┐ ┌──────────────────────┐
│ DIRECTUS (8055) │ │ AGENT DATA (8000) │
│ 22 active flows │ │ FastAPI + Qdrant │
│ 7 roles, 96 colls │ │ MCP server (stdio) │
└──────────────────────┘ └──────────────────────┘
┌──────────────────────┐
│ OPS PROXY (nginx) │
│ ops.incomex... │
│ 23 collections │
│ (CONN-FINAL) │
└──────────────────────┘
5. GAPS IDENTIFIED
| # | Gap | Severity | Detail |
|---|---|---|---|
| G1 | 4 ghost routes (404) | Medium | /about, /contact, /help/getting-started, /tools — no page file, may be linked from navigation |
| G2 | Agency OS 0% used | Info | 24 os_* + 25 block_* + 17 portal pages = 66 unused artifacts |
| G3 | 75 empty collections | Low | Schema bloat: 75/96 collections have zero rows |
| G4 | Portal layer dormant | Info | 34 Vue files not activated — billing, projects, files, conversations available |
| G5 | 4 inactive flows | Low | Knowledge sync + Cache invalidation + Checklist gate disabled |
| G6 | posts has only 2 entries | Low | Blog infrastructure exists but barely used |
| G7 | help_articles = 3 | Low | Help center exists but minimal content |
| G8 | No Nuxt composable for os_* | Info | CRM module completely disconnected from frontend |
6. "CẮM LÀ CHẠY" SCORE
| Layer | Score | Explanation |
|---|---|---|
| Core Knowledge (knowledge_documents, Agent Data, MCP) | 95% | 117 docs, full CRUD, vector search, DOT sync — production-ready |
| Tasks & Comments | 90% | 4 tasks, 53 comments, SSR rendering works, DOT sync active |
| AI Discussions | 80% | 7 discussions, 17 comments, auto-approval flow active |
| Content Requests | 70% | 2 entries, flows active, but low usage |
| Blog / Posts | 30% | Infrastructure exists but only 2 posts |
| Help Center | 25% | Pages work, but 3 articles only |
| CRM / Agency OS | 0% | Zero data, zero composables, zero usage |
| Portal (Client Area) | 0% | Layer exists but not activated |
| Content Blocks | 0% | All 25 block collections empty |
Overall "cắm là chạy": ~35% of total available features operational. Custom workflow (actual business use case): ~90%.
7. HÀNH ĐỘNG TIẾP THEO
Xem Operating Rules SSOT + Tech Debt Registry để quyết định mission tiếp theo. Ưu tiên: Assembly First — kích hoạt bằng data/config, KHÔNG code mới.
- Fix ghost routes (G1) — tạo stub pages hoặc xóa navigation links → tất cả links trả 200
- Kích hoạt Agency OS features (G2, G4, G8) — nạp data vào Directus collections → Nuxt tự render
- Content activation (G6, G7) — Blog + Help Center chỉ cần nội dung, code đã DONE
- Schema cleanup (G3) — ẩn/dọn 75 empty collections giảm noise
Generated: 2026-02-28 | Source: Claude Code CLI Integration Audit (S 89)