Five versions shipped. 134 PRs. 1,152 tests. 73 lib modules. The Hub went from file browser (v1) to feature explosion (v2) to polish (v3) to agent intelligence (v4) to cleanup (v5). This document is the strategy for v6.
After 5 versions, the pattern is clear: the web UI is not the product. The context layer is.
Evidence:
| Metric | Count | Honest Assessment |
|---|---|---|
| Lib modules | 73 | ~30 carry real weight. ~20 are partially scaffolded. ~23 should be deleted. |
| API routes | 71 | ~25 are core. ~20 are feature-specific. ~26 are unused or deprecated. |
| Components | 52 | ~25 are essential. ~15 are feature-specific. ~12 are scaffolding. |
| MCP tools | 19 (6 core) | 6 core tools are the product. 13 archived tools should be deleted. |
| Tests | 1,152 | Broad but shallow. Most test existence, not behavior. |
The Hub has 3x more code than it needs. v5 said “cut the dead weight” but added deprecation headers instead of deleting routes, archived tools instead of removing them, and inventoried modules instead of consolidating them. The codebase is still carrying the weight of every ambitious idea from v2–v4.
The Hub is not a web app. It’s a context engine that makes AI assistants smarter about your workspace.
The web UI exists to configure and inspect the engine. The MCP server is the primary interface. The value prop is: “Point it at your directories. Your AI tools instantly understand your entire workspace.”
Three principles:
v5 deprecated. v6 deletes. Remove every line of code that doesn’t serve the context engine.
Actions:
| Target | Current | v6 Target | What to cut |
|---|---|---|---|
| Lib modules | 73 | ~40 | Delete federation, sharing, marketplace, context-manager, SSO, plugin-sandbox, governance, agent-memory, session-tracker, change-pipeline, smart-summary, meeting-briefing (as standalone), config-client (already merged) |
| API routes | 71 | ~35 | Delete all 8 deprecated routes (federation, sharing, contexts, marketplace, agent-memory, pipeline, gaps, meeting-brief). Delete scaffolding routes (sso, proxy, onboarding as API). |
| MCP tools | 19 | 8 | Delete archived tools directory. Keep 6 core + promote get_hygiene and get_trends to core. |
| Components | 52 | ~35 | Delete scaffolding components (federation UI, sharing UI, marketplace UI if any). Consolidate panel renderers. |
| Tests | 1,152 | ~800 quality | Delete existence-check tests. Keep integration and behavioral tests. Add coverage for real user flows. |
Deletion criteria: If a module has 0 callers outside its own API route and 0 MCP tool consumers, delete it.
The MCP server should be the best way for AI assistants to understand a workspace. Today it wraps API calls. Tomorrow it should be intelligent.
Features:
Workspace summary tool — One-call overview: “Here’s what this workspace is about, how it’s organized, what’s changed recently, and what needs attention.” No AI assistant should need to call 4 tools to get oriented.
Contextual search — Today: keyword search returns file matches. Tomorrow: “Find me everything related to the pricing decision we made last month” returns a synthesized answer with decision context, related docs, and timeline.
Write-back tools — Today: MCP is read-only (except remember). Add: create_doc (create a new document from template), update_artifact (append/edit content), mark_reviewed (update hygiene status). Let AI assistants not just read but contribute to the workspace.
Workspace health as a resource — Expose hub://health as an MCP resource that includes: hygiene score, stale doc count, recent changes, knowledge graph density. AI assistants can check this proactively.
Smart context windows — When an AI assistant asks for context about a topic, The Hub should return optimally-sized context: not too much (token waste), not too little (missing info). Use the existing impact scoring to prioritize what matters.
Stop waiting for the user to visit a page. Push insights to where they already are.
Features:
Auto-generated context files — The Hub already scans for CLAUDE.md and .cursorrules in repos. Flip the direction: The Hub generates a workspace context file on every scan. Contents: workspace overview, stale docs, recent decisions, hygiene warnings, key artifacts. Every AI assistant (Claude Code, Cursor, Copilot) already reads these files natively. Zero extension to install. Zero friction. The Hub becomes invisible infrastructure that enriches the context AI tools already consume.
What this is NOT: not file search (Cmd+P exists), not git (built-in), not AI chat (Claude/GPT built-in), not MCP tools (already consumed natively). Purely the persistent, temporal, cross-workspace layer.
Slack proactive alerts — Not just weekly digests. Real-time alerts for: “Document X contradicts document Y” (detected during scan), “Meeting in 2 hours — here’s context for 3 docs you’ll discuss” (calendar + context compilation), “5 docs haven’t been updated in 90 days — here’s which ones matter” (decay + impact scoring).
CLI intelligence — hub context before a meeting. hub stale to see what needs attention. hub search <query> with AI-enhanced results. Make the CLI a first-class citizen, not an afterthought.
Go from “find docs” to “keep docs good.” The hygiene analyzer works. Make it the core differentiator.
Features:
Hygiene-as-code — Define hygiene rules in hub.config.ts: “docs older than 90 days in /decisions/ must be reviewed”, “no two docs in /specs/ should have >80% similarity”, “every doc in /runbooks/ must have a last-reviewed date.” Custom rules, not just built-in heuristics.
Auto-fix suggestions — Today hygiene says “these 2 docs are duplicates.” Tomorrow it says “here’s the merged version” with a diff preview. Use AI to generate merge suggestions, not just detection.
Doc lifecycle tracking — Formal states: draft → active → stale → archived. Transitions triggered by rules (staleness threshold, review completion, superseded-by relationship). Visible in the UI and queryable via MCP.
Quality score — Every artifact gets a quality score: freshness, completeness (has title, has content, has metadata), link health (outbound links resolve), consistency (doesn’t contradict other docs). Aggregated to workspace-level health metric.
| # | Item | Impact | Effort |
|---|---|---|---|
| 1 | ✅ Delete deprecated API routes (federation, sharing, contexts, marketplace, agent-memory, pipeline, gaps, meeting-brief) | High | Low |
| 2 | ✅ Delete unused lib modules (federation, sharing, marketplace, context-manager, SSO, plugin-sandbox, governance) | High | Medium |
| 3 | ✅ Delete archived MCP tools directory — remove code, not just archive | Medium | Low |
| 4 | ✅ Delete agent-memory, session-tracker, change-pipeline, smart-summary modules | Medium | Low |
| 5 | ✅ Consolidate remaining modules — merge small utilities, reduce public API surface | Medium | High |
| # | Item | Impact | Effort |
|---|---|---|---|
| 6 | ✅ Workspace summary MCP tool — single-call workspace orientation | Very High | Medium |
| 7 | ✅ Write-back MCP tools (create_doc, update_artifact, mark_reviewed) | High | Medium |
| 8 | ✅ Smart context windows — optimally-sized context based on topic + impact scoring | High | High |
| 9 | ✅ Promote get_hygiene and get_trends to core MCP tools | Medium | Low |
| 10 | ✅ hub://health MCP resource — workspace health summary | Medium | Low |
| # | Item | Impact | Effort |
|---|---|---|---|
| 11 | ✅ Auto-generated context files — CLAUDE.md / .cursorrules written on every scan with workspace state | High | Medium |
| 12 | ✅ Editor extension — hygiene warnings, decision context, impact preview, knowledge graph, cross-workspace search (only what Cursor lacks) | Very High | High |
| 13 | ✅ Scan-time insight computation — eager impact/decision analysis on file changes | High | Medium |
| 14 | ✅ Slack proactive alerts — contradiction detection, meeting prep, decay alerts | Medium | Medium |
| 15 | ✅ CLI upgrade — hub context, hub stale, AI-enhanced hub search |
Medium | Medium |
| # | Item | Impact | Effort |
|---|---|---|---|
| 16 | ✅ Hygiene-as-code — custom rules in hub.config.ts | High | High |
| 17 | ✅ Auto-fix suggestions — AI-generated merge diffs for duplicates | High | Medium |
| 18 | ✅ Doc lifecycle states (draft → active → stale → archived) with transition rules | Medium | Medium |
| 19 | ✅ Quality score per artifact + workspace-level health metric | Medium | Medium |
| Module | Lines | Reason |
|---|---|---|
federation.ts |
~150 | 0 users, deprecated in v5 |
sharing.ts |
~120 | 0 users, deprecated in v5 |
marketplace.ts |
~200 | 0 community plugins |
context-manager.ts |
~66 | Use workspaces instead |
sso.ts |
~87 | 0 enterprise users |
plugin-sandbox.ts |
~150 | Overly complex for 1 plugin |
governance.ts |
~100 | Enterprise scaffolding |
agent-memory.ts |
~180 | 0 invocations in production |
session-tracker.ts |
~150 | Nobody calls catch_up |
change-pipeline.ts |
~120 | Never triggered |
smart-summary.ts |
~100 | Never integrated |
config-client.ts |
~23 | Already merged into config.ts |
| Total | ~1,446 |
All 8 routes currently marked deprecated in deprecation.ts:
/api/federation, /api/sharing, /api/contexts, /api/marketplace/api/agent-memory, /api/pipeline, /api/gaps, /api/meeting-briefPlus: /api/sso, /api/proxy (unused)
Remove src/mcp/archived/ directory entirely. The 13 archived tools are dead code.
flowchart TD
subgraph v5["v5: Ship Less, Use More (73 modules)"]
Deprecated[8 deprecated routes]
Archived[13 archived MCP tools]
Dead[12+ dead modules]
Core5[Core: search, briefing, hygiene, MCP, watching]
end
subgraph v6["v6: The Context Engine (~40 modules)"]
subgraph Engine["Context Engine (core)"]
Scanner[Smart Scanner]
FTS[FTS5 Search]
Hygiene[Quality Engine]
Impact[Impact Scoring]
end
subgraph Interfaces["Interfaces (MCP-first)"]
MCP8[8 Core MCP Tools]
Health[hub://health resource]
CLI[Intelligent CLI]
Web[Web UI - inspect + configure]
end
subgraph Proactive["Proactive Layer"]
ContextFiles[Auto-gen CLAUDE.md]
EditorExt[Editor Extension - hygiene, decisions, impact]
ScanInsights[Scan-time Insights]
SlackAlerts[Slack Alerts]
end
end
Deprecated -->|delete| Gone[Deleted]
Archived -->|delete| Gone
Dead -->|delete| Gone
Core5 -->|evolve| Engine
Core5 -->|MCP-first| Interfaces
Engine -->|push| Proactive
v6 success is measured by context utility, not feature count:
| Metric | v5 | v6 Target | How to Measure |
|---|---|---|---|
| Lib modules | 73 | < 45 | File count |
| API routes | 71 | < 40 | Route count |
| MCP tools (core) | 6 | 8 | Server registration |
| MCP invocations/day | Unknown | Trackable | Log tool calls with timestamps |
| Codebase size | ~15K LOC | < 10K LOC | cloc |
| Search p95 | < 50ms (target) | < 30ms | Benchmark suite |
| Time to workspace orientation (MCP) | 4+ tool calls | 1 tool call | workspace_summary response |
| Hygiene rules (configurable) | 7 built-in | 7 built-in + N custom | Config count |
| Auto-generated context files | 0 | 1 per workspace | File exists + freshness |
| Editor extension | 0 | Installed locally | Surfaces hygiene/decisions/impact in sidebar |
“The Hub is a local context engine for your workspace. It indexes your docs, keeps them healthy, and gives your AI tools deep understanding of your work — via MCP, CLI, or browser.”
The web UI is a window into the engine. The MCP server is the engine’s voice. The CLI is the engine’s hands. The engine itself is: scan → index → analyze → serve context.
v6 deleted features based on “0 production usage” — but The Hub hasn’t been used in production yet. Usage data is meaningless for an unshipped product. The correct question is: does this feature align with the product direction?
Features were re-evaluated against the thesis: “The Hub makes AI assistants smarter about your workspace.”
Restored (align with context engine):
agent-memory.ts + remember/recall MCP tools — cross-session memory IS the productsession-tracker.ts + catch_up MCP tool — session-aware context IS proactive intelligencegenerate_content, list_repos, detect_gaps, compile_context, meeting_brief, get_impact, get_errorsStays deleted (product scope decisions, not usage decisions):
MCP tools: 13 → 23. Every tool answers the question “does this help an AI assistant understand or improve this workspace?”