brainstorm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Brainstorming Ideas Into Designs

将初步想法转化为完整设计

Transform rough ideas into fully-formed designs through intelligent agent selection and structured exploration.
Core principle: Analyze the topic, select relevant agents dynamically, explore alternatives in parallel, present design incrementally.
通过智能Agent选择和结构化探索,将初步想法转化为完整的设计方案。
核心原则: 分析主题,动态选择相关Agent,并行探索替代方案,逐步呈现设计成果。

Argument Resolution

参数解析

python
TOPIC = "$ARGUMENTS"  # Full argument string, e.g., "API design for payments"
python
TOPIC = "$ARGUMENTS"  # 完整参数字符串,例如:"支付系统API设计"

$ARGUMENTS[0] is the first token (CC 2.1.59 indexed access)

$ARGUMENTS[0] 是第一个令牌(CC 2.1.59 索引访问)


---

---

STEP -1: MCP Probe + Resume Check

STEP -1: MCP探测 + 会话恢复检查

Load:
Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/mcp-detection.md")
python
undefined
加载:
Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/mcp-detection.md")
python
undefined

1. Probe MCP servers (once at skill start)

1. 探测MCP服务器(在技能启动时执行一次)

ToolSearch(query="select:mcp__memory__search_nodes") ToolSearch(query="select:mcp__sequential-thinking__sequentialthinking")
ToolSearch(query="select:mcp__memory__search_nodes") ToolSearch(query="select:mcp__sequential-thinking__sequentialthinking")

2. Store capabilities

2. 存储能力信息

Write(".claude/chain/capabilities.json", { "memory": probe_memory.found, "sequential_thinking": probe_st.found, "skill": "brainstorm", "timestamp": now() })
Write(".claude/chain/capabilities.json", { "memory": probe_memory.found, "sequential_thinking": probe_st.found, "skill": "brainstorm", "timestamp": now() })

3. Check for resume (prior session may have crashed)

3. 检查是否有可恢复的会话(之前的会话可能崩溃)

state = Read(".claude/chain/state.json") # may not exist if state.skill == "brainstorm" and state.status == "in_progress": # Skip completed phases, resume from state.current_phase last_handoff = Read(f".claude/chain/{state.last_handoff}")
undefined
state = Read(".claude/chain/state.json") # 可能不存在 if state.skill == "brainstorm" and state.status == "in_progress": # 跳过已完成的阶段,从state.current_phase恢复 last_handoff = Read(f".claude/chain/{state.last_handoff}")
undefined

Phase Handoffs

阶段交接

PhaseHandoff FileContents
0
00-topic-analysis.json
Agent list, tier, topic classification
1
01-memory-context.json
Prior patterns, codebase signals
2
02-divergent-ideas.json
10+ raw ideas
3
03-feasibility.json
Filtered viable ideas
4
04-evaluation.json
Rated + devil's advocate results
5
05-synthesis.json
Top 2-3 approaches, trade-off table

阶段交接文件内容
0
00-topic-analysis.json
Agent列表、项目层级、主题分类
1
01-memory-context.json
过往模式、代码库信号
2
02-divergent-ideas.json
10+个原始想法
3
03-feasibility.json
筛选后的可行想法
4
04-evaluation.json
评分结果 + 反向评估意见
5
05-synthesis.json
排名前2-3的方案、权衡对比表

STEP 0: Project Context Discovery

STEP 0: 项目上下文探测

BEFORE creating tasks or selecting agents, detect the project tier. This becomes the complexity ceiling for all downstream decisions.
在创建任务或选择Agent之前,先探测项目层级。这将成为所有后续决策的复杂度上限

Auto-Detection (scan codebase)

自动探测(扫描代码库)

python
undefined
python
undefined

PARALLEL — quick signals (launch all in ONE message)

并行执行——快速获取信号(在一条消息中启动所有操作)

Grep(pattern="take-home|assignment|interview|hackathon", glob="README*", output_mode="content") Grep(pattern="take-home|assignment|interview|hackathon", glob=".md", output_mode="content") Glob(pattern=".github/workflows/") Glob(pattern="/Dockerfile") Glob(pattern="/terraform/") Glob(pattern="/k8s/**") Glob(pattern="CONTRIBUTING.md")
undefined
Grep(pattern="take-home|assignment|interview|hackathon", glob="README*", output_mode="content") Grep(pattern="take-home|assignment|interview|hackathon", glob=".md", output_mode="content") Glob(pattern=".github/workflows/") Glob(pattern="/Dockerfile") Glob(pattern="/terraform/") Glob(pattern="/k8s/**") Glob(pattern="CONTRIBUTING.md")
undefined

Tier Classification

层级分类

SignalTier
README says "take-home", "assignment", time limit1. Interview
< 10 files, no CI, no Docker2. Hackathon
.github/workflows/
, 10-25 deps
3. MVP
Module boundaries, Redis, background jobs4. Growth
K8s/Terraform, DDD structure, monorepo5. Enterprise
CONTRIBUTING.md, LICENSE, minimal deps6. Open Source
If confidence is low, ask the user:
python
AskUserQuestion(questions=[{
  "question": "What kind of project is this?",
  "header": "Project tier",
  "options": [
    {"label": "Interview / take-home", "description": "8-15 files, 200-600 LOC, simple architecture", "markdown": "```\nTier 1: Interview / Take-Home\n─────────────────────────────\nFiles:    8-15 max\nLOC:      200-600\nArch:     Flat structure, no abstractions\nPatterns: Direct imports, inline logic\nTests:    Unit only, co-located\n```"},
    {"label": "Startup / MVP", "description": "MVC monolith, managed services, ship fast", "markdown": "```\nTier 3: Startup / MVP\n─────────────────────\nArch:     MVC monolith\nDB:       Managed (RDS/Supabase)\nCI:       GitHub Actions (1-2 workflows)\nPatterns: Service layer, repository pattern\nDeploy:   Vercel / Railway / Fly.io\n```"},
    {"label": "Growth / enterprise", "description": "Modular monolith or DDD, full observability", "markdown": "```\nTier 4-5: Growth / Enterprise\n─────────────────────────────\nArch:     Modular monolith or DDD\nInfra:    K8s, Terraform, Redis, queues\nCI:       Multi-stage pipelines\nPatterns: Hexagonal, CQRS, event-driven\nObserve:  Structured logging, tracing\n```"},
    {"label": "Open source library", "description": "Minimal API surface, exhaustive tests", "markdown": "```\nTier 6: Open Source Library\n──────────────────────────\nAPI:      Minimal public surface\nTests:    100% coverage, property-based\nDocs:     README, API docs, examples\nCI:       Matrix builds, release automation\nPatterns: Semver, CONTRIBUTING.md\n```"}
  ],
  "multiSelect": false
}])
Pass the detected tier as context to ALL downstream agents and phases. The tier constrains which patterns are appropriate — see
scope-appropriate-architecture
skill for the full matrix.
Override: User can always override the detected tier. Warn them of trade-offs if they choose a higher tier than detected.

信号层级
README中包含"take-home"、"assignment"、时间限制1. 面试项目
文件数<10,无CI,无Docker2. 黑客松项目
包含
.github/workflows/
、10-25个依赖
3. MVP项目
存在模块边界、Redis、后台任务4. 增长期项目
包含K8s/Terraform、DDD结构、单体仓库5. 企业级项目
包含CONTRIBUTING.md、LICENSE、最少依赖6. 开源项目
如果置信度较低,询问用户:
python
AskUserQuestion(questions=[{
  "question": "这是什么类型的项目?",
  "header": "项目层级",
  "options": [
    {"label": "面试/带回家作业", "description": "8-15个文件,200-600行代码,简单架构", "markdown": "```\n层级1: 面试/带回家作业\n─────────────────────────────\n文件数:    最多8-15个\n代码行数:  200-600\n架构:     扁平结构,无抽象\n模式:     直接导入,内联逻辑\n测试:     仅单元测试,与代码同目录\n```"},
    {"label": "初创公司/MVP", "description": "MVC单体应用,托管服务,快速交付", "markdown": "```\n层级3: 初创公司/MVP\n─────────────────────\n架构:     MVC单体应用\n数据库:   托管服务(RDS/Supabase)\nCI:       GitHub Actions(1-2个工作流)\n模式:     服务层、仓库模式\n部署:     Vercel / Railway / Fly.io\n```"},
    {"label": "增长期/企业级", "description": "模块化单体或DDD,完整可观测性", "markdown": "```\n层级4-5: 增长期/企业级\n─────────────────────────────\n架构:     模块化单体或DDD\n基础设施: K8s、Terraform、Redis、队列\nCI:       多阶段流水线\n模式:     六边形架构、CQRS、事件驱动\n可观测性: 结构化日志、链路追踪\n```"},
    {"label": "开源库", "description": "最小API面,详尽测试", "markdown": "```\n层级6: 开源库\n──────────────────────────\nAPI:      最小公共接口\n测试:     100%覆盖率,基于属性的测试\n文档:     README、API文档、示例\nCI:       矩阵构建、发布自动化\n模式:     语义化版本、CONTRIBUTING.md\n```"}
  ],
  "multiSelect": false
}])
将探测到的层级作为上下文传递给所有下游Agent和阶段。 层级会限制适用的模式——查看
scope-appropriate-architecture
技能获取完整矩阵。
覆盖规则: 用户可随时覆盖探测到的层级。如果用户选择的层级高于探测结果,需提醒其相关权衡。

STEP 0a: Verify User Intent with AskUserQuestion

STEP 0a: 通过AskUserQuestion确认用户意图

Clarify brainstorming constraints:
python
AskUserQuestion(
  questions=[
    {
      "question": "What type of design exploration?",
      "header": "Type",
      "options": [
        {"label": "Open exploration (Recommended)", "description": "Generate 10+ ideas, evaluate all, synthesize top 3", "markdown": "```\nOpen Exploration (7 phases)\n──────────────────────────\n  Diverge        Evaluate       Synthesize\n  ┌─────┐       ┌─────┐       ┌─────┐\n  │ 10+ │──────▶│Rate │──────▶│Top 3│\n  │ideas│       │0-10 │       │picks│\n  └─────┘       └─────┘       └─────┘\n  3-5 agents    Devil's        Trade-off\n  in parallel   advocate       table\n```"},
        {"label": "Constrained design", "description": "I have specific requirements to work within", "markdown": "```\nConstrained Design\n──────────────────\n  Requirements ──▶ Feasibility ──▶ Design\n  ┌──────────┐    ┌──────────┐    ┌──────┐\n  │ Fixed    │    │ Check    │    │ Best │\n  │ bounds   │    │ fit      │    │ fit  │\n  └──────────┘    └──────────┘    └──────┘\n  Skip divergent phase, focus on\n  feasibility within constraints\n```"},
        {"label": "Comparison", "description": "Compare 2-3 specific approaches I have in mind", "markdown": "```\nComparison Mode\n───────────────\n  Approach A ──┐\n  Approach B ──┼──▶ Rate 0-10 ──▶ Winner\n  Approach C ──┘    (6 dims)\n\n  Skip ideation, jump straight\n  to evaluation + trade-off table\n```"},
        {"label": "Quick ideation", "description": "Generate ideas fast, skip deep evaluation", "markdown": "```\nQuick Ideation\n──────────────\n  Braindump ──▶ Light filter ──▶ List\n  ┌────────┐   ┌────────────┐   ┌────┐\n  │ 10+    │   │ Viable?    │   │ 5-7│\n  │ ideas  │   │ Y/N only   │   │ out│\n  └────────┘   └────────────┘   └────┘\n  Fast pass, no deep scoring\n```"},
        {"label": "Plan first", "description": "Structured exploration before generating ideas", "markdown": "```\nPlan Mode Exploration\n─────────────────────\n  1. EnterPlanMode($TOPIC)\n  2. Analyze constraints\n  3. Research precedents\n  4. Map solution space\n  5. ExitPlanMode → options\n  6. User picks direction\n  7. Deep dive on chosen path\n\n  Best for: Architecture,\n  design systems, trade-offs\n```"}
      ],
      "multiSelect": false
    },
    {
      "question": "Any preferences or constraints?",
      "header": "Constraints",
      "options": [
        {"label": "None", "description": "Explore all possibilities"},
        {"label": "Use existing patterns", "description": "Prefer patterns already in codebase"},
        {"label": "Minimize complexity", "description": "Favor simpler solutions"},
        {"label": "I'll specify", "description": "Let me provide specific constraints"}
      ],
      "multiSelect": false
    }
  ]
)
If 'Plan first' selected:
python
undefined
明确头脑风暴的约束条件:
python
AskUserQuestion(
  questions=[
    {
      "question": "需要哪种类型的设计探索?",
      "header": "类型",
      "options": [
        {"label": "开放式探索(推荐)", "description": "生成10+个想法,评估所有选项,综合出排名前3的方案", "markdown": "```\n开放式探索(7个阶段)\n──────────────────────────\n  发散        评估       综合\n  ┌─────┐       ┌─────┐       ┌─────┐\n  │ 10+ │──────▶│评分 │──────▶│前3名│\n  │想法│       │0-10 │       │方案│\n  └─────┘       └─────┘       └─────┘\n  3-5个并行Agent    反向评估       权衡对比表\n```"},
        {"label": "约束式设计", "description": "我有特定的需求边界需要遵循", "markdown": "```\n约束式设计\n──────────────────\n  需求 ──▶ 可行性 ──▶ 设计\n  ┌──────────┐    ┌──────────┐    ┌──────┐\n  │ 固定    │    │ 检查    │    │ 最优 │\n  │ 边界   │    │ 适配度    │    │ 方案  │\n  └──────────┘    └──────────┘    └──────┘\n  跳过发散阶段,专注于约束内的可行性分析\n```"},
        {"label": "方案对比", "description": "对比我想到的2-3个特定方案", "markdown": "```\n对比模式\n───────────────\n  方案A ──┐\n  方案B ──┼──▶ 0-10评分 ──▶ 最优方案\n  方案C ──┘    (6个维度)\n\n  跳过创意阶段,直接进入评估+权衡对比表\n```"},
        {"label": "快速创意生成", "description": "快速生成想法,跳过深度评估", "markdown": "```\n快速创意生成\n──────────────\n  头脑风暴 ──▶ 初步筛选 ──▶ 结果列表\n  ┌────────┐   ┌────────────┐   ┌────┐\n  │ 10+    │   │ 是否可行?    │   │ 5-7│\n  │ 想法  │   │ 仅判断是/否   │   │ 个方案│\n  └────────┘   └────────────┘   └────┘\n  快速流程,不进行深度评分\n```"},
        {"label": "先规划再探索", "description": "先进行结构化规划,再生成想法", "markdown": "```\n规划模式探索\n─────────────────────\n  1. EnterPlanMode($TOPIC)\n  2. 分析约束条件\n  3. 研究先例\n  4. 映射解决方案空间\n  5. ExitPlanMode → 可选方案\n  6. 用户选择方向\n  7. 深入研究选定方向\n\n  最适合:架构设计、\n  设计系统、权衡决策\n```"}
      ],
      "multiSelect": false
    },
    {
      "question": "是否有偏好或约束条件?",
      "header": "约束",
      "options": [
        {"label": "无", "description": "探索所有可能性"},
        {"label": "使用现有模式", "description": "优先采用代码库中已有的模式"},
        {"label": "最小化复杂度", "description": "倾向于更简单的解决方案"},
        {"label": "我将明确说明", "description": "让我提供具体的约束条件"}
      ],
      "multiSelect": false
    }
  ]
)
如果选择"先规划再探索":
python
undefined

1. Enter read-only plan mode

1. 进入只读规划模式

EnterPlanMode("Brainstorm exploration: $TOPIC")
EnterPlanMode("头脑风暴探索:$TOPIC")

2. Research phase — Read/Grep/Glob ONLY, no Write/Edit

2. 研究阶段 — 仅执行Read/Grep/Glob操作,不执行Write/Edit

- Scan existing codebase for related patterns

- 扫描现有代码库寻找相关模式

- Search for prior decisions on this topic (memory graph)

- 搜索该主题的过往决策(记忆图谱)

- Identify constraints, dependencies, and trade-offs

- 识别约束条件、依赖关系和权衡点

3. Produce structured exploration plan:

3. 生成结构化探索规划:

- Key questions to answer

- 需要回答的关键问题

- Dimensions to explore

- 探索维度

- Agents to spawn and their focus areas

- 要启动的Agent及其专注领域

- Evaluation criteria

- 评估标准

4. Exit plan mode — returns plan for user approval

4. 退出规划模式 — 返回规划供用户批准

ExitPlanMode()
ExitPlanMode()

5. User reviews. If approved → continue to Phase 1 with plan as input.

5. 用户审核。如果批准 → 以规划为输入进入阶段1。


**Based on answers, adjust workflow:**
- **Open exploration**: Full 7-phase process with all agents
- **Constrained design**: Skip divergent phase, focus on feasibility
- **Comparison**: Skip ideation, jump to evaluation phase
- **Quick ideation**: Generate ideas, skip deep evaluation

---

**根据回答调整工作流:**
- **开放式探索**:完整的7阶段流程,使用所有Agent
- **约束式设计**:跳过发散阶段,专注于可行性分析
- **方案对比**:跳过创意生成,直接进入评估阶段
- **快速创意生成**:生成想法,跳过深度评估

---

STEP 0b: Select Orchestration Mode (skip for Tier 1-2)

STEP 0b: 选择编排模式(层级1-2项目可跳过)

Choose Agent Teams (mesh — agents debate and challenge ideas) or Task tool (star — all report to lead):
  1. CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
    Agent Teams mode
  2. Agent Teams unavailable → Task tool mode (default)
  3. Otherwise: Open exploration with 3+ agents → recommend Agent Teams (real-time debate produces better ideas); Quick ideation → Task tool
AspectTask ToolAgent Teams
Idea generationEach agent generates independentlyAgents riff on each other's ideas
Devil's advocateLead challenges after all completeAgents challenge each other in real-time
Cost~150K tokens~400K tokens
Best forQuick ideation, constrained designOpen exploration, deep evaluation
Fallback: If Agent Teams encounters issues, fall back to Task tool for remaining phases.

选择Agent团队(网状结构——Agent之间辩论并挑战想法)或任务工具(星型结构——所有Agent向主导者汇报):
  1. CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
    Agent团队模式
  2. 若Agent团队不可用 → 任务工具模式(默认)
  3. 其他情况:开放式探索且使用3+个Agent → 推荐Agent团队模式(实时辩论能产生更好的想法);快速创意生成 → 任务工具模式
方面任务工具Agent团队
创意生成每个Agent独立生成想法Agent在彼此想法基础上拓展
反向评估主导者在所有Agent完成后提出挑战Agent实时互相挑战
成本~150K令牌~400K令牌
最佳适用场景快速创意生成、约束式设计开放式探索、深度评估
降级方案: 如果Agent团队模式出现问题,剩余阶段切换为任务工具模式。

STEP 0c: Effort-Aware Phase Scaling (CC 2.1.76)

STEP 0c: 基于工作量的阶段缩放(CC 2.1.76)

Read the
/effort
setting to scale brainstorm depth. The effort-aware context budgeting hook (global) detects effort level automatically — adapt the phase plan accordingly:
Effort LevelPhases RunToken BudgetAgents
lowPhase 0 → Phase 2 (quick ideation) → Phase 5 (light synthesis)~50K2 max
mediumPhase 0 → Phase 2 → Phase 3 → Phase 5 → Phase 6~150K3 max
high (default)All 7 phases~400K3-5
python
undefined
读取
/effort
设置来调整头脑风暴的深度。全局的工作量感知上下文预算钩子会自动检测工作量级别——据此调整阶段规划:
工作量级别执行阶段令牌预算Agent数量
阶段0 → 阶段2(快速创意生成) → 阶段5(轻量综合)~50K最多2个
阶段0 → 阶段2 → 阶段3 → 阶段5 → 阶段6~150K最多3个
(默认)所有7个阶段~400K3-5个
python
undefined

Effort detection — the global hook injects effort level, but also check:

工作量检测 — 全局钩子会注入工作量级别,但也需检查:

If user said "quick brainstorm" or "just ideas" → treat as low effort

如果用户提到"快速头脑风暴"或"仅需想法" → 视为低工作量

If user selected "Quick ideation" in Step 0a → treat as low effort regardless of /effort

如果用户在步骤0a中选择"快速创意生成" → 无论/effort设置如何,都视为低工作量


> **Override:** Explicit user selection in Step 0a (e.g., "Open exploration") overrides `/effort` downscaling.

---

> **覆盖规则:** 步骤0a中的明确用户选择(例如:"开放式探索")会覆盖`/effort`的降级设置。

---

CRITICAL: Task Management is MANDATORY (CC 2.1.16)

关键要求:任务管理是强制性的(CC 2.1.16)

python
undefined
python
undefined

Create main task IMMEDIATELY

立即创建主任务

TaskCreate( subject="Brainstorm: {topic}", description="Design exploration with parallel agent research", activeForm="Brainstorming {topic}" )
TaskCreate( subject="头脑风暴:{topic}", description="借助并行Agent研究进行设计探索", activeForm="正在头脑风暴 {topic}" )

Create subtasks for each phase

为每个阶段创建子任务

TaskCreate(subject="Analyze topic and select agents", activeForm="Analyzing topic") TaskCreate(subject="Search memory for past decisions", activeForm="Searching knowledge graph") TaskCreate(subject="Generate divergent ideas (10+)", activeForm="Generating ideas") TaskCreate(subject="Feasibility fast-check", activeForm="Checking feasibility") TaskCreate(subject="Evaluate with devil's advocate", activeForm="Evaluating ideas") TaskCreate(subject="Synthesize top approaches", activeForm="Synthesizing approaches") TaskCreate(subject="Present design options", activeForm="Presenting options")

---
TaskCreate(subject="分析主题并选择Agent", activeForm="正在分析主题") TaskCreate(subject="搜索记忆中的过往决策", activeForm="正在搜索知识图谱") TaskCreate(subject="生成发散性想法(10+个)", activeForm="正在生成想法") TaskCreate(subject="可行性快速检查", activeForm="正在检查可行性") TaskCreate(subject="结合反向评估进行评估", activeForm="正在评估想法") TaskCreate(subject="综合排名靠前的方案", activeForm="正在综合方案") TaskCreate(subject="呈现设计选项", activeForm="正在呈现选项")

---

The Seven-Phase Process

七阶段流程

PhaseActivitiesOutput
0. Topic AnalysisClassify keywords, select 3-5 agentsAgent list
1. Memory + ContextSearch graph, check codebasePrior patterns
2. Divergent ExplorationGenerate 10+ ideas WITHOUT filteringIdea pool
3. Feasibility Fast-Check30-second viability per idea, including testabilityFiltered ideas
4. Evaluation & RatingRate 0-10 (6 dimensions incl. testability), devil's advocateRanked ideas
5. SynthesisFilter to top 2-3, trade-off table, test strategy per approachOptions
6. Design PresentationPresent in 200-300 word sections, include test planValidated design
阶段活动输出
0. 主题分析分类关键词,选择3-5个AgentAgent列表
1. 记忆+上下文搜索图谱,检查代码库过往模式
2. 发散式探索生成10+个想法,不进行筛选想法池
3. 可行性快速检查每个想法进行30秒可行性评估,包括可测试性筛选后的可行想法
4. 评估与评分按0-10分评分(6个维度,包括可测试性),反向评估排名后的想法
5. 综合筛选出排名前2-3的方案,生成权衡对比表,每个方案的测试策略可选方案
6. 设计呈现分200-300字的小节呈现,包含测试计划经过验证的设计

Progressive Output (CC 2.1.76)

渐进式输出(CC 2.1.76)

Output results incrementally after each phase — don't batch everything until the end:
After PhaseShow User
0. Topic AnalysisSelected agents, tier classification
1. Memory + ContextPrior decisions, relevant patterns
2. Divergent ExplorationEach agent's ideas as they return (don't wait for all)
3. FeasibilityFiltered viable ideas with pass/fail
4. EvaluationTop-rated ideas with scores
For Phase 2 parallel agents, output each agent's ideas as soon as it returns — don't wait for all agents. This lets users see early ideas and redirect the exploration if needed. Showing ideas incrementally also helps users build a mental model of the solution space faster than a final dump.
Load the phase workflow for detailed instructions:
Read("${CLAUDE_SKILL_DIR}/references/phase-workflow.md")

每个阶段完成后立即输出结果——不要等到所有阶段结束后批量输出:
阶段完成后向用户展示
0. 主题分析选定的Agent、项目层级分类
1. 记忆+上下文过往决策、相关模式
2. 发散式探索每个Agent返回的想法(无需等待所有Agent完成)
3. 可行性检查筛选后的可行想法及通过/未通过标记
4. 评估排名靠前的想法及评分
对于阶段2的并行Agent,每个Agent返回后立即输出其想法——不要等待所有Agent完成。这样用户可以看到早期想法,并在需要时调整探索方向。渐进式展示想法也能帮助用户比最终一次性输出更快地建立对解决方案空间的认知模型。
加载阶段工作流获取详细说明:
Read("${CLAUDE_SKILL_DIR}/references/phase-workflow.md")

When NOT to Use

不适用场景

Skip brainstorming when:
  • Requirements are crystal clear and specific
  • Only one obvious approach exists
  • User has already designed the solution
  • Time-sensitive bug fix or urgent issue

在以下情况跳过头脑风暴:
  • 需求非常明确且具体
  • 只有一种明显的解决方案
  • 用户已经完成了设计
  • 时间敏感的bug修复或紧急问题

Quick Reference: Agent Selection

快速参考:Agent选择

Topic ExampleAgents to Spawn
"brainstorm API for users"workflow-architect, backend-system-architect, security-auditor, test-generator
"brainstorm dashboard UI"workflow-architect, frontend-ui-developer, test-generator
"brainstorm RAG pipeline"workflow-architect, llm-integrator, data-pipeline-engineer, test-generator
"brainstorm caching strategy"workflow-architect, backend-system-architect, frontend-performance-engineer, test-generator
"brainstorm design system"workflow-architect, frontend-ui-developer, design-context-extractor, component-curator, test-generator
"brainstorm event sourcing"workflow-architect, event-driven-architect, backend-system-architect, test-generator
"brainstorm pricing strategy"workflow-architect, product-strategist, web-research-analyst, test-generator
"brainstorm deploy pipeline"workflow-architect, infrastructure-architect, ci-cd-engineer, test-generator
Always include:
workflow-architect
for system design perspective,
test-generator
for testability assessment.

主题示例要启动的Agent
"头脑风暴用户API"workflow-architect, backend-system-architect, security-auditor, test-generator
"头脑风暴仪表盘UI"workflow-architect, frontend-ui-developer, test-generator
"头脑风暴RAG流水线"workflow-architect, llm-integrator, data-pipeline-engineer, test-generator
"头脑风暴缓存策略"workflow-architect, backend-system-architect, frontend-performance-engineer, test-generator
"头脑风暴设计系统"workflow-architect, frontend-ui-developer, design-context-extractor, component-curator, test-generator
"头脑风暴事件溯源"workflow-architect, event-driven-architect, backend-system-architect, test-generator
"头脑风暴定价策略"workflow-architect, product-strategist, web-research-analyst, test-generator
"头脑风暴部署流水线"workflow-architect, infrastructure-architect, ci-cd-engineer, test-generator
必须包含:
workflow-architect
(提供系统设计视角)、
test-generator
(评估可测试性)。

Agent Teams Alternative: Brainstorming Team

Agent团队替代方案:头脑风暴团队

In Agent Teams mode, form a brainstorming team where agents debate ideas in real-time. Dynamically select teammates based on topic analysis (Phase 0):
python
TeamCreate(team_name="brainstorm-{topic-slug}", description="Brainstorm {topic}")
在Agent团队模式下,组建一个头脑风暴团队,让Agent实时辩论想法。根据主题分析(阶段0)动态选择团队成员:
python
TeamCreate(team_name="brainstorm-{topic-slug}", description="头脑风暴 {topic}")

Always include the system design lead

必须包含系统设计主导者

Agent(subagent_type="workflow-architect", name="system-designer", team_name="brainstorm-{topic-slug}", prompt="""You are the system design lead for brainstorming: {topic} DIVERGENT MODE: Generate 3-4 architectural approaches. When other teammates share ideas, build on them or propose alternatives. Challenge ideas that seem over-engineered — advocate for simplicity. After divergent phase, help synthesize the top approaches.""")
Agent(subagent_type="workflow-architect", name="system-designer", team_name="brainstorm-{topic-slug}", prompt="""你是{topic}头脑风暴的系统设计主导者 发散模式:生成3-4种架构方案。 当其他团队成员分享想法时,在其基础上拓展或提出替代方案。 挑战过度设计的想法——倡导简洁性。 发散阶段结束后,协助综合排名靠前的方案。""")

Domain-specific teammates (select 2-3 based on topic keywords)

领域特定团队成员(根据主题关键词选择2-3个)

Agent(subagent_type="backend-system-architect", name="backend-thinker", team_name="brainstorm-{topic-slug}", prompt="""Brainstorm backend approaches for: {topic} DIVERGENT MODE: Generate 3-4 backend-specific ideas. When system-designer shares architectural ideas, propose concrete API designs. Challenge ideas from other teammates with implementation reality checks. Play devil's advocate on complexity vs simplicity trade-offs.""")
Agent(subagent_type="frontend-ui-developer", name="frontend-thinker", team_name="brainstorm-{topic-slug}", prompt="""Brainstorm frontend approaches for: {topic} DIVERGENT MODE: Generate 3-4 UI/UX ideas. When backend-thinker proposes APIs, suggest frontend patterns that match. Challenge backend proposals that create poor user experiences. Advocate for progressive disclosure and accessibility.""")
Agent(subagent_type="backend-system-architect", name="backend-thinker", team_name="brainstorm-{topic-slug}", prompt="""为{topic}头脑风暴后端方案 发散模式:生成3-4个后端特定想法。 当system-designer分享架构想法时,提出具体的API设计。 用实现可行性检查挑战其他团队成员的想法。 在复杂度与简洁性的权衡中扮演反向评估者角色。""")
Agent(subagent_type="frontend-ui-developer", name="frontend-thinker", team_name="brainstorm-{topic-slug}", prompt="""为{topic}头脑风暴前端方案 发散模式:生成3-4个UI/UX想法。 当backend-thinker提出API时,建议匹配的前端模式。 挑战会导致糟糕用户体验的后端提案。 倡导渐进式披露和可访问性。""")

Always include: testability assessor

必须包含:可测试性评估者

Agent(subagent_type="test-generator", name="testability-assessor", team_name="brainstorm-{topic-slug}", prompt="""Assess testability for each brainstormed approach: {topic} For every idea shared by teammates, evaluate: - Can core logic be unit tested without external services? - What's the mock/stub surface area? - Can it be integration-tested with docker-compose/testcontainers? Score testability 0-10 per the evaluation rubric. Challenge designs that score below 5 on testability. Propose test strategies for the top approaches in synthesis phase.""")
Agent(subagent_type="test-generator", name="testability-assessor", team_name="brainstorm-{topic-slug}", prompt="""评估每个头脑风暴方案的可测试性:{topic} 对于团队成员分享的每个想法,评估: - 核心逻辑是否可以在不依赖外部服务的情况下进行单元测试? - 模拟/存根的范围有多大? - 是否可以用docker-compose/testcontainers进行集成测试? 根据评估标准为可测试性评分0-10。 挑战可测试性得分低于5的设计。 在综合阶段为排名靠前的方案提出测试策略。""")

Optional: Add security-auditor, llm-integrator based on topic

可选:根据主题添加security-auditor、llm-integrator等


**Key advantage:** Agents riff on each other's ideas and play devil's advocate in real-time, rather than generating ideas in isolation.

**Team teardown** after synthesis:
```python

**主要优势:** Agent在彼此想法基础上拓展,并实时进行反向评估,而不是孤立地生成想法。

**综合完成后解散团队:**
```python

After Phase 5 synthesis and design presentation

阶段5综合完成并呈现设计后

SendMessage(type="shutdown_request", recipient="system-designer", content="Brainstorm complete") SendMessage(type="shutdown_request", recipient="backend-thinker", content="Brainstorm complete") SendMessage(type="shutdown_request", recipient="frontend-thinker", content="Brainstorm complete") SendMessage(type="shutdown_request", recipient="testability-assessor", content="Brainstorm complete")
SendMessage(type="shutdown_request", recipient="system-designer", content="头脑风暴完成") SendMessage(type="shutdown_request", recipient="backend-thinker", content="头脑风暴完成") SendMessage(type="shutdown_request", recipient="frontend-thinker", content="头脑风暴完成") SendMessage(type="shutdown_request", recipient="testability-assessor", content="头脑风暴完成")

... shutdown any additional domain teammates

... 关闭其他领域特定团队成员

TeamDelete()
TeamDelete()

Worktree cleanup (CC 2.1.72) — for Tier 3+ projects that entered a worktree

工作树清理(CC 2.1.72)——对于进入工作树的层级3+项目

If EnterWorktree was called during brainstorm (e.g., Plan first → worktree), exit it

如果头脑风暴期间调用了EnterWorktree(例如:先规划 → 工作树),退出工作树

ExitWorktree(action="keep") # Keep branch for follow-up /ork:implement

> **Fallback:** If team formation fails, load `Read("${CLAUDE_SKILL_DIR}/references/phase-workflow.md")` and use standard Phase 2 Task spawns.

> **Partial results (CC 2.1.76):** Background agents that are killed (timeout, context limit) return responses tagged with `[PARTIAL RESULT]`. When collecting Phase 2 divergent ideas, check each agent's output for this tag. If present, include the partial ideas but note them as incomplete in Phase 3 feasibility. Prefer synthesizing partial results over re-spawning agents.

> **PostCompact recovery:** Long brainstorm sessions may trigger context compaction. The PostCompact hook re-injects branch and task state. If compaction occurs mid-brainstorm, check `.claude/chain/state.json` for the last completed phase and resume from the next handoff file (see Phase Handoffs table).

> **Manual cleanup:** If `TeamDelete()` doesn't terminate all agents, press `Ctrl+F` twice to force-stop remaining background agents. Note: `/clear` (CC 2.1.72+) preserves background agents — only foreground tasks are cleared.

---
ExitWorktree(action="keep") # 保留分支用于后续/ork:implement操作

> **降级方案:** 如果团队创建失败,加载`Read("${CLAUDE_SKILL_DIR}/references/phase-workflow.md")`并使用标准的阶段2任务启动方式。

> **部分结果(CC 2.1.76):** 被终止的后台Agent(超时、上下文限制)会返回标记为`[PARTIAL RESULT]`的响应。收集阶段2的发散想法时,检查每个Agent的输出是否有此标记。如果存在,将部分想法包含在内,但在阶段3可行性分析中注明其不完整。优先综合部分结果,而不是重新启动Agent。

> **压缩后恢复:** 长时间的头脑风暴会话可能触发上下文压缩。PostCompact钩子会重新注入分支和任务状态。如果压缩发生在头脑风暴过程中,检查`.claude/chain/state.json`获取最后完成的阶段,并从下一个交接文件恢复(见阶段交接表)。

> **手动清理:** 如果`TeamDelete()`没有终止所有Agent,按两次`Ctrl+F`强制停止剩余的后台Agent。注意:`/clear`(CC 2.1.72+)会保留后台Agent——仅清除前台任务。

---

Key Principles

核心原则

PrincipleApplication
Dynamic agent selectionSelect agents based on topic keywords
Parallel researchLaunch 3-5 agents in ONE message
Memory-firstCheck graph for past decisions before research
Divergent-firstGenerate 10+ ideas BEFORE filtering
Task trackingUse TaskCreate/TaskUpdate for progress visibility
YAGNI ruthlesslyRemove unnecessary complexity

原则应用
动态Agent选择根据主题关键词选择Agent
并行研究在一条消息中启动3-5个Agent
记忆优先研究前先检查图谱中的过往决策
先发散后收敛生成10+个想法后再进行筛选
任务跟踪使用TaskCreate/TaskUpdate实现进度可视化
严格遵循YAGNI原则移除不必要的复杂度

Related Skills

相关技能

  • ork:architecture-decision-record
    - Document key decisions made during brainstorming
  • ork:implement
    - Execute the implementation plan after brainstorming completes
  • ork:explore
    - Deep codebase exploration to understand existing patterns
  • ork:assess
    - Rate quality 0-10 with dimension breakdown
  • ork:design-to-code
    - Convert brainstormed UI designs into components
  • ork:component-search
    - Find existing components before building new ones
  • ork:competitive-analysis
    - Porter's Five Forces, SWOT for product brainstorms
  • ork:architecture-decision-record
    - 记录头脑风暴期间做出的关键决策
  • ork:implement
    - 头脑风暴完成后执行实施计划
  • ork:explore
    - 深入探索代码库以理解现有模式
  • ork:assess
    - 按维度进行0-10分评分
  • ork:design-to-code
    - 将头脑风暴得到的UI设计转化为组件
  • ork:component-search
    - 构建新组件前先查找现有组件
  • ork:competitive-analysis
    - 用于产品头脑风暴的波特五力分析、SWOT分析

References

参考资料

Load on demand with
Read("${CLAUDE_SKILL_DIR}/references/<file>")
:
FileContent
phase-workflow.md
Detailed 7-phase instructions
divergent-techniques.md
SCAMPER, Mind Mapping, etc.
evaluation-rubric.md
0-10 scoring criteria
devils-advocate-prompts.md
Challenge templates
socratic-questions.md
Requirements discovery
common-pitfalls.md
Mistakes to avoid
example-session-dashboard.md
Complete example

Version: 4.7.0 (March 2026) — Added progressive output for incremental phase results (7.9.0)
按需加载
Read("${CLAUDE_SKILL_DIR}/references/<file>")
文件内容
phase-workflow.md
详细的7阶段说明
divergent-techniques.md
SCAMPER、思维导图等发散技巧
evaluation-rubric.md
0-10分评分标准
devils-advocate-prompts.md
挑战模板
socratic-questions.md
需求挖掘问题
common-pitfalls.md
需要避免的常见错误
example-session-dashboard.md
完整示例会话

版本: 4.7.0(2026年3月)—— 新增了阶段结果的渐进式输出(7.9.0)