From d8c0f8a8a31325838432fde8c969f0c7e3b4640f Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sun, 19 Apr 2026 12:16:42 +0200 Subject: [PATCH] docs: document hook-based system prompt; fix hooks example to array form Co-Authored-By: Claude Sonnet 4.6 --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 588c039..3373112 100644 --- a/README.md +++ b/README.md @@ -57,15 +57,25 @@ No build step — ollie-core is a library. } }, "hooks": { - "agentSpawn": "notify-send ollie started", - "userPromptSubmit": "", - "stop": "" + "agentSpawn": [ + "$OLLIE/x/prime 00_base", + "$OLLIE/x/prime 01_ollie", + "notify-send ollie started" + ], + "userPromptSubmit": [], + "stop": [] } } ``` MCP server `env` values support `${VAR}` expansion from the parent environment. +Hook values accept a string or an array of strings. Commands run in order; each command's stdout is appended to the system prompt context. Exit code 2 blocks the triggering action; any other non-zero exit is a non-blocking warning. + +### System prompt + +There is no built-in system prompt. The system prompt is assembled entirely from `agentSpawn` hook output. The `prime` script (`$OLLIE/x/prime `) reads a file from `p/` and writes it to stdout with environment variable substitution — use it in `agentSpawn` to compose the system prompt from prompt template files. The fully assembled result is readable at `s//systemprompt`. + ### Sandbox config: `~/.config/ollie/sandbox.yaml` Controls landrun sandboxing for `execute_code`. Created automatically with defaults on first run. See the file header for documentation.