sdl-mcp 0.11.6 → 0.11.7

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 (92) hide show
  1. package/README.md +15 -239
  2. package/config/sdlmcp.config.example.json +5 -1
  3. package/config/sdlmcp.config.schema.json +63 -4
  4. package/dist/.tsbuildinfo +1 -1
  5. package/dist/cli/commands/init.d.ts.map +1 -1
  6. package/dist/cli/commands/init.js +4 -0
  7. package/dist/cli/commands/init.js.map +1 -1
  8. package/dist/config/types.d.ts +87 -0
  9. package/dist/config/types.d.ts.map +1 -1
  10. package/dist/config/types.js +53 -2
  11. package/dist/config/types.js.map +1 -1
  12. package/dist/db/ladybug-scip.d.ts +2 -2
  13. package/dist/db/ladybug-scip.d.ts.map +1 -1
  14. package/dist/db/ladybug-scip.js +3 -3
  15. package/dist/db/ladybug-scip.js.map +1 -1
  16. package/dist/indexer/adapter/generic-tree-sitter.d.ts +32 -0
  17. package/dist/indexer/adapter/generic-tree-sitter.d.ts.map +1 -0
  18. package/dist/indexer/adapter/generic-tree-sitter.js +138 -0
  19. package/dist/indexer/adapter/generic-tree-sitter.js.map +1 -0
  20. package/dist/indexer/fileScanner.d.ts.map +1 -1
  21. package/dist/indexer/fileScanner.js +33 -0
  22. package/dist/indexer/fileScanner.js.map +1 -1
  23. package/dist/indexer/indexer.d.ts +1 -0
  24. package/dist/indexer/indexer.d.ts.map +1 -1
  25. package/dist/indexer/indexer.js +80 -30
  26. package/dist/indexer/indexer.js.map +1 -1
  27. package/dist/indexer/language-packs.d.ts +18 -0
  28. package/dist/indexer/language-packs.d.ts.map +1 -0
  29. package/dist/indexer/language-packs.js +435 -0
  30. package/dist/indexer/language-packs.js.map +1 -0
  31. package/dist/indexer/language.d.ts.map +1 -1
  32. package/dist/indexer/language.js +35 -0
  33. package/dist/indexer/language.js.map +1 -1
  34. package/dist/indexer/parser/early-exit.d.ts.map +1 -1
  35. package/dist/indexer/parser/early-exit.js +3 -1
  36. package/dist/indexer/parser/early-exit.js.map +1 -1
  37. package/dist/indexer/parser/rust-process-file.d.ts.map +1 -1
  38. package/dist/indexer/parser/rust-process-file.js +3 -1
  39. package/dist/indexer/parser/rust-process-file.js.map +1 -1
  40. package/dist/indexer/provider-first/executor.d.ts +33 -1
  41. package/dist/indexer/provider-first/executor.d.ts.map +1 -1
  42. package/dist/indexer/provider-first/executor.js +478 -6
  43. package/dist/indexer/provider-first/executor.js.map +1 -1
  44. package/dist/indexer/provider-first/index.d.ts +2 -2
  45. package/dist/indexer/provider-first/index.d.ts.map +1 -1
  46. package/dist/indexer/provider-first/index.js +1 -1
  47. package/dist/indexer/provider-first/index.js.map +1 -1
  48. package/dist/indexer/provider-first/lsp-normalizer.d.ts +30 -0
  49. package/dist/indexer/provider-first/lsp-normalizer.d.ts.map +1 -0
  50. package/dist/indexer/provider-first/lsp-normalizer.js +233 -0
  51. package/dist/indexer/provider-first/lsp-normalizer.js.map +1 -0
  52. package/dist/indexer/provider-first/materializer.d.ts +2 -2
  53. package/dist/indexer/provider-first/materializer.d.ts.map +1 -1
  54. package/dist/indexer/provider-first/materializer.js +18 -2
  55. package/dist/indexer/provider-first/materializer.js.map +1 -1
  56. package/dist/indexer/provider-first/scip-normalizer.d.ts.map +1 -1
  57. package/dist/indexer/provider-first/scip-normalizer.js +68 -11
  58. package/dist/indexer/provider-first/scip-normalizer.js.map +1 -1
  59. package/dist/indexer/provider-first/shadow-build.js +1 -1
  60. package/dist/indexer/provider-first/shadow-build.js.map +1 -1
  61. package/dist/indexer/provider-first/shadow-finalization.js +1 -1
  62. package/dist/indexer/provider-first/shadow-finalization.js.map +1 -1
  63. package/dist/indexer/provider-first/source-call-proof.d.ts.map +1 -1
  64. package/dist/indexer/provider-first/source-call-proof.js +80 -0
  65. package/dist/indexer/provider-first/source-call-proof.js.map +1 -1
  66. package/dist/indexer/treesitter/grammarLoader.d.ts +2 -1
  67. package/dist/indexer/treesitter/grammarLoader.d.ts.map +1 -1
  68. package/dist/indexer/treesitter/grammarLoader.js +43 -2
  69. package/dist/indexer/treesitter/grammarLoader.js.map +1 -1
  70. package/dist/indexer/worker.d.ts.map +1 -1
  71. package/dist/indexer/worker.js +6 -1
  72. package/dist/indexer/worker.js.map +1 -1
  73. package/dist/indexer/workerPool.d.ts +2 -0
  74. package/dist/indexer/workerPool.d.ts.map +1 -1
  75. package/dist/indexer/workerPool.js +6 -1
  76. package/dist/indexer/workerPool.js.map +1 -1
  77. package/dist/mcp/tools/repo.d.ts.map +1 -1
  78. package/dist/mcp/tools/repo.js +18 -1
  79. package/dist/mcp/tools/repo.js.map +1 -1
  80. package/dist/scip/kind-mapping.d.ts +2 -0
  81. package/dist/scip/kind-mapping.d.ts.map +1 -1
  82. package/dist/scip/kind-mapping.js +20 -0
  83. package/dist/scip/kind-mapping.js.map +1 -1
  84. package/dist/semantic/providers/lsp/client.d.ts +3 -1
  85. package/dist/semantic/providers/lsp/client.d.ts.map +1 -1
  86. package/dist/semantic/providers/lsp/client.js +231 -23
  87. package/dist/semantic/providers/lsp/client.js.map +1 -1
  88. package/dist/semantic/providers/lsp/runner.d.ts +2 -1
  89. package/dist/semantic/providers/lsp/runner.d.ts.map +1 -1
  90. package/dist/semantic/providers/lsp/runner.js +1 -0
  91. package/dist/semantic/providers/lsp/runner.js.map +1 -1
  92. package/package.json +7 -6
package/README.md CHANGED
@@ -38,33 +38,7 @@ SDL-MCP fixes this. It indexes your codebase into a searchable **symbol graph**
38
38
 
39
39
  ## How it works — in 30 seconds
40
40
 
41
- ```mermaid
42
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
43
- flowchart TD
44
- Codebase["Your Codebase"]
45
- Indexer["Indexer<br/>12 languages<br/>Rust native or Tree-sitter fallback"]
46
- Graph["LadybugDB graph<br/>symbols, edges, metrics, versions"]
47
- MCP["Current MCP surfaces<br/>33 flat, 6 gateway, 4 Code Mode"]
48
- CLI["13 CLI commands"]
49
- HTTP["HTTP API and graph UI"]
50
- Agent["AI coding agent<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
51
-
52
- Codebase e1@--> Indexer
53
- Indexer e2@--> Graph
54
- Graph e3@--> MCP
55
- Graph e4@--> CLI
56
- Graph e5@--> HTTP
57
- MCP e6@--> Agent
58
-
59
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
60
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
61
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
62
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
63
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
64
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
65
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
66
- class e1,e2,e3,e4,e5,e6 animate;
67
- ```
41
+ ![SDL-MCP indexing and retrieval flow](./docs/readme-assets/readme-how-it-works.webp)
68
42
 
69
43
  1. **Index once** — SDL-MCP parses every symbol in your repo and stores it as a compact metadata record (a "Symbol Card") in a graph database
70
44
  2. **Query efficiently** — Agents use MCP tools to search, slice, and retrieve exactly the context they need
@@ -117,27 +91,7 @@ Point your MCP client at the server and the agent gains access to SDL-MCP's curr
117
91
 
118
92
  The core innovation. Named after the adjustable aperture that controls light flow in optics, the Iris Gate Ladder lets agents dial their context "aperture" from a pinhole to wide-open.
119
93
 
120
- ```mermaid
121
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
122
- flowchart TB
123
- R1["~100 tokens<br/>Rung 1: Symbol Card<br/>Name, signature, summary, dependencies, metrics"]
124
- R2["~300 tokens<br/>Rung 2: Skeleton IR<br/>Signatures and control flow with bodies elided"]
125
- R3["~600 tokens<br/>Rung 3: Hot-Path Excerpt<br/>Identifier-focused lines with context"]
126
- R4["~2,000 tokens<br/>Rung 4: Raw Code Window<br/>Policy-gated full source"]
127
-
128
- R1 e1@--> R2
129
- R2 e2@--> R3
130
- R3 e3@--> R4
131
-
132
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
133
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
134
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
135
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
136
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
137
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
138
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
139
- class e1,e2,e3 animate;
140
- ```
94
+ ![Iris Gate Ladder context escalation tiers](./docs/readme-assets/readme-iris-ladder.webp)
141
95
 
142
96
  > **Most questions are answered at Rungs 1-2** without ever reading raw code. That's where the token savings come from.
143
97
 
@@ -168,41 +122,7 @@ flowchart TB
168
122
 
169
123
  Every function, class, interface, type, and variable becomes a **Symbol Card**: a compact metadata record (~100 tokens) containing everything an agent needs to _understand_ a symbol without reading its code.
170
124
 
171
- ```mermaid
172
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
173
- flowchart TB
174
- Card["Symbol Card: validateToken"]
175
- Kind["Kind: function (exported)"]
176
- File["File: src/auth/jwt.ts:42-67"]
177
- Signature["Signature: (token: string, opts?: ValidateOpts) -> Promise<DecodedToken>"]
178
- Summary["Summary: validates JWT signature and expiration"]
179
- Invariants["Invariants: throws on expired token"]
180
- SideEffects["Side effects: logs to audit trail"]
181
- Deps["Dependencies: verifySignature, checkExpiry, jsonwebtoken, AuditLogger"]
182
- Metrics["Metrics: fan-in 12, fan-out 4, churn 3/30d"]
183
- Context["Context: auth-module, request-pipeline, auth.test.ts"]
184
- ETag["ETag: a7f3c2..."]
185
-
186
- Card e1@--> Kind
187
- Kind e2@--> File
188
- File e3@--> Signature
189
- Signature e4@--> Summary
190
- Summary e5@--> Invariants
191
- Invariants e6@--> SideEffects
192
- SideEffects e7@--> Deps
193
- Deps e8@--> Metrics
194
- Metrics e9@--> Context
195
- Context e10@--> ETag
196
-
197
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
198
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
199
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
200
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
201
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
202
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
203
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
204
- class e1,e2,e3,e4,e5,e6,e7,e8,e9,e10 animate;
205
- ```
125
+ ![Symbol Card fields and relationships](./docs/readme-assets/readme-symbol-card.webp)
206
126
 
207
127
  Cards include **confidence-scored call resolution** (the pass-2 resolver traces imports, aliases, barrel re-exports, and tagged templates to produce accurate dependency edges), **community detection** (cluster membership), and **call-chain tracing** (process participation with entry/intermediate/exit roles).
208
128
 
@@ -222,27 +142,7 @@ Cards include **confidence-scored call resolution** (the pass-2 resolver traces
222
142
 
223
143
  Instead of reading files in the same directory, SDL-MCP follows the _dependency graph_. Starting from symbols relevant to your task, it traverses weighted edges (call: 1.0, config: 0.8, import: 0.6), scores each symbol by relevance, and returns the N most important within a token budget.
224
144
 
225
- ```mermaid
226
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
227
- flowchart TD
228
- Task["Task: Fix the auth middleware"] e1@--> Slice["sdl.slice.build"]
229
- Slice e2@--> Auth["authenticate"]
230
- Slice e3@--> Validate["validateToken"]
231
- Slice e4@--> Config["JwtConfig"]
232
- Auth e5@--> Hash["hashPassword"]
233
- Validate e6@--> User["getUserById"]
234
- Config e7@--> Env["envLoader"]
235
- Env e8@-. frontier outside budget .-> Frontier["spillover frontier"]
236
-
237
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
238
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
239
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
240
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
241
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
242
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
243
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
244
- class e1,e2,e3,e4,e5,e6,e7,e8 animate;
245
- ```
145
+ ![Graph slicing dependency selection flow](./docs/readme-assets/readme-graph-slicing.webp)
246
146
 
247
147
  Slices have handles, leases, refresh (delta-only updates), and spillover (paged overflow). You can also skip the symbol search entirely — pass a `taskText` string and SDL-MCP auto-discovers the relevant entry symbols.
248
148
 
@@ -261,39 +161,7 @@ Slices have handles, leases, refresh (delta-only updates), and spillover (paged
261
161
 
262
162
  `git diff` tells you what lines changed. SDL-MCP tells you what that change _means_ and who's affected.
263
163
 
264
- ```mermaid
265
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
266
- flowchart TD
267
- Change["Modified validateToken() signature"]
268
- Sig["signatureDiff<br/>added options?: object"]
269
- Inv["invariantDiff<br/>added throws on expired"]
270
- Fx["sideEffectDiff<br/>added logs to audit trail"]
271
- Blast["Blast radius"]
272
- A1["authenticate()<br/>distance 1"]
273
- A2["refreshSession()<br/>distance 1"]
274
- A3["AuthMiddleware<br/>distance 2"]
275
- A4["auth.test.ts<br/>re-run recommended"]
276
-
277
- Change e1@--> Sig
278
- Change e2@--> Inv
279
- Change e3@--> Fx
280
- Sig e4@--> Blast
281
- Inv e5@--> Blast
282
- Fx e6@--> Blast
283
- Blast e7@--> A1
284
- Blast e8@--> A2
285
- Blast e9@--> A3
286
- Blast e10@--> A4
287
-
288
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
289
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
290
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
291
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
292
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
293
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
294
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
295
- class e1,e2,e3,e4,e5,e6,e7,e8,e9,e10 animate;
296
- ```
164
+ ![Delta Packs semantic diff and blast radius flow](./docs/readme-assets/readme-delta-packs.webp)
297
165
 
298
166
  **PR risk analysis** (`sdl.pr.risk.analyze`) wraps this into a scored assessment with findings, evidence, and test recommendations. **Fan-in trend analysis** detects "amplifier" symbols whose growing dependency count means changes ripple further over time.
299
167
 
@@ -312,24 +180,7 @@ flowchart TD
312
180
 
313
181
  SDL-MCP doesn't wait for you to save. As you type in your editor, buffer updates are pushed to an in-memory overlay store, parsed in the background, and merged with the durable database. Search, cards, and slices reflect your _current_ code, not your last save.
314
182
 
315
- ```mermaid
316
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
317
- flowchart LR
318
- Editor["Editor keystrokes"] e1@--> Push["sdl.buffer.push"]
319
- Push e2@--> Overlay["Overlay store"]
320
- Overlay e3@--> Reads["Merged reads<br/>search, cards, slices"]
321
- Overlay e4@--> Persist["save / idle checkpoint"]
322
- Persist e5@--> DB["LadybugDB durable graph"]
323
-
324
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
325
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
326
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
327
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
328
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
329
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
330
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
331
- class e1,e2,e3,e4,e5 animate;
332
- ```
183
+ ![Live indexing buffer overlay flow](./docs/readme-assets/readme-live-indexing.webp)
333
184
 
334
185
  **Why it matters:**
335
186
 
@@ -404,27 +255,7 @@ Run tests, linters, and scripts through SDL-MCP's governance layer instead of un
404
255
 
405
256
  Agents forget everything between sessions. SDL-MCP fixes this with an **opt-in graph-backed memory system** that lets agents store decisions, bugfix context, and task notes linked directly to the symbols and files they relate to. Memory is **disabled by default** and must be explicitly enabled in the configuration. When enabled, memories are stored both in the graph database (for fast querying) and as checked-in markdown files (for version control and team sharing).
406
257
 
407
- ```mermaid
408
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
409
- flowchart LR
410
- Session1["Agent session 1<br/>records bugfix memory"] e1@--> Store["sdl.memory.store"]
411
- Store e2@--> Graph["LadybugDB memory node"]
412
- Store e3@--> Files[".sdl-memory/bugfixes/<id>.md"]
413
- Graph e4@--> Link1["MEMORY_OF -> authenticate()"]
414
- Graph e5@--> Link2["HAS_MEMORY -> repo"]
415
- Session2["Agent session 2"] e6@--> Surface["sdl.memory.surface"]
416
- Surface e7@--> Graph
417
- Graph e8@--> Recall["Relevant memory surfaced<br/>race condition fix in authenticate()"]
418
-
419
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
420
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
421
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
422
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
423
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
424
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
425
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
426
- class e1,e2,e3,e4,e5,e6,e7,e8 animate;
427
- ```
258
+ ![Development Memories storage and surfacing cycle](./docs/readme-assets/readme-development-memories.webp)
428
259
 
429
260
  When enabled, memories are **automatically surfaced** inside graph slices — when an agent builds a slice touching symbols with linked memories, those memories appear alongside the cards. During re-indexing, memories linked to changed symbols are **flagged as stale**, prompting agents to review and update them. Four MCP tools (`store`, `query`, `remove`, `surface`) provide full CRUD plus intelligent ranking by confidence, recency, and symbol overlap. Memory tools are only available when memory is enabled in the configuration.
430
261
 
@@ -442,26 +273,9 @@ When enabled, memories are **automatically surfaced** inside graph slices — wh
442
273
 
443
274
  ### SCIP Integration — Compiler-Grade Cross-References
444
275
 
445
- Tree-sitter gives SDL-MCP fast, syntax-level symbol extraction across the supported TypeScript/JavaScript, Python, Go, Java, C#, C/C++, PHP, Rust, Kotlin, and Shell surface. SCIP (Source Code Intelligence Protocol) supplements this with **compiler-grade cross-references** from tools like scip-typescript, scip-go, and rust-analyzer. Generate a `.scip` index file, point SDL-MCP at it, and heuristic edges are upgraded to exact compiler-verified edges, external dependency symbols become first-class graph nodes, and new `implements` edges reveal interface/trait relationships that syntax analysis cannot discover.
446
-
447
- ```mermaid
448
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
449
- flowchart LR
450
- Compiler["Compiler / Type Checker"] e1@--> SCIP[".scip index file"]
451
- SCIP e2@--> Ingest["sdl.scip.ingest"]
452
- Ingest e3@--> Upgrade["Heuristic edges → exact edges"]
453
- Ingest e4@--> External["External dependency nodes"]
454
- Ingest e5@--> Implements["implements edges"]
455
-
456
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
457
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
458
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
459
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
460
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
461
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
462
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
463
- class e1,e2,e3,e4,e5 animate;
464
- ```
276
+ Tree-sitter gives SDL-MCP fast, syntax-level symbol extraction across the built-in TypeScript/JavaScript, Python, Go, Java, C#, C/C++, Rust, and Kotlin surface. PHP and Shell/Bash are explicit opt-in language packs for LSP provider-first work and are not enabled by default. SCIP (Source Code Intelligence Protocol) supplements this with **compiler-grade cross-references** from tools like scip-typescript, scip-go, and rust-analyzer. Generate a `.scip` index file, point SDL-MCP at it, and heuristic edges are upgraded to exact compiler-verified edges, external dependency symbols become first-class graph nodes, and new `implements` edges reveal interface/trait relationships that syntax analysis cannot discover.
277
+
278
+ ![SCIP integration compiler cross-reference ingestion flow](./docs/readme-assets/readme-scip-integration.webp)
465
279
 
466
280
  **Why it matters:**
467
281
 
@@ -515,21 +329,7 @@ Features include typed argument coercion (string, number, boolean, string[], jso
515
329
 
516
330
  The tool gateway projects the 35 gateway-routable SDL actions into **4 namespace-scoped tools** (`sdl.query`, `sdl.code`, `sdl.repo`, `sdl.agent`), reducing `tools/list` overhead from the full flat schema surface to a compact gateway surface.
517
331
 
518
- ```mermaid
519
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
520
- flowchart LR
521
- Before["Flat mode<br/>38 tools<br/>2 universal + 36 flat"] e1@--> After["Gateway mode<br/>6 tools<br/>2 universal + 4 gateway"]
522
- After e2@--> Savings["Smaller tools/list payload<br/>lower agent startup overhead"]
523
-
524
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
525
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
526
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
527
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
528
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
529
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
530
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
531
- class e1,e2 animate;
532
- ```
332
+ ![Tool Gateway compact registration flow](./docs/readme-assets/readme-tool-gateway.webp)
533
333
 
534
334
  Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "symbol.search", repoId: "x", query: "auth" }`) and routes to the same handlers with double Zod validation. Thin wire schemas in `tools/list` keep the registration compact while full validation happens server-side. The flat-only `sdl.file.write` action remains outside gateway mode today.
535
335
 
@@ -655,7 +455,7 @@ The generated source of truth is [`docs/generated/tool-inventory.md`](./docs/gen
655
455
  | `sdl-mcp info` | Runtime diagnostics — version, Node.js, platform, database, config |
656
456
  | `sdl-mcp summary` | Generate copy/paste context summaries from the CLI |
657
457
  | `sdl-mcp health` | Compute composite health score with badge/JSON output |
658
- | `sdl-mcp benchmark` | Run CI regression benchmarks |
458
+ | `sdl-mcp benchmark:ci` | Run CI regression benchmarks |
659
459
  | `sdl-mcp export` | Export sync artifact |
660
460
  | `sdl-mcp import` | Import sync artifact |
661
461
  | `sdl-mcp pull` | Pull by version/commit with fallback |
@@ -712,32 +512,7 @@ A **VSCode extension** (`sdl-mcp-vscode/`) provides live buffer integration for
712
512
 
713
513
  ## System Architecture
714
514
 
715
- ```mermaid
716
- %%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
717
- flowchart TD
718
- Clients["MCP clients<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
719
- Gateway["Tool gateway<br/>sdl.query, sdl.code, sdl.repo, sdl.agent"]
720
- Flat["Flat tools and optional code-mode surfaces"]
721
- Policy["Policy engine<br/>proof-of-need, budgets, audit logging"]
722
- Graph["LadybugDB graph<br/>symbols, edges, files, versions, memories"]
723
- Indexer["Indexer pipeline<br/>Rust native or Tree-sitter fallback<br/>pass 1, pass 2, semantic enrichment"]
724
-
725
- Clients e1@--> Gateway
726
- Clients e2@--> Flat
727
- Gateway e3@--> Policy
728
- Flat e4@--> Policy
729
- Policy e5@--> Graph
730
- Indexer e6@--> Graph
731
-
732
- classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
733
- classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
734
- classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
735
- classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
736
- classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
737
- classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
738
- classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
739
- class e1,e2,e3,e4,e5,e6 animate;
740
- ```
515
+ ![SDL-MCP system architecture](./docs/readme-assets/readme-system-architecture.webp)
741
516
 
742
517
  [Full Architecture Documentation →](./docs/architecture.md)
743
518
 
@@ -771,7 +546,8 @@ flowchart TD
771
546
  | [Governance & Policy](./docs/feature-deep-dives/governance-policy.md) | Proof-of-need gating, audit logging, runtime sandboxing |
772
547
  | [Agent Context](./docs/feature-deep-dives/agent-context.md) | Task-shaped context retrieval, feedback loops, portable context summaries |
773
548
  | [Context Modes](./docs/feature-deep-dives/context-modes.md) | Precise vs broad retrieval, adaptive symbol ranking, benchmark trade-offs |
774
- | [Indexing & Languages](./docs/feature-deep-dives/indexing-languages.md) | Rust/TS engines, two-pass architecture, 12-language support |
549
+ | [Indexing & Languages](./docs/feature-deep-dives/indexing-languages.md) | Rust/TS engines, two-pass architecture, built-in and opt-in language support |
550
+ | [Language Provider Support](./docs/feature-deep-dives/language-provider-support.md) | Language chart for adapters, parser install mode, SCIP/LSP status, and validation |
775
551
  | [Provider-First Indexing](./docs/feature-deep-dives/provider-first-indexing.md) | SCIP/LSP-first planning, provider facts, shadow DB readiness, fallback boundaries |
776
552
  | [Runtime Execution](./docs/feature-deep-dives/runtime-execution.md) | Sandboxed subprocess execution with governance |
777
553
  | [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to 36 action aliases, output formats, stdin piping, scripting |
@@ -86,8 +86,12 @@
86
86
  "mode": "primaryWithCaps",
87
87
  "workspaceSymbolLimit": 5000,
88
88
  "documentSymbolFileLimit": 500,
89
+ "documentSymbolTimeoutMs": 10000,
90
+ "documentSymbolFailureLimit": 20,
91
+ "documentSymbolCollectionTimeoutMs": 120000,
89
92
  "referenceCandidateLimit": 200,
90
- "diagnosticsLimit": 5000
93
+ "diagnosticsLimit": 5000,
94
+ "diagnosticsTimeoutMs": 5000
91
95
  }
92
96
  },
93
97
  "concurrency": 8,
@@ -70,7 +70,12 @@
70
70
  "php",
71
71
  "rs",
72
72
  "kt",
73
- "sh"
73
+ "sh",
74
+ "powershell",
75
+ "ruby",
76
+ "lua",
77
+ "dart",
78
+ "swift"
74
79
  ]
75
80
  },
76
81
  "default": [
@@ -333,6 +338,24 @@
333
338
  "maximum": 50000,
334
339
  "default": 500
335
340
  },
341
+ "documentSymbolTimeoutMs": {
342
+ "type": "integer",
343
+ "minimum": 500,
344
+ "maximum": 300000,
345
+ "default": 10000
346
+ },
347
+ "documentSymbolFailureLimit": {
348
+ "type": "integer",
349
+ "minimum": 1,
350
+ "maximum": 100000,
351
+ "default": 20
352
+ },
353
+ "documentSymbolCollectionTimeoutMs": {
354
+ "type": "integer",
355
+ "minimum": 1000,
356
+ "maximum": 1800000,
357
+ "default": 120000
358
+ },
336
359
  "referenceCandidateLimit": {
337
360
  "type": "integer",
338
361
  "minimum": 0,
@@ -344,14 +367,24 @@
344
367
  "minimum": 0,
345
368
  "maximum": 100000,
346
369
  "default": 5000
370
+ },
371
+ "diagnosticsTimeoutMs": {
372
+ "type": "integer",
373
+ "minimum": 500,
374
+ "maximum": 300000,
375
+ "default": 5000
347
376
  }
348
377
  },
349
378
  "default": {
350
379
  "mode": "primaryWithCaps",
351
380
  "workspaceSymbolLimit": 5000,
352
381
  "documentSymbolFileLimit": 500,
382
+ "documentSymbolTimeoutMs": 10000,
383
+ "documentSymbolFailureLimit": 20,
384
+ "documentSymbolCollectionTimeoutMs": 120000,
353
385
  "referenceCandidateLimit": 200,
354
- "diagnosticsLimit": 5000
386
+ "diagnosticsLimit": 5000,
387
+ "diagnosticsTimeoutMs": 5000
355
388
  }
356
389
  }
357
390
  },
@@ -363,8 +396,12 @@
363
396
  "mode": "primaryWithCaps",
364
397
  "workspaceSymbolLimit": 5000,
365
398
  "documentSymbolFileLimit": 500,
399
+ "documentSymbolTimeoutMs": 10000,
400
+ "documentSymbolFailureLimit": 20,
401
+ "documentSymbolCollectionTimeoutMs": 120000,
366
402
  "referenceCandidateLimit": 200,
367
- "diagnosticsLimit": 5000
403
+ "diagnosticsLimit": 5000,
404
+ "diagnosticsTimeoutMs": 5000
368
405
  }
369
406
  }
370
407
  },
@@ -474,8 +511,12 @@
474
511
  "mode": "primaryWithCaps",
475
512
  "workspaceSymbolLimit": 5000,
476
513
  "documentSymbolFileLimit": 500,
514
+ "documentSymbolTimeoutMs": 10000,
515
+ "documentSymbolFailureLimit": 20,
516
+ "documentSymbolCollectionTimeoutMs": 120000,
477
517
  "referenceCandidateLimit": 200,
478
- "diagnosticsLimit": 5000
518
+ "diagnosticsLimit": 5000,
519
+ "diagnosticsTimeoutMs": 5000
479
520
  }
480
521
  },
481
522
  "concurrency": 8,
@@ -1160,6 +1201,24 @@
1160
1201
  "default": []
1161
1202
  },
1162
1203
  "readiness": { "type": "string" },
1204
+ "documentSessionMode": {
1205
+ "type": "string",
1206
+ "enum": ["workspace", "document"]
1207
+ },
1208
+ "documentSymbolRetryCount": {
1209
+ "type": "integer",
1210
+ "minimum": 0,
1211
+ "maximum": 10
1212
+ },
1213
+ "documentSymbolRetryDelayMs": {
1214
+ "type": "integer",
1215
+ "minimum": 0,
1216
+ "maximum": 120000
1217
+ },
1218
+ "env": {
1219
+ "type": "object",
1220
+ "additionalProperties": { "type": "string" }
1221
+ },
1163
1222
  "initializationOptions": { "type": "object" }
1164
1223
  }
1165
1224
  },