Evolution from RPI to CRISPY: Multi-Stage Workflow for Production Coding Agents

humanlayer · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: production coding-agent workflow design

HumanLayer needed to make its Research-Plan-Implement methodology work across real engineering teams after a giant planning prompt proved inconsistent, hard to review, and too dependent on expert prompting.

Constraints:

Architecture

HumanLayer evolved RPI into a staged CRISPY-like workflow: questions, research, design discussion, structure outline, plan, work tree, implement, and PR. Instead of one monolithic prompt, each stage has fewer than about 40 instructions and produces intermediate artifacts. Design discussions and structure outlines become shorter human-review points, while final code review remains mandatory rather than assuming autonomous generation is enough.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  question-and-research-stages["Question and research stages"] --> design-discussion["Design discussion"]
  design-discussion --> structure-outline["Structure outline"]
  structure-outline --> tactical-plan["Tactical plan"]
  tactical-plan --> implementation-workspace["Implementation workspace"]
  implementation-workspace --> pull-request-review["Pull request review"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Question and research stages Clarify the task and inspect the codebase before design work. Design discussion
Design discussion Captures direction, options, resolved decisions, and open questions for human-agent alignment. Structure outline
Structure outline Breaks the chosen design into high-level phases and reviewable blocks. Tactical plan
Tactical plan Detailed implementation plan used by the coding agent after alignment. Implementation workspace
Implementation workspace Work tree and coding stage where the agent applies the plan. Pull request review
Pull request review Human code review and rework gate for the generated code. —

Data flow

The workflow starts by clarifying questions and researching the codebase, then opens a design discussion, captures resolved decisions and open questions, creates a structure outline, writes a tactical plan, prepares the work tree, implements the change, and sends a PR for review. Each stage uses a focused prompt and a fresh context window rather than one giant prompt controlling the whole process.

“we split up the planning into a design discussion, an outline, and a plan.”transcript, stated
“the process is basically questions, research, design, structure outline, plan, work tree, implement, finally the pull request.”transcript, stated

Why this architecture

HumanLayer split the workflow because prompts are a poor control-flow mechanism once instruction count grows. Focused stages reduce instruction burden, make human review documents shorter, and preserve quality by aligning on design and structure before code generation and mandatory review.

“don't use prompts for control flow if you can use control flow for control flow.”transcript, stated
“before it was 85 instructions, now they're all less than 40”transcript, stated

Models used: Claude Code · RPI prompts · CRISPY workflow · Open source prompts · Coding agents

Scale

Alternatives considered (roads not taken)

Keep one giant RPI planning prompt.

Rejected because: The prompt had too many instructions and skipped important alignment steps for many users.

“single giant like monolithic thing with 85 or more instructions.”transcript, stated

Skip human review of intermediate artifacts.

Rejected because: Plans and code could diverge or surprise reviewers without design and structure alignment.

“plans can have surprises. So, you would go and you would review the plan and then you would go right to code and it would be different.”transcript, stated

Fully autonomous code generation without code review.

Rejected because: The speaker says quality still requires alignment, review, and rework.

“I still have to like align with my team on what we're going to do. I still have to get a code review and fix stuff.”transcript, stated

Patterns

prompt-chaining (coding-agent workflow)

RPI is decomposed into smaller focused prompt stages rather than one mega-prompt.

“classify the input and then feed it to a series of smaller, more focused prompts”transcript, stated

human-in-the-loop-gate (engineering review)

Design discussions, structure outlines, and pull requests create review points before and after implementation.

“human agent alignment is important”transcript, stated

context-compaction (coding-agent sessions)

The workflow creates artifacts that let sessions resume without relying only on automatic compaction quality.

“so you can always resume from where you left off without having to worry about the quality of an auto compact or manual compact.”transcript, stated

Tradeoffs

Use multiple short artifacts.

Chose Design discussion and structure outline before plan over Reviewing only a giant final plan.

Rationale: Shorter artifacts give humans more leverage and earlier chances to redirect.

“your design discussion might only be 200 lines. And you get a lot of opportunities to restear”transcript, stated

Keep code review mandatory.

Chose PR review after implementation over Trusting autonomous generation once the plan is approved.

Rationale: Even with better planning, teams still need human code ownership and rework loops.

“I still have to get a code review and fix stuff.”transcript, stated

Gotchas (what bit them)

Instruction overload caused skipped workflow steps.

Root cause: The model had to follow the big RPI prompt plus system prompt, tools, Claude.md, and MCP instructions.

Resolution: Split the workflow into prompts under roughly 40 instructions each.

“if you have a prompt with 85 instructions and your Claude MD and your system prompt and your tools and your MCP”transcript, stated

Thousand-line plans were too costly to review.

Root cause: The plan could approach the size of the resulting code and still contain surprises.

Resolution: Use shorter design discussions and structure outlines as higher-leverage review artifacts.

“a thousand line plan tends to be about a thousand lines of code within 10% or so”transcript, stated

Models kept writing horizontal plans.

Root cause: Prompting alone did not reliably make agents produce vertically sliced, testable implementation plans.

Resolution: Add a structure-outline stage that breaks the work into reviewable blocks before the tactical plan.

“we cannot get models to stop writing horizontal plans.”transcript, stated

Evaluation

The workflow was informed by workshops with engineers, prompt behavior observation, instruction-following limits, and attempts to prompt/eval planning behavior such as avoiding horizontal plans.

Metrics: Instruction adherence · Review document length · Human-agent alignment · Code review rework · Plan quality · Team adoption

“trying to prompt this out and eval the hell out of this”transcript, stated

Outcomes

The talk reports 10,000 prompt downloads and workshops with thousands of engineers from startups through Fortune 500 companies.

“we split things up to get better instruction following”transcript, stated
“Results showed improved team adoption, better leverage through shorter review documents, and sustained 2-3x productivity improvements while maintaining code quality”summary, stated