github / github/copilot-cli

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

Đang mở
#3,613 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:agents area:plugins
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### 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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.