mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
docs: 重新组织场景顺序,突出头脑风暴在复杂功能开发中的作用
### 主要改进 **场景顺序优化** - 从简单到复杂的逻辑流程: 1. **场景 1:快速功能开发** - 简单功能的 plan → execute 模式 2. **场景 2:复杂功能的多智能体头脑风暴** - 展示完整工作流:brainstorm → plan → execute 3. **场景 3:UI 设计** - 专业化工作流 4. **场景 4:Bug 修复** - 维护场景 **场景 2 的关键改进**: - 明确头脑风暴应在 plan 之前,用于复杂功能的需求分析 - 展示完整的三阶段工作流(头脑风暴 → 规划 → 执行) - 简化说明,移除冗余的角色列表和阶段详情 - 聚焦于"何时使用头脑风暴"的实用指导 **内容精简**: - 移除重复的专家角色详细列表(从原来的详细分类简化为一句话) - 移除工作流阶段的详细说明(用户可从实际执行中了解) - 更紧凑的场景描述,提高可读性 - 减少 22 行代码(99 → 77 行变更) **逻辑一致性提升**: - 场景 1:适合新手,快速上手 - 场景 2:展示 CCW 最强大的功能 - 多智能体协作 - 场景 3-4:专业化场景,展示多样性 **用户体验改进**: 用户现在可以清楚地理解: 1. 简单功能直接 plan 2. 复杂功能先 brainstorm 再 plan 3. 完整的工作流逻辑顺序 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -82,79 +82,70 @@ Understanding these concepts will help you use CCW more effectively:
|
||||
|
||||
## 🛠️ Common Scenarios
|
||||
|
||||
### Scenario 1: Developing a New Feature (as shown above)
|
||||
### Scenario 1: Quick Feature Development
|
||||
|
||||
This is the most common use case, following the "start session → plan → execute" pattern.
|
||||
For simple, well-defined features, use the direct "plan → execute" pattern:
|
||||
|
||||
```bash
|
||||
# 1. Start a session
|
||||
/workflow:session:start "User Login Feature"
|
||||
|
||||
# 2. Create a plan
|
||||
# Create plan (auto-creates session)
|
||||
/workflow:plan "Implement JWT-based user login and registration"
|
||||
|
||||
# 3. Execute
|
||||
# Execute
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
### Scenario 2: UI Design
|
||||
> **💡 Note**: `/workflow:plan` automatically creates a session. You can also manually start a session first with `/workflow:session:start "Feature Name"`.
|
||||
|
||||
CCW has powerful UI design capabilities, capable of generating complex UI prototypes from simple text descriptions.
|
||||
### Scenario 2: Complex Feature with Multi-Agent Brainstorming
|
||||
|
||||
For complex features requiring thorough analysis, use the complete workflow: **brainstorm → plan → execute**
|
||||
|
||||
```bash
|
||||
# 1. Start a UI design workflow
|
||||
/workflow:ui-design:explore-auto --prompt "A modern, clean admin dashboard login page with username, password fields and a login button"
|
||||
|
||||
# 2. View the generated prototype
|
||||
# After the command finishes, it will provide a path to a compare.html file. Open it in your browser to preview.
|
||||
```
|
||||
|
||||
### Scenario 3: Fixing a Bug
|
||||
|
||||
CCW can help you analyze and fix bugs.
|
||||
|
||||
```bash
|
||||
# 1. Use the bug-index command to analyze the problem
|
||||
/cli:mode:bug-index "Incorrect success message even with wrong password on login"
|
||||
|
||||
# 2. The AI will analyze the relevant code and generate a fix plan. You can then execute this plan.
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
### Scenario 4: Multi-Agent Brainstorming
|
||||
|
||||
Before implementing complex features, use multi-agent brainstorming to explore different perspectives and generate comprehensive specifications.
|
||||
|
||||
```bash
|
||||
# Automatic role selection and parallel analysis (auto-creates session)
|
||||
# Step 1: Multi-agent brainstorming (auto-creates session)
|
||||
/workflow:brainstorm:auto-parallel "Design a real-time collaborative document editing system with conflict resolution"
|
||||
|
||||
# Specify number of expert roles (default: 3, max: 9)
|
||||
# Optional: Specify number of expert roles (default: 3, max: 9)
|
||||
/workflow:brainstorm:auto-parallel "Build scalable microservices platform" --count 5
|
||||
|
||||
# Step 2: Generate implementation plan from brainstorming results
|
||||
/workflow:plan
|
||||
|
||||
# Step 3: Execute the plan
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
**How It Works**:
|
||||
- **Auto role selection**: Analyzes your topic and selects relevant expert roles
|
||||
**Brainstorming Benefits**:
|
||||
- **Auto role selection**: Analyzes your topic and selects 3-9 relevant expert roles (system-architect, ui-designer, product-manager, etc.)
|
||||
- **Parallel execution**: Multiple AI agents analyze simultaneously from different perspectives
|
||||
- **Comprehensive output**: Generates integrated specification with cross-role insights
|
||||
- **Comprehensive specification**: Generates integrated requirements and design document
|
||||
|
||||
**Available Expert Roles**:
|
||||
- Technical: `system-architect`, `data-architect`, `subject-matter-expert`
|
||||
- Product & Design: `ui-designer`, `ux-expert`, `product-manager`, `product-owner`
|
||||
- Agile & Quality: `scrum-master`, `test-strategist`
|
||||
- API Design: `api-designer`
|
||||
|
||||
**Workflow Phases**:
|
||||
1. **Framework Generation**: Creates structured discussion framework
|
||||
2. **Parallel Analysis**: Multiple experts analyze simultaneously
|
||||
3. **Synthesis**: Integrates all perspectives into comprehensive specification
|
||||
4. **Action Planning**: Use `/workflow:plan` to generate implementation tasks
|
||||
|
||||
**When to Use**:
|
||||
**When to Use Brainstorming**:
|
||||
- Complex features requiring multiple perspectives
|
||||
- Architectural decisions with significant impact
|
||||
- New product features needing comprehensive analysis
|
||||
- When you want thorough requirements and design specifications
|
||||
- When you need thorough requirements before implementation
|
||||
|
||||
### Scenario 3: UI Design
|
||||
|
||||
CCW has powerful UI design capabilities for generating prototypes from text descriptions:
|
||||
|
||||
```bash
|
||||
# Generate UI design variations (auto-creates session)
|
||||
/workflow:ui-design:explore-auto --prompt "A modern, clean admin dashboard login page"
|
||||
```
|
||||
|
||||
After completion, open the generated `compare.html` file in your browser to preview designs.
|
||||
|
||||
### Scenario 4: Bug Fixing
|
||||
|
||||
Quick bug analysis and fix workflow:
|
||||
|
||||
```bash
|
||||
# Analyze the bug
|
||||
/cli:mode:bug-index "Incorrect success message with wrong password"
|
||||
|
||||
# Generate and execute fix plan
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -74,83 +74,70 @@
|
||||
|
||||
## 🛠️ 常见场景示例
|
||||
|
||||
### 场景 1:开发一个新功能(如上所示)
|
||||
### 场景 1:快速功能开发
|
||||
|
||||
这是最常见的用法,遵循"规划 → 执行"的模式(会话会自动创建)。
|
||||
对于简单、明确的功能,使用直接的"规划 → 执行"模式:
|
||||
|
||||
```bash
|
||||
# 1. 创建计划(自动启动会话)
|
||||
# 创建计划(自动创建会话)
|
||||
/workflow:plan "实现基于 JWT 的用户登录和注册功能"
|
||||
|
||||
# 2. 执行
|
||||
# 执行
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
> **💡 提示**:也可以手动启动会话后再规划:
|
||||
> ```bash
|
||||
> /workflow:session:start "用户登录功能"
|
||||
> /workflow:plan "实现基于 JWT 的用户登录和注册功能"
|
||||
> ```
|
||||
> **💡 提示**:`/workflow:plan` 会自动创建会话。您也可以先手动启动会话:`/workflow:session:start "功能名称"`。
|
||||
|
||||
### 场景 2:进行 UI 设计
|
||||
### 场景 2:复杂功能的多智能体头脑风暴
|
||||
|
||||
CCW 拥有强大的 UI 设计能力,可以从简单的文本描述生成复杂的 UI 原型。
|
||||
对于需要深入分析的复杂功能,使用完整工作流:**头脑风暴 → 规划 → 执行**
|
||||
|
||||
```bash
|
||||
# 启动 UI 设计工作流(会自动创建会话)
|
||||
/workflow:ui-design:explore-auto --prompt "一个现代、简洁的管理后台登录页面,包含用户名、密码输入框和登录按钮"
|
||||
|
||||
# 命令执行完毕后,会提供一个 compare.html 文件的路径,在浏览器中打开即可预览。
|
||||
```
|
||||
|
||||
> **💡 提示**:UI 设计命令(如 `/workflow:ui-design:explore-auto`、`/workflow:brainstorm:auto-parallel`)也会自动创建和管理工作流会话。
|
||||
|
||||
### 场景 3:修复一个 Bug
|
||||
|
||||
CCW 可以帮助您分析并修复 Bug。
|
||||
|
||||
```bash
|
||||
# 1. 使用 bug-index 命令分析问题
|
||||
/cli:mode:bug-index "用户登录时,即使密码错误也提示成功"
|
||||
|
||||
# 2. AI 会分析相关代码,并生成一个修复计划。然后您可以执行这个计划。
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
### 场景 4:多智能体头脑风暴
|
||||
|
||||
在实现复杂功能之前,使用多智能体头脑风暴从不同视角探索需求,生成全面的规格说明。
|
||||
|
||||
```bash
|
||||
# 自动角色选择和并行分析(自动创建会话)
|
||||
# 第 1 步:多智能体头脑风暴(自动创建会话)
|
||||
/workflow:brainstorm:auto-parallel "设计一个支持冲突解决的实时协作文档编辑系统"
|
||||
|
||||
# 指定专家角色数量(默认:3,最大:9)
|
||||
# 可选:指定专家角色数量(默认:3,最大:9)
|
||||
/workflow:brainstorm:auto-parallel "构建可扩展的微服务平台" --count 5
|
||||
|
||||
# 第 2 步:从头脑风暴结果生成实现计划
|
||||
/workflow:plan
|
||||
|
||||
# 第 3 步:执行计划
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
**工作原理**:
|
||||
- **自动角色选择**:分析您的主题并选择相关的专家角色
|
||||
**头脑风暴优势**:
|
||||
- **自动角色选择**:分析主题并选择 3-9 个相关专家角色(系统架构师、UI 设计师、产品经理等)
|
||||
- **并行执行**:多个 AI 智能体从不同视角同时分析
|
||||
- **综合输出**:生成包含跨角色洞察的综合规格说明
|
||||
- **综合规格说明**:生成整合的需求和设计文档
|
||||
|
||||
**可用专家角色**:
|
||||
- 技术类:`system-architect`(系统架构师)、`data-architect`(数据架构师)、`subject-matter-expert`(领域专家)
|
||||
- 产品设计类:`ui-designer`(UI 设计师)、`ux-expert`(UX 专家)、`product-manager`(产品经理)、`product-owner`(产品负责人)
|
||||
- 敏捷与质量:`scrum-master`(敏捷教练)、`test-strategist`(测试策略师)
|
||||
- API 设计:`api-designer`(API 设计师)
|
||||
|
||||
**工作流阶段**:
|
||||
1. **框架生成**:创建结构化讨论框架
|
||||
2. **并行分析**:多个专家同时进行分析
|
||||
3. **综合整合**:将所有视角整合为综合规格说明
|
||||
4. **行动计划**:使用 `/workflow:plan` 生成实现任务
|
||||
|
||||
**使用时机**:
|
||||
**何时使用头脑风暴**:
|
||||
- 需要多视角分析的复杂功能
|
||||
- 具有重大影响的架构决策
|
||||
- 需要全面分析的新产品功能
|
||||
- 希望获得详尽的需求和设计规格
|
||||
- 实现前需要详尽需求分析
|
||||
|
||||
### 场景 3:UI 设计
|
||||
|
||||
CCW 拥有强大的 UI 设计能力,可从文本描述生成原型:
|
||||
|
||||
```bash
|
||||
# 生成 UI 设计变体(自动创建会话)
|
||||
/workflow:ui-design:explore-auto --prompt "一个现代、简洁的管理后台登录页面"
|
||||
```
|
||||
|
||||
完成后,在浏览器中打开生成的 `compare.html` 文件预览设计。
|
||||
|
||||
### 场景 4:Bug 修复
|
||||
|
||||
快速 Bug 分析和修复工作流:
|
||||
|
||||
```bash
|
||||
# 分析 Bug
|
||||
/cli:mode:bug-index "密码错误时仍显示成功消息"
|
||||
|
||||
# 生成并执行修复计划
|
||||
/workflow:execute
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user