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:
catlog22
2026-02-28 19:53:24 +08:00
parent b0bfdb907a
commit 4a89f626fc
51 changed files with 741 additions and 619 deletions

View File

@@ -26,7 +26,7 @@
**功能**: 根据工作空间技术检测生成 `.gemini/``.qwen/` 配置目录,包含 settings.json 和 ignore 文件。
**语法**:
```
```bash
/cli:cli-init [--tool gemini|qwen|all] [--output path] [--preview]
```
@@ -75,7 +75,7 @@
**功能**: 使用 Codex CLI 通过 ccw 端点进行交互式代码审查,支持可配置的审查目标、模型和自定义指令。
**语法**:
```
```bash
/cli:codex-review [--uncommitted|--base <branch>|--commit <sha>] [--model <model>] [--title <title>] [prompt]
```

View File

@@ -18,7 +18,7 @@
**功能**: 主工作流编排器 - 意图分析→工作流选择→命令链执行
**语法**:
```
```bash
/ccw "任务描述"
```
@@ -80,7 +80,7 @@ graph TD
**功能**: 命令编排工具 - 分析任务、推荐命令链、顺序执行、状态持久化
**语法**:
```
```bash
/ccw-coordinator "任务描述"
```

View File

@@ -111,6 +111,110 @@
/ccw "实现用户认证" --yes
```
## 使用示例
### 快速分析
```bash
# 分析代码库结构
/ccw "分析认证模块的架构"
# 快速 Bug 诊断
/ccw "诊断登录超时问题发生的原因"
```
### 规划与实施
```bash
# 创建实施计划
/workflow:plan "添加 OAuth2 认证,支持 Google 和 GitHub 提供商"
# 使用自动模式执行
/workflow:execute --yes
```
### 代码审查
```bash
# 审查当前变更
/cli:codex-review
# 专注于特定区域
/cli:codex-review "重点关注认证模块中的安全漏洞"
```
### 会话管理
```bash
# 列出所有会话
/workflow:session:list
# 恢复暂停的会话
/workflow:session:resume "WFS-001"
# 标记会话为完成
/workflow:session:complete "WFS-001"
```
### Issue 工作流
```bash
# 从代码库中发现 Issue
/issue:discover
# 为特定 Issue 创建计划
/issue:plan "ISSUE-001"
# 执行修复
/issue:execute --commit
```
### Memory 管理
```bash
# 捕获当前会话的学习内容
/memory:capture "认证重构的关键见解"
# 列出所有记忆
/memory:list
# 搜索记忆
/memory:search "认证模式"
```
### CLI 工具调用
```bash
# 初始化 CLI 配置
/cli:cli-init
# 运行 Gemini 分析
ccw cli -p "分析 src/auth 中的代码模式" --tool gemini --mode analysis
# 使用特定规则模板运行
ccw cli -p "审查代码质量" --tool gemini --mode analysis --rule analysis-review-code-quality
```
### UI 设计工作流
```bash
# 从参考图片提取样式
/workflow:ui-design:style-extract --input "path/to/reference.png"
# 生成原型
/workflow:ui-design:generate --layout "dashboard" --tokens "design-tokens.json"
```
## 使用技巧
1. **谨慎使用自动模式**:仅在常规任务时使用 `--yes``-y`。对于复杂决策保持手动确认。
2. **会话持久化**:始终使用 `/workflow:session:complete` 完成会话以保留学习内容。
3. **记忆捕获**:定期使用 `/memory:capture` 捕获重要见解以构建项目知识。
4. **CLI 工具选择**:让 `/ccw` 自动选择合适的工具,或使用 `--tool gemini|qwen|codex` 显式指定。
## 相关文档
- [Skills 参考](../skills/)

View File

@@ -32,7 +32,7 @@
**功能**: 从 GitHub URL 或文本描述创建结构化 Issue支持需求清晰度检测。
**语法**:
```
```bash
/issue:new [-y|--yes] <github-url | 文本描述> [--priority 1-5]
```
@@ -92,7 +92,7 @@ interface Issue {
**功能**: 从多个角度Bug、UX、测试、质量、安全、性能、可维护性、最佳实践发现潜在 Issue。
**语法**:
```
```bash
/issue:discover [-y|--yes] <路径模式> [--perspectives=bug,ux,...] [--external]
```
@@ -125,7 +125,7 @@ interface Issue {
**功能**: 通过用户提示发现 Issue使用 Gemini 规划的迭代多代理探索,支持跨模块比较。
**语法**:
```
```bash
/issue:discover-by-prompt [-y|--yes] <提示> [--scope=src/**] [--depth=standard|deep] [--max-iterations=5]
```
@@ -151,7 +151,7 @@ interface Issue {
**功能**: 批量规划 Issue 解决方案,使用 issue-plan-agent探索+规划闭环)。
**语法**:
```
```bash
/issue:plan [-y|--yes] --all-pending <issue-id>[,<issue-id>,...] [--batch-size 3]
```
@@ -176,7 +176,7 @@ interface Issue {
**功能**: 从绑定解决方案形成执行队列,使用 issue-queue-agent解决方案级别
**语法**:
```
```bash
/issue:queue [-y|--yes] [--queues <n>] [--issue <id>]
```
@@ -201,7 +201,7 @@ interface Issue {
**功能**: 执行队列,使用 DAG 并行编排(每个解决方案一次提交)。
**语法**:
```
```bash
/issue:execute [-y|--yes] --queue <queue-id> [--worktree [<existing-path>]]
```
@@ -223,7 +223,7 @@ interface Issue {
**功能**: 转换规划工件lite-plan、工作流会话、markdown为 Issue 解决方案。
**语法**:
```
```bash
/issue:convert-to-plan [-y|--yes] [--issue <id>] [--supplement] <来源>
```
@@ -253,7 +253,7 @@ interface Issue {
**功能**: 从头脑风暴会话想法转换为 Issue 并生成可执行解决方案。
**语法**:
```
```bash
/issue:from-brainstorm SESSION="会话-id" [--idea=<索引>] [--auto] [-y|--yes]
```

View File

@@ -33,7 +33,7 @@
**功能**: 压缩当前会话记忆为结构化文本,提取目标、计划、文件、决策、约束、状态,并通过 MCP core_memory 工具保存。
**语法**:
```
```bash
/memory:compact [可选: 会话描述]
```
@@ -59,7 +59,7 @@
**功能**: 快速笔记记录命令,捕获想法、片段、提醒和洞察供后续参考。
**语法**:
```
```bash
/memory:tips <笔记内容> [--tag <标签1,标签2>] [--context <上下文>]
```
@@ -84,7 +84,7 @@
**功能**: 委托给 universal-executor 代理,通过 Gemini/Qwen CLI 分析项目并返回 JSON 核心内容包用于任务上下文。
**语法**:
```
```bash
/memory:load [--tool gemini|qwen] "任务上下文描述"
```
@@ -107,7 +107,7 @@
**功能**: 更新所有 CLAUDE.md 文件使用基于层的执行Layer 3→1批量代理处理4 模块/代理)和 gemini→qwen→codex 回退。
**语法**:
```
```bash
/memory:update-full [--tool gemini|qwen|codex] [--path <目录>]
```
@@ -137,7 +137,7 @@
**功能**: 更新 git 变更模块的 CLAUDE.md 文件使用批量代理执行4 模块/代理)和 gemini→qwen→codex 回退。
**语法**:
```
```bash
/memory:update-related [--tool gemini|qwen|codex]
```
@@ -158,7 +158,7 @@
**功能**: 使用 CLI 执行生成完整项目文档Layer 3→1批量代理处理4 模块/代理)和 gemini→qwen→codex 回退,<20 模块使用直接并行。
**语法**:
```
```bash
/memory:docs-full-cli [路径] [--tool <gemini|qwen|codex>]
```
@@ -179,7 +179,7 @@
**功能**: 使用 CLI 执行生成 git 变更模块文档批量代理处理4 模块/代理)和 gemini→qwen→codex 回退,<15 模块使用直接执行。
**语法**:
```
```bash
/memory:docs-related-cli [--tool <gemini|qwen|codex>]
```
@@ -197,7 +197,7 @@
**功能**: 从样式参考生成 SKILL 记忆包,便于加载和一致的设计系统使用。
**语法**:
```
```bash
/memory:style-skill-memory [包名] [--regenerate]
```

View File

@@ -30,7 +30,7 @@
**功能**: 发现现有会话或启动新工作流会话,支持智能会话管理和冲突检测。
**语法**:
```
```bash
/workflow:session:start [--type <workflow|review|tdd|test|docs>] [--auto|--new] [可选: 任务描述]
```
@@ -99,7 +99,7 @@ graph TD
**功能**: 列出所有工作流会话,支持状态过滤,显示会话元数据和进度信息。
**语法**:
```
```bash
/workflow:session:list
```
@@ -122,7 +122,7 @@ graph TD
**功能**: 恢复最近暂停的工作流会话,支持自动会话发现和状态更新。
**语法**:
```
```bash
/workflow:session:resume
```
@@ -149,7 +149,7 @@ graph TD
**功能**: 标记活动工作流会话为完成,归档并学习经验,更新清单并移除活动标志。
**语法**:
```
```bash
/workflow:session:complete [-y|--yes] [--detailed]
```
@@ -189,7 +189,7 @@ graph TD
**功能**: 将会话学习和用户定义的约束结晶为永久项目指南。
**语法**:
```
```bash
/workflow:session:solidify [-y|--yes] [--type <convention|constraint|learning>] [--category <类别>] "规则或洞察"
```

View File

@@ -47,7 +47,7 @@
**功能**: 交互式探索性 UI 设计工作流,以样式为中心的批量生成,从提示/图片创建设计变体,支持并行执行和用户选择。
**语法**:
```
```bash
/workflow:ui-design:explore-auto [--input "<值>"] [--targets "<列表>"] [--target-type "page|component"] [--session <id>] [--style-variants <数量>] [--layout-variants <数量>]
```
@@ -76,7 +76,7 @@
**功能**: UI 设计工作流,支持直接代码/图片输入进行设计令牌提取和原型生成。
**语法**:
```
```bash
/workflow:ui-design:imitate-auto [--input "<值>"] [--session <id>]
```
@@ -98,7 +98,7 @@
**功能**: 从参考图片或文本提示使用 Claude 分析提取设计样式,支持变体生成或精化模式。
**语法**:
```
```bash
/workflow:ui-design:style-extract [-y|--yes] [--design-id <id>] [--session <id>] [--images "<glob>"] [--prompt "<描述>"] [--variants <数量>] [--interactive] [--refine]
```
@@ -126,7 +126,7 @@
**功能**: 从参考图片或文本提示使用 Claude 分析提取结构布局信息,支持变体生成或精化模式。
**语法**:
```
```bash
/workflow:ui-design:layout-extract [-y|--yes] [--design-id <id>] [--session <id>] [--images "<glob>"] [--prompt "<描述>"] [--targets "<列表>"] [--variants <数量>] [--device-type <desktop|mobile|tablet|responsive>] [--interactive] [--refine]
```
@@ -151,7 +151,7 @@
**功能**: 从提示推断和图片引用提取动画和过渡模式,用于设计系统文档。
**语法**:
```
```bash
/workflow:ui-design:animation-extract [-y|--yes] [--design-id <id>] [--session <id>] [--images "<glob>"] [--focus "<类型>"] [--interactive] [--refine]
```
@@ -172,7 +172,7 @@
**功能**: 从代码文件CSS/JS/HTML/SCSS导入设计系统使用自动文件发现和并行代理分析。
**语法**:
```
```bash
/workflow:ui-design:import-from-code [--design-id <id>] [--session <id>] [--source <path>]
```
@@ -193,7 +193,7 @@
**功能**: 编排器从代码提取样式并生成可共享引用包,支持预览(自动文件发现)。
**语法**:
```
```bash
/workflow:ui-design:codify-style <path> [--package-name <name>] [--output-dir <path>] [--overwrite]
```
@@ -216,7 +216,7 @@
**功能**: 从设计运行提取生成多组件参考页面和文档。
**语法**:
```
```bash
/workflow:ui-design:reference-page-generator [--design-run <path>] [--package-name <name>] [--output-dir <path>]
```
@@ -234,7 +234,7 @@
**功能**: 组装 UI 原型,将布局模板与设计令牌(默认动画支持)组合,纯组装器无新内容生成。
**语法**:
```
```bash
/workflow:ui-design:generate [--design-id <id>] [--session <id>]
```
@@ -252,7 +252,7 @@
**功能**: 同步最终设计系统引用到头脑风暴工件,准备供 `/workflow:plan` 消费。
**语法**:
```
```bash
/workflow:ui-design:design-sync --session <session_id> [--selected-prototypes "<列表>"]
```

View File

@@ -72,7 +72,7 @@
**功能**: 超轻量级多工具分析和直接执行。简单任务无工件,复杂任务自动在 `.workflow/.scratchpad/` 创建规划文档。
**语法**:
```
```bash
/workflow:lite-lite-lite [-y|--yes] <任务描述>
```
@@ -95,7 +95,7 @@
**功能**: 轻量级交互式规划工作流,支持内存规划、代码探索和执行到 lite-execute。
**语法**:
```
```bash
/workflow:lite-plan [-y|--yes] [-e|--explore] "任务描述" | file.md
```
@@ -116,7 +116,7 @@
**功能**: 基于内存计划、提示描述或文件内容执行任务。
**语法**:
```
```bash
/workflow:lite-execute [-y|--yes] [--in-memory] ["任务描述" | file-path]
```
@@ -137,7 +137,7 @@
**功能**: 轻量级 Bug 诊断和修复工作流,支持智能严重程度评估和可选的热修复模式。
**语法**:
```
```bash
/workflow:lite-fix [-y|--yes] [--hotfix] "Bug 描述或 Issue 引用"
```
@@ -158,7 +158,7 @@
**功能**: 5 阶段规划工作流,输出 IMPL_PLAN.md 和任务 JSON。
**语法**:
```
```bash
/workflow:plan [-y|--yes] "文本描述" | file.md
```
@@ -183,7 +183,7 @@
**功能**: 协调代理执行工作流任务,支持自动会话发现、并行任务处理和状态跟踪。
**语法**:
```
```bash
/workflow:execute [-y|--yes] [--resume-session="session-id"]
```
@@ -201,7 +201,7 @@
**功能**: 交互式工作流重新规划,支持会话级工件更新和边界澄清。
**语法**:
```
```bash
/workflow:replan [-y|--yes] [--session session-id] [task-id] "需求" | file.md [--interactive]
```
@@ -219,7 +219,7 @@
**功能**: 多 CLI 协作规划工作流,使用 ACE 上下文收集和迭代交叉验证。
**语法**:
```
```bash
/workflow:multi-cli-plan [-y|--yes] <任务描述> [--max-rounds=3] [--tools=gemini,codex] [--mode=parallel|serial]
```
@@ -242,7 +242,7 @@
**功能**: 交互式头脑风暴,多 CLI 协作、想法扩展和文档化思维演化。
**语法**:
```
```bash
/workflow:brainstorm-with-file [-y|--yes] [-c|--continue] [-m|--mode creative|structured] "想法或主题"
```
@@ -264,7 +264,7 @@
**功能**: 交互式协作分析有文档化的讨论、CLI 辅助探索和演化理解。
**语法**:
```
```bash
/workflow:analyze-with-file [-y|--yes] [-c|--continue] "主题或问题"
```
@@ -282,7 +282,7 @@
**功能**: 交互式假设驱动调试,有文档化的探索、理解演化和 Gemini 辅助修正。
**语法**:
```
```bash
/workflow:debug-with-file [-y|--yes] "Bug 描述或错误信息"
```
@@ -300,7 +300,7 @@
**功能**: 通用执行引擎,消费任何规划/头脑风暴/分析输出,支持最小进度跟踪、多代理协调和增量执行。
**语法**:
```
```bash
/workflow:unified-execute-with-file [-y|--yes] [-p|--plan <path>] [-m|--mode sequential|parallel] ["执行上下文"]
```

View File

@@ -38,7 +38,7 @@
**功能**: 委托给 universal-executor 代理,通过 Gemini/Qwen CLI 分析项目并返回 JSON 核心内容包用于任务上下文。
**语法**:
```
```bash
/memory:prepare [--tool gemini|qwen] "任务上下文描述"
```

View File

@@ -19,7 +19,7 @@
**功能**: 使用 Codex CLI 通过 ccw 端点进行交互式代码审查,支持可配置的审查目标、模型和自定义指令。
**语法**:
```
```bash
/cli:codex-review [--uncommitted|--base <分支>|--commit <sha>] [--model <模型>] [--title <标题>] [提示]
```