research-plan-implement
БесплатноБез исполняемых скриптовНе проверенThree-phase RPI workflow (Research, Plan, Implement). Use for non-trivial code changes.
от htlin222★ 78 звёзд на GitHubОб этом скилле
Research-Plan-Implement (RPI)
A disciplined three-phase workflow that trades speed for clarity, predictability, and correctness. Each phase has a validation gate that must pass before proceeding.
Core principle: Never let AI write code without first researching the codebase and producing a validated plan. A 1-page plan gives 10x leverage over reviewing 1,000 lines of AI code.
When to Use
- Non-trivial features, refactors, or bug fixes
- Unfamiliar or large codebases
- Tasks where incorrect code is costlier than slow code
- When previous direct-implementation attempts have failed
When NOT to Use
- Single-line fixes, typos, or trivial changes
- Tasks where you already have full context and a clear path
- Exploratory prototyping (use RPI when hardening the prototype)
Workflow
Copy this checklist and track progress:
- [ ] Phase 1: Research (FAR validated)
- [ ] Phase 2: Plan (FACTS validated)
- [ ] Phase 3: Implement (verified)
Phase 1: Research
Goal: Explore the codebase, find the right files. Make ZERO modifications.
Use sub-agents (Task tool with Explore type) to read broadly without polluting the main context. Sub-agents return only compressed facts.
Research Outputs
For each finding, record:
- File path and line number(s)
- What exists there (function signature, data structure, pattern)
- Why it matters to the current task
FAR Validation Gate
Every finding must pass all three:
| Check | Question | Fail Example |
|---|---|---|
| Factual | Is this from actual code, not assumption? | "There's probably a config file somewhere" |
| Actionable | Does it include specific file path + line number? | "The auth module handles this" |
| Relevant | Is it directly related to the task? | Documenting unrelated utility functions |
Template for research summary:
## Research Findings for: {task description}
### Finding 1: {short title}
- **File**: `src/auth/middleware.ts:42-67`
- **What**: `validateToken()` checks JWT expiry and role claims
- **Why**: We need to extend this to support API key auth
### Finding 2: {short title}
- **File**: `src/types/auth.ts:15-23`
- **What**: `AuthContext` interface defines `user`, `token`, `roles`
- **Why**: Must add `apiKey` field here
### FAR Check
- [x] All findings reference actual code with paths and line numbers
- [x] No assumptions or guesses included
- [x] Every finding directly relates to the task
Do NOT proceed to Phase 2 until FAR passes.
Phase 2: Plan
Goal: Produce a step-by-step plan where each step has code-level specificity.
A plan without code snippets is just a "feeling" -- it has no execution power.
Plan Structure
For each step:
### Step N: {action verb} + {what}
**File**: `path/to/file.ts:line-range`
**Change**: {precise description of what to add/modify/remove}
**Code sketch**:
```typescript
// Before (current):
function validateToken(token: string): AuthContext { ... }
// After (planned):
function validateAuth(credential: string | ApiKey): AuthContext { ... }
Verify: {how to confirm this step succeeded}
Scope: Changes ONLY validateToken signature and body. Does NOT touch callers yet.
### FACTS Validation Gate
Every step must pass all five:
| Check | Question | Fail Example |
|-------|----------|-------------|
| **F**easible | Can this be done in the current environment? | "Migrate to a new framework" mid-task |
| **A**tomic | Does it do exactly one thing? | "Update auth and refactor tests" |
| **C**lear | Are file names, line numbers, and code snippets present? | "Update the relevant files" |
| **T**estable | Is there a concrete verification step? | "Make sure it works" |
| **S**coped | Is it clear what changes and what doesn't? | No mention of boundaries |
**FACTS checklist**:
```markdown
### FACTS Validation
- [ ] F: Every step is achievable in current environment
- [ ] A: Each step has exactly one objective
- [ ] C: Every step has file path, line numbers, and code sketch
- [ ] T: Every step has a specific verification command or check
- [ ] S: Every step states what it changes AND what it leaves untouched
Do NOT proceed to Phase 3 until FACTS passes.
Present Plan to User
After FACTS validation, present the plan for human review. The plan is the primary review artifact -- it's far more efficient to review a plan than to review generated code.
Phase 3: Implement
Goal: Execute the validated plan with minimal context pressure.
Execution Rules
- Follow the plan step by step -- do not improvise or "improve" beyond scope
- One step at a time -- complete and verify each step before the next
- Use sub-agents for independent steps -- keep main context lean
- Verify after each step -- run the verification defined in the plan
After Each Step
Step N: {title}
- Status: DONE / BLOCKED / MODIFIED
- Verif
Установить research-plan-implement в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл research-plan-implement?
Three-phase RPI workflow (Research, Plan, Implement). Use for non-trivial code changes.
Как установить скилл research-plan-implement?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл research-plan-implement запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic