You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SDL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Use this file as the repository fallback for the `sdl-mcp-agent-workflow` skill.
4
4
5
5
SDL-MCP is the normal repository interface. Native filesystem and shell tools are fallback-only when SDL-MCP is unavailable, or when accessing agent memory and other internal client data outside the indexed repository.
6
6
7
+
When a client bridge returns the raw MCP result, prefer `structuredContent`; use text `content` only as a fallback for older servers. Do not emit both or return the whole MCP response envelope to the agent.
8
+
7
9
---
8
10
9
11
## 1. Start Every Task
@@ -175,7 +177,7 @@ Use this when you need likely files and symbols before choosing `symbol.edit` or
175
177
176
178
Use the cheapest rung that answers the task. Static price tags in `sdl.manual` and `sdl.action.search` are release-time estimates, not live telemetry; use them to choose the first probe, then use `usage.stats` and `signalDensity` only when you need a savings or waste report.
177
179
178
-
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`.
180
+
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`. Do not guess `runtimeQueryOutput` arguments; replay a returned action unchanged or call focused `sdl.manual` for `runtime.queryOutput` first.
Code Mode tool output is human-first. The first MCP `content` text block is concise terminal-friendly text, while task-relevant machine-readable data is carried in `structuredContent`. Agents should read the visible text for the human-facing summary and use `structuredContent` for follow-up identifiers such as `etag`, handles, file paths, symbol IDs, references, summaries, errors, and next-action hints.
41
+
Raw Code Mode MCP results retain a concise human-readable `content` text block beside task-relevant `structuredContent`. Agent bridges should pass through `structuredContent` when it is present, use text `content` only as a compatibility fallback for older servers, and avoid exposing both or the whole MCP response envelope to the agent. Follow-up identifiers such as `etag`, handles, file paths, symbol IDs, references, summaries, errors, and next-action hints remain in `structuredContent`.
42
42
43
43
SDL-MCP internal bookkeeping is not duplicated into model-visible output by default. Timing diagnostics, packed-wire stats, raw-context baselines, action traces, precondition snapshots, backup paths, and retrieval-debug details stay in logs or diagnostics surfaces. Set `includeDiagnostics: true` or the relevant retrieval-evidence option only when the task actually needs those details; even then, the normal visible text stays concise.
"At session start, load and follow `sdl-mcp-agent-workflow` when skills are available; otherwise use these instructions. The index-refresh authorization rules below govern if other guidance conflicts.",
3
3
"",
4
4
"Required SDL-MCP workflow:",
5
+
"Raw MCP result handling: When a client bridge returns the raw MCP result, prefer `structuredContent`; use text `content` only as a fallback for older servers. Do not emit both or return the whole MCP response envelope to the agent.",
5
6
'1. Confirm `repo.status` through `sdl.workflow` with `fn: "repoStatus"` and `args: {}`.',
6
7
"2. If the correct action is unclear, use `sdl.action.search`; load `sdl.manual` only for the focused schema needed to compose a non-obvious request.",
7
8
'3. Gather task evidence via `sdl.context` with `budget.maxTokens` and flat `focusPaths`, `focusSymbols`, or `chatMentions`; never send `options`, `contextMode`, or `answerFirst`. Use `sdl.retrieve` for one-step `symbolSearch`, `symbolGetCard`, `sliceBuild`, `codeSkeleton`, `codeHotPath`, or bounded `codeNeedWindow` retrieval.',
8
9
'4. Use `responseMode: "auto"` for potentially large responses. When a result returns a canonical `response.get` continuation (`nextAction` or `action`) for `sdl.retrieve` with `op: "responseGet"`, replay its returned action and arguments unchanged; outer `repoId` owns trusted dispatch, `detail` and `includeDiagnostics` stay outer controls, and nested `args.repoId` is invalid. Use workflow `responseGet` only when direct `sdl.retrieve` is unavailable or an existing multi-step workflow needs it.',
9
10
'5. Reuse `{ ref, unchanged: true }` responses and session short ids (`sN`); pass `refsMode: "off"` only when full content is required.',
10
11
"6. Use `sdl.workflow` for multi-step pipelines, runtime execution, data transforms, batch operations, mutations, or result piping between steps; do not wrap a single `sdl.context` call.",
11
12
'7. Use `sdl.file` with `op: "read"`; `file.read` only for non-indexed files and prefer targeted reads. `op: "write"` (`file.write`) supports targeted single-file writes, including indexed files with live reconciliation; prefer `op: "symbolEditPreview"`/`op: "symbolEditApply"` (`symbol.edit` preview/apply) for one-symbol indexed edits and `op: "searchEditPreview"`/`op: "searchEditApply"` for cross-file edits.',
12
-
'8. runtimeExecute executes repository tooling. Permitted uses include build, test, lint, compiler, named scripts, and targeted edit scripts. Do not use it to inspect, search, or print repository files. Use `sdl.context` or `sdl.retrieve` for indexed source and `sdl.file` with `op="read"` for other files. For permitted tooling, use workflow `runtimeExecute` with an explicit `timeoutMs`: use `outputMode: "minimal"` for quiet probes, `outputMode: "digest"` for noisy commands, or `outputMode: "intent"` when exact terms are known; set `persistOutput: true` when logs may need focused `runtimeQueryOutput` queries.',
13
+
'8. runtimeExecute executes repository tooling. Permitted uses include build, test, lint, compiler, named scripts, and targeted edit scripts. Do not use it to inspect, search, or print repository files. Use `sdl.context` or `sdl.retrieve` for indexed source and `sdl.file` with `op="read"` for other files. For permitted tooling, use workflow `runtimeExecute` with an explicit `timeoutMs`: use `outputMode: "minimal"` for quiet probes, `outputMode: "digest"` for noisy commands, or `outputMode: "intent"` when exact terms are known; set `persistOutput: true` when logs may need focused `runtimeQueryOutput` queries. Do not guess `runtimeQueryOutput` arguments; replay a returned action unchanged or call focused `sdl.manual` for `runtime.queryOutput` first.',
13
14
"9. Use memory tools only when `memory.enabled: true`.",
14
15
"10. Never call `index.refresh`, directly, through `sdl.workflow`, or via `sdl-mcp index`, without explicit user approval in the current turn.",
15
16
'11. `derivedState.structuralStale` and `derivedState.semanticStale` report separate readiness classes. If only `summariesDirty` or `embeddingsDirty` is set, continue with available retrieval lanes; do not refresh the index. These flags, `graphIntegrityState: "verifying"`, `PARSER_FILE_STATE_MISSING`, parser-state warnings, parser-provenance warnings, and refresh recommendations are diagnostics, not approval.',
Copy file name to clipboardExpand all lines: templates/SDL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Use this file as the repository fallback for the `sdl-mcp-agent-workflow` skill.
4
4
5
5
SDL-MCP is the normal repository interface. Native filesystem and shell tools are fallback-only when SDL-MCP is unavailable, or when accessing agent memory and other internal client data outside the indexed repository.
6
6
7
+
When a client bridge returns the raw MCP result, prefer `structuredContent`; use text `content` only as a fallback for older servers. Do not emit both or return the whole MCP response envelope to the agent.
8
+
7
9
---
8
10
9
11
## 1. Start Every Task
@@ -175,7 +177,7 @@ Use this when you need likely files and symbols before choosing `symbol.edit` or
175
177
176
178
Use the cheapest rung that answers the task. Static price tags in `sdl.manual` and `sdl.action.search` are release-time estimates, not live telemetry; use them to choose the first probe, then use `usage.stats` and `signalDensity` only when you need a savings or waste report.
177
179
178
-
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`.
180
+
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`. Do not guess `runtimeQueryOutput` arguments; replay a returned action unchanged or call focused `sdl.manual` for `runtime.queryOutput` first.
Copy file name to clipboardExpand all lines: tests/stress/fixtures/SDL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Use this file as the repository fallback for the `sdl-mcp-agent-workflow` skill.
4
4
5
5
SDL-MCP is the normal repository interface. Native filesystem and shell tools are fallback-only when SDL-MCP is unavailable, or when accessing agent memory and other internal client data outside the indexed repository.
6
6
7
+
When a client bridge returns the raw MCP result, prefer `structuredContent`; use text `content` only as a fallback for older servers. Do not emit both or return the whole MCP response envelope to the agent.
8
+
7
9
---
8
10
9
11
## 1. Start Every Task
@@ -175,7 +177,7 @@ Use this when you need likely files and symbols before choosing `symbol.edit` or
175
177
176
178
Use the cheapest rung that answers the task. Static price tags in `sdl.manual` and `sdl.action.search` are release-time estimates, not live telemetry; use them to choose the first probe, then use `usage.stats` and `signalDensity` only when you need a savings or waste report.
177
179
178
-
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`.
180
+
- Runtime: prefer `outputMode: "digest"` for build/test/lint and other noisy commands. The digest keeps a compact parsed status and persists full output for `runtimeQueryOutput`. Do not guess `runtimeQueryOutput` arguments; replay a returned action unchanged or call focused `sdl.manual` for `runtime.queryOutput` first.
0 commit comments