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
This commit is contained in:
parent
405a568ad0
commit
d28d6af23c
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
"file_write",
|
||||
"file_edit",
|
||||
"cascade",
|
||||
"env",
|
||||
"grep"
|
||||
],
|
||||
"hooks": {
|
||||
"turnError": [
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# ollie:parallel read
|
||||
# description: Print the agent's runtime environment variables.
|
||||
set -euo pipefail
|
||||
|
||||
env | sort
|
||||
|
|
@ -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...] <pattern> [file...]
|
||||
set -uo pipefail
|
||||
|
||||
exec grep "$@"
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# description: Add one or more tasks to the session plan checklist
|
||||
# Args: <task> [task2 task3 ...]
|
||||
|
||||
[ -z "$*" ] && echo "usage: task_add <task> [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"
|
||||
|
|
@ -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()}")
|
||||
|
|
@ -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"
|
||||
Loading…
Reference in New Issue