sdl-mcp 0.10.6 → 0.10.8

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 (167) hide show
  1. package/README.md +209 -79
  2. package/config/sdlmcp.config.example.json +1 -0
  3. package/config/sdlmcp.config.json +1 -0
  4. package/config/sdlmcp.config.schema.json +7 -1
  5. package/dist/.tsbuildinfo +1 -1
  6. package/dist/agent/context-engine.d.ts.map +1 -1
  7. package/dist/agent/context-engine.js +35 -7
  8. package/dist/agent/context-engine.js.map +1 -1
  9. package/dist/agent/context-seeding.d.ts.map +1 -1
  10. package/dist/agent/context-seeding.js +57 -39
  11. package/dist/agent/context-seeding.js.map +1 -1
  12. package/dist/agent/types.d.ts +9 -0
  13. package/dist/agent/types.d.ts.map +1 -1
  14. package/dist/cli/commands/doctor.js +1 -1
  15. package/dist/cli/commands/doctor.js.map +1 -1
  16. package/dist/cli/commands/enforcement-bootstrap.d.ts +13 -0
  17. package/dist/cli/commands/enforcement-bootstrap.d.ts.map +1 -0
  18. package/dist/cli/commands/enforcement-bootstrap.js +105 -0
  19. package/dist/cli/commands/enforcement-bootstrap.js.map +1 -0
  20. package/dist/cli/commands/index.d.ts.map +1 -1
  21. package/dist/cli/commands/index.js +29 -2
  22. package/dist/cli/commands/index.js.map +1 -1
  23. package/dist/cli/commands/init.d.ts.map +1 -1
  24. package/dist/cli/commands/init.js +10 -3
  25. package/dist/cli/commands/init.js.map +1 -1
  26. package/dist/cli/index.js +9 -1
  27. package/dist/cli/index.js.map +1 -1
  28. package/dist/cli/transport/http.d.ts +1 -1
  29. package/dist/cli/transport/http.d.ts.map +1 -1
  30. package/dist/cli/transport/http.js +7 -3
  31. package/dist/cli/transport/http.js.map +1 -1
  32. package/dist/code-mode/action-catalog.d.ts +1 -1
  33. package/dist/code-mode/action-catalog.d.ts.map +1 -1
  34. package/dist/code-mode/action-catalog.js +17 -4
  35. package/dist/code-mode/action-catalog.js.map +1 -1
  36. package/dist/code-mode/descriptions.d.ts +1 -0
  37. package/dist/code-mode/descriptions.d.ts.map +1 -1
  38. package/dist/code-mode/descriptions.js +5 -0
  39. package/dist/code-mode/descriptions.js.map +1 -1
  40. package/dist/code-mode/index.d.ts +1 -1
  41. package/dist/code-mode/index.d.ts.map +1 -1
  42. package/dist/code-mode/index.js +40 -4
  43. package/dist/code-mode/index.js.map +1 -1
  44. package/dist/code-mode/manual-generator.d.ts.map +1 -1
  45. package/dist/code-mode/manual-generator.js +3 -0
  46. package/dist/code-mode/manual-generator.js.map +1 -1
  47. package/dist/code-mode/transforms.d.ts.map +1 -1
  48. package/dist/code-mode/transforms.js +10 -0
  49. package/dist/code-mode/transforms.js.map +1 -1
  50. package/dist/code-mode/workflow-parser.d.ts.map +1 -1
  51. package/dist/code-mode/workflow-parser.js +6 -1
  52. package/dist/code-mode/workflow-parser.js.map +1 -1
  53. package/dist/config/types.d.ts +2 -0
  54. package/dist/config/types.d.ts.map +1 -1
  55. package/dist/config/types.js +7 -1
  56. package/dist/config/types.js.map +1 -1
  57. package/dist/db/ladybug-schema.d.ts.map +1 -1
  58. package/dist/db/ladybug-schema.js +12 -0
  59. package/dist/db/ladybug-schema.js.map +1 -1
  60. package/dist/db/ladybug-symbol-embeddings.d.ts.map +1 -1
  61. package/dist/db/ladybug-symbol-embeddings.js +21 -7
  62. package/dist/db/ladybug-symbol-embeddings.js.map +1 -1
  63. package/dist/db/ladybug.d.ts +9 -0
  64. package/dist/db/ladybug.d.ts.map +1 -1
  65. package/dist/db/ladybug.js +62 -14
  66. package/dist/db/ladybug.js.map +1 -1
  67. package/dist/gateway/compact-schema.d.ts.map +1 -1
  68. package/dist/gateway/compact-schema.js +13 -0
  69. package/dist/gateway/compact-schema.js.map +1 -1
  70. package/dist/gateway/router.d.ts +1 -1
  71. package/dist/gateway/router.d.ts.map +1 -1
  72. package/dist/gateway/router.js +7 -2
  73. package/dist/gateway/router.js.map +1 -1
  74. package/dist/indexer/metrics-updater.d.ts.map +1 -1
  75. package/dist/indexer/metrics-updater.js +17 -12
  76. package/dist/indexer/metrics-updater.js.map +1 -1
  77. package/dist/indexer/model-downloader.d.ts.map +1 -1
  78. package/dist/indexer/model-downloader.js +38 -5
  79. package/dist/indexer/model-downloader.js.map +1 -1
  80. package/dist/indexer/model-registry.d.ts +10 -0
  81. package/dist/indexer/model-registry.d.ts.map +1 -1
  82. package/dist/indexer/model-registry.js +19 -3
  83. package/dist/indexer/model-registry.js.map +1 -1
  84. package/dist/indexer/watcher.d.ts.map +1 -1
  85. package/dist/indexer/watcher.js +2 -1
  86. package/dist/indexer/watcher.js.map +1 -1
  87. package/dist/live-index/checkpoint-service.d.ts.map +1 -1
  88. package/dist/live-index/checkpoint-service.js +3 -2
  89. package/dist/live-index/checkpoint-service.js.map +1 -1
  90. package/dist/live-index/coordinator.d.ts +5 -0
  91. package/dist/live-index/coordinator.d.ts.map +1 -1
  92. package/dist/live-index/coordinator.js +69 -10
  93. package/dist/live-index/coordinator.js.map +1 -1
  94. package/dist/main.js +8 -1
  95. package/dist/main.js.map +1 -1
  96. package/dist/mcp/context-response-projection.d.ts.map +1 -1
  97. package/dist/mcp/context-response-projection.js +1 -0
  98. package/dist/mcp/context-response-projection.js.map +1 -1
  99. package/dist/mcp/tools/agent-feedback.d.ts.map +1 -1
  100. package/dist/mcp/tools/agent-feedback.js +11 -5
  101. package/dist/mcp/tools/agent-feedback.js.map +1 -1
  102. package/dist/mcp/tools/buffer.d.ts.map +1 -1
  103. package/dist/mcp/tools/buffer.js +15 -1
  104. package/dist/mcp/tools/buffer.js.map +1 -1
  105. package/dist/mcp/tools/delta.d.ts.map +1 -1
  106. package/dist/mcp/tools/delta.js +2 -1
  107. package/dist/mcp/tools/delta.js.map +1 -1
  108. package/dist/mcp/tools/file-gateway.d.ts +93 -0
  109. package/dist/mcp/tools/file-gateway.d.ts.map +1 -0
  110. package/dist/mcp/tools/file-gateway.js +142 -0
  111. package/dist/mcp/tools/file-gateway.js.map +1 -0
  112. package/dist/mcp/tools/file-read.js +1 -1
  113. package/dist/mcp/tools/file-read.js.map +1 -1
  114. package/dist/mcp/tools/file-write-internals.d.ts +88 -0
  115. package/dist/mcp/tools/file-write-internals.d.ts.map +1 -0
  116. package/dist/mcp/tools/file-write-internals.js +447 -0
  117. package/dist/mcp/tools/file-write-internals.js.map +1 -0
  118. package/dist/mcp/tools/file-write.d.ts.map +1 -1
  119. package/dist/mcp/tools/file-write.js +27 -256
  120. package/dist/mcp/tools/file-write.js.map +1 -1
  121. package/dist/mcp/tools/prRisk.d.ts.map +1 -1
  122. package/dist/mcp/tools/prRisk.js +20 -8
  123. package/dist/mcp/tools/prRisk.js.map +1 -1
  124. package/dist/mcp/tools/repo.d.ts.map +1 -1
  125. package/dist/mcp/tools/repo.js +12 -1
  126. package/dist/mcp/tools/repo.js.map +1 -1
  127. package/dist/mcp/tools/search-edit/batch-executor.d.ts +39 -0
  128. package/dist/mcp/tools/search-edit/batch-executor.d.ts.map +1 -0
  129. package/dist/mcp/tools/search-edit/batch-executor.js +252 -0
  130. package/dist/mcp/tools/search-edit/batch-executor.js.map +1 -0
  131. package/dist/mcp/tools/search-edit/index.d.ts +7 -0
  132. package/dist/mcp/tools/search-edit/index.d.ts.map +1 -0
  133. package/dist/mcp/tools/search-edit/index.js +109 -0
  134. package/dist/mcp/tools/search-edit/index.js.map +1 -0
  135. package/dist/mcp/tools/search-edit/plan-store.d.ts +96 -0
  136. package/dist/mcp/tools/search-edit/plan-store.d.ts.map +1 -0
  137. package/dist/mcp/tools/search-edit/plan-store.js +162 -0
  138. package/dist/mcp/tools/search-edit/plan-store.js.map +1 -0
  139. package/dist/mcp/tools/search-edit/planner.d.ts +106 -0
  140. package/dist/mcp/tools/search-edit/planner.d.ts.map +1 -0
  141. package/dist/mcp/tools/search-edit/planner.js +696 -0
  142. package/dist/mcp/tools/search-edit/planner.js.map +1 -0
  143. package/dist/mcp/tools/slice.d.ts.map +1 -1
  144. package/dist/mcp/tools/slice.js +2 -1
  145. package/dist/mcp/tools/slice.js.map +1 -1
  146. package/dist/mcp/tools/tool-descriptors.d.ts.map +1 -1
  147. package/dist/mcp/tools/tool-descriptors.js +9 -2
  148. package/dist/mcp/tools/tool-descriptors.js.map +1 -1
  149. package/dist/mcp/tools.d.ts +152 -3
  150. package/dist/mcp/tools.d.ts.map +1 -1
  151. package/dist/mcp/tools.js +101 -5
  152. package/dist/mcp/tools.js.map +1 -1
  153. package/dist/retrieval/orchestrator.d.ts +25 -1
  154. package/dist/retrieval/orchestrator.d.ts.map +1 -1
  155. package/dist/retrieval/orchestrator.js +164 -12
  156. package/dist/retrieval/orchestrator.js.map +1 -1
  157. package/dist/scip/ingestion.d.ts.map +1 -1
  158. package/dist/scip/ingestion.js +9 -1
  159. package/dist/scip/ingestion.js.map +1 -1
  160. package/package.json +17 -25
  161. package/scripts/postinstall-models.mjs +197 -0
  162. package/scripts/postinstall.mjs +44 -0
  163. package/templates/AGENTS.md.template +3 -118
  164. package/templates/CLAUDE.md.template +2 -68
  165. package/templates/CODEX.md.template +3 -58
  166. package/templates/GEMINI.md.template +2 -57
  167. package/templates/OPENCODE.md.template +2 -58
package/README.md CHANGED
@@ -13,7 +13,8 @@ _Stop feeding entire files into the context window.<br/>Start giving agents exac
13
13
 
14
14
  ![npm version](https://img.shields.io/npm/v/sdl-mcp.svg?style=for-the-badge)
15
15
  ![npm downloads](https://img.shields.io/npm/dm/sdl-mcp.svg?style=for-the-badge)
16
- ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/GlitterKill/sdl-mcp?style=for-the-badge)
16
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/GlitterKill/sdl-mcp?style=for-the-badge)<br/>
17
+ [![RoastMyCode: A](https://roastmycode.ai/badge/GlitterKill/sdl-mcp)](https://roastmycode.ai/roast/latest/GlitterKill/sdl-mcp)
17
18
 
18
19
  </div>
19
20
 
@@ -38,20 +39,31 @@ SDL-MCP fixes this. It indexes your codebase into a searchable **symbol graph**
38
39
  ## How it works — in 30 seconds
39
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}}}%%
41
43
  flowchart TD
42
44
  Codebase["Your Codebase"]
43
45
  Indexer["Indexer<br/>12 languages<br/>Rust native or Tree-sitter fallback"]
44
46
  Graph["LadybugDB graph<br/>symbols, edges, metrics, versions"]
45
- MCP["38 unique MCP tool surfaces<br/>flat, gateway, and code-mode"]
47
+ MCP["Current MCP surfaces<br/>33 flat, 6 gateway, 4 Code Mode"]
46
48
  CLI["13 CLI commands"]
47
49
  HTTP["HTTP API and graph UI"]
48
50
  Agent["AI coding agent<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
49
51
 
50
- Codebase --> Indexer --> Graph
51
- Graph --> MCP
52
- Graph --> CLI
53
- Graph --> HTTP
54
- MCP --> Agent
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;
55
67
  ```
56
68
 
57
69
  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
@@ -64,10 +76,22 @@ flowchart TD
64
76
 
65
77
  <br/>
66
78
 
79
+ ## Prerequisites
80
+
81
+ - **Node.js 24+** is required ([download](https://nodejs.org/)). SDL-MCP uses Node.js features not available in earlier versions. Run `node -v` to check.
82
+
83
+ > **Peer dependency warnings during install?** The tree-sitter grammar packages may produce `ERESOLVE` warnings about peer dependencies. These are harmless — the install succeeds and everything works correctly. Add `--legacy-peer-deps` to suppress them: `npm install -g sdl-mcp --legacy-peer-deps`
84
+
85
+ <br/>
86
+
87
+ ---
88
+
89
+ <br/>
90
+
67
91
  ## Quick Start
68
92
 
69
93
  ```bash
70
- # Install
94
+ # Install (requires Node.js 24+)
71
95
  npm install -g sdl-mcp
72
96
 
73
97
  # Initialize, auto-detect languages, index your repo, and run health checks
@@ -77,7 +101,7 @@ sdl-mcp init -y --auto-index
77
101
  sdl-mcp serve --stdio
78
102
  ```
79
103
 
80
- Point your MCP client at the server and the agent gains access to all SDL-MCP tools. That's it.
104
+ Point your MCP client at the server and the agent gains access to SDL-MCP's current configured surface. By default that is exclusive Code Mode; set `codeMode.exclusive: false` when you want Code Mode plus the regular flat or gateway tools in one session.
81
105
 
82
106
  > **npx users:** Replace `sdl-mcp` with `npx --yes sdl-mcp@latest` in all commands above.
83
107
 
@@ -94,13 +118,25 @@ Point your MCP client at the server and the agent gains access to all SDL-MCP to
94
118
  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.
95
119
 
96
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}}}%%
97
122
  flowchart TB
98
123
  R1["~100 tokens<br/>Rung 1: Symbol Card<br/>Name, signature, summary, dependencies, metrics"]
99
124
  R2["~300 tokens<br/>Rung 2: Skeleton IR<br/>Signatures and control flow with bodies elided"]
100
125
  R3["~600 tokens<br/>Rung 3: Hot-Path Excerpt<br/>Identifier-focused lines with context"]
101
126
  R4["~2,000 tokens<br/>Rung 4: Raw Code Window<br/>Policy-gated full source"]
102
127
 
103
- R1 --> R2 --> R3 --> R4
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;
104
140
  ```
105
141
 
106
142
  > **Most questions are answered at Rungs 1-2** without ever reading raw code. That's where the token savings come from.
@@ -133,6 +169,7 @@ flowchart TB
133
169
  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.
134
170
 
135
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}}}%%
136
173
  flowchart TB
137
174
  Card["Symbol Card: validateToken"]
138
175
  Kind["Kind: function (exported)"]
@@ -146,7 +183,25 @@ flowchart TB
146
183
  Context["Context: auth-module, request-pipeline, auth.test.ts"]
147
184
  ETag["ETag: a7f3c2..."]
148
185
 
149
- Card --> Kind --> File --> Signature --> Summary --> Invariants --> SideEffects --> Deps --> Metrics --> Context --> ETag
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;
150
205
  ```
151
206
 
152
207
  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).
@@ -168,15 +223,25 @@ Cards include **confidence-scored call resolution** (the pass-2 resolver traces
168
223
  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.
169
224
 
170
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}}}%%
171
227
  flowchart TD
172
- Task["Task: Fix the auth middleware"] --> Slice["sdl.slice.build"]
173
- Slice --> Auth["authenticate"]
174
- Slice --> Validate["validateToken"]
175
- Slice --> Config["JwtConfig"]
176
- Auth --> Hash["hashPassword"]
177
- Validate --> User["getUserById"]
178
- Config --> Env["envLoader"]
179
- Env -. frontier outside budget .-> Frontier["spillover frontier"]
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;
180
245
  ```
181
246
 
182
247
  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.
@@ -197,6 +262,7 @@ Slices have handles, leases, refresh (delta-only updates), and spillover (paged
197
262
  `git diff` tells you what lines changed. SDL-MCP tells you what that change _means_ and who's affected.
198
263
 
199
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}}}%%
200
266
  flowchart TD
201
267
  Change["Modified validateToken() signature"]
202
268
  Sig["signatureDiff<br/>added options?: object"]
@@ -208,16 +274,25 @@ flowchart TD
208
274
  A3["AuthMiddleware<br/>distance 2"]
209
275
  A4["auth.test.ts<br/>re-run recommended"]
210
276
 
211
- Change --> Sig
212
- Change --> Inv
213
- Change --> Fx
214
- Sig --> Blast
215
- Inv --> Blast
216
- Fx --> Blast
217
- Blast --> A1
218
- Blast --> A2
219
- Blast --> A3
220
- Blast --> A4
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;
221
296
  ```
222
297
 
223
298
  **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.
@@ -238,12 +313,22 @@ flowchart TD
238
313
  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.
239
314
 
240
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}}}%%
241
317
  flowchart LR
242
- Editor["Editor keystrokes"] --> Push["sdl.buffer.push"]
243
- Push --> Overlay["Overlay store"]
244
- Overlay --> Reads["Merged reads<br/>search, cards, slices"]
245
- Overlay --> Persist["save / idle checkpoint"]
246
- Persist --> DB["LadybugDB durable graph"]
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;
247
332
  ```
248
333
 
249
334
  **Why it matters:**
@@ -285,7 +370,7 @@ The sandboxed runtime execution tool (`sdl.runtime.execute`) has its own governa
285
370
 
286
371
  The feedback loop (`sdl.agent.feedback`) records which symbols were useful and which were missing, improving future slice quality.
287
372
 
288
- generates portable, token-bounded context briefings in markdown, JSON, or clipboard format for use outside MCP environments.
373
+ For portable exports such as tickets and PR descriptions, use the CLI `sdl-mcp summary` command. It generates token-bounded context briefings in markdown, JSON, or clipboard format for use outside MCP environments.
289
374
 
290
375
  **Why it matters:**
291
376
 
@@ -317,15 +402,25 @@ Run tests, linters, and scripts through SDL-MCP's governance layer instead of un
317
402
  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).
318
403
 
319
404
  ```mermaid
405
+ %%{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}}}%%
320
406
  flowchart LR
321
- Session1["Agent session 1<br/>records bugfix memory"] --> Store["sdl.memory.store"]
322
- Store --> Graph["LadybugDB memory node"]
323
- Store --> Files[".sdl-memory/bugfixes/<id>.md"]
324
- Graph --> Link1["MEMORY_OF -> authenticate()"]
325
- Graph --> Link2["HAS_MEMORY -> repo"]
326
- Session2["Agent session 2"] --> Surface["sdl.memory.surface"]
327
- Surface --> Graph
328
- Graph --> Recall["Relevant memory surfaced<br/>race condition fix in authenticate()"]
407
+ Session1["Agent session 1<br/>records bugfix memory"] e1@--> Store["sdl.memory.store"]
408
+ Store e2@--> Graph["LadybugDB memory node"]
409
+ Store e3@--> Files[".sdl-memory/bugfixes/<id>.md"]
410
+ Graph e4@--> Link1["MEMORY_OF -> authenticate()"]
411
+ Graph e5@--> Link2["HAS_MEMORY -> repo"]
412
+ Session2["Agent session 2"] e6@--> Surface["sdl.memory.surface"]
413
+ Surface e7@--> Graph
414
+ Graph e8@--> Recall["Relevant memory surfaced<br/>race condition fix in authenticate()"]
415
+
416
+ classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
417
+ classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
418
+ classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
419
+ classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
420
+ classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
421
+ classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
422
+ classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
423
+ class e1,e2,e3,e4,e5,e6,e7,e8 animate;
329
424
  ```
330
425
 
331
426
  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.
@@ -344,15 +439,25 @@ When enabled, memories are **automatically surfaced** inside graph slices — wh
344
439
 
345
440
  ### SCIP Integration — Compiler-Grade Cross-References
346
441
 
347
- Tree-sitter gives SDL-MCP fast, syntax-level symbol extraction across 11 languages. 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.
442
+ 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.
348
443
 
349
444
  ```mermaid
445
+ %%{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}}}%%
350
446
  flowchart LR
351
- Compiler["Compiler / Type Checker"] --> SCIP[".scip index file"]
352
- SCIP --> Ingest["sdl.scip.ingest"]
353
- Ingest --> Upgrade["Heuristic edges → exact edges"]
354
- Ingest --> External["External dependency nodes"]
355
- Ingest --> Implements["implements edges"]
447
+ Compiler["Compiler / Type Checker"] e1@--> SCIP[".scip index file"]
448
+ SCIP e2@--> Ingest["sdl.scip.ingest"]
449
+ Ingest e3@--> Upgrade["Heuristic edges → exact edges"]
450
+ Ingest e4@--> External["External dependency nodes"]
451
+ Ingest e5@--> Implements["implements edges"]
452
+
453
+ classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
454
+ classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
455
+ classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
456
+ classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
457
+ classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
458
+ classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
459
+ classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
460
+ class e1,e2,e3,e4,e5 animate;
356
461
  ```
357
462
 
358
463
  **Why it matters:**
@@ -369,7 +474,7 @@ flowchart LR
369
474
 
370
475
  ### CLI Tool Access — No MCP Server Required
371
476
 
372
- Access all 32 flat SDL action tools directly from the command line with `sdl-mcp tool`. No MCP server, transport, or SDK is required.
477
+ Access 30 SDL-MCP action aliases directly from the command line with `sdl-mcp tool`. No MCP server, transport, or SDK is required.
373
478
 
374
479
  ```bash
375
480
  # Search for symbols
@@ -386,7 +491,7 @@ Features include typed argument coercion (string, number, boolean, string[], jso
386
491
 
387
492
  **Why it matters:**
388
493
 
389
- - All MCP tool actions accessible from **any terminal** — no server, transport, or SDK required
494
+ - 30 direct action aliases accessible from **any terminal** — no server, transport, or SDK required
390
495
  - Same code paths and Zod validation as the MCP server — identical behavior
391
496
  - Four output formats (json, json-compact, pretty, table) for scripting and CI pipelines
392
497
  - Auto-resolves repoId from cwd, supports stdin JSON piping and per-action `--help`
@@ -395,24 +500,34 @@ Features include typed argument coercion (string, number, boolean, string[], jso
395
500
 
396
501
  ---
397
502
 
398
- ### Tool Gateway — 81% Token Reduction
503
+ ### Tool Gateway — Compact Tool Registration
399
504
 
400
- The tool gateway consolidates the 32 flat SDL action tools 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.
505
+ The tool gateway projects the 30 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.
401
506
 
402
507
  ```mermaid
508
+ %%{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}}}%%
403
509
  flowchart LR
404
- Before["Flat mode<br/>32 flat action tools<br/>plus universal discovery/info"] --> After["Gateway mode<br/>4 namespace tools<br/>plus universal discovery/info"]
405
- After --> Savings["Smaller tools/list payload<br/>lower agent startup overhead"]
510
+ Before["Flat mode<br/>33 tools<br/>2 universal + 31 flat"] e1@--> After["Gateway mode<br/>6 tools<br/>2 universal + 4 gateway"]
511
+ After e2@--> Savings["Smaller tools/list payload<br/>lower agent startup overhead"]
512
+
513
+ classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
514
+ classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
515
+ classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
516
+ classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
517
+ classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
518
+ classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
519
+ classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
520
+ class e1,e2 animate;
406
521
  ```
407
522
 
408
- 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. Legacy flat tool names are optionally emitted alongside for backward compatibility.
523
+ 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.
409
524
 
410
525
  **Why it matters:**
411
526
 
412
527
  - Large reduction in `tools/list` overhead for gateway-first agents
413
- - 32 flat action tools consolidated into 4 namespace-scoped tools for simpler agent selection
528
+ - 30 gateway-routable actions consolidated into 4 namespace-scoped tools for simpler agent selection
414
529
  - Fewer tool choices means faster and more accurate tool dispatch by the agent
415
- - Backward-compatible: legacy flat tool names optionally emitted alongside
530
+ - Choose Code Mode for task-shaped retrieval first; opt out of exclusive Code Mode when you also need regular flat or gateway tools
416
531
 
417
532
  [Tool Gateway Deep Dive →](./docs/feature-deep-dives/tool-gateway.md)
418
533
 
@@ -422,7 +537,16 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
422
537
 
423
538
  <br/>
424
539
 
425
- ## All 38 Unique Tool Surfaces at a Glance
540
+ ## Current Tool Surface at a Glance
541
+
542
+ | Mode | Tool count | Composition |
543
+ | :--- | :--------- | :---------- |
544
+ | Flat | `33` | `2` universal + `31` flat tools |
545
+ | Gateway | `6` | `2` universal + `4` gateway tools |
546
+ | Gateway + legacy | `37` | `2` universal + `4` gateway + `31` flat tools |
547
+ | Code Mode exclusive | `4` | `sdl.action.search`, `sdl.context`, `sdl.manual`, `sdl.workflow` |
548
+
549
+ The generated source of truth is [`docs/generated/tool-inventory.md`](./docs/generated/tool-inventory.md).
426
550
 
427
551
  <table>
428
552
  <tr><th>Category</th><th>Tool</th><th>One-Line Description</th></tr>
@@ -437,10 +561,9 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
437
561
  <tr><td><code>sdl.buffer.checkpoint</code></td><td>Force-write pending buffers to the durable database</td></tr>
438
562
  <tr><td><code>sdl.buffer.status</code></td><td>Live indexing diagnostics and queue depth</td></tr>
439
563
 
440
- <tr><td rowspan="3"><strong>Symbols</strong></td>
564
+ <tr><td rowspan="2"><strong>Symbols</strong></td>
441
565
  <td><code>sdl.symbol.search</code></td><td>Search symbols by name (with optional semantic reranking)</td></tr>
442
- <tr><td><code>sdl.symbol.getCard</code></td><td>Get a symbol card with ETag-based conditional support</td></tr>
443
- <tr><td><code>sdl.symbol.getCard</code></td><td>Batch-fetch up to 100 cards in one round trip</td></tr>
566
+ <tr><td><code>sdl.symbol.getCard</code></td><td>Get one card or batch-fetch up to 100 cards with ETag-based conditional support</td></tr>
444
567
 
445
568
  <tr><td rowspan="3"><strong>Slices</strong></td>
446
569
  <td><code>sdl.slice.build</code></td><td>Build a task-scoped dependency subgraph</td></tr>
@@ -462,12 +585,8 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
462
585
  <tr><td><strong>Risk</strong></td>
463
586
  <td><code>sdl.pr.risk.analyze</code></td><td>Scored PR risk with findings and test recommendations</td></tr>
464
587
 
465
- <tr><td><strong>Context</strong></td>
466
- <td><code></code></td><td>Token-bounded portable briefing (markdown/JSON/clipboard) with conditional ETag fetch support</td></tr>
467
-
468
- <tr><td rowspan="3"><strong>Agent</strong></td>
469
- <td><code>sdl.context</code></td><td>Task-shaped context retrieval with budget-controlled rung planning and conditional ETag fetch support</td></tr>
470
- <tr><td><code>sdl.agent.feedback</code></td><td>Record which symbols were useful or missing</td></tr>
588
+ <tr><td rowspan="2"><strong>Agent</strong></td>
589
+ <td><code>sdl.agent.feedback</code></td><td>Record which symbols were useful or missing</td></tr>
471
590
  <tr><td><code>sdl.agent.feedback.query</code></td><td>Query aggregated feedback statistics</td></tr>
472
591
 
473
592
  <tr><td rowspan="2"><strong>Runtime</strong></td>
@@ -488,8 +607,9 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
488
607
  <tr><td><strong>SCIP</strong></td>
489
608
  <td><code>sdl.scip.ingest</code></td><td>Ingest a pre-built SCIP index for compiler-grade cross-references (with dry-run support)</td></tr>
490
609
 
491
- <tr><td><strong>File</strong></td>
610
+ <tr><td rowspan="2"><strong>File</strong></td>
492
611
  <td><code>sdl.file.read</code></td><td>Read non-indexed files (configs, docs, templates) with line-range, search, or JSON-path modes</td></tr>
612
+ <tr><td><code>sdl.file.write</code></td><td>Policy-aware write helper for non-indexed files and templates</td></tr>
493
613
 
494
614
  <tr><td rowspan="3"><strong>Meta</strong></td>
495
615
  <td><code>sdl.info</code></td><td>Runtime diagnostics — version, Node.js, platform, database, config paths</td></tr>
@@ -513,7 +633,7 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
513
633
  | `sdl-mcp doctor` | Validate runtime, config, DB, grammars, repo access |
514
634
  | `sdl-mcp index` | Index repositories (with optional `--watch` mode) |
515
635
  | `sdl-mcp serve` | Start MCP server (`--stdio` or `--http`) |
516
- | `sdl-mcp tool` | Access all 35 MCP tool actions directly ([docs](./docs/feature-deep-dives/cli-tool-access.md)) |
636
+ | `sdl-mcp tool` | Access 30 direct action aliases ([docs](./docs/feature-deep-dives/cli-tool-access.md)) |
517
637
  | `sdl-mcp info` | Runtime diagnostics — version, Node.js, platform, database, config |
518
638
  | `sdl-mcp summary` | Generate copy/paste context summaries from the CLI |
519
639
  | `sdl-mcp health` | Compute composite health score with badge/JSON output |
@@ -575,6 +695,7 @@ A **VSCode extension** (`sdl-mcp-vscode/`) provides live buffer integration for
575
695
  ## System Architecture
576
696
 
577
697
  ```mermaid
698
+ %%{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}}}%%
578
699
  flowchart TD
579
700
  Clients["MCP clients<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
580
701
  Gateway["Tool gateway<br/>sdl.query, sdl.code, sdl.repo, sdl.agent"]
@@ -583,12 +704,21 @@ flowchart TD
583
704
  Graph["LadybugDB graph<br/>symbols, edges, files, versions, memories"]
584
705
  Indexer["Indexer pipeline<br/>Rust native or Tree-sitter fallback<br/>pass 1, pass 2, semantic enrichment"]
585
706
 
586
- Clients --> Gateway
587
- Clients --> Flat
588
- Gateway --> Policy
589
- Flat --> Policy
590
- Policy --> Graph
591
- Indexer --> Graph
707
+ Clients e1@--> Gateway
708
+ Clients e2@--> Flat
709
+ Gateway e3@--> Policy
710
+ Flat e4@--> Policy
711
+ Policy e5@--> Graph
712
+ Indexer e6@--> Graph
713
+
714
+ classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
715
+ classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
716
+ classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
717
+ classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
718
+ classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
719
+ classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
720
+ classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
721
+ class e1,e2,e3,e4,e5,e6 animate;
592
722
  ```
593
723
 
594
724
  [Full Architecture Documentation →](./docs/architecture.md)
@@ -604,7 +734,7 @@ flowchart TD
604
734
  | Document | Description |
605
735
  | :---------------------------------------------------------------- | :------------------------------------------------------------------------------ |
606
736
  | [Getting Started](./docs/getting-started.md) | Installation, 5-minute setup, MCP client config |
607
- | [MCP Tools Reference](./docs/mcp-tools-detailed.md) | Detailed docs for all 37 unique tool surfaces (parameters, responses, examples) |
737
+ | [MCP Tools Reference](./docs/mcp-tools-detailed.md) | Detailed docs for the current flat, gateway, and Code Mode surfaces |
608
738
  | [CLI Reference](./docs/cli-reference.md) | All CLI commands and options |
609
739
  | [Configuration Reference](./docs/configuration-reference.md) | Every config option with defaults and guidance |
610
740
  | [Agent Workflows](./docs/agent-workflows.md) | Workflow instructions for CLAUDE.md / AGENTS.md |
@@ -625,8 +755,8 @@ flowchart TD
625
755
  | [Context Modes](./docs/feature-deep-dives/context-modes.md) | Precise vs broad retrieval, adaptive symbol ranking, benchmark trade-offs |
626
756
  | [Indexing & Languages](./docs/feature-deep-dives/indexing-languages.md) | Rust/TS engines, two-pass architecture, 12-language support |
627
757
  | [Runtime Execution](./docs/feature-deep-dives/runtime-execution.md) | Sandboxed subprocess execution with governance |
628
- | [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to all tool actions, output formats, stdin piping, scripting |
629
- | [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) | 35→4 tool consolidation, token reduction, thin schemas, migration guide |
758
+ | [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to 30 action aliases, output formats, stdin piping, scripting |
759
+ | [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) | 30 gateway-routable actions, 4 namespace tools, thin schemas, migration guide |
630
760
  | [Semantic Engine](./docs/feature-deep-dives/semantic-engine.md) | Pass-2 call resolution, embedding search, LLM summaries, confidence scoring |
631
761
  | [Semantic Embeddings Setup](./docs/feature-deep-dives/semantic-embeddings-setup.md) | Dependencies, model installation, provider configuration, tier-by-tier setup |
632
762
  | [Code Mode](./docs/feature-deep-dives/code-mode.md) | `sdl.context`, `sdl.workflow`, action discovery, manual reference, one-call workflows |
@@ -116,6 +116,7 @@
116
116
  "enabled": true,
117
117
  "provider": "local",
118
118
  "model": "jina-embeddings-v2-base-code",
119
+ "additionalModels": ["nomic-embed-text-v1.5"],
119
120
  "modelCacheDir": null,
120
121
  "generateSummaries": false,
121
122
  "summaryProvider": null,
@@ -144,6 +144,7 @@
144
144
  "alpha": 0.6,
145
145
  "provider": "mock",
146
146
  "model": "jina-embeddings-v2-base-code",
147
+ "additionalModels": ["nomic-embed-text-v1.5"],
147
148
  "generateSummaries": false
148
149
  },
149
150
  "prefetch": {
@@ -550,6 +550,12 @@
550
550
  "enum": ["jina-embeddings-v2-base-code", "nomic-embed-text-v1.5"],
551
551
  "default": "jina-embeddings-v2-base-code"
552
552
  },
553
+ "additionalModels": {
554
+ "type": "array",
555
+ "items": { "type": "string" },
556
+ "default": ["nomic-embed-text-v1.5"],
557
+ "description": "Extra embedding models to populate at index time so multiple vector lanes can contribute to hybrid fusion. Primary `model` is always populated; each name listed here gets a separate pass. Unknown model names are skipped."
558
+ },
553
559
  "modelCacheDir": {
554
560
  "type": "string",
555
561
  "description": "Override directory for downloaded model files (nomic-embed-text-v1.5). Defaults to platform-specific cache."
@@ -1076,7 +1082,7 @@
1076
1082
  "properties": {
1077
1083
  "enabled": {
1078
1084
  "type": "boolean",
1079
- "description": "Enable Code Mode tools (sdl.manual + sdl.workflow + sdl.context)",
1085
+ "description": "Enable Code Mode tools (sdl.manual + sdl.workflow + sdl.context + sdl.file)",
1080
1086
  "default": true
1081
1087
  },
1082
1088
  "exclusive": {