prompts: add tools-lsp prompt, wire into all agents
This commit is contained in:
parent
3fec18b780
commit
36010d0143
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-coding",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"$OLLIE/x/prime SYSTEM_PROMPT",
|
||||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-devops",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-qa",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-reviewer",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-sysarchitect",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"prime tools-task 2>/dev/null || true",
|
||||
"$OLLIE/x/prime agent-writer",
|
||||
"$OLLIE/x/prime tools-file",
|
||||
"$OLLIE/x/prime tools-lsp",
|
||||
"$OLLIE/x/prime tools-reasoning",
|
||||
"$OLLIE/x/prime tools-memory",
|
||||
"$OLLIE/x/prime tools-subagent",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
# LSP Tools
|
||||
|
||||
Code intelligence via language servers (gopls, clangd, intelephense). The bridge daemon starts automatically on first use and stays alive between calls.
|
||||
|
||||
| Tool | Args | Output |
|
||||
|------|------|--------|
|
||||
| `lsp_definition` | `<file> <line> <col>` | Definition location(s) as `file:line:col` |
|
||||
| `lsp_references` | `<file> <line> <col>` | All references as `file:line:col` |
|
||||
| `lsp_hover` | `<file> <line> <col>` | Type signature and documentation |
|
||||
| `lsp_rename` | `<file> <line> <col> <new_name>` | Applies rename across workspace, prints summary |
|
||||
| `lsp_symbols` | `<file> [--workspace]` | Symbols in file or workspace-wide search |
|
||||
| `lsp_diagnostics` | `<file>` | Errors and warnings with positions |
|
||||
|
||||
**Trigger condition**: when you need semantic code understanding — finding callers before refactoring, checking a type signature, renaming across a codebase, or verifying a file compiles cleanly.
|
||||
|
||||
**Calling convention**:
|
||||
```
|
||||
execute_code: steps=[{tool: "lsp_definition", args: ["/abs/path/to/file.go", "42", "10"]}]
|
||||
execute_code: steps=[{tool: "lsp_references", args: ["/abs/path/to/file.go", "42", "10"]}]
|
||||
execute_code: steps=[{tool: "lsp_hover", args: ["/abs/path/to/file.go", "42", "10"]}]
|
||||
execute_code: steps=[{tool: "lsp_rename", args: ["/abs/path/to/file.go", "42", "10", "NewName"]}]
|
||||
execute_code: steps=[{tool: "lsp_symbols", args: ["/abs/path/to/file.go"]}]
|
||||
execute_code: steps=[{tool: "lsp_diagnostics", args: ["/abs/path/to/file.go"]}]
|
||||
```
|
||||
|
||||
**Line/col are 1-indexed** — matching `file_read` output. Use the line numbers from `file_read` directly.
|
||||
|
||||
**Supported languages**: Go (`.go`), C/C++ (`.c`, `.h`, `.cc`, `.cpp`, `.cxx`, `.hpp`), PHP (`.php`).
|
||||
|
||||
**Prefer `lsp_rename` over manual find-and-replace** for symbol renames — it understands scope, interfaces, and cross-package references.
|
||||
|
||||
**Prefer `lsp_references` over `file_grep`** when you need semantic references (not just text matches) — it won't return comments, strings, or unrelated identifiers that happen to share a name.
|
||||
Loading…
Reference in New Issue