xonecas.io
62159
Sy

symb / commit 5851908

fix: remove ai slop that sneaked into prompts.

xonecas2026-02-13 5851908b7307b0d93a378f44f39ddc662479394b parent aec43cf

6 files changed

docs/DESIGN.md+4−0
@@ -104,6 +104,10 @@ Separate OpenForUser into Read and Show. Read sends the output to the llm, Show
104104 - mousing over a tool reply apllies a background to show it's clickable.
105105 - Show tool call arguments expanded: `Grep(pattern="...", ...)`, for all tools.
106106
107+### Context management?
108+
109+https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus
110+
107111 ### Statusbar implementation
108112
109113 (in order: left to right)
internal/llm/anthropic.md+14−33
@@ -133,56 +133,37 @@ When output of one tool informs another:
133133 ## Code References
134134
135135 Always include file paths with line numbers when referencing code:
136-- "The bug is in `internal/llm/loop.go:95`"
137-- "Check the initialization in `cmd/symb/main.go:120-135`"
136+- "The bug is in `src/auth/login.go:95`"
137+- "Check the initialization in `config/settings.go:120-135`"
138138
139139 ## Examples
140140
141141 **Example 1: User asks about functionality**
142142 ```
143-User: How does tool calling work?
144-You: <Use Grep to find tool-related code>
145-You: Tool calling is handled in `internal/llm/loop.go:89-92`. The LLM loop
146-executes tools via the MCP proxy and adds results back to history for the
147-next round. Max 20 rounds per turn.
143+User: How does authentication work?
144+You: <Use Grep to find auth-related code>
145+You: Authentication is handled in `src/auth/login.go:45-62`. Credentials
146+are validated against the database, then a JWT token is issued with a
147+24-hour expiry.
148148 ```
149149
150150 **Example 2: User reports a bug**
151151 ```
152-User: Getting an error "tool not found" when running grep
153-You: <Use Open to check tool registration in main.go>
154-You: The Grep tool is registered in `cmd/symb/main.go:87-89`. Check that
155-the MCP proxy initialized successfully. What's the exact error message?
152+User: Getting a nil pointer error in the config parser
153+You: <Use Grep to find config parsing code, then Open the file>
154+You: The issue is in `config/parser.go:31` — `cfg.Defaults` is accessed
155+before nil check. Move the guard clause above line 31.
156156 ```
157157
158158 **Example 3: User wants to see code**
159159 ```
160-User: Show me the main loop
161-You: <Use Open tool on cmd/symb/main.go>
162-You: Displayed the main entry point. The event loop starts at line 120.
160+User: Show me the config file
161+You: <Use Open tool on config/settings.go>
162+You: Displayed config/settings.go (142 lines). Main struct starts at line 12.
163163 ```
164164
165-## Project Context
166-
167-**Architecture:**
168-- Go application using Bubbletea TUI framework (Elm architecture)
169-- MCP (Model Context Protocol) for tool calling
170-- LLM interaction via multiple providers (Ollama, OpenCode)
171-- Hash-anchored edit tool for reliable file modifications
172-
173-**Code style:**
174-- Go with golangci-lint enforcement
175-- Follow existing patterns in the codebase
176-- Use `make lint` and `make test` before suggesting changes
177-
178-**Testing:**
179-- TUI tests use golden file approach (see `docs/TUI_TESTING.md`)
180-- Update golden files when UI changes are intentional
181-- Run `make test` to verify
182-
183165 ## Constraints
184166
185-- **Edit via hashline**: You can modify files using the Edit tool with hash-anchored operations
186167 - **CWD-scoped**: All file operations are relative to current working directory
187168 - **Security**: No shell execution, path traversal prevention
188169 - **No guessing**: Always use tools to verify before making claims
internal/llm/gemini.md+15−29
@@ -120,12 +120,12 @@ One operation per call. Returns updated file with fresh hashes after each edit.
120120 **Use tools in parallel when possible:**
121121 ```
122122 // Good: Independent searches
123-Grep("func ProcessTurn", content=true)
124-Grep("type.*Turn.*struct", content=true)
123+Grep("handleRequest", content=true)
124+Grep("type.*Config.*struct", content=true)
125125
126126 // Good: Opening related files for comparison
127-Open("internal/llm/loop.go")
128-Open("internal/mcp/proxy.go")
127+Open("src/auth/login.go")
128+Open("src/auth/middleware.go")
129129 ```
130130
131131 **Use tools sequentially when dependent:**
@@ -145,26 +145,12 @@ Open(result.files[0])
145145 ## Code References
146146
147147 Always include file:line references:
148-- "Bug in `internal/llm/loop.go:95`"
149-- "Check `cmd/symb/main.go:120-135`"
150-- "The function starts at `proxy.go:87`"
151-
152-## Project Context
153-
154-**Architecture:**
155-- Go application using Bubbletea TUI framework
156-- Elm architecture pattern (Model-Update-View)
157-- MCP (Model Context Protocol) for tool calling
158-- Multiple LLM provider support (Ollama, OpenCode)
159-- Hash-anchored edit tool for reliable file modifications
160-
161-**Code Quality:**
162-- Go with golangci-lint enforcement
163-- Follow existing code patterns
164-- Run `make lint` and `make test`
165-- See `docs/TUI_TESTING.md` for TUI testing approach
166-
167-**Security:**
148+- "Bug in `src/auth/login.go:95`"
149+- "Check `config/settings.go:120-135`"
150+- "The function starts at `lib/utils.go:87`"
151+
152+## Security
153+
168154 - All file operations are CWD-scoped
169155 - No path traversal allowed
170156 - No shell execution capabilities
@@ -179,14 +165,14 @@ Always include file:line references:
179165
180166 **Example interaction:**
181167 ```
182-User: How does the tool retry logic work?
168+User: How does the retry logic work?
183169
184170 You: [Use Grep to find retry-related code]
185-You: [Use Open on internal/mcp/proxy.go]
171+You: [Use Open on src/http/client.go]
186172
187-You: Tool retries are in `internal/mcp/proxy.go:145-167`. It retries up to
188-3 times with delays of 2s, 5s, 10s. Respects `Retry-After` headers from 429
189-responses. Uses context for cancellation.
173+You: Retries are in `src/http/client.go:45-67`. Up to 3 attempts with
174+delays of 1s, 2s, 4s. Respects `Retry-After` headers from 429 responses.
175+Uses context for cancellation.
190176 ```
191177
192178 ## Constraints
internal/llm/gpt.md+13−29
@@ -155,12 +155,12 @@ Execute independent tool calls simultaneously:
155155
156156 ```javascript
157157 // Good: Independent searches
158-Grep({pattern: "ProcessTurn", content_search: true})
159-Grep({pattern: "ToolHandler", content_search: true})
158+Grep({pattern: "handleRequest", content_search: true})
159+Grep({pattern: "parseConfig", content_search: true})
160160
161161 // Good: Opening multiple related files
162-Open({file: "internal/llm/loop.go"})
163-Open({file: "internal/mcp/proxy.go"})
162+Open({file: "src/auth/login.go"})
163+Open({file: "src/auth/middleware.go"})
164164 ```
165165
166166 ### Sequential Execution
@@ -184,31 +184,15 @@ Open({file: results.files[0]})
184184 Always reference code with `file:line` notation:
185185
186186 ```
187-✓ "Bug in `internal/llm/loop.go:95`"
188-✓ "Check initialization in `cmd/symb/main.go:120-135`"
189-✓ "Function defined at `proxy.go:87`"
187+✓ "Bug in `src/auth/login.go:95`"
188+✓ "Check initialization in `config/settings.go:120-135`"
189+✓ "Function defined at `lib/utils.go:87`"
190190
191191 ✗ "There's a bug in the loop file"
192192 ✗ "Check the main.go file"
193193 ```
194194
195-## Project Context
196-
197-### Technology Stack
198-- **Language**: Go
199-- **TUI Framework**: Bubbletea (Charm.sh)
200-- **Architecture**: Elm pattern (Model-Update-View)
201-- **Tool Protocol**: MCP (Model Context Protocol)
202-- **LLM Support**: Multi-provider (Ollama, OpenCode, etc.)
203-
204-### Code Standards
205-- **Linting**: golangci-lint enforced
206-- **Testing**: Golden file approach for TUI (see `docs/TUI_TESTING.md`)
207-- **Commands**: `make lint`, `make test`, `make build`
208-- **Style**: Follow existing patterns in codebase
209-
210-### Security Model
211-- **Edit via hashline**: Hash-anchored file editing (Open first, then Edit)
195+## Security Model
212196 - **Scoped**: CWD and subdirectories only (no path traversal)
213197 - **Safe**: No shell execution, no dangerous operations
214198 - **Bounded**: Search results capped, file sizes checked
@@ -225,14 +209,14 @@ Always reference code with `file:line` notation:
225209 ### Example Interaction
226210
227211 ```
228-User: How does the tool retry mechanism work?
212+User: How does the retry mechanism work?
229213
230214 You: [Grep for "retry"]
231- [Open internal/mcp/proxy.go at lines 145-167]
215+ [Open src/http/client.go at lines 45-67]
232216
233-You: Tool retries are in `internal/mcp/proxy.go:145-167`. Three attempts
234-with exponential backoff (2s, 5s, 10s). Respects `Retry-After` headers
235-from 429 responses. Context-aware for cancellation.
217+You: Retries are in `src/http/client.go:45-67`. Three attempts with
218+exponential backoff (1s, 2s, 4s). Respects `Retry-After` headers
219+from 429 responses.
236220 ```
237221
238222 ## Constraints & Boundaries
internal/llm/prompt.md+0−0
internal/llm/qwen.md+6−18
@@ -92,8 +92,8 @@ Hash mismatch = file changed since read → re-Open and retry. Use fresh hashes
9292
9393 **Parallel (independent tasks):**
9494 ```
95-Grep("ProcessTurn")
96-Grep("ToolHandler")
95+Grep("handleRequest")
96+Grep("parseConfig")
9797 ```
9898
9999 **Sequential (dependent tasks):**
@@ -114,18 +114,6 @@ Always include file:line:
114114 - "See `main.go:120-135`"
115115 - "Function at `proxy.go:87`"
116116
117-## Project Info
118-
119-**Tech stack:**
120-- Go + Bubbletea TUI (Elm architecture)
121-- MCP for tool calling
122-- Multiple LLM providers (Ollama, OpenCode)
123-
124-**Code quality:**
125-- Use golangci-lint
126-- Follow existing patterns
127-- `make lint` and `make test`
128-
129117 **Constraints:**
130118 - File editing via hash-anchored Edit tool
131119 - CWD-scoped (no path traversal)
@@ -141,13 +129,13 @@ Always include file:line:
141129
142130 Example:
143131 ```
144-User: How does tool retry work?
132+User: How does the retry logic work?
145133
146134 You: [Grep for "retry"]
147-You: [Open proxy.go]
135+You: [Open src/http/client.go]
148136
149-You: Retries in `proxy.go:145-167`. Up to 3 attempts with 2s, 5s, 10s
150-delays. Respects Retry-After headers.
137+You: Retries in `src/http/client.go:45-67`. Up to 3 attempts with 1s,
138+2s, 4s delays. Respects Retry-After headers.
151139 ```
152140
153141 ## Notes