ollie/scripts
Levi Neely 8d870001bc prompts: migrate to hook-based priming via prime script
Remove Go template syntax from all prompt files (converted to envsubst
variables in prior commits). Agent agentSpawn hooks now call prime for
each prompt file explicitly, replacing the automatic Go-based directory
scan. coding agent gets 08_tool-elevate; default does not.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 12:10:26 +02:00
..
b scripts: b/job parallel improvements — streaming results, input/output headers, -failfast 2026-04-18 13:52:22 +02:00
s elevation: add elevate_superpowers tool; remove frontend env injection from s/sh and submodules 2026-04-18 20:07:10 +02:00
u scripts: move optimize to u/ (utility) namespace 2026-04-18 12:00:39 +02:00
x prompts: migrate to hook-based priming via prime script 2026-04-19 12:10:26 +02:00
README.md scripts: add b/cleanup; update docs and mkfile 2026-04-18 12:39:34 +02:00

README.md

scripts

Shell scripts for interacting with the ollie 9P filesystem. All scripts read OLLIE (default: $HOME/mnt/ollie) for the mount path.

mk scripts installs them and exposes them via the mounted filesystem, so they are available without any $PATH changes:

exec $OLLIE/s/sh              # start interactive shell
$OLLIE/s/ls                   # list sessions
$OLLIE/s/kill <id>            # kill a session
$OLLIE/b/job "my prompt"      # submit and wait for a batch job
$OLLIE/b/q "my prompt"        # foreground one-shot query
$OLLIE/b/sched "my prompt"    # submit a background job; prints b/ path
$OLLIE/b/cleanup              # remove all completed jobs
$OLLIE/u/optimize "prompt"    # generate and return best optimized prompt

Scripts are organized by the filesystem namespace they are hosted under:

  • s/ — session management scripts
  • b/ — batch job scripts
  • u/ — utility scripts; compositions of other ollie primitives

s/sh

Interactive chat interface for ollie sessions. Resumes the most recent session for the current directory by default; creates a new one if none exists.

s/sh [-new] [-resume] [-session ID] [-cwd DIR] [-backend B] [-model M] [-agent A]

Flags

Flag Description
-new Always create a new session
-resume Resume last session for the cwd; error if none
-session ID Attach to a specific session by ID
-cwd DIR Working directory (default: pwd)
-backend B Backend override (e.g. ollama, anthropic)
-model M Model override
-agent A Agent config name

Input

At the > prompt:

Input Action
<text> Submit prompt, stream response
/q <text> Enqueue prompt for later
/<cmd> Send to session ctl (e.g. /compact, /clear)
/kill Kill the session and exit
Ctrl-C Interrupt running turn (or exit if idle)

Examples

s/sh                          # resume or create session for pwd
s/sh -new -model gpt-4o       # fresh session with model override
s/sh -session 1745123456-abc  # attach to a specific session

s/ls

List all active sessions.

s/ls

s/kill

Kill a session by ID and remove it.

s/kill <id>

b/job

Core batch job runner. Submits a prompt to b/new, waits for completion, prints the result to stdout, then removes the job. Exit code is non-zero on failure. b/q and b/sched are both wrappers around this script.

b/job [flags] [prompt...]
echo "prompt" | b/job [flags]

Flags

Flag Description
-name N Base job name; jobs are suffixed -0, -1, ...
-cwd DIR Working directory (default: pwd)
-agent A Agent config name
-backend B Backend override
-model M Model override
-output json Append JSON-only instruction to prompt
-parallel N Run the same prompt N times in parallel (default: 1)
-keep Do not remove job(s) after printing result
-bg Submit and exit immediately; prints job id(s); implies -keep

Examples

b/job "Summarize this repo in one sentence"
cat error.log | b/job "What is causing this error?"
b/job -output json "List the top 3 risks as JSON"
b/job -parallel 4 -keep "Write a haiku about filesystems"
b/job -backend ollama -model qwen3:8b "Explain this function" < main.go

With -parallel N and N > 1, results are separated by === {id} === headers.


b/q

Foreground one-shot query; thin wrapper around b/job. Accepts the same flags.

b/q [flags] [prompt...]
echo "prompt" | b/q [flags]

b/cleanup

Remove all batch jobs with status done.

b/cleanup

b/sched

Submit a background job; prints the b/ path for each job. Wrapper around b/job -bg.

b/sched [flags] [prompt...]
echo "prompt" | b/sched [flags]

Flags

Flag Description
-name N Base job name
-cwd DIR Working directory (default: pwd)
-agent A Agent config name
-backend B Backend override
-model M Model override
-output FORMAT Output format hint (e.g. json)
-parallel N Submit N parallel jobs (default: 1)

u/optimize

Generates N candidate optimized prompts, judges them, and returns the best one to stdout. Debugging output (progress messages) goes to stderr.

u/optimize [flags] [prompt...]
echo "prompt" | u/optimize [flags]

Flags

Flag Description
-n N Number of candidates to generate (default: 3)
-cb B Candidate generation backend
-cm M Candidate generation model
-jb B Judge backend
-jm M Judge model

Examples

u/optimize "Summarize this document"
u/optimize -n 5 -cm qwen/qwen3-8b -jm anthropic/claude-opus-4.6 "Write a haiku"
u/optimize "generate a hello world program. use c++." >[2]/dev/null | b/q

Outputs to stdout, making it composable with other pipeline stages.