claude-code-workflow 6.3.8 → 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 +84 -56
- package/.claude/agents/issue-queue-agent.md +120 -108
- package/.claude/commands/issue/execute.md +195 -363
- package/.claude/commands/issue/plan.md +70 -27
- 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 +60 -15
- 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/dist/core/routes/issue-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/issue-routes.js +68 -0
- package/ccw/dist/core/routes/issue-routes.js.map +1 -1
- package/ccw/src/commands/issue.ts +408 -148
- package/ccw/src/core/routes/issue-routes.ts +76 -0
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +310 -1
- 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 +294 -11
- package/package.json +1 -1
- package/.claude/workflows/cli-templates/schemas/issue-task-jsonl-schema.json +0 -136
- package/.claude/workflows/cli-templates/schemas/solutions-jsonl-schema.json +0 -125
- 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
|
|
|
@@ -26,7 +26,7 @@ color: green
|
|
|
26
26
|
- Dependency DAG validation
|
|
27
27
|
- Auto-bind for single solution, return for selection on multiple
|
|
28
28
|
|
|
29
|
-
**Key Principle**: Generate tasks conforming to schema with quantified
|
|
29
|
+
**Key Principle**: Generate tasks conforming to schema with quantified acceptance criteria.
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -69,8 +69,8 @@ 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.
|
|
72
|
+
requirements: extractRequirements(issue.context),
|
|
73
|
+
scope: inferScope(issue.title, issue.context),
|
|
74
74
|
complexity: determineComplexity(issue) // Low | Medium | High
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -100,26 +100,75 @@ mcp__ace-tool__search_context({
|
|
|
100
100
|
- [ ] Discover dependencies
|
|
101
101
|
- [ ] Locate test patterns
|
|
102
102
|
|
|
103
|
-
**Fallback**: ACE →
|
|
103
|
+
**Fallback Chain**: ACE → smart_search → Grep → rg → Glob
|
|
104
|
+
|
|
105
|
+
| Tool | When to Use |
|
|
106
|
+
|------|-------------|
|
|
107
|
+
| `mcp__ace-tool__search_context` | Semantic search (primary) |
|
|
108
|
+
| `mcp__ccw-tools__smart_search` | Symbol/pattern search |
|
|
109
|
+
| `Grep` | Exact regex matching |
|
|
110
|
+
| `rg` / `grep` | CLI fallback |
|
|
111
|
+
| `Glob` | File path discovery |
|
|
104
112
|
|
|
105
113
|
#### Phase 3: Solution Planning
|
|
106
114
|
|
|
115
|
+
**Multi-Solution Generation**:
|
|
116
|
+
|
|
117
|
+
Generate multiple candidate solutions when:
|
|
118
|
+
- Issue complexity is HIGH
|
|
119
|
+
- Multiple valid implementation approaches exist
|
|
120
|
+
- Trade-offs between approaches (performance vs simplicity, etc.)
|
|
121
|
+
|
|
122
|
+
| Condition | Solutions |
|
|
123
|
+
|-----------|-----------|
|
|
124
|
+
| Low complexity, single approach | 1 solution, auto-bind |
|
|
125
|
+
| Medium complexity, clear path | 1-2 solutions |
|
|
126
|
+
| High complexity, multiple approaches | 2-3 solutions, user selection |
|
|
127
|
+
|
|
128
|
+
**Solution Evaluation** (for each candidate):
|
|
129
|
+
```javascript
|
|
130
|
+
{
|
|
131
|
+
analysis: {
|
|
132
|
+
risk: "low|medium|high", // Implementation risk
|
|
133
|
+
impact: "low|medium|high", // Scope of changes
|
|
134
|
+
complexity: "low|medium|high" // Technical complexity
|
|
135
|
+
},
|
|
136
|
+
score: 0.0-1.0 // Overall quality score (higher = recommended)
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Selection Flow**:
|
|
141
|
+
1. Generate all candidate solutions
|
|
142
|
+
2. Evaluate and score each
|
|
143
|
+
3. Single solution → auto-bind
|
|
144
|
+
4. Multiple solutions → return `pending_selection` for user choice
|
|
145
|
+
|
|
107
146
|
**Task Decomposition** following schema:
|
|
108
147
|
```javascript
|
|
109
148
|
function decomposeTasks(issue, exploration) {
|
|
110
149
|
return groups.map(group => ({
|
|
111
|
-
id: `
|
|
150
|
+
id: `T${taskId++}`, // Pattern: ^T[0-9]+$
|
|
112
151
|
title: group.title,
|
|
113
|
-
|
|
152
|
+
scope: inferScope(group), // Module path
|
|
153
|
+
action: inferAction(group), // Create | Update | Implement | ...
|
|
114
154
|
description: group.description,
|
|
115
|
-
|
|
155
|
+
modification_points: mapModificationPoints(group),
|
|
156
|
+
implementation: generateSteps(group), // Step-by-step guide
|
|
157
|
+
test: {
|
|
158
|
+
unit: generateUnitTests(group),
|
|
159
|
+
commands: ['npm test']
|
|
160
|
+
},
|
|
161
|
+
acceptance: {
|
|
162
|
+
criteria: generateCriteria(group), // Quantified checklist
|
|
163
|
+
verification: generateVerification(group)
|
|
164
|
+
},
|
|
165
|
+
commit: {
|
|
166
|
+
type: inferCommitType(group), // feat | fix | refactor | ...
|
|
167
|
+
scope: inferScope(group),
|
|
168
|
+
message_template: generateCommitMsg(group)
|
|
169
|
+
},
|
|
116
170
|
depends_on: inferDependencies(group, tasks),
|
|
117
|
-
|
|
118
|
-
pause_criteria: identifyBlockers(group),
|
|
119
|
-
status: 'pending',
|
|
120
|
-
current_phase: 'analyze',
|
|
121
|
-
executor: inferExecutor(group),
|
|
122
|
-
priority: calculatePriority(group)
|
|
171
|
+
priority: calculatePriority(group) // 1-5 (1=highest)
|
|
123
172
|
}))
|
|
124
173
|
}
|
|
125
174
|
```
|
|
@@ -139,57 +188,34 @@ ccw issue bind <issue-id> --solution /tmp/sol.json
|
|
|
139
188
|
|
|
140
189
|
---
|
|
141
190
|
|
|
142
|
-
## 2. Output
|
|
191
|
+
## 2. Output Requirements
|
|
143
192
|
|
|
144
|
-
### 2.1
|
|
193
|
+
### 2.1 Generate Files (Primary)
|
|
145
194
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"pending_selection": [{ "issue_id": "...", "solutions": [{ "id": "...", "description": "...", "task_count": N }] }],
|
|
150
|
-
"conflicts": [{ "file": "...", "issues": [...] }]
|
|
151
|
-
}
|
|
195
|
+
**Solution file per issue**:
|
|
196
|
+
```
|
|
197
|
+
.workflow/issues/solutions/{issue-id}.jsonl
|
|
152
198
|
```
|
|
153
199
|
|
|
154
|
-
|
|
200
|
+
Each line is a solution JSON containing tasks. Schema: `cat .claude/workflows/cli-templates/schemas/solution-schema.json`
|
|
201
|
+
|
|
202
|
+
### 2.2 Binding
|
|
155
203
|
|
|
156
204
|
| Scenario | Action |
|
|
157
205
|
|----------|--------|
|
|
158
|
-
| Single solution |
|
|
159
|
-
| Multiple solutions | Register only, return for
|
|
160
|
-
|
|
161
|
-
### 2.3 Task Schema
|
|
206
|
+
| Single solution | `ccw issue bind <id> --solution <file>` (auto) |
|
|
207
|
+
| Multiple solutions | Register only, return for selection |
|
|
162
208
|
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
cat .claude/workflows/cli-templates/schemas/issue-task-jsonl-schema.json
|
|
166
|
-
```
|
|
209
|
+
### 2.3 Return Summary
|
|
167
210
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
- `delivery_criteria`: Checklist items defining completion
|
|
175
|
-
- `status`: pending | ready | in_progress | completed | failed | paused | skipped
|
|
176
|
-
- `current_phase`: analyze | implement | test | optimize | commit | done
|
|
177
|
-
- `executor`: agent | codex | gemini | auto
|
|
178
|
-
|
|
179
|
-
**Optional Fields**:
|
|
180
|
-
- `file_context`: Relevant files/globs
|
|
181
|
-
- `pause_criteria`: Conditions to halt execution
|
|
182
|
-
- `priority`: 1-5 (1=highest)
|
|
183
|
-
- `phase_results`: Results from each execution phase
|
|
184
|
-
|
|
185
|
-
### 2.4 Solution File Structure
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
.workflow/issues/solutions/{issue-id}.jsonl
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"bound": [{ "issue_id": "...", "solution_id": "...", "task_count": N }],
|
|
214
|
+
"pending_selection": [{ "issue_id": "...", "solutions": [{ "id": "SOL-001", "description": "...", "task_count": N }] }],
|
|
215
|
+
"conflicts": [{ "file": "...", "issues": [...] }]
|
|
216
|
+
}
|
|
189
217
|
```
|
|
190
218
|
|
|
191
|
-
Each line is a complete solution JSON.
|
|
192
|
-
|
|
193
219
|
---
|
|
194
220
|
|
|
195
221
|
## 3. Quality Standards
|
|
@@ -215,12 +241,14 @@ Each line is a complete solution JSON.
|
|
|
215
241
|
### 3.3 Guidelines
|
|
216
242
|
|
|
217
243
|
**ALWAYS**:
|
|
218
|
-
1. Read schema first: `cat .claude/workflows/cli-templates/schemas/
|
|
244
|
+
1. Read schema first: `cat .claude/workflows/cli-templates/schemas/solution-schema.json`
|
|
219
245
|
2. Use ACE semantic search as PRIMARY exploration tool
|
|
220
246
|
3. Fetch issue details via `ccw issue status <id> --json`
|
|
221
|
-
4. Quantify
|
|
247
|
+
4. Quantify acceptance.criteria with testable conditions
|
|
222
248
|
5. Validate DAG before output
|
|
223
|
-
6.
|
|
249
|
+
6. Evaluate each solution with `analysis` and `score`
|
|
250
|
+
7. Single solution → auto-bind; Multiple → return `pending_selection`
|
|
251
|
+
8. For HIGH complexity: generate 2-3 candidate solutions
|
|
224
252
|
|
|
225
253
|
**NEVER**:
|
|
226
254
|
1. Execute implementation (return plan only)
|
|
@@ -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
|
-
issue_id: string, // e.g., "
|
|
40
|
-
solution_id: string, // e.g., "SOL-001"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
type: string,
|
|
45
|
-
file_context: string[],
|
|
46
|
-
depends_on: string[]
|
|
47
|
-
}
|
|
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
|
|
48
44
|
}],
|
|
49
45
|
project_root?: string,
|
|
50
46
|
rebuild?: boolean
|
|
51
47
|
}
|
|
52
48
|
```
|
|
53
49
|
|
|
50
|
+
**Note**: Agent generates unique `item_id` (pattern: `S-{N}`) for queue output.
|
|
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,28 +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
|
-
|
|
80
|
-
graph.set(key, { ...item, key, inDegree: 0, outEdges: [] })
|
|
76
|
+
for (const sol of solutions) {
|
|
77
|
+
graph.set(sol.solution_id, { ...sol, inDegree: 0, outEdges: [] })
|
|
81
78
|
|
|
82
|
-
for (const file of
|
|
79
|
+
for (const file of sol.files_touched || []) {
|
|
83
80
|
if (!fileModifications.has(file)) fileModifications.set(file, [])
|
|
84
|
-
fileModifications.get(file).push(
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Add dependency edges
|
|
89
|
-
for (const [key, node] of graph) {
|
|
90
|
-
for (const dep of node.task.depends_on || []) {
|
|
91
|
-
const depKey = `${node.issue_id}:${dep}`
|
|
92
|
-
if (graph.has(depKey)) {
|
|
93
|
-
graph.get(depKey).outEdges.push(key)
|
|
94
|
-
node.inDegree++
|
|
95
|
-
}
|
|
81
|
+
fileModifications.get(file).push(sol.solution_id)
|
|
96
82
|
}
|
|
97
83
|
}
|
|
98
84
|
|
|
@@ -102,15 +88,15 @@ function buildDependencyGraph(tasks) {
|
|
|
102
88
|
|
|
103
89
|
### 2.2 Conflict Detection
|
|
104
90
|
|
|
105
|
-
Conflict when multiple
|
|
91
|
+
Conflict when multiple solutions modify same file:
|
|
106
92
|
```javascript
|
|
107
93
|
function detectConflicts(fileModifications, graph) {
|
|
108
94
|
return [...fileModifications.entries()]
|
|
109
|
-
.filter(([_,
|
|
110
|
-
.map(([file,
|
|
95
|
+
.filter(([_, solutions]) => solutions.length > 1)
|
|
96
|
+
.map(([file, solutions]) => ({
|
|
111
97
|
type: 'file_conflict',
|
|
112
98
|
file,
|
|
113
|
-
|
|
99
|
+
solutions,
|
|
114
100
|
resolved: false
|
|
115
101
|
}))
|
|
116
102
|
}
|
|
@@ -120,75 +106,99 @@ function detectConflicts(fileModifications, graph) {
|
|
|
120
106
|
|
|
121
107
|
| Priority | Rule | Example |
|
|
122
108
|
|----------|------|---------|
|
|
123
|
-
| 1 |
|
|
124
|
-
| 2 | Foundation
|
|
125
|
-
| 3 |
|
|
126
|
-
| 4 |
|
|
127
|
-
| 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 |
|
|
128
113
|
|
|
129
114
|
### 2.4 Semantic Priority
|
|
130
115
|
|
|
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 |
|
|
123
|
+
|
|
124
|
+
**Task-count Boost** (applied to base score):
|
|
131
125
|
| Factor | Boost |
|
|
132
126
|
|--------|-------|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
| Implement action | +0.1 |
|
|
136
|
-
| Fix action | +0.05 |
|
|
127
|
+
| task_count >= 5 | +0.1 |
|
|
128
|
+
| task_count >= 3 | +0.05 |
|
|
137
129
|
| Foundation scope | +0.1 |
|
|
138
|
-
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| Delete action | -0.15 |
|
|
130
|
+
| Fewer dependencies | +0.05 |
|
|
131
|
+
|
|
132
|
+
**Formula**: `semantic_priority = clamp(baseScore + sum(boosts), 0.0, 1.0)`
|
|
142
133
|
|
|
143
134
|
### 2.5 Group Assignment
|
|
144
135
|
|
|
145
|
-
- **Parallel (P*)**:
|
|
146
|
-
- **Sequential (S*)**:
|
|
136
|
+
- **Parallel (P*)**: Solutions with no file overlaps between them
|
|
137
|
+
- **Sequential (S*)**: Solutions that share files must run in order
|
|
147
138
|
|
|
148
139
|
---
|
|
149
140
|
|
|
150
|
-
## 3. Output
|
|
141
|
+
## 3. Output Requirements
|
|
151
142
|
|
|
152
|
-
### 3.1
|
|
143
|
+
### 3.1 Generate Files (Primary)
|
|
153
144
|
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
|
|
145
|
+
**Queue files**:
|
|
146
|
+
```
|
|
147
|
+
.workflow/issues/queues/{queue-id}.json # Full queue with solutions, conflicts, groups
|
|
148
|
+
.workflow/issues/queues/index.json # Update with new queue entry
|
|
157
149
|
```
|
|
158
150
|
|
|
159
|
-
|
|
151
|
+
Queue ID format: `QUE-YYYYMMDD-HHMMSS` (UTC timestamp)
|
|
152
|
+
Queue Item ID format: `S-N` (S-1, S-2, S-3, ...)
|
|
153
|
+
|
|
154
|
+
### 3.2 Queue File Schema
|
|
160
155
|
|
|
161
156
|
```json
|
|
162
157
|
{
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"rationale": "TASK-001 creates file before TASK-002 updates",
|
|
180
|
-
"resolved": true
|
|
181
|
-
}],
|
|
182
|
-
"execution_groups": [
|
|
183
|
-
{ "id": "P1", "type": "parallel", "task_count": 3, "tasks": ["T-1", "T-2", "T-3"] },
|
|
184
|
-
{ "id": "S2", "type": "sequential", "task_count": 2, "tasks": ["T-4", "T-5"] }
|
|
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
|
+
}
|
|
185
174
|
],
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
+
```
|
|
191
|
+
|
|
192
|
+
### 3.3 Return Summary
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"queue_id": "QUE-20251227-143000",
|
|
197
|
+
"total_solutions": N,
|
|
198
|
+
"total_tasks": N,
|
|
199
|
+
"execution_groups": [{ "id": "P1", "type": "parallel", "count": N }],
|
|
200
|
+
"conflicts_resolved": N,
|
|
201
|
+
"issues_queued": ["ISS-xxx", "ISS-yyy"]
|
|
192
202
|
}
|
|
193
203
|
```
|
|
194
204
|
|
|
@@ -198,11 +208,11 @@ cat .claude/workflows/cli-templates/schemas/queue-schema.json
|
|
|
198
208
|
|
|
199
209
|
### 4.1 Validation Checklist
|
|
200
210
|
|
|
201
|
-
- [ ] No circular dependencies
|
|
202
|
-
- [ ] 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
|
|
203
215
|
- [ ] Dependencies ordered correctly
|
|
204
|
-
- [ ] Parallel groups have no conflicts
|
|
205
|
-
- [ ] Semantic priority calculated
|
|
206
216
|
|
|
207
217
|
### 4.2 Error Handling
|
|
208
218
|
|
|
@@ -210,26 +220,28 @@ cat .claude/workflows/cli-templates/schemas/queue-schema.json
|
|
|
210
220
|
|----------|--------|
|
|
211
221
|
| Circular dependency | Abort, report cycles |
|
|
212
222
|
| Resolution creates cycle | Flag for manual resolution |
|
|
213
|
-
| Missing
|
|
214
|
-
| Empty
|
|
223
|
+
| Missing solution reference | Skip and warn |
|
|
224
|
+
| Empty solution list | Return empty queue |
|
|
215
225
|
|
|
216
226
|
### 4.3 Guidelines
|
|
217
227
|
|
|
218
228
|
**ALWAYS**:
|
|
219
229
|
1. Build dependency graph before ordering
|
|
220
|
-
2. Detect
|
|
230
|
+
2. Detect file overlaps between solutions
|
|
221
231
|
3. Apply resolution rules consistently
|
|
222
|
-
4. Calculate semantic priority for all
|
|
232
|
+
4. Calculate semantic priority for all solutions
|
|
223
233
|
5. Include rationale for conflict resolutions
|
|
224
234
|
6. Validate ordering before output
|
|
225
235
|
|
|
226
236
|
**NEVER**:
|
|
227
|
-
1. Execute
|
|
237
|
+
1. Execute solutions (ordering only)
|
|
228
238
|
2. Ignore circular dependencies
|
|
229
239
|
3. Skip conflict detection
|
|
230
240
|
4. Output invalid DAG
|
|
231
|
-
5. Merge conflicting
|
|
241
|
+
5. Merge conflicting solutions in parallel group
|
|
242
|
+
6. Split tasks from their solution
|
|
232
243
|
|
|
233
244
|
**OUTPUT**:
|
|
234
|
-
1. Write queue
|
|
235
|
-
2.
|
|
245
|
+
1. Write `.workflow/issues/queues/{queue-id}.json`
|
|
246
|
+
2. Update `.workflow/issues/queues/index.json`
|
|
247
|
+
3. Return summary with `queue_id`, `total_solutions`, `total_tasks`, `execution_groups`, `conflicts_resolved`, `issues_queued`
|