diff --git a/prompts/tools-subagent.md b/prompts/tools-subagent.md index 1bf0655..66b5aaf 100644 --- a/prompts/tools-subagent.md +++ b/prompts/tools-subagent.md @@ -99,3 +99,17 @@ execute_code: steps=[{parallel: [ {tool: "subagent_spawn", args: ["-name", "myparent-test-writer", "-agent", "qa", "You are test-writer. Roster: myparent-impl — write middleware, myparent-test-writer (you) — write tests. Task: beads #42. Wait for notification from impl, then write and run tests. When done, write your result to the parent's prompt."]} ]}] ``` + +## JIT agent generation + +When no pre-defined agent fits the task, generate one at runtime with +`agent_generate`. It copies a base agent's config and injects custom identity +text, returning a unique agent name. + +``` +execute_code: steps=[{tool: "agent_generate", args: ["-base", "coding", "You are a security auditor.\nFocus on auth bypass, injection, and data exposure."]}] +``` + +Returns: agent name (e.g. `jit-a1b2c3d4e5f6g7h8`). Use it with `subagent_spawn -agent `. + +Clean up when done: `rm $OLLIE/a/.json`