@c-d-cc/reap 0.10.3 → 0.12.0

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.
Files changed (47) hide show
  1. package/README.ja.md +46 -4
  2. package/README.ko.md +46 -4
  3. package/README.md +40 -4
  4. package/README.zh-CN.md +46 -4
  5. package/dist/cli.js +5055 -1298
  6. package/dist/templates/artifacts/01-objective.md +1 -0
  7. package/dist/templates/artifacts/02-planning.md +1 -0
  8. package/dist/templates/artifacts/03-implementation.md +1 -0
  9. package/dist/templates/artifacts/04-validation.md +1 -0
  10. package/dist/templates/artifacts/05-completion.md +1 -0
  11. package/dist/templates/artifacts/merge/01-detect.md +1 -0
  12. package/dist/templates/artifacts/merge/02-mate.md +1 -0
  13. package/dist/templates/artifacts/merge/03-merge.md +1 -0
  14. package/dist/templates/artifacts/merge/04-sync.md +1 -0
  15. package/dist/templates/artifacts/merge/05-validation.md +1 -0
  16. package/dist/templates/artifacts/merge/06-completion.md +1 -0
  17. package/dist/templates/commands/reap.abort.md +1 -69
  18. package/dist/templates/commands/reap.back.md +1 -52
  19. package/dist/templates/commands/reap.completion.md +1 -190
  20. package/dist/templates/commands/reap.config.md +5 -0
  21. package/dist/templates/commands/reap.evolve.md +1 -62
  22. package/dist/templates/commands/reap.help.md +1 -90
  23. package/dist/templates/commands/reap.implementation.md +1 -105
  24. package/dist/templates/commands/reap.merge.completion.md +1 -55
  25. package/dist/templates/commands/reap.merge.detect.md +1 -23
  26. package/dist/templates/commands/reap.merge.evolve.md +1 -37
  27. package/dist/templates/commands/reap.merge.mate.md +1 -30
  28. package/dist/templates/commands/reap.merge.md +1 -43
  29. package/dist/templates/commands/reap.merge.merge.md +1 -25
  30. package/dist/templates/commands/reap.merge.start.md +1 -25
  31. package/dist/templates/commands/reap.merge.sync.md +1 -35
  32. package/dist/templates/commands/reap.merge.validation.md +1 -29
  33. package/dist/templates/commands/reap.next.md +1 -32
  34. package/dist/templates/commands/reap.objective.md +1 -259
  35. package/dist/templates/commands/reap.planning.md +1 -104
  36. package/dist/templates/commands/reap.pull.md +1 -49
  37. package/dist/templates/commands/reap.push.md +1 -14
  38. package/dist/templates/commands/reap.report.md +1 -123
  39. package/dist/templates/commands/reap.start.md +1 -48
  40. package/dist/templates/commands/reap.status.md +1 -76
  41. package/dist/templates/commands/reap.sync.environment.md +1 -80
  42. package/dist/templates/commands/reap.sync.genome.md +1 -105
  43. package/dist/templates/commands/reap.sync.md +1 -13
  44. package/dist/templates/commands/reap.update.md +1 -40
  45. package/dist/templates/commands/reap.validation.md +1 -88
  46. package/dist/templates/hooks/reap-guide.md +14 -12
  47. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Objective
2
3
 
3
4
  ## Goal
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Planning
2
3
 
3
4
  ## Summary
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Implementation Log
2
3
 
3
4
  ## Completed Tasks
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Validation Report
2
3
 
3
4
  ## Result: pending
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Completion
2
3
 
3
4
  ## Summary
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Detect
2
3
 
3
4
  ## Parents
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Mate (Genome Mating)
2
3
 
3
4
  ## Conflicts
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Merge (Source Merge)
2
3
 
3
4
  ## Git Merge Result
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Sync (Genome-Source Consistency)
2
3
 
3
4
  ## Genome-Source Comparison
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Validation
2
3
 
3
4
  ## Result: pending
@@ -1,3 +1,4 @@
1
+ # REAP MANAGED — Do not modify directly. Use reap run commands.
1
2
  # Completion
2
3
 
3
4
  ## Summary
@@ -2,72 +2,4 @@
2
2
  description: "REAP Abort — Abort the current generation and return to initial state"
3
3
  ---
4
4
 
5
- # Abort
6
-
7
- Abort the current generation and return to initial state.
8
-
9
- ## Gate (Preconditions)
10
- - Read `.reap/life/current.yml`
11
- - If no active Generation: ERROR — "No active Generation to abort." **STOP**
12
-
13
- ## Steps
14
-
15
- ### 1. Show Current State
16
- - Display: generation id, goal, current stage
17
- - Ask: "이 generation을 abort 하시겠습니까?"
18
- - If no: **STOP**
19
-
20
- ### 2. Abort Reason
21
- - Ask: "abort 사유를 입력해주세요"
22
-
23
- ### 3. Source Code Handling
24
- - Check `git diff --name-only` for uncommitted changes
25
- - If no changes: skip to Step 4
26
- - If changes exist, present the changed files and ask:
27
- - **rollback**: `git checkout .` — 모든 변경 revert
28
- - **stash**: `git stash push -m "reap-abort: {gen-id}"` — stash에 저장
29
- - **hold**: 변경 유지 (working tree에 그대로)
30
-
31
- ### 4. Backlog Save
32
- - Ask: "Goal과 진행 상황을 backlog에 저장할까요? (yes/no)"
33
- - If yes:
34
- - Read `01-objective.md` for goal/spec content
35
- - Read `03-implementation.md` if exists for progress
36
- - Create `.reap/life/backlog/aborted-{gen-id}.md`:
37
- ```markdown
38
- ---
39
- type: task
40
- status: pending
41
- aborted: true
42
- abortedFrom: {gen-id}
43
- abortReason: "{reason}"
44
- stage: {current stage}
45
- sourceAction: rollback|stash|hold
46
- stashRef: "reap-abort: {gen-id}" # only if stash
47
- changedFiles:
48
- - {file1}
49
- - {file2}
50
- ---
51
-
52
- # [Aborted] {goal}
53
-
54
- ## Original Goal
55
- {goal from objective}
56
-
57
- ## Progress
58
- {stage} 단계에서 중단.
59
- {implementation summary if available}
60
-
61
- ## Resume Guide
62
- {if stash: "git stash pop으로 코드 복구"}
63
- {if hold: "코드 변경이 working tree에 유지됨"}
64
- {if rollback: "코드 변경이 revert됨. objective부터 재시작 필요"}
65
- ```
66
-
67
- ### 5. Cleanup
68
- - Delete all artifact files from `.reap/life/` (`01-*.md` through `05-*.md`)
69
- - Clear `current.yml` (write empty content)
70
- - Do NOT record in lineage (incomplete generation)
71
-
72
- ## Completion
73
- - "Generation {gen-id} aborted. {backlog saved / not saved}."
5
+ Run `reap run abort` and follow the stdout instructions exactly.
@@ -2,55 +2,4 @@
2
2
  description: "REAP Back — Return to a previous lifecycle stage"
3
3
  ---
4
4
 
5
- # Return to Previous Stage
6
-
7
- ## Gate (Preconditions)
8
- - Read `.reap/life/current.yml`
9
- - If no active Generation: ERROR — "No active Generation." **STOP**
10
- - If current stage is `objective` (first stage): ERROR — "Already at the first stage. Cannot go back." **STOP**
11
-
12
- ## Steps
13
-
14
- 1. Determine target stage:
15
- - `/reap.back` alone: go to the immediately previous stage
16
- - `/reap.back [stage]`: go directly to the specified stage
17
- - Stage order: objective → planning → implementation → validation → completion
18
- - Only backward transitions are allowed
19
- 2. Ask the human for the reason for regression
20
- 3. Collect regression reason and reference info:
21
- - **reason**: why we are going back
22
- - **refs**: related files/locations (artifact sections, source code locations)
23
- 4. Modify `current.yml`:
24
- - Change `stage` to the target stage
25
- - Add a regression entry to `timeline`:
26
- ```yaml
27
- - stage: [target stage]
28
- at: [current ISO 8601]
29
- from: [original stage]
30
- reason: [regression reason]
31
- refs:
32
- - [ref 1]
33
- - [ref 2]
34
- ```
35
- 5. Artifact handling:
36
- - **Before the target stage**: preserve
37
- - **Target stage**: overwrite on re-entry (implementation only: append)
38
- - **After the target stage**: preserve, overwrite on re-entry
39
- 6. Record the regression reason at the top of the target stage artifact as a `## Regression` section:
40
- ```markdown
41
- ## Regression
42
- - **From**: [original stage]
43
- - **Reason**: [regression reason]
44
- - **Refs**: [reference list]
45
- - **Affected**: [affected subsequent artifacts]
46
- ```
47
-
48
- ### Hook Execution (Regression)
49
- 7. Execute hooks for event `onLifeRegretted` following the Hook System protocol:
50
- - Scan `.reap/hooks/` for `onLifeRegretted.*` files
51
- - Sort by frontmatter `order`, then alphabetically
52
- - Evaluate `condition`, execute `.md` (AI prompt) or `.sh` (shell script)
53
- - All hooks run BEFORE any commit (hook outputs included in the same commit)
54
-
55
- ## Completion
56
- - "Returned to [stage] stage. Proceed with `/reap.[stage]`."
5
+ Run `reap run back` and follow the stdout instructions exactly.
@@ -2,193 +2,4 @@
2
2
  description: "REAP Completion — Retrospect, evolve the Genome, archive, and finalize the Generation"
3
3
  ---
4
4
 
5
- # Completion
6
-
7
- <HARD-GATE>
8
- Do NOT apply Genome changes without human confirmation — UNLESS called from `/reap.evolve` (Autonomous Override active).
9
- Do NOT finalize Genome changes without running Validation Commands.
10
- </HARD-GATE>
11
-
12
- ## Gate (Preconditions)
13
- - Read `.reap/life/current.yml` and verify that stage is `completion`
14
- - Verify that `.reap/life/04-validation.md` exists
15
- - If not met: ERROR — state the reason and **STOP**
16
-
17
- ## Context (Generation Info)
18
- - Read `.reap/life/current.yml` for the current generation info (id, goal, genomeVersion)
19
-
20
- ## Steps
21
-
22
- ### Phase 0: Summary
23
-
24
- 1. Fill the `## Summary` section of `05-completion.md` using data from `current.yml` and `04-validation.md`:
25
- - **Goal**: from `current.yml` goal
26
- - **Period**: from `current.yml` startedAt ~ completedAt
27
- - **Genome Version**: from `current.yml` genomeVersion (v[N] → v[N+1])
28
- - **Result**: from `04-validation.md` result (pass/partial/fail)
29
- - **Key Changes**: brief one-line summary of what was delivered
30
-
31
- ### Phase 1: Retrospective
32
-
33
- 2. Read all `type: genome-change` and `type: environment-change` items from `.reap/life/backlog/`
34
- 3. Read the deferred task list from `.reap/life/03-implementation.md`
35
- 4. Compile lessons learned from this generation
36
- - **Limit**: Maximum 5 lessons. Keep only the most impactful ones.
37
- 5. Compile genome changes to apply (which genome file to modify and how)
38
-
39
- ### Phase 2: Garbage Collection (Codebase Health)
40
-
41
- 6. Referencing the Enforced Rules in `.reap/genome/conventions.md`, check codebase consistency:
42
- - Check whether new convention violations have been introduced
43
- - Identify technical debt incurred during implementation
44
- 7. For each piece of technical debt found, add it to `.reap/life/backlog/`:
45
- ```markdown
46
- ---
47
- type: task
48
- status: pending
49
- ---
50
- # [Title]
51
- [Description]
52
- ```
53
-
54
- ### Phase 3: Backlog Cleanup
55
-
56
- 8. Add deferred tasks to `.reap/life/backlog/` as `type: task`
57
- 9. Also add other next-generation goal candidates to the backlog
58
- 10. Finalize the retrospective with the human
59
-
60
- ### Phase 4: Genome Application
61
-
62
- 11. Read `type: genome-change` and `type: environment-change` items from `.reap/life/backlog/`
63
- 12. Apply genome-change items to the corresponding files in `.reap/genome/`:
64
- - **Map principle**: Each genome file should be **~100 lines or less**
65
- - If exceeding 100 lines, extract into files under `domain/`
66
- - **When writing domain/ files, follow the guide in `~/.reap/templates/domain-guide.md`**
67
- 13. Apply environment-change items to the corresponding files in `.reap/environment/`
68
- 14. **Verify**: Run the Validation Commands from constraints.md to confirm genome changes do not conflict with existing code
69
- 15. **Human confirmation**:
70
- - **If called from `/reap.evolve`** (Autonomous Override active): Apply genome changes automatically after Validation Commands pass. Do NOT pause for human confirmation.
71
- - **If called standalone**: Show the modified genome/environment content to the human and get approval. Do NOT finalize changes until the human approves.
72
- 16. For each applied `type: genome-change` and `type: environment-change` backlog item, update its frontmatter to `status: consumed` and add `consumedBy: gen-XXX-{hash}`
73
-
74
- ### Phase 5: Hook Suggestion
75
-
76
- 17. Read the last 3 completed generations from `.reap/lineage/` (sorted by gen number, most recent first)
77
- - For each: read `03-implementation.md` (Implementation Notes) and `05-completion.md` (Retrospective)
78
- - Identify **manual tasks that were repeated across 2+ generations**
79
- - Examples: docs update, lint fix, dependency sync, test data setup, specific file regeneration
80
- 18. If a repeated pattern is found, engage the human with a step-by-step confirmation:
81
- a. **Describe the pattern**: "최근 N개 generation에서 '[작업 설명]'이 반복적으로 수행되었습니다."
82
- b. **Ask if it should be a hook**: "이 작업을 hook으로 자동화할까요? (yes/no)"
83
- c. If yes, ask **event**: "어떤 이벤트에서 실행할까요?"
84
- - Normal lifecycle events (8개):
85
- - `onLifeStarted` — generation 시작 시
86
- - `onLifeObjected` — objective 완료 시
87
- - `onLifePlanned` — planning 완료 시
88
- - `onLifeImplemented` — implementation 완료 시
89
- - `onLifeValidated` — validation 완료 시
90
- - `onLifeCompleted` — generation 완료 시 (archiving 전, 커밋 전)
91
- - `onLifeTransited` — stage 전환 시
92
- - `onLifeRegretted` — stage 회귀 시
93
- d. Ask **condition**: "실행 조건은 무엇인가요?"
94
- - `always` — 항상
95
- - `has-code-changes` — src/ 변경이 있을 때
96
- - `version-bumped` — version bump가 있을 때
97
- - Custom — 유저가 직접 기술
98
- e. Ask **hook name**: "hook 이름을 지어주세요 (예: lint-fix, docs-sync)"
99
- f. **Preview**: 생성될 hook 파일 내용을 보여주고 확인:
100
- ```
101
- 파일: .reap/hooks/{event}.{name}.md
102
- ---
103
- condition: {condition}
104
- order: 50
105
- ---
106
- {작업 내용}
107
- ```
108
- g. 유저 확인 후 `.reap/hooks/{event}.{name}.md` 생성
109
- 19. 반복 패턴이 없으면 skip — "반복 패턴이 감지되지 않았습니다."
110
- 20. **Limit**: 한 번에 최대 2개까지만 제안 (과부하 방지)
111
-
112
- ### Phase 6: Lineage Compression
113
-
114
- 21. Check if lineage compression is needed:
115
- - Count total lines in `.reap/lineage/` and number of generations
116
- - **Level 1 trigger**: total lines > 5,000 AND generations >= 5
117
- - **Level 2 trigger**: Level 1 compressed `.md` files > 100
118
- 22. If Level 1 triggered:
119
- - Compress oldest uncompressed generation directories into single `.md` files
120
- - Protect: recent 3 generations + DAG leaf nodes
121
- - Preserve DAG metadata in frontmatter (id, parents, genomeHash)
122
- 23. If Level 2 triggered:
123
- - Run `git fetch --all` to update remote refs
124
- - Scan all branches (local + remote) for fork points
125
- - Compress eligible Level 1 files into single `epoch.md` (append if exists)
126
- - Protect: recent 9 Level 1 files + all generations at/after fork points
127
- - epoch.md frontmatter contains `generations` array with hash chain (id, parents, genomeHash)
128
- 24. Report compression results: "Compressed N generations (Level 1: X, Level 2: Y)"
129
- - If no compression needed: skip silently
130
-
131
- ### Phase 7: Hook Execution + Archiving + Commit
132
-
133
- **This phase replaces what `reap.next` previously did when advancing from completion.**
134
-
135
- 25. **Hook Execution** (before archiving, before commit):
136
- Execute hooks for event `onLifeCompleted` following the Hook System protocol:
137
- - Scan `.reap/hooks/` for `onLifeCompleted.*` files
138
- - Sort by frontmatter `order`, then alphabetically
139
- - Evaluate `condition`, execute `.md` (AI prompt) or `.sh` (shell script)
140
- - All hook outputs are included in the same generation commit
141
-
142
- 26. **Archiving**:
143
- - Add the current timestamp to `completedAt` in `current.yml`
144
- - Create the lineage directory: `.reap/lineage/[gen-id]-[goal-slug]/`
145
- - Goal slug: lowercase, non-alphanumeric/hangul replaced with `-`, max 30 chars
146
- - **Write `meta.yml`** in the lineage directory with DAG metadata:
147
- ```yaml
148
- id: [gen-id]
149
- type: normal
150
- parents: [parent generation IDs from current.yml]
151
- goal: [goal from current.yml]
152
- genomeHash: [genomeHash from current.yml, or compute from .reap/genome/]
153
- startedAt: [startedAt from current.yml]
154
- completedAt: [current ISO 8601]
155
- ```
156
- - Move artifact files (`01-*.md` through `05-*.md`) from `.reap/life/` to the lineage directory
157
- - Process backlog files from `.reap/life/backlog/`:
158
- - Create `.reap/lineage/[gen-id]-[goal-slug]/backlog/` directory
159
- - Files with `status: consumed` → move to `.reap/lineage/[gen-id]-[goal-slug]/backlog/`
160
- - Files with `status: pending` or no status field → copy to `.reap/lineage/[gen-id]-[goal-slug]/backlog/` for record, then carry over to new `.reap/life/backlog/`
161
- - Clear `current.yml` (write empty content)
162
- - Recreate `.reap/life/backlog/` directory (with carried-over pending items already in place)
163
-
164
- 27. **Commit all changes** (code + `.reap/` artifacts together):
165
- - **Submodule check**: If any git submodule has uncommitted changes (e.g., `tests/`), commit and push inside the submodule first, then stage the updated submodule pointer in the parent repo
166
- - Stage all changed files: code changes from this generation + `.reap/` directory + submodule pointers
167
- - Commit message format: `feat(gen-NNN): [generation goal summary]`
168
- - Use `feat` for feature generations, `fix` for bugfix generations, `chore` for maintenance
169
- - Include both code and REAP artifacts in the same commit
170
- - If there are no code changes (REAP-only generation), use `chore(reap): [goal summary]`
171
-
172
- ## Self-Verification
173
- Before saving the artifact, verify:
174
- - [ ] Are lessons concrete and applicable to the next generation? (No vague "do better next time")
175
- - [ ] Have genome changes been confirmed by the human?
176
- - [ ] Do Validation Commands still pass after the changes?
177
- - [ ] Have deferred tasks been added to the backlog?
178
-
179
- ❌ Bad lesson: "We should write more tests"
180
- ✅ Good lesson: "SSE streaming responses are difficult to unit test, so prioritize integration tests"
181
-
182
- ## Artifact Generation (Progressive Recording)
183
- - **Language**: Write all artifact content in the user's configured language (see REAP Guide § Language).
184
- - **Immediately upon entering this stage**: Read `~/.reap/templates/05-completion.md` and create `.reap/life/05-completion.md` with empty sections ready to fill
185
- - **Update incrementally as each phase completes**:
186
- - After Phase 1 (Retrospective) → fill in Lessons Learned, Genome Change Proposals
187
- - After Phase 2 (Garbage Collection) → update with any tech debt findings
188
- - After Phase 3 (Backlog Cleanup) → fill in Deferred Task Handoff, Next Generation Backlog
189
- - After Phase 4 (Genome Application) → fill in Genome Changelog sections
190
- - The artifact should reflect the current state of completion work at all times
191
-
192
- ## Completion
193
- - **If called from `/reap.evolve`** (Autonomous Override active): Execute Phase 7 (Hook + Archiving + Commit) automatically. Report: "Generation [id] complete and archived."
194
- - **If called standalone**: Execute Phase 7 (Hook + Archiving + Commit). Report: "Generation [id] complete and archived. Run `/reap.start` to begin a new generation."
5
+ Run `reap run completion` and follow the stdout instructions exactly.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: "REAP Config — Show current project configuration"
3
+ ---
4
+
5
+ Run `reap run config` and follow the stdout instructions exactly.
@@ -2,65 +2,4 @@
2
2
  description: "REAP Evolve — Run the full lifecycle for a Generation"
3
3
  ---
4
4
 
5
- # Evolve (Full Lifecycle)
6
-
7
- Run the entire Generation lifecycle from start to finish, interactively with the human.
8
-
9
- <HARD-GATE>
10
- NEVER modify `current.yml` directly to change the stage. ALWAYS use `/reap.next` to advance and `/reap.back` to regress.
11
- Direct modification skips artifact creation and breaks the lifecycle. This is non-negotiable.
12
-
13
- Specifically PROHIBITED:
14
- - Running `node -e` or any script that writes to `current.yml`
15
- - Using YAML.stringify() to update the stage field
16
- - Any method other than invoking `/reap.next` or `/reap.back` slash commands
17
-
18
- The ONLY legitimate way to change the stage is through `/reap.next` (forward) or `/reap.back` (regression).
19
- </HARD-GATE>
20
-
21
- ## Gate (Preconditions)
22
- - Read `.reap/life/current.yml`
23
- - If no active Generation exists: run `/reap.start` first to create one
24
- - If an active Generation exists: resume from the current stage
25
-
26
- ## Autonomous Override
27
- When `/reap.evolve` calls each stage command, the following overrides apply:
28
- - **Skip routine human confirmations**: Do NOT pause to show artifacts and ask for approval at the end of each stage. Proceed autonomously.
29
- - **Skip environment/genome interactive setup questions**: Use existing data, fill in what you can, skip what's empty.
30
- - **STOP only when genuinely blocked**: ambiguous goal with multiple valid interpretations, uncertain technical decision with significant trade-offs, conflicts in the genome, or unexpected errors.
31
- - **Escalation sections still apply**: If a stage's Escalation rules trigger, STOP and ask.
32
- - This override does NOT apply when stages are invoked standalone (e.g., user runs `/reap.objective` directly).
33
-
34
- ## Hook Auto-Execution
35
- Each stage command automatically executes its own hook at completion:
36
- - `/reap.objective` → `onLifeObjected`
37
- - `/reap.planning` → `onLifePlanned`
38
- - `/reap.implementation` → `onLifeImplemented`
39
- - `/reap.validation` → `onLifeValidated`
40
- - `/reap.completion` → `onLifeCompleted` (before archiving and commit)
41
-
42
- `/reap.next` only handles stage transitions — it does NOT execute hooks or archiving.
43
- `/reap.completion` handles archiving and the final commit.
44
-
45
- ## Lifecycle Loop
46
-
47
- Execute the following loop until the generation is complete:
48
-
49
- 1. Read `current.yml` to determine the current stage
50
- 2. Execute the corresponding stage command:
51
- - `objective` → `/reap.objective`
52
- - `planning` → `/reap.planning`
53
- - `implementation` → `/reap.implementation`
54
- - `validation` → `/reap.validation`
55
- - `completion` → `/reap.completion`
56
- 3. When the stage command completes (hooks already executed by the stage command):
57
- - If the current stage is `completion`: `/reap.completion` handles archiving and commit internally. The loop ends.
58
- - Otherwise: run `/reap.next` to advance, then return to step 1.
59
-
60
- ## Handling Issues
61
- - If validation fails: `/reap.back` to return to implementation (or earlier), then resume the loop
62
- - If the human wants to pause: stop the loop, the generation state is preserved in `current.yml`
63
- - If the human wants to skip a stage: advance with `/reap.next` without running the stage command (note: hooks for skipped stages will NOT run)
64
-
65
- ## Completion
66
- - "Generation [id] completed. All artifacts archived to lineage."
5
+ Run `reap run evolve` and follow the stdout instructions exactly.
@@ -2,93 +2,4 @@
2
2
  description: "REAP Help — Contextual help based on current state"
3
3
  ---
4
4
 
5
- # Help
6
-
7
- **ARGUMENTS**: $ARGUMENTS
8
-
9
- ## File Access Rules
10
- - ONLY read `.reap/life/current.yml` and `.reap/config.yml`. No other files for basic help.
11
- - For topic help: also read `reap.{name}.md` from the same directory as this file.
12
- - Do NOT access global node_modules. Do NOT guess file paths.
13
-
14
- ## If ARGUMENTS is provided → skip to "Topic Help" section below.
15
-
16
- ## Basic Help (no arguments)
17
-
18
- Read `.reap/life/current.yml` and `.reap/config.yml`, then output EXACTLY this format with values filled in. Use markdown formatting. Do NOT add extra explanation.
19
-
20
- ---
21
-
22
- **REAP** — Recursive Evolutionary Autonomous Pipeline
23
-
24
- AI와 사람이 협업하여 소프트웨어를 세대(Generation) 단위로 진화시키는 개발 파이프라인입니다.
25
- 각 세대는 5단계 lifecycle을 거칩니다:
26
-
27
- `Objective` → `Planning` → `Implementation` → `Validation` → `Completion`
28
-
29
- Genome(`.reap/genome/`)에 프로젝트의 설계 원칙과 규칙을 기록하고, 세대를 거듭하며 점진적으로 진화합니다.
30
-
31
- ---
32
-
33
- [If active generation exists, show:]
34
- > 🔄 **{id}** — {goal}
35
- > Stage: `{stage}` → 다음: `/reap.{stage}` 또는 `/reap.next`
36
-
37
- [If no active generation, show:]
38
- > No active Generation → `/reap.start` 또는 `/reap.evolve`
39
-
40
- ---
41
-
42
- ### 커맨드
43
-
44
- | Command | Description |
45
- |---------|-------------|
46
- | `/reap.start` | 새 Generation을 시작하고 goal을 설정 |
47
- | `/reap.evolve` | ⚡ 전체 lifecycle을 자율적으로 실행 (사람 개입 최소화) |
48
- | `/reap.objective` | 이번 Generation의 목표, 요구사항, 완료 기준을 정의 |
49
- | `/reap.planning` | 태스크를 분해하고 구현 계획을 수립 |
50
- | `/reap.implementation` | 계획에 따라 코드를 구현하고 진행 상황을 기록 |
51
- | `/reap.validation` | 테스트 실행, 완료 기준 충족 여부를 검증 |
52
- | `/reap.completion` | 회고, Genome 변경 반영, Generation 마무리 |
53
- | `/reap.next` | 다음 stage로 전진 (completion → archiving + commit) |
54
- | `/reap.back` | 이전 stage로 회귀 (regression 사유 기록) |
55
- | `/reap.status` | 프로젝트 상태, Generation 진행도, backlog, Genome 건강도 표시 |
56
- | `/reap.sync` | 현재 소스코드와 Genome 간 차이를 분석하고 동기화 |
57
- | `/reap.update` | REAP 최신 버전 확인 및 업그레이드 |
58
- | `/reap.help` | 도움말. `/reap.help {topic}`으로 주제별 상세 설명 |
59
- | | **Collaboration** |
60
- | `/reap.pull {branch}` | fetch + divergence 감지 + merge generation 자동 실행 |
61
- | `/reap.push` | REAP 상태 검증 + git push |
62
- | `/reap.merge {branch}` | merge generation 전체 lifecycle 실행 |
63
- | `/reap.merge.start` | merge generation 생성 + detect |
64
- | `/reap.merge.evolve` | merge 6단계 자율 실행 |
65
-
66
- 💡 `/reap.help {topic}` — workflow, genome, backlog, strict, agents, hooks, config, evolve, regression, merge, pull, push, author ...
67
-
68
- **Config**: Strict: {on/off} · Auto-Update: {on/off} · Language: {value}
69
-
70
- ---
71
-
72
- ## Topic Help
73
-
74
- If ARGUMENTS contains a topic, look up from the list below. **If NOT in the list, respond: "Unknown topic: '{topic}'. `/reap.help`로 available topics를 확인하세요."**
75
-
76
- For command-name topics: read `reap.{name}.md` from the same directory as this file, then explain.
77
-
78
- #### Topics
79
-
80
- - **workflow** / **lifecycle** — 5-stage lifecycle: objective → planning → implementation → validation → completion. Gate → Steps → Artifact. `/reap.next`로 전진, `/reap.back`으로 회귀.
81
- - **genome** — `.reap/genome/`: principles.md, conventions.md, constraints.md, domain/*.md. 불변 원칙: 현재 세대에서 직접 수정 금지 → backlog → completion에서 반영.
82
- - **backlog** — `.reap/life/backlog/`. genome-change, environment-change, task. status: pending/consumed. consumed → lineage, pending → 이월.
83
- - **strict** — `strict: true`: no generation = 코드 수정 차단, non-implementation = 차단, implementation = plan scope만. Escape: "override"/"bypass strict".
84
- - **agents** — AgentAdapter 추상화. auto-detect (Claude Code, OpenCode). config.yml `agents` 오버라이드.
85
- - **hooks** — config.yml: onLifeStarted, onLifeTransited, onLifeCompleted, onLifeRegretted. command/prompt 타입.
86
- - **config** — `.reap/config.yml`: version, project, entryMode, strict, language, agents, autoUpdate, hooks.
87
- - **evolve** — `/reap.evolve`: 전체 lifecycle 자율 실행. 사람 확인 없이 objective~completion 순차 진행.
88
- - **regression** — `/reap.back`: 이전 stage 회귀. timeline + artifact에 Regression 섹션 기록.
89
- - **minor-fix** — 5분 이내, 설계 변경 없는 수정. stage 전환 없이 현재 artifact에 기록.
90
- - **compression** — 10,000줄 + 5세대 이상 시 lineage 자동 압축. L1(40줄), L2(60줄).
91
- - **merge** / **collaboration** — 분산 협업: genome-first merge 6단계 (detect→mate→merge→sync→validation→completion). `/reap.pull`로 fetch+merge, `/reap.push`로 검증+push. 상세: `domain/collaboration.md`, `domain/merge-lifecycle.md`.
92
- - **author** — HyeonIL Choi. Email: hichoi@c-d.cc / Homepage: https://c-d.cc / LinkedIn: https://www.linkedin.com/in/hichoi-dev / GitHub: https://github.com/casamia918
93
- - **start** / **objective** / **planning** / **implementation** / **validation** / **completion** / **next** / **back** / **sync** / **status** / **update** / **help** — Read `reap.{name}.md` from same directory, explain.
94
- - **pull** / **push** / **merge.start** / **merge.detect** / **merge.mate** / **merge.merge** / **merge.sync** / **merge.validation** / **merge.completion** / **merge.evolve** — Read `reap.{name}.md` from same directory, explain.
5
+ Run `reap run help` and follow the stdout instructions exactly.