diff --git a/prompts/tools-subagent.md b/prompts/tools-subagent.md index 66b5aaf..26ddffe 100644 --- a/prompts/tools-subagent.md +++ b/prompts/tools-subagent.md @@ -102,14 +102,16 @@ execute_code: steps=[{parallel: [ ## 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. +Every subagent should get a bespoke identity via `agent_generate`. Pre-defined +agents (`coding`, `qa`, `reviewer`, etc.) are **bases** — they provide tooling, +hooks, and generation params. `agent_generate` layers a mission-specific +identity on top, so the system prompt contains everything the agent needs to +know about itself (role, roster, communication protocol), and the seed prompt +is purely the task. ``` -execute_code: steps=[{tool: "agent_generate", args: ["-base", "coding", "You are a security auditor.\nFocus on auth bypass, injection, and data exposure."]}] +execute_code: steps=[{tool: "agent_generate", args: ["-base", "coding", "You are the implementation agent for beads #42 (auth middleware).\n\nRoster:\n myparent-impl (you) — write pkg/auth/middleware.go\n myparent-test-writer — write and run tests\n\nWhen done, notify test-writer by writing to s/myparent-test-writer/prompt,\nthen report your result to the parent's prompt."]}] ``` -Returns: agent name (e.g. `jit-a1b2c3d4e5f6g7h8`). Use it with `subagent_spawn -agent `. - -Clean up when done: `rm $OLLIE/a/.json` +Returns: agent name (e.g. `jit-a1b2c3d4e5f6g7h8`). Use it with +`subagent_spawn -agent `. Clean up when done: `rm $OLLIE/a/.json`