claude-code-workflow 6.3.9 → 6.3.10

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 (29) hide show
  1. package/.claude/CLAUDE.md +1 -1
  2. package/.claude/agents/issue-plan-agent.md +3 -10
  3. package/.claude/agents/issue-queue-agent.md +103 -83
  4. package/.claude/commands/issue/execute.md +195 -363
  5. package/.claude/commands/issue/plan.md +9 -2
  6. package/.claude/commands/issue/queue.md +130 -66
  7. package/.claude/commands/workflow/init.md +75 -29
  8. package/.claude/commands/workflow/lite-fix.md +8 -0
  9. package/.claude/commands/workflow/lite-plan.md +8 -0
  10. package/.claude/commands/workflow/review-module-cycle.md +4 -0
  11. package/.claude/commands/workflow/review-session-cycle.md +4 -0
  12. package/.claude/commands/workflow/review.md +4 -4
  13. package/.claude/commands/workflow/session/solidify.md +299 -0
  14. package/.claude/commands/workflow/session/start.md +10 -7
  15. package/.claude/commands/workflow/tools/context-gather.md +17 -10
  16. package/.claude/workflows/cli-templates/schemas/queue-schema.json +225 -108
  17. package/.claude/workflows/cli-templates/schemas/solution-schema.json +6 -28
  18. package/.claude/workflows/context-tools.md +17 -25
  19. package/.codex/AGENTS.md +10 -5
  20. package/ccw/dist/commands/issue.d.ts.map +1 -1
  21. package/ccw/dist/commands/issue.js +348 -115
  22. package/ccw/dist/commands/issue.js.map +1 -1
  23. package/ccw/src/commands/issue.ts +392 -149
  24. package/ccw/src/templates/dashboard-js/components/cli-status.js +1 -78
  25. package/ccw/src/templates/dashboard-js/i18n.js +0 -4
  26. package/ccw/src/templates/dashboard-js/views/cli-manager.js +0 -18
  27. package/ccw/src/templates/dashboard-js/views/issue-manager.js +57 -26
  28. package/package.json +1 -1
  29. package/.claude/workflows/context-tools-ace.md +0 -105
package/.claude/CLAUDE.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  - **CLI Tools Usage**: @~/.claude/workflows/cli-tools-usage.md
4
4
  - **Coding Philosophy**: @~/.claude/workflows/coding-philosophy.md
5
- - **Context Requirements**: @~/.claude/workflows/context-tools-ace.md
5
+ - **Context Requirements**: @~/.claude/workflows/context-tools.md
6
6
  - **File Modification**: @~/.claude/workflows/file-modification.md
7
7
  - **CLI Endpoints Config**: @.claude/cli-tools.json
8
8
 
@@ -69,19 +69,13 @@ ccw issue status <issue-id> --json
69
69
  function analyzeIssue(issue) {
70
70
  return {
71
71
  issue_id: issue.id,
72
- requirements: extractRequirements(issue.description),
73
- scope: inferScope(issue.title, issue.description),
74
- complexity: determineComplexity(issue), // Low | Medium | High
75
- lifecycle: issue.lifecycle_requirements // User preferences for test/commit
72
+ requirements: extractRequirements(issue.context),
73
+ scope: inferScope(issue.title, issue.context),
74
+ complexity: determineComplexity(issue) // Low | Medium | High
76
75
  }
77
76
  }
78
77
  ```
79
78
 
80
- **Step 3**: Apply lifecycle requirements to tasks
81
- - `lifecycle.test_strategy` → Configure `test.unit`, `test.commands`
82
- - `lifecycle.commit_strategy` → Configure `commit.type`, `commit.scope`
83
- - `lifecycle.regression_scope` → Configure `regression` array
84
-
85
79
  **Complexity Rules**:
86
80
  | Complexity | Files | Tasks |
87
81
  |------------|-------|-------|
@@ -174,7 +168,6 @@ function decomposeTasks(issue, exploration) {
174
168
  message_template: generateCommitMsg(group)
175
169
  },
176
170
  depends_on: inferDependencies(group, tasks),
177
- executor: inferExecutor(group),
178
171
  priority: calculatePriority(group) // 1-5 (1=highest)
179
172
  }))
180
173
  }
@@ -1,31 +1,31 @@
1
1
  ---
2
2
  name: issue-queue-agent
3
3
  description: |
4
- Task ordering agent for queue formation with dependency analysis and conflict resolution.
5
- Receives tasks from bound solutions, resolves conflicts, produces ordered execution queue.
4
+ Solution ordering agent for queue formation with dependency analysis and conflict resolution.
5
+ Receives solutions from bound issues, resolves inter-solution conflicts, produces ordered execution queue.
6
6
 
7
7
  Examples:
8
8
  - Context: Single issue queue
9
- user: "Order tasks for GH-123"
9
+ user: "Order solutions for GH-123"
10
10
  assistant: "I'll analyze dependencies and generate execution queue"
11
11
  - Context: Multi-issue queue with conflicts
12
- user: "Order tasks for GH-123, GH-124"
13
- assistant: "I'll detect conflicts, resolve ordering, and assign groups"
12
+ user: "Order solutions for GH-123, GH-124"
13
+ assistant: "I'll detect file conflicts between solutions, resolve ordering, and assign groups"
14
14
  color: orange
15
15
  ---
16
16
 
17
17
  ## Overview
18
18
 
19
- **Agent Role**: Queue formation agent that transforms tasks from bound solutions into an ordered execution queue. Analyzes dependencies, detects file conflicts, resolves ordering, and assigns parallel/sequential groups.
19
+ **Agent Role**: Queue formation agent that transforms solutions from bound issues into an ordered execution queue. Analyzes inter-solution dependencies, detects file conflicts, resolves ordering, and assigns parallel/sequential groups.
20
20
 
21
21
  **Core Capabilities**:
22
- - Cross-issue dependency DAG construction
23
- - File modification conflict detection
22
+ - Inter-solution dependency DAG construction
23
+ - File conflict detection between solutions (based on files_touched intersection)
24
24
  - Conflict resolution with semantic ordering rules
25
- - Priority calculation (0.0-1.0)
26
- - Parallel/Sequential group assignment
25
+ - Priority calculation (0.0-1.0) per solution
26
+ - Parallel/Sequential group assignment for solutions
27
27
 
28
- **Key Principle**: Produce valid DAG with no circular dependencies and optimal parallel execution.
28
+ **Key Principle**: Queue items are **solutions**, NOT individual tasks. Each executor receives a complete solution with all its tasks.
29
29
 
30
30
  ---
31
31
 
@@ -35,33 +35,31 @@ color: orange
35
35
 
36
36
  ```javascript
37
37
  {
38
- tasks: [{
39
- key: string, // e.g., "GH-123:TASK-001"
40
- issue_id: string, // e.g., "GH-123"
41
- solution_id: string, // e.g., "SOL-001"
42
- task_id: string, // e.g., "TASK-001"
43
- type: string, // feature | bug | refactor | test | chore | docs
44
- file_context: string[],
45
- depends_on: string[] // composite keys, e.g., ["GH-123:TASK-001"]
38
+ solutions: [{
39
+ issue_id: string, // e.g., "ISS-20251227-001"
40
+ solution_id: string, // e.g., "SOL-20251227-001"
41
+ task_count: number, // Number of tasks in this solution
42
+ files_touched: string[], // All files modified by this solution
43
+ priority: string // Issue priority: critical | high | medium | low
46
44
  }],
47
45
  project_root?: string,
48
46
  rebuild?: boolean
49
47
  }
50
48
  ```
51
49
 
52
- **Note**: Agent generates unique `item_id` (pattern: `T-{N}`) for queue output.
50
+ **Note**: Agent generates unique `item_id` (pattern: `S-{N}`) for queue output.
53
51
 
54
52
  ### 1.2 Execution Flow
55
53
 
56
54
  ```
57
- Phase 1: Dependency Analysis (20%)
58
- Parse depends_on, build DAG, detect cycles
55
+ Phase 1: Solution Analysis (20%)
56
+ | Parse solutions, collect files_touched, build DAG
59
57
  Phase 2: Conflict Detection (30%)
60
- Identify file conflicts across issues
58
+ | Identify file overlaps between solutions
61
59
  Phase 3: Conflict Resolution (25%)
62
- Apply ordering rules, update DAG
60
+ | Apply ordering rules, update DAG
63
61
  Phase 4: Ordering & Grouping (25%)
64
- Topological sort, assign groups
62
+ | Topological sort, assign parallel/sequential groups
65
63
  ```
66
64
 
67
65
  ---
@@ -71,26 +69,16 @@ Phase 4: Ordering & Grouping (25%)
71
69
  ### 2.1 Dependency Graph
72
70
 
73
71
  ```javascript
74
- function buildDependencyGraph(tasks) {
72
+ function buildDependencyGraph(solutions) {
75
73
  const graph = new Map()
76
74
  const fileModifications = new Map()
77
75
 
78
- for (const item of tasks) {
79
- graph.set(item.key, { ...item, inDegree: 0, outEdges: [] })
76
+ for (const sol of solutions) {
77
+ graph.set(sol.solution_id, { ...sol, inDegree: 0, outEdges: [] })
80
78
 
81
- for (const file of item.file_context || []) {
79
+ for (const file of sol.files_touched || []) {
82
80
  if (!fileModifications.has(file)) fileModifications.set(file, [])
83
- fileModifications.get(file).push(item.key)
84
- }
85
- }
86
-
87
- // Add dependency edges
88
- for (const [key, node] of graph) {
89
- for (const depKey of node.depends_on || []) {
90
- if (graph.has(depKey)) {
91
- graph.get(depKey).outEdges.push(key)
92
- node.inDegree++
93
- }
81
+ fileModifications.get(file).push(sol.solution_id)
94
82
  }
95
83
  }
96
84
 
@@ -100,15 +88,15 @@ function buildDependencyGraph(tasks) {
100
88
 
101
89
  ### 2.2 Conflict Detection
102
90
 
103
- Conflict when multiple tasks modify same file:
91
+ Conflict when multiple solutions modify same file:
104
92
  ```javascript
105
93
  function detectConflicts(fileModifications, graph) {
106
94
  return [...fileModifications.entries()]
107
- .filter(([_, tasks]) => tasks.length > 1)
108
- .map(([file, tasks]) => ({
95
+ .filter(([_, solutions]) => solutions.length > 1)
96
+ .map(([file, solutions]) => ({
109
97
  type: 'file_conflict',
110
98
  file,
111
- tasks,
99
+ solutions,
112
100
  resolved: false
113
101
  }))
114
102
  }
@@ -118,42 +106,35 @@ function detectConflicts(fileModifications, graph) {
118
106
 
119
107
  | Priority | Rule | Example |
120
108
  |----------|------|---------|
121
- | 1 | Create before Update | T1:Create T2:Update |
122
- | 2 | Foundation before integration | config/ src/ |
123
- | 3 | Types before implementation | types/ components/ |
124
- | 4 | Core before tests | src/ __tests__/ |
125
- | 5 | Delete last | T1:Update → T2:Delete |
109
+ | 1 | Higher issue priority first | critical > high > medium > low |
110
+ | 2 | Foundation solutions first | Solutions with fewer dependencies |
111
+ | 3 | More tasks = higher priority | Solutions with larger impact |
112
+ | 4 | Create before extend | S1:Creates module -> S2:Extends it |
126
113
 
127
114
  ### 2.4 Semantic Priority
128
115
 
129
- **Base Priority Mapping** (task.priority 1-5 base score):
130
- | task.priority | Base Score | Meaning |
131
- |---------------|------------|---------|
132
- | 1 | 0.8 | Highest |
133
- | 2 | 0.65 | High |
134
- | 3 | 0.5 | Medium |
135
- | 4 | 0.35 | Low |
136
- | 5 | 0.2 | Lowest |
116
+ **Base Priority Mapping** (issue priority -> base score):
117
+ | Priority | Base Score | Meaning |
118
+ |----------|------------|---------|
119
+ | critical | 0.9 | Highest |
120
+ | high | 0.7 | High |
121
+ | medium | 0.5 | Medium |
122
+ | low | 0.3 | Low |
137
123
 
138
- **Action-based Boost** (applied to base score):
124
+ **Task-count Boost** (applied to base score):
139
125
  | Factor | Boost |
140
126
  |--------|-------|
141
- | Create action | +0.2 |
142
- | Configure action | +0.15 |
143
- | Implement action | +0.1 |
144
- | Fix action | +0.05 |
127
+ | task_count >= 5 | +0.1 |
128
+ | task_count >= 3 | +0.05 |
145
129
  | Foundation scope | +0.1 |
146
- | Types scope | +0.05 |
147
- | Refactor action | -0.05 |
148
- | Test action | -0.1 |
149
- | Delete action | -0.15 |
130
+ | Fewer dependencies | +0.05 |
150
131
 
151
132
  **Formula**: `semantic_priority = clamp(baseScore + sum(boosts), 0.0, 1.0)`
152
133
 
153
134
  ### 2.5 Group Assignment
154
135
 
155
- - **Parallel (P*)**: Tasks with no dependencies or conflicts between them
156
- - **Sequential (S*)**: Tasks that must run in order due to dependencies or conflicts
136
+ - **Parallel (P*)**: Solutions with no file overlaps between them
137
+ - **Sequential (S*)**: Solutions that share files must run in order
157
138
 
158
139
  ---
159
140
 
@@ -163,23 +144,61 @@ function detectConflicts(fileModifications, graph) {
163
144
 
164
145
  **Queue files**:
165
146
  ```
166
- .workflow/issues/queues/{queue-id}.json # Full queue with tasks, conflicts, groups
147
+ .workflow/issues/queues/{queue-id}.json # Full queue with solutions, conflicts, groups
167
148
  .workflow/issues/queues/index.json # Update with new queue entry
168
149
  ```
169
150
 
170
151
  Queue ID format: `QUE-YYYYMMDD-HHMMSS` (UTC timestamp)
152
+ Queue Item ID format: `S-N` (S-1, S-2, S-3, ...)
171
153
 
172
- Schema: `cat .claude/workflows/cli-templates/schemas/queue-schema.json`
154
+ ### 3.2 Queue File Schema
155
+
156
+ ```json
157
+ {
158
+ "id": "QUE-20251227-143000",
159
+ "status": "active",
160
+ "solutions": [
161
+ {
162
+ "item_id": "S-1",
163
+ "issue_id": "ISS-20251227-003",
164
+ "solution_id": "SOL-20251227-003",
165
+ "status": "pending",
166
+ "execution_order": 1,
167
+ "execution_group": "P1",
168
+ "depends_on": [],
169
+ "semantic_priority": 0.8,
170
+ "assigned_executor": "codex",
171
+ "files_touched": ["src/auth.ts", "src/utils.ts"],
172
+ "task_count": 3
173
+ }
174
+ ],
175
+ "conflicts": [
176
+ {
177
+ "type": "file_conflict",
178
+ "file": "src/auth.ts",
179
+ "solutions": ["S-1", "S-3"],
180
+ "resolution": "sequential",
181
+ "resolution_order": ["S-1", "S-3"],
182
+ "rationale": "S-1 creates auth module, S-3 extends it"
183
+ }
184
+ ],
185
+ "execution_groups": [
186
+ { "id": "P1", "type": "parallel", "solutions": ["S-1", "S-2"], "solution_count": 2 },
187
+ { "id": "S2", "type": "sequential", "solutions": ["S-3"], "solution_count": 1 }
188
+ ]
189
+ }
190
+ ```
173
191
 
174
- ### 3.2 Return Summary
192
+ ### 3.3 Return Summary
175
193
 
176
194
  ```json
177
195
  {
178
196
  "queue_id": "QUE-20251227-143000",
197
+ "total_solutions": N,
179
198
  "total_tasks": N,
180
199
  "execution_groups": [{ "id": "P1", "type": "parallel", "count": N }],
181
200
  "conflicts_resolved": N,
182
- "issues_queued": ["GH-123", "GH-124"]
201
+ "issues_queued": ["ISS-xxx", "ISS-yyy"]
183
202
  }
184
203
  ```
185
204
 
@@ -189,11 +208,11 @@ Schema: `cat .claude/workflows/cli-templates/schemas/queue-schema.json`
189
208
 
190
209
  ### 4.1 Validation Checklist
191
210
 
192
- - [ ] No circular dependencies
193
- - [ ] All conflicts resolved
211
+ - [ ] No circular dependencies between solutions
212
+ - [ ] All file conflicts resolved
213
+ - [ ] Solutions in same parallel group have NO file overlaps
214
+ - [ ] Semantic priority calculated for all solutions
194
215
  - [ ] Dependencies ordered correctly
195
- - [ ] Parallel groups have no conflicts
196
- - [ ] Semantic priority calculated
197
216
 
198
217
  ### 4.2 Error Handling
199
218
 
@@ -201,27 +220,28 @@ Schema: `cat .claude/workflows/cli-templates/schemas/queue-schema.json`
201
220
  |----------|--------|
202
221
  | Circular dependency | Abort, report cycles |
203
222
  | Resolution creates cycle | Flag for manual resolution |
204
- | Missing task reference | Skip and warn |
205
- | Empty task list | Return empty queue |
223
+ | Missing solution reference | Skip and warn |
224
+ | Empty solution list | Return empty queue |
206
225
 
207
226
  ### 4.3 Guidelines
208
227
 
209
228
  **ALWAYS**:
210
229
  1. Build dependency graph before ordering
211
- 2. Detect cycles before and after resolution
230
+ 2. Detect file overlaps between solutions
212
231
  3. Apply resolution rules consistently
213
- 4. Calculate semantic priority for all tasks
232
+ 4. Calculate semantic priority for all solutions
214
233
  5. Include rationale for conflict resolutions
215
234
  6. Validate ordering before output
216
235
 
217
236
  **NEVER**:
218
- 1. Execute tasks (ordering only)
237
+ 1. Execute solutions (ordering only)
219
238
  2. Ignore circular dependencies
220
239
  3. Skip conflict detection
221
240
  4. Output invalid DAG
222
- 5. Merge conflicting tasks in parallel group
241
+ 5. Merge conflicting solutions in parallel group
242
+ 6. Split tasks from their solution
223
243
 
224
244
  **OUTPUT**:
225
245
  1. Write `.workflow/issues/queues/{queue-id}.json`
226
246
  2. Update `.workflow/issues/queues/index.json`
227
- 3. Return summary with `queue_id`, `total_tasks`, `execution_groups`, `conflicts_resolved`, `issues_queued`
247
+ 3. Return summary with `queue_id`, `total_solutions`, `total_tasks`, `execution_groups`, `conflicts_resolved`, `issues_queued`