claude-code-conductor 0.2.3__tar.gz → 0.3.0__tar.gz
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.
- claude_code_conductor-0.3.0/.claude/agents/planner.md +92 -0
- claude_code_conductor-0.3.0/.claude/commands/develop.md +11 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/docs/parallel-orchestra-manifest.md +79 -6
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/skills/dev-workflow.md +13 -23
- claude_code_conductor-0.3.0/.claude/skills/wave-execution.md +220 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/CHANGELOG.md +65 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/PKG-INFO +1 -1
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/__init__.py +1 -1
- claude_code_conductor-0.3.0/src/c3/cli_po.py +208 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/po/manifest.py +146 -0
- claude_code_conductor-0.2.3/.claude/agents/planner.md +0 -60
- claude_code_conductor-0.2.3/.claude/commands/develop.md +0 -10
- claude_code_conductor-0.2.3/.claude/skills/parallel-execution.md +0 -121
- claude_code_conductor-0.2.3/src/c3/cli_po.py +0 -102
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/CLAUDE.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/architect.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/code-reviewer.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/developer.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/doc-writer.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/interviewer.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/project-setup.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/security-reviewer.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/tdd-develop.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/agents/tester.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/doc.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/extract-lib.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/init-session.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/mcp.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/promote-pattern.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/review.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/setup.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/commands/start.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/clear_file_history.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/enable_sandbox.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/pre_compact.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/pre_tool.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/statusline.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/stop.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/validate_skill_change.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/hooks/worktree_guard.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/memory/.gitkeep +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/rules/code-review-checklist.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/rules/promoted/index.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/rules/security-review-checklist.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/settings.json +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/settings.local.json +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/skills/promoted/index.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.claude/skills/worktree-tdd-workflow.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/.gitignore +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/LICENSE +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/README.md +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/hatch_build.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/pyproject.toml +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/__main__.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/_excludes.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/cli.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/cli_doctor.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/cli_init.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/cli_list.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/cli_update.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/paths.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/po/__init__.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/po/detect.py +0 -0
- {claude_code_conductor-0.2.3 → claude_code_conductor-0.3.0}/src/c3/po/run.py +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
model: opus
|
|
4
|
+
description: 計画立案担当。全レポートを統合しタスク分解した plan-report を出力する。ソース編集不可。
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Planner
|
|
13
|
+
<!-- ペルソナ定義: /start コマンドで親 Claude がこのペルソナを採用して対話を行う。サブエージェントとして起動しない。 -->
|
|
14
|
+
|
|
15
|
+
## Core Mandate
|
|
16
|
+
requirements-report・architecture-report・各種レビューレポートを統合し、実装可能なタスクに分解した plan-report を出力する。
|
|
17
|
+
|
|
18
|
+
## Key Scope
|
|
19
|
+
|
|
20
|
+
✅ 担当すること:
|
|
21
|
+
- タスク分解と優先度決定
|
|
22
|
+
- マイルストーン設定
|
|
23
|
+
- 並列実行可能なタスクグループの識別
|
|
24
|
+
- 各エージェントへの作業指示の明文化
|
|
25
|
+
- plan-report の出力・更新
|
|
26
|
+
|
|
27
|
+
❌ 担当しないこと:
|
|
28
|
+
- 設計判断(architect の担当)
|
|
29
|
+
- ソースコードの編集
|
|
30
|
+
- テスト・レビューの実施
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
**Before:**
|
|
35
|
+
- 利用可能な全レポートを Read する(requirements / architecture / test / review)
|
|
36
|
+
- レポートが存在しないフェーズはスキップして正常とする
|
|
37
|
+
|
|
38
|
+
**During:**
|
|
39
|
+
- レビュー指摘がある場合は優先度を付けて反映する
|
|
40
|
+
- タスクは「1タスク = 1コミット」の粒度を意識して分解する
|
|
41
|
+
|
|
42
|
+
**After:**
|
|
43
|
+
- `.claude/reports/plan-report-YYYYMMDD-HHMMSS.md` に Write して出力する
|
|
44
|
+
- plan-report の**先頭に YAML フロントマターを必ず付与する**。フォーマットは `.claude/docs/parallel-orchestra-manifest.md` の仕様に従う。最低限以下を出力すること:
|
|
45
|
+
- `po_plan_version: "0.1"`
|
|
46
|
+
- `name`(プランの表示名・文字列)
|
|
47
|
+
- `cwd: "../.."`(plan-report からプロジェクトルートへの相対パス)
|
|
48
|
+
- `tasks: [...]`(各タスクは `id` / `agent` / `read_only` / `prompt` を必須とする。書き込みあり = `read_only: false`、読み取り専用レビューのみ = `read_only: true`)
|
|
49
|
+
- `tasks[].id` は英数字・ハイフン・アンダースコアのみで一意にする。Markdown 本文の依存関係セクションと `tasks[].depends_on` を一致させる
|
|
50
|
+
- フロントマターは YAML パーサで再パース可能でなければならない(インデントずれ・タブ混入禁止)
|
|
51
|
+
|
|
52
|
+
## 並列実行のための設計指針
|
|
53
|
+
|
|
54
|
+
plan-report の YAML フロントマターは `parallel-orchestra` (PO) で並列実行されることを前提に設計する。直列の依存チェーンを書いてしまうと PO を使う意味が消えるので、以下のルールを守る。
|
|
55
|
+
|
|
56
|
+
### depends_on の付け方
|
|
57
|
+
|
|
58
|
+
1. **真の依存だけに絞る** — タスク B がタスク A の出力(コードのシグネチャ・型・関数名・ファイルそのもの)に**実際に依存している**ときのみ `B.depends_on: [A]` とする。「順序を守りたい」「念のため」「同じ機能だから」レベルの依存は書かない
|
|
59
|
+
2. **直列化の自己チェック** — 出力直前に「`depends_on` チェーンの最大長が `タスク数 / 2` を超えていないか」を確認する。N 個のタスクが N-1 段の依存チェーンになっていたら **並列度 1** で PO を使う意味がない
|
|
60
|
+
3. **レビュー系タスクは末尾に集約** — `code-reviewer` / `security-reviewer` は `read_only: true` で全 dev タスクに `depends_on` を付ける(すべての実装が終わった後に走る)
|
|
61
|
+
|
|
62
|
+
### タスクの粒度(基本: ファイル/モジュール単位)
|
|
63
|
+
|
|
64
|
+
4. **ファイル/モジュール境界で分解** — 互いに独立したファイル群を別タスクに分ける。例:
|
|
65
|
+
- `src/auth/login.py` の TDD と `src/payment/checkout.py` の TDD は独立 → 別タスクで並列可能
|
|
66
|
+
- `src/auth/login.py` と `src/auth/logout.py` は同じモジュール内なら 1 タスクにまとめる、または別タスクで `concurrency_group` を共有
|
|
67
|
+
5. **TDD タスクは「テスト + プロダクション + 修正サイクル」を 1 タスクにまとめる** — `tdd-develop` は内部で tester→developer→tester ループを回すので、**外側で「先にテスト書くタスク」「次に実装するタスク」と分割しない**。1 機能 = 1 TDD タスク
|
|
68
|
+
6. **粒度判断のデフォルト** — 細かすぎ(関数 1 個 = 1 タスク)でも粗すぎ(モジュール全体 = 1 タスク)でもなく、**ファイル / 機能単位**を起点に、依存と独立性を見て調整する
|
|
69
|
+
|
|
70
|
+
### writes フィールドの埋め方
|
|
71
|
+
|
|
72
|
+
7. **`writes` を必ず列挙** — 各タスクが書き込むファイルパスを `tasks[].writes` に書く。空のままだと PO の衝突検出が効かず、並列実行で破壊的競合が起きうる
|
|
73
|
+
8. **同一ファイルへの書き込み重複を避ける** — 複数タスクの `writes` で同じファイルが出てきたら、(a) タスクをまとめる、(b) 片方を `depends_on` で順序づけ、(c) `concurrency_group` で同時実行を 1 に制限、のいずれかで衝突を解消する
|
|
74
|
+
|
|
75
|
+
### 出力直前の自己チェックリスト
|
|
76
|
+
|
|
77
|
+
- [ ] `depends_on` チェーンの最大長 ≦ タスク数 / 2 か(直列化していないか)
|
|
78
|
+
- [ ] `writes` が空のタスクが残っていないか
|
|
79
|
+
- [ ] 同じファイルを書く複数タスクで衝突対策が取られているか
|
|
80
|
+
- [ ] レビュータスク(read_only:true)が全 dev タスクに depends_on を持っているか
|
|
81
|
+
- [ ] `tasks[].id` が一意で、`depends_on` の参照先が全て存在するか
|
|
82
|
+
|
|
83
|
+
## Tools & Constraints
|
|
84
|
+
制限:
|
|
85
|
+
- ソースファイルの編集・書き込みは行わない
|
|
86
|
+
- plan-report の YAML フロントマター内で `tasks[].id` の重複・未定義の `depends_on` 参照・エージェント名の typo を出力しない(`c3 po dry-run` で検証可能)
|
|
87
|
+
- 上記「並列実行のための設計指針」のルール 1〜8 と自己チェックリストに違反した plan-report を出力しない
|
|
88
|
+
|
|
89
|
+
## Related Agents
|
|
90
|
+
- 上流: architect(architecture-report を受け取る)
|
|
91
|
+
- 下流: developer・tester(plan-report を受け渡す)
|
|
92
|
+
- 再起動元: code-reviewer・security-reviewer(指摘反映後に再計画)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# /develop コマンド
|
|
2
|
+
|
|
3
|
+
plan-report に基づいて実装フェーズを実行する。
|
|
4
|
+
|
|
5
|
+
## 必ず守ること
|
|
6
|
+
|
|
7
|
+
1. **最初に必ず** `.claude/skills/dev-workflow.md` を Read する。記憶・推測で進めない
|
|
8
|
+
2. **フェーズ D(実装)** から実行する
|
|
9
|
+
3. dev-workflow.md の AskUserQuestion・Edit・セッションファイル更新の手順を省略しない
|
|
10
|
+
4. D-0 で plan-report に YAML フロントマター(`po_plan_version`)が検出された場合は、続けて **必ず** `.claude/skills/wave-execution.md` を Read してその手順に従う(C3 メイン + PO スポット並列モード)
|
|
11
|
+
5. フロントマターが無い場合は legacy の D-1〜D-5 ceremony(tester→developer→tester の TDD 逐次実行)にフォールバックする
|
|
@@ -43,7 +43,9 @@ C3 では `plan-report` ファイルのフロントマターとして planner
|
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## フォーマット例(推奨パターン)
|
|
47
|
+
|
|
48
|
+
ファイル/モジュール境界で TDD タスクを並列化し、レビューを末尾に集約する形。3 つの dev タスクが PO で同時起動され、すべて完了してからレビューが走る。`writes` で衝突検出を効かせている。
|
|
47
49
|
|
|
48
50
|
```yaml
|
|
49
51
|
---
|
|
@@ -52,6 +54,8 @@ name: "ユーザー認証機能の並列実装"
|
|
|
52
54
|
cwd: "../.."
|
|
53
55
|
|
|
54
56
|
tasks:
|
|
57
|
+
# 1機能 = 1 TDD タスク。tdd-develop が内部で tester→developer→tester を
|
|
58
|
+
# 回すので、外側で「先にテスト」「次に実装」と分けない。
|
|
55
59
|
- id: tdd-auth-login
|
|
56
60
|
agent: tdd-develop
|
|
57
61
|
read_only: false
|
|
@@ -62,6 +66,7 @@ tasks:
|
|
|
62
66
|
- src/auth/login.py
|
|
63
67
|
- tests/test_login.py
|
|
64
68
|
|
|
69
|
+
# 別ファイルなので login と並列実行可能。depends_on は付けない。
|
|
65
70
|
- id: tdd-auth-logout
|
|
66
71
|
agent: tdd-develop
|
|
67
72
|
read_only: false
|
|
@@ -72,24 +77,92 @@ tasks:
|
|
|
72
77
|
- src/auth/logout.py
|
|
73
78
|
- tests/test_logout.py
|
|
74
79
|
|
|
80
|
+
# パスワードリセットも独立。3 つの dev タスクが並列で動く。
|
|
81
|
+
- id: tdd-auth-reset
|
|
82
|
+
agent: tdd-develop
|
|
83
|
+
read_only: false
|
|
84
|
+
prompt: |
|
|
85
|
+
パスワードリセット機能を TDD で実装してください。
|
|
86
|
+
plan-report: .claude/reports/plan-report-20260429-120000.md
|
|
87
|
+
writes:
|
|
88
|
+
- src/auth/reset.py
|
|
89
|
+
- tests/test_reset.py
|
|
90
|
+
|
|
91
|
+
# レビューは read_only:true、全 dev タスクに depends_on を付けて末尾集約。
|
|
75
92
|
- id: review-auth
|
|
76
93
|
agent: code-reviewer
|
|
77
94
|
read_only: true
|
|
78
95
|
prompt: "認証モジュール全体のコードレビューを行ってください。"
|
|
79
|
-
depends_on: [tdd-auth-login, tdd-auth-logout]
|
|
80
|
-
concurrency_group: api-calls
|
|
96
|
+
depends_on: [tdd-auth-login, tdd-auth-logout, tdd-auth-reset]
|
|
81
97
|
|
|
82
98
|
defaults:
|
|
83
99
|
max_retries: 1
|
|
84
100
|
|
|
85
|
-
concurrency_limits:
|
|
86
|
-
api-calls: 2
|
|
87
|
-
|
|
88
101
|
on_failure:
|
|
89
102
|
webhook_url: "https://example.com/notify"
|
|
90
103
|
---
|
|
91
104
|
```
|
|
92
105
|
|
|
106
|
+
実行イメージ:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
時間→
|
|
110
|
+
[tdd-auth-login ]
|
|
111
|
+
[tdd-auth-logout ] ← 3 つが同時に起動(max_workers=3 想定)
|
|
112
|
+
[tdd-auth-reset ]
|
|
113
|
+
[review-auth] ← 全完了後に走る
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## アンチパターン(避けるべき書き方)
|
|
119
|
+
|
|
120
|
+
### A. 全部直列にしてしまう
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
tasks:
|
|
124
|
+
- id: tdd-login
|
|
125
|
+
agent: tdd-develop
|
|
126
|
+
# ...
|
|
127
|
+
- id: tdd-logout
|
|
128
|
+
agent: tdd-develop
|
|
129
|
+
depends_on: [tdd-login] # ❌ login と logout は別ファイル。依存ない
|
|
130
|
+
# ...
|
|
131
|
+
- id: tdd-reset
|
|
132
|
+
agent: tdd-develop
|
|
133
|
+
depends_on: [tdd-logout] # ❌ 「前のタスクが終わってから」レベルの依存
|
|
134
|
+
# ...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
→ `depends_on` チェーンの最大長 = タスク数 - 1。並列度 1 になり PO を使う意味なし。
|
|
138
|
+
|
|
139
|
+
### B. TDD を「テスト → 実装」に分割する
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
tasks:
|
|
143
|
+
- id: write-login-tests
|
|
144
|
+
agent: tester
|
|
145
|
+
# ...
|
|
146
|
+
- id: implement-login
|
|
147
|
+
agent: developer
|
|
148
|
+
depends_on: [write-login-tests] # ❌ tdd-develop が内部でやる仕事を外で分割
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
→ tdd-develop が tester→developer→tester ループを内部で回すので、外で分けると Red-Green-Refactor サイクルが壊れる。**1 機能 = 1 TDD タスク**でまとめる。
|
|
152
|
+
|
|
153
|
+
### C. writes が空・同じファイルが重複
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
tasks:
|
|
157
|
+
- id: tdd-login
|
|
158
|
+
writes: [] # ❌ PO の衝突検出が効かない
|
|
159
|
+
- id: tdd-auth-helpers
|
|
160
|
+
writes:
|
|
161
|
+
- src/auth/login.py # ❌ tdd-login と同じファイル → 競合
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
→ 必ず書き込みファイルを `writes` に列挙する。重複したらタスクをまとめるか `concurrency_group` で同時実行を制限する。
|
|
165
|
+
|
|
93
166
|
---
|
|
94
167
|
|
|
95
168
|
## C3 における配置場所
|
|
@@ -217,39 +217,29 @@ AskUserQuestion ツール:
|
|
|
217
217
|
|
|
218
218
|
---
|
|
219
219
|
|
|
220
|
-
## フェーズ D:
|
|
220
|
+
## フェーズ D: 実装
|
|
221
221
|
|
|
222
222
|
**フェーズ C から続いている場合:** plan-report はコンテキスト内にあるため読み直し不要。
|
|
223
223
|
**直接開始の場合:** Glob で `.claude/reports/plan-report-*.md` の最新を Read する。存在しない場合はフェーズ C から始めるよう案内して終了する。
|
|
224
224
|
|
|
225
|
+
### D-0: 実行モード自動判別
|
|
226
|
+
|
|
227
|
+
plan-report の冒頭を Read し、YAML フロントマター(`---` で始まり `po_plan_version: "0.1"` を含む)の有無を確認する。
|
|
228
|
+
|
|
229
|
+
**フロントマターありの場合:**
|
|
230
|
+
1. **最初に必ず** `.claude/skills/wave-execution.md` を Read する(記憶・推測で進めない)
|
|
231
|
+
2. `wave-execution.md` の手順に完全に従って wave 単位で実装を進める
|
|
232
|
+
3. 全 wave 完了後はフェーズ E(レビュー)へ進む(wave に reviewer タスクが含まれていれば E をスキップ可能と案内する)
|
|
233
|
+
|
|
234
|
+
**フロントマターなしの場合(legacy フォールバック):**
|
|
235
|
+
|
|
225
236
|
今日のセッションファイルに以下を追記する(未登録の場合のみ):
|
|
226
237
|
- `- [ ] tester: Red フェーズ`
|
|
227
238
|
- `- [ ] developer: Green フェーズ`
|
|
228
239
|
- `- [ ] developer: Refactor フェーズ`
|
|
229
240
|
- `- [ ] tester: 最終確認`
|
|
230
241
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
AskUserQuestion ツール:
|
|
234
|
-
```json
|
|
235
|
-
{
|
|
236
|
-
"questions": [{
|
|
237
|
-
"question": "TDD サイクルの実行モードを選んでください",
|
|
238
|
-
"options": [
|
|
239
|
-
{ "label": "TDD 逐次実行", "description": "従来の D-1〜D-5(tester→developer→tester)で1タスクずつ進める" },
|
|
240
|
-
{ "label": "PO 並列実行", "description": "parallel-orchestra で plan-report の独立タスクを git worktree 並列実行する(PO のインストールが必要)" }
|
|
241
|
-
]
|
|
242
|
-
}]
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**「TDD 逐次実行」の場合:** D-1 へ進む。
|
|
247
|
-
|
|
248
|
-
**「PO 並列実行」の場合:**
|
|
249
|
-
1. **最初に必ず** `.claude/skills/parallel-execution.md` を Read する(記憶・推測で進めない)
|
|
250
|
-
2. セッションファイルに `- [ ] PO 並列実行` を追記する
|
|
251
|
-
3. `parallel-execution.md` の手順を完全に守る
|
|
252
|
-
4. 完了後はフェーズ E(レビュー)へ進む
|
|
242
|
+
D-1 へ進む。
|
|
253
243
|
|
|
254
244
|
### D-1: tester(Red フェーズ)
|
|
255
245
|
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Wave Execution
|
|
2
|
+
|
|
3
|
+
`/develop` のフェーズ D で plan-report に YAML フロントマター(`po_plan_version: "0.1"`)が含まれるときに Read される手順。
|
|
4
|
+
|
|
5
|
+
C3 の親 Claude が plan-report の DAG を **wave 単位**で歩く。
|
|
6
|
+
- 単独 wave(タスク 1 件) → C3 が直接実行(Agent ツール起動 or ペルソナ採用)
|
|
7
|
+
- 複数 wave(タスク 2 件以上) → parallel-orchestra(PO)にスポット並列委譲
|
|
8
|
+
|
|
9
|
+
各 wave 完了後にユーザーの承認を取る。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 前提条件
|
|
14
|
+
|
|
15
|
+
- `claude-code-conductor` がインストール済みで `c3` コマンドが PATH 上にあること
|
|
16
|
+
- plan-report が `.claude/reports/plan-report-*.md` の形式で配置され、YAML フロントマターを持つこと(フロントマターが無ければ `dev-workflow.md` の D-1〜D-5 ceremony へフォールバック)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 0: 妥当性チェック
|
|
21
|
+
|
|
22
|
+
1. Glob で `.claude/reports/plan-report-*.md` の最新ファイルパスを取得する
|
|
23
|
+
2. Read で内容(フロントマター含む)を確認する
|
|
24
|
+
3. Bash で以下を実行する:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
c3 po dry-run <plan-report-path>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- 終了コード `0` = マニフェスト妥当 → Step 1 へ
|
|
31
|
+
- 終了コード `2` = マニフェストエラー(フィールド欠損・agent 不在等)→ stderr のメッセージを整形してユーザーに提示し、`/start` のフェーズ C(計画)を再実行するか手動で plan-report を編集するよう案内してこのスキルを終了する
|
|
32
|
+
- 終了コード `1` = PO 未インストール → 以下の案内文を**そのまま提示**してこのスキルを終了する:
|
|
33
|
+
|
|
34
|
+
> 並列実行を使うには `pip install parallel-orchestra` を実行してください。
|
|
35
|
+
> 詳細: https://pypi.org/project/parallel-orchestra/
|
|
36
|
+
|
|
37
|
+
親 Claude は逐次実行(`dev-workflow.md` の D-1〜D-5)に切り替えるか、PO をインストールして `/develop` を再実行するかをユーザーに選んでもらう。
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Step 1: wave 分解
|
|
42
|
+
|
|
43
|
+
Bash で以下を実行する:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
c3 po waves <plan-report-path>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
stdout の JSON は以下の形式になる:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"waves": [
|
|
54
|
+
{
|
|
55
|
+
"index": 0,
|
|
56
|
+
"tasks": [
|
|
57
|
+
{ "id": "tdd-login", "agent": "tdd-develop", "read_only": false, "writes": ["src/auth/login.py"], "prompt": "..." },
|
|
58
|
+
{ "id": "tdd-logout", "agent": "tdd-develop", "read_only": false, "writes": ["src/auth/logout.py"], "prompt": "..." }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"index": 1,
|
|
63
|
+
"tasks": [
|
|
64
|
+
{ "id": "review-auth", "agent": "code-reviewer", "read_only": true, "writes": [], "prompt": "..." }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- 終了コード `0` = 分解成功 → 親 Claude が JSON をパースして `waves` 配列を取得し Step 2 へ
|
|
72
|
+
- 終了コード `2` = フロントマター不正・循環依存等 → stderr メッセージを提示して終了
|
|
73
|
+
|
|
74
|
+
セッションファイル(`.claude/memory/sessions/YYYYMMDD.tmp`)に以下を追記する(未登録の場合のみ):
|
|
75
|
+
- 各 wave につき `- [ ] Wave {N} ({task_count} tasks)` を 1 行ずつ
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Step 2: wave ごとに実行する
|
|
80
|
+
|
|
81
|
+
`waves` 配列を index 順にループする。各 wave で以下を順に行う。
|
|
82
|
+
|
|
83
|
+
### 2-A: wave 内容を提示する
|
|
84
|
+
|
|
85
|
+
親 Claude が wave のタスク一覧を Markdown 表で提示する:
|
|
86
|
+
|
|
87
|
+
| id | agent | read_only | writes |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| tdd-login | tdd-develop | false | src/auth/login.py |
|
|
90
|
+
| tdd-logout | tdd-develop | false | src/auth/logout.py |
|
|
91
|
+
|
|
92
|
+
### 2-B: 実行可否をユーザーに確認する
|
|
93
|
+
|
|
94
|
+
AskUserQuestion ツール:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"questions": [{
|
|
99
|
+
"question": "Wave {N} を実行してよいですか?",
|
|
100
|
+
"options": [
|
|
101
|
+
{ "label": "承認・進む", "description": "この wave を実行する" },
|
|
102
|
+
{ "label": "中断", "description": "ここで wave 実行を停止する。完了済みの wave はそのまま残る" }
|
|
103
|
+
]
|
|
104
|
+
}]
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
「中断」の場合、セッションファイルの `## 試みたが失敗したアプローチ` に中断理由を追記してスキル終了。
|
|
109
|
+
|
|
110
|
+
### 2-C: ランナーを選んで実行する
|
|
111
|
+
|
|
112
|
+
`len(wave.tasks)` で分岐する。
|
|
113
|
+
|
|
114
|
+
#### case A: 単独 wave(タスク 1 件)
|
|
115
|
+
|
|
116
|
+
タスクの `agent` フィールドで更に分岐する。
|
|
117
|
+
|
|
118
|
+
##### A-1: `agent == "tdd-develop"` のとき
|
|
119
|
+
|
|
120
|
+
**ペルソナ採用パターン**で実行する。Agent ツールで起動するとサブエージェント depth 1 制限により内部の tester/developer サブエージェントが spawn できないため、親 Claude が直接 tdd-develop ペルソナで動く。
|
|
121
|
+
|
|
122
|
+
1. `.claude/agents/tdd-develop.md` を Read してペルソナを採用する
|
|
123
|
+
2. `.claude/skills/worktree-tdd-workflow.md` を Read して TDD ループ手順(tester→developer→tester)を取得する
|
|
124
|
+
3. タスクの `prompt` を実装内容として、worktree-tdd-workflow.md の Step 1〜4 を **親 Claude が直接** 実行する。tester / developer は Agent ツールでスポーン可能(depth 1 で完結する)
|
|
125
|
+
4. ループ完了後、結果を 2-D の集約に渡す
|
|
126
|
+
|
|
127
|
+
##### A-2: `agent` がそれ以外(`code-reviewer` / `security-reviewer` / `developer` / `tester` 等)
|
|
128
|
+
|
|
129
|
+
**Agent ツール起動パターン**で実行する。これらの agent は内部で更に subagent を spawn しないため depth 1 制限に抵触しない。
|
|
130
|
+
|
|
131
|
+
1. Agent ツールで `subagent_type` は指定せず(カスタム agent は subagent_type 不可)、プロンプトに以下を含める:
|
|
132
|
+
- 「`.claude/agents/{agent_name}.md` を Read してペルソナを採用すること」
|
|
133
|
+
- タスクの `prompt` 本文
|
|
134
|
+
2. Agent の返答を 2-D の集約に渡す
|
|
135
|
+
|
|
136
|
+
##### 将来 agent を追加する場合
|
|
137
|
+
|
|
138
|
+
「内部で更に subagent を呼ぶ agent」を新たに作る場合は、A-1 のペルソナ採用パターン側に追加する。判断基準: その agent の定義ファイルが「内部で Agent ツールを使う」前提になっているか。tdd-develop が現状の唯一の例。
|
|
139
|
+
|
|
140
|
+
#### case B: 複数 wave(タスク 2 件以上)
|
|
141
|
+
|
|
142
|
+
**PO スポット委譲**で実行する。
|
|
143
|
+
|
|
144
|
+
Bash で以下を実行する:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
c3 po run-wave <plan-report-path> --wave-index {N} --report .claude/reports/po-run-report-wave-{N}-{ts}.json
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
- `{N}` は wave の index
|
|
151
|
+
- `{ts}` は `YYYYMMDD-HHMMSS` 形式。Bash で `python -c "from datetime import datetime; print(datetime.now().strftime('%Y%m%d-%H%M%S'))"` を実行して取得
|
|
152
|
+
- `c3 po run-wave` は `.claude/tmp/po-manifest-wave-{N}-{ts}.md` に ephemeral マニフェストを生成し、PO に subprocess 委譲する。各タスクは PO が `claude -p --agent <name>` を独立 Claude セッション(depth 0)として起動するため、tdd-develop も内部で tester/developer を spawn できる
|
|
153
|
+
|
|
154
|
+
終了コードと意味:
|
|
155
|
+
|
|
156
|
+
| exit code | 意味 | 次のアクション |
|
|
157
|
+
|---|---|---|
|
|
158
|
+
| `0` | wave 内全タスク成功 | 2-D へ |
|
|
159
|
+
| `1` | 1件以上のタスクが失敗 | 2-D へ(失敗一覧を含めて提示) |
|
|
160
|
+
| `2` | マニフェストエラー(Step 0 をすり抜けた)| エラー内容を提示しスキル終了 |
|
|
161
|
+
| `3` | runner エラー(claude バイナリ不在等)| `c3 doctor` の結果を提示してスキル終了 |
|
|
162
|
+
|
|
163
|
+
実行完了後、生成された `po-run-report-wave-{N}-{ts}.json` を Read してタスクごとのステータスを取得する。
|
|
164
|
+
|
|
165
|
+
### 2-D: 結果を集約してユーザーに提示する
|
|
166
|
+
|
|
167
|
+
ランナー種別ごとに以下の形式で結果を提示する。
|
|
168
|
+
|
|
169
|
+
**case A(単独 wave):**
|
|
170
|
+
- A-1: 親 Claude の TDD ループ結果(tester/developer の Agent 返答の要約、最終 tester の合否)
|
|
171
|
+
- A-2: Agent の返答テキスト(必要なら要約)
|
|
172
|
+
|
|
173
|
+
**case B(複数 wave / PO 委譲):**
|
|
174
|
+
- `po-run-report-wave-{N}-*.json` を Markdown 表に整形:
|
|
175
|
+
|
|
176
|
+
| id | agent | status | worktree | duration | last_error_summary |
|
|
177
|
+
|---|---|---|---|---|---|
|
|
178
|
+
| tdd-login | tdd-develop | success | wt-tdd-login | 124s | - |
|
|
179
|
+
| tdd-logout | tdd-develop | failure | wt-tdd-logout | 89s | TestLogout::test_csrf failed |
|
|
180
|
+
|
|
181
|
+
### 2-E: 失敗があったら方針を確認する
|
|
182
|
+
|
|
183
|
+
case A で TDD ループが不合格のまま終わった、または case B で 1 件以上失敗した場合、AskUserQuestion で次を確認する:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"questions": [{
|
|
188
|
+
"question": "Wave {N} に失敗があります。どうしますか?",
|
|
189
|
+
"options": [
|
|
190
|
+
{ "label": "リトライ", "description": "同じ wave をもう一度実行する" },
|
|
191
|
+
{ "label": "スキップして次の wave へ", "description": "失敗を残したまま次の wave に進む" },
|
|
192
|
+
{ "label": "中断", "description": "ここで wave 実行を停止する。完了済みの wave はそのまま残る" }
|
|
193
|
+
]
|
|
194
|
+
}]
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- 「リトライ」 → 2-A から同じ wave を再実行
|
|
199
|
+
- 「スキップして次の wave へ」 → 失敗内容をセッションファイルの `## 試みたが失敗したアプローチ` に追記して次の wave へ
|
|
200
|
+
- 「中断」 → セッションファイルの該当 wave 行は `- [ ]` のままにしてスキル終了
|
|
201
|
+
|
|
202
|
+
### 2-F: wave 完了をセッションに記録する
|
|
203
|
+
|
|
204
|
+
全タスク成功した wave のみ、セッションファイルの `- [ ] Wave {N} (M tasks)` を `- [x] Wave {N} (M tasks)` に Edit する。
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Step 3: フェーズ E への遷移
|
|
209
|
+
|
|
210
|
+
全 wave 完了後、フェーズ E(レビュー)への遷移を案内する。
|
|
211
|
+
|
|
212
|
+
- plan-report に reviewer タスク(agent が `code-reviewer` / `security-reviewer`)が含まれている場合は wave で既に実行済みなので、二重レビューを避けるためにユーザーへ「wave 内で reviewer タスクが完了済みなので E をスキップしてもよい」と提示する
|
|
213
|
+
- reviewer タスクが含まれていない場合は通常通りフェーズ E へ進む
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 知識蓄積
|
|
218
|
+
|
|
219
|
+
- wave 実行で**特定パターンが詰まりがち**(例: tdd-develop の persona 起動で context が膨らみやすい)と気付いたら、セッションファイルの `## 試みたが失敗したアプローチ` に追記し `patterns` に登録する
|
|
220
|
+
- wave 分解の精度(planner の出力品質)に関する観察も同様に記録する。これは将来 planner 側のルール改善に繋がる
|
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0] - 2026-04-30
|
|
4
|
+
|
|
5
|
+
### Changed (breaking)
|
|
6
|
+
- `/develop` now auto-detects YAML frontmatter on the latest plan-report and
|
|
7
|
+
switches between two modes:
|
|
8
|
+
- **frontmatter present** → new "C3 main + PO spot" workflow. C3 walks the
|
|
9
|
+
DAG wave-by-wave, asks for user approval before each wave, and dispatches
|
|
10
|
+
each wave to the right runner: solo waves run on the C3 host (Agent-tool
|
|
11
|
+
spawn for `code-reviewer` / `developer` / `tester`, parent-Claude persona
|
|
12
|
+
adoption for `tdd-develop` to avoid the depth-1 nested-spawn limit), and
|
|
13
|
+
multi-task waves are delegated to parallel-orchestra via an ephemeral
|
|
14
|
+
wave-only manifest under `.claude/tmp/`.
|
|
15
|
+
- **no frontmatter** → legacy D-1〜D-5 sequential TDD ceremony, unchanged.
|
|
16
|
+
- The previous "PO 全委譲" model (D-0 two-choice prompt) and
|
|
17
|
+
`.claude/skills/parallel-execution.md` are removed. The new flow is
|
|
18
|
+
documented in `.claude/skills/wave-execution.md`.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- `c3 po waves <plan-report>` — prints the topological wave decomposition of
|
|
22
|
+
a manifest as JSON. Used by `wave-execution.md` to drive the per-wave loop.
|
|
23
|
+
- `c3 po run-wave <plan-report> --wave-index N` — generates a wave-only
|
|
24
|
+
ephemeral manifest under `.claude/tmp/po-manifest-wave-{N}-{ts}.md` and
|
|
25
|
+
hands it to parallel-orchestra.
|
|
26
|
+
- `c3.po.manifest.compute_waves(frontmatter)` — Kahn's-algorithm topological
|
|
27
|
+
wave decomposition. Detects cycles, unknown dependency ids, and duplicate
|
|
28
|
+
task ids.
|
|
29
|
+
- `c3.po.manifest.build_wave_manifest_text(frontmatter, wave_index)` —
|
|
30
|
+
emits a parseable plan-report Markdown for one wave, dropping `depends_on`
|
|
31
|
+
and webhook fields and decorating the manifest name with ` - wave N`.
|
|
32
|
+
- `tests/test_po_waves.py` (16 tests) and `tests/test_cli_po.py` (5 tests)
|
|
33
|
+
covering wave decomposition, ephemeral-manifest generation, CLI exit
|
|
34
|
+
codes, and frontmatter round-trip.
|
|
35
|
+
|
|
36
|
+
### Notes
|
|
37
|
+
- The persona-adoption pattern for `tdd-develop` in solo waves is the direct
|
|
38
|
+
consequence of Claude Code's depth-1 nested-spawn limit (a sub-agent
|
|
39
|
+
spawned via the Agent tool cannot itself spawn another sub-agent). For
|
|
40
|
+
agents that internally spawn sub-agents (today: `tdd-develop`), the parent
|
|
41
|
+
Claude reads the agent definition and adopts its persona instead. Other
|
|
42
|
+
agents (`code-reviewer`, `security-reviewer`, `developer`, `tester`) keep
|
|
43
|
+
using the standard Agent-tool spawn path.
|
|
44
|
+
|
|
45
|
+
## [0.2.4] - 2026-05-01
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
- `planner` agent now produces plan-reports designed for actual parallel
|
|
49
|
+
execution. Previously the agent only knew "emit YAML frontmatter"; without
|
|
50
|
+
rules for how to design the dependency graph it tended to write conservative
|
|
51
|
+
serial chains where every task depended on the previous one, defeating the
|
|
52
|
+
point of parallel-orchestra. Added a "並列実行のための設計指針" section
|
|
53
|
+
with eight concrete rules:
|
|
54
|
+
- depends_on only for true dependencies (not "just to be safe")
|
|
55
|
+
- serialization self-check: chain length ≦ tasks/2
|
|
56
|
+
- reviews go to the end via depends_on covering all dev tasks
|
|
57
|
+
- decompose at file/module boundaries, not function-level or module-level
|
|
58
|
+
- 1 TDD task = test + production + correction loop (do not split)
|
|
59
|
+
- default granularity: file / feature
|
|
60
|
+
- `writes` field is mandatory for collision detection
|
|
61
|
+
- duplicate writes must be merged, sequenced via depends_on, or grouped
|
|
62
|
+
- `.claude/docs/parallel-orchestra-manifest.md`: example expanded to three
|
|
63
|
+
dev tasks + a depends-on-all reviewer (showing real parallelism), plus
|
|
64
|
+
inline comments and an "アンチパターン" section that calls out
|
|
65
|
+
serialized chains, splitting TDD into separate tester/developer tasks,
|
|
66
|
+
and empty/duplicate `writes` fields.
|
|
67
|
+
|
|
3
68
|
## [0.2.3] - 2026-05-01
|
|
4
69
|
|
|
5
70
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-code-conductor
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Multi-agent orchestration framework for Claude Code (C3)
|
|
5
5
|
Project-URL: Homepage, https://github.com/satoh-y-0323/claude-code-conductor
|
|
6
6
|
Project-URL: Repository, https://github.com/satoh-y-0323/claude-code-conductor
|