-
Notifications
You must be signed in to change notification settings - Fork 46
Optimize Serena tool usage guidance for agentic planning #13078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
.github/aw/serena-tool.md
Outdated
|
|
||
| The first language is the default fallback. | ||
|
|
||
| ## Detecting Repository Language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot ignore section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the "Detecting Repository Language" section. Fixed in 38b4c7b.
.github/aw/serena-tool.md
Outdated
| - `activate_project` - Activate Serena for a workspace | ||
| - `restart_language_server` - Restart LSP if needed | ||
|
|
||
| ### Memory and State |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot do not use Serena memories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed Serena memory tools (write_memory, read_memory, list_memories) from the tool reference. Fixed in 38b4c7b.
.github/aw/serena-tool.md
Outdated
| } | ||
| ``` | ||
|
|
||
| ### 4. Leverage Memory for Insights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot do not use see a memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the "Leverage Memory for Insights" best practice section. Fixed in 38b4c7b.
…back Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| @@ -1,86 +1,323 @@ | |||
| # Serena Language Server Tool | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot optimize the content of the file for agentic planning (this is a prompt of an agent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimized for agentic planning. Reduced from 323 to 173 lines (46% reduction), restructured as action-oriented decision guide with:
- Quick YES/NO decision criteria at top
- Categorized tool lists with one-line descriptions
- Step-by-step workflows instead of prose
- Concise patterns as numbered action sequences
- Scannable format with bold keywords and bullet points
Fixed in 194afe1.
…d and concise Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
The Serena tool prompt lacked practical guidance optimized for AI agent decision-making. Analysis of 20 workflows revealed common patterns and anti-patterns. The file has been restructured from documentation-style to action-oriented agent prompt.
Changes
Redefined purpose and scope
Optimized for agentic planning
Documented production patterns
Tool reference
find_symbol,get_symbols_overview,find_referencing_code_snippetsreplace_symbol_body,insert_at_line,delete_linessearch_for_pattern,activate_project,onboardingCommon pitfalls section
editinstead)activate_projectfirstDecision tree
Removed per feedback
write_memory,read_memory,list_memories) and related best practicesResult
File optimized from 87 to 173 lines (originally expanded to 323). Agents can now make instant YES/NO decisions using top-of-file criteria, with all essential information in a scannable, action-oriented format following the pattern of other agent prompts in
.github/aw/.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.