指南

高级功能

基于签名的锁定

REAP 使用加密 nonce 链来强制阶段排序。没有有效的 nonce,AI 代理无法推进到下一阶段——即使它试图跳过。

text
Stage Command          current.yml              /reap.next
─────────────          ───────────              ──────────
generate nonce ──────→ store hash(nonce)
return nonce to AI                         ←── AI passes nonce
                                               verify hash(nonce)
                                               ✓ advance stage

工作原理

  1. 阶段命令(如 /reap.objective)生成一个随机 nonce
  2. nonce 的 SHA-256 哈希存储在 current.yml 中
  3. nonce 在 JSON 响应中返回给 AI 代理
  4. /reap.next 接收 nonce,计算哈希,并与 current.yml 对比
  5. 匹配 → 阶段推进。不匹配 → 拒绝。

仅提示 vs 基于签名

威胁仅提示基于签名
跳过阶段依赖 AI 合规性被阻止——没有有效的 nonce
伪造令牌不适用不可行——单向哈希
重放旧 nonce不适用被阻止——一次性,绑定阶段
提示注入有漏洞nonce 在提示上下文之外

📄 Related Article: New workflow control method for harness engineering — Signature-Based Locking

Lineage 压缩

随着代的积累,lineage 归档在 Completion 阶段自动压缩。

级别输入输出触发条件保护
Level 1代文件夹(5 个产物)gen-XXX-{hash}.md(40 行)lineage > 5,000 行 + 5 代以上最近 3 个 + DAG 叶节点
Level 2100+ Level 1 文件单个 epoch.mdLevel 1 文件 > 100最近 9 个 + 分叉点

DAG 保留:Level 1 文件在 frontmatter 中保留元数据。Level 2 epoch.md 存储代哈希链。分叉保护:在 Level 2 压缩前扫描所有本地/远程分支——分叉点受保护。经过 epoch 压缩的代不能用作合并基础。

入口模式

通过 reap init --mode 指定。控制 Genome 的初始结构方式。

模式描述
greenfield从零开始构建新项目。默认模式。Genome 从空开始逐步增长。
migration参考现有系统重新构建。Genome 以现有系统分析为种子。
adoption将 REAP 应用到现有代码库。Genome 从模板开始,在第一代的 Learning 阶段填充。