refactor(lsp): clean up lsp_servers references and update prompts to use PascalCase

- Remove dead lsp_servers function from tools.ts
- Update utils.ts to reference LspServers (OpenCode built-in)
- Update AGENTS.md: 7 tools → 3 tools
- Update init-deep.ts prompts to use PascalCase OpenCode tools
- Update refactor.ts prompts to use PascalCase OpenCode tools
This commit is contained in:
justsisyphus
2026-01-16 10:40:44 +09:00
parent c1e6a53fc4
commit 133be9d17c
5 changed files with 18 additions and 41 deletions
@@ -114,19 +114,19 @@ If \`--create-new\`: Read all existing first (preserve context) → then delete
#### 3. LSP Codemap (if available)
\`\`\`
lsp_servers() # Check availability
LspServers() # Check availability
# Entry points (parallel)
lsp_symbols(filePath="src/index.ts", scope="document")
lsp_symbols(filePath="main.py", scope="document")
LspDocumentSymbols(filePath="src/index.ts")
LspDocumentSymbols(filePath="main.py")
# Key symbols (parallel)
lsp_symbols(filePath=".", scope="workspace", query="class")
lsp_symbols(filePath=".", scope="workspace", query="interface")
lsp_symbols(filePath=".", scope="workspace", query="function")
LspWorkspaceSymbols(filePath=".", query="class")
LspWorkspaceSymbols(filePath=".", query="interface")
LspWorkspaceSymbols(filePath=".", query="function")
# Centrality for top exports
lsp_find_references(filePath="...", line=X, character=Y)
LspFindReferences(filePath="...", line=X, character=Y)
\`\`\`
**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.
@@ -149,14 +149,14 @@ While background agents are running, use direct tools:
\`\`\`typescript
// Find definition(s)
lsp_goto_definition(filePath, line, character) // Where is it defined?
LspGotoDefinition(filePath, line, character) // Where is it defined?
// Find ALL usages across workspace
lsp_find_references(filePath, line, character, includeDeclaration=true)
LspFindReferences(filePath, line, character, includeDeclaration=true)
// Get file structure (scope='document') or search symbols (scope='workspace')
lsp_symbols(filePath, scope="document") // Hierarchical outline
lsp_symbols(filePath, scope="workspace", query="[target_symbol]") // Search by name
// Get file structure
LspDocumentSymbols(filePath) // Hierarchical outline
LspWorkspaceSymbols(filePath, query="[target_symbol]") // Search by name
// Get current diagnostics
lsp_diagnostics(filePath) // Errors, warnings before we start
@@ -587,9 +587,9 @@ If any of these occur, **STOP and consult user**:
You already know these tools. Use them intelligently:
## LSP Tools
Leverage the full LSP toolset (\`lsp_*\`) for precision analysis. Key patterns:
- **Understand before changing**: \`lsp_goto_definition\` to grasp context
- **Impact analysis**: \`lsp_find_references\` to map all usages before modification
Leverage LSP tools for precision analysis. Key patterns:
- **Understand before changing**: \`LspGotoDefinition\` to grasp context
- **Impact analysis**: \`LspFindReferences\` to map all usages before modification
- **Safe refactoring**: \`lsp_prepare_rename\`\`lsp_rename\` for symbol renames
- **Continuous verification**: \`lsp_diagnostics\` after every change