planning: remove plan_* tools and prompt entirely

The markdown planning mechanism created competing signals against beads.
Removing it eliminates the conflict. Planning goes through beads (bd)
or whatever external mechanism is appropriate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-04-19 11:36:56 +02:00
parent c180cf3048
commit ec385d0d6e
7 changed files with 0 additions and 244 deletions

View File

@ -53,7 +53,6 @@ OLLIE_KIRO_TOKEN=... # bearer token or sqlite:// path (auto-detected f
OLLIE_MODEL=qwen/qwen3-235b-a22b
OLLIE_TOOLS_PATH=~/.config/ollie/tools # directory for tool scripts ({tool} steps)
OLLIE_MEMORY_PATH=~/.config/ollie/memory # directory for memory files (ollie/m)
OLLIE_BEADS_ENABLE=0 # set to 0 to use markdown-based plan_* tools instead of beads
```
Shell environment variables take precedence over the env file.

View File

@ -23,7 +23,6 @@ ollie/
m/ memories (r/w) ls, cat, edit
idx memory index (ro) cat
p/ prompt templates (ro) ls, cat (rebuilt on new session, /cwd, /agent)
pl/ plans (r/w) ls, cat, edit
b/ batch jobs (ephemeral) ls
idx job index (ro) cat: id status cwd agent, one per line
new create job (r/w) cat: KV template; write spec to submit
@ -97,10 +96,8 @@ OLLIE_MODEL default model name
OLLIE mount path (default: ~/mnt/ollie)
OLLIE_TOOLS_PATH tool scripts directory (default: ~/.config/ollie/tools)
OLLIE_SKILLS_PATH skills directory (default: ~/.config/ollie/skills)
OLLIE_PLAN_PATH plans directory (default: ~/.config/ollie/plans)
OLLIE_MEMORY_PATH memory directory (default: ~/.config/ollie/memory)
OLLIE_TRANSCRIPT_PATH transcript directory (default: ~/.config/ollie/transcript)
OLLIE_BEADS_ENABLE set to 0 to use markdown-based plan_* tools instead of beads (default: 1)
OLLIE_OLLAMA_URL base URL for ollama (default: http://localhost:11434)
OLLIE_OPENAI_URL base URL for openai-compatible backends

View File

@ -1,69 +0,0 @@
# Task Planning
**Never write plans as inline markdown in chat.** Plans always go to an external store — either beads (`bd`) or the plan files under `{{.OllieMountPath}}/pl/`. Writing a checklist in your response is not a plan.
Plans are markdown checklists living under `{{.OllieMountPath}}/pl/`. Use the four plan tools below in order.
---
## plan_create
Create a new plan as an ordered checklist, tagged `__todo`.
**Trigger condition**: the user asks you to do something with three or more distinct steps, or work spans multiple files or phases.
**Calling convention**:
```
execute_code: steps=[{tool: "plan_create", args: ["<goal>", "<task1>", "<task2>", ...]}]
```
**Returns**: plan filename (in `pl/`).
**Constraints**: at least one task required; do not plan single-step tasks.
---
## plan_start
Mark a plan as in-progress by renaming its tag from `__todo` to `__wip`.
**Trigger condition**: immediately before beginning work on a `__todo` plan.
**Calling convention**:
```
execute_code: steps=[{tool: "plan_start", args: ["<plan-filename>"]}]
```
**Returns**: new filename (tagged `__wip`). Errors if plan is not tagged `__todo`.
---
## plan_check
Mark a single task complete (`- [ ]` → `- [x]`).
**Trigger condition**: call once per completed task, repeating until all tasks are done — then call `plan_finish`. Do not batch; mark each task done before starting the next.
**Calling convention**:
```
execute_code: steps=[{tool: "plan_check", args: ["<plan-filename>", "<task-substring>"]}]
```
**Returns**: remaining unchecked tasks, or a prompt to run `plan_finish` if all are done. Errors if no unchecked task matches the substring.
---
## plan_finish
Close a plan by renaming its tag from `__wip` to `__done`.
**Trigger condition**: after all tasks have been checked with `plan_check`.
**Calling convention**:
```
execute_code: steps=[{tool: "plan_finish", args: ["<plan-filename>"]}]
```
**Returns**: new filename (tagged `__done`). **Errors if any `- [ ]` tasks remain** — all tasks must be checked before a plan can be finished.
**Constraints**: never call `plan_finish` while tasks remain unchecked; complete them first with `plan_check`.

View File

@ -1,52 +0,0 @@
#!/usr/bin/env python3
# description: Mark a plan task complete - [ ] -> - [x]; outputs remaining tasks
# Args: <plan-filename> <task-substring>
import sys, os, re
if len(sys.argv) < 3:
print("usage: plan_check <plan-filename> <task-substring>")
sys.exit(1)
import shutil
def _find_beads():
d = os.getcwd()
while d != os.path.dirname(d) and os.path.exists(os.path.join(d, '.git')):
if os.path.isdir(os.path.join(d, '.beads')):
return True
d = os.path.dirname(d)
return False
if os.environ.get('OLLIE_BEADS_ENABLE', '1') != '0' and shutil.which('bd') and _find_beads():
print("error: beads is available — use 'bd' for planning instead of plan_check", file=sys.stderr)
sys.exit(2)
ollie = os.environ.get('OLLIE', os.path.expanduser('~/mnt/ollie'))
plan_dir = os.path.join(ollie, 'pl')
filepath = os.path.join(plan_dir, os.path.basename(sys.argv[1]))
substring = sys.argv[2].lower()
if not os.path.exists(filepath):
print(f"error: plan not found: {os.path.basename(filepath)}")
sys.exit(1)
with open(filepath) as f:
lines = f.readlines()
matched = False
for i, line in enumerate(lines):
if re.match(r'^- \[ \] ', line) and substring in line.lower():
lines[i] = line.replace('- [ ] ', '- [x] ', 1)
matched = True
break
if not matched:
print(f"error: no unchecked task matching {sys.argv[2]!r}")
sys.exit(1)
with open(filepath, 'w') as f:
f.writelines(lines)
remaining = [line[6:].strip() for line in lines if re.match(r'^- \[ \] ', line)]
if remaining:
print('\n'.join(f'- [ ] {s}' for s in remaining))
else:
print('all tasks checked; run plan_finish to close the plan')

View File

@ -1,44 +0,0 @@
#!/bin/bash
# description: Create a task plan as a markdown checklist tagged __todo
# Args: <goal> <task1> [task2] ...
# Output: plan filename in pl/
set -euo pipefail
_find_beads() { local d="$PWD"; while [ "$d" != "/" ] && [ -e "$d/.git" ]; do [ -d "$d/.beads" ] && return 0; d="$(dirname "$d")"; done; return 1; }
if [ "${OLLIE_BEADS_ENABLE:-1}" != "0" ] && command -v bd >/dev/null 2>&1 && _find_beads; then
echo "error: beads is available — use 'bd' for planning instead of plan_create" >&2
exit 2
fi
OLLIE="${OLLIE:-$HOME/mnt/ollie}"
PLAN_DIR="$OLLIE/pl"
if [ $# -lt 2 ]; then
echo "usage: plan_create <goal> <task1> [task2] ..."
exit 1
fi
GOAL="$1"; shift
[ -d "$PLAN_DIR" ] || { echo "error: plan directory not found: $PLAN_DIR"; exit 1; }
TIMESTAMP=$(date '+%Y%m%dT%H%M%S')
UID8=$(cat /proc/sys/kernel/random/uuid 2>/dev/null | tr -d '-' | cut -c1-8 \
|| od -A n -t x1 /dev/urandom | tr -d ' \n' | cut -c1-8)
SLUG=$(printf '%s' "$GOAL" \
| tr '[:upper:]' '[:lower:]' \
| tr -cs 'a-z0-9' '-' \
| sed 's/^-//;s/-$//' \
| cut -c1-48)
FILENAME="${TIMESTAMP}_${UID8}--${SLUG}__todo.md"
FILEPATH="$PLAN_DIR/$FILENAME"
{
printf '# %s\n\n' "$GOAL"
for task in "$@"; do
printf -- '- [ ] %s\n' "$task"
done
} > "$FILEPATH" || { echo "error: failed to write $FILEPATH"; exit 1; }
echo "$FILENAME"

View File

@ -1,47 +0,0 @@
#!/usr/bin/env python3
# description: Close a plan (rename __wip -> __done); fails if any tasks remain unchecked
# Args: <plan-filename>
# Output: new filename
import sys, os, re
if len(sys.argv) < 2:
print("usage: plan_finish <plan-filename>")
sys.exit(1)
import shutil
def _find_beads():
d = os.getcwd()
while d != os.path.dirname(d) and os.path.exists(os.path.join(d, '.git')):
if os.path.isdir(os.path.join(d, '.beads')):
return True
d = os.path.dirname(d)
return False
if os.environ.get('OLLIE_BEADS_ENABLE', '1') != '0' and shutil.which('bd') and _find_beads():
print("error: beads is available — use 'bd' for planning instead of plan_finish", file=sys.stderr)
sys.exit(2)
ollie = os.environ.get('OLLIE', os.path.expanduser('~/mnt/ollie'))
plan_dir = os.path.join(ollie, 'pl')
filepath = os.path.join(plan_dir, os.path.basename(sys.argv[1]))
if not os.path.exists(filepath):
print(f"error: plan not found: {os.path.basename(filepath)}")
sys.exit(1)
if '__wip' not in os.path.basename(filepath):
print(f"error: plan is not tagged __wip: {os.path.basename(filepath)}")
sys.exit(1)
with open(filepath) as f:
lines = f.readlines()
remaining = [line[6:].strip() for line in lines if re.match(r'^- \[ \] ', line)]
if remaining:
print("error: all tasks must be completed before finishing the plan. remaining:")
for task in remaining:
print(f" - [ ] {task}")
sys.exit(1)
newpath = filepath.replace('__wip.md', '__done.md')
os.rename(filepath, newpath)
print(os.path.basename(newpath))

View File

@ -1,28 +0,0 @@
#!/bin/bash
# description: Mark a plan as in-progress (rename __todo -> __wip)
# Args: <plan-filename>
# Output: new filename
set -euo pipefail
_find_beads() { local d="$PWD"; while [ "$d" != "/" ] && [ -e "$d/.git" ]; do [ -d "$d/.beads" ] && return 0; d="$(dirname "$d")"; done; return 1; }
if [ "${OLLIE_BEADS_ENABLE:-1}" != "0" ] && command -v bd >/dev/null 2>&1 && _find_beads; then
echo "error: beads is available — use 'bd' for planning instead of plan_start" >&2
exit 2
fi
OLLIE="${OLLIE:-$HOME/mnt/ollie}"
PLAN_DIR="$OLLIE/pl"
[ $# -eq 1 ] || { echo "usage: plan_start <plan-filename>"; exit 1; }
SRC="$PLAN_DIR/$(basename "$1")"
[ -f "$SRC" ] || { echo "error: plan not found: $(basename "$1")"; exit 1; }
case "$SRC" in
*__todo.md) ;;
*) echo "error: plan is not tagged __todo: $(basename "$SRC")"; exit 1 ;;
esac
DST="${SRC/__todo.md/__wip.md}"
mv "$SRC" "$DST"
echo "$(basename "$DST")"