入门
快速开始
Upgrading from v0.15? See the Migration Guide instead.
前置条件
必需Node.js— v18 或更高版本
必需npm— 随 Node.js 一起安装
必需Claude Code 或 OpenCode— AI 代理 CLI(至少需要一个)
可选Bun— 替代包管理器
安装
Global installation required. Local project-level installation is blocked.
bash
# npm
npm install -g @c-d-cc/reap
# or Bun
bun install -g @c-d-cc/reap初始化项目
bash
# In Claude Code, initialize REAP in your project
> /reap.init运行你的第一代
在项目目录中打开你的 AI 智能体(Claude Code 或 OpenCode):
bash
# Start a generation — /reap.start will prompt for a goal
> /reap.evolve/reap.evolve 是主要命令它自主运行整个代的生命周期——Learning、Planning、Implementation、Validation 和 Completion。AI 代理驱动所有阶段,仅在真正遇到阻碍时才停下。这是日常开发中最常用的命令。
手动阶段控制
你也可以单独控制每个阶段:
bash
> /reap.start # Start a new generation (prompts for goal)
> /reap.next # Advance to next stage
> /reap.back # Return to previous stage一代中会发生什么
| 阶段 | 执行内容 | 产物 |
|---|---|---|
| Learning | 探索项目,构建上下文,审查 genome 和 environment | 01-learning.md |
| Planning | 分解任务,选择方案,梳理依赖关系 | 02-planning.md |
| Implementation | AI + 人类协作构建 | 03-implementation.md |
| Validation | 运行测试,验证完成标准 | 04-validation.md |
| Completion | 反思、收集适应度反馈、适应 genome、归档 | 05-completion.md |
命令加载方式
REAP 斜杠命令仅在 REAP 项目中加载——不会出现在非 REAP 项目中。
来源— 命令原文件存储在 ~/.reap/commands/(由 reap init 和 reap update 安装)
加载— 打开 REAP 项目时,会话钩子自动将命令符号链接到 .claude/commands/
非 REAP 项目— 不创建符号链接,因此 AI 代理的技能列表中不会出现 REAP 技能
向后兼容— ~/.claude/commands/ 中的重定向存根确保旧版设置在迁移期间继续工作
