1---2name: rpi-workflow3description: "Apply a Research → Plan → Implement → Validate workflow for multi-phase work that benefits from explicit phase boundaries. Use when the task is complex, spans many files, or needs durable progress artifacts — not for small fixes, single-file edits, or narrow specialist workflows."4license: GNU GPL v35metadata:6 source: https://skillmd.com/skills/matt-riley/rpi-workflow7 version: 1.5.2 # x-release-please-version8 owner: mattriley9 category: governance10 audience: general-coding-agent11 maturity: stable12 kind: task13---1415# Research -> Plan -> Implement -> Validate (RPI-V)1617## Use this skill when1819- The task is non-trivial and benefits from explicit phase boundaries with durable artifacts.20- Work spans multiple files, decisions, or validation steps and is safer executed one phase at a time.21- The user wants end-to-end disciplined execution rather than only planning, only review, or a narrow specialist workflow.2223## Do not use this skill when2425- The task is a tiny fix or direct answer where the full ceremony costs more than it saves.26- The user wants only a plan, a plan revision, or an implementation review → use `implementation-review` (plan mode for plans); only a contract-shaped execution brief or definition of done → use `reverse-prompt`; or a narrower specialist workflow that another skill covers better.27- The repo already imposes a stricter required workflow and the job is to follow that process.2829## Inputs to gather3031### Required before starting3233- The concrete outcome the user wants.34- The current repository or target working directory.35- The relevant local instructions, conventions, and constraints for the touched area.36- Whether the user expects plan approval before implementation.3738### Helpful if present3940- Existing `plan.md` content for the current workspace or task branch.41- Prior research, checkpoints, or handoff notes already saved under a workspace `files/`42 directory.43- Existing tests, build commands, lint commands, or release checks for the area being changed.44- Known risk areas such as migrations, code generation, auth, or production-facing behavior.4546### Only investigate if encountered4748- Legacy `/share` or `thoughts/shared/...` artifacts from older sessions.49- Large context pressure that requires checkpointing or a phase boundary reset.50- Parallel-agent coordination details such as worktrees or isolated lanes.5152## First move53541. Decide whether the task truly needs the full RPI-V workflow or a narrower skill.552. Read the minimum relevant instructions and inspect the codebase without making changes.563. Create or refresh a workspace `plan.md` with the problem, scope, phase list, and validation57 approach.584. If research needs to persist beyond the current turn, save concise notes under a workspace59 `files/` directory before moving on.6061## Workflow6263### 1. Research6465- Stay read-only; prefer targeted searches and a small set of relevant files over loading broad context.66- Identify the exact files, commands, constraints, and open questions that should shape the plan.67- Save research notes to `files/` only when they help later phases or a future handoff (e.g. `files/research-<topic>.md`).6869### 2. Plan7071- Use `plan.md` as the primary planning artifact: concrete phases, files to touch, verification commands, success criteria, and notable risks or approvals.72- If the user wants plan approval, stop after updating `plan.md` and route through `implementation-review` before editing code.7374### 3. Implement7576- Implement one meaningful phase at a time; run planned checks before advancing.77- Keep `plan.md` aligned with reality when scope, sequencing, or risks change.78- Use `files/` for checkpoints or handoffs when context gets crowded or work continues later (e.g. `files/checkpoint-<topic>.md`).7980### 4. Validate8182- Run the most relevant verification first (targeted), then broaden as needed.83- Compare the result against `plan.md`; call out intentional or accidental deviations.84- Record follow-ups or residual risks; save a handoff note in `files/` only when evidence needs to persist (e.g. `files/validation-<topic>.md`).8586## Outputs8788- A workspace `plan.md` and any necessary `files/` notes that capture the research, plan, implementation phases, and validation path.89- Implementation progress delivered one meaningful phase at a time against the documented plan.90- A validation summary comparing the final result to the plan, including residual risks, deviations, or follow-up work that must persist.9192## Guardrails9394- **Must not** make code changes during the research phase.95- **Must not** treat legacy `/share` or `thoughts/shared/...` paths as the default artifact model; use workspace-local artifacts instead.96- **Must not** skip validation because the implementation appears straightforward.97- **Should** keep artifacts lean: `plan.md` for the executable plan, `files/` for research, checkpoints, and durable notes that need to persist.98- **Should** pause for approval when the user asked for plan gating, reviewer gating, or similar governance.99- **Should** prefer narrower specialist skills when a task collapses to a smaller problem after research.100- **May** reuse older shared artifacts for compatibility when a workflow already started that way, but convert back to workspace-local artifacts where practical.101102## Validation103104- Run the most relevant checks from `plan.md`, starting targeted and broadening when risk requires it.105- Compare the final state against the plan and call out any intentional or accidental deviations.106- Update `plan.md` or a concise `files/` handoff only when the evidence needs to persist beyond the final response.107- End with validation status, residual risks, and the next step.108109## Reference files110111- Read `references/examples.md` for concrete activation examples and expected behavior.112- Read `references/edge-cases.md` when the task is a near miss, becomes smaller than expected, or113 needs a mid-workflow reset.114- Read `references/prompts.md` when you want phase-by-phase starter prompts that match the native115 workspace-artifact workflow.