@c-d-cc/reap 0.4.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +96 -10
- package/README.ko.md +96 -10
- package/README.md +96 -10
- package/README.zh-CN.md +96 -10
- package/dist/cli.js +212 -112
- package/dist/templates/artifacts/01-objective.md +17 -0
- package/dist/templates/artifacts/merge/01-detect.md +18 -0
- package/dist/templates/artifacts/merge/02-mate.md +12 -0
- package/dist/templates/artifacts/merge/03-merge.md +15 -0
- package/dist/templates/artifacts/merge/04-sync.md +18 -0
- package/dist/templates/artifacts/merge/05-validation.md +11 -0
- package/dist/templates/artifacts/merge/06-completion.md +13 -0
- package/dist/templates/brainstorm/frame.html +125 -0
- package/dist/templates/brainstorm/server.cjs +306 -0
- package/dist/templates/brainstorm/spec-reviewer-prompt.md +52 -0
- package/dist/templates/brainstorm/start-server.sh +67 -0
- package/dist/templates/brainstorm/visual-companion-guide.md +120 -0
- package/dist/templates/commands/reap.evolve.md +7 -0
- package/dist/templates/commands/reap.merge.completion.md +20 -0
- package/dist/templates/commands/reap.merge.detect.md +20 -0
- package/dist/templates/commands/reap.merge.evolve.md +28 -0
- package/dist/templates/commands/reap.merge.mate.md +27 -0
- package/dist/templates/commands/reap.merge.md +47 -0
- package/dist/templates/commands/reap.merge.merge.md +22 -0
- package/dist/templates/commands/reap.merge.start.md +21 -0
- package/dist/templates/commands/reap.merge.sync.md +32 -0
- package/dist/templates/commands/reap.merge.validation.md +25 -0
- package/dist/templates/commands/reap.next.md +14 -1
- package/dist/templates/commands/reap.objective.md +105 -9
- package/dist/templates/commands/reap.pull.md +51 -0
- package/dist/templates/commands/reap.push.md +18 -0
- package/dist/templates/hooks/genome-loader.cjs +34 -12
- package/dist/templates/hooks/opencode-session-start.js +2 -2
- package/dist/templates/hooks/reap-guide.md +1 -1
- package/dist/templates/hooks/session-start.cjs +2 -2
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> [English](README.md) | [한국어](README.ko.md) | [简体中文](README.zh-CN.md)
|
|
2
|
+
|
|
1
3
|
<p align="center">
|
|
2
4
|
<img src="media/logo.png" alt="REAP" width="80" height="80" />
|
|
3
5
|
</p>
|
|
@@ -9,8 +11,6 @@
|
|
|
9
11
|
AIと人間がGenerationを重ねてソフトウェアを進化させる開発パイプライン。
|
|
10
12
|
</p>
|
|
11
13
|
|
|
12
|
-
> [English](README.md) | [한국어](README.ko.md) | [简体中文](README.zh-CN.md)
|
|
13
|
-
|
|
14
14
|
<table align="center">
|
|
15
15
|
<tr>
|
|
16
16
|
<td align="center"><strong>Genome</strong><br><sub>設計とナレッジ</sub></td>
|
|
@@ -23,6 +23,22 @@
|
|
|
23
23
|
|
|
24
24
|
REAPはアプリケーションの遺伝情報(Genome)を定義し、各世代で目標を設定して実装し、その過程で発見したGenomeの欠陥を次のステージにフィードバックします。世代を重ねるごとにGenomeが進化し、Source Code(Civilization)が成長します。
|
|
25
25
|
|
|
26
|
+
## 目次
|
|
27
|
+
|
|
28
|
+
- [なぜREAPか?](#なぜreapか)
|
|
29
|
+
- [インストール](#インストール)
|
|
30
|
+
- [クイックスタート](#クイックスタート)
|
|
31
|
+
- [ライフサイクル](#ライフサイクル)
|
|
32
|
+
- [コアコンセプト](#コアコンセプト)
|
|
33
|
+
- [分散ワークフロー — 並行開発](#分散ワークフロー--並行開発)
|
|
34
|
+
- [CLIコマンド](#cliコマンド)
|
|
35
|
+
- [エージェント連携](#エージェント連携)
|
|
36
|
+
- [`reap init`後のプロジェクト構造](#reap-init後のプロジェクト構造)
|
|
37
|
+
- [系譜圧縮(Lineage Compression)](#系譜圧縮lineage-compression)
|
|
38
|
+
- [進化フロー(Evolution Flow)](#進化フローevolution-flow)
|
|
39
|
+
- [プリセット(Presets)](#プリセットpresets)
|
|
40
|
+
- [エントリーモード(Entry Modes)](#エントリーモードentry-modes)
|
|
41
|
+
|
|
26
42
|
## なぜREAPか?
|
|
27
43
|
|
|
28
44
|
AIエージェントと開発する際、こんな問題に遭遇したことはありませんか?
|
|
@@ -31,6 +47,7 @@ AIエージェントと開発する際、こんな問題に遭遇したことは
|
|
|
31
47
|
- **散発的な開発** — 明確な目標なくあちこちのコードを修正
|
|
32
48
|
- **設計とコードの乖離** — ドキュメントとコードが時間とともに離れていく
|
|
33
49
|
- **教訓の忘却** — 苦労して得たインサイトが次の作業に反映されない
|
|
50
|
+
- **コラボレーションの混乱** — 複数の開発者やエージェントが並行して作業すると、競合が頻発しマージが悪夢になる
|
|
34
51
|
|
|
35
52
|
REAPは**世代ベースの進化モデル**でこれらの問題を解決します:
|
|
36
53
|
|
|
@@ -39,6 +56,7 @@ REAPは**世代ベースの進化モデル**でこれらの問題を解決しま
|
|
|
39
56
|
- 実装中に発見した設計問題はbacklogに記録、Completionで反映
|
|
40
57
|
- レトロスペクティブ(Completion)で導き出した教訓がGenomeに蓄積
|
|
41
58
|
- 世代を重ねて繰り返される手作業を自動検出し、ユーザー確認の上でHookとして生成
|
|
59
|
+
- ブランチ間の並行作業はgenome-firstマージワークフローで調整 — コードの競合の前に設計の競合を解決
|
|
42
60
|
|
|
43
61
|
## インストール
|
|
44
62
|
|
|
@@ -94,7 +112,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
|
|
|
94
112
|
|
|
95
113
|
| ステージ | 内容 | 成果物 |
|
|
96
114
|
|----------|------|--------|
|
|
97
|
-
| **Objective** |
|
|
115
|
+
| **Objective** | 構造化ブレインストーミングによる目標・設計定義:明確化質問、アプローチ代案、セクション別設計、ビジュアルコンパニオン、Specレビュー | `01-objective.md` |
|
|
98
116
|
| **Planning** | タスク分解、実装アプローチ、依存関係 | `02-planning.md` |
|
|
99
117
|
| **Implementation** | AI+Human協力でコード実装 | `03-implementation.md` |
|
|
100
118
|
| **Validation** | テスト実行、完了条件の確認 | `04-validation.md` |
|
|
@@ -146,6 +164,55 @@ Objective → Planning → Implementation ⟷ Validation → Completion
|
|
|
146
164
|
└── lineage/ # 完了した世代のアーカイブ
|
|
147
165
|
```
|
|
148
166
|
|
|
167
|
+
## 分散ワークフロー — 並行開発
|
|
168
|
+
|
|
169
|
+
> **⚠ 初期段階** — 分散ワークフローにはさらなるテストが必要です。本番環境でのご使用にはご注意ください。フィードバックを収集しています — [Issueを登録](https://github.com/c-d-cc/reap/issues)。
|
|
170
|
+
|
|
171
|
+
REAPは複数の開発者やAIエージェントが同一プロジェクトで並行して作業する分散コラボレーションをサポートします。中央サーバー不要で、Gitだけで動作します。
|
|
172
|
+
|
|
173
|
+
### 動作の仕組み
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Machine A: branch-a — gen-046-a (authentication) → /reap.push
|
|
177
|
+
Machine B: branch-b — gen-046-b (search) → /reap.push
|
|
178
|
+
|
|
179
|
+
Machine A:
|
|
180
|
+
/reap.pull branch-b → Fetch + マージGeneration全ライフサイクルを実行
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
各マシンは自分のブランチとGenerationで独立して作業します。統合するタイミングで、REAPは**genome-first**戦略でマージを調整します([詳しく見る](https://reap.cc/docs/merge-generation)):
|
|
184
|
+
|
|
185
|
+
1. **Detect** — リモートブランチのgenomeとlineageをgit refでスキャンし、分岐点を特定
|
|
186
|
+
2. **Mate** — Genomeの競合を最初に解決(人間が判断)
|
|
187
|
+
3. **Merge** — 確定したGenomeを基準にソースコードをマージ(`git merge --no-commit`)
|
|
188
|
+
4. **Sync** — AIがGenomeとソースを比較して整合性を確認;不整合があればユーザーが確認
|
|
189
|
+
5. **Validation** — 機械的テストを実行(bun test、tsc、build)— 通常のGenerationと同様
|
|
190
|
+
6. **Completion** — マージ結果をコミットしてアーカイブ
|
|
191
|
+
|
|
192
|
+
### 分散ワークフロー用スラッシュコマンド
|
|
193
|
+
|
|
194
|
+
すべての分散操作はAIエージェントを通じて実行します:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
/reap.pull <branch> # Fetch + マージGeneration全体を実行(分散版 /reap.evolve)
|
|
198
|
+
/reap.merge <branch> # ローカルブランチのマージGeneration全体を実行(fetchなし)
|
|
199
|
+
/reap.push # REAP状態を検証 + 現在のブランチをpush
|
|
200
|
+
/reap.merge.start # マージGenerationを開始(ステップバイステップ制御用)
|
|
201
|
+
/reap.merge.detect # 分岐を分析
|
|
202
|
+
/reap.merge.mate # Genomeの競合を解決
|
|
203
|
+
/reap.merge.merge # ソースコードをマージ
|
|
204
|
+
/reap.merge.sync # Genome-ソース間の整合性を検証
|
|
205
|
+
/reap.merge.validation # 機械的テストを実行(bun test、tsc、build)
|
|
206
|
+
/reap.merge.evolve # 現在のステージからマージライフサイクルを実行
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 基本原則
|
|
210
|
+
|
|
211
|
+
- **Opt-in** — `git pull`/`push`は常にそのまま動作します。REAPコマンドは付加的なものです。
|
|
212
|
+
- **Genome-first** — ソースマージの前にGenomeの競合を解決します。憲法を改正してから法律を更新するようなものです。
|
|
213
|
+
- **サーバー不要** — すべてがローカル + Git。外部サービスは不要です。
|
|
214
|
+
- **DAG lineage** — 各世代はハッシュベースのID(`gen-046-a3f8c2`)で親を参照し、有向非巡回グラフを形成するため、並行作業を自然にサポートします。
|
|
215
|
+
|
|
149
216
|
## CLIコマンド
|
|
150
217
|
|
|
151
218
|
| コマンド | 説明 |
|
|
@@ -187,6 +254,16 @@ REAPはスラッシュコマンドとセッションフックを通じてAIエ
|
|
|
187
254
|
| `/reap.help` | 24+トピックのcontextual AIヘルプ(workflow, genome, backlog, strict, agents, hooks, config, evolve, regression, authorおよび全コマンド名) |
|
|
188
255
|
| `/reap.update` | REAPのアップデート確認と最新バージョンへのアップグレード |
|
|
189
256
|
| **`/reap.evolve`** | **1つのGeneration全体を最初から最後まで実行(推奨)** |
|
|
257
|
+
| **`/reap.pull <branch>`** | **Fetch + マージGeneration全体を実行(分散版 `/reap.evolve`)** |
|
|
258
|
+
| **`/reap.merge <branch>`** | **ローカルブランチのマージGeneration全体を実行(fetchなし)** |
|
|
259
|
+
| `/reap.push` | REAP状態を検証して現在のブランチをpush |
|
|
260
|
+
| `/reap.merge.start` | 分岐ブランチを統合するマージGenerationを開始 |
|
|
261
|
+
| `/reap.merge.detect` | ブランチ間の分岐を分析 |
|
|
262
|
+
| `/reap.merge.mate` | ソースマージの前にGenomeの競合を解決 |
|
|
263
|
+
| `/reap.merge.merge` | 解決済みGenomeを基準にソースコードをマージ |
|
|
264
|
+
| `/reap.merge.sync` | Genome-ソース間の整合性を検証(AI比較、ユーザー確認) |
|
|
265
|
+
| `/reap.merge.validation` | 機械的テストを実行(bun test、tsc、build) |
|
|
266
|
+
| **`/reap.merge.evolve`** | **マージライフサイクル全体を自動実行** |
|
|
190
267
|
|
|
191
268
|
### SessionStart Hook
|
|
192
269
|
|
|
@@ -202,24 +279,30 @@ REAPはスラッシュコマンドとセッションフックを通じてAIエ
|
|
|
202
279
|
|
|
203
280
|
### Strictモード
|
|
204
281
|
|
|
205
|
-
|
|
282
|
+
Strictモードは、AIエージェントが許可される操作を制御します。2つの細かいオプションをサポートします:
|
|
206
283
|
|
|
207
284
|
```yaml
|
|
208
285
|
# .reap/config.yml
|
|
209
|
-
strict: true
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
286
|
+
strict: true # 省略形:editとmerge両方を有効化
|
|
287
|
+
|
|
288
|
+
# または細かい制御:
|
|
289
|
+
strict:
|
|
290
|
+
edit: true # コード変更をREAPライフサイクルに制限
|
|
291
|
+
merge: false # raw git pull/push/mergeを制限
|
|
215
292
|
```
|
|
216
293
|
|
|
294
|
+
**`strict.edit`** — コード変更制御:
|
|
295
|
+
|
|
217
296
|
| 状況 | 動作 |
|
|
218
297
|
|------|------|
|
|
219
298
|
| アクティブGenerationなし / 実装ステージ外 | コード変更は完全にブロック |
|
|
220
299
|
| Implementationステージ | `02-planning.md`の範囲内でのみ変更許可 |
|
|
221
300
|
| エスケープハッチ | ユーザーが「override」「bypass strict」等を明示的に要求した場合に許可 |
|
|
222
301
|
|
|
302
|
+
**`strict.merge`** — Gitコマンド制御:有効にすると`git pull`/`push`/`merge`の直接使用が制限されます。エージェントが`/reap.pull`、`/reap.push`、`/reap.merge`の使用を案内します。
|
|
303
|
+
|
|
304
|
+
どちらもデフォルトで無効。`strict: true`は両方を有効にします。
|
|
305
|
+
|
|
223
306
|
Strictモードはデフォルトで無効です(`strict: false`)。
|
|
224
307
|
|
|
225
308
|
### REAP Hooks
|
|
@@ -253,6 +336,9 @@ order: 10 # 実行順序(小さいほど先に実行)
|
|
|
253
336
|
| `onStageTransition` | `/reap.next`で次のステージに前進後 |
|
|
254
337
|
| `onGenerationComplete` | `/reap.next`で完了したGenerationをアーカイブ後 |
|
|
255
338
|
| `onRegression` | `/reap.back`で前のステージに回帰後 |
|
|
339
|
+
| `onMergeStart` | `/reap.merge.start`でマージGeneration作成後 |
|
|
340
|
+
| `onGenomeResolved` | マージ中にGenomeの競合が解決された後 |
|
|
341
|
+
| `onMergeComplete` | マージGenerationがアーカイブされた後 |
|
|
256
342
|
|
|
257
343
|
HookはAIエージェントがプロジェクトルートディレクトリで実行します。`onGenerationComplete` Hookには自動バージョンバンプ判定が含まれています — patchレベルは自動適用され、minor/majorバンプはユーザー確認が必要です。
|
|
258
344
|
|
package/README.ko.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
|
|
2
|
+
|
|
1
3
|
<p align="center">
|
|
2
4
|
<img src="media/logo.png" alt="REAP" width="80" height="80" />
|
|
3
5
|
</p>
|
|
@@ -9,8 +11,6 @@
|
|
|
9
11
|
AI와 인간이 세대(Generation)를 거듭하며 소프트웨어를 진화시키는 개발 파이프라인.
|
|
10
12
|
</p>
|
|
11
13
|
|
|
12
|
-
> [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
|
|
13
|
-
|
|
14
14
|
<table align="center">
|
|
15
15
|
<tr>
|
|
16
16
|
<td align="center"><strong>Genome</strong><br><sub>설계와 지식</sub></td>
|
|
@@ -23,6 +23,22 @@
|
|
|
23
23
|
|
|
24
24
|
REAP은 Application의 유전 정보(Genome)를 정의하고, 각 세대에서 목표를 설정하여 구현하고, 그 과정에서 발견한 Genome 결함을 다음 단계에서 반영합니다. 세대를 거듭하며 Genome이 진화하고, Source Code(Civilization)가 성장합니다.
|
|
25
25
|
|
|
26
|
+
## 목차
|
|
27
|
+
|
|
28
|
+
- [Why REAP?](#why-reap)
|
|
29
|
+
- [설치](#설치)
|
|
30
|
+
- [빠른 시작](#빠른-시작)
|
|
31
|
+
- [생애주기 (Life Cycle)](#생애주기-life-cycle)
|
|
32
|
+
- [핵심 개념](#핵심-개념)
|
|
33
|
+
- [분산 워크플로우 — 병렬 개발](#분산-워크플로우--병렬-개발)
|
|
34
|
+
- [CLI 명령어](#cli-명령어)
|
|
35
|
+
- [에이전트 연동](#에이전트-연동)
|
|
36
|
+
- [`reap init` 후 프로젝트 구조](#reap-init-후-프로젝트-구조)
|
|
37
|
+
- [계보 압축 (Lineage Compression)](#계보-압축-lineage-compression)
|
|
38
|
+
- [진화 흐름 (Evolution Flow)](#진화-흐름-evolution-flow)
|
|
39
|
+
- [프리셋 (Presets)](#프리셋-presets)
|
|
40
|
+
- [진입 모드 (Entry Modes)](#진입-모드-entry-modes)
|
|
41
|
+
|
|
26
42
|
## Why REAP?
|
|
27
43
|
|
|
28
44
|
AI 에이전트와 함께 개발할 때 이런 문제를 겪어본 적 있나요?
|
|
@@ -31,6 +47,7 @@ AI 에이전트와 함께 개발할 때 이런 문제를 겪어본 적 있나요
|
|
|
31
47
|
- **산발적 개발** — 명확한 목표 없이 여기저기 코드를 수정
|
|
32
48
|
- **설계와 코드의 괴리** — 문서는 따로, 코드는 따로 놀면서 점점 벌어짐
|
|
33
49
|
- **교훈의 망각** — 삽질한 경험이 다음 작업에 반영되지 않음
|
|
50
|
+
- **협업의 혼란** — 여러 개발자나 에이전트가 병렬로 작업하면 충돌이 빈발하고 머지가 악몽이 됨
|
|
34
51
|
|
|
35
52
|
REAP은 **세대 기반 진화 모델**로 이 문제들을 해결합니다:
|
|
36
53
|
|
|
@@ -39,6 +56,7 @@ REAP은 **세대 기반 진화 모델**로 이 문제들을 해결합니다:
|
|
|
39
56
|
- 구현 중 발견한 설계 문제는 backlog에 기록, Completion에서 반영
|
|
40
57
|
- 회고(Completion)에서 도출한 교훈이 Genome에 축적
|
|
41
58
|
- 세대를 거듭하며 반복되는 수작업을 자동 감지하고, 사용자 확인 후 Hook으로 생성
|
|
59
|
+
- 브랜치 간 병렬 작업은 genome-first 머지 워크플로우로 조율 — 코드 충돌 전에 설계 충돌부터 해결
|
|
42
60
|
|
|
43
61
|
## 설치
|
|
44
62
|
|
|
@@ -94,7 +112,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
|
|
|
94
112
|
|
|
95
113
|
| 단계 | 하는 일 | 산출물 |
|
|
96
114
|
|------|---------|--------|
|
|
97
|
-
| **Objective** | 목표
|
|
115
|
+
| **Objective** | 구조화된 브레인스토밍으로 목표 및 설계 정의: 명확화 질문, 접근법 대안, 섹션별 설계, 비주얼 컴패니언, Spec 리뷰 | `01-objective.md` |
|
|
98
116
|
| **Planning** | 태스크 분해, 구현 접근법, 의존관계 | `02-planning.md` |
|
|
99
117
|
| **Implementation** | AI+Human 협업으로 코드 구현 | `03-implementation.md` |
|
|
100
118
|
| **Validation** | 테스트 실행, 완료 조건 점검 | `04-validation.md` |
|
|
@@ -146,6 +164,55 @@ Application의 유전 정보 — 아키텍처 원칙, 비즈니스 규칙, 개
|
|
|
146
164
|
└── lineage/ # 완료된 세대들의 아카이브
|
|
147
165
|
```
|
|
148
166
|
|
|
167
|
+
## 분산 워크플로우 — 병렬 개발
|
|
168
|
+
|
|
169
|
+
> **⚠ 초기 단계** — 분산 워크플로우는 추가 테스트가 필요합니다. 프로덕션 환경에서는 주의하여 사용하세요. 피드백을 수집하고 있습니다 — [이슈 등록](https://github.com/c-d-cc/reap/issues).
|
|
170
|
+
|
|
171
|
+
REAP은 여러 개발자 또는 AI 에이전트가 동일 프로젝트에서 병렬로 작업하는 분산 협업을 지원합니다. 별도 서버 없이 Git만으로 동작합니다.
|
|
172
|
+
|
|
173
|
+
### 동작 방식
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Machine A: branch-a — gen-046-a (authentication) → /reap.push
|
|
177
|
+
Machine B: branch-b — gen-046-b (search) → /reap.push
|
|
178
|
+
|
|
179
|
+
Machine A:
|
|
180
|
+
/reap.pull branch-b → Fetch + 전체 머지 Generation 라이프사이클 실행
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
각 머신은 자신의 브랜치와 Generation에서 독립적으로 작업합니다. 합칠 때가 되면 REAP이 **genome-first** 전략으로 머지를 조율합니다 ([자세히 보기](https://reap.cc/docs/merge-generation)):
|
|
184
|
+
|
|
185
|
+
1. **Detect** — 원격 브랜치의 genome과 lineage를 git ref로 스캔하여 분기점을 파악
|
|
186
|
+
2. **Mate** — Genome 충돌부터 해결 (사람이 판단)
|
|
187
|
+
3. **Merge** — 확정된 Genome을 기준으로 소스 코드 머지 (`git merge --no-commit`)
|
|
188
|
+
4. **Sync** — AI가 Genome과 소스를 비교하여 일관성 확인; 불일치 발견 시 사용자 확인
|
|
189
|
+
5. **Validation** — 기계적 테스트 실행 (bun test, tsc, build) — 일반 Generation과 동일
|
|
190
|
+
6. **Completion** — 머지 결과를 커밋하고 아카이빙
|
|
191
|
+
|
|
192
|
+
### 분산 워크플로우 슬래시 커맨드
|
|
193
|
+
|
|
194
|
+
모든 분산 작업은 AI 에이전트를 통해 실행합니다:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
/reap.pull <branch> # Fetch + 전체 머지 Generation 실행 (분산 /reap.evolve)
|
|
198
|
+
/reap.merge <branch> # 로컬 브랜치 전체 머지 Generation 실행 (fetch 없음)
|
|
199
|
+
/reap.push # REAP 상태 검증 + 현재 브랜치 push
|
|
200
|
+
/reap.merge.start # 머지 Generation 시작 (단계별 제어용)
|
|
201
|
+
/reap.merge.detect # 분기 분석
|
|
202
|
+
/reap.merge.mate # Genome 충돌 해결
|
|
203
|
+
/reap.merge.merge # 소스 코드 머지
|
|
204
|
+
/reap.merge.sync # Genome-소스 일관성 검증
|
|
205
|
+
/reap.merge.validation # 기계적 테스트 실행 (bun test, tsc, build)
|
|
206
|
+
/reap.merge.evolve # 현재 stage부터 머지 라이프사이클 실행
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 핵심 원칙
|
|
210
|
+
|
|
211
|
+
- **Opt-in** — `git pull`/`push`는 항상 그대로 동작합니다. REAP 커맨드는 부가적입니다.
|
|
212
|
+
- **Genome-first** — 소스 머지 전에 Genome 충돌을 먼저 해결합니다. 헌법을 개정한 뒤 법률을 수정하는 것과 같습니다.
|
|
213
|
+
- **서버 불필요** — 모든 것이 로컬 + Git. 외부 서비스가 필요 없습니다.
|
|
214
|
+
- **DAG lineage** — 각 세대는 해시 기반 ID(`gen-046-a3f8c2`)로 부모를 참조하여 방향 비순환 그래프를 형성하므로, 병렬 작업을 자연스럽게 지원합니다.
|
|
215
|
+
|
|
149
216
|
## CLI 명령어
|
|
150
217
|
|
|
151
218
|
| 명령어 | 설명 |
|
|
@@ -187,6 +254,16 @@ Slash command가 `.claude/commands/`에 설치되어 전체 워크플로우를
|
|
|
187
254
|
| `/reap.help` | 24+ 주제의 contextual AI 도움말 (workflow, genome, backlog, strict, agents, hooks, config, evolve, regression, author 및 모든 커맨드 이름) |
|
|
188
255
|
| `/reap.update` | REAP 업데이트 확인 및 최신 버전으로 업그레이드 |
|
|
189
256
|
| **`/reap.evolve`** | **한 Generation 전체를 처음부터 끝까지 실행 (권장)** |
|
|
257
|
+
| **`/reap.pull <branch>`** | **Fetch + 전체 머지 Generation 실행 (분산 `/reap.evolve`)** |
|
|
258
|
+
| **`/reap.merge <branch>`** | **로컬 브랜치 전체 머지 Generation 실행 (fetch 없음)** |
|
|
259
|
+
| `/reap.push` | REAP 상태 검증 후 현재 브랜치 push |
|
|
260
|
+
| `/reap.merge.start` | 분기 브랜치를 결합하는 머지 Generation 시작 |
|
|
261
|
+
| `/reap.merge.detect` | 브랜치 간 분기 분석 |
|
|
262
|
+
| `/reap.merge.mate` | 소스 머지 전 Genome 충돌 해결 |
|
|
263
|
+
| `/reap.merge.merge` | 해결된 Genome을 기준으로 소스 코드 머지 |
|
|
264
|
+
| `/reap.merge.sync` | Genome-소스 간 일관성 검증 (AI 비교, 사용자 확인) |
|
|
265
|
+
| `/reap.merge.validation` | 기계적 테스트 실행 (bun test, tsc, build) |
|
|
266
|
+
| **`/reap.merge.evolve`** | **전체 머지 라이프사이클 자동 실행** |
|
|
190
267
|
|
|
191
268
|
### SessionStart Hook
|
|
192
269
|
|
|
@@ -202,24 +279,30 @@ Slash command가 `.claude/commands/`에 설치되어 전체 워크플로우를
|
|
|
202
279
|
|
|
203
280
|
### Strict 모드
|
|
204
281
|
|
|
205
|
-
|
|
282
|
+
Strict 모드는 AI 에이전트가 할 수 있는 것을 제어합니다. 두 가지 세분화 옵션을 지원합니다:
|
|
206
283
|
|
|
207
284
|
```yaml
|
|
208
285
|
# .reap/config.yml
|
|
209
|
-
strict: true
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
286
|
+
strict: true # 단축형: edit과 merge 모두 활성화
|
|
287
|
+
|
|
288
|
+
# 또는 세분화 제어:
|
|
289
|
+
strict:
|
|
290
|
+
edit: true # 코드 수정을 REAP lifecycle으로 제한
|
|
291
|
+
merge: false # raw git pull/push/merge 제한
|
|
215
292
|
```
|
|
216
293
|
|
|
294
|
+
**`strict.edit`** — 코드 수정 제어:
|
|
295
|
+
|
|
217
296
|
| 상황 | 동작 |
|
|
218
297
|
|------|------|
|
|
219
298
|
| 활성 Generation 없음 / 구현 단계 외 | 코드 수정 완전 차단 |
|
|
220
299
|
| Implementation 단계 | `02-planning.md` 범위 내에서만 수정 허용 |
|
|
221
300
|
| Escape hatch | 사용자가 "override", "bypass strict" 등 명시적 요청 시 허용 |
|
|
222
301
|
|
|
302
|
+
**`strict.merge`** — Git 명령 제어: 활성화 시 `git pull`/`push`/`merge` 직접 사용이 제한됩니다. 에이전트가 `/reap.pull`, `/reap.push`, `/reap.merge` 사용을 안내합니다.
|
|
303
|
+
|
|
304
|
+
두 옵션 모두 기본 비활성화. `strict: true`는 둘 다 활성화합니다.
|
|
305
|
+
|
|
223
306
|
Strict 모드는 기본적으로 비활성화되어 있습니다 (`strict: false`).
|
|
224
307
|
|
|
225
308
|
### REAP Hooks
|
|
@@ -253,6 +336,9 @@ order: 10 # 실행 순서 (낮을수록 먼저 실행)
|
|
|
253
336
|
| `onStageTransition` | `/reap.next`로 다음 stage 전진 후 |
|
|
254
337
|
| `onGenerationComplete` | `/reap.next`로 완료된 Generation 아카이빙 후 |
|
|
255
338
|
| `onRegression` | `/reap.back`으로 이전 stage 복귀 후 |
|
|
339
|
+
| `onMergeStart` | `/reap.merge.start`로 머지 Generation 생성 후 |
|
|
340
|
+
| `onGenomeResolved` | 머지 중 Genome 충돌 해결 완료 후 |
|
|
341
|
+
| `onMergeComplete` | 머지 Generation 아카이빙 후 |
|
|
256
342
|
|
|
257
343
|
Hook은 AI 에이전트가 프로젝트 루트 디렉토리에서 실행합니다. `onGenerationComplete` Hook에는 자동 버전 범프 판단이 포함되어 있습니다 — patch 수준은 자동으로 적용되고, minor/major 범프는 사용자 확인을 거칩니다.
|
|
258
344
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
|
|
2
|
+
|
|
1
3
|
<p align="center">
|
|
2
4
|
<img src="media/logo.png" alt="REAP" width="80" height="80" />
|
|
3
5
|
</p>
|
|
@@ -9,8 +11,6 @@
|
|
|
9
11
|
A development pipeline where AI and humans evolve software across generations.
|
|
10
12
|
</p>
|
|
11
13
|
|
|
12
|
-
> [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
|
|
13
|
-
|
|
14
14
|
<table align="center">
|
|
15
15
|
<tr>
|
|
16
16
|
<td align="center"><strong>Genome</strong><br><sub>Design & Knowledge</sub></td>
|
|
@@ -23,6 +23,22 @@
|
|
|
23
23
|
|
|
24
24
|
REAP defines an application's genetic information (Genome), sets objectives for each generation to implement, and feeds back any Genome defects discovered along the way into subsequent stages. As generations accumulate, the Genome evolves and the Source Code (Civilization) grows.
|
|
25
25
|
|
|
26
|
+
## Table of Contents
|
|
27
|
+
|
|
28
|
+
- [Why REAP?](#why-reap)
|
|
29
|
+
- [Installation](#installation)
|
|
30
|
+
- [Quick Start](#quick-start)
|
|
31
|
+
- [Life Cycle](#life-cycle)
|
|
32
|
+
- [Core Concepts](#core-concepts)
|
|
33
|
+
- [Distributed Workflow for Parallel Development](#distributed-workflow-for-parallel-development)
|
|
34
|
+
- [CLI Commands](#cli-commands)
|
|
35
|
+
- [Agent Integration](#agent-integration)
|
|
36
|
+
- [Project Structure](#project-structure-after-reap-init)
|
|
37
|
+
- [Lineage Compression](#lineage-compression)
|
|
38
|
+
- [Evolution Flow](#evolution-flow)
|
|
39
|
+
- [Presets](#presets)
|
|
40
|
+
- [Entry Modes](#entry-modes)
|
|
41
|
+
|
|
26
42
|
## Why REAP?
|
|
27
43
|
|
|
28
44
|
Have you ever run into these problems when developing with AI agents?
|
|
@@ -31,6 +47,7 @@ Have you ever run into these problems when developing with AI agents?
|
|
|
31
47
|
- **Scattered development** — Code gets modified here and there with no clear goal
|
|
32
48
|
- **Design–code drift** — Documentation and code diverge over time
|
|
33
49
|
- **Forgotten lessons** — Hard-won insights from past struggles never carry forward
|
|
50
|
+
- **Collaboration chaos** — Multiple developers or agents working in parallel leads to conflicting changes and merge nightmares
|
|
34
51
|
|
|
35
52
|
REAP solves these with a **generation-based evolution model**:
|
|
36
53
|
|
|
@@ -39,6 +56,7 @@ REAP solves these with a **generation-based evolution model**:
|
|
|
39
56
|
- Design issues discovered during implementation are logged in the backlog and addressed at Completion
|
|
40
57
|
- Lessons drawn from retrospectives (Completion) accumulate in the Genome
|
|
41
58
|
- Repeated manual tasks are automatically detected across generations, with user-confirmed hook creation
|
|
59
|
+
- Parallel work across branches is reconciled through a genome-first merge workflow — design conflicts are resolved before code conflicts
|
|
42
60
|
|
|
43
61
|
## Installation
|
|
44
62
|
|
|
@@ -93,7 +111,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
|
|
|
93
111
|
|
|
94
112
|
| Stage | What happens | Artifact |
|
|
95
113
|
|-------|-------------|----------|
|
|
96
|
-
| **Objective** | Define goal,
|
|
114
|
+
| **Objective** | Define goal through structured brainstorming: clarifying questions, 2-3 approach alternatives, sectional design approval, optional visual companion, and spec review loop | `01-objective.md` |
|
|
97
115
|
| **Planning** | Break down tasks, choose approach, map dependencies | `02-planning.md` |
|
|
98
116
|
| **Implementation** | Build with AI + human collaboration | `03-implementation.md` |
|
|
99
117
|
| **Validation** | Run tests, verify completion criteria | `04-validation.md` |
|
|
@@ -145,6 +163,55 @@ At archiving time (`/reap.next` from Completion), `consumed` items move to linea
|
|
|
145
163
|
└── lineage/ # Archive of completed generations
|
|
146
164
|
```
|
|
147
165
|
|
|
166
|
+
## Distributed Workflow for Parallel Development
|
|
167
|
+
|
|
168
|
+
> **⚠ Early Stage** — The distributed workflow requires further testing. Use with caution in production. We're collecting feedback — [open an issue](https://github.com/c-d-cc/reap/issues).
|
|
169
|
+
|
|
170
|
+
REAP supports a distributed workflow for collaboration environments where multiple developers or AI agents work on the same project in parallel — without a central server. Git is the only transport layer.
|
|
171
|
+
|
|
172
|
+
### How It Works
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Machine A: branch-a — gen-046-a (authentication) → /reap.push
|
|
176
|
+
Machine B: branch-b — gen-046-b (search) → /reap.push
|
|
177
|
+
|
|
178
|
+
Machine A:
|
|
179
|
+
/reap.pull branch-b → Fetch + full merge generation lifecycle
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Each machine works independently on its own branch and generation. When it's time to combine, REAP orchestrates the merge with a **genome-first** strategy ([learn more](https://reap.cc/docs/merge-generation)):
|
|
183
|
+
|
|
184
|
+
1. **Detect** — Identify divergence by scanning the remote branch's genome and lineage via git refs
|
|
185
|
+
2. **Mate** — Resolve genome conflicts first (human decides)
|
|
186
|
+
3. **Merge** — Merge source code guided by the finalized genome (`git merge --no-commit`)
|
|
187
|
+
4. **Sync** — AI compares genome and source for consistency; user confirms any inconsistencies
|
|
188
|
+
5. **Validation** — Run mechanical testing (bun test, tsc, build) — same as normal generation
|
|
189
|
+
6. **Completion** — Commit the merged result and archive
|
|
190
|
+
|
|
191
|
+
### Slash Commands for Distributed Workflow
|
|
192
|
+
|
|
193
|
+
All distributed operations run through your AI agent:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
/reap.pull <branch> # Fetch + run full merge generation (the distributed /reap.evolve)
|
|
197
|
+
/reap.merge <branch> # Run full merge generation for a local branch (no fetch)
|
|
198
|
+
/reap.push # Validate REAP state + push current branch
|
|
199
|
+
/reap.merge.start # Start a merge generation (for step-by-step control)
|
|
200
|
+
/reap.merge.detect # Analyze divergence
|
|
201
|
+
/reap.merge.mate # Resolve genome conflicts
|
|
202
|
+
/reap.merge.merge # Merge source code
|
|
203
|
+
/reap.merge.sync # Verify genome–source consistency
|
|
204
|
+
/reap.merge.validation # Run mechanical testing (bun test, tsc, build)
|
|
205
|
+
/reap.merge.evolve # Run merge lifecycle from current stage
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Key Principles
|
|
209
|
+
|
|
210
|
+
- **Opt-in** — `git pull`/`push` always work normally. REAP commands are additive.
|
|
211
|
+
- **Genome-first** — Genome conflicts are resolved before source merge. Like amending the constitution before updating the laws.
|
|
212
|
+
- **No server** — Everything is local + Git. No external services.
|
|
213
|
+
- **DAG lineage** — Each generation references its parents via a hash-based ID (`gen-046-a3f8c2`), forming a directed acyclic graph that naturally supports parallel work.
|
|
214
|
+
|
|
148
215
|
## CLI Commands
|
|
149
216
|
|
|
150
217
|
| Command | Description |
|
|
@@ -186,6 +253,16 @@ Slash commands are installed in `.claude/commands/` and drive the entire workflo
|
|
|
186
253
|
| `/reap.help` | Contextual AI help with 24+ topics (workflow, genome, backlog, strict, agents, hooks, config, evolve, regression, author, and all command names) |
|
|
187
254
|
| `/reap.update` | Check for REAP updates and upgrade to the latest version |
|
|
188
255
|
| **`/reap.evolve`** | **Run an entire generation from start to finish (recommended)** |
|
|
256
|
+
| **`/reap.pull <branch>`** | **Fetch + run full merge generation (distributed `/reap.evolve`)** |
|
|
257
|
+
| **`/reap.merge <branch>`** | **Run full merge generation for a local branch (no fetch)** |
|
|
258
|
+
| `/reap.push` | Validate REAP state and push current branch |
|
|
259
|
+
| `/reap.merge.start` | Start a merge generation to combine divergent branches |
|
|
260
|
+
| `/reap.merge.detect` | Analyze divergence between branches |
|
|
261
|
+
| `/reap.merge.mate` | Resolve genome conflicts before source merge |
|
|
262
|
+
| `/reap.merge.merge` | Merge source code with resolved genome as guide |
|
|
263
|
+
| `/reap.merge.sync` | Verify genome–source consistency (AI compares, user confirms) |
|
|
264
|
+
| `/reap.merge.validation` | Run mechanical testing (bun test, tsc, build) |
|
|
265
|
+
| **`/reap.merge.evolve`** | **Run the full merge lifecycle automatically** |
|
|
189
266
|
|
|
190
267
|
### SessionStart Hook
|
|
191
268
|
|
|
@@ -201,24 +278,30 @@ This ensures the agent immediately understands the project context even in a bra
|
|
|
201
278
|
|
|
202
279
|
### Strict Mode
|
|
203
280
|
|
|
204
|
-
|
|
281
|
+
Strict mode controls what the AI agent is allowed to do. It supports two granular options:
|
|
205
282
|
|
|
206
283
|
```yaml
|
|
207
284
|
# .reap/config.yml
|
|
208
|
-
strict: true
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
285
|
+
strict: true # shorthand: enables both edit and merge
|
|
286
|
+
|
|
287
|
+
# Or granular control:
|
|
288
|
+
strict:
|
|
289
|
+
edit: true # restrict code changes to REAP lifecycle
|
|
290
|
+
merge: false # restrict raw git pull/push/merge
|
|
214
291
|
```
|
|
215
292
|
|
|
293
|
+
**`strict.edit`** — Code modification control:
|
|
294
|
+
|
|
216
295
|
| Context | Behavior |
|
|
217
296
|
|---------|----------|
|
|
218
297
|
| No active generation / non-implementation stage | Code modifications are fully blocked |
|
|
219
298
|
| Implementation stage | Only modifications within the scope of `02-planning.md` are allowed |
|
|
220
299
|
| Escape hatch | User explicitly requests "override" or "bypass strict" to allow modifications |
|
|
221
300
|
|
|
301
|
+
**`strict.merge`** — Git command control: when enabled, direct `git pull`/`push`/`merge` are restricted. The agent guides users to use `/reap.pull`, `/reap.push`, `/reap.merge` instead.
|
|
302
|
+
|
|
303
|
+
Both are disabled by default. `strict: true` enables both.
|
|
304
|
+
|
|
222
305
|
Strict mode is disabled by default (`strict: false`).
|
|
223
306
|
|
|
224
307
|
### REAP Hooks
|
|
@@ -252,6 +335,9 @@ order: 10 # execution order (lower runs first)
|
|
|
252
335
|
| `onStageTransition` | After `/reap.next` advances to the next stage |
|
|
253
336
|
| `onGenerationComplete` | After `/reap.next` archives a completed generation |
|
|
254
337
|
| `onRegression` | After `/reap.back` returns to a previous stage |
|
|
338
|
+
| `onMergeStart` | After `/reap.merge.start` creates a merge generation |
|
|
339
|
+
| `onGenomeResolved` | After genome conflicts are resolved in a merge |
|
|
340
|
+
| `onMergeComplete` | After a merge generation is archived |
|
|
255
341
|
|
|
256
342
|
Hooks are executed by the AI agent in the project root directory. The `onGenerationComplete` hooks include automatic version bump judgment — patch-level bumps are applied automatically, while minor/major bumps require user confirmation.
|
|
257
343
|
|