mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 15:03:57 +08:00
Refactor documentation for code commands and workflows
- Updated command syntax formatting to use code blocks for clarity in `prep.md`, `review.md`, and `spec.md`. - Enhanced architectural diagrams in `ch01-what-is-claude-dms3.md` and core concepts in `ch03-core-concepts.md` using mermaid syntax for better visualization. - Improved workflow diagrams in `ch04-workflow-basics.md` and `4-level.md` to provide clearer representations of processes. - Added troubleshooting section in `installation.md` to address common installation issues and provide quick start examples. - Revised skill documentation in `claude-meta.md` and `claude-workflow.md` to standardize command triggers and output structures. - Updated best practices and workflow index documentation to enhance readability and understanding of workflow levels and practices.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
**一句话定位**: 规范生成器 — 6 阶段文档链生成完整规范包(产品简报、PRD、架构、Epics)
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/spec-generator <idea>
|
||||
/spec-generator --continue # 从断点恢复
|
||||
/spec-generator -y <idea> # 自动模式
|
||||
@@ -46,7 +46,7 @@
|
||||
- 纯文档:无代码生成或执行 — 干净移交给现有执行工作流
|
||||
|
||||
**架构概览**:
|
||||
```
|
||||
```plaintext
|
||||
Phase 0: Specification Study (Read specs/ + templates/ - mandatory prerequisite)
|
||||
|
|
||||
Phase 1: Discovery -> spec-config.json + discovery-context.json
|
||||
@@ -85,7 +85,7 @@ Phase 6: Readiness Check -> readiness-report.md + spec-summary.md
|
||||
| [templates/epics-template.md](templates/epics-template.md) | Epic/Story 文档模板 |
|
||||
|
||||
**输出结构**:
|
||||
```
|
||||
```plaintext
|
||||
.workflow/.spec/SPEC-{slug}-{YYYY-MM-DD}/
|
||||
├── spec-config.json # 会话配置 + 阶段状态
|
||||
├── discovery-context.json # 代码库探索结果(可选)
|
||||
@@ -119,7 +119,7 @@ Phase 6: Readiness Check -> readiness-report.md + spec-summary.md
|
||||
**一句话定位**: 头脑风暴 — 交互式框架生成、多角色并行分析和跨角色综合
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/brainstorm <topic>
|
||||
/brainstorm --count 3 "Build platform"
|
||||
/brainstorm -y "GOAL: Build SCOPE: Users" --count 5
|
||||
@@ -169,7 +169,7 @@ Artifacts N×Role Synthesis 1×Role
|
||||
| `ux-expert` | UX专家 | 用户研究、信息架构、旅程 |
|
||||
|
||||
**输出结构**:
|
||||
```
|
||||
```plaintext
|
||||
.workflow/active/WFS-{topic}/
|
||||
├── workflow-session.json # 会话元数据
|
||||
├── .process/
|
||||
@@ -204,7 +204,7 @@ Artifacts N×Role Synthesis 1×Role
|
||||
**一句话定位**: Skill 生成器 — 元技能,用于创建新的 Claude Code Skills
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/skill-generator
|
||||
/create skill
|
||||
/new skill
|
||||
@@ -242,7 +242,7 @@ Artifacts N×Role Synthesis 1×Role
|
||||
| [templates/autonomous-action.md](templates/autonomous-action.md) | 自治动作模板 |
|
||||
|
||||
**执行流程**:
|
||||
```
|
||||
```plaintext
|
||||
Phase 0: 规范研究(强制)
|
||||
- Read: ../_shared/SKILL-DESIGN-SPEC.md
|
||||
- Read: All templates/*.md files
|
||||
@@ -269,7 +269,7 @@ Phase 5: 验证和文档
|
||||
```
|
||||
|
||||
**输出结构** (Sequential):
|
||||
```
|
||||
```plaintext
|
||||
.claude/skills/{skill-name}/
|
||||
├── SKILL.md # 入口文件
|
||||
├── phases/
|
||||
@@ -294,7 +294,7 @@ Phase 5: 验证和文档
|
||||
**一句话定位**: CCW 命令帮助系统 — 命令搜索、推荐、文档查看
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/ccw-help
|
||||
/ccw "task description" # 自动选择工作流并执行
|
||||
/ccw-help search <keyword> # 搜索命令
|
||||
@@ -356,7 +356,7 @@ Phase 5: 验证和文档
|
||||
**一句话定位**: Skill 调优诊断 — 自动化诊断和优化建议
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/skill-tuning <skill-name>
|
||||
```
|
||||
|
||||
@@ -367,7 +367,7 @@ Phase 5: 验证和文档
|
||||
- 验证改进
|
||||
|
||||
**诊断流程**:
|
||||
```
|
||||
```plaintext
|
||||
分析 Skill → 识别问题 → 生成建议 → 应用优化 → 验证效果
|
||||
```
|
||||
|
||||
@@ -378,7 +378,7 @@ Phase 5: 验证和文档
|
||||
**一句话定位**: 命令生成器 — 生成 Claude 命令
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/command-generator
|
||||
```
|
||||
|
||||
@@ -394,7 +394,7 @@ Phase 5: 验证和文档
|
||||
**一句话定位**: Issue 管理 — Issue 创建、更新、状态管理
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/issue-manage
|
||||
/issue:new
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
**一句话定位**: 统一规划技能 — 4 阶段工作流、计划验证、交互式重规划
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:plan <task-description>
|
||||
/workflow:plan-verify --session <session-id>
|
||||
/workflow:replan --session <session-id> [task-id] "requirements"
|
||||
@@ -61,7 +61,7 @@ default → 'plan'
|
||||
6. **累积状态**: planning-notes.md 跨阶段携带上下文用于 N+1 决策
|
||||
|
||||
**计划模式数据流**:
|
||||
```
|
||||
```plaintext
|
||||
用户输入(任务描述)
|
||||
↓
|
||||
[转换为结构化格式]
|
||||
@@ -106,7 +106,7 @@ Phase 4: task-generate-agent --session sessionId
|
||||
**一句话定位**: 代理协调执行 — 系统化任务发现、代理协调和状态跟踪
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:execute
|
||||
/workflow:execute --resume-session="WFS-auth"
|
||||
/workflow:execute --yes
|
||||
@@ -125,7 +125,7 @@ Phase 4: task-generate-agent --session sessionId
|
||||
- **完成选择**: 自动完成会话(运行 `/workflow:session:complete --yes`)
|
||||
|
||||
**执行过程**:
|
||||
```
|
||||
```plaintext
|
||||
Phase 1: 发现
|
||||
├─ 计算活跃会话数
|
||||
└─ 决策:
|
||||
@@ -188,7 +188,7 @@ Phase 5: 完成
|
||||
**一句话定位**: 轻量级快速规划 — 超简单任务的快速规划和执行
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:lite-plan <simple-task>
|
||||
```
|
||||
|
||||
@@ -210,7 +210,7 @@ Phase 5: 完成
|
||||
**一句话定位**: 多 CLI 协作规划 — 多个 CLI 工具协作的分析和规划
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:multi-cli-plan <task>
|
||||
```
|
||||
|
||||
@@ -231,7 +231,7 @@ Phase 5: 完成
|
||||
**一句话定位**: TDD 工作流 — 测试驱动的开发流程
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:tdd <feature-description>
|
||||
```
|
||||
|
||||
@@ -242,7 +242,7 @@ Phase 5: 完成
|
||||
- 循环直到通过
|
||||
|
||||
**流水线**:
|
||||
```
|
||||
```plaintext
|
||||
规划测试 → 编写测试 → [失败] → 实现功能 → [通过] → 完成
|
||||
↑___________|
|
||||
```
|
||||
@@ -254,7 +254,7 @@ Phase 5: 完成
|
||||
**一句话定位**: 测试修复工作流 — 失败测试的诊断和修复
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:test-fix <failing-tests>
|
||||
```
|
||||
|
||||
@@ -265,7 +265,7 @@ Phase 5: 完成
|
||||
- 循环直到通过
|
||||
|
||||
**流水线**:
|
||||
```
|
||||
```plaintext
|
||||
诊断失败 → 确定根因 → [代码问题] → 修复代码 → 验证
|
||||
↑___________|
|
||||
```
|
||||
@@ -277,7 +277,7 @@ Phase 5: 完成
|
||||
**一句话定位**: Skill 设计工作流 — 创建新的 Claude Code Skills
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:skill-designer <skill-idea>
|
||||
```
|
||||
|
||||
@@ -289,7 +289,7 @@ Phase 5: 完成
|
||||
- 验证和文档
|
||||
|
||||
**输出结构**:
|
||||
```
|
||||
```plaintext
|
||||
.claude/skills/{skill-name}/
|
||||
├── SKILL.md # 入口文件
|
||||
├── phases/
|
||||
@@ -307,7 +307,7 @@ Phase 5: 完成
|
||||
**一句话定位**: Wave 批处理规划 — 批量 Issue 的并行处理规划
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow:wave-plan <issue-list>
|
||||
```
|
||||
|
||||
@@ -318,7 +318,7 @@ Phase 5: 完成
|
||||
- 执行队列生成
|
||||
|
||||
**Wave 模型**:
|
||||
```
|
||||
```plaintext
|
||||
Wave 1: Issue 1-5 → 并行规划 → 并行执行
|
||||
Wave 2: Issue 6-10 → 并行规划 → 并行执行
|
||||
...
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
**一句话定位**: 全生命周期编排器 — 规范/实现/测试的 spawn-wait-close 流水线
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/team-lifecycle <task-description>
|
||||
```
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
| fe-qa | 前端 QA、GC 循环 | 2.3 Deep Interaction |
|
||||
|
||||
**流水线定义**:
|
||||
```
|
||||
```plaintext
|
||||
Spec-only (6 beats):
|
||||
RESEARCH-001(+D1) → DRAFT-001(+D2) → DRAFT-002(+D3) → DRAFT-003(+D4) → DRAFT-004(+D5) → QUALITY-001(+D6)
|
||||
|
||||
@@ -77,7 +77,7 @@ Full-lifecycle (9 beats):
|
||||
```
|
||||
|
||||
**Beat Cycle**:
|
||||
```
|
||||
```plaintext
|
||||
event (phase advance / user resume)
|
||||
↓
|
||||
[Orchestrator]
|
||||
@@ -93,7 +93,7 @@ event (phase advance / user resume)
|
||||
```
|
||||
|
||||
**会话目录**:
|
||||
```
|
||||
```plaintext
|
||||
.workflow/.team/TLS-<slug>-<date>/
|
||||
├── team-session.json # 流水线状态
|
||||
├── spec/ # 规范产物
|
||||
@@ -112,7 +112,7 @@ event (phase advance / user resume)
|
||||
**一句话定位**: 多代理并行开发循环 — 需求分析、探索规划、代码开发、验证
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/parallel-dev-cycle TASK="Implement feature"
|
||||
/parallel-dev-cycle --cycle-id=cycle-v1-20260122-abc123
|
||||
/parallel-dev-cycle --auto TASK="Add OAuth"
|
||||
@@ -138,7 +138,7 @@ event (phase advance / user resume)
|
||||
- 消除冗余代码库探索
|
||||
|
||||
**会话结构**:
|
||||
```
|
||||
```plaintext
|
||||
{projectRoot}/.workflow/.cycle/
|
||||
├── {cycleId}.json # 主状态文件
|
||||
├── {cycleId}.progress/
|
||||
@@ -156,7 +156,7 @@ event (phase advance / user resume)
|
||||
```
|
||||
|
||||
**执行流程**:
|
||||
```
|
||||
```plaintext
|
||||
Phase 1: 会话初始化
|
||||
↓ cycleId, state, progressDir
|
||||
|
||||
@@ -190,13 +190,13 @@ Phase 4: 完成和摘要
|
||||
**一句话定位**: 协作分析 — 文档化讨论、内联探索、理解演进的交互式分析
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/analyze-with-file TOPIC="<question>"
|
||||
/analyze-with-file TOPIC="--depth=deep"
|
||||
```
|
||||
|
||||
**核心工作流**:
|
||||
```
|
||||
```plaintext
|
||||
Topic → Explore → Discuss → Document → Refine → Conclude → (Optional) Quick Execute
|
||||
```
|
||||
|
||||
@@ -222,7 +222,7 @@ Topic → Explore → Discuss → Document → Refine → Conclude → (Optional
|
||||
**一句话定位**: 多视角头脑风暴 — 4 视角(Product、Technical、Risk、User)并行分析
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/brainstorm-with-file TOPIC="<idea>"
|
||||
```
|
||||
|
||||
@@ -246,12 +246,12 @@ Topic → Explore → Discuss → Document → Refine → Conclude → (Optional
|
||||
**一句话定位**: 假设驱动调试 — 文档化探索、理解演进、分析辅助修正
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/debug-with-file BUG="<bug description>"
|
||||
```
|
||||
|
||||
**核心工作流**:
|
||||
```
|
||||
```plaintext
|
||||
Explore → Document → Log → Analyze → Correct Understanding → Fix → Verify
|
||||
```
|
||||
|
||||
@@ -262,7 +262,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
- **学习保留**: 保留从失败尝试中学到的内容
|
||||
|
||||
**会话文件夹结构**:
|
||||
```
|
||||
```plaintext
|
||||
{projectRoot}/.workflow/.debug/DBG-{slug}-{date}/
|
||||
├── debug.log # NDJSON 日志(执行证据)
|
||||
├── understanding.md # 探索时间线 + 整合理解
|
||||
@@ -283,7 +283,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 协作规划 — 多代理协作规划(替代 team-planex)
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/collaborative-plan-with-file <task>
|
||||
```
|
||||
|
||||
@@ -299,7 +299,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 通用执行引擎 — 替代 workflow-execute
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/unified-execute-with-file <session>
|
||||
```
|
||||
|
||||
@@ -315,7 +315,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 需求路线图规划
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/roadmap-with-file <requirements>
|
||||
```
|
||||
|
||||
@@ -331,7 +331,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 审查循环(Codex 版本)
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/review-cycle <target>
|
||||
```
|
||||
|
||||
@@ -347,7 +347,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 测试修复工作流
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/workflow-test-fix-cycle <failing-tests>
|
||||
```
|
||||
|
||||
@@ -364,7 +364,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: 智能代码清理
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/clean <target>
|
||||
```
|
||||
|
||||
@@ -380,7 +380,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: CSV 波处理管道
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/csv-wave-pipeline <csv-file>
|
||||
```
|
||||
|
||||
@@ -396,7 +396,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: Memory 压缩(Codex 版本)
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/memory-compact
|
||||
```
|
||||
|
||||
@@ -412,7 +412,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: CLI 工具执行规范
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/ccw-cli-tools <command>
|
||||
```
|
||||
|
||||
@@ -428,7 +428,7 @@ Explore → Document → Log → Analyze → Correct Understanding → Fix → V
|
||||
**一句话定位**: Issue 发现
|
||||
|
||||
**触发**:
|
||||
```
|
||||
```shell
|
||||
/issue-discover <context>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user