delegated-execution について
delegated-execution は、既存の実装計画を新しいサブエージェントでタスクごとに進めるスキルです。次のタスクに進む前に、仕様適合性とコード品質の二段階レビューを必須とします。
主な機能
- 01タスクごとに新しいサブエージェント
- 02各タスク後の二段階レビュー
- 03レビューに基づく修正と再監査
- 04サブエージェントへのタスクコンテキスト提供
- 05ワークスペースと計画の事前要件
活用シーン
- 01独立した複数タスクを含む計画の実行
- 02実装の仕様適合性をタスクごとに確認
- 03コード品質レビューで見つかった問題の修正
- 04サブエージェント間のタスクコンテキストの分離
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ noobygains/ godmode --skill delegated-executionインストール後、Claude Code で/delegated-executionを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
code-quality-reviewer-prompt.mdimplementer-prompt.mdspec-reviewer-prompt.md詳細
委任実行
タスクごとに新しいサブエージェントを割り当て、各タスクの後に2段階のレビュー(まず仕様への準拠、次にコード品質)を実施して、計画を実行します。
基本原則: タスクごとに新しいサブエージェントを割り当て、2段階のレビュー(仕様、その後に品質)を行うことで、高品質かつ迅速に反復できます。
使用するタイミング
digraph applicability {
"Implementation plan exists?" [shape=diamond];
"Tasks mostly independent?" [shape=diamond];
"Stay in current session?" [shape=diamond];
"delegated-execution" [shape=box];
"task-runner" [shape=box];
"Manual execution or go back to intent-discovery" [shape=box];
"Implementation plan exists?" -> "Tasks mostly independent?" [label="yes"];
"Implementation plan exists?" -> "Manual execution or go back to intent-discovery" [label="no"];
"Tasks mostly independent?" -> "Stay in current session?" [label="yes"];
"Tasks mostly independent?" -> "Manual execution or go back to intent-discovery" [label="no - tightly coupled"];
"Stay in current session?" -> "delegated-execution" [label="yes"];
"Stay in current session?" -> "task-runner" [label="no - separate session"];
}
タスクランナーとの比較(別セッション):
- 同じセッション内で実行(コンテキストの切り替えなし)
- タスクごとに新しいサブエージェントを使用(コンテキストの汚染なし)
- 各タスクの後に2段階のレビューを実施:まず仕様への準拠、次にコード品質
- より速く反復できる(タスク間で人間が介在しない)
プロセス
digraph workflow {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch builder subagent (./implementer-prompt.md)" [shape=box];
"Builder subagent has questions?" [shape=diamond];
"Answer questions, supply context" [shape=box];
"Builder subagent implements, tests, commits, self-reviews" [shape=box];
"Dispatch spec auditor subagent (./spec-reviewer-prompt.md)" [shape=box];
"Spec auditor confirms code matches spec?" [shape=diamond];
"Builder subagent fixes spec gaps" [shape=box];
"Dispatch quality auditor subagent (./code-quality-reviewer-prompt.md)" [shape=box];
"Quality auditor approves?" [shape=diamond];
"Builder subagent fixes quality issues" [shape=box];
"Mark task complete in plan checklist" [shape=box];
}
"Read plan, extract all tasks with full text, note context, build task checklist" [shape=box];
"More tasks remaining?" [shape=diamond];
"Dispatch final quality auditor for entire implementation" [shape=box];
"Use godmode:merge-protocol" [shape=box style=filled fillcolor=lightgreen];
"Read plan, extract all tasks with full text, note context, build task checklist" -> "Dispatch builder subagent (./implementer-prompt.md)";
"Dispatch builder subagent (./implementer-prompt.md)" -> "Builder subagent has questions?";
"Builder subagent has questions?" -> "Answer questions, supply context" [label="yes"];
"Answer questions, supply context" -> "Dispatch builder subagent (./implementer-prompt.md)";
"Builder subagent has questions?" -> "Builder subagent implements, tests, commits, self-reviews" [label="no"];
"Builder subagent implements, tests, commits, self-reviews" -> "Dispatch spec auditor subagent (./spec-reviewer-prompt.md)";
"Dispatch spec auditor subagent (./spec-reviewer-prompt.md)" -> "Spec auditor confirms code matches spec?";
"Spec auditor confirms code matches spec?" -> "Builder subagent fixes spec gaps" [label="no"];
"Builder subagent fixes spec gaps" -> "Dispatch spec auditor subagent (./spec-reviewer-prompt.md)" [label="re-audit"];
"Spec auditor confirms code matches spec?" -> "Dispatch quality auditor subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
"Dispatch quality auditor subagent (./code-quality-reviewer-prompt.md)" -> "Quality auditor approves?";
"Quality auditor approves?" -> "Builder subagent fixes quality issues" [label="no"];
"Builder subagent fixes quality issues" -> "Dispatch quality auditor subagent (./code-quality-reviewer-prompt.md)" [label="re-audit"];
"Quality auditor approves?" -> "Mark task complete in plan checklist" [label="yes"];
"Mark task complete in plan checklist" -> "More tasks remaining?";
"More tasks remaining?" -> "Dispatch builder subagent (./implementer-prompt.md)" [label="yes"];
"More tasks remaining?" -> "Dispatch final quality auditor for entire implementation" [label="no"];
"Dispatch final quality auditor for entire implementation" -> "Use godmode:merge-protocol";
}
プロンプトのテンプレート
./implementer-prompt.md- ビルダーのサブエージェントを割り当てます./spec-reviewer-prompt.md- 仕様準拠の監査を行うサブエージェントを割り当てます./code-quality-reviewer-prompt.md- コード品質の監査を行うサブエージェントを割り当てます
ワークフローの例
You: I'm using Delegated Execution to implement this plan.
[Read plan file once: docs/plans/feature-plan.md]
[Extract all 5 tasks with full text and context]
[Build task checklist from all tasks]
Task 1: Hook installation script
[Get Task 1 text and context (already extracted)]
[Dispatch builder subagent with full task text + context]
Builder: "Before I start - should the hook install at user level or system level?"
You: "User level (~/.config/godmode/hooks/)"
Builder: "Understood. Implementing now..."
[Later] Builder:
- Implemented install-hook command
- Added tests, 5/5 passing
- Self-review: Noticed I missed --force flag, added it
- Committed
[Dispatch spec compliance auditor]
Spec auditor: PASS - All requirements met, nothing extraneous
[Get git SHAs, dispatch quality auditor]
Quality auditor: Strengths: Good test coverage, clean code. Issues: None. Approved.
[Mark Task 1 complete]
Task 2: Recovery modes
[Get Task 2 text and context (already extracted)]
[Dispatch builder subagent with full task text + context]
Builder: [No questions, proceeds]
Builder:
- Added verify/repair modes
- 8/8 tests passing
- Self-review: All good
- Committed
[Dispatch spec compliance auditor]
Spec auditor: FAIL - Issues:
- Missing: Progress reporting (spec says "report every 100 items")
- Extra: Added --json flag (not requested)
[Builder fixes issues]
Builder: Removed --json flag, added progress reporting
[Spec auditor re-audits]
Spec auditor: PASS - Spec compliant now
[Dispatch quality auditor]
Quality auditor: Strengths: Solid. Issues (Important): Magic number (100)
[Builder fixes]
Builder: Extracted PROGRESS_INTERVAL constant
[Quality auditor re-audits]
Quality auditor: Approved
[Mark Task 2 complete]
...
[After all tasks]
[Dispatch final quality auditor]
Final auditor: All requirements met, ready to merge
Done!
メリット
手動実行との比較:
- サブエージェントは自然にテストファーストに従います
- タスクごとに新しいコンテキストを使用(混乱なし)
- 並列実行に安全(サブエージェント同士が干渉しません)
- サブエージェントは作業の前も途中も質問できます
タスクランナーとの比較:
- 同じセッション内で実行(引き継ぎなし)
- 継続的に進捗(待ち時間なし)
- レビューチェックポイントが自動的に行われます
効率の向上:
- ファイルを読み込む手間がありません(コントローラーが全文を提供します)
- コントローラーが必要なコンテキストだけを厳選します
- サブエージェントは必要な情報をすべて事前に受け取ります
- 作業開始後ではなく、開始前に質問が提示されます
品質ゲート:
- 自己レビューで引き継ぎ前に問題を検出します
- 2段階のレビュー:仕様への準拠、その後にコード品質
- レビューの反復により、修正が実際に機能することを確認します
- 仕様準拠により、実装の過不足を防ぎます
- コード品質により、実装の完成度を確保します
コスト:
- サブエージェントの呼び出し回数が増えます(タスクごとにビルダー1つと監査役2つ)
- コントローラーの準備作業が増えます(すべてのタスクを事前に抽出)
- レビューの反復が増えます
- ただし、問題を早期に発見できます(後でデバッグするより低コストです)
ガードレール
禁止事項:
- ユーザーの明示的な同意なしに、main/master ブランチで実装を開始しない
- レビュー(仕様準拠またはコード品質)を省略しない
- 未解決の問題がある状態で先に進まない
- 複数のビルダーのサブエージェントを並列に割り当てない(競合が発生します)
- サブエージェントに計画ファイルを読ませない(代わりに全文を提供する)
- 状況を説明するコンテキストを省略しない(サブエージェントはタスクの位置づけを理解する必要があります)
- サブエージェントからの質問を無視しない(作業を進めさせる前に回答する)
- 仕様準拠で「ほぼ十分」を受け入れない(監査役が問題を見つけたら、未完了です)
- レビューの反復を省略しない(監査役が問題を見つけたら、ビルダーが修正し、再度監査します)
- ビルダーの自己レビューを実際のレビューの代わりにしない(両方が必要です)
- 仕様準拠の承認前に、品質レビューを開始しない(順序が誤っています)
- どちらかのレビューに未解決の問題がある間は、次のタスクに進まない
サブエージェントが質問した場合:
- 明確かつ十分に回答します
- 必要に応じて、追加のコンテキストを提供します
- 実装を急がせないでください
監査役が問題を見つけた場合:
- ビルダー(同じサブエージェント)が修正します
- 監査役が再度レビューします
- 承認されるまで繰り返します
- 再監査を省略しないでください
サブエージェントがタスクに失敗した場合:
- 具体的な指示を添えて、修正用のサブエージェントを割り当てます
- 手動で修正しないでください(コンテキストが汚染されます)
関連項目
必須のワークフロースキル:
- godmode:workspace-isolation - 必須:開始前に隔離されたワークスペースを設定します
- godmode:task-planning - このスキルが実行する計画を作成します
- godmode:quality-gate - 監査役のサブエージェント向けコードレビューテンプレート
- godmode:merge-protocol - すべてのタスク完了後に開発を最終化します
サブエージェントが使用するスキル:
- godmode:test-first - サブエージェントは各タスクでテストファーストに従います
代替ワークフロー:
- godmode:task-runner - 同じセッション内での実行ではなく、別セッションを使用する場合に使います
コメント
Markdown 対応