vault: sync ECC orchestration findings, add PRP/DevFleet/Agent-worktree routes, fix outdated counts

This commit is contained in:
Yaojia Wang
2026-04-14 23:10:03 +02:00
parent e3d669818c
commit 8e74b9efd0
3 changed files with 235 additions and 21 deletions

View File

@@ -1,7 +1,8 @@
---
created: "2026-04-06"
updated: "2026-04-14"
type: resource
tags: [resource, claude-code, AI-tools, orchestrate, migration, feature-dev, GSD, ECC, windows-compatible]
tags: [resource, claude-code, AI-tools, orchestrate, migration, feature-dev, GSD, PRP, devfleet, ECC, windows-compatible]
source: "https://github.com/affaan-m/everything-claude-code"
---
@@ -9,6 +10,8 @@ source: "https://github.com/affaan-m/everything-claude-code"
`/ecc:orchestrate` 已标记为 legacy shim。底层委托给 `dmux-workflows`(需 tmux`autonomous-agent-harness`(部分依赖 tmux。Windows 上基本不可用。本文档记录迁移路径。
> **先看决策表**:见文末「一张表选编排方式」。
相关笔记:[[Autonomous Agent Harness 自主代理框架]]、[[Everything Claude Code 完整指南]]
## orchestrate 做了什么
@@ -63,7 +66,102 @@ source: "https://github.com/affaan-m/everything-claude-code"
| 安全相关 | 任何组合 + `/ecc:security-review` |
| 最终验证 | `/ecc:verify` |
### 路线 C全项目多阶段 — GSD
### 路线 CPRP 工作流PRD → 实施 → 提交 → PR
**适合结构化 PRD/migration-plan 等带 Implementation Phases 的文档。** 一条龙自动走完:
```
/prp-plan <feature 描述 | path/to/prd.md> # 解析 PRD 找到下一个 pending phase产出完整实施计划
/prp-implement <上一步生成的 plan 路径> # 按计划严格实施 + 验证循环
/prp-commit # 分析变更,起草 conventional commit
/prp-pr # 汇总提交生成 PR
```
特点:
- `/prp-plan` 自动检测输入PRD 文件 → 选下一个 pending phase自由描述 → 直接规划
- 黄金原则:把实施时可能要搜的所有模式/惯例**提前抓进 plan**,实施阶段不再回去搜
- Windows 原生可用
### 路线 D多模型协同 — `/multi-workflow`
**Claude 编排 + Codex 后端 + Gemini 前端 的 6 阶段流水线。** 适合全栈功能。
```
/multi-workflow "add real-time notifications when market resolves"
```
6 阶段Research → Ideation → Plan → Execute → Optimize → Review。每阶段通过 `~/.claude/bin/codeagent-wrapper` 并行调用 Codex/Gemini`run_in_background: true`),用 `TaskOutput` 等结果。外部模型**无文件写权限**,所有修改由 Claude 落盘。
变体:`/multi-plan`(只规划)、`/multi-backend``/multi-frontend``/multi-execute`
### 路线 EDAG 式并行多 agent — `claude-devfleet`
**用独立 git worktree 跑多个 Claude Code agent按 DAG 依赖自动调度Windows 原生可用。** 需本地启 DevFleet 服务并通过 MCP 接入:
```bash
claude mcp add devfleet --transport http http://localhost:18801/mcp
```
核心调用(通过 MCP tool
```
plan_project(prompt="Build a REST API with auth and tests")
→ 返回 project_id + 一系列 missions含 depends_on 链、auto_dispatch=true
dispatch_mission(mission_id=<root>)
→ 根 mission 启动,后续 mission 在依赖满足时自动派发
get_mission_status / get_dashboard / get_report
→ 监控与汇报
```
特点:
- 每个 mission 在独立 worktree 中运行,完成后自动 merge
- 默认最多 3 个并发 agent`DEVFLEET_MAX_AGENTS` 可配)
- 合并冲突时留在 worker 分支手动处理
- 长任务建议用 `get_mission_status` 轮询30-60 秒间隔),避免用 `wait_for_mission` 阻塞会话
### 路线 F会话内并行 — Agent 工具 + worktree 隔离
**当前会话里直接 spawn 多个子代理,`isolation: "worktree"` 参数自动建临时 worktreeWindows 原生可用。** 不需要 tmux、不需要外部服务。
主代理调用示例Claude 自身能用):
```
并行 3 个子 agent
- subagent_type: general-purpose, isolation: worktree, prompt: "迁移 module X"
- subagent_type: general-purpose, isolation: worktree, prompt: "迁移 module Y"
- subagent_type: csharp-reviewer, prompt: "审查 module X/Y 结果"
```
适合:互相独立的迁移任务、并行审查、互不冲突的多模块改造。不适合:跨模块强耦合、需要相互看到中间状态的任务。
### 路线 G外部 tmux + worktree 脚本 — `scripts/orchestrate-worktrees.js`
**ECC 自带的长周期/跨 harness 编排助手。需要 tmuxLinux/macOS/WSL。**
```bash
node scripts/orchestrate-worktrees.js plan.json --execute
```
`plan.json` 结构:
```json
{
"sessionName": "skill-audit",
"baseRef": "HEAD",
"seedPaths": ["scripts/helper.js", ".claude/plan/spec.md"],
"launcherCommand": "codex exec --cwd {worktree_path} --task-file {task_file}",
"workers": [
{"name": "docs-a", "task": "Fix skills 1-4."},
{"name": "docs-b", "task": "Fix skills 5-8."}
]
}
```
自动完成:每 worker 一个分支+worktree、覆盖 `seedPaths` 中的本地脏文件、写 `.orchestration/<session>/` 下的 task/handoff/status 文件、启动 tmux 会话挂 panes。
状态快照:`node scripts/orchestration-status.js <plan.json>`
### 路线 H全项目多阶段 — GSD
GSDGet Shit Done是 ECC 集成的项目级编排系统Windows 原生可用。
@@ -105,12 +203,14 @@ npx get-shit-done-cc@latest
| 旧命令 | 新命令 | 说明 |
| ---------------------------------- | --------------------------------------------- | ------------------------ |
| `/ecc:orchestrate feature "desc"` | `/ecc:feature-dev "desc"` | 单功能全流程 |
| `/ecc:orchestrate feature "desc"` | `/ecc:feature-dev "desc"` `/prp-plan`+`/prp-implement` | 单功能全流程 |
| `/ecc:orchestrate bugfix "desc"` | `/ecc:tdd` + `/ecc:code-review` | 先写失败测试再修 |
| `/ecc:orchestrate refactor "desc"` | `/ecc:plan` + `/ecc:tdd` + `/ecc:code-review` | 先规划再重构 |
| `/ecc:orchestrate security "desc"` | 任何路线 + `/ecc:security-review` | 加安全审查 |
| 多阶段自动执行 | `/gsd:autonomous` | GSD 接管 |
| 并行编排 | 不可用Windows | 用 Agent/Task tool 做进程内并行 |
| 并行编排tmux | `claude-devfleet` MCP 或 Agent+worktree | Windows 原生替代 |
| PRD → 实施 | `/prp-plan <prd.md>``/prp-implement` | 自动解析 phases |
| 多模型协同 | `/multi-workflow` | Codex+Gemini+Claude |
## CLAUDE.md 更新
@@ -138,13 +238,35 @@ npx get-shit-done-cc@latest
|------|---------|------|
| `/ecc:feature-dev` | 可用 | Claude Code 内部,不依赖外部工具 |
| `/ecc:plan` + `/ecc:tdd` + ... | 可用 | 同上 |
| `/prp-plan` / `/prp-implement` / `/prp-commit` / `/prp-pr` | 可用 | 全部 Claude Code 内部 |
| `/multi-workflow` (含 Codex/Gemini) | 可用 | 需装 codeagent-wrapper不依赖 tmux |
| `/gsd:autonomous` | 可用 | 用 Claude Code Task tool 做并行 |
| Agent 工具 + `isolation: "worktree"` | 可用 | 原生 git worktree不依赖 tmux |
| `claude-devfleet` (MCP) | 可用 | HTTP MCP 接入worker 在独立 worktree |
| `/ecc:orchestrate` | **不可用** | Legacy底层依赖 tmux |
| `dmux-workflows` | **不可用** | 需要 tmux |
| `dmux-workflows` | **不可用** | 需要 tmux(除非 WSL |
| `scripts/orchestrate-worktrees.js` | **WSL 可用** | 建 tmux session 挂 panes |
| `auto-pilot.sh` 脚本 | 可用 | Git Bash每阶段独立 `claude -p` |
---
## 一张表选编排方式
| 我要... | 选 | 入口 |
|---------|-----|------|
| 规划单个功能,确认后再写 | `/plan` | 命令 |
| 单功能全流程(含 TDD+审查) | `/ecc:feature-dev` | 命令 |
| 已有 PRD/migration-plan 带 phases | `/prp-plan <path>``/prp-implement` | 命令 |
| 前后端都动Codex/Gemini 辅助) | `/multi-workflow` | 命令 |
| 会话内并行几个独立任务 | Agent 工具 + `isolation: worktree` | 主代理直接 spawn |
| DAG 调度多 worker 自动合并 | `claude-devfleet` | MCP |
| 整个项目/多 milestone 生命周期 | `/gsd:new-project``/gsd:autonomous` | 命令 |
| 无人值守长时间跑 | `autonomous-agent-harness` + crons | MCP scheduled-tasks |
| 定时重复同一个任务 | `/loop-start <interval> <prompt>` | 命令 |
| 跨 harness 长周期编排Linux/WSL | `scripts/orchestrate-worktrees.js` | 脚本 |
---
## 什么时候需要外部脚本
大部分情况下 Claude Code 自己编排(`/ecc:feature-dev` 或 GSD就够了。外部脚本`auto-pilot.sh`)只在以下场景有价值: