# Subagent Prompt Templates Use these when dispatching research tasks to subagents. One task per subagent. Launch all subagents in a single turn so they run in parallel. Every template ends with the same **return format** — a structured proposal the orchestrator can drop directly into the spec. Don't let subagents return free-form prose; decisions are the deliverable, not transcripts. ## Return format (shared across all templates) Every subagent must return exactly this structure, ~300 words max: ``` ## Recommended answer ## Alternatives considered - — rejected because - — rejected because ## Evidence - - ## Open sub-questions (if any) - ``` If the subagent cannot produce a recommendation with evidence, it should say so explicitly in "Open sub-questions" rather than guess. --- ## Template: Codebase pattern Use when the question is about how the existing codebase works — an API, a pattern, a file layout, a convention that the spec references. ``` You are researching one question for an in-progress project spec. Spec path: Question: Your job: read the relevant code and return a structured proposal answering the question. Use Grep, Glob, and Read. Do not modify any files. Scope hints: - - Return in this exact format: ## Recommended answer ## Alternatives considered - — rejected because - — rejected because ## Evidence - — - — ## Open sub-questions - Cap the return at ~300 words. Cite file paths and line numbers. Decisions, not transcripts. ``` ## Template: External / API Use when the question is about an external system — a framework's capabilities, an SDK's API, a tool's behavior. ``` You are researching one question for an in-progress project spec. Spec path: Question: Your job: use web search and page fetch (if web access is available) to find authoritative answers — official docs, source repositories, maintainer statements. Avoid blog posts and secondhand summaries. Focus area: Why it matters: Return in this exact format: ## Recommended answer ## Alternatives considered - — rejected because - — rejected because ## Evidence - — - — ## Open sub-questions - Cap the return at ~300 words. Prefer primary sources. Decisions, not transcripts. ``` ## Template: Design tradeoff Use when the question is a product/design judgment call with no single "right answer" in the codebase or external docs — format decisions, deduplication heuristics, UX structure. ``` You are researching one question for an in-progress project spec. Spec path: Question: Your job: reason about the tradeoff and produce a concrete recommendation grounded in the spec's own Core Value, Problem Statement, and Key Decisions. Reference the spec heavily — the right answer usually already lives implicit in the rest of the document. Do NOT propose implementation details. The answer goes into the spec as a WHAT/WHY decision, not a HOW. Return in this exact format: ## Recommended answer ## Alternatives considered - — rejected because - — rejected because ## Evidence - Spec section "
" — - ## Open sub-questions - Cap the return at ~300 words. Ground the call in the spec. Decisions, not transcripts. ``` ## Template: Scope / policy Use when the question is about inclusion/exclusion — what routes where, what's covered, what's explicitly out. ``` You are researching one question for an in-progress project spec. Spec path: Question: Your job: recommend the scope/policy answer that best preserves the spec's Core Value and is consistent with its existing Out-of-Scope rationale. Read the spec end-to-end before deciding — scope answers regress fast if you only look at the local question. Do NOT propose implementation details. The answer goes into the spec as a WHAT/WHY decision. Return in this exact format: ## Recommended answer ## Alternatives considered - — rejected because - — rejected because ## Evidence - Spec section "Core Value" — - Spec section "Out of Scope" — - ## Open sub-questions - Cap the return at ~300 words. Consistency with the spec matters more than novelty. Decisions, not transcripts. ```