Skip to content

Latest commit

 

History

History
101 lines (76 loc) · 2.63 KB

File metadata and controls

101 lines (76 loc) · 2.63 KB

RPI 工作流

RPI = Research(研究) → Plan(规划) → Implement(实现)

一个系统化的开发工作流,每个阶段都有验证门。防止在不可行的功能上浪费精力,并确保全面的文档记录。

← 返回 Claude Code 最佳实践 Claude

概述

RPI 工作流


安装

.claude 文件夹(包含 agents/commands/rpi/)复制到你的仓库根目录,然后创建 rpi/plans 目录。


示例工作流

功能:用户认证

步骤 1:描述

用户:"添加支持 Google 和 GitHub 提供商的 OAuth2 认证"

1. Claude 生成计划
   → 输出:rpi/plans/oauth2-authentication.md
2. 创建功能文件夹:rpi/oauth2-authentication/
3. 将计划复制到功能文件夹
4. 将计划重命名为 REQUEST.md
   → 最终:rpi/oauth2-authentication/REQUEST.md

步骤 2:研究

/rpi:research rpi/oauth2-authentication/REQUEST.md

输出:

  • research/RESEARCH.md 包含分析
  • 结论:GO(可行,符合战略)

步骤 3:规划

/rpi:plan oauth2-authentication

输出:

  • plan/pm.md - 用户故事和验收标准
  • plan/ux.md - 登录 UI 流程
  • plan/eng.md - 技术架构
  • plan/PLAN.md - 3 个阶段,15 个任务

步骤 4:实现

/rpi:implement oauth2-authentication

进度:

  • 阶段 1:后端基础 → 通过
  • 阶段 2:前端集成 → 通过
  • 阶段 3:测试与优化 → 通过

结果:功能完成,准备提交 PR。


功能文件夹结构

所有功能工作都在 rpi/{feature-slug}/ 中进行:

rpi/{feature-slug}/
├── REQUEST.md              # 步骤 1:初始功能描述
├── research/
│   └── RESEARCH.md         # 步骤 2:GO/NO-GO 分析
├── plan/
│   ├── PLAN.md             # 步骤 3:实现路线图
│   ├── pm.md               # 产品需求
│   ├── ux.md               # UX 设计
│   └── eng.md              # 技术规范
└── implement/
    └── IMPLEMENT.md        # 步骤 4:实现记录

Agents 和命令

命令 使用的 Agents
/rpi:research requirement-parser, product-manager, Explore, senior-software-engineer, technical-cto-advisor, documentation-analyst-writer
/rpi:plan senior-software-engineer, product-manager, ux-designer, documentation-analyst-writer
/rpi:implement Explore, senior-software-engineer, code-reviewer