@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
package/README.ja.md CHANGED
@@ -116,7 +116,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
116
116
  | **Planning** | タスク分解、実装アプローチ、依存関係 | `02-planning.md` |
117
117
  | **Implementation** | AI+Human協力でコード実装 | `03-implementation.md` |
118
118
  | **Validation** | テスト実行、完了条件の確認 | `04-validation.md` |
119
- | **Completion** | レトロスペクティブ + Genome変更反映 + Hook提案 + アーカイブ | `05-completion.md` |
119
+ | **Completion** | レトロスペクティブ + Genome変更反映 + Hook提案 + 自動アーカイブ(consume + archive + commit) | `05-completion.md` |
120
120
 
121
121
  ## コアコンセプト [↗](https://reap.cc/docs/core-concepts)
122
122
 
@@ -218,10 +218,11 @@ Machine A:
218
218
  | コマンド | 説明 |
219
219
  |----------|------|
220
220
  | `reap init <name>` | プロジェクト初期化。`.reap/`構造を作成 |
221
- | `reap status` | 現在のGeneration状態を確認 |
222
- | `reap update` | コマンド/テンプレート/hookを最新バージョンに同期 |
221
+ | `reap status` | 現在のGeneration状態を確認(バージョン + 最新状況表示) |
222
+ | `reap update` | コマンド/テンプレート/hookを最新バージョンに同期。`~/.claude/commands/`のレガシーを自動クリーンアップ |
223
223
  | `reap fix` | `.reap/`構造の診断と修復 |
224
- | `reap help` | CLIコマンド + スラッシュコマンド + ワークフロー概要を出力 |
224
+ | `reap help` | CLIコマンド + スラッシュコマンド + ワークフロー概要を出力(バージョン + 最新状況表示) |
225
+ | `reap run <cmd>` | スラッシュコマンドのスクリプトを直接実行(1行`.md`ラッパーが内部的に使用) |
225
226
 
226
227
  ### オプション
227
228
 
@@ -235,6 +236,21 @@ reap update --dry-run # 変更のプレビュー
235
236
 
236
237
  REAPはスラッシュコマンドとセッションフックを通じてAIエージェントと統合します。現在サポートされているエージェント:**Claude Code**、**OpenCode**。
237
238
 
239
+ ### Script Orchestratorアーキテクチャ
240
+
241
+ v0.11.0より、28個のスラッシュコマンドが**1行`.md`ラッパー + TypeScriptスクリプト**構造に移行しました。各`.md`ファイルは`reap run <cmd>`を呼び出し、TSスクリプト(`src/cli/commands/run/`)がすべての決定論的ロジックを処理して、AIエージェントにstructured JSONで指示します。一貫性とテスト容易性が大幅に向上しました。
242
+
243
+ ### autoSubagentモード
244
+
245
+ `/reap.evolve`実行時、自動的にsubagentにGenerationライフサイクル全体を委任できます:
246
+
247
+ ```yaml
248
+ # .reap/config.yml
249
+ autoSubagent: true # デフォルト: true
250
+ ```
251
+
252
+ Subagentは完全なコンテキストを受け取り、すべてのステージを自律的に実行します。本当にブロックされた場合のみユーザーに確認を求めます。
253
+
238
254
  ### スラッシュコマンド [↗](https://reap.cc/docs/command-reference)
239
255
 
240
256
  スラッシュコマンドが`.claude/commands/`にインストールされ、ワークフロー全体を駆動します:
@@ -380,9 +396,15 @@ my-project/
380
396
  │ └── backlog/
381
397
  └── lineage/ # 完了した世代のアーカイブ
382
398
 
383
- ~/.claude/ # ユーザーレベル(reap initでインストール)
384
- ├── commands/ # スラッシュコマンド(/reap.*)
399
+ ~/.reap/ # ユーザーレベル(reap initでインストール)
400
+ ├── commands/ # スラッシュコマンド原本(1行.mdラッパー)
401
+ └── templates/ # Artifactテンプレート
402
+
403
+ ~/.claude/
385
404
  └── settings.json # SessionStart hookの登録
405
+
406
+ .claude/commands/ # プロジェクトレベル(セッション開始時にsymlink)
407
+ └── reap.*.md # アクティブなスラッシュコマンド(`reap run <cmd>`を呼び出し)
386
408
  ```
387
409
 
388
410
  ## 系譜圧縮(Lineage Compression)
package/README.ko.md CHANGED
@@ -116,7 +116,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
116
116
  | **Planning** | 태스크 분해, 구현 접근법, 의존관계 | `02-planning.md` |
117
117
  | **Implementation** | AI+Human 협업으로 코드 구현 | `03-implementation.md` |
118
118
  | **Validation** | 테스트 실행, 완료 조건 점검 | `04-validation.md` |
119
- | **Completion** | 회고 + Genome 변경 반영 + Hook 제안 + 아카이빙 | `05-completion.md` |
119
+ | **Completion** | 회고 + Genome 변경 반영 + Hook 제안 + 자동 아카이빙 (consume + archive + commit) | `05-completion.md` |
120
120
 
121
121
  ## 핵심 개념 [↗](https://reap.cc/docs/core-concepts)
122
122
 
@@ -218,10 +218,11 @@ Machine A:
218
218
  | 명령어 | 설명 |
219
219
  |--------|------|
220
220
  | `reap init <name>` | 프로젝트 초기화. `.reap/` 구조 생성 |
221
- | `reap status` | 현재 Generation 상태 확인 |
222
- | `reap update` | 커맨드/템플릿/훅을 최신 버전으로 동기화 |
221
+ | `reap status` | 현재 Generation 상태 확인 (버전 + 최신 여부 표시) |
222
+ | `reap update` | 커맨드/템플릿/훅을 최신 버전으로 동기화. `~/.claude/commands/` 레거시 자동 정리 |
223
223
  | `reap fix` | `.reap/` 구조 진단 및 복구 |
224
- | `reap help` | CLI 명령어 + 슬래시 커맨드 + 워크플로우 요약 출력 |
224
+ | `reap help` | CLI 명령어 + 슬래시 커맨드 + 워크플로우 요약 출력 (버전 + 최신 여부 표시) |
225
+ | `reap run <cmd>` | 슬래시 커맨드의 스크립트를 직접 실행 (1줄 `.md` wrapper가 내부적으로 사용) |
225
226
 
226
227
  ### 옵션
227
228
 
@@ -235,6 +236,21 @@ reap update --dry-run # 변경사항 미리보기
235
236
 
236
237
  REAP은 슬래시 커맨드와 세션 훅을 통해 AI 에이전트와 통합됩니다. 현재 지원 에이전트: **Claude Code**, **OpenCode**.
237
238
 
239
+ ### Script Orchestrator 아키텍처
240
+
241
+ v0.11.0부터 28개 슬래시 커맨드가 **1줄 `.md` wrapper + TypeScript 스크립트** 구조로 전환되었습니다. 각 `.md` 파일은 `reap run <cmd>`를 호출하고, TS 스크립트(`src/cli/commands/run/`)가 모든 결정적 로직을 처리하여 AI에게 structured JSON으로 지시합니다. 일관성과 테스트 용이성이 크게 향상되었습니다.
242
+
243
+ ### autoSubagent 모드
244
+
245
+ `/reap.evolve` 실행 시 자동으로 subagent에게 Generation lifecycle 전체를 위임할 수 있습니다:
246
+
247
+ ```yaml
248
+ # .reap/config.yml
249
+ autoSubagent: true # 기본값: true
250
+ ```
251
+
252
+ Subagent는 전체 컨텍스트를 받아 모든 stage를 자율적으로 실행하며, 정말로 막혔을 때만 사용자에게 확인을 요청합니다.
253
+
238
254
  ### Slash Commands
239
255
 
240
256
  Slash command가 `.claude/commands/`에 설치되어 전체 워크플로우를 구동합니다:
@@ -380,9 +396,15 @@ my-project/
380
396
  │ └── backlog/
381
397
  └── lineage/ # 완료된 세대 아카이브
382
398
 
383
- ~/.claude/ # 사용자 레벨 (reap init 시 설치)
384
- ├── commands/ # Slash commands (/reap.*)
399
+ ~/.reap/ # 사용자 레벨 (reap init 시 설치)
400
+ ├── commands/ # Slash command 원본 (1줄 .md wrapper)
401
+ └── templates/ # Artifact 템플릿
402
+
403
+ ~/.claude/
385
404
  └── settings.json # SessionStart hook 등록
405
+
406
+ .claude/commands/ # 프로젝트 레벨 (세션 시작 시 symlink)
407
+ └── reap.*.md # 활성 슬래시 커맨드 (`reap run <cmd>` 호출)
386
408
  ```
387
409
 
388
410
  ## 계보 압축 (Lineage Compression)
package/README.md CHANGED
@@ -115,7 +115,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
115
115
  | **Planning** | Break down tasks, choose approach, map dependencies | `02-planning.md` |
116
116
  | **Implementation** | Build with AI + human collaboration | `03-implementation.md` |
117
117
  | **Validation** | Run tests, verify completion criteria | `04-validation.md` |
118
- | **Completion** | Retrospective + apply Genome changes + hook suggestion + archive | `05-completion.md` |
118
+ | **Completion** | Retrospective + apply Genome changes + hook suggestion + auto-archive (consume + archive + commit) | `05-completion.md` |
119
119
 
120
120
  ## Core Concepts [↗](https://reap.cc/docs/core-concepts)
121
121
 
@@ -221,6 +221,7 @@ All distributed operations run through your AI agent:
221
221
  | `reap update` | Sync commands/templates/hooks to the latest version |
222
222
  | `reap fix` | Diagnose and repair the `.reap/` structure |
223
223
  | `reap help` | Print CLI commands, slash commands, and workflow summary |
224
+ | `reap run <cmd>` | Execute a slash command's script directly (used internally by 1-line `.md` wrappers) |
224
225
 
225
226
  ### Options
226
227
 
@@ -234,6 +235,21 @@ reap update --dry-run # Preview changes before applying
234
235
 
235
236
  REAP integrates with AI agents through slash commands and session hooks. Currently supported agents: **Claude Code** and **OpenCode**.
236
237
 
238
+ ### Script Orchestrator Architecture
239
+
240
+ Since v0.11.0, all 28 slash commands follow a **1-line `.md` wrapper + TypeScript script** pattern. Each `.md` file simply calls `reap run <cmd>`, and the TS script (`src/cli/commands/run/`) handles all deterministic logic — returning structured JSON instructions for the AI agent. This ensures consistency and testability.
241
+
242
+ ### autoSubagent Mode
243
+
244
+ When `/reap.evolve` is run, REAP can automatically delegate the entire generation lifecycle to a subagent. This is controlled by:
245
+
246
+ ```yaml
247
+ # .reap/config.yml
248
+ autoSubagent: true # default: true
249
+ ```
250
+
251
+ The subagent receives the full context and runs autonomously through all stages, only surfacing when genuinely blocked.
252
+
237
253
  ### Slash Commands [↗](https://reap.cc/docs/command-reference)
238
254
 
239
255
  Slash commands are installed in `.claude/commands/` and drive the entire workflow:
@@ -385,14 +401,14 @@ my-project/
385
401
  └── lineage/ # Completed generation archive
386
402
 
387
403
  ~/.reap/ # User-level (installed by reap init)
388
- ├── commands/ # Slash command originals
404
+ ├── commands/ # Slash command originals (1-line .md wrappers)
389
405
  └── templates/ # Artifact templates
390
406
 
391
407
  ~/.claude/
392
408
  └── settings.json # SessionStart hook registration
393
409
 
394
- .claude/commands/ # Project-level (copied by session-start hook)
395
- └── reap.*.md # Active slash commands (auto-synced)
410
+ .claude/commands/ # Project-level slash commands
411
+ └── reap.*.md # Active slash commands (each calls `reap run <cmd>`)
396
412
  ```
397
413
 
398
414
  ## Lineage Compression [↗](https://reap.cc/docs/lineage)
package/README.zh-CN.md CHANGED
@@ -116,7 +116,7 @@ Objective → Planning → Implementation ⟷ Validation → Completion
116
116
  | **Planning** | 任务分解、实施方案、依赖关系 | `02-planning.md` |
117
117
  | **Implementation** | AI+人类协作编写代码 | `03-implementation.md` |
118
118
  | **Validation** | 执行测试、检查完成条件 | `04-validation.md` |
119
- | **Completion** | 回顾 + 应用Genome变更 + Hook建议 + 归档 | `05-completion.md` |
119
+ | **Completion** | 回顾 + 应用Genome变更 + Hook建议 + 自动归档(consume + archive + commit) | `05-completion.md` |
120
120
 
121
121
  ## 核心概念 [↗](https://reap.cc/docs/core-concepts)
122
122
 
@@ -218,10 +218,11 @@ Machine A:
218
218
  | 命令 | 说明 |
219
219
  |------|------|
220
220
  | `reap init <name>` | 初始化项目。创建`.reap/`结构 |
221
- | `reap status` | 查看当前Generation状态 |
222
- | `reap update` | 将命令/模板/hook同步到最新版本 |
221
+ | `reap status` | 查看当前Generation状态(显示版本 + 最新状态) |
222
+ | `reap update` | 将命令/模板/hook同步到最新版本。自动清理`~/.claude/commands/`旧版文件 |
223
223
  | `reap fix` | 诊断和修复`.reap/`结构 |
224
- | `reap help` | 输出CLI命令 + 斜杠命令 + 工作流摘要 |
224
+ | `reap help` | 输出CLI命令 + 斜杠命令 + 工作流摘要(显示版本 + 最新状态) |
225
+ | `reap run <cmd>` | 直接执行斜杠命令的脚本(由1行`.md` wrapper内部调用) |
225
226
 
226
227
  ### 选项
227
228
 
@@ -235,6 +236,21 @@ reap update --dry-run # 预览变更
235
236
 
236
237
  REAP通过斜杠命令和会话钩子与AI代理集成。当前支持的代理:**Claude Code**、**OpenCode**。
237
238
 
239
+ ### Script Orchestrator架构
240
+
241
+ 从v0.11.0开始,28个斜杠命令全部采用**1行`.md` wrapper + TypeScript脚本**模式。每个`.md`文件仅调用`reap run <cmd>`,TS脚本(`src/cli/commands/run/`)处理所有确定性逻辑,以structured JSON形式指示AI代理。大幅提升了一致性和可测试性。
242
+
243
+ ### autoSubagent模式
244
+
245
+ 执行`/reap.evolve`时,可自动将整个Generation生命周期委托给subagent:
246
+
247
+ ```yaml
248
+ # .reap/config.yml
249
+ autoSubagent: true # 默认值: true
250
+ ```
251
+
252
+ Subagent接收完整上下文后自主执行所有阶段,仅在确实遇到阻碍时才向用户确认。
253
+
238
254
  ### 斜杠命令 [↗](https://reap.cc/docs/command-reference)
239
255
 
240
256
  斜杠命令安装在`.claude/commands/`中,驱动整个工作流:
@@ -380,9 +396,15 @@ my-project/
380
396
  │ └── backlog/
381
397
  └── lineage/ # 已完成世代的归档
382
398
 
383
- ~/.claude/ # 用户级别(reap init时安装)
384
- ├── commands/ # 斜杠命令(/reap.*)
399
+ ~/.reap/ # 用户级别(reap init时安装)
400
+ ├── commands/ # 斜杠命令原件(1行.md wrapper)
401
+ └── templates/ # Artifact模板
402
+
403
+ ~/.claude/
385
404
  └── settings.json # SessionStart hook注册
405
+
406
+ .claude/commands/ # 项目级别(会话启动时symlink)
407
+ └── reap.*.md # 活跃斜杠命令(调用`reap run <cmd>`)
386
408
  ```
387
409
 
388
410
  ## 谱系压缩(Lineage Compression)