SuperAPI AI Directory

rpi

Agents & models

View repository

Updated 10-15 21:42

About this skill

RPI

Overview

  • Use a four-phase process:调研 -> 计划 -> 实施 -> 迭代。
  • Strictly maintain phase boundaries: no code changes during the research/planning phases, and the implementation phase must be verified.
  • Each phase produces structured results to ensure the next phase can directly reuse them.

How to Use

Advance by phase within the same session:

  1. Enter 调研, and only collect facts and constraints.
  2. Enter 计划, and output a reviewable execution plan.
  3. After the plan is confirmed, enter 实施, execute the changes and verify them.
  4. After implementation is complete, enter 迭代, review and provide improvement priorities.

Workflow Decisions

  1. When requirements are unclear or context is insufficient, first do 调研。
  2. Once key facts are clear, do 计划 and wait for confirmation.
  3. After the plan is confirmed, execute 实施。
  4. After implementation is complete, execute 迭代。
  5. When a key premise changes, fall back to 调研 or 计划。

Phase Specifications

1) Research

Goal: establish trustworthy context without changing code.

Actions:

  • Clarify the problem definition, success criteria, and constraint boundaries.
  • Identify relevant code, dependencies, configuration, and existing patterns.
  • Distinguish facts, assumptions, and unknowns.
  • Extract decision information for entering the planning phase.

Output structure:

  1. Summary
  2. Key findings
  3. Context
  4. Questions to confirm
  5. Recommendations

2) Plan

Goal: form an executable, verifiable, and reviewable plan without changing code.

Actions:

  • Break down steps based on confirmed facts.
  • Mark affected files, risks, and rollback approach.
  • Define the verification plan and completion criteria.
  • Wait for confirmation before entering the implementation phase.

Output structure:

  1. Goal
  2. Premises and assumptions
  3. Scope and files involved
  4. Execution steps
  5. Risks and mitigation
  6. Verification plan

3) Implement

Goal: implement changes according to the plan and continuously verify.

Actions:

  • Implement step by step and control the scope of changes.
  • Verify immediately after each batch of changes (tests, lint, type-check, functional checks).
  • 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 notes
  4. Remaining work

4) Iterate

Goal: systematically review and define the next round of optimization.

Actions:

  • Evaluate correctness, robustness, maintainability, and observability.
  • Check boundary conditions, failure paths, performance, and security risks.
  • Identify test gaps and technical debt.
  • Output improvement items sorted by priority.

Output structure:

  1. Strengths
  2. Issues
  3. Edge cases and gaps
  4. Priority improvement items

Quality gates

  • In the 调研 and 计划 stages, directly modifying code is prohibited.
  • In the 实施 stage, skipping verification and directly declaring completion is prohibited.
  • In the 迭代 stage, providing only conclusions is prohibited; executable improvement items must be provided.
  • At the end of each stage, a structured result must be output.

Reference

  • Read references/rpi-playbook.md to obtain the detailed checklist and prompt templates.