Skip to content

Commit e99a27e

Browse files
docs: unbloat guides/serena.md — 24% line reduction (#27263)
1 parent ca935b6 commit e99a27e

File tree

1 file changed

+3
-56
lines changed

1 file changed

+3
-56
lines changed

docs/src/content/docs/guides/serena.md

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ sidebar:
55
order: 5
66
---
77

8-
This guide covers using [Serena](https://github.com/oraios/serena), a powerful coding agent toolkit that provides semantic code retrieval and editing capabilities to agentic workflows.
8+
[Serena](https://github.com/oraios/serena) is an MCP server that enhances AI agents with IDE-like tools for semantic code analysis and manipulation. It supports **30+ programming languages** through Language Server Protocol (LSP) integration, enabling agents to find symbols, navigate code relationships, and edit at the symbol level — ideal for navigating and editing large, well-structured codebases.
99

1010
> [!CAUTION]
1111
> `tools.serena` has been removed. Use the `shared/mcp/serena.md` shared workflow instead (see [Migration](#migration-from-toolsserena) below). Workflows that still use `tools.serena` will fail to compile.
1212
13-
## What is Serena?
14-
15-
Serena is an MCP server that enhances AI agents with IDE-like tools for semantic code analysis and manipulation. It supports **30+ programming languages** through Language Server Protocol (LSP) integration, enabling agents to find symbols, navigate relationships, edit at symbol level, and analyze code structure - all without reading entire files or performing text-based searches.
16-
17-
> [!TIP]
18-
> Serena excels at navigating and manipulating complex codebases, especially for large, well-structured projects where precise code navigation and editing are essential.
19-
2013
## Quick Start
2114

2215
### Recommended: Import shared workflow
@@ -88,13 +81,6 @@ imports:
8881
languages: ["go", "typescript"]
8982
```
9083
91-
For Go-only workflows there is a shorthand:
92-
93-
```aw wrap
94-
imports:
95-
- shared/mcp/serena-go.md
96-
```
97-
9884
The shared workflow configures the full Serena MCP server (container image, entrypoint, workspace mount) explicitly. Compiling a workflow that still uses `tools.serena` now fails with an error:
9985

10086
```
@@ -135,21 +121,6 @@ Serena provides semantic code tools organized into three categories:
135121
136122
These tools enable agents to work at the **symbol level** rather than the file level, making code operations more precise and context-aware.
137123
138-
## Memory Configuration
139-
140-
Serena caches language server indexes for faster operations. Create the cache directory in your workflow:
141-
142-
```bash
143-
mkdir -p /tmp/gh-aw/cache-memory/serena
144-
```
145-
146-
Optionally configure cache-memory in frontmatter:
147-
```yaml wrap
148-
tools:
149-
cache-memory:
150-
key: serena-analysis
151-
```
152-
153124
## Usage Examples
154125
155126
### Find Unused Functions
@@ -171,29 +142,9 @@ tools:
171142
3. Report findings
172143
```
173144

174-
### Automated Refactoring
175-
176-
```aw wrap
177-
---
178-
engine: claude
179-
imports:
180-
- uses: shared/mcp/serena.md
181-
with:
182-
languages: ["python"]
183-
tools:
184-
edit:
185-
---
186-
187-
# Add Type Hints
188-
189-
1. Find functions without type hints
190-
2. Add annotations using `replace_symbol_body`
191-
3. Verify correctness
192-
```
193-
194145
## Best Practices
195146

196-
Configure cache directory early (`mkdir -p /tmp/gh-aw/cache-memory/serena`) for faster operations. Prefer symbol-level operations (`replace_symbol_body`) over file-level edits. Combine Serena with other tools like `github`, `edit`, and `bash` for complete workflows. For large codebases, start with targeted analysis of specific packages before expanding scope.
147+
Pre-create the cache directory (`mkdir -p /tmp/gh-aw/cache-memory/serena`) for faster operations — Serena reuses language server indexes across runs. Pin the key with `tools.cache-memory.key: serena-analysis` in frontmatter to persist it. Prefer symbol-level operations (`replace_symbol_body`) over file-level edits. Combine Serena with other tools like `github`, `edit`, and `bash` for complete workflows. For large codebases, start with targeted analysis of specific packages before expanding scope.
197148

198149
## Troubleshooting
199150

@@ -209,10 +160,6 @@ Configure cache directory early (`mkdir -p /tmp/gh-aw/cache-memory/serena`) for
209160
- [Using MCPs](/gh-aw/guides/mcps/) - General MCP server configuration
210161
- [Tools Reference](/gh-aw/reference/tools/) - Complete tools configuration
211162
- [Getting Started with MCPs](/gh-aw/guides/getting-started-mcp/) - MCP introduction
212-
213-
## External Resources
214-
215-
- [Serena GitHub Repository](https://github.com/oraios/serena) - Official repository
216-
- [Serena Documentation](https://oraios.github.io/serena/) - Comprehensive user guide
163+
- [Serena GitHub Repository](https://github.com/oraios/serena) — official repo and [documentation](https://oraios.github.io/serena/)
217164
- [Language Support](https://oraios.github.io/serena/01-about/020_programming-languages.html) - Supported languages and dependencies
218165
- [Serena Tools Reference](https://oraios.github.io/serena/01-about/035_tools.html) - Complete tool documentation

0 commit comments

Comments
 (0)