Update cpp-language-service-tools.instructions#1917
Open
DavidARaygoza wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
main, but PRs should target staged.
The main branch is auto-published from staged and should not receive direct PRs.
Please close this PR and re-open it against the staged branch.
You can change the base branch using the Edit button at the top of this PR,
or run: gh pr edit 1917 --base staged
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the C++ language service tool instructions to emphasize semantic tooling by default while allowing text-based fallbacks when necessary.
Changes:
- Rewords Rule 1 to prefer
GetSymbolReferences_CppToolsand clarifies fallback usage of text-based tools. - Simplifies/reshapes guidance and examples around symbol references and call hierarchy usage.
- Updates wording throughout to be more precise (e.g., “type information”, “text-based search tools”).
Show a summary per file
| File | Description |
|---|---|
| instructions/cpp-language-service-tools.instructions.md | Refines guidance for using C++ semantic tools vs text-based search and updates example/workflow text. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 5
Comment on lines
+203
to
+204
| - ✅ Use `read_file` to find line numbers before specifying them### Rule 1: Prefer GetSymbolReferences_CppTools as the default for locating C/C++ Symbol Usages | ||
| - ✅ Prefer C++ tools as the default. Rely on text-based search tools only as a fallback if C++ tools are unavailable, fail, or appear incomplete. |
| ### Rule 1: Prefer GetSymbolReferences_CppTools as the default for locating C/C++ Symbol Usages | ||
|
|
||
| **NEVER** rely on manual code inspection, `vscode_listCodeUsages`, `grep_search`, or `read_file` to find where a symbol is used. | ||
| **DO NOT** rely on text-based search tools such as `vscode_listCodeUsages`, `grep_search`, or `read_file`. Only if GetSymbolReferences_CppTools is unavailable, fails, or appears incomplete, resort to these text-based search tools as a fallback. |
| - ✅ Call `GetSymbolReferences_CppTools` for ANY symbol usage search | ||
| - ✅ Call `GetSymbolCallHierarchy_CppTools` before function signature changes | ||
| - ✅ Use `read_file` to find line numbers before specifying them | ||
| - ✅ Use `read_file` to find line numbers before specifying them### Rule 1: Prefer GetSymbolReferences_CppTools as the default for locating C/C++ Symbol Usages |
Comment on lines
15
to
+19
| ## Mandatory Tool Usage Rules | ||
|
|
||
| ### Rule 1: ALWAYS Use GetSymbolReferences_CppTools for Symbol Usages | ||
| ### Rule 1: Prefer GetSymbolReferences_CppTools as the default for locating C/C++ Symbol Usages | ||
|
|
||
| **NEVER** rely on manual code inspection, `vscode_listCodeUsages`, `grep_search`, or `read_file` to find where a symbol is used. | ||
| **DO NOT** rely on text-based search tools such as `vscode_listCodeUsages`, `grep_search`, or `read_file`. Only if GetSymbolReferences_CppTools is unavailable, fails, or appears incomplete, resort to these text-based search tools as a fallback. |
Comment on lines
88
to
+90
| 1. **First attempt**: Symbol name only | ||
| 2. **If ambiguous**: Symbol name + file path | ||
| 3. **If still ambiguous**: Symbol name + file path + line number (after using `read_file`) | ||
| 3. **If still ambiguous**: Symbol name + file path + line number (after using `read_file` workflow mentioned above) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.stagedbranch for this pull request.Description
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.