team-ultra-analyze
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTeam Ultra Analyze
Team Ultra Analyze
深度协作分析团队技能。将单体分析工作流拆分为 5 角色协作:探索→分析→讨论→综合。支持 Quick/Standard/Deep 三种管道模式,通过讨论循环实现用户引导的渐进式理解深化。所有成员通过 路由到角色执行逻辑。
--role=xxx深度协作分析团队技能。将单体分析工作流拆分为5角色协作:探索→分析→讨论→综合。支持Quick/Standard/Deep三种管道模式,通过讨论循环实现用户引导的渐进式理解深化。所有成员通过 路由到角色执行逻辑。
--role=xxxArchitecture Overview
架构概览
┌─────────────────────────────────────────────────────────┐
│ Skill(skill="team-ultra-analyze", args="--role=xxx") │
└──────────────────────┬──────────────────────────────────┘
│ Role Router
┌──────────┬───────┼───────────┬───────────┐
↓ ↓ ↓ ↓ ↓
┌────────┐┌────────┐┌────────┐┌──────────┐┌───────────┐
│coordi- ││explorer││analyst ││discussant││synthesizer│
│nator ││EXPLORE-││ANALYZE-││DISCUSS-* ││SYNTH-* │
│ roles/ ││* roles/││* roles/││ roles/ ││ roles/ │
└────────┘└────────┘└────────┘└──────────┘└───────────┘┌─────────────────────────────────────────────────────────┐
│ Skill(skill="team-ultra-analyze", args="--role=xxx") │
└──────────────────────┬──────────────────────────────────┘
│ Role Router
┌──────────┬───────┼───────────┬───────────┐
↓ ↓ ↓ ↓ ↓
┌────────┐┌────────┐┌────────┐┌──────────┐┌───────────┐
│coordi- ││explorer││analyst ││discussant││synthesizer│
│nator ││EXPLORE-││ANALYZE-││DISCUSS-* ││SYNTH-* │
│ roles/ ││* roles/││* roles/││ roles/ ││ roles/ │
└────────┘└────────┘└────────┘└──────────┘└───────────┘Command Architecture
命令架构
roles/
├── coordinator/
│ ├── role.md # 编排:话题澄清、管道选择、讨论循环、结果汇报
│ └── commands/
│ ├── dispatch.md # 任务链创建与依赖管理
│ └── monitor.md # 进度监控 + 讨论循环
├── explorer/
│ ├── role.md # 代码库探索
│ └── commands/
│ └── explore.md # cli-explore-agent 并行探索
├── analyst/
│ ├── role.md # 深度分析
│ └── commands/
│ └── analyze.md # CLI 多视角分析
├── discussant/
│ ├── role.md # 讨论处理 + 方向调整
│ └── commands/
│ └── deepen.md # 深入探索
└── synthesizer/
├── role.md # 综合结论
└── commands/
└── synthesize.md # 跨视角整合设计原则: role.md 保留 Phase 1(Task Discovery)和 Phase 5(Report)内联。Phase 2-4 根据复杂度决定内联或委派到 。
commands/*.mdroles/
├── coordinator/
│ ├── role.md # 编排:话题澄清、管道选择、讨论循环、结果汇报
│ └── commands/
│ ├── dispatch.md # 任务链创建与依赖管理
│ └── monitor.md # 进度监控 + 讨论循环
├── explorer/
│ ├── role.md # 代码库探索
│ └── commands/
│ └── explore.md # cli-explore-agent 并行探索
├── analyst/
│ ├── role.md # 深度分析
│ └── commands/
│ └── analyze.md # CLI 多视角分析
├── discussant/
│ ├── role.md # 讨论处理 + 方向调整
│ └── commands/
│ └── deepen.md # 深入探索
└── synthesizer/
├── role.md # 综合结论
└── commands/
└── synthesize.md # 跨视角整合设计原则: role.md 保留 Phase 1(任务发现)和 Phase 5(结果汇报)的内联逻辑。Phase 2-4 根据复杂度决定内联或委派到 。
commands/*.mdRole Router
角色路由器
Input Parsing
输入解析
Parse to extract :
$ARGUMENTS--rolejavascript
const args = "$ARGUMENTS"
const roleMatch = args.match(/--role[=\s]+(\w+)/)
if (!roleMatch) {
throw new Error("Missing --role argument. Available roles: coordinator, explorer, analyst, discussant, synthesizer")
}
const role = roleMatch[1]
const teamName = args.match(/--team[=\s]+([\w-]+)/)?.[1] || "ultra-analyze"解析以提取:
$ARGUMENTS--rolejavascript
const args = "$ARGUMENTS"
const roleMatch = args.match(/--role[=\s]+(\w+)/)
if (!roleMatch) {
throw new Error("Missing --role argument. Available roles: coordinator, explorer, analyst, discussant, synthesizer")
}
const role = roleMatch[1]
const teamName = args.match(/--team[=\s]+([\w-]+)/)?.[1] || "ultra-analyze"Role Dispatch
角色分发
javascript
const VALID_ROLES = {
"coordinator": { file: "roles/coordinator/role.md", prefix: null },
"explorer": { file: "roles/explorer/role.md", prefix: "EXPLORE" },
"analyst": { file: "roles/analyst/role.md", prefix: "ANALYZE" },
"discussant": { file: "roles/discussant/role.md", prefix: "DISCUSS" },
"synthesizer": { file: "roles/synthesizer/role.md", prefix: "SYNTH" }
}
if (!VALID_ROLES[role]) {
throw new Error(`Unknown role: ${role}. Available: ${Object.keys(VALID_ROLES).join(', ')}`)
}
// Read and execute role-specific logic
Read(VALID_ROLES[role].file)
// → Execute the 5-phase process defined in that filejavascript
const VALID_ROLES = {
"coordinator": { file: "roles/coordinator/role.md", prefix: null },
"explorer": { file: "roles/explorer/role.md", prefix: "EXPLORE" },
"analyst": { file: "roles/analyst/role.md", prefix: "ANALYZE" },
"discussant": { file: "roles/discussant/role.md", prefix: "DISCUSS" },
"synthesizer": { file: "roles/synthesizer/role.md", prefix: "SYNTH" }
}
if (!VALID_ROLES[role]) {
throw new Error(`Unknown role: ${role}. Available: ${Object.keys(VALID_ROLES).join(', ')}`)
}
// 读取并执行角色专属逻辑
Read(VALID_ROLES[role].file)
// → 执行该文件中定义的五阶段流程Available Roles
可用角色
| Role | Task Prefix | Responsibility | Role File |
|---|---|---|---|
| N/A | 话题澄清、管道选择、会话管理、讨论循环 | roles/coordinator/role.md |
| EXPLORE-* | cli-explore-agent 多角度并行代码库探索 | roles/explorer/role.md |
| ANALYZE-* | CLI 多视角深度分析 | roles/analyst/role.md |
| DISCUSS-* | 用户反馈处理、方向调整、深入分析 | roles/discussant/role.md |
| SYNTH-* | 跨视角整合、结论生成、决策追踪 | roles/synthesizer/role.md |
| 角色 | 任务前缀 | 职责 | 角色文件 |
|---|---|---|---|
| N/A | 话题澄清、管道选择、会话管理、讨论循环 | roles/coordinator/role.md |
| EXPLORE-* | cli-explore-agent 多角度并行代码库探索 | roles/explorer/role.md |
| ANALYZE-* | CLI 多视角深度分析 | roles/analyst/role.md |
| DISCUSS-* | 用户反馈处理、方向调整、深入分析 | roles/discussant/role.md |
| SYNTH-* | 跨视角整合、结论生成、决策追踪 | roles/synthesizer/role.md |
Shared Infrastructure
共享基础设施
Role Isolation Rules
角色隔离规则
核心原则: 每个角色仅能执行自己职责范围内的工作。
核心原则: 每个角色仅能执行自己职责范围内的工作。
Output Tagging(强制)
输出标记(强制)
所有角色的输出必须带 标识前缀:
[role_name]javascript
SendMessage({ content: `## [${role}] ...`, summary: `[${role}] ...` })
mcp__ccw-tools__team_msg({ summary: `[${role}] ...` })所有角色的输出必须带有标识前缀:
[role_name]javascript
SendMessage({ content: `## [${role}] ...`, summary: `[${role}] ...` })
mcp__ccw-tools__team_msg({ summary: `[${role}] ...` })Coordinator 隔离
协调者隔离
| 允许 | 禁止 |
|---|---|
| 话题澄清 (AskUserQuestion) | ❌ 直接执行代码探索或分析 |
| 创建任务链 (TaskCreate) | ❌ 直接调用 cli-explore-agent |
| 管道选择 + 讨论循环驱动 | ❌ 直接调用 CLI 分析工具 |
| 监控进度 (消息总线) | ❌ 绕过 worker 自行完成 |
| 允许 | 禁止 |
|---|---|
| 话题澄清 (AskUserQuestion) | ❌ 直接执行代码探索或分析 |
| 创建任务链 (TaskCreate) | ❌ 直接调用cli-explore-agent |
| 管道选择 + 讨论循环驱动 | ❌ 直接调用CLI分析工具 |
| 监控进度 (消息总线) | ❌ 绕过工作节点自行完成任务 |
Worker 隔离
工作节点隔离
| 允许 | 禁止 |
|---|---|
| 处理自己前缀的任务 | ❌ 处理其他角色前缀的任务 |
| 读写 shared-memory.json (自己的字段) | ❌ 为其他角色创建任务 |
| SendMessage 给 coordinator | ❌ 直接与其他 worker 通信 |
| 允许 | 禁止 |
|---|---|
| 处理自己前缀的任务 | ❌ 处理其他角色前缀的任务 |
| 读写shared-memory.json(自己的字段) | ❌ 为其他角色创建任务 |
| 向coordinator发送消息 | ❌ 直接与其他工作节点通信 |
Team Configuration
团队配置
javascript
const TEAM_CONFIG = {
name: "ultra-analyze",
sessionDir: ".workflow/.team/UAN-{slug}-{date}/",
msgDir: ".workflow/.team-msg/ultra-analyze/",
sharedMemory: "shared-memory.json",
analysisDimensions: ["architecture", "implementation", "performance", "security", "concept", "comparison", "decision"],
maxDiscussionRounds: 5
}javascript
const TEAM_CONFIG = {
name: "ultra-analyze",
sessionDir: ".workflow/.team/UAN-{slug}-{date}/",
msgDir: ".workflow/.team-msg/ultra-analyze/",
sharedMemory: "shared-memory.json",
analysisDimensions: ["architecture", "implementation", "performance", "security", "concept", "comparison", "decision"],
maxDiscussionRounds: 5
}Shared Memory(核心产物)
共享内存(核心产物)
javascript
// 各角色读取共享记忆
const memoryPath = `${sessionFolder}/shared-memory.json`
let sharedMemory = {}
try { sharedMemory = JSON.parse(Read(memoryPath)) } catch {}
// 各角色写入自己负责的字段:
// explorer → sharedMemory.explorations
// analyst → sharedMemory.analyses
// discussant → sharedMemory.discussions
// synthesizer → sharedMemory.synthesis
// coordinator → sharedMemory.decision_trail + current_understanding
Write(memoryPath, JSON.stringify(sharedMemory, null, 2))javascript
// 各角色读取共享记忆
const memoryPath = `${sessionFolder}/shared-memory.json`
let sharedMemory = {}
try { sharedMemory = JSON.parse(Read(memoryPath)) } catch {}
// 各角色写入自己负责的字段:
// explorer → sharedMemory.explorations
// analyst → sharedMemory.analyses
// discussant → sharedMemory.discussions
// synthesizer → sharedMemory.synthesis
// coordinator → sharedMemory.decision_trail + current_understanding
Write(memoryPath, JSON.stringify(sharedMemory, null, 2))Message Bus (All Roles)
消息总线(所有角色)
javascript
mcp__ccw-tools__team_msg({
operation: "log",
team: teamName,
from: role,
to: "coordinator",
type: "<type>",
summary: `[${role}] <summary>`,
ref: "<file_path>"
})| Role | Types |
|---|---|
| coordinator | |
| explorer | |
| analyst | |
| discussant | |
| synthesizer | |
javascript
mcp__ccw-tools__team_msg({
operation: "log",
team: teamName,
from: role,
to: "coordinator",
type: "<type>",
summary: `[${role}] <summary>`,
ref: "<file_path>"
})| 角色 | 类型 |
|---|---|
| coordinator | |
| explorer | |
| analyst | |
| discussant | |
| synthesizer | |
CLI 回退
CLI 回退方案
javascript
Bash(`ccw team log --team "${teamName}" --from "${role}" --to "coordinator" --type "<type>" --summary "<摘要>" --json`)javascript
Bash(`ccw team log --team "${teamName}" --from "${role}" --to "coordinator" --type "<type>" --summary "<摘要>" --json`)Task Lifecycle (All Worker Roles)
任务生命周期(所有工作节点角色)
javascript
const tasks = TaskList()
const myTasks = tasks.filter(t =>
t.subject.startsWith(`${VALID_ROLES[role].prefix}-`) &&
t.owner === role &&
t.status === 'pending' &&
t.blockedBy.length === 0
)
if (myTasks.length === 0) return
const task = TaskGet({ taskId: myTasks[0].id })
TaskUpdate({ taskId: task.id, status: 'in_progress' })
// Phase 2-4: Role-specific
// Phase 5: Report + Loop
mcp__ccw-tools__team_msg({ operation: "log", team: teamName, from: role, to: "coordinator", type: "...", summary: `[${role}] ...` })
SendMessage({ type: "message", recipient: "coordinator", content: `## [${role}] ...`, summary: `[${role}] ...` })
TaskUpdate({ taskId: task.id, status: 'completed' })javascript
const tasks = TaskList()
const myTasks = tasks.filter(t =>
t.subject.startsWith(`${VALID_ROLES[role].prefix}-`) &&
t.owner === role &&
t.status === 'pending' &&
t.blockedBy.length === 0
)
if (myTasks.length === 0) return
const task = TaskGet({ taskId: myTasks[0].id })
TaskUpdate({ taskId: task.id, status: 'in_progress' })
// Phase 2-4: 角色专属逻辑
// Phase 5: 结果汇报 + 循环
mcp__ccw-tools__team_msg({ operation: "log", team: teamName, from: role, to: "coordinator", type: "...", summary: `[${role}] ...` })
SendMessage({ type: "message", recipient: "coordinator", content: `## [${role}] ...`, summary: `[${role}] ...` })
TaskUpdate({ taskId: task.id, status: 'completed' })Three-Mode Pipeline Architecture
三模式管道架构
Quick: EXPLORE-001 → ANALYZE-001 → SYNTH-001
Standard: [EXPLORE-001..N](parallel) → [ANALYZE-001..N](parallel) → DISCUSS-001 → SYNTH-001
Deep: [EXPLORE-001..N] → [ANALYZE-001..N] → DISCUSS-001 → ANALYZE-fix → DISCUSS-002 → ... → SYNTH-001Quick: EXPLORE-001 → ANALYZE-001 → SYNTH-001
Standard: [EXPLORE-001..N](parallel) → [ANALYZE-001..N](parallel) → DISCUSS-001 → SYNTH-001
Deep: [EXPLORE-001..N] → [ANALYZE-001..N] → DISCUSS-001 → ANALYZE-fix → DISCUSS-002 → ... → SYNTH-001Mode Auto-Detection
模式自动检测
javascript
function detectPipelineMode(args, taskDescription) {
const modeMatch = args.match(/--mode[=\s]+(quick|standard|deep)/)
if (modeMatch) return modeMatch[1]
// 自动检测
if (/快速|quick|overview|概览/.test(taskDescription)) return 'quick'
if (/深入|deep|thorough|详细|全面/.test(taskDescription)) return 'deep'
return 'standard'
}javascript
function detectPipelineMode(args, taskDescription) {
const modeMatch = args.match(/--mode[=\s]+(quick|standard|deep)/)
if (modeMatch) return modeMatch[1]
// 自动检测
if (/快速|quick|overview|概览/.test(taskDescription)) return 'quick'
if (/深入|deep|thorough|详细|全面/.test(taskDescription)) return 'deep'
return 'standard'
}Discussion Loop (Deep Mode)
讨论循环(深度模式)
coordinator(AskUser) → DISCUSS-N(deepen) → [optional ANALYZE-fix] → coordinator(AskUser) → ... → SYNTHcoordinator(询问用户) → DISCUSS-N(深化分析) → [可选ANALYZE-fix] → coordinator(询问用户) → ... → SYNTHDecision Recording Protocol
决策记录协议
⚠️ CRITICAL: 继承自原 analyze-with-file 命令。分析过程中以下情况必须立即记录到 discussion.md:
| Trigger | What to Record | Target Section |
|---|---|---|
| Direction choice | 选择了什么、为什么、放弃了哪些替代方案 | |
| Key finding | 发现内容、影响范围、置信度 | |
| Assumption change | 旧假设→新理解、变更原因、影响 | |
| User feedback | 用户原始输入、采纳/调整理由 | |
⚠️ 关键要求: 继承自原analyze-with-file命令。分析过程中出现以下情况必须立即记录到discussion.md:
| 触发条件 | 记录内容 | 目标章节 |
|---|---|---|
| 方向选择 | 选择的方案、选择原因、放弃的替代方案 | |
| 关键发现 | 发现内容、影响范围、置信度 | |
| 假设变更 | 旧假设→新理解、变更原因、影响 | |
| 用户反馈 | 用户原始输入、采纳/调整理由 | |
Unified Session Directory
统一会话目录
.workflow/.team/UAN-{slug}-{YYYY-MM-DD}/
├── shared-memory.json # 探索/分析/讨论/综合 共享记忆
├── discussion.md # ⭐ 理解演进 & 讨论时间线
├── explorations/ # Explorer output
│ ├── exploration-001.json
│ └── exploration-002.json
├── analyses/ # Analyst output
│ ├── analysis-001.json
│ └── analysis-002.json
├── discussions/ # Discussant output
│ └── discussion-round-001.json
└── conclusions.json # Synthesizer output.workflow/.team/UAN-{slug}-{YYYY-MM-DD}/
├── shared-memory.json # 探索/分析/讨论/综合 共享记忆
├── discussion.md # ⭐ 理解演进 & 讨论时间线
├── explorations/ # Explorer输出
│ ├── exploration-001.json
│ └── exploration-002.json
├── analyses/ # Analyst输出
│ ├── analysis-001.json
│ └── analysis-002.json
├── discussions/ # Discussant输出
│ └── discussion-round-001.json
└── conclusions.json # Synthesizer输出Coordinator Spawn Template
协调者生成模板
javascript
TeamCreate({ team_name: teamName })
// Explorer
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "explorer",
prompt: `你是 team "${teamName}" 的 EXPLORER。
当你收到 EXPLORE-* 任务时,调用 Skill(skill="team-ultra-analyze", args="--role=explorer") 执行。
当前需求: ${taskDescription}
约束: ${constraints}javascript
TeamCreate({ team_name: teamName })
// Explorer
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "explorer",
prompt: `你是团队"${teamName}"的EXPLORER。
当你收到EXPLORE-*任务时,调用Skill(skill="team-ultra-analyze", args="--role=explorer")执行。
当前需求: ${taskDescription}
约束: ${constraints}角色准则(强制)
角色准则(强制)
- 你只能处理 EXPLORE-* 前缀的任务,不得执行其他角色的工作
- 所有输出(SendMessage、team_msg)必须带 [explorer] 标识前缀
- 仅与 coordinator 通信,不得直接联系其他 worker
- 不得使用 TaskCreate 为其他角色创建任务
- 你只能处理EXPLORE-*前缀的任务,不得执行其他角色的工作
- 所有输出(SendMessage、team_msg)必须带[explorer]标识前缀
- 仅与coordinator通信,不得直接联系其他工作节点
- 不得使用TaskCreate为其他角色创建任务
消息总线(必须)
消息总线(必须)
每次 SendMessage 前,先调用 mcp__ccw-tools__team_msg 记录。
工作流程:
- TaskList → 找到 EXPLORE-* 任务
- Skill(skill="team-ultra-analyze", args="--role=explorer") 执行
- team_msg log + SendMessage 结果给 coordinator(带 [explorer] 标识)
- TaskUpdate completed → 检查下一个任务` })
// Analyst
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "analyst",
prompt: `你是 team "${teamName}" 的 ANALYST。
当你收到 ANALYZE-* 任务时,调用 Skill(skill="team-ultra-analyze", args="--role=analyst") 执行。
当前需求: ${taskDescription}
约束: ${constraints}
每次SendMessage前,先调用mcp__ccw-tools__team_msg记录。
工作流程:
- TaskList → 找到EXPLORE-*任务
- Skill(skill="team-ultra-analyze", args="--role=explorer")执行
- team_msg日志 + 向coordinator发送结果消息
- TaskUpdate标记完成 → 检查下一个任务` })
// Analyst
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "analyst",
prompt: `你是团队"${teamName}"的ANALYST。
当你收到ANALYZE-*任务时,调用Skill(skill="team-ultra-analyze", args="--role=analyst")执行。
当前需求: ${taskDescription}
约束: ${constraints}
角色准则(强制)
角色准则(强制)
- 你只能处理 ANALYZE-* 前缀的任务
- 所有输出必须带 [analyst] 标识前缀
- 仅与 coordinator 通信
- 你只能处理ANALYZE-*前缀的任务
- 所有输出必须带[analyst]标识前缀
- 仅与coordinator通信
消息总线(必须)
消息总线(必须)
每次 SendMessage 前,先调用 mcp__ccw-tools__team_msg 记录。
工作流程:
- TaskList → 找到 ANALYZE-* 任务
- Skill(skill="team-ultra-analyze", args="--role=analyst") 执行
- team_msg log + SendMessage 结果给 coordinator
- TaskUpdate completed → 检查下一个任务` })
// Discussant
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "discussant",
prompt: `你是 team "${teamName}" 的 DISCUSSANT。
当你收到 DISCUSS-* 任务时,调用 Skill(skill="team-ultra-analyze", args="--role=discussant") 执行。
当前需求: ${taskDescription}
每次SendMessage前,先调用mcp__ccw-tools__team_msg记录。
工作流程:
- TaskList → 找到ANALYZE-*任务
- Skill(skill="team-ultra-analyze", args="--role=analyst")执行
- team_msg日志 + 向coordinator发送结果消息
- TaskUpdate标记完成 → 检查下一个任务` })
// Discussant
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "discussant",
prompt: `你是团队"${teamName}"的DISCUSSANT。
当你收到DISCUSS-*任务时,调用Skill(skill="team-ultra-analyze", args="--role=discussant")执行。
当前需求: ${taskDescription}
角色准则(强制)
角色准则(强制)
- 你只能处理 DISCUSS-* 前缀的任务
- 所有输出必须带 [discussant] 标识前缀
- 你只能处理DISCUSS-*前缀的任务
- 所有输出必须带[discussant]标识前缀
消息总线(必须)
消息总线(必须)
每次 SendMessage 前,先调用 mcp__ccw-tools__team_msg 记录。
工作流程:
- TaskList → 找到 DISCUSS-* 任务
- Skill(skill="team-ultra-analyze", args="--role=discussant") 执行
- team_msg log + SendMessage
- TaskUpdate completed → 检查下一个任务` })
// Synthesizer
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "synthesizer",
prompt: `你是 team "${teamName}" 的 SYNTHESIZER。
当你收到 SYNTH-* 任务时,调用 Skill(skill="team-ultra-analyze", args="--role=synthesizer") 执行。
当前需求: ${taskDescription}
每次SendMessage前,先调用mcp__ccw-tools__team_msg记录。
工作流程:
- TaskList → 找到DISCUSS-*任务
- Skill(skill="team-ultra-analyze", args="--role=discussant")执行
- team_msg日志 + 发送消息
- TaskUpdate标记完成 → 检查下一个任务` })
// Synthesizer
Task({
subagent_type: "general-purpose",
team_name: teamName,
name: "synthesizer",
prompt: `你是团队"${teamName}"的SYNTHESIZER。
当你收到SYNTH-*任务时,调用Skill(skill="team-ultra-analyze", args="--role=synthesizer")执行。
当前需求: ${taskDescription}
角色准则(强制)
角色准则(强制)
- 你只能处理 SYNTH-* 前缀的任务
- 所有输出必须带 [synthesizer] 标识前缀
- 你只能处理SYNTH-*前缀的任务
- 所有输出必须带[synthesizer]标识前缀
消息总线(必须)
消息总线(必须)
每次 SendMessage 前,先调用 mcp__ccw-tools__team_msg 记录。
工作流程:
- TaskList → 找到 SYNTH-* 任务
- Skill(skill="team-ultra-analyze", args="--role=synthesizer") 执行
- team_msg log + SendMessage
- TaskUpdate completed → 检查下一个任务` })
undefined每次SendMessage前,先调用mcp__ccw-tools__team_msg记录。
工作流程:
- TaskList → 找到SYNTH-*任务
- Skill(skill="team-ultra-analyze", args="--role=synthesizer")执行
- team_msg日志 + 发送消息
- TaskUpdate标记完成 → 检查下一个任务` })
undefinedError Handling
错误处理
| Scenario | Resolution |
|---|---|
| Unknown --role value | Error with available role list |
| Missing --role arg | Error with usage hint |
| Role file not found | Error with expected path (roles/{name}/role.md) |
| Task prefix conflict | Log warning, proceed |
| Discussion loop stuck >5 rounds | Force synthesis, offer continuation |
| CLI tool unavailable | Fallback chain: gemini → codex → manual analysis |
| Explorer agent fails | Continue with available context, note limitation |
| 场景 | 解决方案 |
|---|---|
| 未知的--role值 | 返回包含可用角色列表的错误信息 |
| 缺少--role参数 | 返回包含使用提示的错误信息 |
| 角色文件未找到 | 返回包含预期路径(roles/{name}/role.md)的错误信息 |
| 任务前缀冲突 | 记录警告,继续执行 |
| 讨论循环超过5轮仍停滞 | 强制进入综合阶段,提供继续分析的选项 |
| CLI工具不可用 | 回退链:gemini → codex → 手动分析 |
| Explorer agent失败 | 基于现有上下文继续执行,记录限制说明 |