purecontext-mcp 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/docs/dev/API_STABILITY.md +0 -319
  3. package/docs/dev/DECISIONS.md +0 -22
  4. package/docs/dev/DOCUMENTATION_PLAN.md +0 -113
  5. package/docs/dev/PHASE10_TASKS.md +0 -476
  6. package/docs/dev/PHASE11_TASKS.md +0 -385
  7. package/docs/dev/PHASE12_TASKS.md +0 -335
  8. package/docs/dev/PHASE13_TASKS.md +0 -381
  9. package/docs/dev/PHASE14_TASKS.md +0 -371
  10. package/docs/dev/PHASE15_TASKS.md +0 -256
  11. package/docs/dev/PHASE16_TASKS.md +0 -314
  12. package/docs/dev/PHASE17_TASKS.md +0 -321
  13. package/docs/dev/PHASE18_TASKS.md +0 -345
  14. package/docs/dev/PHASE19_TASKS.md +0 -261
  15. package/docs/dev/PHASE1_TASKS.md +0 -443
  16. package/docs/dev/PHASE20_TASKS.md +0 -280
  17. package/docs/dev/PHASE21_TASKS.md +0 -355
  18. package/docs/dev/PHASE22_TASKS.md +0 -371
  19. package/docs/dev/PHASE23_TASKS.md +0 -274
  20. package/docs/dev/PHASE24_TASKS.md +0 -326
  21. package/docs/dev/PHASE25_TASKS.md +0 -452
  22. package/docs/dev/PHASE26_TASKS.md +0 -253
  23. package/docs/dev/PHASE27_TASKS.md +0 -410
  24. package/docs/dev/PHASE2_TASKS.md +0 -328
  25. package/docs/dev/PHASE3_TASKS.md +0 -571
  26. package/docs/dev/PHASE4_TASKS.md +0 -531
  27. package/docs/dev/PHASE5_TASKS.md +0 -835
  28. package/docs/dev/PHASE6_TASKS.md +0 -347
  29. package/docs/dev/PHASE7_TASKS.md +0 -257
  30. package/docs/dev/PHASE8_TASKS.md +0 -299
  31. package/docs/dev/PHASE9_TASKS.md +0 -320
  32. package/docs/dev/PureContext_MCP_PRD_v1.0.docx +0 -0
  33. package/docs/dev/SELF_HOSTING.md +0 -142
  34. package/docs/dev/TEAM_SETUP.md +0 -316
  35. package/docs/dev/TELEMETRY.md +0 -99
  36. package/docs/dev/feature-analysis.md +0 -305
  37. package/docs/dev/phase-1-notes.md +0 -3
@@ -1,381 +0,0 @@
1
- # Phase 13 — Task Breakdown
2
-
3
- **Goal**: Build a web-based UI for visually exploring the symbol graph, viewing dependencies, and navigating codebases interactively. This makes PureContext accessible to developers who prefer visual exploration over CLI/API tools.
4
-
5
- **Scope rationale**: While MCP tools serve AI agents effectively, human developers often prefer visual navigation. A web UI enables: exploring unfamiliar codebases, understanding dependency relationships at a glance, and onboarding new team members. The UI complements rather than replaces MCP tools.
6
-
7
- **Approach**: Tasks build from a minimal static UI through interactive features to a full-featured code explorer. The UI is optional — PureContext functions fully without it.
8
-
9
- ---
10
-
11
- ## Task 101: Web UI Foundation
12
-
13
- Create the foundational web application structure and build pipeline.
14
-
15
- **Deliverables:**
16
-
17
- - `src/ui/` — web UI source directory
18
- - Technology stack:
19
- - **Framework**: React 19 with TypeScript
20
- - **Build**: Vite for fast development and optimized production builds
21
- - **Styling**: Tailwind CSS for utility-first styling
22
- - **State**: Zustand for lightweight state management
23
- - **Routing**: React Router for client-side navigation
24
-
25
- - `src/ui/package.json`:
26
- - Separate package for UI dependencies
27
- - Scripts: `dev`, `build`, `preview`
28
- - Production build outputs to `dist/ui/`
29
-
30
- - `src/ui/src/main.tsx`:
31
- - React application entry point
32
- - Router configuration
33
- - Global error boundary
34
-
35
- - `src/ui/src/App.tsx`:
36
- - Main application layout
37
- - Header with navigation
38
- - Sidebar for repo list
39
- - Main content area
40
-
41
- - `src/ui/src/api/`:
42
- - `client.ts`: HTTP client for PureContext API
43
- - Type definitions matching MCP tool schemas
44
- - Error handling and retry logic
45
-
46
- - Integration with PureContext server:
47
- - Update `src/server/http-server.ts`:
48
- - Serve static files from `dist/ui/` at `/`
49
- - SPA fallback: serve `index.html` for client-side routes
50
- - API routes at `/api/*` (proxy to MCP tools)
51
- - Add REST endpoints for UI:
52
- - `GET /api/repos` → `list-repos` tool
53
- - `GET /api/repos/:id/tree` → `get-file-tree` tool
54
- - `GET /api/repos/:id/outline` → `get-repo-outline` tool
55
- - `GET /api/repos/:id/search` → `search-symbols` tool
56
- - `GET /api/symbols/:id` → `get-symbol-source` tool
57
-
58
- - Build integration:
59
- - `npm run build:ui` — build UI only
60
- - `npm run build` — build server + UI
61
- - `npm run dev` — run server + UI in dev mode (Vite proxy)
62
-
63
- **Key technical notes:**
64
- - UI is optional — server works without UI assets
65
- - Production build embeds UI in the server package
66
- - REST endpoints wrap MCP tools for HTTP convenience
67
- - Vite proxy enables hot reload during development
68
-
69
- **Verify:** Run `npm run dev`. Open browser to `http://localhost:3000`. Verify basic layout renders. Verify API calls work via browser dev tools.
70
-
71
- **Tests:** API client: mock fetch, verify request format. Build: verify production bundle created. Static serving: verify index.html served. API proxy: verify tool calls work via REST.
72
-
73
- ---
74
-
75
- ## Task 102: Repository Browser
76
-
77
- Implement the repository listing and file tree browser.
78
-
79
- **Deliverables:**
80
-
81
- - `src/ui/src/pages/RepoList.tsx`:
82
- - Display all indexed repositories
83
- - Show for each: name, path, symbol count, last indexed
84
- - Search/filter repos by name
85
- - Click to open repo details
86
-
87
- - `src/ui/src/pages/RepoDetail.tsx`:
88
- - Repository overview: stats, language breakdown
89
- - File tree navigation (collapsible directories)
90
- - Click file to view outline
91
- - Breadcrumb navigation
92
-
93
- - `src/ui/src/components/FileTree.tsx`:
94
- - Recursive tree component
95
- - Icons for file types (based on extension)
96
- - Lazy loading for large directories
97
- - Expand/collapse state persistence
98
-
99
- - `src/ui/src/components/FileOutline.tsx`:
100
- - List symbols in selected file
101
- - Group by kind (functions, classes, etc.)
102
- - Show signature and summary
103
- - Click to view source
104
-
105
- - `src/ui/src/stores/repoStore.ts`:
106
- - Zustand store for repository state
107
- - Caches loaded repos and trees
108
- - Tracks current selection
109
-
110
- **Key technical notes:**
111
- - File tree uses virtual scrolling for large repos
112
- - Lazy loading prevents loading entire tree upfront
113
- - Icons improve scannability (file type at a glance)
114
- - State persistence enables back/forward navigation
115
-
116
- **Verify:** Open UI. View repo list. Click repo to see details. Navigate file tree. Click file to see outline. Verify symbols displayed correctly.
117
-
118
- **Tests:** RepoList: render with mock data. FileTree: expand/collapse. FileOutline: symbol grouping. Store: state updates correctly.
119
-
120
- ---
121
-
122
- ## Task 103: Symbol Search Interface
123
-
124
- Implement interactive symbol search with filtering and results display.
125
-
126
- **Deliverables:**
127
-
128
- - `src/ui/src/pages/Search.tsx`:
129
- - Search input with debounce (300ms)
130
- - Filters: kind (dropdown), file pattern (input), language (dropdown)
131
- - Results list with highlighting
132
- - Keyboard navigation (arrow keys, enter)
133
-
134
- - `src/ui/src/components/SearchResults.tsx`:
135
- - Display search results
136
- - Show: name, kind icon, file path, signature
137
- - Highlight matching terms in name/signature
138
- - Click to view symbol source
139
- - Pagination or infinite scroll
140
-
141
- - `src/ui/src/components/SymbolCard.tsx`:
142
- - Compact symbol display for search results
143
- - Kind icon and badge
144
- - Truncated signature
145
- - File path with link
146
-
147
- - `src/ui/src/components/SearchFilters.tsx`:
148
- - Kind filter: multiselect dropdown
149
- - Language filter: dropdown from repo languages
150
- - File pattern: text input with glob hint
151
- - Clear all filters button
152
-
153
- - `src/ui/src/hooks/useSearch.ts`:
154
- - Custom hook for search state
155
- - Debounced query execution
156
- - Loading and error states
157
- - Result caching
158
-
159
- **Key technical notes:**
160
- - Debounce prevents excessive API calls during typing
161
- - Highlighting uses the query terms to mark matches
162
- - Keyboard navigation improves power-user experience
163
- - Caching recent searches improves perceived performance
164
-
165
- **Verify:** Navigate to search. Type query. Verify results appear with debounce. Apply filters. Verify results update. Click result to view source.
166
-
167
- **Tests:** Debounce: verify delay. Highlighting: verify term marking. Filters: verify API params. Keyboard nav: arrow/enter work.
168
-
169
- ---
170
-
171
- ## Task 104: Symbol Source Viewer
172
-
173
- Implement syntax-highlighted source code viewing.
174
-
175
- **Deliverables:**
176
-
177
- - `src/ui/src/pages/SymbolView.tsx`:
178
- - Display symbol source code
179
- - Syntax highlighting (language-appropriate)
180
- - Line numbers with links
181
- - Symbol metadata header (name, kind, signature)
182
-
183
- - `src/ui/src/components/CodeViewer.tsx`:
184
- - Syntax highlighting using `shiki` or `prism-react-renderer`
185
- - Language detection from file extension
186
- - Line number gutter
187
- - Copy button
188
-
189
- - `src/ui/src/components/SymbolHeader.tsx`:
190
- - Symbol name and kind badge
191
- - Full signature display
192
- - Summary/docstring
193
- - File path link
194
-
195
- - `src/ui/src/components/RelatedSymbols.tsx`:
196
- - Symbols in same file
197
- - Symbols imported by this file
198
- - Files that import this symbol
199
- - Quick links to navigate
200
-
201
- - Language themes:
202
- - Light and dark mode support
203
- - Theme toggle in header
204
- - Persist preference in localStorage
205
-
206
- **Key technical notes:**
207
- - Shiki provides accurate syntax highlighting matching VS Code
208
- - Related symbols help understand context
209
- - Theme persistence respects user preference
210
- - Line numbers enable sharing specific lines
211
-
212
- **Verify:** Click symbol from search. Verify source displayed with highlighting. Verify line numbers present. Toggle theme. Verify related symbols listed.
213
-
214
- **Tests:** Syntax highlighting: various languages. Theme toggle: state persists. Related symbols: correct links. Copy button: clipboard works.
215
-
216
- ---
217
-
218
- ## Task 105: Dependency Graph Visualization
219
-
220
- Implement interactive dependency graph visualization.
221
-
222
- **Deliverables:**
223
-
224
- - `src/ui/src/pages/DependencyGraph.tsx`:
225
- - Interactive graph of file/symbol dependencies
226
- - Nodes: files or symbols (toggleable)
227
- - Edges: import relationships
228
- - Pan and zoom controls
229
- - Click node to view details
230
-
231
- - `src/ui/src/components/GraphViewer.tsx`:
232
- - Graph rendering using `@xyflow/react` (React Flow)
233
- - Force-directed layout using `d3-force`
234
- - Node styling by kind/type
235
- - Edge styling by relationship type
236
- - Performance: limit visible nodes, cluster distant nodes
237
-
238
- - `src/ui/src/components/GraphControls.tsx`:
239
- - Zoom in/out buttons
240
- - Fit to view button
241
- - Layout selector (force, hierarchical, radial)
242
- - Node filter by kind
243
- - Depth slider (1-hop, 2-hop, N-hop dependencies)
244
-
245
- - `src/ui/src/components/GraphNode.tsx`:
246
- - File node: icon, name, symbol count
247
- - Symbol node: kind icon, name
248
- - Hover: show details tooltip
249
- - Click: select and highlight edges
250
-
251
- - Graph data preparation:
252
- - `GET /api/repos/:id/graph` endpoint
253
- - Returns nodes and edges for visualization
254
- - Supports filtering by file/symbol, depth
255
- - Pagination for large graphs
256
-
257
- **Key technical notes:**
258
- - React Flow handles canvas interactions
259
- - Force-directed layout works well for dependency graphs
260
- - Node clustering prevents visual clutter in large graphs
261
- - Depth limiting prevents overwhelming visualization
262
-
263
- **Verify:** Navigate to dependency graph. Verify nodes and edges render. Pan and zoom. Click node to see details. Adjust depth slider.
264
-
265
- **Tests:** Graph rendering: mock data renders correctly. Layout: force simulation stabilizes. Interactions: pan, zoom, click work. Depth filter: correct nodes shown.
266
-
267
- ---
268
-
269
- ## Task 106: Blast Radius Visualization
270
-
271
- Implement blast radius analysis visualization.
272
-
273
- **Deliverables:**
274
-
275
- - `src/ui/src/pages/BlastRadius.tsx`:
276
- - Select a file or symbol to analyze
277
- - Display affected files/symbols as graph or list
278
- - Color-coded by impact depth
279
- - Statistics: files affected, symbols affected, test coverage
280
-
281
- - `src/ui/src/components/BlastRadiusGraph.tsx`:
282
- - Radial layout with source at center
283
- - Rings for 1-hop, 2-hop, 3-hop+ impact
284
- - Color gradient from red (direct) to yellow (indirect)
285
- - Node size by symbol count
286
-
287
- - `src/ui/src/components/BlastRadiusList.tsx`:
288
- - Grouped by impact depth
289
- - Expandable sections
290
- - File path and affected symbols
291
- - Link to view each file
292
-
293
- - `src/ui/src/components/ImpactStats.tsx`:
294
- - Total files affected
295
- - Total symbols affected
296
- - Direct vs indirect impact breakdown
297
- - Estimated review effort (based on file count)
298
-
299
- - Integration with `get-blast-radius` tool:
300
- - Call tool via REST endpoint
301
- - Parse response into visualization data
302
- - Handle large result sets (pagination/limiting)
303
-
304
- **Key technical notes:**
305
- - Radial layout clearly shows impact distance
306
- - Color coding provides instant understanding
307
- - Statistics help prioritize review effort
308
- - List view complements graph for detailed review
309
-
310
- **Verify:** Select a file. Analyze blast radius. Verify graph shows impacted files with correct depth coloring. Verify statistics match tool output.
311
-
312
- **Tests:** Graph layout: radial positioning correct. Color coding: depth colors match. Stats calculation: totals correct. Large result: pagination works.
313
-
314
- ---
315
-
316
- ## Task 107: Phase 13 Integration Tests
317
-
318
- Validate the complete web UI.
319
-
320
- **Deliverables:**
321
-
322
- - E2E tests using Playwright:
323
- - `test/e2e/ui.test.ts`:
324
- 1. Load home page: verify repo list renders
325
- 2. Click repo: verify file tree loads
326
- 3. Navigate tree: expand directories, click file
327
- 4. View outline: verify symbols displayed
328
- 5. Search: type query, verify results
329
- 6. Apply filters: verify results update
330
- 7. View symbol: verify source highlighted
331
- 8. Toggle theme: verify colors change
332
- 9. View graph: verify nodes/edges render
333
- 10. Analyze blast radius: verify visualization
334
-
335
- - Visual regression tests:
336
- - Screenshot comparison for key pages
337
- - Detect unintended style changes
338
-
339
- - Performance tests:
340
- - Initial load: < 2 seconds
341
- - Search response: < 500ms
342
- - Graph render (1000 nodes): < 3 seconds
343
-
344
- - Accessibility tests:
345
- - Keyboard navigation works throughout
346
- - Screen reader compatibility
347
- - Color contrast meets WCAG AA
348
-
349
- **Verify:** `npm run test:e2e` passes. Visual regressions detected. Performance targets met. Accessibility audit passes.
350
-
351
- ---
352
-
353
- ## Order of Execution
354
-
355
- ```
356
- Task 101: Web UI foundation ██░░░░░░░░ Foundation
357
- Task 102: Repository browser ████░░░░░░ Browse
358
- Task 103: Symbol search interface █████░░░░░ Search
359
- Task 104: Symbol source viewer ██████░░░░ View
360
- Task 105: Dependency graph visualization ████████░░ Graph
361
- Task 106: Blast radius visualization █████████░ Analysis
362
- Task 107: Integration tests ██████████ Polish
363
- ```
364
-
365
- Tasks proceed in order: foundation (101) enables browsing (102) and search (103), which enable viewing (104). Visualization (105, 106) builds on the foundation. Testing (107) validates everything.
366
-
367
- ---
368
-
369
- ## Phase 13 Completion
370
-
371
- With Phase 13 complete, PureContext provides:
372
-
373
- 1. **MCP Tools** (Phase 1–7): AI-native code navigation via Model Context Protocol
374
- 2. **Token Tracking** (Phase 8): Measurable efficiency gains
375
- 3. **18 Languages** (Phase 9): Comprehensive language coverage
376
- 4. **20+ Framework Adapters** (Phase 10): Deep framework understanding
377
- 5. **Semantic Search** (Phase 11): Meaning-based code discovery
378
- 6. **Multi-tenant Hosting** (Phase 12): Team and enterprise deployments
379
- 7. **Web UI** (Phase 13): Visual exploration for human developers
380
-
381
- PureContext is now a complete code intelligence platform serving both AI agents and human developers.