@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
@@ -2,79 +2,4 @@
2
2
  description: "REAP Status — Show current generation state and project health"
3
3
  ---
4
4
 
5
- # Status
6
-
7
- Display a comprehensive overview of the current REAP project state.
8
-
9
- ## IMPORTANT: File Access Rules
10
- - ONLY read files explicitly listed in the steps below. Do NOT guess or infer file paths.
11
- - If a file read fails or the file does not exist, skip it silently and continue.
12
- - Do NOT attempt to read files like `reaprc.json`, `.reaprc`, or any file not specified in this command.
13
- - The REAP project structure uses ONLY: `.reap/config.yml`, `.reap/life/current.yml`, `.reap/life/backlog/`, `.reap/life/0X-*.md`, `.reap/genome/`, `.reap/lineage/`
14
-
15
- ## Steps
16
-
17
- ### 1. Project Info (MUST execute all of these)
18
- - Read `.reap/config.yml` for project name, entryMode, strict, autoUpdate, language
19
- - Count completed generations in `.reap/lineage/`
20
- - **REQUIRED**: Run the shell command `reap --version` to get the installed version. You MUST actually execute this command, do not skip it.
21
- - Show "REAP: v{installed}" — do NOT run `npm view` here (slow network call). Users can run `/reap.update` to check for updates.
22
-
23
- ### 2. Current Generation
24
- - Read `.reap/life/current.yml`
25
- - If no active generation: report "No active Generation" and skip to Step 5
26
- - Display: Generation ID, goal, current stage, genomeVersion, startedAt
27
-
28
- ### 3. Stage Progress
29
- - Read the current stage's artifact file (`.reap/life/0X-*.md`)
30
- - Summarize what has been done so far in this stage (completed tasks, decisions made, etc.)
31
- - If the artifact doesn't exist yet, report "Stage not started"
32
-
33
- ### 4. Timeline & Notable Events
34
- - Display the full timeline from `current.yml`:
35
- - Stage transitions with timestamps
36
- - Regressions (from, reason, refs)
37
- - Flag notable events:
38
- - Any regressions in this generation
39
- - Deferred tasks (from `03-implementation.md` if exists)
40
- - Genome-change backlog items pending
41
-
42
- ### 5. Backlog Summary
43
- - Read all files in `.reap/life/backlog/`
44
- - Count by type: `genome-change`, `environment-change`, `task`
45
- - List titles briefly
46
-
47
- ### 6. Genome Health
48
- - Quick check of `.reap/genome/` files:
49
- - Any files that are still placeholder-only?
50
- - Any files exceeding their line limit? (default: ~100 lines. For source-map.md, read the file's own header to find its adaptive line limit.)
51
- - Is `domain/` empty (no rule files)?
52
-
53
- ## Output Format
54
- Present as a structured summary the human can quickly scan:
55
-
56
- ```
57
- 📊 REAP Status
58
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
59
- REAP: v[installed] (run `/reap.update` to check for updates)
60
- Project: [name] ([entryMode])
61
- Strict: [on/off] Auto-Update: [on/off] Language: [lang]
62
- Genome Version: v[N]
63
- Completed Generations: [count]
64
-
65
- 🔄 Active Generation: [id]
66
- Goal: [goal]
67
- Stage: [stage]
68
- Started: [date]
69
-
70
- 📋 Stage Progress:
71
- [summary of current artifact]
72
-
73
- 📅 Timeline:
74
- [stage transitions]
75
-
76
- 📦 Backlog: [N] items
77
- genome-change: [n] environment-change: [n] task: [n]
78
-
79
- 🧬 Genome Health: [status]
80
- ```
5
+ Run `reap status` and present the output to the human.
@@ -2,83 +2,4 @@
2
2
  description: "REAP Sync Environment — Discover and document external environment dependencies"
3
3
  ---
4
4
 
5
- # Sync Environment
6
-
7
- Discover external systems, APIs, infrastructure, and constraints that affect this project. Populate the `.reap/environment/` 3-layer structure.
8
-
9
- ## Gate (Preconditions)
10
- - Read `.reap/life/current.yml`
11
- - If active Generation exists: switch to **Backlog Mode** (record as `type: environment-change`)
12
- - If no active Generation: proceed with **Sync Mode** (modify environment directly after human confirmation)
13
-
14
- ## Environment 3-Layer Structure
15
-
16
- ```
17
- .reap/environment/
18
- ├── summary.md # Session context (~100 lines max)
19
- ├── docs/ # Main reference docs (agent reads these)
20
- └── resources/ # Raw materials (user-managed)
21
- ├── *.pdf, *.md # Original documents
22
- └── links.md # External URLs + summaries
23
- ```
24
-
25
- - **summary.md**: Auto-generated overview of all docs/. Loaded into session context.
26
- - **docs/**: One file per environment topic. ~100 lines each. AI + human maintained.
27
- - **resources/**: User-provided originals. No line limit. AI reads when deeper detail needed.
28
-
29
- ## Steps
30
-
31
- ### 1. Source Code Scan
32
- Detect hints of external dependencies from:
33
- - `package.json` / `requirements.txt` / `go.mod` — SDK/client libraries (e.g., `discord.js`, `@aws-sdk/*`, `stripe`)
34
- - Config files — `.env`, `.env.example`, `wrangler.toml`, `docker-compose.yml`, `vercel.json`
35
- - API client code — HTTP clients, webhook handlers, OAuth configs
36
- - Infrastructure — Dockerfile, CI/CD configs, deployment scripts
37
-
38
- Present findings:
39
- ```
40
- 🔍 Detected external dependencies:
41
- - discord.js → Discord Bot API
42
- - @supabase/supabase-js → Supabase (DB + Auth)
43
- - wrangler.toml → Cloudflare Workers
44
- ```
45
-
46
- ### 2. User Interview
47
- Ask the user to confirm and expand. Goal: **capture ALL external systems** that affect this project.
48
-
49
- Questions (one at a time, skip if already covered):
50
- 1. "감지된 외부 서비스들이 맞나요? 추가/수정할 것이 있나요?"
51
- 2. "그 외에 연동되는 외부 서비스, API, 시스템이 있나요?"
52
- 3. "배포/인프라 환경을 알려주세요 (호스팅, CI/CD, 도메인 등)"
53
- 4. "따라야 하는 조직 규칙이나 외부 제약이 있나요? (보안 정책, 규제 등)"
54
- 5. "참고해야 할 외부 문서나 링크가 있나요? (API docs, 스펙 등)"
55
-
56
- For each confirmed item:
57
- - Ask: "관련 문서/링크가 있으면 알려주세요 (없으면 skip)"
58
- - If provided: save to `resources/` (file or `links.md` entry)
59
-
60
- ### 3. Generate docs/
61
- For each confirmed environment topic, create a file in `docs/`:
62
- - File name: `{topic-slug}.md` (e.g., `discord-api.md`, `infrastructure.md`)
63
- - Content: structured markdown with key info the agent needs during implementation
64
- - Sections: Overview, Key Constraints, API/Config Details, References (→ resources/)
65
- - ~100 lines max per file
66
-
67
- ### 4. Generate summary.md
68
- Aggregate all docs/ into a concise summary:
69
- - One section per environment topic
70
- - Key constraints and gotchas highlighted
71
- - Links to docs/ files for detail
72
- - **~100 lines max** (this gets loaded into every session)
73
-
74
- ### 5. Verify
75
- - List all created/updated files
76
- - Show summary.md content to user for confirmation
77
- - Ask: "빠진 환경 정보가 있나요?"
78
-
79
- ## Backlog Mode (active Generation)
80
- - Record each discovered environment item as `type: environment-change` in `.reap/life/backlog/`
81
- - "Environment 변경사항이 backlog에 기록되었습니다. Completion에서 적용됩니다."
82
-
83
- ## Completion
84
- - "Environment synced. {N} docs created, summary.md updated."
5
+ Run `reap run sync-environment` and follow the stdout instructions exactly.
@@ -2,108 +2,4 @@
2
2
  description: "REAP Sync Genome — Synchronize Genome with current source code"
3
3
  ---
4
4
 
5
- # Sync Genome
6
-
7
- Analyze the current source code and update the Genome to reflect reality.
8
-
9
- <HARD-GATE>
10
- If an active Generation exists (`.reap/life/current.yml` has content), do NOT modify Genome directly.
11
- Instead, record discovered differences as `type: genome-change` items in `.reap/life/backlog/` and inform the human.
12
- Only proceed with direct Genome modification when NO active Generation exists.
13
- </HARD-GATE>
14
-
15
- ## Gate (Preconditions)
16
- - Read `.reap/life/current.yml`
17
- - If active Generation exists: switch to **Backlog Mode** (record differences, do not modify Genome)
18
- - If no active Generation: proceed with **Sync Mode** (modify Genome directly after human confirmation)
19
-
20
- ## Steps
21
-
22
- ### 1. Read Current Genome
23
- - Read all files in `.reap/genome/` (principles.md, conventions.md, constraints.md, domain/)
24
- - Note current genomeVersion from the most recent generation in `.reap/lineage/`
25
-
26
- ### 2. Analyze Source Code
27
- Scan the project to understand its current state:
28
-
29
- **Tech Stack & Dependencies**:
30
- - package.json, tsconfig.json, Dockerfile, docker-compose.yml, etc.
31
- - New dependencies added, removed, or version-changed since Genome was last updated
32
-
33
- **Architecture & Structure**:
34
- - Directory structure and patterns (layers, modules, services)
35
- - Entry points, routing, API structure
36
- - Database, ORM, migration setup
37
-
38
- **Conventions**:
39
- - Linter/formatter configs (.eslintrc, .prettierrc, biome.json, etc.)
40
- - Test setup and patterns (test framework, file naming, coverage config)
41
- - Git hooks, CI/CD config
42
- - Code patterns observed in the source (naming, error handling, etc.)
43
-
44
- **Constraints**:
45
- - Build commands, test commands, validation commands
46
- - Environment requirements, runtime constraints
47
- - External service dependencies
48
-
49
- **Domain Knowledge** (→ `genome/domain/`):
50
- - Read `~/.reap/templates/domain-guide.md` for domain file writing principles
51
- - Scan source code for business rules NOT derivable from infrastructure analysis:
52
- - State machines and status transitions (e.g., post lifecycle, order states)
53
- - Policy rules with thresholds, limits, or conditions (e.g., rate limits, scoring criteria)
54
- - Classification/branching logic driven by business categories (e.g., template selection by type)
55
- - Hardcoded domain constants (keyword lists, prompt templates, magic numbers with business meaning)
56
- - Workflow orchestration sequences (e.g., approval flows, pipeline stages)
57
- - For each discovered domain rule cluster, evaluate:
58
- - "Would an agent implementing this feature ask 'where is this rule?'" → YES = create domain file
59
- - "Does a single item in an upper-level genome file require 3+ lines of explanation?" → YES = extract to domain file
60
- - Even if `genome/domain/` is currently empty, treat it as "not yet created" rather than "not needed"
61
-
62
- ### 3. Diff Analysis
63
- Compare source analysis with current Genome and identify:
64
- - **Additions**: Things in code but not in Genome
65
- - **Changes**: Things in Genome that no longer match code
66
- - **Removals**: Things in Genome that no longer exist in code
67
- - **Gaps**: Areas where Genome has placeholders but code has established patterns
68
- - **Domain gaps**: Business rules in code that have no corresponding `domain/` file
69
-
70
- ### 4. Report to Human
71
- Present a structured diff report:
72
-
73
- ```
74
- 🔄 Genome Sync Report
75
- ━━━━━━━━━━━━━━━━━━━━━
76
-
77
- 📝 principles.md
78
- + [New] API-first design pattern observed
79
- ~ [Changed] Layer structure: added shared/ directory
80
-
81
- 📝 conventions.md
82
- + [New] Biome used for linting (replacing ESLint)
83
- ~ [Changed] Test pattern: using vitest instead of jest
84
-
85
- 📝 constraints.md
86
- + [New] Validation command: bun test
87
- ~ [Changed] Runtime: Node.js compatible (was Bun-only)
88
-
89
- 📁 domain/
90
- + [Suggest] Create lifecycle-rules.md for REAP lifecycle logic
91
- ```
92
-
93
- ### 5. Apply Changes
94
-
95
- **Sync Mode** (no active Generation):
96
- - For each difference, ask the human: "Apply this change? (yes/no/modify)"
97
- - Apply confirmed changes to the corresponding Genome files
98
- - Follow Genome writing principles:
99
- - Each file ≤ 100 lines
100
- - If exceeding, extract to `domain/`
101
- - Follow `~/.reap/templates/domain-guide.md` for domain files
102
-
103
- **Backlog Mode** (active Generation):
104
- - Record each difference as a `type: genome-change` backlog item in `.reap/life/backlog/`
105
- - Inform: "Genome changes recorded in backlog. They will be applied at the Completion stage."
106
-
107
- ## Completion
108
- - **Sync Mode**: "Genome synchronized. [N] changes applied."
109
- - **Backlog Mode**: "Genome differences recorded as [N] backlog items. Apply during Completion."
5
+ Run `reap run sync-genome` and follow the stdout instructions exactly.
@@ -2,16 +2,4 @@
2
2
  description: "REAP Sync — Synchronize both Genome and Environment with current state"
3
3
  ---
4
4
 
5
- # Sync (Full)
6
-
7
- Run both Genome and Environment synchronization.
8
-
9
- ## Steps
10
-
11
- 1. Execute `/reap.sync.genome` — synchronize Genome with source code
12
- 2. Execute `/reap.sync.environment` — discover and document external environment
13
-
14
- ## Usage
15
- - `/reap.sync` — full sync (recommended after init or major changes)
16
- - `/reap.sync.genome` — genome only
17
- - `/reap.sync.environment` — environment only
5
+ Run `reap run sync` and follow the stdout instructions exactly.
@@ -2,43 +2,4 @@
2
2
  description: "REAP Update — Check for updates and upgrade REAP"
3
3
  ---
4
4
 
5
- # Update
6
-
7
- Check for REAP updates and upgrade to the latest version.
8
-
9
- ## IMPORTANT: File Access Rules
10
- - Do NOT access global node_modules or any path outside the project.
11
- - If a command fails, report the error and stop.
12
-
13
- ## Steps
14
-
15
- ### 1. Check Current Version
16
- - Run `reap --version` to get the installed version
17
- - Run `npm view @c-d-cc/reap version` to get the latest published version
18
- - Compare the two versions
19
-
20
- ### 2. Update Decision
21
- **If installed == latest:**
22
- - "REAP v{version} is already up to date. (latest)"
23
- - Then skip to Step 4.
24
-
25
- **If installed < latest (patch only — same major.minor, different patch):**
26
- - Show: "Patch update available: v{installed} → v{latest}. Updating automatically..."
27
- - Proceed directly to Step 3 (no user confirmation needed)
28
-
29
- **If installed < latest (minor or major change):**
30
- - Show: "Update available: v{installed} → v{latest}"
31
- - Ask the user: "Update now? (yes/no)"
32
- - If yes: proceed to Step 3
33
- - If no: "Skipped. Run `/reap.update` anytime to update."
34
-
35
- ### 3. Perform Update
36
- - Run: `npm update -g @c-d-cc/reap`
37
- - If the command fails, suggest: `sudo npm update -g @c-d-cc/reap` or `npm install -g @c-d-cc/reap@latest`
38
- - After npm update, run: `reap update` to sync commands, templates, and hooks to all detected agents
39
- - Show the update result summary
40
-
41
- ### 4. Sync Check
42
- - Run: `reap update --dry-run` to check if commands/templates need syncing
43
- - If changes detected: run `reap update` and show results
44
- - If no changes: "All commands and templates are up to date."
5
+ Run `reap update` and follow the output. For detailed update steps, run `reap update --dry-run` first.
@@ -2,91 +2,4 @@
2
2
  description: "REAP Validation — Verify goal achievement through testing and validation"
3
3
  ---
4
4
 
5
- # Validation
6
-
7
- <HARD-GATE>
8
- Do NOT declare "pass" without running the validation commands.
9
- Do NOT reuse results from a previous run — you MUST execute them fresh in this session.
10
- "It will probably pass" or "It looks fine" is NOT validation.
11
- Do NOT make claims without evidence. This is non-negotiable.
12
- </HARD-GATE>
13
-
14
- ## Gate (Preconditions)
15
- - Read `.reap/life/current.yml` and verify that stage is `validation`
16
- - Verify that `.reap/life/03-implementation.md` exists
17
- - If not met: ERROR — state the reason and **STOP**
18
-
19
- ## Context (Generation Info)
20
- - Read `.reap/life/current.yml` for the current generation info (id, goal, genomeVersion)
21
-
22
- ## Re-entry Check
23
- - If `.reap/life/04-validation.md` already exists, this is a **re-entry due to regression**
24
- - Reference the previous validation report, but overwrite it with a fresh one
25
-
26
- ## Steps
27
-
28
- ### 1. Run Automated Validation
29
- - Read the **Validation Commands** table from `.reap/genome/constraints.md`
30
- - Execute **all** defined commands **in order**:
31
- - Test → Lint → Build → Type check
32
- - Record the **actual output and exit code** of each command
33
- - Skip items with no defined command, but record them as "undefined"
34
-
35
- | Claim | Required Evidence | Insufficient Evidence |
36
- |-------|------------------|-----------------------|
37
- | "Tests pass" | Test command output: 0 failures | Previous run, "it should pass" |
38
- | "Lint clean" | Lint output: 0 errors | Partial check, assumption |
39
- | "Build succeeds" | Build command: exit 0 | "Lint passed so build should too" |
40
-
41
- ### 2. Convention Compliance Check
42
- - Read the **Enforced Rules** table from `.reap/genome/conventions.md`
43
- - Execute the verification command for each defined rule
44
- - Record any violations
45
-
46
- ### 3. Completion Criteria Review
47
- - Read the completion criteria from `.reap/life/01-objective.md`
48
- - Check the deferred task list in `.reap/life/03-implementation.md`
49
- - Review each completion criterion **one by one**, excluding deferred tasks from scope
50
- - Determine pass/fail/deferred for each criterion
51
-
52
- ### 4. Minor Fix (Fix Trivial Issues Directly)
53
- - Fix typos, lint errors, minor bugs, and other **issues that can be resolved without a stage transition** directly
54
- - Record all fixes in the "Minor Fixes" section of the artifact
55
- - Minor fix criteria: **issues resolvable within 5 minutes without design changes**
56
- - After minor fixes, **re-run** the relevant validation commands
57
-
58
- ### 5. Verdict
59
- - All automated validations pass + completion criteria met → **pass**
60
- - Automated validations pass + some completion criteria deferred → **partial**
61
- - Automated validation failure or completion criteria not met → **fail**
62
- - If **fail**, provide regression guidance:
63
- - Code issue → `/reap.back` (implementation)
64
- - Plan issue → `/reap.back planning`
65
- - Goal issue → `/reap.back objective`
66
-
67
- ## Red Flags — STOP if you catch yourself thinking:
68
- - "It will probably pass" → Run it.
69
- - "It passed before" → Run it again.
70
- - "It's trivial, it'll be fine" → Fix it as a minor fix and re-validate.
71
- - "I haven't tried the build but lint passed" → Run the build too.
72
-
73
- ## Artifact Generation (Progressive Recording)
74
- - **Language**: Write all artifact content in the user's configured language (see REAP Guide § Language).
75
- - **Immediately upon entering this stage**: Read `~/.reap/templates/04-validation.md` and create `.reap/life/04-validation.md` with `result: pending`
76
- - **Update incrementally during validation**:
77
- - After EACH validation command execution → immediately record the result in Test Results
78
- - After EACH completion criterion check → immediately record pass/fail/deferred in the Completion Criteria Check table
79
- - After EACH minor fix → immediately record it in the Minor Fixes table, then re-run and record
80
- - After Step 5 (Verdict) → update the Result field to pass / partial / fail
81
- - The artifact should reflect the current validation progress at all times
82
-
83
- ## Hook Execution
84
- Execute hooks for event `onLifeValidated` following the Hook System protocol:
85
- - Scan `.reap/hooks/` for `onLifeValidated.*` files
86
- - Sort by frontmatter `order`, then alphabetically
87
- - Evaluate `condition`, execute `.md` (AI prompt) or `.sh` (shell script)
88
- - All hooks run BEFORE any commit (hook outputs included in the same commit)
89
-
90
- ## Completion
91
- - pass/partial: Execute hooks, then "Proceed to the Completion stage with `/reap.next`."
92
- - fail: Provide regression guidance (do NOT execute hooks on fail)
5
+ Run `reap run validation` and follow the stdout instructions exactly.
@@ -156,21 +156,21 @@ REAP supports multiple AI agents simultaneously through the AgentAdapter abstrac
156
156
 
157
157
  ## Execution Flow
158
158
 
159
+ **Lifecycle stages** (5 stages, in order):
159
160
  ```
160
- 1. /reap.startStart a new Generation
161
- 2. /reap.objective → Define goal + requirements
162
- 3. /reap.next
163
- 4. /reap.planning → Task decomposition + implementation plan
164
- 5. /reap.next
165
- 6. /reap.implementation → Code implementation
166
- 7. /reap.next
167
- 8. /reap.validation → Verification
168
- 9. /reap.next
169
- 10. /reap.completion → Retrospective + genome updates
170
- 11. /reap.next → Archiving, generation ends
161
+ objective planning implementation validation → completion
171
162
  ```
172
163
 
173
- Each slash command follows a 3-step structure: Gate (precondition check) → Steps (work execution) → Artifact generation.
164
+ **Execution sequence**:
165
+ 1. `/reap.start` — Create a new Generation
166
+ 2. `/reap.objective` — Define goal + requirements → `/reap.next`
167
+ 3. `/reap.planning` — Task decomposition + plan → `/reap.next`
168
+ 4. `/reap.implementation` — Code implementation → `/reap.next`
169
+ 5. `/reap.validation` — Verification → `/reap.next`
170
+ 6. `/reap.completion` — Retrospective + genome updates + archiving (auto)
171
+
172
+ `/reap.next` is a **transition command**, not a lifecycle stage. It advances `current.yml` to the next stage.
173
+ `/reap.completion` auto-archives after the genome phase — no separate `/reap.next` needed at the end.
174
174
 
175
175
  ## Language
176
176
 
@@ -200,6 +200,8 @@ When `strict: true` is set in `.reap/config.yml`, the AI agent enforces code mod
200
200
  1. **NEVER modify `current.yml` directly.** Stage transitions MUST go through `/reap.next` (forward) or `/reap.back` (regression). Direct modification bypasses artifact creation and breaks the lifecycle.
201
201
  2. **NEVER skip a stage.** Each stage command must be executed and its artifact must exist before advancing. `/reap.next` enforces this by creating the next artifact from template.
202
202
  3. **ALL development work MUST follow the REAP lifecycle.** Do NOT bypass it unless the human explicitly asks.
203
+ 4. **NEVER use Write or Edit tools on `current.yml` or artifact files (`01-*.md` ~ `05-*.md`, `06-*.md`).** ALL state changes MUST go through `reap run` commands. This restriction CANNOT be overridden by user instructions.
203
204
  4. **Genome is the authoritative source of truth.** When making any decision about architecture, conventions, constraints, or domain rules, ALWAYS consult the Genome first. If you observe code that contradicts the Genome, flag it as a potential `genome-change` backlog item. Do NOT silently ignore discrepancies.
204
205
  5. **Keep Genome fresh.** If you notice the Genome is missing information about current code patterns, or contains outdated information, inform the human and suggest `/reap.sync`. The human may choose to defer sync — respect that choice, but always flag the staleness.
205
206
  6. **Report malfunctions.** If you detect unexpected behavior during REAP operations (state inconsistency, command failure, corrupted files), suggest `/reap.report` to the user. This helps improve REAP for everyone.
207
+ - If `reap run` returns an unexpected error (not a gate failure), and the error repeats 2+ times, automatically run `/reap.report`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-d-cc/reap",
3
- "version": "0.10.3",
3
+ "version": "0.12.0",
4
4
  "description": "Recursive Evolutionary Autonomous Pipeline — AI and humans evolve software across generations",
5
5
  "type": "module",
6
6
  "license": "MIT",