claude-code-workflow 6.3.26 → 6.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/.claude/CLAUDE.md +7 -1
  2. package/.claude/agents/action-planning-agent.md +1 -0
  3. package/.claude/agents/cli-discuss-agent.md +391 -0
  4. package/.claude/agents/cli-execution-agent.md +2 -0
  5. package/.claude/agents/cli-explore-agent.md +2 -1
  6. package/.claude/agents/cli-lite-planning-agent.md +1 -0
  7. package/.claude/agents/cli-planning-agent.md +1 -0
  8. package/.claude/agents/code-developer.md +1 -0
  9. package/.claude/agents/conceptual-planning-agent.md +2 -0
  10. package/.claude/agents/context-search-agent.md +1 -0
  11. package/.claude/agents/debug-explore-agent.md +2 -0
  12. package/.claude/agents/doc-generator.md +1 -0
  13. package/.claude/agents/issue-plan-agent.md +2 -1
  14. package/.claude/agents/issue-queue-agent.md +2 -1
  15. package/.claude/agents/memory-bridge.md +2 -0
  16. package/.claude/agents/test-context-search-agent.md +2 -0
  17. package/.claude/agents/test-fix-agent.md +1 -0
  18. package/.claude/agents/ui-design-agent.md +2 -0
  19. package/.claude/agents/universal-executor.md +1 -0
  20. package/.claude/commands/issue/execute.md +141 -163
  21. package/.claude/commands/workflow/lite-lite-lite.md +798 -0
  22. package/.claude/commands/workflow/multi-cli-plan.md +510 -0
  23. package/.claude/skills/ccw/SKILL.md +262 -372
  24. package/.claude/skills/ccw/command.json +547 -0
  25. package/.claude/skills/ccw-help/SKILL.md +46 -107
  26. package/.claude/skills/ccw-help/command.json +511 -0
  27. package/.claude/skills/skill-tuning/SKILL.md +303 -0
  28. package/.claude/skills/skill-tuning/phases/actions/action-abort.md +164 -0
  29. package/.claude/skills/skill-tuning/phases/actions/action-analyze-requirements.md +406 -0
  30. package/.claude/skills/skill-tuning/phases/actions/action-apply-fix.md +206 -0
  31. package/.claude/skills/skill-tuning/phases/actions/action-complete.md +195 -0
  32. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md +317 -0
  33. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-context.md +243 -0
  34. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-dataflow.md +318 -0
  35. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-docs.md +299 -0
  36. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-memory.md +269 -0
  37. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-token-consumption.md +200 -0
  38. package/.claude/skills/skill-tuning/phases/actions/action-gemini-analysis.md +322 -0
  39. package/.claude/skills/skill-tuning/phases/actions/action-generate-report.md +228 -0
  40. package/.claude/skills/skill-tuning/phases/actions/action-init.md +149 -0
  41. package/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md +317 -0
  42. package/.claude/skills/skill-tuning/phases/actions/action-verify.md +222 -0
  43. package/.claude/skills/skill-tuning/phases/orchestrator.md +377 -0
  44. package/.claude/skills/skill-tuning/phases/state-schema.md +378 -0
  45. package/.claude/skills/skill-tuning/specs/category-mappings.json +284 -0
  46. package/.claude/skills/skill-tuning/specs/dimension-mapping.md +212 -0
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +318 -0
  48. package/.claude/skills/skill-tuning/specs/quality-gates.md +263 -0
  49. package/.claude/skills/skill-tuning/specs/skill-authoring-principles.md +189 -0
  50. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +1537 -0
  51. package/.claude/skills/skill-tuning/templates/diagnosis-report.md +153 -0
  52. package/.claude/skills/skill-tuning/templates/fix-proposal.md +204 -0
  53. package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +421 -0
  54. package/.claude/workflows/cli-tools-usage.md +0 -41
  55. package/ccw/dist/core/auth/csrf-middleware.d.ts.map +1 -1
  56. package/ccw/dist/core/auth/csrf-middleware.js +3 -1
  57. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  58. package/ccw/dist/core/data-aggregator.d.ts +2 -0
  59. package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
  60. package/ccw/dist/core/data-aggregator.js +5 -2
  61. package/ccw/dist/core/data-aggregator.js.map +1 -1
  62. package/ccw/dist/core/lite-scanner.d.ts +2 -1
  63. package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
  64. package/ccw/dist/core/lite-scanner.js +295 -6
  65. package/ccw/dist/core/lite-scanner.js.map +1 -1
  66. package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
  67. package/ccw/dist/core/routes/codexlens/config-handlers.js +5 -5
  68. package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
  69. package/ccw/dist/core/routes/session-routes.d.ts.map +1 -1
  70. package/ccw/dist/core/routes/session-routes.js +166 -48
  71. package/ccw/dist/core/routes/session-routes.js.map +1 -1
  72. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  73. package/ccw/dist/core/routes/system-routes.js +87 -0
  74. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  75. package/ccw/dist/core/server.js +2 -2
  76. package/ccw/dist/core/server.js.map +1 -1
  77. package/ccw/scripts/IMPLEMENTATION-SUMMARY.md +226 -0
  78. package/ccw/scripts/QUICK-REFERENCE.md +135 -0
  79. package/ccw/scripts/README-memory-embedder.md +157 -0
  80. package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
  81. package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
  82. package/ccw/scripts/memory-embedder-example.ts +184 -0
  83. package/ccw/scripts/memory_embedder.py +428 -0
  84. package/ccw/scripts/test_memory_embedder.py +245 -0
  85. package/ccw/src/core/auth/csrf-middleware.ts +3 -1
  86. package/ccw/src/core/data-aggregator.ts +7 -2
  87. package/ccw/src/core/lite-scanner.ts +440 -6
  88. package/ccw/src/core/routes/codexlens/config-handlers.ts +12 -9
  89. package/ccw/src/core/routes/session-routes.ts +201 -48
  90. package/ccw/src/core/routes/system-routes.ts +102 -0
  91. package/ccw/src/core/server.ts +2 -2
  92. package/ccw/src/templates/dashboard-css/01-base.css +8 -0
  93. package/ccw/src/templates/dashboard-css/02-session.css +81 -0
  94. package/ccw/src/templates/dashboard-css/04-lite-tasks.css +2442 -0
  95. package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +157 -0
  96. package/ccw/src/templates/dashboard-css/32-issue-manager.css +23 -0
  97. package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +38 -4
  98. package/ccw/src/templates/dashboard-js/components/hook-manager.js +38 -13
  99. package/ccw/src/templates/dashboard-js/components/navigation.js +24 -4
  100. package/ccw/src/templates/dashboard-js/i18n.js +194 -6
  101. package/ccw/src/templates/dashboard-js/views/api-settings.js +32 -0
  102. package/ccw/src/templates/dashboard-js/views/claude-manager.js +44 -3
  103. package/ccw/src/templates/dashboard-js/views/cli-manager.js +303 -31
  104. package/ccw/src/templates/dashboard-js/views/history.js +44 -6
  105. package/ccw/src/templates/dashboard-js/views/home.js +1 -0
  106. package/ccw/src/templates/dashboard-js/views/issue-manager.js +54 -7
  107. package/ccw/src/templates/dashboard-js/views/lite-tasks.js +1817 -4
  108. package/ccw/src/templates/dashboard.html +5 -0
  109. package/package.json +2 -1
  110. package/.claude/skills/ccw/index/command-capabilities.json +0 -127
  111. package/.claude/skills/ccw/index/intent-rules.json +0 -136
  112. package/.claude/skills/ccw/index/workflow-chains.json +0 -451
  113. package/.claude/skills/ccw/phases/actions/bugfix.md +0 -218
  114. package/.claude/skills/ccw/phases/actions/coupled.md +0 -194
  115. package/.claude/skills/ccw/phases/actions/docs.md +0 -93
  116. package/.claude/skills/ccw/phases/actions/full.md +0 -154
  117. package/.claude/skills/ccw/phases/actions/issue.md +0 -201
  118. package/.claude/skills/ccw/phases/actions/rapid.md +0 -104
  119. package/.claude/skills/ccw/phases/actions/review-fix.md +0 -84
  120. package/.claude/skills/ccw/phases/actions/tdd.md +0 -66
  121. package/.claude/skills/ccw/phases/actions/ui.md +0 -79
  122. package/.claude/skills/ccw/phases/orchestrator.md +0 -435
  123. package/.claude/skills/ccw/specs/intent-classification.md +0 -336
  124. package/.claude/skills/ccw-help/index/all-agents.json +0 -82
  125. package/.claude/skills/ccw-help/index/all-commands.json +0 -882
  126. package/.claude/skills/ccw-help/index/by-category.json +0 -914
  127. package/.claude/skills/ccw-help/index/by-use-case.json +0 -896
  128. package/.claude/skills/ccw-help/index/command-relationships.json +0 -160
  129. package/.claude/skills/ccw-help/index/essential-commands.json +0 -112
@@ -1,194 +0,0 @@
1
- # Action: Coupled Workflow
2
-
3
- 复杂耦合工作流:完整规划 + 验证 + 执行
4
-
5
- ## Pattern
6
-
7
- ```
8
- plan → action-plan-verify → execute
9
- ```
10
-
11
- ## Trigger Conditions
12
-
13
- - Complexity: High
14
- - Keywords: "refactor", "重构", "migrate", "迁移", "architect", "架构"
15
- - Cross-module changes
16
- - System-level modifications
17
-
18
- ## Execution Flow
19
-
20
- ```mermaid
21
- sequenceDiagram
22
- participant U as User
23
- participant O as CCW Orchestrator
24
- participant PL as plan
25
- participant VF as verify
26
- participant EX as execute
27
- participant RV as review
28
-
29
- U->>O: Complex task
30
- O->>O: Classify: coupled (high complexity)
31
-
32
- Note over PL: Phase 1: Comprehensive Planning
33
- O->>PL: /workflow:plan
34
- PL->>PL: Multi-phase planning
35
- PL->>PL: Generate IMPL_PLAN.md
36
- PL->>PL: Generate task JSONs
37
- PL-->>U: Present plan
38
-
39
- Note over VF: Phase 2: Verification
40
- U->>VF: /workflow:action-plan-verify
41
- VF->>VF: Cross-artifact consistency
42
- VF->>VF: Dependency validation
43
- VF->>VF: Quality gate checks
44
- VF-->>U: Verification report
45
-
46
- alt Verification failed
47
- U->>PL: Replan with issues
48
- else Verification passed
49
- Note over EX: Phase 3: Execution
50
- U->>EX: /workflow:execute
51
- EX->>EX: DAG-based parallel execution
52
- EX-->>U: Execution complete
53
- end
54
-
55
- Note over RV: Phase 4: Review
56
- U->>RV: /workflow:review
57
- RV-->>U: Review findings
58
- ```
59
-
60
- ## When to Use
61
-
62
- ✅ **Ideal scenarios**:
63
- - 大规模重构
64
- - 架构迁移
65
- - 跨模块功能开发
66
- - 技术栈升级
67
- - 团队协作项目
68
-
69
- ❌ **Avoid when**:
70
- - 简单的局部修改
71
- - 时间紧迫
72
- - 独立的小功能
73
-
74
- ## Verification Checks
75
-
76
- | Check | Description | Severity |
77
- |-------|-------------|----------|
78
- | Dependency Cycles | 检测循环依赖 | Critical |
79
- | Missing Tasks | 计划与实际不符 | High |
80
- | File Conflicts | 多任务修改同文件 | Medium |
81
- | Coverage Gaps | 未覆盖的需求 | Medium |
82
-
83
- ## Configuration
84
-
85
- ```javascript
86
- const coupledConfig = {
87
- plan: {
88
- phases: 5, // Full 5-phase planning
89
- taskGeneration: 'action-planning-agent',
90
- outputFormat: {
91
- implPlan: '.workflow/plans/IMPL_PLAN.md',
92
- taskJsons: '.workflow/tasks/IMPL-*.json'
93
- }
94
- },
95
-
96
- verify: {
97
- required: true, // Always verify before execute
98
- autoReplan: false, // Manual replan on failure
99
- qualityGates: ['no-cycles', 'no-conflicts', 'complete-coverage']
100
- },
101
-
102
- execute: {
103
- dagParallel: true,
104
- checkpointInterval: 3, // Checkpoint every 3 tasks
105
- rollbackOnFailure: true
106
- },
107
-
108
- review: {
109
- types: ['architecture', 'security'],
110
- required: true
111
- }
112
- }
113
- ```
114
-
115
- ## Task JSON Structure
116
-
117
- ```json
118
- {
119
- "id": "IMPL-001",
120
- "title": "重构认证模块核心逻辑",
121
- "scope": "src/auth/**",
122
- "action": "refactor",
123
- "depends_on": [],
124
- "modification_points": [
125
- {
126
- "file": "src/auth/service.ts",
127
- "target": "AuthService",
128
- "change": "Extract OAuth2 logic"
129
- }
130
- ],
131
- "acceptance": [
132
- "所有现有测试通过",
133
- "OAuth2 流程可用"
134
- ]
135
- }
136
- ```
137
-
138
- ## Example Invocations
139
-
140
- ```bash
141
- # Architecture refactoring
142
- ccw "重构整个认证模块,从 session 迁移到 JWT"
143
- → plan (5 phases)
144
- → verify
145
- → execute
146
-
147
- # System migration
148
- ccw "将数据库从 MySQL 迁移到 PostgreSQL"
149
- → plan (migration strategy)
150
- → verify (data integrity checks)
151
- → execute (staged migration)
152
-
153
- # Cross-module feature
154
- ccw "实现跨服务的分布式事务支持"
155
- → plan (architectural design)
156
- → verify (consistency checks)
157
- → execute (incremental rollout)
158
- ```
159
-
160
- ## Output Artifacts
161
-
162
- ```
163
- .workflow/
164
- ├── plans/
165
- │ └── IMPL_PLAN.md # Comprehensive plan
166
- ├── tasks/
167
- │ ├── IMPL-001.json
168
- │ ├── IMPL-002.json
169
- │ └── ...
170
- ├── verify/
171
- │ └── verification-report.md # Verification results
172
- └── reviews/
173
- └── {review-type}.md # Review findings
174
- ```
175
-
176
- ## Replan Flow
177
-
178
- When verification fails:
179
-
180
- ```javascript
181
- if (verificationResult.status === 'failed') {
182
- console.log(`
183
- ## Verification Failed
184
-
185
- **Issues found**:
186
- ${verificationResult.issues.map(i => `- ${i.severity}: ${i.message}`).join('\n')}
187
-
188
- **Options**:
189
- 1. /workflow:replan - Address issues and regenerate plan
190
- 2. /workflow:plan --force - Proceed despite issues (not recommended)
191
- 3. Review issues manually and fix plan files
192
- `)
193
- }
194
- ```
@@ -1,93 +0,0 @@
1
- # Documentation Workflow Action
2
-
3
- ## Pattern
4
- ```
5
- memory:docs → execute (full)
6
- memory:update-related (incremental)
7
- ```
8
-
9
- ## Trigger Conditions
10
-
11
- - 关键词: "文档", "documentation", "docs", "readme", "注释"
12
- - 变体触发:
13
- - `incremental`: "更新", "增量", "相关"
14
- - `full`: "全部", "完整", "所有"
15
-
16
- ## Variants
17
-
18
- ### Full Documentation
19
- ```mermaid
20
- graph TD
21
- A[User Input] --> B[memory:docs]
22
- B --> C[项目结构分析]
23
- C --> D[模块分组 ≤10/task]
24
- D --> E[execute: 并行生成]
25
- E --> F[README.md]
26
- E --> G[ARCHITECTURE.md]
27
- E --> H[API Docs]
28
- E --> I[Module CLAUDE.md]
29
- ```
30
-
31
- ### Incremental Update
32
- ```mermaid
33
- graph TD
34
- A[Git Changes] --> B[memory:update-related]
35
- B --> C[变更模块检测]
36
- C --> D[相关文档定位]
37
- D --> E[增量更新]
38
- ```
39
-
40
- ## Configuration
41
-
42
- | 参数 | 默认值 | 说明 |
43
- |------|--------|------|
44
- | batch_size | 4 | 每agent处理模块数 |
45
- | format | markdown | 输出格式 |
46
- | include_api | true | 生成API文档 |
47
- | include_diagrams | true | 生成Mermaid图 |
48
-
49
- ## CLI Integration
50
-
51
- | 阶段 | CLI Hint | 用途 |
52
- |------|----------|------|
53
- | memory:docs | `gemini --mode analysis` | 项目结构分析 |
54
- | execute | `gemini --mode write` | 文档生成 |
55
- | update-related | `gemini --mode write` | 增量更新 |
56
-
57
- ## Slash Commands
58
-
59
- ```bash
60
- /memory:docs # 规划全量文档生成
61
- /memory:docs-full-cli # CLI执行全量文档
62
- /memory:docs-related-cli # CLI执行增量文档
63
- /memory:update-related # 更新变更相关文档
64
- /memory:update-full # 更新所有CLAUDE.md
65
- ```
66
-
67
- ## Output Structure
68
-
69
- ```
70
- project/
71
- ├── README.md # 项目概览
72
- ├── ARCHITECTURE.md # 架构文档
73
- ├── docs/
74
- │ └── api/ # API文档
75
- └── src/
76
- └── module/
77
- └── CLAUDE.md # 模块文档
78
- ```
79
-
80
- ## When to Use
81
-
82
- - 新项目初始化文档
83
- - 大版本发布前文档更新
84
- - 代码变更后同步文档
85
- - API文档生成
86
-
87
- ## Risk Assessment
88
-
89
- | 风险 | 缓解措施 |
90
- |------|----------|
91
- | 文档与代码不同步 | git hook集成 |
92
- | 生成内容过于冗长 | batch_size控制 |
93
- | 遗漏重要模块 | 全量扫描验证 |
@@ -1,154 +0,0 @@
1
- # Action: Full Workflow
2
-
3
- 完整探索工作流:分析 + 头脑风暴 + 规划 + 执行
4
-
5
- ## Pattern
6
-
7
- ```
8
- brainstorm:auto-parallel → plan → [verify] → execute
9
- ```
10
-
11
- ## Trigger Conditions
12
-
13
- - Intent: Exploration (uncertainty detected)
14
- - Keywords: "不确定", "不知道", "explore", "怎么做", "what if"
15
- - No clear implementation path
16
-
17
- ## Execution Flow
18
-
19
- ```mermaid
20
- sequenceDiagram
21
- participant U as User
22
- participant O as CCW Orchestrator
23
- participant BS as brainstorm
24
- participant PL as plan
25
- participant VF as verify
26
- participant EX as execute
27
-
28
- U->>O: Unclear task
29
- O->>O: Classify: full
30
-
31
- Note over BS: Phase 1: Brainstorm
32
- O->>BS: /workflow:brainstorm:auto-parallel
33
- BS->>BS: Multi-role parallel analysis
34
- BS->>BS: Synthesis & recommendations
35
- BS-->>U: Present options
36
- U->>BS: Select direction
37
-
38
- Note over PL: Phase 2: Plan
39
- BS->>PL: /workflow:plan
40
- PL->>PL: Generate IMPL_PLAN.md
41
- PL->>PL: Generate task JSONs
42
- PL-->>U: Review plan
43
-
44
- Note over VF: Phase 3: Verify (optional)
45
- U->>VF: /workflow:action-plan-verify
46
- VF->>VF: Cross-artifact consistency
47
- VF-->>U: Verification report
48
-
49
- Note over EX: Phase 4: Execute
50
- U->>EX: /workflow:execute
51
- EX->>EX: DAG-based parallel execution
52
- EX-->>U: Execution complete
53
- ```
54
-
55
- ## When to Use
56
-
57
- ✅ **Ideal scenarios**:
58
- - 产品方向探索
59
- - 技术选型评估
60
- - 架构设计决策
61
- - 复杂功能规划
62
- - 需要多角色视角
63
-
64
- ❌ **Avoid when**:
65
- - 任务明确简单
66
- - 时间紧迫
67
- - 已有成熟方案
68
-
69
- ## Brainstorm Roles
70
-
71
- | Role | Focus | Typical Questions |
72
- |------|-------|-------------------|
73
- | Product Manager | 用户价值、市场定位 | "用户痛点是什么?" |
74
- | System Architect | 技术方案、架构设计 | "如何保证可扩展性?" |
75
- | UX Expert | 用户体验、交互设计 | "用户流程是否顺畅?" |
76
- | Security Expert | 安全风险、合规要求 | "有哪些安全隐患?" |
77
- | Data Architect | 数据模型、存储方案 | "数据如何组织?" |
78
-
79
- ## Configuration
80
-
81
- ```javascript
82
- const fullConfig = {
83
- brainstorm: {
84
- defaultRoles: ['product-manager', 'system-architect', 'ux-expert'],
85
- maxRoles: 5,
86
- synthesis: true // Always generate synthesis
87
- },
88
-
89
- plan: {
90
- verifyBeforeExecute: true, // Recommend verification
91
- taskFormat: 'json' // Generate task JSONs
92
- },
93
-
94
- execute: {
95
- dagParallel: true, // DAG-based parallel execution
96
- testGeneration: 'optional' // Suggest test-gen after
97
- }
98
- }
99
- ```
100
-
101
- ## Continuation Points
102
-
103
- After each phase, CCW can continue to the next:
104
-
105
- ```javascript
106
- // After brainstorm completes
107
- console.log(`
108
- ## Brainstorm Complete
109
-
110
- **Next steps**:
111
- 1. /workflow:plan "基于头脑风暴结果规划实施"
112
- 2. Or refine: /workflow:brainstorm:synthesis
113
- `)
114
-
115
- // After plan completes
116
- console.log(`
117
- ## Plan Complete
118
-
119
- **Next steps**:
120
- 1. /workflow:action-plan-verify (recommended)
121
- 2. /workflow:execute (直接执行)
122
- `)
123
- ```
124
-
125
- ## Example Invocations
126
-
127
- ```bash
128
- # Product exploration
129
- ccw "我想做一个团队协作工具,但不确定具体方向"
130
- → brainstorm:auto-parallel (5 roles)
131
- → plan
132
- → execute
133
-
134
- # Technical exploration
135
- ccw "如何设计一个高可用的消息队列系统?"
136
- → brainstorm:auto-parallel (system-architect, data-architect)
137
- → plan
138
- → verify
139
- → execute
140
- ```
141
-
142
- ## Output Artifacts
143
-
144
- ```
145
- .workflow/
146
- ├── brainstorm/
147
- │ ├── {session}/
148
- │ │ ├── role-{role}.md
149
- │ │ └── synthesis.md
150
- ├── plans/
151
- │ └── IMPL_PLAN.md
152
- └── tasks/
153
- └── IMPL-*.json
154
- ```
@@ -1,201 +0,0 @@
1
- # Action: Issue Workflow
2
-
3
- Issue 批量处理工作流:规划 + 队列 + 批量执行
4
-
5
- ## Pattern
6
-
7
- ```
8
- issue:plan → issue:queue → issue:execute
9
- ```
10
-
11
- ## Trigger Conditions
12
-
13
- - Keywords: "issues", "batch", "queue", "多个", "批量"
14
- - Multiple related problems
15
- - Long-running fix campaigns
16
- - Priority-based processing needed
17
-
18
- ## Execution Flow
19
-
20
- ```mermaid
21
- sequenceDiagram
22
- participant U as User
23
- participant O as CCW Orchestrator
24
- participant IP as issue:plan
25
- participant IQ as issue:queue
26
- participant IE as issue:execute
27
-
28
- U->>O: Multiple issues / batch fix
29
- O->>O: Classify: issue
30
-
31
- Note over IP: Phase 1: Issue Planning
32
- O->>IP: /issue:plan
33
- IP->>IP: Load unplanned issues
34
- IP->>IP: Generate solutions per issue
35
- IP->>U: Review solutions
36
- U->>IP: Bind selected solutions
37
-
38
- Note over IQ: Phase 2: Queue Formation
39
- IP->>IQ: /issue:queue
40
- IQ->>IQ: Conflict analysis
41
- IQ->>IQ: Priority calculation
42
- IQ->>IQ: DAG construction
43
- IQ->>U: High-severity conflicts?
44
- U->>IQ: Resolve conflicts
45
- IQ->>IQ: Generate execution queue
46
-
47
- Note over IE: Phase 3: Execution
48
- IQ->>IE: /issue:execute
49
- IE->>IE: DAG-based parallel execution
50
- IE->>IE: Per-solution progress tracking
51
- IE-->>U: Batch execution complete
52
- ```
53
-
54
- ## When to Use
55
-
56
- ✅ **Ideal scenarios**:
57
- - 多个相关 Bug 需要批量修复
58
- - GitHub Issues 批量处理
59
- - 技术债务清理
60
- - 安全漏洞批量修复
61
- - 代码质量改进活动
62
-
63
- ❌ **Avoid when**:
64
- - 单一问题 → `/workflow:lite-fix`
65
- - 独立不相关的任务 → 分别处理
66
- - 紧急生产问题 → `/workflow:lite-fix --hotfix`
67
-
68
- ## Issue Lifecycle
69
-
70
- ```
71
- draft → planned → queued → executing → completed
72
- ↓ ↓
73
- skipped on-hold
74
- ```
75
-
76
- ## Conflict Types
77
-
78
- | Type | Description | Resolution |
79
- |------|-------------|------------|
80
- | File | 多个解决方案修改同一文件 | Sequential execution |
81
- | API | API 签名变更影响 | Dependency ordering |
82
- | Data | 数据结构变更冲突 | User decision |
83
- | Dependency | 包依赖冲突 | Version negotiation |
84
- | Architecture | 架构方向冲突 | User decision (high severity) |
85
-
86
- ## Configuration
87
-
88
- ```javascript
89
- const issueConfig = {
90
- plan: {
91
- solutionsPerIssue: 3, // Generate up to 3 solutions
92
- autoSelect: false, // User must bind solution
93
- planningAgent: 'issue-plan-agent'
94
- },
95
-
96
- queue: {
97
- conflictAnalysis: true,
98
- priorityCalculation: true,
99
- clarifyThreshold: 'high', // Ask user for high-severity conflicts
100
- queueAgent: 'issue-queue-agent'
101
- },
102
-
103
- execute: {
104
- dagParallel: true,
105
- executionLevel: 'solution', // Execute by solution, not task
106
- executor: 'codex',
107
- resumable: true
108
- }
109
- }
110
- ```
111
-
112
- ## Example Invocations
113
-
114
- ```bash
115
- # From GitHub Issues
116
- ccw "批量处理所有 label:bug 的 GitHub Issues"
117
- → issue:new (import from GitHub)
118
- → issue:plan (generate solutions)
119
- → issue:queue (form execution queue)
120
- → issue:execute (batch execute)
121
-
122
- # Tech debt cleanup
123
- ccw "处理所有 TODO 注释和已知技术债务"
124
- → issue:discover (find issues)
125
- → issue:plan (plan solutions)
126
- → issue:queue (prioritize)
127
- → issue:execute (execute)
128
-
129
- # Security vulnerabilities
130
- ccw "修复所有 npm audit 报告的安全漏洞"
131
- → issue:new (from audit report)
132
- → issue:plan (upgrade strategies)
133
- → issue:queue (conflict resolution)
134
- → issue:execute (staged upgrades)
135
- ```
136
-
137
- ## Queue Structure
138
-
139
- ```json
140
- {
141
- "queue_id": "QUE-20251227-143000",
142
- "status": "active",
143
- "execution_groups": [
144
- {
145
- "id": "P1",
146
- "type": "parallel",
147
- "solutions": ["SOL-ISS-001-1", "SOL-ISS-002-1"],
148
- "description": "Independent fixes, no file overlap"
149
- },
150
- {
151
- "id": "S1",
152
- "type": "sequential",
153
- "solutions": ["SOL-ISS-003-1"],
154
- "depends_on": ["P1"],
155
- "description": "Depends on P1 completion"
156
- }
157
- ]
158
- }
159
- ```
160
-
161
- ## Output Artifacts
162
-
163
- ```
164
- .workflow/issues/
165
- ├── issues.jsonl # All issues (one per line)
166
- ├── solutions/
167
- │ ├── ISS-001.jsonl # Solutions for ISS-001
168
- │ └── ISS-002.jsonl
169
- ├── queues/
170
- │ ├── index.json # Queue index
171
- │ └── QUE-xxx.json # Queue details
172
- └── execution/
173
- └── {queue-id}/
174
- ├── progress.json
175
- └── results/
176
- ```
177
-
178
- ## Progress Tracking
179
-
180
- ```javascript
181
- // Real-time progress during execution
182
- const progress = {
183
- queue_id: "QUE-xxx",
184
- total_solutions: 5,
185
- completed: 2,
186
- in_progress: 1,
187
- pending: 2,
188
- current_group: "P1",
189
- eta: "15 minutes"
190
- }
191
- ```
192
-
193
- ## Resume Capability
194
-
195
- ```bash
196
- # If execution interrupted
197
- ccw "继续执行 issue 队列"
198
- → Detects active queue: QUE-xxx
199
- → Resumes from last checkpoint
200
- → /issue:execute --resume
201
- ```