rpi

Original🇨🇳 Chinese
Translated

General RPI (Research, Plan, Implement, Iterate) execution skill. It is used for engineering tasks where users require "research first, then plan, then implement, and finally iterate", or when tasks are highly complex, high-risk, or have unclear impact. This skill does not rely on specific command-line tools or platforms, and is applicable to any AI Agent that supports skill mechanisms.

1installs
Added on

NPX Install

npx skill4agent add firede/agent-skills rpi

SKILL.md Content (Chinese)

View Translation Comparison →

RPI

Overview

  • Uses a four-phase process:
    Research -> Plan -> Implement -> Iterate
    .
  • Strictly maintain phase boundaries: No code modification during Research/Plan phases, verification is mandatory during the Implementation phase.
  • Produce structured results at each stage to ensure direct reuse in the next phase.

Usage

Advance phase by phase in the same session:
  1. Enter the
    Research
    phase, only collect facts and constraints.
  2. Enter the
    Plan
    phase, output a reviewable execution plan.
  3. After the plan is confirmed, enter the
    Implement
    phase, execute changes and verify.
  4. After implementation is completed, enter the
    Iterate
    phase, conduct a retrospective and define improvement priorities.

Workflow Decision-Making

  1. When requirements are unclear or context is insufficient, start with
    Research
    .
  2. After key facts are clarified, create a
    Plan
    and wait for confirmation.
  3. After the plan is confirmed, execute
    Implementation
    .
  4. After implementation is completed, execute
    Iteration
    .
  5. When key prerequisites change, roll back to the
    Research
    or
    Plan
    phase.

Phase Specifications

1) Research

Objective: Establish credible context, no code modification.
Actions:
  • Clarify problem definition, success criteria, and constraint boundaries.
  • Identify relevant code, dependencies, configurations, and existing patterns.
  • Distinguish between facts, assumptions, and unknowns.
  • Extract decision-making information for entering the Plan phase.
Output Structure:
  1. Summary
  2. Key Findings
  3. Context
  4. Pending Confirmations
  5. Recommendations

2) Plan

Objective: Form an executable, verifiable, reviewable plan, no code modification.
Actions:
  • Break down steps based on confirmed facts.
  • Mark affected files, risks, and rollback ideas.
  • Define verification schemes and completion criteria.
  • Wait for confirmation before entering the Implementation phase.
Output Structure:
  1. Objectives
  2. Prerequisites & Assumptions
  3. Scope & Involved Files
  4. Execution Steps
  5. Risks & Mitigation
  6. Verification Scheme

3) Implement

Objective: Execute changes according to the plan and conduct continuous verification.
Actions:
  • Implement step by step, control the scope of changes.
  • Verify immediately after each batch of changes (testing, lint, type-check, function check).
  • When deviating from the plan, first explain the reason and update the plan.
  • Record progress and remaining work.
Output Structure:
  1. Completed Changes
  2. Verification Results
  3. Deviation Explanation
  4. Remaining Work

4) Iterate

Objective: Conduct a systematic retrospective and define the next round of optimizations.
Actions:
  • Evaluate correctness, robustness, maintainability, and observability.
  • Check boundary conditions, failure paths, performance, and security risks.
  • Identify test gaps and technical debt.
  • Output prioritized improvement items.
Output Structure:
  1. Strengths
  2. Issues
  3. Boundary Cases & Gaps
  4. Prioritized Improvement Items

Quality Gates

  • Direct code modification is prohibited during the
    Research
    and
    Plan
    phases.
  • Skipping verification and directly declaring completion is prohibited during the
    Implement
    phase.
  • Only giving conclusions without executable improvement items is prohibited during the
    Iterate
    phase.
  • A structured result must be output at the end of each phase.

References

  • Read
    references/rpi-playbook.md
    for detailed checklists and prompt templates.