Commit Graph

10 Commits

Author SHA1 Message Date
Levi Neely 137d2c0e84 tools: add structured STATUS prefix signals for smaller model clarity
Addresses the loop/no-op problem where small models (e.g. devstral-small)
fail to interpret ambiguous prose output as terminal control signals.

Changes:
- file_write: prefix STATUS=done/no_change/error with STATE_CHANGED and RETRYABLE
- file_edit: same prefix scheme; also RETRYABLE=true for ambiguous match errors
- file_read: prefix STATUS=ok/empty/not_found/error to distinguish data absence from failure
- file_glob: prefix STATUS=ok/no_matches/error with MATCH_COUNT
- file_grep: prefix STATUS=ok/no_matches/error with MATCH_COUNT
- task_add: emit STATUS=ok ADDED=N TOTAL_TASKS=M
- task_check: emit STATUS=done TASK_COMPLETE=true/false REMAINING=N
- task_clear: emit STATUS=ok CLEARED=N REMAINING=N TASK_COMPLETE=true/false
- cascade: rewrite worker termination block as numbered mandatory rules;
  add explicit STATUS: error branch; clarify stop-after-write requirement
2026-05-19 10:15:08 +00:00
Levi Neely 7ae8b69ec9 tools: per-tool semantic truncation (file_grep 50, lsp_references 50, memory_recall 10/50, file_read 500) 2026-05-17 12:51:49 +02:00
Levi Neely c2f8eb29a6 tools: annotate file_read and memory_recall as cold-tier 2026-05-17 10:59:18 +02:00
Levi Neely d7a6d7b8c3 file_read: remove max size limit, use islice for streaming reads
The 8MB size check caused models to fall back to cat which reads the
entire file without truncation. Now uses itertools.islice to read only
the requested segment without loading the whole file into memory.

Also: sandbox config additions (pcfs, ~/img).
2026-05-08 11:28:43 +02:00
Levi Neely d9e9ca1b52 file tools: simplify to read/edit/write without sentinel machinery
system prompt: require task list for multi-step work
agents: remove preTurn hook; rely on agentSpawn prime + system prompt
backend: require OLLIE_BACKEND/OLLIE_MODEL env vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:29:18 +02:00
Levi Neely 1a01002f7b planning: observe step, task dispatcher, tool parallel annotations, graceful degradation
- agents: agentSpawn uses 'task prime', postTurn uses 'task list' (observe step)
- scripts/x/task: dispatcher routes to bd (beads) or todo.sh based on availability
- prompts/tools-todosh.md: prime context for todo.sh fallback
- tools: add '# ollie:parallel read' annotation to file_read, file_glob, file_grep,
  file_grep, memory_recall, reasoning_think, denote_view
- core: update submodule ref

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:00:54 +02:00
Levi Neely f918955951 file_read: return (binary file) when null bytes detected 2026-04-23 11:35:12 +02:00
Levi Neely 8ca905799b fix: error handling, sandbox env, file tool enforcement
- tools/file_*: hard-fail when OLLIE_SESSION_ID is unset; surface errors
  on all failure paths including dir checks, marker cleanup, and I/O
- tools/file_read: treat nonexistent path as new file (emit "(new file)",
  write empty marker) so file_write can create new files
- tools/file_write: colorize new-file lines with + (U+FF0B)
- tools/file_glob, file_grep, memory_*, task_*: consistent error handling
  and output to stdout so the model sees all failures
- tui/diffcolor.go: match +/− (U+FF0B/U+2212) lookalikes emitted by
  file_edit/file_write; fix +++ / --- header pattern
- prompts: prohibit execute_code for file creation/modification;
  enforce execute_tool with file_write/file_edit instead
- core submodule: surface isError from MCP responses; inject
  OLLIE_SESSION_ID into execute server at session creation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 22:52:10 +02:00
Levi Neely 1b9c7af9c9 tools: clear usage messages on all tools when called with no/bad args
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 18:21:35 +02:00
Levi Neely 4d9550e9cf tools: add file_* and reasoning_think scripts; rename task tools
Add shell script implementations of file_read, file_write, file_edit,
file_grep, file_glob, reasoning_think. Rename task_plan.sh/task_complete.py
to task_plan/task_complete (shebang detection makes extensions unnecessary).

Update submodules: core, 9p, skills.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:26:42 +02:00