---
name: research
description: >
  Kick off Phase 2 (Research). Validates feasibility, searches for prior art, gathers
  docs, builds reference material, and runs prototype experiments. Delegates to the
  researcher agent for deep dives.
---

# Phase 2: Research

You are beginning the Research phase. Your goal is to validate the idea, find what already exists, gather technical reference material, and test assumptions early.

## Prerequisites

- Approved problem statement from Phase 1 (check `docs/specs/problem-statement-*.md`)
- If no problem statement exists, run `/idea` first.

## Process

1. **Feasibility check.** Should we build this at all? Present a quick yes/no assessment with reasoning.
2. **Prior art search.** Delegate to the `researcher` agent to find existing solutions:
   - Open-source projects that solve this or a subset
   - Commercial products in this space
   - Relevant libraries, frameworks, and tools
   - For each: name, URL, license, last updated, pros/cons
3. **Decision gate.** Present findings to the user:
   - If something exists that solves 80%+, recommend using/extending it
   - If nothing sufficient exists, proceed with deep research
4. **Deep research.** For each major technical component:
   - Delegate focused research tasks to the `researcher` agent (one per component)
   - Gather official docs, best practices, examples at scale
   - Identify the recommended language/tool for each component (per CLAUDE.md defaults)
5. **Prototype.** Build small, fast, dirty toy examples to test core assumptions:
   - Focus on the riskiest assumptions — what would kill the project if wrong?
   - These are throwaway code. Speed over quality.
   - Document what was learned, not the code itself.
6. **Specialist critique.** Have relevant specialist agents review the research:
   - Architect reviews system-level feasibility
   - Relevant dev agents review tool/language choices in their domain
   - Present critiques to the user
7. **Compile research document.** Save to `docs/research/<project-slug>-<date>.md`:

```markdown
## Research Report: [Project Name]
### Date: [date]

### Feasibility Assessment
[Should we build this? Why/why not?]

### Prior Art
| Solution | License | Status | Covers | Gaps |
|----------|---------|--------|--------|------|
| ...      | ...     | ...    | ...    | ...  |

### Technical Components
#### [Component 1]
- Recommended approach: [tool/language/framework]
- Documentation: [links]
- Best practices: [summary]
- Known limitations: [list]

### Prototype Results
| Assumption Tested | Result | Implications |
|-------------------|--------|-------------|
| ...               | ...    | ...         |

### Specialist Critiques
[Summary of feedback from specialist agents]

### Recommendations
[What to build, with what, and in what order]

### Open Questions
[Anything still unresolved]

### Estimated Complexity
[Rough t-shirt sizing for the overall project]
```

8. **Ask for approval** before moving to Phase 3 (Design).

## Rules

- Present the prior art search results before doing deep research — the user may want to pivot.
- Prototype the riskiest thing first. Fail fast.
- Every recommendation must have a documented rationale.
- Prefer open-source and self-hostable options per CLAUDE.md standards.
- Do not proceed to Phase 3 without explicit user approval.
