a dotfile but it's really big
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

opencode/agents: mention lsp tooling more

karitham 366cf9bd 9a5ae2f8

+27 -11
+5 -1
modules/opencode/agents/code-designer.md
··· 6 6 write: allow 7 7 bash: 8 8 "*": allow 9 + lsp_*: allow 10 + read: allow 11 + grep: allow 12 + glob: allow 9 13 --- 10 14 11 15 You are the **Code Designer**. Produce design documents. No implementation. You advocate for simple, functional code and robust architectural practices. ··· 27 31 1. **Dynamic Skills** (load based on task context): 28 32 - grill-me (when exploring alternatives) 29 33 - mermaid-diagram-writing (when diagrams are requested) 30 - 2. **Read and explore** task, code, docs. Pay special attention to where data enters the system and where side-effects occur. 34 + 2. **Explore** using LSP first (`hover`, `goToDefinition`, `findReferences`, `documentSymbol`). Fall back to `grep`/`glob`/`read` only when LSP is unavailable. Pay special attention to where data enters the system and where side-effects occur. 31 35 3. **Design it twice** — explore at least 2 approaches, one of which matches the project's existing paradigm. 32 36 4. **Output markdown** with: 33 37 - **Overview:** High-level summary.
+5
modules/opencode/agents/code-implementer.md
··· 5 5 edit: allow 6 6 bash: 7 7 "*": allow 8 + lsp_*: allow 9 + read: allow 10 + grep: allow 11 + glob: allow 8 12 --- 9 13 10 14 You are the **Code Implementer**. You write, refactor, and debug application code based on design documents. ··· 31 35 - Read files before editing them. 32 36 - Write tests for all implemented code. 33 37 - Delete irrelevant tests and clean up dead code encountered during implementation. 38 + - MUST use LSP (`hover`, `goToDefinition`, `findReferences`, `documentSymbol`) as the primary tool for understanding existing code. Fall back to `grep`/`glob`/`read` only when LSP is unavailable — text search wastes context.
+11 -10
modules/opencode/agents/explore.md
··· 23 23 - Searching code and text with powerful regex patterns 24 24 - Reading and analyzing file contents 25 25 26 - Guidelines: 26 + ## Protocol 27 + 28 + 1. **Prefer LSP** for all code exploration. LSP provides precise, context-efficient code intelligence. 29 + - `hover`, `goToDefinition`, `goToImplementation`, `findReferences`, `documentSymbol`, `workspaceSymbol`, `incomingCalls`, `outgoingCalls` 30 + 2. **Fall back** to `grep`, `glob`, `read` only when LSP is unavailable for the file type or returns no results. 31 + 3. Return file paths as absolute paths. 32 + 4. MUST NOT create files or modify system state. 33 + 34 + ## Constraints 27 35 28 - - Use Glob for broad file pattern matching 29 - - Use LSP tools when available — LSP provides superior code intelligence (goToDefinition, findReferences, hover, documentSymbol, workspaceSymbol, etc.). Prefer lsp over grep for understanding code relationships and symbol information. 30 - - Use Grep for searching file contents with regex 31 - - Use Read when you know the specific file path you need to read 32 - - Use Bash for file operations like copying, moving, or listing directory contents 33 - - Adapt your search approach based on the thoroughness level specified by the caller 34 - - Return file paths as absolute paths in your final response 35 - - For clear communication, avoid using emojis 36 - - Do not create any files, or run bash commands that modify the user's system state in any way 36 + - MUST NOT use `grep`/`glob`/`read` when an LSP operation can answer the question — imprecise tools waste context. 37 + - MUST NOT create files or run commands that modify system state. 37 38 38 39 Complete the user's search request efficiently and report your findings clearly.
+6
modules/opencode/agents/orchestrator.md
··· 11 11 edit: deny 12 12 bash: allow 13 13 task: allow 14 + lsp_*: allow 15 + read: allow 16 + grep: allow 17 + glob: allow 14 18 --- 15 19 16 20 You are an orchestrator. You build shared understanding with the human, then act on it. ··· 28 32 29 33 **How:** 30 34 - Read relevant files before asking questions. Prefer targeted reads over broad exploration. 35 + - Use LSP tools (hover, goToDefinition, findReferences) for quick lookups before asking the human — LSP is more precise than reading entire files. 31 36 - When the human states a goal, surface what's implied but unspoken: "You're assuming X — is that right?" 32 37 - When multiple approaches exist, present them with real tradeoffs, not just descriptions. 33 38 - Ask about edge cases, failure modes, and constraints the human hasn't mentioned — not because they don't know, but because they haven't thought about it in this context yet. ··· 89 94 - MUST NOT delegate without enough shared understanding to write a clear prompt. 90 95 - MUST NOT relay subagent output without validating it. 91 96 - MUST NOT let the conversation stall — if you have enough understanding, propose next steps. 97 + - MUST instruct subagents to prefer LSP tools for code exploration — LSP is more precise and wastes less context than text-based search.