@ronkovic/aad 0.3.8 → 0.4.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 (114) hide show
  1. package/README.md +292 -12
  2. package/package.json +6 -1
  3. package/src/__tests__/e2e/pipeline-e2e.test.ts +1 -0
  4. package/src/__tests__/e2e/resume-e2e.test.ts +2 -0
  5. package/src/__tests__/integration/pipeline.test.ts +1 -0
  6. package/src/modules/claude-provider/__tests__/claude-sdk-real-env.test.ts +1 -1
  7. package/src/modules/claude-provider/__tests__/claude-sdk.adapter.test.ts +2 -0
  8. package/src/modules/claude-provider/__tests__/provider-registry.test.ts +1 -0
  9. package/src/modules/cli/__tests__/cleanup.test.ts +72 -0
  10. package/src/modules/cli/__tests__/resume.test.ts +1 -0
  11. package/src/modules/cli/__tests__/run.test.ts +1 -0
  12. package/src/modules/cli/commands/__tests__/task-dispatch-handler.test.ts +145 -0
  13. package/src/modules/cli/commands/cleanup.ts +26 -11
  14. package/src/modules/cli/commands/resume.ts +3 -2
  15. package/src/modules/cli/commands/run.ts +57 -7
  16. package/src/modules/cli/commands/task-dispatch-handler.ts +73 -3
  17. package/src/modules/dashboard/__tests__/api-graph.test.ts +332 -0
  18. package/src/modules/dashboard/__tests__/api-timeline.test.ts +461 -0
  19. package/src/modules/dashboard/routes/sse.ts +3 -2
  20. package/src/modules/dashboard/server.ts +1 -0
  21. package/src/modules/dashboard/services/sse-broadcaster.ts +29 -0
  22. package/src/modules/dashboard/ui/dashboard.html +143 -18
  23. package/src/modules/git-workspace/__tests__/branch-manager.test.ts +52 -0
  24. package/src/modules/git-workspace/__tests__/dependency-installer.test.ts +77 -0
  25. package/src/modules/git-workspace/__tests__/git-exec.test.ts +26 -0
  26. package/src/modules/git-workspace/__tests__/merge-service.test.ts +19 -0
  27. package/src/modules/git-workspace/__tests__/pr-manager.test.ts +80 -0
  28. package/src/modules/git-workspace/__tests__/template-copy.test.ts +189 -0
  29. package/src/modules/git-workspace/__tests__/worktree-cleanup.test.ts +29 -2
  30. package/src/modules/git-workspace/__tests__/worktree-manager.test.ts +64 -4
  31. package/src/modules/git-workspace/branch-manager.ts +24 -3
  32. package/src/modules/git-workspace/dependency-installer.ts +113 -0
  33. package/src/modules/git-workspace/git-exec.ts +3 -2
  34. package/src/modules/git-workspace/index.ts +10 -1
  35. package/src/modules/git-workspace/merge-service.ts +40 -10
  36. package/src/modules/git-workspace/pr-manager.ts +278 -0
  37. package/src/modules/git-workspace/template-copy.ts +302 -0
  38. package/src/modules/git-workspace/worktree-manager.ts +37 -11
  39. package/src/modules/planning/__tests__/planning-service.test.ts +1 -0
  40. package/src/modules/planning/__tests__/planning.service.test.ts +149 -0
  41. package/src/modules/planning/__tests__/project-detection.test.ts +7 -1
  42. package/src/modules/planning/planning.service.ts +16 -2
  43. package/src/modules/planning/project-detection.ts +4 -1
  44. package/src/modules/process-manager/__tests__/process-manager.test.ts +1 -0
  45. package/src/modules/task-execution/__tests__/executor.test.ts +86 -0
  46. package/src/modules/task-execution/__tests__/tester-verify.test.ts +4 -3
  47. package/src/modules/task-execution/executor.ts +87 -4
  48. package/src/modules/task-execution/phases/implementer-green.ts +22 -5
  49. package/src/modules/task-execution/phases/merge.ts +44 -2
  50. package/src/modules/task-execution/phases/tester-red.ts +22 -5
  51. package/src/modules/task-execution/phases/tester-verify.ts +22 -6
  52. package/src/modules/task-queue/dispatcher.ts +50 -1
  53. package/src/shared/__tests__/prerequisites.test.ts +176 -0
  54. package/src/shared/config.ts +6 -0
  55. package/src/shared/prerequisites.ts +190 -0
  56. package/src/shared/types.ts +13 -0
  57. package/templates/CLAUDE.md +122 -0
  58. package/templates/settings.json +117 -0
  59. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/progress.json +0 -10
  60. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/queue/completed/task-getall-2.json +0 -10
  61. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/queue/pending/task-1.json +0 -13
  62. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/queue/pending/task-getall-1.json +0 -10
  63. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/queue/pending/task-status-change.json +0 -10
  64. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/workers/worker-1.json +0 -5
  65. package/src/modules/persistence/__tests__/.tmp-stores-test-81991/workers/worker-2.json +0 -5
  66. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/progress.json +0 -10
  67. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/queue/completed/task-getall-2.json +0 -10
  68. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/queue/pending/task-1.json +0 -13
  69. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/queue/pending/task-getall-1.json +0 -10
  70. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/queue/pending/task-status-change.json +0 -10
  71. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/workers/worker-1.json +0 -5
  72. package/src/modules/persistence/__tests__/.tmp-stores-test-82469/workers/worker-2.json +0 -5
  73. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/progress.json +0 -10
  74. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/queue/completed/task-getall-2.json +0 -10
  75. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/queue/pending/task-1.json +0 -13
  76. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/queue/pending/task-getall-1.json +0 -10
  77. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/queue/pending/task-status-change.json +0 -10
  78. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/workers/worker-1.json +0 -5
  79. package/src/modules/persistence/__tests__/.tmp-stores-test-85301/workers/worker-2.json +0 -5
  80. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/progress.json +0 -10
  81. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/queue/completed/task-getall-2.json +0 -10
  82. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/queue/pending/task-1.json +0 -13
  83. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/queue/pending/task-getall-1.json +0 -10
  84. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/queue/pending/task-status-change.json +0 -10
  85. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/workers/worker-1.json +0 -5
  86. package/src/modules/persistence/__tests__/.tmp-stores-test-85759/workers/worker-2.json +0 -5
  87. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/progress.json +0 -10
  88. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/queue/completed/task-getall-2.json +0 -10
  89. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/queue/pending/task-1.json +0 -13
  90. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/queue/pending/task-getall-1.json +0 -10
  91. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/queue/pending/task-status-change.json +0 -10
  92. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/workers/worker-1.json +0 -5
  93. package/src/modules/persistence/__tests__/.tmp-stores-test-86184/workers/worker-2.json +0 -5
  94. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/progress.json +0 -10
  95. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/queue/completed/task-getall-2.json +0 -10
  96. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/queue/pending/task-1.json +0 -13
  97. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/queue/pending/task-getall-1.json +0 -10
  98. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/queue/pending/task-status-change.json +0 -10
  99. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/workers/worker-1.json +0 -5
  100. package/src/modules/persistence/__tests__/.tmp-stores-test-88026/workers/worker-2.json +0 -5
  101. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/progress.json +0 -10
  102. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/queue/completed/task-getall-2.json +0 -10
  103. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/queue/pending/task-1.json +0 -13
  104. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/queue/pending/task-getall-1.json +0 -10
  105. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/queue/pending/task-status-change.json +0 -10
  106. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/workers/worker-1.json +0 -5
  107. package/src/modules/persistence/__tests__/.tmp-stores-test-89475/workers/worker-2.json +0 -5
  108. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/progress.json +0 -10
  109. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/queue/completed/task-getall-2.json +0 -10
  110. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/queue/pending/task-1.json +0 -13
  111. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/queue/pending/task-getall-1.json +0 -10
  112. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/queue/pending/task-status-change.json +0 -10
  113. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/workers/worker-1.json +0 -5
  114. package/src/modules/persistence/__tests__/.tmp-stores-test-89924/workers/worker-2.json +0 -5
package/README.md CHANGED
@@ -6,8 +6,8 @@ TypeScript/Bun製マルチエージェント開発オーケストレーター。
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org/)
7
7
  [![Bun](https://img.shields.io/badge/Bun-1.2+-black)](https://bun.sh/)
8
8
  [![npm](https://img.shields.io/npm/v/@ronkovic/aad)](https://www.npmjs.com/package/@ronkovic/aad)
9
- [![Tests](https://img.shields.io/badge/tests-913%20passing-brightgreen)]()
10
- [![Version](https://img.shields.io/badge/version-0.3.7-orange)]()
9
+ [![Tests](https://img.shields.io/badge/tests-973%20passing-brightgreen)]()
10
+ [![Version](https://img.shields.io/badge/version-0.3.9-orange)]()
11
11
 
12
12
  ## 主要機能
13
13
 
@@ -112,6 +112,229 @@ bun run dev
112
112
 
113
113
  > **macOS:** メモリ監視は `vm_stat` ベースで実装されています。Linux環境では `/proc/meminfo` を使用します。
114
114
 
115
+ ## コマンドリファレンス
116
+
117
+ ### グローバルオプション
118
+
119
+ 以下のオプションはすべてのコマンドで使用可能です:
120
+
121
+ | オプション | 説明 | デフォルト |
122
+ |----------|------|----------|
123
+ | `-w, --workers <数>` | 並列実行するワーカー数 | 2 |
124
+ | `--persist <モード>` | 永続化モード: `memory` (インメモリ) または `fs` (ファイルシステム) | `memory` |
125
+ | `--debug` | デバッグログを有効化 | `false` |
126
+ | `--no-dashboard` | Webダッシュボードを無効化 | `false` (有効) |
127
+ | `--provider <タイプ>` | デフォルトのClaudeプロバイダー: `cli` または `sdk` | `sdk` |
128
+
129
+ ### コマンド一覧
130
+
131
+ #### `aad` (引数なし)
132
+
133
+ インタラクティブモードを起動します。認証設定、プロジェクト設定、実行を対話的に行うウィザードです。
134
+
135
+ ```bash
136
+ aad
137
+ ```
138
+
139
+ **フロー:**
140
+ 1. **認証設定**: Claude API キーまたは OAuth トークンを設定
141
+ 2. **プロジェクト設定**: 要件ファイルとプロジェクトディレクトリを選択
142
+ 3. **実行**: ワーカー数とプロバイダーを選択して実行
143
+
144
+ ---
145
+
146
+ #### `aad run <requirements>`
147
+
148
+ 要件ファイルを元にタスクを計画・実行します。
149
+
150
+ ```bash
151
+ aad run requirements.md [オプション]
152
+ ```
153
+
154
+ **引数:**
155
+ - `<requirements>`: 要件ファイルのパス(必須)
156
+
157
+ **オプション:**
158
+
159
+ | オプション | 説明 | デフォルト |
160
+ |----------|------|----------|
161
+ | `-w, --workers <数>` | 並列実行するワーカー数 | 2 |
162
+ | `--persist <モード>` | 永続化モード: `memory` または `fs` | `memory` |
163
+ | `--debug` | デバッグログを有効化 | `false` |
164
+ | `--no-dashboard` | Webダッシュボードを無効化 | `false` |
165
+ | `--provider <タイプ>` | Claudeプロバイダー: `cli` または `sdk` | `sdk` |
166
+ | `--repos <パス>` | マルチリポジトリモード: カンマ区切りのリポジトリパス | - |
167
+ | `--strategy <戦略>` | マルチリポジトリ戦略: `independent` (独立) または `coordinated` (協調) | `independent` |
168
+ | `--plugins <パス>` | カスタムプラグインのパス(カンマ区切り) | - |
169
+ | `--keep-worktrees` | 完了後にworktreeとブランチを自動削除しない | `false` (自動削除) |
170
+ | `--dry-run` | タスク一覧のみ表示して実行しない(ドライラン) | `false` |
171
+
172
+ **例:**
173
+
174
+ ```bash
175
+ # 基本的な実行
176
+ aad run requirements.md
177
+
178
+ # ワーカー数を指定
179
+ aad run requirements.md --workers 4
180
+
181
+ # CLIプロバイダーを使用
182
+ aad run requirements.md --provider cli
183
+
184
+ # ダッシュボードを無効化
185
+ aad run requirements.md --no-dashboard
186
+
187
+ # ドライラン(タスク一覧のみ表示)
188
+ aad run requirements.md --dry-run
189
+
190
+ # worktreeを残す(手動クリーンアップが必要)
191
+ aad run requirements.md --keep-worktrees
192
+
193
+ # デバッグモード
194
+ aad run requirements.md --debug
195
+
196
+ # マルチリポジトリモード
197
+ aad run requirements.md --repos /path/to/repo1,/path/to/repo2 --strategy coordinated
198
+ ```
199
+
200
+ ---
201
+
202
+ #### `aad resume <runId>`
203
+
204
+ 中断された実行を再開します。
205
+
206
+ ```bash
207
+ aad resume <runId>
208
+ ```
209
+
210
+ **引数:**
211
+ - `<runId>`: 再開する実行のID(必須)
212
+
213
+ **例:**
214
+
215
+ ```bash
216
+ # 特定のrunを再開
217
+ aad resume abc-123-def-456
218
+
219
+ # runIdは `aad status` で確認可能
220
+ aad status
221
+ aad resume <表示されたrunId>
222
+ ```
223
+
224
+ **動作:**
225
+ - `running` または `failed` 状態のタスクを `pending` にリセット
226
+ - ワーカーを再初期化してタスクを再実行
227
+ - 完了済みのタスクはスキップ
228
+
229
+ ---
230
+
231
+ #### `aad status [run-id]`
232
+
233
+ 実行の進捗とタスクステータスを表示します。
234
+
235
+ ```bash
236
+ aad status [run-id]
237
+ ```
238
+
239
+ **引数:**
240
+ - `[run-id]`: 確認する実行のID(省略時は最新の実行を表示)
241
+
242
+ **例:**
243
+
244
+ ```bash
245
+ # 最新の実行を表示
246
+ aad status
247
+
248
+ # 特定のrunを表示
249
+ aad status abc-123-def-456
250
+ ```
251
+
252
+ **表示内容:**
253
+ - 実行ID、親ブランチ、開始時刻
254
+ - タスク総数、pending/running/completed/failed の数
255
+ - 各タスクの詳細(タスクID、タイトル、ステータス、ワーカーID)
256
+
257
+ ---
258
+
259
+ #### `aad cleanup [run-id]`
260
+
261
+ worktreeと孤立したブランチをクリーンアップします。
262
+
263
+ ```bash
264
+ aad cleanup [run-id] [オプション]
265
+ ```
266
+
267
+ **引数:**
268
+ - `[run-id]`: クリーンアップする実行のID(省略時はすべてのAAD worktreeを対象)
269
+
270
+ **オプション:**
271
+
272
+ | オプション | 説明 | デフォルト |
273
+ |----------|------|----------|
274
+ | `-f, --force` | 変更があるworktreeも強制削除、parentブランチも削除 | `false` |
275
+
276
+ **例:**
277
+
278
+ ```bash
279
+ # すべてのAAD worktreeをクリーンアップ(parentは保護)
280
+ aad cleanup
281
+
282
+ # 特定のrunのみクリーンアップ
283
+ aad cleanup abc-123-def-456
284
+
285
+ # 強制削除(parentブランチも削除、変更も無視)
286
+ aad cleanup --force
287
+ aad cleanup abc-123-def-456 --force
288
+ ```
289
+
290
+ **動作:**
291
+ - デフォルトではparentブランチとworktreeを保護(レビュー用)
292
+ - `--force` を指定すると parent を含むすべてのworktreeとブランチを削除
293
+ - 孤立したworktreeは自動的にprune
294
+
295
+ ---
296
+
297
+ #### `aad update`
298
+
299
+ AADを最新バージョンに更新します。
300
+
301
+ ```bash
302
+ aad update [オプション]
303
+ ```
304
+
305
+ **オプション:**
306
+
307
+ | オプション | 説明 | デフォルト |
308
+ |----------|------|----------|
309
+ | `--check` | 更新の有無のみ確認(インストールしない) | `false` |
310
+
311
+ **例:**
312
+
313
+ ```bash
314
+ # 最新版に更新
315
+ aad update
316
+
317
+ # 更新の有無のみ確認
318
+ aad update --check
319
+ ```
320
+
321
+ **動作:**
322
+ - 現在のバージョンと最新バージョンをnpmレジストリから取得して比較
323
+ - `bun`使用時は `bunx` キャッシュをクリア(次回実行時に最新版を使用)
324
+ - `npm`使用時は `npm install -g @ronkovic/aad@latest` を実行
325
+
326
+ ---
327
+
328
+ #### `aad interactive`
329
+
330
+ インタラクティブモードを明示的に起動します(`aad` のみと同じ)。
331
+
332
+ ```bash
333
+ aad interactive
334
+ ```
335
+
336
+ ---
337
+
115
338
  ## クイックスタート
116
339
 
117
340
  ### 1. 要件ファイルの作成
@@ -136,6 +359,9 @@ bun run dev
136
359
 
137
360
  ```bash
138
361
  # 直接実行
362
+ aad run requirements.md
363
+
364
+ # ワーカー数を指定
139
365
  aad run requirements.md --workers 4
140
366
 
141
367
  # インタラクティブモード(対話型ウィザード)
@@ -149,31 +375,62 @@ AADが自動的に:
149
375
  4. ワーカーで並列実行 (TDD: テスト作成 → 実装 → 検証 → レビュー)
150
376
  5. 親ブランチへのマージ
151
377
 
378
+ **よく使うオプション:**
379
+ - `--workers <数>`: 並列ワーカー数(デフォルト: 2)
380
+ - `--provider cli`: Claude CLIを使用(デフォルトは SDK)
381
+ - `--dry-run`: タスク一覧のみ表示(実行しない)
382
+ - `--keep-worktrees`: 完了後もworktreeを削除しない
383
+ - `--debug`: デバッグログを有効化
384
+
385
+ 詳細は [コマンドリファレンス](#コマンドリファレンス) をご覧ください。
386
+
152
387
  ### 3. 進捗確認・管理
153
388
 
154
389
  ```bash
155
- # ステータス確認
156
- aad status [run_id]
390
+ # ステータス確認(最新の実行)
391
+ aad status
392
+
393
+ # 特定の実行のステータス確認
394
+ aad status <run_id>
157
395
 
158
- # 実行の再開
396
+ # 中断された実行の再開
159
397
  aad resume <run_id>
160
398
 
161
- # worktreeのクリーンアップ
162
- aad cleanup [run_id] [--force]
399
+ # worktreeのクリーンアップ(parentは保護)
400
+ aad cleanup
401
+
402
+ # 特定のrunのクリーンアップ
403
+ aad cleanup <run_id>
404
+
405
+ # 強制クリーンアップ(parentも削除)
406
+ aad cleanup --force
163
407
 
164
408
  # バージョン確認・アップデート
165
- aad update [--check]
409
+ aad update
410
+ aad update --check
166
411
  ```
167
412
 
413
+ すべてのコマンドとオプションの詳細は [コマンドリファレンス](#コマンドリファレンス) をご覧ください。
414
+
168
415
  ### 4. Webダッシュボード
169
416
 
170
417
  ダッシュボードはデフォルトで有効です。`http://localhost:7333` でリアルタイムの進捗・ログ・依存グラフを確認できます。
171
418
 
172
- 無効にする場合:
419
+ **ダッシュボード機能:**
420
+ - タスク進捗のリアルタイム可視化
421
+ - ワーカーステータス監視
422
+ - タスク依存グラフ (DAG)
423
+ - 構造化ログのストリーミング表示
424
+ - タスクタイムライン (Gantt)
425
+
426
+ **無効にする場合:**
173
427
  ```bash
174
- aad run requirements.md --workers 4 --no-dashboard
428
+ aad run requirements.md --no-dashboard
175
429
  ```
176
430
 
431
+ **ポート変更:**
432
+ 設定ファイル `.aad/config.json` で `dashboard.port` を変更できます。
433
+
177
434
  ## 開発ガイド
178
435
 
179
436
  ### 環境セットアップ
@@ -308,16 +565,22 @@ aad run requirements.md --provider cli
308
565
  ```bash
309
566
  # 構造化ログの確認
310
567
  cat .aad/docs/<run_id>/logs/structured.jsonl | bunx pino-pretty
568
+
569
+ # デバッグモードで実行
570
+ aad run requirements.md --debug
311
571
  ```
312
572
 
313
573
  ### Worktreeが残っている
314
574
 
315
575
  ```bash
316
- # 全AAD worktreeをクリーンアップ
576
+ # 全AAD worktreeをクリーンアップ(parentは保護)
317
577
  aad cleanup
318
578
 
319
579
  # 特定のrunのみ
320
580
  aad cleanup <run_id>
581
+
582
+ # parentも含めて強制削除
583
+ aad cleanup --force
321
584
  ```
322
585
 
323
586
  ### タスクがスタックした
@@ -326,10 +589,27 @@ aad cleanup <run_id>
326
589
  # ステータス確認
327
590
  aad status <run_id>
328
591
 
329
- # 強制クリーンアップ
592
+ # 実行を再開
593
+ aad resume <run_id>
594
+
595
+ # 強制クリーンアップして最初からやり直し
330
596
  aad cleanup <run_id> --force
597
+ aad run requirements.md
598
+ ```
599
+
600
+ ### メモリ不足エラー
601
+
602
+ AADは自動的にメモリを監視し、不足時にワーカー数を削減します。手動でワーカー数を減らすこともできます:
603
+
604
+ ```bash
605
+ # ワーカー数を1に減らす
606
+ aad run requirements.md --workers 1
331
607
  ```
332
608
 
609
+ ### コマンドオプションの詳細
610
+
611
+ すべてのコマンドとオプションの詳細は [コマンドリファレンス](#コマンドリファレンス) をご覧ください。
612
+
333
613
  ## ライセンス
334
614
 
335
615
  [MIT License](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronkovic/aad",
3
- "version": "0.3.8",
3
+ "version": "0.4.0",
4
4
  "description": "Autonomous Agent Development Orchestrator - Multi-agent TDD pipeline powered by Claude",
5
5
  "module": "src/main.ts",
6
6
  "type": "module",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "bin",
13
13
  "src",
14
+ "templates",
14
15
  "README.md",
15
16
  "LICENSE",
16
17
  "tsconfig.json"
@@ -34,6 +35,10 @@
34
35
  "test:coverage:report": "bun test --coverage --coverage-reporter=html",
35
36
  "typecheck": "tsc --noEmit",
36
37
  "lint": "eslint src/",
38
+ "ci": "bash scripts/ci-local.sh",
39
+ "ci:lint": "bash scripts/ci-local.sh --lint",
40
+ "ci:test": "bash scripts/ci-local.sh --test",
41
+ "ci:build": "bash scripts/ci-local.sh --build",
37
42
  "prepublishOnly": "bun run typecheck && bun run lint && bun test"
38
43
  },
39
44
  "dependencies": {
@@ -57,6 +57,7 @@ function createMockConfig(): Config {
57
57
  teams: { splitter: false, reviewer: false },
58
58
  memorySync: false,
59
59
  dashboard: { enabled: false, port: 7333, host: "localhost" },
60
+ git: { autoPush: false },
60
61
  };
61
62
  }
62
63
 
@@ -52,7 +52,9 @@ describe("E2E Resume", () => {
52
52
  teams: { splitter: false, reviewer: false },
53
53
  memorySync: false,
54
54
  dashboard: { enabled: false, port: 7333, host: "localhost" },
55
+ git: { autoPush: false },
55
56
  },
57
+ git: { autoPush: false },
56
58
  eventBus,
57
59
  logger: createMockLogger(),
58
60
  stores,
@@ -31,6 +31,7 @@ describe("Cross-Module Integration: Pipeline", () => {
31
31
  teams: { splitter: false, reviewer: false },
32
32
  memorySync: false,
33
33
  dashboard: { enabled: false, port: 7333, host: "localhost" },
34
+ git: { autoPush: false },
34
35
  };
35
36
  stores = createStores("memory");
36
37
  });
@@ -94,7 +94,7 @@ describe.skipIf(!hasAuth)("ClaudeSdkAdapter - Real Environment", () => {
94
94
  const adapter = createAdapter();
95
95
  const response = await adapter.call({
96
96
  prompt: "Reply with exactly: HI",
97
- model: "claude-haiku-3-5-20241022",
97
+ model: "claude-haiku-4-5-20251001",
98
98
  });
99
99
 
100
100
  expect(response.result).toBeDefined();
@@ -70,6 +70,7 @@ describe("ClaudeSdkAdapter", () => {
70
70
  teams: { splitter: false, reviewer: false },
71
71
  memorySync: false,
72
72
  dashboard: { enabled: false, port: 7333, host: "localhost" },
73
+ git: { autoPush: false },
73
74
  };
74
75
 
75
76
  logger = pino({ level: "silent" });
@@ -150,6 +151,7 @@ describe("ClaudeSdkAdapter", () => {
150
151
  model: "claude-sonnet-4-5-20250929",
151
152
  content: [{ type: "text", text: "Error response" }],
152
153
  },
154
+ git: { autoPush: false },
153
155
  error: "rate_limit",
154
156
  } as MockSDKMessage;
155
157
  yield {
@@ -58,6 +58,7 @@ const mockAppConfig: Config = {
58
58
  port: 7333,
59
59
  host: "localhost",
60
60
  },
61
+ git: { autoPush: false },
61
62
  };
62
63
 
63
64
  describe("ProviderRegistry", () => {
@@ -108,4 +108,76 @@ describe("cleanupWorktrees", () => {
108
108
  // Should have attempted both despite error
109
109
  expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledTimes(2);
110
110
  });
111
+
112
+ test("detects AAD worktrees with path containing /.aad/worktrees/", async () => {
113
+ mockApp.worktreeManager.listWorktrees = mock(async () => [
114
+ {
115
+ path: "/different/base/.aad/worktrees/task-1",
116
+ branch: "aad/task-1",
117
+ head: "abc123",
118
+ },
119
+ {
120
+ path: "/some/other/path/task-2",
121
+ branch: "aad/task-2",
122
+ head: "def456",
123
+ },
124
+ ]);
125
+
126
+ await cleanupWorktrees(mockApp);
127
+
128
+ // Should only remove the one with /.aad/worktrees/ in path
129
+ expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledTimes(1);
130
+ expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledWith(
131
+ "/different/base/.aad/worktrees/task-1",
132
+ false
133
+ );
134
+ });
135
+
136
+ test("skips parent-* worktrees without --force", async () => {
137
+ mockApp.worktreeManager.listWorktrees = mock(async () => [
138
+ {
139
+ path: `${process.cwd()}/.aad/worktrees/task-1`,
140
+ branch: "aad/task-1",
141
+ head: "abc123",
142
+ },
143
+ {
144
+ path: `${process.cwd()}/.aad/worktrees/parent-run-001`,
145
+ branch: "feat/run-001/parent",
146
+ head: "def456",
147
+ },
148
+ ]);
149
+
150
+ await cleanupWorktrees(mockApp, undefined, false);
151
+
152
+ // Should only remove task-1, not parent-run-001
153
+ expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledTimes(1);
154
+ expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledWith(
155
+ expect.stringContaining("task-1"),
156
+ false
157
+ );
158
+ expect(mockApp.worktreeManager.removeWorktree).not.toHaveBeenCalledWith(
159
+ expect.stringContaining("parent-"),
160
+ expect.anything()
161
+ );
162
+ });
163
+
164
+ test("includes parent-* worktrees with --force", async () => {
165
+ mockApp.worktreeManager.listWorktrees = mock(async () => [
166
+ {
167
+ path: `${process.cwd()}/.aad/worktrees/task-1`,
168
+ branch: "aad/task-1",
169
+ head: "abc123",
170
+ },
171
+ {
172
+ path: `${process.cwd()}/.aad/worktrees/parent-run-001`,
173
+ branch: "feat/run-001/parent",
174
+ head: "def456",
175
+ },
176
+ ]);
177
+
178
+ await cleanupWorktrees(mockApp, undefined, true);
179
+
180
+ // Should remove both task-1 and parent-run-001
181
+ expect(mockApp.worktreeManager.removeWorktree).toHaveBeenCalledTimes(2);
182
+ });
111
183
  });
@@ -69,6 +69,7 @@ describe("resumeRun", () => {
69
69
  teams: { splitter: false, reviewer: false },
70
70
  memorySync: false,
71
71
  dashboard: { enabled: false, port: 7333, host: "localhost" },
72
+ git: { autoPush: false },
72
73
  },
73
74
  eventBus,
74
75
  logger: {
@@ -34,6 +34,7 @@ describe("runPipeline", () => {
34
34
  teams: { splitter: false, reviewer: false },
35
35
  memorySync: false,
36
36
  dashboard: { enabled: false, port: 7333, host: "localhost" },
37
+ git: { autoPush: false },
37
38
  },
38
39
  eventBus,
39
40
  logger: {