ensemble-claude 0.3.0__py3-none-any.whl

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. ensemble/__init__.py +5 -0
  2. ensemble/ack.py +86 -0
  3. ensemble/cli.py +31 -0
  4. ensemble/commands/__init__.py +1 -0
  5. ensemble/commands/_init_impl.py +208 -0
  6. ensemble/commands/_launch_impl.py +217 -0
  7. ensemble/commands/init.py +35 -0
  8. ensemble/commands/launch.py +32 -0
  9. ensemble/config.py +218 -0
  10. ensemble/dashboard.py +168 -0
  11. ensemble/helpers.py +79 -0
  12. ensemble/lock.py +77 -0
  13. ensemble/logger.py +80 -0
  14. ensemble/notes.py +221 -0
  15. ensemble/queue.py +166 -0
  16. ensemble/templates/__init__.py +75 -0
  17. ensemble/templates/agents/conductor.md +239 -0
  18. ensemble/templates/agents/dispatch.md +351 -0
  19. ensemble/templates/agents/integrator.md +138 -0
  20. ensemble/templates/agents/learner.md +133 -0
  21. ensemble/templates/agents/reviewer.md +84 -0
  22. ensemble/templates/agents/security-reviewer.md +136 -0
  23. ensemble/templates/agents/worker.md +184 -0
  24. ensemble/templates/commands/go-light.md +49 -0
  25. ensemble/templates/commands/go.md +101 -0
  26. ensemble/templates/commands/improve.md +116 -0
  27. ensemble/templates/commands/review.md +74 -0
  28. ensemble/templates/commands/status.md +56 -0
  29. ensemble/templates/scripts/dashboard-update.sh +78 -0
  30. ensemble/templates/scripts/launch.sh +137 -0
  31. ensemble/templates/scripts/pane-setup.sh +111 -0
  32. ensemble/templates/scripts/setup.sh +163 -0
  33. ensemble/templates/scripts/worktree-create.sh +89 -0
  34. ensemble/templates/scripts/worktree-merge.sh +194 -0
  35. ensemble/templates/workflows/default.yaml +78 -0
  36. ensemble/templates/workflows/heavy.yaml +149 -0
  37. ensemble/templates/workflows/simple.yaml +41 -0
  38. ensemble/templates/workflows/worktree.yaml +202 -0
  39. ensemble/utils.py +60 -0
  40. ensemble/workflow.py +127 -0
  41. ensemble/worktree.py +322 -0
  42. ensemble_claude-0.3.0.dist-info/METADATA +144 -0
  43. ensemble_claude-0.3.0.dist-info/RECORD +46 -0
  44. ensemble_claude-0.3.0.dist-info/WHEEL +4 -0
  45. ensemble_claude-0.3.0.dist-info/entry_points.txt +2 -0
  46. ensemble_claude-0.3.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,194 @@
1
+ #!/bin/bash
2
+ # scripts/worktree-merge.sh
3
+ # Ensembleのworktreeをメインブランチにマージする
4
+
5
+ set -euo pipefail
6
+
7
+ # 色定義
8
+ RED='\033[0;31m'
9
+ GREEN='\033[0;32m'
10
+ YELLOW='\033[1;33m'
11
+ BLUE='\033[0;34m'
12
+ NC='\033[0m' # No Color
13
+
14
+ # ログ関数
15
+ log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
16
+ log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
17
+ log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
18
+ log_debug() { echo -e "${BLUE}[DEBUG]${NC} $1"; }
19
+
20
+ # 使用方法
21
+ usage() {
22
+ echo "Usage: $0 <worktree-path> [main-branch]"
23
+ echo ""
24
+ echo "Arguments:"
25
+ echo " worktree-path マージするworktreeのパス"
26
+ echo " main-branch マージ先ブランチ(デフォルト: main)"
27
+ echo ""
28
+ echo "Options:"
29
+ echo " --dry-run 実際にはマージせず、コンフリクトのみチェック"
30
+ echo " --auto-resolve 自動解決可能なコンフリクトを解決"
31
+ echo ""
32
+ echo "Example:"
33
+ echo " $0 ../ensemble-feature-auth"
34
+ echo " $0 ../ensemble-feature-auth main --dry-run"
35
+ exit 1
36
+ }
37
+
38
+ # 引数チェック
39
+ if [ $# -lt 1 ]; then
40
+ usage
41
+ fi
42
+
43
+ WORKTREE_PATH="$1"
44
+ MAIN_BRANCH="${2:-main}"
45
+ DRY_RUN=false
46
+ AUTO_RESOLVE=false
47
+
48
+ # オプション解析
49
+ for arg in "$@"; do
50
+ case $arg in
51
+ --dry-run)
52
+ DRY_RUN=true
53
+ shift
54
+ ;;
55
+ --auto-resolve)
56
+ AUTO_RESOLVE=true
57
+ shift
58
+ ;;
59
+ esac
60
+ done
61
+
62
+ # worktreeの存在確認
63
+ if [ ! -d "$WORKTREE_PATH" ]; then
64
+ log_error "Worktree not found: ${WORKTREE_PATH}"
65
+ exit 1
66
+ fi
67
+
68
+ # worktreeのブランチ名を取得
69
+ WORKTREE_PATH_ABS=$(cd "$WORKTREE_PATH" && pwd)
70
+ BRANCH_NAME=$(cd "$WORKTREE_PATH" && git rev-parse --abbrev-ref HEAD)
71
+
72
+ log_info "Merging worktree: ${WORKTREE_PATH_ABS}"
73
+ log_info "Branch: ${BRANCH_NAME}"
74
+ log_info "Target: ${MAIN_BRANCH}"
75
+
76
+ # メインリポジトリに移動
77
+ PROJECT_ROOT=$(git rev-parse --show-toplevel)
78
+ cd "$PROJECT_ROOT"
79
+
80
+ # メインブランチに切り替え
81
+ log_info "Switching to ${MAIN_BRANCH}..."
82
+ git checkout "$MAIN_BRANCH"
83
+
84
+ # 最新の変更をpull
85
+ log_info "Pulling latest changes..."
86
+ git pull --ff-only 2>/dev/null || log_warn "Could not fast-forward pull"
87
+
88
+ # dry-runモード
89
+ if [ "$DRY_RUN" = true ]; then
90
+ log_info "Dry-run mode: checking for conflicts..."
91
+
92
+ # マージを試行(コミットなし)
93
+ if git merge --no-commit --no-ff "$BRANCH_NAME" 2>/dev/null; then
94
+ log_info "No conflicts detected. Merge would succeed."
95
+ git merge --abort 2>/dev/null || true
96
+ exit 0
97
+ else
98
+ log_warn "Conflicts detected!"
99
+
100
+ # コンフリクトファイル一覧
101
+ echo ""
102
+ echo "Conflicting files:"
103
+ git diff --name-only --diff-filter=U
104
+ echo ""
105
+
106
+ git merge --abort 2>/dev/null || true
107
+ exit 1
108
+ fi
109
+ fi
110
+
111
+ # 実際のマージ
112
+ log_info "Merging ${BRANCH_NAME} into ${MAIN_BRANCH}..."
113
+
114
+ if git merge --no-ff "$BRANCH_NAME" -m "Merge ${BRANCH_NAME} into ${MAIN_BRANCH}"; then
115
+ log_info "Merge successful!"
116
+
117
+ # 統計情報
118
+ echo ""
119
+ echo "Merge statistics:"
120
+ git diff --stat HEAD~1
121
+
122
+ exit 0
123
+ else
124
+ log_warn "Merge conflict detected!"
125
+
126
+ # コンフリクトファイル一覧
127
+ CONFLICT_FILES=$(git diff --name-only --diff-filter=U)
128
+ echo ""
129
+ echo "Conflicting files:"
130
+ echo "$CONFLICT_FILES"
131
+ echo ""
132
+
133
+ if [ "$AUTO_RESOLVE" = true ]; then
134
+ log_info "Attempting auto-resolve..."
135
+
136
+ RESOLVED=0
137
+ UNRESOLVED=0
138
+
139
+ for file in $CONFLICT_FILES; do
140
+ # 自動解決を試みる(両方の変更を保持)
141
+ if git checkout --ours "$file" && git add "$file"; then
142
+ log_info "Auto-resolved (ours): $file"
143
+ ((RESOLVED++))
144
+ else
145
+ log_warn "Could not auto-resolve: $file"
146
+ ((UNRESOLVED++))
147
+ fi
148
+ done
149
+
150
+ if [ $UNRESOLVED -eq 0 ]; then
151
+ git commit -m "Merge ${BRANCH_NAME} into ${MAIN_BRANCH} (auto-resolved)"
152
+ log_info "All conflicts resolved!"
153
+ exit 0
154
+ else
155
+ log_error "Some conflicts could not be resolved automatically."
156
+ log_error "Please resolve manually and run: git commit"
157
+ exit 1
158
+ fi
159
+ else
160
+ # コンフリクト報告を生成
161
+ REPORT_DIR="${PROJECT_ROOT}/queue/reports"
162
+ mkdir -p "$REPORT_DIR"
163
+ TIMESTAMP=$(date +%Y%m%d-%H%M%S)
164
+ REPORT_FILE="${REPORT_DIR}/conflict-${TIMESTAMP}.yaml"
165
+
166
+ cat > "$REPORT_FILE" << EOF
167
+ type: conflict
168
+ timestamp: $(date -Iseconds)
169
+ worktree: ${WORKTREE_PATH_ABS}
170
+ branch: ${BRANCH_NAME}
171
+ main_branch: ${MAIN_BRANCH}
172
+ conflict_files:
173
+ EOF
174
+
175
+ for file in $CONFLICT_FILES; do
176
+ cat >> "$REPORT_FILE" << EOF
177
+ - file: ${file}
178
+ status: unmerged
179
+ EOF
180
+ done
181
+
182
+ cat >> "$REPORT_FILE" << EOF
183
+
184
+ action_required: |
185
+ Manual conflict resolution needed.
186
+ Run: git status
187
+ Resolve conflicts, then: git add . && git commit
188
+ EOF
189
+
190
+ log_info "Conflict report saved to: ${REPORT_FILE}"
191
+ log_error "Please resolve conflicts manually."
192
+ exit 1
193
+ fi
194
+ fi
@@ -0,0 +1,78 @@
1
+ name: default
2
+ description: |
3
+ 標準ワークフロー。計画→実装→並列レビュー→改善の全サイクル。
4
+ 通常の機能開発向け。
5
+ max_iterations: 15
6
+ cost_level: medium
7
+
8
+ steps:
9
+ - name: plan
10
+ description: タスク分析と実行計画の策定
11
+ agent: conductor
12
+ mode: plan
13
+ thinking: false
14
+ outputs:
15
+ - plan.md
16
+ - task-breakdown.md
17
+ transitions:
18
+ - condition: plan_approved
19
+ next_step: execute
20
+ - condition: needs_clarification
21
+ next_step: PAUSE
22
+
23
+ - name: execute
24
+ description: |
25
+ 計画に基づき実行。タスク規模に応じて
26
+ subagent/tmux並列/worktree分離を自動選択。
27
+ agent: conductor
28
+ mode: execute
29
+ allow_parallel: true
30
+ allow_worktree: true
31
+ transitions:
32
+ - condition: execution_complete
33
+ next_step: parallel_review
34
+ - condition: blocked
35
+ next_step: plan
36
+
37
+ - name: parallel_review
38
+ description: アーキテクチャとセキュリティを並列でレビュー
39
+ parallel:
40
+ - name: arch-review
41
+ agent: reviewer
42
+ rules:
43
+ - condition: approved
44
+ - condition: needs_fix
45
+ instruction_template: |
46
+ アーキテクチャと設計品質に集中してレビューしてください。
47
+ - コード構造
48
+ - 依存関係の方向
49
+ - 命名規則
50
+ - SOLID原則の遵守
51
+
52
+ - name: security-review
53
+ agent: security-reviewer
54
+ rules:
55
+ - condition: approved
56
+ - condition: needs_fix
57
+ instruction_template: |
58
+ セキュリティに集中してレビューしてください。
59
+ - インジェクション脆弱性
60
+ - 認証・認可
61
+ - データ保護
62
+ - OWASP Top 10
63
+
64
+ rules:
65
+ - condition: all("approved")
66
+ next_step: improve
67
+ - condition: any("needs_fix")
68
+ next_step: execute
69
+
70
+ - name: improve
71
+ description: 自己改善フェーズ
72
+ agent: learner
73
+ outputs:
74
+ - notes/{task-id}/lessons.md
75
+ - notes/{task-id}/skill-candidates.md
76
+ transitions:
77
+ - condition: done
78
+ next_step: COMPLETE
@@ -0,0 +1,149 @@
1
+ name: heavy
2
+ description: |
3
+ 重量級ワークフロー。大規模リファクタ、セキュリティ重要タスク向け。
4
+ 5段階レビュー(アーキ、セキュリティ、パフォーマンス、テスト、統合)。
5
+ 修正ループあり、最大25イテレーション。
6
+ max_iterations: 25
7
+ cost_level: high
8
+
9
+ steps:
10
+ - name: plan
11
+ description: 詳細計画の策定(リスク分析含む)
12
+ agent: conductor
13
+ mode: plan
14
+ thinking: false
15
+ outputs:
16
+ - plan.md
17
+ - task-breakdown.md
18
+ - risk-analysis.md
19
+ transitions:
20
+ - condition: plan_approved
21
+ next_step: design_review
22
+ - condition: needs_clarification
23
+ next_step: PAUSE
24
+
25
+ - name: design_review
26
+ description: 実装前のアーキテクチャ設計レビュー
27
+ agent: reviewer
28
+ instruction_template: |
29
+ 実装前のアーキテクチャ設計をレビューしてください。
30
+ - 全体構造の妥当性
31
+ - スケーラビリティ
32
+ - 依存関係の健全性
33
+ - 既存コードとの整合性
34
+ transitions:
35
+ - condition: approved
36
+ next_step: execute
37
+ - condition: needs_fix
38
+ next_step: plan
39
+
40
+ - name: execute
41
+ description: |
42
+ 計画に基づき実行。大規模タスクのため
43
+ worktree分離を優先的に選択。
44
+ agent: conductor
45
+ mode: execute
46
+ allow_parallel: true
47
+ allow_worktree: true
48
+ prefer_worktree: true
49
+ transitions:
50
+ - condition: execution_complete
51
+ next_step: parallel_review
52
+ - condition: blocked
53
+ next_step: plan
54
+
55
+ - name: parallel_review
56
+ description: 5段階並列レビュー
57
+ parallel:
58
+ - name: arch-review
59
+ agent: reviewer
60
+ rules:
61
+ - condition: approved
62
+ - condition: needs_fix
63
+ instruction_template: |
64
+ アーキテクチャと設計品質を厳密にレビューしてください。
65
+ - コード構造と責務分離
66
+ - 依存関係の方向(クリーンアーキテクチャ準拠)
67
+ - SOLID原則の遵守
68
+ - 抽象化レベルの適切性
69
+
70
+ - name: security-review
71
+ agent: security-reviewer
72
+ rules:
73
+ - condition: approved
74
+ - condition: needs_fix
75
+ instruction_template: |
76
+ セキュリティを厳密にレビューしてください。
77
+ - OWASP Top 10(全項目チェック)
78
+ - 認証・認可の実装
79
+ - データ保護(暗号化、サニタイズ)
80
+ - シークレット管理
81
+ - 依存ライブラリの脆弱性
82
+
83
+ - name: perf-review
84
+ agent: reviewer
85
+ rules:
86
+ - condition: approved
87
+ - condition: needs_fix
88
+ instruction_template: |
89
+ パフォーマンス観点でレビューしてください。
90
+ - アルゴリズムの計算量
91
+ - メモリ使用量
92
+ - N+1クエリ問題
93
+ - キャッシュ戦略
94
+ - 非同期処理の適切性
95
+
96
+ - name: test-review
97
+ agent: reviewer
98
+ rules:
99
+ - condition: approved
100
+ - condition: needs_fix
101
+ instruction_template: |
102
+ テスト品質をレビューしてください。
103
+ - カバレッジ(80%以上必須)
104
+ - エッジケースの網羅
105
+ - テストの独立性
106
+ - モックの適切性
107
+ - 統合テストの存在
108
+
109
+ - name: integration-review
110
+ agent: integrator
111
+ rules:
112
+ - condition: approved
113
+ - condition: needs_fix
114
+ instruction_template: |
115
+ 統合観点でレビューしてください。
116
+ - 既存機能への影響
117
+ - 後方互換性
118
+ - マイグレーション要件
119
+ - デプロイ手順
120
+
121
+ rules:
122
+ - condition: all("approved")
123
+ next_step: final_check
124
+ - condition: any("needs_fix")
125
+ next_step: execute
126
+
127
+ - name: final_check
128
+ description: 最終確認(Conductorによる総合判断)
129
+ agent: conductor
130
+ instruction_template: |
131
+ 全レビューが承認されました。最終確認を行ってください。
132
+ - 全ての要件が満たされているか
133
+ - 残課題はないか
134
+ - リリースノートの内容
135
+ transitions:
136
+ - condition: approved
137
+ next_step: improve
138
+ - condition: needs_fix
139
+ next_step: execute
140
+
141
+ - name: improve
142
+ description: 自己改善フェーズ
143
+ agent: learner
144
+ outputs:
145
+ - notes/{task-id}/lessons.md
146
+ - notes/{task-id}/skill-candidates.md
147
+ transitions:
148
+ - condition: done
149
+ next_step: COMPLETE
@@ -0,0 +1,41 @@
1
+ name: simple
2
+ description: |
3
+ 軽量ワークフロー。README更新、typo修正など軽微な変更向け。
4
+ レビューは1回、修正ループなし。
5
+ max_iterations: 5
6
+ cost_level: low
7
+
8
+ steps:
9
+ - name: plan
10
+ description: 簡易計画の策定
11
+ agent: conductor
12
+ mode: plan
13
+ thinking: false
14
+ outputs:
15
+ - plan.md
16
+ transitions:
17
+ - condition: plan_approved
18
+ next_step: execute
19
+ - condition: needs_clarification
20
+ next_step: PAUSE
21
+
22
+ - name: execute
23
+ description: タスクの直接実行
24
+ agent: conductor
25
+ mode: execute
26
+ allow_parallel: false
27
+ allow_worktree: false
28
+ transitions:
29
+ - condition: execution_complete
30
+ next_step: review
31
+ - condition: blocked
32
+ next_step: plan
33
+
34
+ - name: review
35
+ description: 簡易レビュー(1回のみ)
36
+ agent: reviewer
37
+ transitions:
38
+ - condition: approved
39
+ next_step: COMPLETE
40
+ - condition: needs_fix
41
+ next_step: execute
@@ -0,0 +1,202 @@
1
+ name: worktree
2
+ description: |
3
+ git worktree統合ワークフロー。
4
+ 複数の独立した機能を並列開発し、最終的にメインブランチに統合する。
5
+ 大規模タスク(パターンC)向け。
6
+ max_iterations: 20
7
+ cost_level: high
8
+
9
+ steps:
10
+ - name: plan
11
+ description: タスク分析とworktree分割計画の策定
12
+ agent: conductor
13
+ mode: plan
14
+ thinking: false
15
+ outputs:
16
+ - plan.md
17
+ - worktree-breakdown.md
18
+ transitions:
19
+ - condition: plan_approved
20
+ next_step: create_worktrees
21
+ - condition: needs_clarification
22
+ next_step: PAUSE
23
+
24
+ - name: create_worktrees
25
+ description: |
26
+ 計画に基づきworktreeを作成。
27
+ 各worktreeで独立したブランチを用意。
28
+ agent: conductor
29
+ mode: execute
30
+ script: |
31
+ for branch in $WORKTREE_BRANCHES; do
32
+ ./scripts/worktree-create.sh "$branch" main
33
+ done
34
+ transitions:
35
+ - condition: worktrees_created
36
+ next_step: parallel_develop
37
+ - condition: creation_failed
38
+ next_step: PAUSE
39
+
40
+ - name: parallel_develop
41
+ description: 各worktreeで並列開発
42
+ parallel:
43
+ - name: worktree-1
44
+ agent: coder
45
+ worktree: true
46
+ rules:
47
+ - condition: complete
48
+ - condition: blocked
49
+ instruction_template: |
50
+ worktree内で担当機能を実装してください。
51
+ - TDDでテストファーストで開発
52
+ - コミットは細かく
53
+ - 完了したらqueue/reports/に報告
54
+
55
+ - name: worktree-2
56
+ agent: coder
57
+ worktree: true
58
+ rules:
59
+ - condition: complete
60
+ - condition: blocked
61
+
62
+ - name: worktree-3
63
+ agent: coder
64
+ worktree: true
65
+ rules:
66
+ - condition: complete
67
+ - condition: blocked
68
+
69
+ rules:
70
+ - condition: all("complete")
71
+ next_step: integrate
72
+ - condition: any("blocked")
73
+ next_step: resolve_blocked
74
+
75
+ - name: resolve_blocked
76
+ description: ブロックされたworktreeの問題を解決
77
+ agent: conductor
78
+ mode: execute
79
+ transitions:
80
+ - condition: resolved
81
+ next_step: parallel_develop
82
+ - condition: escalate
83
+ next_step: PAUSE
84
+
85
+ - name: integrate
86
+ description: 各worktreeをメインブランチに統合
87
+ agent: integrator
88
+ mode: execute
89
+ script: |
90
+ for worktree in $WORKTREE_PATHS; do
91
+ ./scripts/worktree-merge.sh "$worktree" main
92
+ done
93
+ transitions:
94
+ - condition: merge_success
95
+ next_step: cross_review
96
+ - condition: conflict_detected
97
+ next_step: resolve_conflict
98
+
99
+ - name: resolve_conflict
100
+ description: コンフリクト解決
101
+ agent: integrator
102
+ mode: execute
103
+ auto_resolve: true
104
+ transitions:
105
+ - condition: resolved
106
+ next_step: cross_review
107
+ - condition: needs_manual
108
+ next_step: escalate_conflict
109
+
110
+ - name: escalate_conflict
111
+ description: 手動解決が必要なコンフリクトをConductorに報告
112
+ agent: conductor
113
+ mode: execute
114
+ transitions:
115
+ - condition: manual_resolved
116
+ next_step: cross_review
117
+ - condition: abort
118
+ next_step: PAUSE
119
+
120
+ - name: cross_review
121
+ description: 相互レビュー - 各担当が他の変更をレビュー
122
+ parallel:
123
+ - name: review-1
124
+ agent: reviewer
125
+ scope: worktree-2,worktree-3
126
+ rules:
127
+ - condition: approved
128
+ - condition: needs_fix
129
+ instruction_template: |
130
+ 自分が担当したworktree-1以外の変更をレビューしてください。
131
+
132
+ - name: review-2
133
+ agent: reviewer
134
+ scope: worktree-1,worktree-3
135
+ rules:
136
+ - condition: approved
137
+ - condition: needs_fix
138
+
139
+ - name: review-3
140
+ agent: reviewer
141
+ scope: worktree-1,worktree-2
142
+ rules:
143
+ - condition: approved
144
+ - condition: needs_fix
145
+
146
+ rules:
147
+ - condition: all("approved")
148
+ next_step: security_review
149
+ - condition: any("needs_fix")
150
+ next_step: fix_issues
151
+
152
+ - name: fix_issues
153
+ description: レビューで指摘された問題を修正
154
+ agent: conductor
155
+ mode: execute
156
+ transitions:
157
+ - condition: fixed
158
+ next_step: cross_review
159
+ - condition: needs_discussion
160
+ next_step: PAUSE
161
+
162
+ - name: security_review
163
+ description: 統合後のセキュリティレビュー
164
+ agent: security-reviewer
165
+ transitions:
166
+ - condition: approved
167
+ next_step: cleanup
168
+ - condition: needs_fix
169
+ next_step: fix_security
170
+
171
+ - name: fix_security
172
+ description: セキュリティ問題を修正
173
+ agent: conductor
174
+ mode: execute
175
+ transitions:
176
+ - condition: fixed
177
+ next_step: security_review
178
+
179
+ - name: cleanup
180
+ description: worktreeとブランチのクリーンアップ
181
+ agent: integrator
182
+ mode: execute
183
+ script: |
184
+ for worktree in $WORKTREE_PATHS; do
185
+ git worktree remove "$worktree"
186
+ done
187
+ for branch in $WORKTREE_BRANCHES; do
188
+ git branch -d "ensemble/$branch"
189
+ done
190
+ transitions:
191
+ - condition: done
192
+ next_step: improve
193
+
194
+ - name: improve
195
+ description: 自己改善フェーズ
196
+ agent: learner
197
+ outputs:
198
+ - notes/{task-id}/lessons.md
199
+ - notes/{task-id}/skill-candidates.md
200
+ transitions:
201
+ - condition: done
202
+ next_step: COMPLETE