From d28d6af23cc126d82f086e28d0cce2261ed00687 Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Wed, 20 May 2026 09:14:46 +0200 Subject: [PATCH] agents: slim down configs, remove unused tools - Remove task tools from default/coding agent prompts (planning is coding-only) - Remove MCP server config from coding agent - Remove env and grep tools from orchestrator allowlist - Delete unused tool scripts: env, grep, task_add, task_check, task_clear - Strip default agent to minimal prompt set --- agents/coding.json | 11 --------- agents/default.json | 6 ----- agents/orchestrator.json | 2 -- tools/env | 6 ----- tools/grep | 7 ------ tools/task_add | 24 ------------------ tools/task_check | 53 ---------------------------------------- tools/task_clear | 21 ---------------- 8 files changed, 130 deletions(-) delete mode 100755 tools/env delete mode 100755 tools/grep delete mode 100644 tools/task_add delete mode 100644 tools/task_check delete mode 100644 tools/task_clear diff --git a/agents/coding.json b/agents/coding.json index 15ddcdc..e3feb37 100644 --- a/agents/coding.json +++ b/agents/coding.json @@ -1,7 +1,6 @@ { "prompt": [ "$OLLIE/x/prime SYSTEM_PROMPT", - "prime tools-task 2>/dev/null || true", "$OLLIE/x/prime agent-coding", "$OLLIE/x/prime tools-file", "$OLLIE/x/prime tools-lsp", @@ -14,21 +13,11 @@ "maxSteps": 50, "temperature": 0.5, "maxTokens": 16384, - "mcpServers": { - "superpowers-mcp-server": { - "command": "superpowers-mcp-server", - "args": [], - "env": { - "SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}" - } - } - }, "hooks": { "agentSpawn": [ "$OLLIE/x/elevate-adapter-start 2>/dev/null || true" ], "postTurn": [ - "task list 2>/dev/null || true" ], "turnError": [ "$OLLIE/x/freeloader $OLLIE_SESSION_ID" diff --git a/agents/default.json b/agents/default.json index 5a35d0b..bdbd5d4 100644 --- a/agents/default.json +++ b/agents/default.json @@ -1,13 +1,8 @@ { "prompt": [ "$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", - "bash -c 'd=$PWD; while [ \"$d\" != / ]; do [ -d \"$d/.beads\" ] && exec bd prime; [ ! -e \"$d/.git\" ] && break; d=$(dirname \"$d\"); done' 2>/dev/null || true" ], "maxSteps": 50, "temperature": 0.5, @@ -17,7 +12,6 @@ "$OLLIE/x/elevate-adapter-start 2>/dev/null || true" ], "postTurn": [ - "task list 2>/dev/null || true" ], "turnError": [ "$OLLIE/x/freeloader $OLLIE_SESSION_ID" diff --git a/agents/orchestrator.json b/agents/orchestrator.json index a49aea6..90f1c43 100644 --- a/agents/orchestrator.json +++ b/agents/orchestrator.json @@ -17,8 +17,6 @@ "file_write", "file_edit", "cascade", - "env", - "grep" ], "hooks": { "turnError": [ diff --git a/tools/env b/tools/env deleted file mode 100755 index 01018af..0000000 --- a/tools/env +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# ollie:parallel read -# description: Print the agent's runtime environment variables. -set -euo pipefail - -env | sort diff --git a/tools/grep b/tools/grep deleted file mode 100755 index 60f72a2..0000000 --- a/tools/grep +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# ollie:parallel read -# description: Run grep. Reads from stdin if piped, otherwise searches files. Args are passed directly to grep. -# Args: [grep-options...] [file...] -set -uo pipefail - -exec grep "$@" diff --git a/tools/task_add b/tools/task_add deleted file mode 100644 index 3831820..0000000 --- a/tools/task_add +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# description: Add one or more tasks to the session plan checklist -# Args: [task2 task3 ...] - -[ -z "$*" ] && echo "usage: task_add [task2 ...]" >&2 && exit 1 -[ -z "$OLLIE_SESSION_ID" ] && echo "error: OLLIE_SESSION_ID not set" >&2 && exit 1 - -OLLIE="${OLLIE:-$HOME/mnt/ollie}" -plan="$OLLIE/s/$OLLIE_SESSION_ID/plan" - -current="$(cat "$plan" 2>/dev/null)" - -added=0 -{ - [ -n "$current" ] && printf '%s\n' "$current" - for task in "$@"; do - [ -z "${task// }" ] && continue - printf -- '- [ ] %s\n' "$task" - added=$((added + 1)) - done -} > "$plan" - -total=$(grep -c '^- \[' "$plan" 2>/dev/null || echo 0) -echo "STATUS=ok ADDED=$added TOTAL_TASKS=$total" diff --git a/tools/task_check b/tools/task_check deleted file mode 100644 index 7083bc0..0000000 --- a/tools/task_check +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python3 -# description: Check off a task in the session plan by number (1-indexed), or the first unchecked task -# Args: [n] - -import sys -import os - -sid = os.environ.get("OLLIE_SESSION_ID", "") -if not sid: - print("error: OLLIE_SESSION_ID not set", file=sys.stderr) - sys.exit(1) - -ollie = os.environ["OLLIE"] -plan_path = os.path.join(ollie, "s", sid, "plan") - -try: - content = open(plan_path).read() -except FileNotFoundError: - print("error: no plan found", file=sys.stderr) - sys.exit(1) - -lines = content.splitlines(keepends=True) -tasks = [(i, l) for i, l in enumerate(lines) if l.startswith("- [ ]") or l.startswith("- [x]")] - -if not tasks: - print("STATUS=done TASK_COMPLETE=true REMAINING=0") - print("no tasks in plan") - sys.exit(0) - -n = int(sys.argv[1]) - 1 if len(sys.argv) > 1 else None - -if n is None: - # First unchecked - target = next(((i, l) for i, l in tasks if l.startswith("- [ ]")), None) - if target is None: - remaining = 0 - print(f"STATUS=done TASK_COMPLETE=true REMAINING=0") - print("all tasks already checked") - sys.exit(0) -else: - if n < 0 or n >= len(tasks): - print(f"error: task {n+1} out of range (1-{len(tasks)})", file=sys.stderr) - sys.exit(1) - target = tasks[n] - -idx, line = target -lines[idx] = line.replace("- [ ]", "- [x]", 1) -open(plan_path, "w").write("".join(lines)) - -remaining = sum(1 for _, l in tasks if l.startswith("- [ ]") and _ != idx) -task_complete = remaining == 0 -print(f"STATUS=done TASK_COMPLETE={'true' if task_complete else 'false'} REMAINING={remaining}") -print(f"checked: {lines[idx].rstrip()}") diff --git a/tools/task_clear b/tools/task_clear deleted file mode 100644 index 48337f6..0000000 --- a/tools/task_clear +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# description: Remove completed (checked) tasks from the session plan -# Args: (none) - -[ -z "$OLLIE_SESSION_ID" ] && echo "error: OLLIE_SESSION_ID not set" >&2 && exit 1 - -OLLIE="${OLLIE:-$HOME/mnt/ollie}" -plan="$OLLIE/s/$OLLIE_SESSION_ID/plan" - -[ ! -f "$plan" ] && echo "STATUS=ok CLEARED=0 REMAINING=0 TASK_COMPLETE=true" && echo "no plan found" && exit 0 - -before=$(grep -c '^\- \[.\]' "$plan" 2>/dev/null || echo 0) -grep -v '^\- \[x\]' "$plan" > "$plan.tmp" && mv "$plan.tmp" "$plan" -after=$(grep -c '^\- \[.\]' "$plan" 2>/dev/null || echo 0) - -removed=$(( before - after )) -task_complete="false" -[ "$after" -eq 0 ] && task_complete="true" - -echo "STATUS=ok CLEARED=$removed REMAINING=$after TASK_COMPLETE=$task_complete" -echo "cleared $removed completed task(s), $after remaining"