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.
- package/README.md +209 -79
- package/config/sdlmcp.config.example.json +1 -0
- package/config/sdlmcp.config.json +1 -0
- package/config/sdlmcp.config.schema.json +7 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/agent/context-engine.d.ts.map +1 -1
- package/dist/agent/context-engine.js +35 -7
- package/dist/agent/context-engine.js.map +1 -1
- package/dist/agent/context-seeding.d.ts.map +1 -1
- package/dist/agent/context-seeding.js +57 -39
- package/dist/agent/context-seeding.js.map +1 -1
- package/dist/agent/types.d.ts +9 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/enforcement-bootstrap.d.ts +13 -0
- package/dist/cli/commands/enforcement-bootstrap.d.ts.map +1 -0
- package/dist/cli/commands/enforcement-bootstrap.js +105 -0
- package/dist/cli/commands/enforcement-bootstrap.js.map +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +29 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +10 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +9 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/transport/http.d.ts +1 -1
- package/dist/cli/transport/http.d.ts.map +1 -1
- package/dist/cli/transport/http.js +7 -3
- package/dist/cli/transport/http.js.map +1 -1
- package/dist/code-mode/action-catalog.d.ts +1 -1
- package/dist/code-mode/action-catalog.d.ts.map +1 -1
- package/dist/code-mode/action-catalog.js +17 -4
- package/dist/code-mode/action-catalog.js.map +1 -1
- package/dist/code-mode/descriptions.d.ts +1 -0
- package/dist/code-mode/descriptions.d.ts.map +1 -1
- package/dist/code-mode/descriptions.js +5 -0
- package/dist/code-mode/descriptions.js.map +1 -1
- package/dist/code-mode/index.d.ts +1 -1
- package/dist/code-mode/index.d.ts.map +1 -1
- package/dist/code-mode/index.js +40 -4
- package/dist/code-mode/index.js.map +1 -1
- package/dist/code-mode/manual-generator.d.ts.map +1 -1
- package/dist/code-mode/manual-generator.js +3 -0
- package/dist/code-mode/manual-generator.js.map +1 -1
- package/dist/code-mode/transforms.d.ts.map +1 -1
- package/dist/code-mode/transforms.js +10 -0
- package/dist/code-mode/transforms.js.map +1 -1
- package/dist/code-mode/workflow-parser.d.ts.map +1 -1
- package/dist/code-mode/workflow-parser.js +6 -1
- package/dist/code-mode/workflow-parser.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +7 -1
- package/dist/config/types.js.map +1 -1
- package/dist/db/ladybug-schema.d.ts.map +1 -1
- package/dist/db/ladybug-schema.js +12 -0
- package/dist/db/ladybug-schema.js.map +1 -1
- package/dist/db/ladybug-symbol-embeddings.d.ts.map +1 -1
- package/dist/db/ladybug-symbol-embeddings.js +21 -7
- package/dist/db/ladybug-symbol-embeddings.js.map +1 -1
- package/dist/db/ladybug.d.ts +9 -0
- package/dist/db/ladybug.d.ts.map +1 -1
- package/dist/db/ladybug.js +62 -14
- package/dist/db/ladybug.js.map +1 -1
- package/dist/gateway/compact-schema.d.ts.map +1 -1
- package/dist/gateway/compact-schema.js +13 -0
- package/dist/gateway/compact-schema.js.map +1 -1
- package/dist/gateway/router.d.ts +1 -1
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +7 -2
- package/dist/gateway/router.js.map +1 -1
- package/dist/indexer/metrics-updater.d.ts.map +1 -1
- package/dist/indexer/metrics-updater.js +17 -12
- package/dist/indexer/metrics-updater.js.map +1 -1
- package/dist/indexer/model-downloader.d.ts.map +1 -1
- package/dist/indexer/model-downloader.js +38 -5
- package/dist/indexer/model-downloader.js.map +1 -1
- package/dist/indexer/model-registry.d.ts +10 -0
- package/dist/indexer/model-registry.d.ts.map +1 -1
- package/dist/indexer/model-registry.js +19 -3
- package/dist/indexer/model-registry.js.map +1 -1
- package/dist/indexer/watcher.d.ts.map +1 -1
- package/dist/indexer/watcher.js +2 -1
- package/dist/indexer/watcher.js.map +1 -1
- package/dist/live-index/checkpoint-service.d.ts.map +1 -1
- package/dist/live-index/checkpoint-service.js +3 -2
- package/dist/live-index/checkpoint-service.js.map +1 -1
- package/dist/live-index/coordinator.d.ts +5 -0
- package/dist/live-index/coordinator.d.ts.map +1 -1
- package/dist/live-index/coordinator.js +69 -10
- package/dist/live-index/coordinator.js.map +1 -1
- package/dist/main.js +8 -1
- package/dist/main.js.map +1 -1
- package/dist/mcp/context-response-projection.d.ts.map +1 -1
- package/dist/mcp/context-response-projection.js +1 -0
- package/dist/mcp/context-response-projection.js.map +1 -1
- package/dist/mcp/tools/agent-feedback.d.ts.map +1 -1
- package/dist/mcp/tools/agent-feedback.js +11 -5
- package/dist/mcp/tools/agent-feedback.js.map +1 -1
- package/dist/mcp/tools/buffer.d.ts.map +1 -1
- package/dist/mcp/tools/buffer.js +15 -1
- package/dist/mcp/tools/buffer.js.map +1 -1
- package/dist/mcp/tools/delta.d.ts.map +1 -1
- package/dist/mcp/tools/delta.js +2 -1
- package/dist/mcp/tools/delta.js.map +1 -1
- package/dist/mcp/tools/file-gateway.d.ts +93 -0
- package/dist/mcp/tools/file-gateway.d.ts.map +1 -0
- package/dist/mcp/tools/file-gateway.js +142 -0
- package/dist/mcp/tools/file-gateway.js.map +1 -0
- package/dist/mcp/tools/file-read.js +1 -1
- package/dist/mcp/tools/file-read.js.map +1 -1
- package/dist/mcp/tools/file-write-internals.d.ts +88 -0
- package/dist/mcp/tools/file-write-internals.d.ts.map +1 -0
- package/dist/mcp/tools/file-write-internals.js +447 -0
- package/dist/mcp/tools/file-write-internals.js.map +1 -0
- package/dist/mcp/tools/file-write.d.ts.map +1 -1
- package/dist/mcp/tools/file-write.js +27 -256
- package/dist/mcp/tools/file-write.js.map +1 -1
- package/dist/mcp/tools/prRisk.d.ts.map +1 -1
- package/dist/mcp/tools/prRisk.js +20 -8
- package/dist/mcp/tools/prRisk.js.map +1 -1
- package/dist/mcp/tools/repo.d.ts.map +1 -1
- package/dist/mcp/tools/repo.js +12 -1
- package/dist/mcp/tools/repo.js.map +1 -1
- package/dist/mcp/tools/search-edit/batch-executor.d.ts +39 -0
- package/dist/mcp/tools/search-edit/batch-executor.d.ts.map +1 -0
- package/dist/mcp/tools/search-edit/batch-executor.js +252 -0
- package/dist/mcp/tools/search-edit/batch-executor.js.map +1 -0
- package/dist/mcp/tools/search-edit/index.d.ts +7 -0
- package/dist/mcp/tools/search-edit/index.d.ts.map +1 -0
- package/dist/mcp/tools/search-edit/index.js +109 -0
- package/dist/mcp/tools/search-edit/index.js.map +1 -0
- package/dist/mcp/tools/search-edit/plan-store.d.ts +96 -0
- package/dist/mcp/tools/search-edit/plan-store.d.ts.map +1 -0
- package/dist/mcp/tools/search-edit/plan-store.js +162 -0
- package/dist/mcp/tools/search-edit/plan-store.js.map +1 -0
- package/dist/mcp/tools/search-edit/planner.d.ts +106 -0
- package/dist/mcp/tools/search-edit/planner.d.ts.map +1 -0
- package/dist/mcp/tools/search-edit/planner.js +696 -0
- package/dist/mcp/tools/search-edit/planner.js.map +1 -0
- package/dist/mcp/tools/slice.d.ts.map +1 -1
- package/dist/mcp/tools/slice.js +2 -1
- package/dist/mcp/tools/slice.js.map +1 -1
- package/dist/mcp/tools/tool-descriptors.d.ts.map +1 -1
- package/dist/mcp/tools/tool-descriptors.js +9 -2
- package/dist/mcp/tools/tool-descriptors.js.map +1 -1
- package/dist/mcp/tools.d.ts +152 -3
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +101 -5
- package/dist/mcp/tools.js.map +1 -1
- package/dist/retrieval/orchestrator.d.ts +25 -1
- package/dist/retrieval/orchestrator.d.ts.map +1 -1
- package/dist/retrieval/orchestrator.js +164 -12
- package/dist/retrieval/orchestrator.js.map +1 -1
- package/dist/scip/ingestion.d.ts.map +1 -1
- package/dist/scip/ingestion.js +9 -1
- package/dist/scip/ingestion.js.map +1 -1
- package/package.json +17 -25
- package/scripts/postinstall-models.mjs +197 -0
- package/scripts/postinstall.mjs +44 -0
- package/templates/AGENTS.md.template +3 -118
- package/templates/CLAUDE.md.template +2 -68
- package/templates/CODEX.md.template +3 -58
- package/templates/GEMINI.md.template +2 -57
- 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
|

|
|
15
15
|

|
|
16
|
-

|
|
16
|
+
<br/>
|
|
17
|
+
[](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["
|
|
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
|
|
51
|
-
|
|
52
|
-
Graph
|
|
53
|
-
Graph
|
|
54
|
-
|
|
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
|
|
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
|
|
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
|
|
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"]
|
|
173
|
-
Slice
|
|
174
|
-
Slice
|
|
175
|
-
Slice
|
|
176
|
-
Auth
|
|
177
|
-
Validate
|
|
178
|
-
Config
|
|
179
|
-
Env
|
|
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
|
|
212
|
-
Change
|
|
213
|
-
Change
|
|
214
|
-
Sig
|
|
215
|
-
Inv
|
|
216
|
-
Fx
|
|
217
|
-
Blast
|
|
218
|
-
Blast
|
|
219
|
-
Blast
|
|
220
|
-
Blast
|
|
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"]
|
|
243
|
-
Push
|
|
244
|
-
Overlay
|
|
245
|
-
Overlay
|
|
246
|
-
Persist
|
|
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
|
-
|
|
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"]
|
|
322
|
-
Store
|
|
323
|
-
Store
|
|
324
|
-
Graph
|
|
325
|
-
Graph
|
|
326
|
-
Session2["Agent session 2"]
|
|
327
|
-
Surface
|
|
328
|
-
Graph
|
|
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
|
|
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"]
|
|
352
|
-
SCIP
|
|
353
|
-
Ingest
|
|
354
|
-
Ingest
|
|
355
|
-
Ingest
|
|
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
|
|
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
|
-
-
|
|
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 —
|
|
503
|
+
### Tool Gateway — Compact Tool Registration
|
|
399
504
|
|
|
400
|
-
The tool gateway
|
|
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/>
|
|
405
|
-
After
|
|
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.
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
##
|
|
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="
|
|
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
|
|
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>
|
|
466
|
-
<td><code
|
|
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
|
|
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
|
|
587
|
-
Clients
|
|
588
|
-
Gateway
|
|
589
|
-
Flat
|
|
590
|
-
Policy
|
|
591
|
-
Indexer
|
|
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
|
|
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
|
|
629
|
-
| [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) |
|
|
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 |
|
|
@@ -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": {
|