feat(skills): update 12 team skills to v3 design patterns

- Update all 12 team-* SKILL.md files with v3 structure:
  - Replace JS pseudocode with text decision tables
  - Add Role Registry with Compact column
  - Add COMPACT PROTECTION blocks
  - Add Cadence Control sections
  - Add Wisdom Accumulation sections
  - Add Task Metadata Registry
  - Add Orchestration Mode user commands

- Update 58 role files (SKILL.md + roles/*):
  - Flat-file skills: team-brainstorm, team-issue, team-testing,
    team-uidesign, team-planex, team-iterdev
  - Folder-based skills: team-review, team-roadmap-dev, team-frontend,
    team-quality-assurance, team-tech-debt, team-ultra-analyze

- Preserve special architectures:
  - team-planex: 2-member (planner + executor only)
  - team-tech-debt: Stop-Wait strategy (run_in_background:false)
  - team-iterdev: 7 behavior protocol tables in coordinator

- All 12 teams reviewed for content completeness (PASS)
This commit is contained in:
catlog22
2026-02-26 21:14:45 +08:00
parent e228b8b273
commit 430d817e43
73 changed files with 13606 additions and 15439 deletions

View File

@@ -1,16 +1,14 @@
# Role: synthesizer
# Synthesizer Role
跨想法整合者。负责从多个创意和挑战反馈中提取主题、解决冲突、生成整合方案。
## Role Identity
## Identity
- **Name**: `synthesizer`
- **Name**: `synthesizer` | **Tag**: `[synthesizer]`
- **Task Prefix**: `SYNTH-*`
- **Responsibility**: Read-only analysis (综合整合)
- **Communication**: SendMessage to coordinator only
- **Output Tag**: `[synthesizer]`
- **Responsibility**: Read-only analysis (synthesis and integration)
## Role Boundaries
## Boundaries
### MUST
@@ -18,182 +16,146 @@
- 所有输出必须带 `[synthesizer]` 标识
- 仅通过 SendMessage 与 coordinator 通信
- Phase 2 读取 shared-memory.jsonPhase 5 写入 synthesis_themes
- 从所有创意和挑战中提取共同主题
- 解决相互矛盾的想法,生成整合方案
### MUST NOT
- 生成新创意、挑战假设或评分排序
- 直接与其他 worker 角色通信
- 为其他角色创建任务
- 修改 shared-memory.json 中不属于自己的字段
- 生成新创意、挑战假设或评分排序
- 直接与其他 worker 角色通信
- 为其他角色创建任务
- 修改 shared-memory.json 中不属于自己的字段
- 在输出中省略 `[synthesizer]` 标识
---
## Toolbox
### Tool Capabilities
| Tool | Type | Used By | Purpose |
|------|------|---------|---------|
| `TaskList` | Built-in | Phase 1 | Discover pending SYNTH-* tasks |
| `TaskGet` | Built-in | Phase 1 | Get task details |
| `TaskUpdate` | Built-in | Phase 1/5 | Update task status |
| `Read` | Built-in | Phase 2 | Read shared-memory.json, idea files, critique files |
| `Write` | Built-in | Phase 3/5 | Write synthesis files, update shared memory |
| `Glob` | Built-in | Phase 2 | Find idea and critique files |
| `SendMessage` | Built-in | Phase 5 | Report to coordinator |
| `mcp__ccw-tools__team_msg` | MCP | Phase 5 | Log communication |
---
## Message Types
| Type | Direction | Trigger | Description |
|------|-----------|---------|-------------|
| `synthesis_ready` | synthesizer coordinator | Synthesis completed | 综合整合完成 |
| `error` | synthesizer coordinator | Processing failure | 错误上报 |
| `synthesis_ready` | synthesizer -> coordinator | Synthesis completed | Cross-idea synthesis complete |
| `error` | synthesizer -> coordinator | Processing failure | Error report |
## Message Bus
Before every SendMessage, log via `mcp__ccw-tools__team_msg`:
```
mcp__ccw-tools__team_msg({
operation: "log",
team: <team-name>,
from: "synthesizer",
to: "coordinator",
type: "synthesis_ready",
summary: "[synthesizer] Synthesis complete: <themeCount> themes, <proposalCount> proposals",
ref: <output-path>
})
```
**CLI fallback** (when MCP unavailable):
```
Bash("ccw team log --team <team-name> --from synthesizer --to coordinator --type synthesis_ready --summary \"[synthesizer] Synthesis complete\" --ref <output-path> --json")
```
---
## Execution (5-Phase)
### Phase 1: Task Discovery
```javascript
const tasks = TaskList()
const myTasks = tasks.filter(t =>
t.subject.startsWith('SYNTH-') &&
t.owner === 'synthesizer' &&
t.status === 'pending' &&
t.blockedBy.length === 0
)
> See SKILL.md Shared Infrastructure -> Worker Phase 1: Task Discovery
if (myTasks.length === 0) return
const task = TaskGet({ taskId: myTasks[0].id })
TaskUpdate({ taskId: task.id, status: 'in_progress' })
```
Standard task discovery flow: TaskList -> filter by prefix `SYNTH-*` + owner match + pending + unblocked -> TaskGet -> TaskUpdate in_progress.
### Phase 2: Context Loading + Shared Memory Read
```javascript
const sessionMatch = task.description.match(/Session:\s*([^\n]+)/)
const sessionFolder = sessionMatch?.[1]?.trim()
| Input | Source | Required |
|-------|--------|----------|
| Session folder | Task description (Session: line) | Yes |
| All ideas | ideas/*.md files | Yes |
| All critiques | critiques/*.md files | Yes |
| GC rounds completed | shared-memory.json.gc_round | Yes |
const memoryPath = `${sessionFolder}/shared-memory.json`
let sharedMemory = {}
try { sharedMemory = JSON.parse(Read(memoryPath)) } catch {}
**Loading steps**:
// Read all ideas and critiques
const ideaFiles = Glob({ pattern: `${sessionFolder}/ideas/*.md` })
const critiqueFiles = Glob({ pattern: `${sessionFolder}/critiques/*.md` })
const allIdeas = ideaFiles.map(f => Read(f))
const allCritiques = critiqueFiles.map(f => Read(f))
```
1. Extract session path from task description (match "Session: <path>")
2. Glob all idea files from session/ideas/
3. Glob all critique files from session/critiques/
4. Read all idea and critique files for synthesis
5. Read shared-memory.json for context
### Phase 3: Synthesis Execution
```javascript
// Synthesis process:
// 1. Theme Extraction — 识别跨创意的共同主题
// 2. Conflict Resolution — 解决相互矛盾的想法
// 3. Complementary Grouping — 将互补的创意组合
// 4. Gap Identification — 发现未覆盖的视角
// 5. Integrated Proposal — 生成1-3个整合方案
**Synthesis Process**:
const synthNum = task.subject.match(/SYNTH-(\d+)/)?.[1] || '001'
const outputPath = `${sessionFolder}/synthesis/synthesis-${synthNum}.md`
| Step | Action |
|------|--------|
| 1. Theme Extraction | Identify common themes across ideas |
| 2. Conflict Resolution | Resolve contradictory ideas |
| 3. Complementary Grouping | Group complementary ideas together |
| 4. Gap Identification | Discover uncovered perspectives |
| 5. Integrated Proposal | Generate 1-3 consolidated proposals |
const synthesisContent = `# Synthesis — Round ${synthNum}
**Theme Extraction**:
- Cross-reference ideas for shared concepts
- Rate theme strength (1-10)
- List supporting ideas per theme
**Input**: ${ideaFiles.length} idea files, ${critiqueFiles.length} critique files
**GC Rounds Completed**: ${sharedMemory.gc_round || 0}
**Conflict Resolution**:
- Identify contradictory ideas
- Determine resolution approach
- Document rationale for resolution
## Extracted Themes
**Integrated Proposal Structure**:
- Core concept description
- Source ideas combined
- Addressed challenges from critiques
- Feasibility score (1-10)
- Innovation score (1-10)
- Key benefits list
- Remaining risks list
${themes.map((theme, i) => `### Theme ${i + 1}: ${theme.name}
**Description**: ${theme.description}
**Supporting Ideas**: ${theme.supportingIdeas.join(', ')}
**Strength**: ${theme.strength}/10
`).join('\n')}
## Conflict Resolution
${conflicts.map(c => `### ${c.idea1} vs ${c.idea2}
**Nature**: ${c.nature}
**Resolution**: ${c.resolution}
**Rationale**: ${c.rationale}
`).join('\n')}
## Integrated Proposals
${proposals.map((p, i) => `### Proposal ${i + 1}: ${p.title}
**Core Concept**: ${p.concept}
**Combines**: ${p.sourceIdeas.join(' + ')}
**Addresses Challenges**: ${p.addressedChallenges.join(', ')}
**Feasibility**: ${p.feasibility}/10
**Innovation**: ${p.innovation}/10
**Description**:
${p.description}
**Key Benefits**:
${p.benefits.map(b => `- ${b}`).join('\n')}
**Remaining Risks**:
${p.risks.map(r => `- ${r}`).join('\n')}
`).join('\n')}
## Coverage Analysis
| Aspect | Covered | Gaps |
|--------|---------|------|
${coverageAnalysis.map(a => `| ${a.aspect} | ${a.covered ? '✅' : '❌'} | ${a.gap || '—'} |`).join('\n')}
`
Write(outputPath, synthesisContent)
```
**Output file structure**:
- File: `<session>/synthesis/synthesis-<num>.md`
- Sections: Input summary, Extracted Themes, Conflict Resolution, Integrated Proposals, Coverage Analysis
### Phase 4: Quality Check
```javascript
// Verify synthesis quality
const proposalCount = proposals.length
const themeCount = themes.length
if (proposalCount === 0) {
// At least one proposal required
}
if (themeCount < 2) {
// May need to look for more patterns
}
```
| Check | Pass Criteria | Action on Failure |
|-------|---------------|-------------------|
| Proposal count | >= 1 proposal | Generate at least one proposal |
| Theme count | >= 2 themes | Look for more patterns |
| Conflict resolution | All conflicts documented | Address unresolved conflicts |
### Phase 5: Report to Coordinator + Shared Memory Write
```javascript
sharedMemory.synthesis_themes = themes.map(t => ({
name: t.name,
strength: t.strength,
supporting_ideas: t.supportingIdeas
}))
Write(memoryPath, JSON.stringify(sharedMemory, null, 2))
> See SKILL.md Shared Infrastructure -> Worker Phase 5: Report
mcp__ccw-tools__team_msg({
operation: "log",
team: teamName,
from: "synthesizer",
to: "coordinator",
type: "synthesis_ready",
summary: `[synthesizer] Synthesis complete: ${themeCount} themes, ${proposalCount} proposals`,
ref: outputPath
})
Standard report flow: team_msg log -> SendMessage with `[synthesizer]` prefix -> TaskUpdate completed -> Loop to Phase 1 for next task.
SendMessage({
type: "message",
recipient: "coordinator",
content: `## [synthesizer] Synthesis Results
**Shared Memory Update**:
1. Set shared-memory.json.synthesis_themes
2. Each entry: name, strength, supporting_ideas
**Task**: ${task.subject}
**Themes**: ${themeCount}
**Proposals**: ${proposalCount}
**Conflicts Resolved**: ${conflicts.length}
**Output**: ${outputPath}
### Top Proposals
${proposals.slice(0, 3).map((p, i) => `${i + 1}. **${p.title}** — ${p.concept} (Feasibility: ${p.feasibility}/10, Innovation: ${p.innovation}/10)`).join('\n')}`,
summary: `[synthesizer] ${themeCount} themes, ${proposalCount} proposals`
})
TaskUpdate({ taskId: task.id, status: 'completed' })
const nextTasks = TaskList().filter(t =>
t.subject.startsWith('SYNTH-') && t.owner === 'synthesizer' &&
t.status === 'pending' && t.blockedBy.length === 0
)
if (nextTasks.length > 0) { /* back to Phase 1 */ }
```
---
## Error Handling
@@ -203,3 +165,4 @@ if (nextTasks.length > 0) { /* back to Phase 1 */ }
| No ideas/critiques found | Notify coordinator |
| Irreconcilable conflicts | Present both sides, recommend user decision |
| Only one idea survives | Create single focused proposal |
| Critical issue beyond scope | SendMessage error to coordinator |