Pattern investigation and technical research before specification. Use when technical approach is unclear, exploring existing solutions, or analyzing codebase patterns. Supports deep research mode for thorough external investigation.
Investigate codebase patterns and external solutions to inform specification and planning. Supports two modes: standard (codebase-focused) and deep (comprehensive external investigation).
/specify or /plan commandsQuick internal + surface external analysis. Good for well-understood domains where the codebase already has relevant patterns.
Multi-pass external investigation using web search and documentation fetching. Use when:
Trigger: User requests deep research explicitly, or the agent detects high uncertainty after Phase 1.
Run scripts/scan-patterns.sh to auto-detect project stack before manual exploration.
Perform iterative, multi-pass investigation:
Pass 1 — Landscape scan:
WebSearch to survey the solution space (e.g. "best [technology] for [use case] 2026")Pass 2 — Documentation deep-dive:
WebFetch to read official docs, getting-started guides, and API references for each candidatePass 3 — Real-world validation:
Pass 4 — Integration feasibility:
Deep research output additions:
# Research: [Topic]
## Summary
[1-2 sentence overview]
**Research mode:** Standard | Deep
**Confidence:** High | Medium | Low
## Codebase Analysis
### Existing Patterns
| Pattern | Location | Relevance |
### Reusable Components
- [component]: [how to leverage]
## External Solutions
### Option 1: [Name]
- **Pros**: | **Cons**: | **Effort**:
- **Source**: [URL] (deep research only)
## Comparison Matrix
| Criteria | Weight | Option 1 | Option 2 |
## Recommendation
[Recommended approach with rationale]
**Confidence:** [High/Medium/Low] — [why]
## Risks & Unknowns
- [risk]: [mitigation]
## Sources (deep research only)
- [URL]: [what was learned]
references/patterns.md — Common architectural patternsreferences/deep-research-guide.md — Deep research methodology, search strategies, and source evaluation criteriascripts/scan-patterns.sh [project-root] — Auto-detect frameworks, languages, testing tools, and project structure conventions/specify and sdd-planner subagentsdd-explorer for deeper analysisWebSearch and WebFetch tools extensively — ensure sandbox allows outbound access