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.
- package/.claude/CLAUDE.md +1 -1
- package/.claude/agents/issue-plan-agent.md +3 -10
- package/.claude/agents/issue-queue-agent.md +103 -83
- package/.claude/commands/issue/execute.md +195 -363
- package/.claude/commands/issue/plan.md +9 -2
- package/.claude/commands/issue/queue.md +130 -66
- package/.claude/commands/workflow/init.md +75 -29
- package/.claude/commands/workflow/lite-fix.md +8 -0
- package/.claude/commands/workflow/lite-plan.md +8 -0
- package/.claude/commands/workflow/review-module-cycle.md +4 -0
- package/.claude/commands/workflow/review-session-cycle.md +4 -0
- package/.claude/commands/workflow/review.md +4 -4
- package/.claude/commands/workflow/session/solidify.md +299 -0
- package/.claude/commands/workflow/session/start.md +10 -7
- package/.claude/commands/workflow/tools/context-gather.md +17 -10
- package/.claude/workflows/cli-templates/schemas/queue-schema.json +225 -108
- package/.claude/workflows/cli-templates/schemas/solution-schema.json +6 -28
- package/.claude/workflows/context-tools.md +17 -25
- package/.codex/AGENTS.md +10 -5
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +348 -115
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/src/commands/issue.ts +392 -149
- package/ccw/src/templates/dashboard-js/components/cli-status.js +1 -78
- package/ccw/src/templates/dashboard-js/i18n.js +0 -4
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +0 -18
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +57 -26
- package/package.json +1 -1
- 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
|
|
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.
|
|
73
|
-
scope: inferScope(issue.title, issue.
|
|
74
|
-
complexity: determineComplexity(issue)
|
|
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
|
-
|
|
5
|
-
Receives
|
|
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
|
|
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
|
|
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
|
|
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
|
-
-
|
|
23
|
-
- File
|
|
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**:
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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: `
|
|
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:
|
|
58
|
-
|
|
55
|
+
Phase 1: Solution Analysis (20%)
|
|
56
|
+
| Parse solutions, collect files_touched, build DAG
|
|
59
57
|
Phase 2: Conflict Detection (30%)
|
|
60
|
-
|
|
58
|
+
| Identify file overlaps between solutions
|
|
61
59
|
Phase 3: Conflict Resolution (25%)
|
|
62
|
-
|
|
60
|
+
| Apply ordering rules, update DAG
|
|
63
61
|
Phase 4: Ordering & Grouping (25%)
|
|
64
|
-
|
|
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(
|
|
72
|
+
function buildDependencyGraph(solutions) {
|
|
75
73
|
const graph = new Map()
|
|
76
74
|
const fileModifications = new Map()
|
|
77
75
|
|
|
78
|
-
for (const
|
|
79
|
-
graph.set(
|
|
76
|
+
for (const sol of solutions) {
|
|
77
|
+
graph.set(sol.solution_id, { ...sol, inDegree: 0, outEdges: [] })
|
|
80
78
|
|
|
81
|
-
for (const file of
|
|
79
|
+
for (const file of sol.files_touched || []) {
|
|
82
80
|
if (!fileModifications.has(file)) fileModifications.set(file, [])
|
|
83
|
-
fileModifications.get(file).push(
|
|
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
|
|
91
|
+
Conflict when multiple solutions modify same file:
|
|
104
92
|
```javascript
|
|
105
93
|
function detectConflicts(fileModifications, graph) {
|
|
106
94
|
return [...fileModifications.entries()]
|
|
107
|
-
.filter(([_,
|
|
108
|
-
.map(([file,
|
|
95
|
+
.filter(([_, solutions]) => solutions.length > 1)
|
|
96
|
+
.map(([file, solutions]) => ({
|
|
109
97
|
type: 'file_conflict',
|
|
110
98
|
file,
|
|
111
|
-
|
|
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 |
|
|
122
|
-
| 2 | Foundation
|
|
123
|
-
| 3 |
|
|
124
|
-
| 4 |
|
|
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** (
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
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
|
-
**
|
|
124
|
+
**Task-count Boost** (applied to base score):
|
|
139
125
|
| Factor | Boost |
|
|
140
126
|
|--------|-------|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
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
|
-
|
|
|
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*)**:
|
|
156
|
-
- **Sequential (S*)**:
|
|
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
|
|
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
|
-
|
|
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.
|
|
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": ["
|
|
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
|
|
205
|
-
| Empty
|
|
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
|
|
230
|
+
2. Detect file overlaps between solutions
|
|
212
231
|
3. Apply resolution rules consistently
|
|
213
|
-
4. Calculate semantic priority for all
|
|
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
|
|
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
|
|
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`
|