Commit Graph

125 Commits

Author SHA1 Message Date
Levi Neely a960566ec9 tools,scripts: bound .beads walk-up at .git boundary
Walk up from CWD only while .git exists at each level. Stops at the
first directory without .git, preventing false positives outside the repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:18:08 +02:00
Levi Neely dc5356b242 tools: walk up from CWD to find .beads for monorepo support
The .beads check now traverses parent directories so plan_* enforcement
works from any subdirectory of the repo, not just the root.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:14:36 +02:00
Levi Neely c7fb791434 tools: fix .beads check to use -d (directory, not file)
bd init creates .beads/ as a directory; -f was silently failing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:13:37 +02:00
Levi Neely 89f340eca9 tools: change OLLIE_BEADS_ENABLE default to 1 (opt-out instead of opt-in)
plan_* now blocks by default when bd and .beads are present.
Set OLLIE_BEADS_ENABLE=0 to use the markdown-based plan_* scripts instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:11:26 +02:00
Levi Neely 4f3e04de13 tools: add .beads project file as third guard for plan_* enforcement
All three conditions must hold to block plan_* in favor of bd:
  OLLIE_BEADS_ENABLE=1, bd on PATH, and .beads exists in CWD.
This makes enforcement purely opt-in per project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 10:47:22 +02:00
Levi Neely 663e7f305a tools: enforce beads for planning when OLLIE_BEADS_ENABLE=1 and bd is present
If both conditions hold, plan_* scripts exit 2 with an error directing
the model to use bd instead. When either condition is false (beads not
configured or bd not installed), the scripts run normally as a fallback.

Document OLLIE_BEADS_ENABLE in README and doc/help.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 10:43:32 +02:00
Levi Neely 0abcb6367c beads integration (wip); fix plan_create printf; bump core
- agents/test-bd.json: test agent with bd prime agentSpawn hook
- prompts/06_tool-plan.md: prefer beads when context injected at session start
- tools/plan_create: fix printf treating '- [ ]' format as option flag
- submodules: bump core

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 07:24:51 +02:00
Levi Neely 8a82d0966b elevation: add x/elevate plugin; update mkfile and docs
Replace tools/elevate_superpowers with scripts/x/elevate — a single
self-contained plugin that bootstraps into a superpowers session and
runs the IPC. mkfile installs it to ~/.config/ollie/scripts/x/.
Update 08_tool-elevate.md to remove backend-specific language.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 20:50:37 +02:00
Levi Neely 4202505704 elevation: add elevate_superpowers tool; remove frontend env injection from s/sh and submodules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 20:07:10 +02:00
Levi Neely c5d87567ce prompts: restructure system prompt; replace task tools with plan_* lifecycle
- Rename and reorder prompt files: skills bumped to 02, tool prompts
  prefixed tool-*, execute_code prompt removed (content absorbed into schema)
- Rewrite all tool prompts with explicit Trigger/Calling convention/Returns/Constraints structure
- Trim 03_reasoning.md to essentials; add "returns nothing" clarification
- Restructure task planning: replace task_plan/task_complete with explicit
  plan_create/plan_start/plan_check/plan_finish lifecycle tools
  - plan_finish enforces hard constraint: fails if any - [ ] tasks remain
- Remove no-shell-redirect rule from 00_base (consolidated into 03_tool-files)
- Add t/idx discovery and parallel schema advice to execute_code JSON schema
- Remove dead execute_pipe/execute_tool trustedTools references from agent configs
- Make keyword greps case-insensitive (-i flag)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 14:48:10 +02:00
Levi Neely c3d8879702 tools: rewrite subagent_spawn as thin wrapper around b/q -parallel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 13:40:55 +02:00
Levi Neely 792ea4663f subagents: add subagent_spawn tool and system prompt fragment
tools/subagent_spawn: fork-join over b/; spawns N parallel subagents
with a shared prompt, polls status concurrently, joins results in
submission order.

prompts/08_subagents.md: core system prompt fragment — when to spawn,
flags, output format, design rules. Always in context, not a skill.
2026-04-16 20:14:57 +02:00
Levi Neely 510ddbd904 new tools 2026-04-15 15:52:02 +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 7999bd34a7 Revert "tools: fix file_edit and file_write to write directly, not via temp+rename"
This reverts commit ce1688efb8.
2026-04-14 18:14:16 +02:00
Levi Neely ce1688efb8 tools: fix file_edit and file_write to write directly, not via temp+rename
The temp file + os.replace() (rename) pattern fails on FUSE-mounted paths
(e.g. $OLLIE/sk/, $OLLIE/pl/) because the 9P server doesn't implement Twstat.
Write directly to file_path instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 18:12:59 +02:00
Levi Neely de00ac1fcc rename OLLIE_9MOUNT → OLLIE throughout; update submodules
Tools, sandbox configs, docs, and skills all updated. $OLLIE is now
the canonical ollie root — cd $OLLIE goes directly to the FUSE mount.
Core now always injects $OLLIE into the execute env at session start.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:39:48 +02:00
Levi Neely 7d43a53e48 add memory_remember and memory_recall tools; fix sandbox for pyenv
memory_remember: saves a denote-formatted flat file to $OLLIE_9MOUNT/m
memory_recall: searches memories by keyword/tag/title via grep

Both write/read through the 9P FUSE mount. Removed os.makedirs calls
that failed with ERANGE on the 9P-backed /m directory.

sandbox/restricted.yaml: add {HOME}/.pyenv, .rbenv, .nvm to rox so
python3 and other version-managed interpreters can execute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:29:35 +02:00
Levi Neely 542c5ab96d update submodules and tools: fix memory write path
- sandbox: ~/mnt/ollie added as RWX, OLLIE_9MOUNT passed through
- 9p server: create memory dir on startup
- tools: memory_remember/recall use $OLLIE_9MOUNT/m

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:11:57 +02:00
Levi Neely 53371da547 tools: add memory_remember and memory_recall
Flat-file denote-formatted memories in OLLIE_MEMORY_PATH.
memory_remember: YYYYMMddTHHmmss__{slug}--{tags}.md with required
denote frontmatter (title, date, tags, identifier, signature).
memory_recall: grep-backed search across filenames and bodies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:41:43 +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
Levi Neely 450a5ba7b9 tools: remove tools.sh — discovery now handled by prompt injection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:02:27 +02:00
Levi Neely 995d72a776 tools: add tools.sh discovery script; update prompt for schema-less tools
tools.sh reads # description/# Args headers from all scripts and prints
a summary — one call replaces the schema injection built-in tools get
for free. Prompt now directs the model to run it before using unfamiliar
tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 10:58:03 +02:00
Levi Neely e4aaa25991 tools: add task_plan and task_complete as shell/python scripts
Replaces the removed built-in task server. Plans are written to
$OLLIE_9MOUNT/pl/ (persistent, shared across sessions). Scripts live
in the tools directory and are invoked via execute_tool.

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