| name | research |
| description | Validate technical assumptions from the plan against real APIs, libraries, and codebase before spec creation. Dispatches Smith to produce structured research docs. |
| user_invocable | true |
Research
Validate technical assumptions from the plan against real APIs, libraries, and codebase before writing the spec.
If the user provides $ARGUMENTS, analyze them for:
- A plan path
- Specific APIs, libraries, or assumptions to focus on
1. **Plan must exist.** Ask the user for the plan path (e.g., `docs/plans/01-plan-mcp-foundation.md`). Read to confirm.
2. **PRD must exist.** Ask the user for the PRD path (e.g., `docs/PRD.md`). Read to confirm.
No plan found. Recommend running `/plan` first.
No PRD found. Recommend running `/requirements` first.
1. **Define output location:**
- Determine the phase number from the plan filename (e.g., `01` from `01-plan-*`)
- Ask the user for the research topic (e.g., `github-dependencies-api`)
- Suggest default path: `docs/research/{NN}-research-{topic-kebab}.md`
- If multiple research docs needed for the same phase, use distinct topics (e.g., `01-research-github-api.md`, `01-research-projects-v2.md`)
- Ensure the `docs/research/` directory exists (create if needed)
-
Identify focus areas (optional):
- Ask the user: "Are there specific APIs, libraries, or assumptions you want Smith to focus on? Or should he extract all assumptions from the plan?"
-
Dispatch using exactly these parameters โ no more, no less:
Agent(
subagent_type="investigator",
prompt="Research technical feasibility for the plan at {plan_path}. PRD for context: {prd_path}. Save the research document to {research_path}. {focus_areas_or_empty}Read the plan to extract all technical assumptions and external dependencies, then validate each one against real documentation and the existing codebase."
)
Do NOT add extra parameters unless the user explicitly requests it.
1. Verify the research doc was created at the agreed path
2. Show the user Smith's report summary: how many assumptions confirmed/contradicted
Present each contradiction clearly. Ask: "These contradictions need to be resolved before creating the spec. Do you want to adjust the plan first, or proceed to `/spec` with these known issues?"
Recommend proceeding with `/spec` referencing the plan and research doc.