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.
- package/package.json +1 -1
- package/docs/dev/API_STABILITY.md +0 -319
- package/docs/dev/DECISIONS.md +0 -22
- package/docs/dev/DOCUMENTATION_PLAN.md +0 -113
- package/docs/dev/PHASE10_TASKS.md +0 -476
- package/docs/dev/PHASE11_TASKS.md +0 -385
- package/docs/dev/PHASE12_TASKS.md +0 -335
- package/docs/dev/PHASE13_TASKS.md +0 -381
- package/docs/dev/PHASE14_TASKS.md +0 -371
- package/docs/dev/PHASE15_TASKS.md +0 -256
- package/docs/dev/PHASE16_TASKS.md +0 -314
- package/docs/dev/PHASE17_TASKS.md +0 -321
- package/docs/dev/PHASE18_TASKS.md +0 -345
- package/docs/dev/PHASE19_TASKS.md +0 -261
- package/docs/dev/PHASE1_TASKS.md +0 -443
- package/docs/dev/PHASE20_TASKS.md +0 -280
- package/docs/dev/PHASE21_TASKS.md +0 -355
- package/docs/dev/PHASE22_TASKS.md +0 -371
- package/docs/dev/PHASE23_TASKS.md +0 -274
- package/docs/dev/PHASE24_TASKS.md +0 -326
- package/docs/dev/PHASE25_TASKS.md +0 -452
- package/docs/dev/PHASE26_TASKS.md +0 -253
- package/docs/dev/PHASE27_TASKS.md +0 -410
- package/docs/dev/PHASE2_TASKS.md +0 -328
- package/docs/dev/PHASE3_TASKS.md +0 -571
- package/docs/dev/PHASE4_TASKS.md +0 -531
- package/docs/dev/PHASE5_TASKS.md +0 -835
- package/docs/dev/PHASE6_TASKS.md +0 -347
- package/docs/dev/PHASE7_TASKS.md +0 -257
- package/docs/dev/PHASE8_TASKS.md +0 -299
- package/docs/dev/PHASE9_TASKS.md +0 -320
- package/docs/dev/PureContext_MCP_PRD_v1.0.docx +0 -0
- package/docs/dev/SELF_HOSTING.md +0 -142
- package/docs/dev/TEAM_SETUP.md +0 -316
- package/docs/dev/TELEMETRY.md +0 -99
- package/docs/dev/feature-analysis.md +0 -305
- package/docs/dev/phase-1-notes.md +0 -3
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
# Phase 11 — Task Breakdown
|
|
2
|
-
|
|
3
|
-
**Goal**: Implement approximate nearest-neighbor semantic search using HNSW (Hierarchical Navigable Small Worlds) for repositories with more than 50,000 symbols. This enables AI agents to find conceptually related code even when keyword search fails.
|
|
4
|
-
|
|
5
|
-
**Scope rationale**: Large codebases can have tens or hundreds of thousands of symbols. Traditional FTS (full-text search) based on keyword matching becomes less effective at scale. Semantic search using embeddings and HNSW allows finding symbols by meaning, not just lexical match. The PRD Section 4.7 (Phase 41 item) identified this as a scalability enhancement.
|
|
6
|
-
|
|
7
|
-
**Approach**: Tasks build from embedding infrastructure through HNSW indexing to hybrid search integration. The system degrades gracefully — repos under 50k symbols continue using FTS.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Task 90: Embedding Provider Abstraction
|
|
12
|
-
|
|
13
|
-
Create an abstraction layer for generating embeddings that supports multiple providers.
|
|
14
|
-
|
|
15
|
-
**Deliverables:**
|
|
16
|
-
|
|
17
|
-
- `src/semantic/embedding-provider.ts`
|
|
18
|
-
- `interface EmbeddingProvider`
|
|
19
|
-
```typescript
|
|
20
|
-
interface EmbeddingProvider {
|
|
21
|
-
name: string;
|
|
22
|
-
dimension: number;
|
|
23
|
-
maxTokens: number;
|
|
24
|
-
embed(texts: string[]): Promise<Float32Array[]>;
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
- `AnthropicEmbedding` — implements `EmbeddingProvider`
|
|
28
|
-
- Uses Claude's embedding endpoint (when available)
|
|
29
|
-
- Dimension: 1024
|
|
30
|
-
- Batch size: 100 texts per call
|
|
31
|
-
- API key from `config.ai.apiKey` or `ANTHROPIC_API_KEY` env var
|
|
32
|
-
- `OpenAIEmbedding` — implements `EmbeddingProvider`
|
|
33
|
-
- Uses `text-embedding-3-small` model
|
|
34
|
-
- Dimension: 1536
|
|
35
|
-
- Batch size: 2048 texts per call (OpenAI limit)
|
|
36
|
-
- API key from `config.ai.openaiApiKey` or `OPENAI_API_KEY`
|
|
37
|
-
- `LocalEmbedding` — implements `EmbeddingProvider`
|
|
38
|
-
- Uses a local embedding model via Ollama or similar
|
|
39
|
-
- Endpoint from `config.ai.localEmbeddingEndpoint`
|
|
40
|
-
- Dimension: depends on model (typically 384–1024)
|
|
41
|
-
- No API key required
|
|
42
|
-
- `createEmbeddingProvider(config: Config): EmbeddingProvider`
|
|
43
|
-
- Factory function that returns the configured provider
|
|
44
|
-
- Throws `PureContextError` if no provider configured
|
|
45
|
-
|
|
46
|
-
- `src/semantic/text-preparation.ts`
|
|
47
|
-
- `prepareSymbolText(symbol: SymbolRecord): string`
|
|
48
|
-
- Combines name, signature, summary, and docstring into a single text
|
|
49
|
-
- Format: `{name}: {signature}\n{summary}\n{docstring}`
|
|
50
|
-
- Truncate to provider's `maxTokens` limit
|
|
51
|
-
- `prepareBatch(symbols: SymbolRecord[]): string[]`
|
|
52
|
-
- Prepares multiple symbols for batch embedding
|
|
53
|
-
|
|
54
|
-
- Update `src/config/config-schema.ts`:
|
|
55
|
-
- `semantic.provider`: `'anthropic' | 'openai' | 'local' | 'none'` (default: `'none'`)
|
|
56
|
-
- `semantic.localEmbeddingEndpoint`: `string | null`
|
|
57
|
-
- `semantic.dimension`: `number` (auto-detected from provider if not set)
|
|
58
|
-
- `semantic.enabled`: `boolean` (default: `false`)
|
|
59
|
-
|
|
60
|
-
**Key technical notes:**
|
|
61
|
-
- Embeddings are `Float32Array` for memory efficiency
|
|
62
|
-
- Batch embedding reduces API calls and improves throughput
|
|
63
|
-
- Local providers (Ollama) enable offline operation
|
|
64
|
-
- Text preparation is consistent across providers for comparable embeddings
|
|
65
|
-
|
|
66
|
-
**Verify:** Configure OpenAI provider. Embed a batch of 10 symbol texts. Verify returned arrays are correct dimension. Verify batch sizes respected.
|
|
67
|
-
|
|
68
|
-
**Tests:** Text preparation: verify format and truncation. Provider factory: verify correct provider selected. Batch embedding: mock API, verify request format. Error handling: API failure returns error, not crash.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Task 91: HNSW Index Implementation
|
|
73
|
-
|
|
74
|
-
Implement HNSW indexing for fast approximate nearest-neighbor search.
|
|
75
|
-
|
|
76
|
-
**Deliverables:**
|
|
77
|
-
|
|
78
|
-
- `src/semantic/hnsw-index.ts`
|
|
79
|
-
- Uses `hnswlib-node` package (Node.js bindings for hnswlib)
|
|
80
|
-
- `HNSWIndex` class:
|
|
81
|
-
```typescript
|
|
82
|
-
class HNSWIndex {
|
|
83
|
-
constructor(dimension: number, maxElements: number);
|
|
84
|
-
add(ids: string[], vectors: Float32Array[]): void;
|
|
85
|
-
search(query: Float32Array, k: number): SearchResult[];
|
|
86
|
-
save(path: string): void;
|
|
87
|
-
load(path: string): void;
|
|
88
|
-
remove(ids: string[]): void;
|
|
89
|
-
size(): number;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
interface SearchResult {
|
|
93
|
-
id: string;
|
|
94
|
-
distance: number;
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
- HNSW parameters:
|
|
98
|
-
- `M = 16` (connections per node)
|
|
99
|
-
- `efConstruction = 200` (build-time quality)
|
|
100
|
-
- `efSearch = 100` (search-time quality)
|
|
101
|
-
- Distance metric: cosine similarity (L2-normalized vectors)
|
|
102
|
-
- Index persistence: `~/.purecontext/indexes/{repoId}/hnsw.idx`
|
|
103
|
-
- Incremental updates: add new vectors, mark removed IDs
|
|
104
|
-
|
|
105
|
-
- `src/semantic/vector-store.ts`
|
|
106
|
-
- `VectorStore` class:
|
|
107
|
-
```typescript
|
|
108
|
-
class VectorStore {
|
|
109
|
-
constructor(repoId: string, provider: EmbeddingProvider);
|
|
110
|
-
indexSymbols(symbols: SymbolRecord[]): Promise<void>;
|
|
111
|
-
searchSimilar(query: string, k: number): Promise<SymbolRecord[]>;
|
|
112
|
-
removeSymbols(ids: string[]): void;
|
|
113
|
-
rebuild(): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
- Coordinates embedding generation and HNSW indexing
|
|
117
|
-
- Maintains mapping from symbol IDs to HNSW internal IDs
|
|
118
|
-
- Handles incremental indexing (new symbols) and removal
|
|
119
|
-
|
|
120
|
-
- `src/core/db/embedding-store.ts`
|
|
121
|
-
- SQLite table `embeddings`:
|
|
122
|
-
```sql
|
|
123
|
-
CREATE TABLE embeddings (
|
|
124
|
-
symbol_id TEXT PRIMARY KEY,
|
|
125
|
-
repo_id TEXT NOT NULL,
|
|
126
|
-
embedding BLOB NOT NULL, -- Float32Array as binary
|
|
127
|
-
dimension INTEGER NOT NULL,
|
|
128
|
-
provider TEXT NOT NULL,
|
|
129
|
-
created_at TEXT NOT NULL,
|
|
130
|
-
FOREIGN KEY (symbol_id) REFERENCES symbols(id)
|
|
131
|
-
);
|
|
132
|
-
CREATE INDEX idx_embeddings_repo ON embeddings(repo_id);
|
|
133
|
-
```
|
|
134
|
-
- `saveEmbeddings(repoId: string, embeddings: Map<string, Float32Array>): void`
|
|
135
|
-
- `loadEmbeddings(repoId: string): Map<string, Float32Array>`
|
|
136
|
-
- `deleteEmbeddings(symbolIds: string[]): void`
|
|
137
|
-
- Embeddings stored in SQLite for persistence across restarts
|
|
138
|
-
|
|
139
|
-
**Key technical notes:**
|
|
140
|
-
- HNSW provides O(log n) search vs O(n) for brute force — critical for large repos
|
|
141
|
-
- Embeddings are stored both in SQLite (persistence) and HNSW index (fast search)
|
|
142
|
-
- Incremental updates avoid full re-embedding on code changes
|
|
143
|
-
- hnswlib-node is a native addon — verify Windows/Mac/Linux compatibility
|
|
144
|
-
|
|
145
|
-
**Verify:** Create HNSW index with 10,000 random vectors. Search for 5 nearest neighbors. Verify results are plausible (same vectors return themselves). Save/load index and verify persistence.
|
|
146
|
-
|
|
147
|
-
**Tests:** Add vectors: verify insertion. Search: verify k results returned. Remove: verify deleted vectors not returned. Persistence: save, reload, search again. Incremental: add more vectors after initial build.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Task 92: Semantic Indexing Pipeline
|
|
152
|
-
|
|
153
|
-
Integrate semantic indexing into the main indexing pipeline for large repos.
|
|
154
|
-
|
|
155
|
-
**Deliverables:**
|
|
156
|
-
|
|
157
|
-
- Update `src/core/index-manager.ts`:
|
|
158
|
-
- After symbol extraction: check if `config.semantic.enabled` and symbol count > 50,000
|
|
159
|
-
- If yes, trigger semantic indexing via `VectorStore.indexSymbols()`
|
|
160
|
-
- Track semantic indexing status in repo metadata
|
|
161
|
-
- Progress reporting: emit events for embedding progress
|
|
162
|
-
- Batch embedding: process symbols in batches of 500
|
|
163
|
-
|
|
164
|
-
- `src/semantic/semantic-indexer.ts`
|
|
165
|
-
- `SemanticIndexer` class:
|
|
166
|
-
```typescript
|
|
167
|
-
class SemanticIndexer {
|
|
168
|
-
constructor(config: Config);
|
|
169
|
-
shouldIndex(repoId: string, symbolCount: number): boolean;
|
|
170
|
-
index(repoId: string, symbols: SymbolRecord[]): Promise<IndexResult>;
|
|
171
|
-
updateIncremental(repoId: string, added: SymbolRecord[], removed: string[]): Promise<void>;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
interface IndexResult {
|
|
175
|
-
symbolsIndexed: number;
|
|
176
|
-
embeddingTimeMs: number;
|
|
177
|
-
indexBuildTimeMs: number;
|
|
178
|
-
indexSizeBytes: number;
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
- Orchestrates the full semantic indexing flow
|
|
182
|
-
- Handles rate limiting for API-based embedding providers
|
|
183
|
-
- Reports progress via logger
|
|
184
|
-
|
|
185
|
-
- Update incremental indexing:
|
|
186
|
-
- When symbols are added: embed and add to HNSW
|
|
187
|
-
- When symbols are removed: remove from HNSW and delete embeddings
|
|
188
|
-
- When symbols are modified: re-embed and update HNSW
|
|
189
|
-
|
|
190
|
-
- Add config options:
|
|
191
|
-
- `semantic.threshold`: minimum symbol count to enable (default: 50000)
|
|
192
|
-
- `semantic.batchSize`: embedding batch size (default: 500)
|
|
193
|
-
- `semantic.concurrency`: parallel embedding batches (default: 2)
|
|
194
|
-
|
|
195
|
-
**Key technical notes:**
|
|
196
|
-
- Embedding API calls are the bottleneck — batch and parallelize
|
|
197
|
-
- Rate limiting prevents API quota exhaustion
|
|
198
|
-
- Progress events enable UI feedback for long indexing operations
|
|
199
|
-
- Threshold of 50k is configurable — lower for testing, higher for cost control
|
|
200
|
-
|
|
201
|
-
**Verify:** Index a large fixture project (50k+ symbols generated). Verify semantic indexing triggered. Verify embeddings stored in SQLite. Verify HNSW index saved to disk.
|
|
202
|
-
|
|
203
|
-
**Tests:** Threshold check: 40k symbols (skip), 60k symbols (index). Batch processing: verify correct batch sizes. Incremental update: add 100 symbols, verify HNSW updated. Progress events: verify emission.
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Task 93: Hybrid Search Implementation
|
|
208
|
-
|
|
209
|
-
Implement hybrid search that combines keyword FTS with semantic similarity.
|
|
210
|
-
|
|
211
|
-
**Deliverables:**
|
|
212
|
-
|
|
213
|
-
- `src/semantic/hybrid-search.ts`
|
|
214
|
-
- `HybridSearcher` class:
|
|
215
|
-
```typescript
|
|
216
|
-
class HybridSearcher {
|
|
217
|
-
constructor(repoId: string, vectorStore: VectorStore, symbolStore: SymbolStore);
|
|
218
|
-
search(query: string, options: SearchOptions): Promise<SearchResult[]>;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
interface SearchOptions {
|
|
222
|
-
maxResults: number;
|
|
223
|
-
semanticWeight: number; // 0.0–1.0, default 0.5
|
|
224
|
-
keywordWeight: number; // 0.0–1.0, default 0.5
|
|
225
|
-
threshold: number; // minimum combined score
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
interface SearchResult {
|
|
229
|
-
symbol: SymbolRecord;
|
|
230
|
-
keywordScore: number;
|
|
231
|
-
semanticScore: number;
|
|
232
|
-
combinedScore: number;
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
- Search algorithm:
|
|
236
|
-
1. Run FTS search → get top N keyword matches
|
|
237
|
-
2. Run semantic search → get top N vector matches
|
|
238
|
-
3. Merge results using Reciprocal Rank Fusion (RRF):
|
|
239
|
-
`score = keywordWeight * (1 / (k + keywordRank)) + semanticWeight * (1 / (k + semanticRank))`
|
|
240
|
-
where `k = 60` (standard RRF constant)
|
|
241
|
-
4. Sort by combined score, return top `maxResults`
|
|
242
|
-
|
|
243
|
-
- Update `src/server/tools/search-symbols.ts`:
|
|
244
|
-
- Add `mode` parameter: `'keyword' | 'semantic' | 'hybrid'`
|
|
245
|
-
- Default: `'hybrid'` if semantic index exists, else `'keyword'`
|
|
246
|
-
- Add `semantic_weight` and `keyword_weight` parameters
|
|
247
|
-
- Return scores in result metadata
|
|
248
|
-
|
|
249
|
-
- `src/semantic/query-expansion.ts`
|
|
250
|
-
- `expandQuery(query: string): string[]`
|
|
251
|
-
- Generate query variations for better semantic coverage
|
|
252
|
-
- Techniques: lemmatization, synonym expansion, abbreviation expansion
|
|
253
|
-
- Example: "auth" → ["auth", "authentication", "authorize", "authorization"]
|
|
254
|
-
- Query expansion is optional and lightweight (no API calls)
|
|
255
|
-
|
|
256
|
-
**Key technical notes:**
|
|
257
|
-
- RRF is robust fusion method that handles different score distributions
|
|
258
|
-
- Keyword search handles exact matches; semantic handles conceptual matches
|
|
259
|
-
- Weights allow tuning for different use cases (code review vs exploration)
|
|
260
|
-
- Query expansion improves recall without adding latency
|
|
261
|
-
|
|
262
|
-
**Verify:** Index a large project with semantic. Search for "authentication" with hybrid mode. Verify results include both exact matches (keyword) and conceptually related symbols (semantic). Compare to keyword-only search.
|
|
263
|
-
|
|
264
|
-
**Tests:** RRF calculation: verify score formula. Hybrid merge: overlapping results handled correctly. Weight adjustment: semantic_weight=1.0 returns semantic results only. Graceful fallback: no semantic index → keyword only.
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Task 94: Semantic Search Tool
|
|
269
|
-
|
|
270
|
-
Add a dedicated semantic search tool for advanced use cases.
|
|
271
|
-
|
|
272
|
-
**Deliverables:**
|
|
273
|
-
|
|
274
|
-
- `src/server/tools/search-semantic.ts`
|
|
275
|
-
- Tool name: `search-semantic`
|
|
276
|
-
- Input schema:
|
|
277
|
-
```json
|
|
278
|
-
{
|
|
279
|
-
"repo": { "type": "string" },
|
|
280
|
-
"query": { "type": "string" },
|
|
281
|
-
"mode": { "type": "string", "enum": ["semantic", "hybrid"], "default": "hybrid" },
|
|
282
|
-
"semantic_weight": { "type": "number", "default": 0.5 },
|
|
283
|
-
"keyword_weight": { "type": "number", "default": 0.5 },
|
|
284
|
-
"max_results": { "type": "number", "default": 10 },
|
|
285
|
-
"kind": { "type": "string", "description": "Filter by symbol kind" },
|
|
286
|
-
"file_pattern": { "type": "string" }
|
|
287
|
-
}
|
|
288
|
-
```
|
|
289
|
-
- Output includes similarity scores:
|
|
290
|
-
```json
|
|
291
|
-
{
|
|
292
|
-
"results": [
|
|
293
|
-
{
|
|
294
|
-
"id": "abc123",
|
|
295
|
-
"name": "validateCredentials",
|
|
296
|
-
"kind": "function",
|
|
297
|
-
"file": "src/auth/validator.ts",
|
|
298
|
-
"signature": "function validateCredentials(user: User): boolean",
|
|
299
|
-
"scores": {
|
|
300
|
-
"keyword": 0.0,
|
|
301
|
-
"semantic": 0.92,
|
|
302
|
-
"combined": 0.46
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
],
|
|
306
|
-
"_meta": {
|
|
307
|
-
"mode": "hybrid",
|
|
308
|
-
"semantic_index_size": 75000,
|
|
309
|
-
"query_embedding_ms": 45,
|
|
310
|
-
"search_ms": 12
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
- Register in `src/server/mcp-server.ts`
|
|
315
|
-
|
|
316
|
-
- Update `search-symbols` tool:
|
|
317
|
-
- Automatically use hybrid search when semantic index exists
|
|
318
|
-
- Add `"mode"` to output `_meta` to indicate which search mode used
|
|
319
|
-
- No breaking changes to existing behavior
|
|
320
|
-
|
|
321
|
-
**Key technical notes:**
|
|
322
|
-
- Dedicated tool allows explicit semantic-only search
|
|
323
|
-
- Updated `search-symbols` gets hybrid upgrade transparently
|
|
324
|
-
- Timing metadata helps diagnose slow searches
|
|
325
|
-
|
|
326
|
-
**Verify:** Run `search-semantic` on a semantically-indexed repo. Verify results include semantic scores. Verify `search-symbols` automatically uses hybrid when available.
|
|
327
|
-
|
|
328
|
-
**Tests:** Semantic-only search: keyword_weight=0. Hybrid search: both weights > 0. Fallback: repo without semantic index returns error. Filtering: kind and file_pattern filters work.
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## Task 95: Phase 11 Test Fixtures and Integration Tests
|
|
333
|
-
|
|
334
|
-
Validate the complete semantic search pipeline.
|
|
335
|
-
|
|
336
|
-
**Deliverables:**
|
|
337
|
-
|
|
338
|
-
- `test/fixtures/large-project/` — generated project with 60,000+ symbols
|
|
339
|
-
- Script to generate: create synthetic TypeScript files with functions/classes
|
|
340
|
-
- Realistic naming: `user_`, `auth_`, `payment_`, `order_`, `product_` prefixes
|
|
341
|
-
- Each symbol has signature and docstring
|
|
342
|
-
- Used only for semantic tests (not run in normal test suite due to size)
|
|
343
|
-
|
|
344
|
-
- Integration tests `test/integration/phase11.test.ts`:
|
|
345
|
-
1. Embedding provider: generate embeddings for 10 symbols, verify dimensions
|
|
346
|
-
2. HNSW index: add 1000 vectors, search, verify nearest neighbors
|
|
347
|
-
3. Semantic indexer: threshold check, batch processing
|
|
348
|
-
4. Hybrid search: combine keyword + semantic results
|
|
349
|
-
5. RRF scoring: verify combined scores
|
|
350
|
-
6. Incremental update: add symbols, verify HNSW updated
|
|
351
|
-
7. Remove symbols: verify removed from index
|
|
352
|
-
8. Persistence: save HNSW index, reload, search again
|
|
353
|
-
9. Graceful fallback: semantic disabled → keyword only
|
|
354
|
-
10. Full suite regression: all Phase 1–10 tests still green
|
|
355
|
-
|
|
356
|
-
- Performance benchmarks:
|
|
357
|
-
- Embedding latency: < 50ms per symbol (batched)
|
|
358
|
-
- HNSW search: < 10ms for k=10 in 100k vector index
|
|
359
|
-
- Hybrid search: < 100ms total
|
|
360
|
-
|
|
361
|
-
**Verify:** `npm run test` passes. Semantic tests run in separate suite due to API/size requirements.
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
## Order of Execution
|
|
366
|
-
|
|
367
|
-
```
|
|
368
|
-
Task 90: Embedding provider abstraction ██░░░░░░░░ Foundation
|
|
369
|
-
Task 91: HNSW index implementation ████░░░░░░ Index
|
|
370
|
-
Task 92: Semantic indexing pipeline ██████░░░░ Integration
|
|
371
|
-
Task 93: Hybrid search implementation ████████░░ Search
|
|
372
|
-
Task 94: Semantic search tool █████████░ Tool DONE
|
|
373
|
-
Task 95: Fixtures + integration tests ██████████ Polish DONE
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
Tasks proceed in order: embedding provider (90) is needed for HNSW (91), which is needed for the indexing pipeline (92), which enables hybrid search (93) and the search tool (94).
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## Post-Phase 11: What Comes Next
|
|
381
|
-
|
|
382
|
-
Phase 11 adds powerful semantic search capabilities for large codebases. Remaining phases:
|
|
383
|
-
|
|
384
|
-
- **Phase 12**: Rate limiting and multi-tenant auth for hosted deployments
|
|
385
|
-
- **Phase 13**: Web UI for exploring the symbol graph visually
|