rlmlisted
Install: claude install-skill rudi193-cmd/willow-2.0
# RLM — Recursive Language Model Workflow
## Arguments (from $ARGUMENTS)
| Arg | Required | Default | Purpose |
|-----|----------|---------|---------|
| `query=<question>` | yes | — | What to answer |
| `context=<path>` | no | — | Path to large context file |
| `limit=<int>` | no | 10 | Max KB atoms to retrieve |
| `chunk_chars=<int>` | no | 200000 | Characters per chunk |
If arguments are missing, ask for `query` and optionally `context` before proceeding.
## Procedure
### Step 1 — KB retrieval
Call `willow_knowledge_search` with the query and limit. Collect the returned atoms.
Assess coverage: do the atoms answer the query fully?
- **Yes** → synthesize from atoms and stop. Do not proceed to file chunking.
- **No, and no `context` path given** → surface what's missing. Ask the user for a context file path. Stop here until they provide one.
- **No, and `context` path given** → proceed to Step 2.
### Step 2 — Chunk the context file
Write chunk files to `.claude/rlm_state/chunks/`. Create the directory if it doesn't exist.
Run this inline Python to chunk the file:
```bash
python3 - <<'PYEOF'
import sys, os, pathlib
context_path = "<CONTEXT_PATH>" # substitute $ARGUMENTS[context]
chunk_chars = <CHUNK_CHARS> # substitute with integer, no quotes (e.g. 200000)
import subprocess
repo_root = pathlib.Path(subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode().strip())
out_dir = repo_root / ".claude/rlm_state/chunks"
out_dir.mkdir(parents=True, e