@c-d-cc/reap 0.10.3 → 0.11.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 (46) hide show
  1. package/README.ja.md +28 -6
  2. package/README.ko.md +28 -6
  3. package/README.md +20 -4
  4. package/README.zh-CN.md +28 -6
  5. package/dist/cli.js +4644 -1307
  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.evolve.md +1 -62
  21. package/dist/templates/commands/reap.help.md +1 -90
  22. package/dist/templates/commands/reap.implementation.md +1 -105
  23. package/dist/templates/commands/reap.merge.completion.md +1 -55
  24. package/dist/templates/commands/reap.merge.detect.md +1 -23
  25. package/dist/templates/commands/reap.merge.evolve.md +1 -37
  26. package/dist/templates/commands/reap.merge.mate.md +1 -30
  27. package/dist/templates/commands/reap.merge.md +1 -43
  28. package/dist/templates/commands/reap.merge.merge.md +1 -25
  29. package/dist/templates/commands/reap.merge.start.md +1 -25
  30. package/dist/templates/commands/reap.merge.sync.md +1 -35
  31. package/dist/templates/commands/reap.merge.validation.md +1 -29
  32. package/dist/templates/commands/reap.next.md +1 -32
  33. package/dist/templates/commands/reap.objective.md +1 -259
  34. package/dist/templates/commands/reap.planning.md +1 -104
  35. package/dist/templates/commands/reap.pull.md +1 -49
  36. package/dist/templates/commands/reap.push.md +1 -14
  37. package/dist/templates/commands/reap.report.md +1 -123
  38. package/dist/templates/commands/reap.start.md +1 -48
  39. package/dist/templates/commands/reap.status.md +1 -76
  40. package/dist/templates/commands/reap.sync.environment.md +1 -80
  41. package/dist/templates/commands/reap.sync.genome.md +1 -105
  42. package/dist/templates/commands/reap.sync.md +1 -13
  43. package/dist/templates/commands/reap.update.md +1 -40
  44. package/dist/templates/commands/reap.validation.md +1 -88
  45. package/dist/templates/hooks/reap-guide.md +1 -0
  46. package/package.json +1 -1
@@ -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.
@@ -200,6 +200,7 @@ 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.
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.11.0",
4
4
  "description": "Recursive Evolutionary Autonomous Pipeline — AI and humans evolve software across generations",
5
5
  "type": "module",
6
6
  "license": "MIT",