Research phase of RPI methodology. Spawns parallel subagents for codebase exploration AND web/pattern research, then synthesizes findings for user review. Produces compact research artifact. Use at the start of non-trivial features.
59
69%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./tiles/crafter/skills/research/SKILL.mdRPI Phase 1 of 3: Research → Plan → Implement
Use this skill at the start of non-trivial features to explore the codebase AND research external patterns before planning or implementing.
The Research phase prevents thrashing and discovers constraints early by:
Output: Compact research artifact (~200 lines) at docs/plans/YYYY-MM-DD-{topic}-research.md
Use this skill when:
Don't use for:
| Depth | Codebase Agents | Web Agents | When to Use |
|---|---|---|---|
| Quick | 2-3 | 0-1 | Well-understood pattern, single codebase area, no external unknowns |
| Standard | 3-4 | 1-2 | Multiple codebase areas affected, some external patterns to validate |
| Deep | 4-5 | 2-3 | Unfamiliar domain, new technology, multiple integration points |
Choosing depth: Infer the appropriate depth from the user's prompt using these signals:
| Signal | Points toward |
|---|---|
| User names a specific file or function to change | Quick |
| Feature touches one module with known patterns | Quick |
| Feature spans multiple modules or layers | Standard |
| User mentions a library, API, or pattern they haven't used before | Standard or Deep |
| Feature involves new technology, unfamiliar domain, or architectural change | Deep |
| User explicitly says "quick look" or "just check" | Quick |
| User explicitly says "deep dive" or "thorough" | Deep |
Not all research needs web agents. If the feature is purely internal (no new libraries, APIs, or unfamiliar patterns), skip web research entirely and dispatch only codebase agents.
When uncertain, ask the user with AskUserQuestion — briefly explain what you'd investigate at each level and let them choose. Do NOT default to a deeper level than the prompt warrants.
Ask the user to clarify the research scope if needed:
Based on the chosen depth, decompose the scope into:
CRITICAL: Dispatch ALL agents in a SINGLE message using multiple Task tool calls with run_in_background: true.
Two agent types — see agent prompts for full templates:
Codebase Explorer (subagent_type: Explore)
Web Researcher (subagent_type: general-purpose)
Example dispatch for "Add discount codes to orders":
# ALL in a single message:
Task(Explore): "Investigate existing discount logic in core/ and features/"
Task(Explore): "Investigate order creation flow end-to-end"
Task(Explore): "Investigate validation patterns for codes/slugs"
Task(Explore): "Investigate database schema for orders and related tables"
Task(general-purpose): "Research discount/coupon code validation patterns and best practices"
Task(general-purpose): "Research Stripe coupon API integration patterns"TaskOutput block: false to check progressTaskOutput block: trueCross-reference codebase patterns against web findings:
Write the research artifact immediately to disk:
docs/plans/YYYY-MM-DD-{topic}-research.mdUse the research artifact template. Target ~200 lines. Use kebab-case for the topic slug — make it descriptive of the feature (e.g., add-discount-codes, user-auth-refresh-tokens).
REQUIRED — Do not skip this step.
Use AskUserQuestion to present:
If the user requests edits → update the artifact in place with Write, then ask again. Repeat until the user approves.
Present the following output EXACTLY — this is the required format:
---
## Research Complete
**Artifact saved:** `docs/plans/YYYY-MM-DD-{topic}-research.md`
### Next steps — in order:
1. **Run `/clear`** to reset the context window
2. **Run `/draft docs/plans/YYYY-MM-DD-{topic}-research.md`** to create the implementation plan
3. After draft completes, run `/craft` to execute
> **Why /clear?** Research-phase context (agent outputs, file reads, web fetches) pollutes the planning phase. Clearing ensures `/draft` works from the compact artifact alone.Replace YYYY-MM-DD-{topic} with the actual artifact path.
Then STOP. Do not take any further actions. The research phase is complete.
After the user approves the research artifact, your job is DONE.
The next phases happen in separate conversations with clean context windows.
/draft)Once research is complete:
docs/plans/ immediately after synthesisAskUserQuestion/clear/draft with the research artifact path as inputWhy research first? The research phase is a compaction point:
This prevents context thrashing and keeps planning focused.
2a98cc1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.