Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

RPI Framework for Claude Code

RPI Framework

A one-command installer that supercharges Claude Code with structured development workflows using the Research-Plan-Implement methodology.

Quickstart

Run this single command in your project directory:

curl -fsSL https://raw.githubusercontent.com/acampb/claude-rpi-framework/main/setup-rpi-framework.sh | bash

That's it. The script will:

  • Download the latest RPI commands and sub-agents from HumanLayer's repository
  • Install them to your project's .claude/commands/ and .claude/agents/ directories
  • Create the thoughts/shared/ directory structure for persisting context

The Problem

When working with AI coding assistants on complex tasks, conversations often become chaotic:

  • Context gets lost between sessions—you explain the same things repeatedly
  • No clear methodology for tackling multi-file changes or large features
  • Inconsistent results—sometimes the AI dives in without understanding the codebase
  • Handoffs are painful—stopping mid-task means starting over next time

The Solution: RPI Framework

RPI (Research-Plan-Implement) provides a structured workflow that transforms how you work with Claude Code:

  1. Research — Deeply understand the codebase before making changes
  2. Plan — Create detailed, validated implementation plans
  3. Implement — Execute plans methodically, phase by phase

This framework installs slash commands directly into your project, giving Claude Code superpowers for structured development.

Learn More

Watch this video explaining the RPI methodology:

RPI Framework Overview

Slash Commands

After installation, these slash commands become available in Claude Code:

Command Description
/research_codebase Launch parallel agents to deeply explore and understand your codebase
/create_plan Generate a detailed, phased implementation plan for a feature or fix
/iterate_plan Refine and modify an existing plan based on feedback
/implement_plan Execute a plan phase-by-phase with validation checkpoints
/validate_plan Verify the implementation matches the original plan
/create_handoff Save complete session context for seamless continuation later
/resume_handoff Restore context from a previous handoff and continue work
/commit Create well-structured, conventional commits
/describe_pr Generate comprehensive PR descriptions from your changes

Sub-Agents

The RPI commands orchestrate these specialized sub-agents that run in parallel:

Agent Purpose
@codebase-analyzer Analyzes implementation details and traces data flow with exact file:line references
@codebase-locator Finds where files and components live in the codebase
@codebase-pattern-finder Locates similar implementations and existing patterns as templates
@thoughts-analyzer Extracts high-value insights from thoughts/ documents
@thoughts-locator Discovers relevant documents in the thoughts/ directory
@web-search-researcher Expert web research specialist for finding accurate information

These agents are automatically spawned by the slash commands—you don't need to call them directly.

Directory Structure

The installer creates this structure in your project:

your-project/
├── .claude/
│   ├── commands/           # Slash command definitions
│   │   ├── research_codebase.md
│   │   ├── create_plan.md
│   │   ├── iterate_plan.md
│   │   ├── implement_plan.md
│   │   ├── validate_plan.md
│   │   ├── create_handoff.md
│   │   ├── resume_handoff.md
│   │   ├── commit.md
│   │   └── describe_pr.md
│   ├── agents/             # Sub-agent definitions
│   │   ├── codebase-analyzer.md
│   │   ├── codebase-locator.md
│   │   ├── codebase-pattern-finder.md
│   │   ├── thoughts-analyzer.md
│   │   ├── thoughts-locator.md
│   │   └── web-search-researcher.md
│   └── RPI_QUICKSTART.md   # Quick reference guide
└── thoughts/
    └── shared/
        ├── research/       # Codebase research findings
        ├── plans/          # Implementation plans
        ├── handoffs/       # Session handoff documents
        └── tickets/        # Task/ticket definitions

Example Workflow

# 1. Start by understanding the codebase
/research_codebase
> How does the payment processing system work? What services are involved?

# 2. Plan your changes
/create_plan
> Add Stripe webhook handling for subscription events

# 3. Review the generated plan in thoughts/shared/plans/

# 4. Implement the plan
/implement_plan thoughts/shared/plans/2025-01-15-stripe-webhooks.md

# 5. Validate everything works
/validate_plan

# 6. Commit your changes
/commit

# 7. Generate a PR description
/describe_pr

# Need to stop? Save your progress
/create_handoff

# Resume later in a new session
/resume_handoff thoughts/shared/handoffs/latest-handoff.md

Customization

Edit the command files in .claude/commands/ to match your project:

  • Add project-specific test commands to /implement_plan
  • Customize commit message format in /commit
  • Add your PR template to /describe_pr

Requirements

Credits

Commands adapted from HumanLayer's claude-commands.

License

MIT

About

Setup Research-Plan-Implement framework for Claude Code

Resources

Stars

14 stars

Watchers

0 watching

Forks

Contributors

Languages