feat: Enhance CCW help system with new command orchestration and dashboard features

This commit is contained in:
catlog22
2026-01-29 15:43:07 +08:00
parent 9762445876
commit 86d5be8288
3 changed files with 497 additions and 11 deletions

View File

@@ -11,8 +11,8 @@ CCW 命令帮助系统,提供命令搜索、推荐、文档查看功能。
## Trigger Conditions
- 关键词: "ccw-help", "ccw-issue", "帮助", "命令", "怎么用"
- 场景: 询问命令用法、搜索命令、请求下一步建议
- 关键词: "ccw-help", "ccw-issue", "帮助", "命令", "怎么用", "ccw 怎么用", "工作流"
- 场景: 询问命令用法、搜索命令、请求下一步建议、询问任务应该用哪个工作流
## Operation Modes
@@ -50,7 +50,35 @@ CCW 命令帮助系统,提供命令搜索、推荐、文档查看功能。
1. Query `essential_commands` array
2. Guide appropriate workflow entry point
### Mode 5: Issue Reporting
### Mode 5: CCW Command Orchestration
**Triggers**: "ccw ", "自动工作流", "自动选择工作流", "帮我规划"
**Process**:
1. Analyze user intent (task type, complexity, clarity)
2. Auto-select workflow level (1-4 or Issue)
3. Build command chain based on workflow
4. Get user confirmation
5. Execute chain with TODO tracking
**Supported Workflows**:
- **Level 1** (Lite-Lite-Lite): Ultra-simple quick tasks
- **Level 2** (Rapid/Hotfix): Bug fixes, simple features, documentation
- **Level 2.5** (Rapid-to-Issue): Bridge from quick planning to issue workflow
- **Level 3** (Coupled): Complex features with planning, execution, review, tests
- **Level 3 Variants**:
- TDD workflows (test-first development)
- Test-fix workflows (debug failing tests)
- Review workflows (code review and fixes)
- UI design workflows
- **Level 4** (Full): Exploratory tasks with brainstorming
- **With-File Workflows**: Documented exploration with multi-CLI collaboration
- `brainstorm-with-file`: Multi-perspective ideation
- `debug-with-file`: Hypothesis-driven debugging
- `analyze-with-file`: Collaborative analysis
- **Issue Workflow**: Batch issue discovery, planning, queueing, execution
### Mode 6: Issue Reporting
**Triggers**: "ccw-issue", "报告 bug"
@@ -84,10 +112,22 @@ Single source of truth: **[command.json](command.json)**
## Slash Commands
```bash
/ccw-help # 通用帮助入口
/ccw-help search <keyword> # 搜索命令
/ccw-help next <command> # 获取下一步建议
/ccw-issue # 问题报告
/ccw "task description" # Auto-select workflow and execute
/ccw-help # General help entry
/ccw-help search <keyword> # Search commands
/ccw-help next <command> # Get next step suggestions
/ccw-issue # Issue reporting
```
### CCW Command Examples
```bash
/ccw "Add user authentication" # → auto-select level 2-3
/ccw "Fix memory leak in WebSocket" # → auto-select bugfix workflow
/ccw "Implement with TDD" # → detect TDD, use tdd-plan → execute → tdd-verify
/ccw "头脑风暴: 用户通知系统" # → detect brainstorm, use brainstorm-with-file
/ccw "深度调试: 系统随机崩溃" # → detect debug-file, use debug-with-file
/ccw "协作分析: 认证架构设计" # → detect analyze-file, use analyze-with-file
```
## Maintenance
@@ -103,9 +143,10 @@ python scripts/analyze_commands.py
## Statistics
- **Commands**: 88+
- **Commands**: 50+
- **Agents**: 16
- **Essential**: 10 核心命令
- **Workflows**: 6 main levels + 3 with-file variants
- **Essential**: 10 core commands
## Core Principle

View File

@@ -1,12 +1,13 @@
{
"_metadata": {
"version": "2.0.0",
"total_commands": 45,
"version": "2.1.0",
"total_commands": 51,
"total_agents": 16,
"description": "Unified CCW-Help command index"
},
"essential_commands": [
"/ccw",
"/workflow:lite-plan",
"/workflow:lite-fix",
"/workflow:plan",
@@ -20,6 +21,19 @@
],
"commands": [
{
"name": "ccw",
"command": "/ccw",
"description": "Main workflow orchestrator - analyze intent, auto-select workflow, execute command chain",
"arguments": "\"task description\"",
"category": "general",
"difficulty": "Beginner",
"essential": true,
"flow": {
"next_steps": ["/workflow:lite-plan", "/workflow:lite-fix", "/workflow:plan"]
},
"source": "../../../commands/ccw.md"
},
{
"name": "lite-plan",
"command": "/workflow:lite-plan",
@@ -213,6 +227,45 @@
"difficulty": "Advanced",
"source": "../../../commands/workflow/brainstorm/synthesis.md"
},
{
"name": "brainstorm-with-file",
"command": "/workflow:brainstorm-with-file",
"description": "Multi-perspective ideation with documented exploration and multi-CLI collaboration",
"arguments": "\"topic\" [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"difficulty": "Advanced",
"flow": {
"next_steps": ["/workflow:plan", "/issue:new"]
},
"source": "../../../commands/workflow/brainstorm-with-file.md"
},
{
"name": "debug-with-file",
"command": "/workflow:debug-with-file",
"description": "Hypothesis-driven debugging with documented understanding evolution",
"arguments": "\"bug description\" [--hotfix]",
"category": "workflow",
"subcategory": "debug",
"difficulty": "Advanced",
"flow": {
"next_steps": ["/workflow:execute"]
},
"source": "../../../commands/workflow/debug-with-file.md"
},
{
"name": "analyze-with-file",
"command": "/workflow:analyze-with-file",
"description": "Collaborative analysis with multi-round Q&A and CLI exploration",
"arguments": "\"topic\" [--depth N]",
"category": "workflow",
"subcategory": "analyze",
"difficulty": "Advanced",
"flow": {
"next_steps": ["/workflow:plan"]
},
"source": "../../../commands/workflow/analyze-with-file.md"
},
{
"name": "tdd-plan",
"command": "/workflow:tdd-plan",
@@ -364,6 +417,19 @@
},
"source": "../../../commands/issue/execute.md"
},
{
"name": "issue:from-brainstorm",
"command": "/issue:from-brainstorm",
"description": "Convert brainstorm session ideas into executable issue with solutions",
"arguments": "SESSION=\"<session-id>\" [--auto]",
"category": "issue",
"difficulty": "Intermediate",
"flow": {
"prerequisites": ["/workflow:brainstorm-with-file"],
"next_steps": ["/issue:queue"]
},
"source": "../../../commands/issue/from-brainstorm.md"
},
{
"name": "docs",
"command": "/memory:docs",
@@ -486,6 +552,18 @@
"difficulty": "Intermediate",
"source": "../../../commands/enhance-prompt.md"
},
{
"name": "view",
"command": "ccw view",
"description": "Open CCW workflow dashboard for managing tasks and sessions",
"arguments": "[--path <path>] [--port <port>] [--host <host>] [--no-browser]",
"category": "general",
"difficulty": "Beginner",
"flow": {
"next_steps": ["/workflow:session:list"]
},
"source": "../../../commands/view.md"
},
{
"name": "cli-init",
"command": "/cli:cli-init",