Research, Plan, Implement (RPI)
Why RPI gives each step a fresh context window and where people should review, for teams moving from chat prompting to a planned workflow.
Written by
-
Benedikt Stemmildt Founder & Co-CEO
Updated:
Glossary 33
Research, Plan, Implement is a way to run one coding task with an agent in three steps. The research step finds out how the relevant part of the system works and condenses the findings into a short document. The plan step turns that into exact steps, with file names and the changes each one gets. The implement step executes the plan. Each step starts in a fresh context window and reads only the written output of the step before.
Why split a task into three windows?
An agent’s output gets worse as its context window fills, so each step starts small and hands over a compact document instead of a long conversation. Asking, correcting and asking again in one session fills the window with dead ends. Subagents help with the same goal: one does the searching and reading in its own window and returns a summary. See Context Engineering.
Where should people review?
Review the short research and alignment notes before the plan, then read the finished code. A wrong assumption in the research spreads into every later step, so it is the cheapest place to catch one. Reviewing only the long plan does not save the work: a detailed plan is close to the size of the code it produces, so reading it means reviewing the change twice, and the code still drifts from the plan.
Related
- The agent loop: what runs inside each of the three steps.
- Spec-driven development: the written intent the research and plan start from.
Resources
Talks and videos
- Advanced Context Engineering for Agents (opens in a new tab) - HumanLayer talk on context engineering for coding agents, the groundwork for running research, plan and implement in fresh windows.
- No Vibes Allowed: Solving Hard Problems in Complex Codebases (opens in a new tab) - HumanLayer talk on the Research, Plan, Implement workflow for hard problems in large codebases, and where people should review.