From b203ada9c536ca3e228dd323297a4a9216322124 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 4 Mar 2026 14:11:15 +0800 Subject: [PATCH] fix: update command references and improve documentation for workflow commands --- ccw/frontend/src/lib/pipeline-utils.ts | 24 +++++++++++++++---- docs/COMMAND_SPEC.md | 2 +- docs/commands/claude/core-orchestration.md | 4 ++-- docs/commands/claude/index.md | 5 ++-- docs/commands/claude/workflow.md | 22 ----------------- docs/features/sessions.md | 2 +- docs/features/tasks-history.md | 5 ++-- docs/zh/commands/claude/core-orchestration.md | 6 ++--- docs/zh/commands/claude/index.md | 5 ++-- docs/zh/commands/claude/workflow.md | 22 ----------------- docs/zh/components/ui/badge.md | 6 ++--- docs/zh/components/ui/button.md | 6 ++--- docs/zh/components/ui/card.md | 6 ++--- docs/zh/components/ui/checkbox.md | 6 ++--- docs/zh/components/ui/input.md | 6 ++--- docs/zh/components/ui/select.md | 6 ++--- 16 files changed, 50 insertions(+), 83 deletions(-) diff --git a/ccw/frontend/src/lib/pipeline-utils.ts b/ccw/frontend/src/lib/pipeline-utils.ts index 2596d775..50e850e1 100644 --- a/ccw/frontend/src/lib/pipeline-utils.ts +++ b/ccw/frontend/src/lib/pipeline-utils.ts @@ -38,11 +38,12 @@ export function deriveStageStatus( } /** - * Three-tier pipeline stage detection. + * Four-tier pipeline stage detection. * * Tier 1 - explicit `pipeline_stages` from meta - * Tier 2 - inferred from message senders (excluding "coordinator") - * Tier 3 - legacy 4-stage fallback + * Tier 2 - explicit `roles` list from meta (excluding coordinator) + * Tier 3 - inferred from message senders (excluding "coordinator") + * Tier 4 - legacy 4-stage fallback */ export function derivePipelineStages( meta: { @@ -67,7 +68,20 @@ export function derivePipelineStages( }); } - // Tier 2: extract from message senders + // Tier 2: explicit roles list from meta (authoritative source from coordinator) + if (meta.roles && meta.roles.length > 0) { + const workerRoles = meta.roles.filter((r) => r.toLowerCase() !== 'coordinator'); + if (workerRoles.length > 0) { + return workerRoles.map((role) => ({ + id: role.toUpperCase(), + label: formatStageLabel(role), + role, + status: deriveStageStatus(role, messages), + })); + } + } + + // Tier 3: extract from message senders if (messages.length > 0) { const seen = new Map(); // lowercase sender -> original sender for (const msg of messages) { @@ -89,7 +103,7 @@ export function derivePipelineStages( } } - // Tier 3: legacy fallback + // Tier 4: legacy fallback return LEGACY_STAGES.map((stage) => ({ id: stage.toUpperCase(), label: formatStageLabel(stage), diff --git a/docs/COMMAND_SPEC.md b/docs/COMMAND_SPEC.md index 74b250d0..0a4a8963 100644 --- a/docs/COMMAND_SPEC.md +++ b/docs/COMMAND_SPEC.md @@ -202,7 +202,7 @@ CLI tool configuration commands. /cli:cli-init ``` -> **Note**: For analysis, planning, and bug fixing, use workflow commands (`/workflow-lite-planex`, `/workflow:lite-fix`) or semantic invocation through natural language. Claude will automatically use appropriate CLI tools (Gemini/Qwen/Codex) with templates as needed. +> **Note**: For analysis, planning, and bug fixing, use workflow commands (`/workflow-lite-planex`, `/workflow:debug-with-file`) or semantic invocation through natural language. Claude will automatically use appropriate CLI tools (Gemini/Qwen/Codex) with templates as needed. --- diff --git a/docs/commands/claude/core-orchestration.md b/docs/commands/claude/core-orchestration.md index bc133eaf..ffaf92b9 100644 --- a/docs/commands/claude/core-orchestration.md +++ b/docs/commands/claude/core-orchestration.md @@ -47,7 +47,7 @@ graph TD | Type | Trigger Keywords | Workflow | |------|------------------|----------| -| **Bug Fix** | urgent, production, critical + fix, bug | lite-fix | +| **Bug Fix** | urgent, production, critical + fix, bug | debug-with-file | | **Brainstorming** | brainstorm, ideation | brainstorm-with-file | | **Debug Document** | debug document, hypothesis | debug-with-file | | **Collaborative Analysis** | analyze document | analyze-with-file | @@ -163,4 +163,4 @@ Both commands support the `--yes` flag for auto mode: - [Workflow Commands](./workflow.md) - [Session Management](./session.md) -- [CLI Invocation System](../features/cli.md) +- [CLI Invocation System](../../features/cli.md) diff --git a/docs/commands/claude/index.md b/docs/commands/claude/index.md index b1eaa25c..ed5d94d9 100644 --- a/docs/commands/claude/index.md +++ b/docs/commands/claude/index.md @@ -31,7 +31,6 @@ | Command | Function | Difficulty | |---------|----------|------------| | [`/workflow-lite-planex`](./workflow.md#lite-plan) | Lightweight interactive planning workflow | Intermediate | -| [`/workflow:lite-fix`](./workflow.md#lite-fix) | Lightweight bug diagnosis and fix | Intermediate | | [`/workflow-plan`](./workflow.md#plan) | 5-phase planning workflow | Intermediate | | [`/workflow-execute`](./workflow.md#execute) | Coordinate agent execution of workflow tasks | Intermediate | | [`/workflow:replan`](./workflow.md#replan) | Interactive workflow replanning | Intermediate | @@ -229,5 +228,5 @@ ccw cli -p "Review code quality" --tool gemini --mode analysis --rule analysis-r ## Related Documentation - [Skills Reference](../skills/) -- [CLI Invocation System](../features/cli.md) -- [Workflow Guide](../guide/ch04-workflow-basics.md) +- [CLI Invocation System](../../features/cli.md) +- [Workflow Guide](../../guide/ch04-workflow-basics.md) diff --git a/docs/commands/claude/workflow.md b/docs/commands/claude/workflow.md index 12ea62bf..34467428 100644 --- a/docs/commands/claude/workflow.md +++ b/docs/commands/claude/workflow.md @@ -11,7 +11,6 @@ | Command | Function | Syntax | |---------|----------|--------| | [`lite-plan`](#lite-plan) | Lightweight interactive planning workflow | `/workflow-lite-planex [-y] [-e] "task"` | -| [`lite-fix`](#lite-fix) | Lightweight bug diagnosis and fix | `/workflow:lite-fix [-y] [--hotfix] "bug description"` | ### Standard Workflows @@ -86,27 +85,6 @@ /workflow-lite-planex -e "refactor authentication module" ``` -### lite-fix - -**Function**: Lightweight bug diagnosis and fix workflow, supporting intelligent severity assessment and optional hotfix mode. - -**Syntax**: -```bash -/workflow:lite-fix [-y|--yes] [--hotfix] "bug description or issue reference" -``` - -**Options**: -- `--hotfix`: Hotfix mode (quick fix for production incidents) - -**Examples**: -```bash -# Bug fix -/workflow:lite-fix "login returns 500 error" - -# Hotfix -/workflow:lite-fix --hotfix "payment gateway timeout" -``` - ### plan **Function**: 5-phase planning workflow, outputting IMPL_PLAN.md and task JSON. diff --git a/docs/features/sessions.md b/docs/features/sessions.md index 7527ea84..25b6639e 100644 --- a/docs/features/sessions.md +++ b/docs/features/sessions.md @@ -182,6 +182,6 @@ interface SessionsFilter { ## Related Links - [Dashboard](/features/dashboard) - Overview of all sessions with statistics -- [Lite Tasks](/features/tasks-history) - Lite-plan and lite-fix task management +- [Lite Tasks](/features/tasks-history) - Lite-plan and multi-cli-plan task management - [Terminal Dashboard](/features/terminal-dashboard) - Terminal-first session monitoring - [Orchestrator](/features/orchestrator) - Workflow template editor diff --git a/docs/features/tasks-history.md b/docs/features/tasks-history.md index 496bac62..a980a00b 100644 --- a/docs/features/tasks-history.md +++ b/docs/features/tasks-history.md @@ -12,7 +12,7 @@ **Location**: `ccw/frontend/src/pages/LiteTasksPage.tsx` -**Purpose**: Lite-plan and lite-fix task list page with TaskDrawer for details. +**Purpose**: Lite-plan and multi-cli-plan task list page with TaskDrawer for details. **Access**: Navigation → Lite Tasks @@ -20,7 +20,7 @@ | Feature | Description | |---------|-------------| -| **Type Tabs** | Switch between lite-plan, lite-fix, multi-cli-plan types | +| **Type Tabs** | Switch between lite-plan, multi-cli-plan types | | **Task Cards** | Display task title, description, status, tags, progress | | **TaskDrawer** | Slide-over panel with full task context and synthesis | | **Round Synthesis** | Multi-perspective analysis results | @@ -34,7 +34,6 @@ | Type | Description | |------|-------------| | **lite-plan** | Quick planning tasks | -| **lite-fix** | Quick bug fix tasks | | **multi-cli-plan** | Multi-perspective planning with multiple tools | ### Task Status Flow diff --git a/docs/zh/commands/claude/core-orchestration.md b/docs/zh/commands/claude/core-orchestration.md index 3875a84d..ee30c51e 100644 --- a/docs/zh/commands/claude/core-orchestration.md +++ b/docs/zh/commands/claude/core-orchestration.md @@ -82,7 +82,7 @@ graph TD | 优先级 | 类型 | 触发关键词 | 工作流 | |--------|------|-----------|--------| -| 1 | Bug 修复 (紧急) | urgent, production, critical + fix, bug | lite-fix (--hotfix) | +| 1 | Bug 修复 (紧急) | urgent, production, critical + fix, bug | debug-with-file | | 2 | 头脑风暴 | brainstorm, ideation, 头脑风暴, 创意, 发散思维 | brainstorm-with-file | | 3 | 头脑风暴→Issue | brainstorm.*issue, 头脑风暴.*issue | issue:from-brainstorm | | 4 | 调试文档 | debug.*document, hypothesis, 假设验证, 深度调试 | debug-with-file | @@ -94,7 +94,7 @@ graph TD | 10 | 重构 | refactor, 重构, tech.*debt, 技术债务 | refactor-cycle | | 11 | 团队工作流 | team.*plan.*exec, 团队规划执行, wave pipeline | team-planex | | 12 | 多CLI协作 | multi.*cli, 多CLI, 多模型协作 | multi-cli-plan | -| 13 | Bug 修复 | fix, bug, error, crash, fail, debug | lite-fix | +| 13 | Bug 修复 | fix, bug, error, crash, fail, debug | debug-with-file | | 14 | Issue 批量 | issues?.*batch, 批量issue | issue:discover → execute | | 15 | Issue 转换 | issue workflow, structured workflow | lite-plan → convert-to-plan | | 16 | 探索 | uncertain, explore, 研究, what if | brainstorm → plan | @@ -411,4 +411,4 @@ Task: - [工作流命令](./workflow.md) - [会话管理](./session.md) -- [CLI 调用系统](../features/cli.md) +- [CLI 调用系统](../../features/cli.md) diff --git a/docs/zh/commands/claude/index.md b/docs/zh/commands/claude/index.md index 87d98c78..b1f66357 100644 --- a/docs/zh/commands/claude/index.md +++ b/docs/zh/commands/claude/index.md @@ -31,7 +31,6 @@ | 命令 | 功能 | 难度 | | --- | --- | --- | | [`/workflow-lite-planex`](./workflow.md#lite-plan) | 轻量级交互式规划工作流 | Intermediate | -| [`/workflow:lite-fix`](./workflow.md#lite-fix) | 轻量级 Bug 诊断和修复 | Intermediate | | [`/workflow-plan`](./workflow.md#plan) | 5 阶段规划工作流 | Intermediate | | [`/workflow-execute`](./workflow.md#execute) | 协调代理执行工作流任务 | Intermediate | | [`/workflow:replan`](./workflow.md#replan) | 交互式工作流重新规划 | Intermediate | @@ -227,5 +226,5 @@ ccw cli -p "审查代码质量" --tool gemini --mode analysis --rule analysis-re ## 相关文档 - [Skills 参考](../skills/) -- [CLI 调用系统](../features/cli.md) -- [工作流指南](../guide/ch04-workflow-basics.md) +- [CLI 调用系统](../../features/cli.md) +- [工作流指南](../../guide/ch04-workflow-basics.md) diff --git a/docs/zh/commands/claude/workflow.md b/docs/zh/commands/claude/workflow.md index 515a093b..8620c27d 100644 --- a/docs/zh/commands/claude/workflow.md +++ b/docs/zh/commands/claude/workflow.md @@ -11,7 +11,6 @@ | 命令 | 功能 | 语法 | | --- | --- | --- | | [`lite-plan`](#lite-plan) | 轻量级交互式规划工作流 | `/workflow-lite-planex [-y] [-e] "任务"` | -| [`lite-fix`](#lite-fix) | 轻量级 Bug 诊断和修复 | `/workflow:lite-fix [-y] [--hotfix] "Bug 描述"` | ### 标准工作流 @@ -86,27 +85,6 @@ /workflow-lite-planex -e "重构认证模块" ``` -### lite-fix - -**功能**: 轻量级 Bug 诊断和修复工作流,支持智能严重程度评估和可选的热修复模式。 - -**语法**: -```bash -/workflow:lite-fix [-y|--yes] [--hotfix] "Bug 描述或 Issue 引用" -``` - -**选项**: -- `--hotfix`: 热修复模式(生产事故快速修复) - -**示例**: -```bash -# Bug 修复 -/workflow:lite-fix "登录时出现 500 错误" - -# 热修复 -/workflow:lite-fix --hotfix "支付网关超时" -``` - ### plan **功能**: 5 阶段规划工作流,输出 IMPL_PLAN.md 和任务 JSON。 diff --git a/docs/zh/components/ui/badge.md b/docs/zh/components/ui/badge.md index cfa7d112..da2b974d 100644 --- a/docs/zh/components/ui/badge.md +++ b/docs/zh/components/ui/badge.md @@ -114,6 +114,6 @@ Badge 徽章组件用于以紧凑形式显示状态、类别或标签。它通 ## 相关组件 -- [Card 卡片](/zh-CN/components/ui/card) -- [Button 按钮](/zh-CN/components/ui/button) -- [Avatar 头像](/zh-CN/components/ui/avatar) +- [Card 卡片](/zh/components/ui/card) +- [Button 按钮](/zh/components/ui/button) +- [Avatar 头像](/zh/components/ui/avatar) diff --git a/docs/zh/components/ui/button.md b/docs/zh/components/ui/button.md index 425f8629..7369f7e8 100644 --- a/docs/zh/components/ui/button.md +++ b/docs/zh/components/ui/button.md @@ -75,6 +75,6 @@ sidebar: auto ## 相关组件 -- [Input 输入框](/zh-CN/components/ui/input) -- [Select 选择器](/zh-CN/components/ui/select) -- [Dialog 对话框](/zh-CN/components/ui/dialog) +- [Input 输入框](/zh/components/ui/input) +- [Select 选择器](/zh/components/ui/select) +- [Dialog 对话框](/zh/components/ui/dialog) diff --git a/docs/zh/components/ui/card.md b/docs/zh/components/ui/card.md index 3ed54623..1301c345 100644 --- a/docs/zh/components/ui/card.md +++ b/docs/zh/components/ui/card.md @@ -102,6 +102,6 @@ sidebar: auto ## 相关组件 -- [Button 按钮](/zh-CN/components/ui/button) -- [Badge 徽章](/zh-CN/components/ui/badge) -- [Separator 分隔线](/zh-CN/components/ui/separator) +- [Button 按钮](/zh/components/ui/button) +- [Badge 徽章](/zh/components/ui/badge) +- [Separator 分隔线](/zh/components/ui/separator) diff --git a/docs/zh/components/ui/checkbox.md b/docs/zh/components/ui/checkbox.md index 90c9245d..c95b7cbd 100644 --- a/docs/zh/components/ui/checkbox.md +++ b/docs/zh/components/ui/checkbox.md @@ -115,6 +115,6 @@ const state = ref('indeterminate') ## 相关组件 -- [Input 输入框](/zh-CN/components/ui/input) -- [Select 选择器](/zh-CN/components/ui/select) -- [Radio Group 单选框组](/zh-CN/components/ui/radio-group) +- [Input 输入框](/zh/components/ui/input) +- [Select 选择器](/zh/components/ui/select) +- [Radio Group 单选框组](/zh/components/ui/radio-group) diff --git a/docs/zh/components/ui/input.md b/docs/zh/components/ui/input.md index 7617a1de..82098231 100644 --- a/docs/zh/components/ui/input.md +++ b/docs/zh/components/ui/input.md @@ -113,6 +113,6 @@ function Example() { ## 相关组件 -- [Button 按钮](/zh-CN/components/ui/button) -- [Select 选择器](/zh-CN/components/ui/select) -- [Checkbox 复选框](/zh-CN/components/ui/checkbox) +- [Button 按钮](/zh/components/ui/button) +- [Select 选择器](/zh/components/ui/select) +- [Checkbox 复选框](/zh/components/ui/checkbox) diff --git a/docs/zh/components/ui/select.md b/docs/zh/components/ui/select.md index d9503f24..cebc88f6 100644 --- a/docs/zh/components/ui/select.md +++ b/docs/zh/components/ui/select.md @@ -122,6 +122,6 @@ const selectedValue = ref('') ## 相关组件 -- [Input 输入框](/zh-CN/components/ui/input) -- [Checkbox 复选框](/zh-CN/components/ui/checkbox) -- [Button 按钮](/zh-CN/components/ui/button) +- [Input 输入框](/zh/components/ui/input) +- [Checkbox 复选框](/zh/components/ui/checkbox) +- [Button 按钮](/zh/components/ui/button)