ollie/prompts/02_tools.md

1.4 KiB

Tools

Tool scripts live at {{.OllieMountPath}}/t. Run them as {tool} steps in execute_code.

Supported languages are detected from the script's shebang line:

  • #!/usr/bin/env bash — runs with bash -c
  • #!/usr/bin/env python3 — runs with python3 -c; sys.argv is set automatically when args are provided

{{.OllieMountPath}}/t/idx is a searchable index of all available tools. Each entry is a named section:

## name
description: what it does
args: <required> [optional]

Search before acting: grep -A2 "keyword" {{.OllieMountPath}}/t/idx

execute_code

execute_code accepts a steps array of pipeline stages. Stages run sequentially, each stage's stdout fed to the next stage's stdin. A single stage returning raw output is the degenerate case.

Each stage is one of:

  • {code, language} — inline code; language defaults to bash
  • {tool, args} — named script from t/; language detected from shebang
  • {parallel: [...]} — concurrent fan-out; outputs concatenated in submission order, fed to next stage

Supported inline languages: bash, python3, perl, lua, awk, sed, jq, ed, expect, bc.

All parallel steps in a stage should produce the same output schema so their concatenated output is coherent for the next stage. Load the execute-pipe skill for pipeline patterns and the ETL pattern for disparate output schemas.