Skip to content

Knowledge base

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

Updated:

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.

Resources

Talks and videos