github / github/copilot-cli

Declarative dependency-aware task-graph with parallel execution and automatic conflict resolution for plugin sub-agents

未關閉
#3,613 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:agents area:plugins
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

Declarative dependency-aware task-graph with parallel execution and automatic conflict resolution for plugin sub-agents

### Proposed solution

This is a follow-up to @github/copilot-cli/issues/3568 (which was closed and I don't have permission to reopen).

Add a built-in, declarative task-graph schema to Copilot CLI plugins, allowing plugin authors to define tasks, their dependencies/order, and conflict resolution strategies. Copilot CLI would then:
- Parse the dependency graph
- Run parallelizable tasks concurrently and sequential ones in order
- Handle conflicts between parallel tasks (e.g., serialize, merge, or rerun as needed)
- Return structured per-task results to support conditional workflows

This would reduce boilerplate, simplify orchestrator plugins, and improve reliability for complex, multi-step scenarios.

### Example prompts or workflows

A scenario for .NET repo upgrades:

1. **Upgrade .NET** (must finish first)
2. **Fix vulnerability A, B, C** (run in parallel, but could conflict on shared files)
3. **Deploy** (wait for all fixes to succeed)

Sample YAML task-graph schema:

```yaml
tasks:
- id: upgrade
agent: dotnet-upgrade-agent
prompt: "Upgrade the project from net6 to net8"
- id: fix-a
agent: security-agent
prompt: "Fix vulnerability CVE-A"
dependsOn: [upgrade]
- id: fix-b
agent: security-agent
prompt: "Fix vulnerability CVE-B"
dependsOn: [upgrade]
- id: fix-c
agent: security-agent
prompt: "Fix vulnerability CVE-C"
dependsOn: [upgrade]
- id: deploy
agent: deploy-agent
prompt: "Deploy the updated app to Azure"
dependsOn: [fix-a, fix-b, fix-c]
on_conflict: serialize # e.g. serialize | merge | rerun-affected
```

Benefits:
- Plugin authors describe dependencies instead of coding their own dispatch engine.
- Copilot CLI resolves parallelism and conflicts for them.
- Structured per-task results returned (pass/fail, output, logs, etc.).
- Enables orchestrator-style plugins for batch refactor, multi-repo actions, etc.

### Additional context

Current plugin `task` tool exposes parallel dispatch, but still requires imperative handling of ordering, conflict resolution and result management. Is a declarative, dependency-aware task-graph (with automatic parallelization + conflict resolution + structured results) something you'd consider?

貢獻指南

開啟貢獻指南

研究方向

Start by reviewing the current plugin `task` tool and the context from closed issue #3568. Determine where task dispatch and result handling are implemented, then define how the proposed schema, dependencies, parallel execution, conflict strategies, and per-task results should be specified and tested. Done means the design is agreed and the feature works for the upgrade, parallel-fix, and deploy workflow.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli, tooling
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。