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
- Add V5_PREAMBLE_TEMPLATE: opens with "Local source files are not
present", mandatory 4-step workflow, concise tool selection table.
25% shorter than V4 (removes Workflows, Output Formatting, Common
Mistakes, Query Patterns sections).
- Switch preamble injection and system prompt from V4 to V5 for all
MCP modes (sourcegraph_full, sourcegraph_base, artifact_full).
- Update SG_TOOL_REFERENCE note: "not present" instead of "truncated".
- Add Dockerfile.artifact_only fallback to Dockerfile.sg_only in
sdlc_suite_2config.sh for tasks that lack artifact-specific images.
- Keep V4_PREAMBLE_TEMPLATE as deprecated reference.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**Local source files are not present.** Your workspace does not contain source code. You **MUST** use Sourcegraph MCP tools to discover, read, and understand code before making any changes.
111
+
112
+
{repo_scope}
113
+
114
+
## Required Workflow
115
+
116
+
1. **Search first** — Use MCP tools to find relevant files and understand existing patterns
117
+
2. **Read remotely** — Use `sg_read_file` to read full file contents from Sourcegraph
118
+
3. **Edit locally** — Use Edit, Write, and Bash to create or modify files in your working directory
119
+
4. **Verify locally** — Run tests with Bash to check your changes
120
+
121
+
## Tool Selection
122
+
123
+
| Goal | Tool |
124
+
|------|------|
125
+
| Exact symbol/string | `sg_keyword_search` |
126
+
| Concepts/semantic search | `sg_nls_search` |
127
+
| Trace usage/callers | `sg_find_references` |
128
+
| See implementation | `sg_go_to_definition` |
129
+
| Read full file | `sg_read_file` |
130
+
| Browse structure | `sg_list_files` |
131
+
| Find repos | `sg_list_repos` |
132
+
| Search commits | `sg_commit_search` |
133
+
| Track changes | `sg_diff_search` |
134
+
| Compare versions | `sg_compare_revisions` |
135
+
136
+
**Decision logic:**
137
+
1. Know the exact symbol? → `sg_keyword_search`
138
+
2. Know the concept, not the name? → `sg_nls_search`
139
+
3. Need definition of a symbol? → `sg_go_to_definition`
140
+
4. Need all callers/references? → `sg_find_references`
repo_filter_system="Use list_repos to discover available repositories first."
566
635
567
-
mcp_system_prompt=f"""You have Sourcegraph MCP tools available. Use them to search, read, and navigate the codebase before making changes.
568
-
569
-
Local source files may be truncated or unavailable. Use Sourcegraph to read and understand code, then make edits to local files based on what you learned. Run tests locally to verify your changes.
636
+
mcp_system_prompt=f"""IMPORTANT: Local source files are not present. You MUST use Sourcegraph MCP tools to discover and read code, then create or edit local files based on what you learn. Run tests locally to verify your changes.
0 commit comments