claude-code-workflow 6.3.9 → 6.3.11
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 +21 -15
- package/.claude/agents/issue-queue-agent.md +114 -87
- package/.claude/commands/issue/discover.md +427 -0
- package/.claude/commands/issue/execute.md +195 -363
- package/.claude/commands/issue/new.md +13 -1
- package/.claude/commands/issue/plan.md +55 -32
- package/.claude/commands/issue/queue.md +145 -71
- 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/skills/software-manual/SKILL.md +184 -0
- package/.claude/skills/software-manual/phases/01-requirements-discovery.md +162 -0
- package/.claude/skills/software-manual/phases/02-project-exploration.md +101 -0
- package/.claude/skills/software-manual/phases/02.5-api-extraction.md +161 -0
- package/.claude/skills/software-manual/phases/03-parallel-analysis.md +183 -0
- package/.claude/skills/software-manual/phases/03.5-consolidation.md +82 -0
- package/.claude/skills/software-manual/phases/04-screenshot-capture.md +89 -0
- package/.claude/skills/software-manual/phases/05-html-assembly.md +132 -0
- package/.claude/skills/software-manual/phases/06-iterative-refinement.md +259 -0
- package/.claude/skills/software-manual/scripts/api-extractor.md +245 -0
- package/.claude/skills/software-manual/scripts/bundle-libraries.md +85 -0
- package/.claude/skills/software-manual/scripts/extract_apis.py +270 -0
- package/.claude/skills/software-manual/scripts/screenshot-helper.md +447 -0
- package/.claude/skills/software-manual/scripts/swagger-runner.md +419 -0
- package/.claude/skills/software-manual/scripts/typedoc-runner.md +357 -0
- package/.claude/skills/software-manual/specs/html-template.md +325 -0
- package/.claude/skills/software-manual/specs/quality-standards.md +253 -0
- package/.claude/skills/software-manual/specs/writing-style.md +298 -0
- package/.claude/skills/software-manual/templates/css/wiki-base.css +788 -0
- package/.claude/skills/software-manual/templates/css/wiki-dark.css +278 -0
- package/.claude/skills/software-manual/templates/tiddlywiki-shell.html +327 -0
- package/.claude/workflows/cli-templates/schemas/discovery-finding-schema.json +219 -0
- package/.claude/workflows/cli-templates/schemas/discovery-state-schema.json +125 -0
- package/.claude/workflows/cli-templates/schemas/issues-jsonl-schema.json +168 -74
- 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/.codex/prompts/issue-execute.md +174 -84
- package/.codex/prompts/issue-plan.md +106 -0
- package/.codex/prompts/issue-queue.md +225 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +1 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +443 -123
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
- package/ccw/dist/core/dashboard-generator.js +4 -1
- package/ccw/dist/core/dashboard-generator.js.map +1 -1
- package/ccw/dist/core/data-aggregator.d.ts +32 -0
- package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
- package/ccw/dist/core/data-aggregator.js +55 -11
- package/ccw/dist/core/data-aggregator.js.map +1 -1
- package/ccw/dist/core/routes/discovery-routes.d.ts +37 -0
- package/ccw/dist/core/routes/discovery-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/discovery-routes.js +514 -0
- package/ccw/dist/core/routes/discovery-routes.js.map +1 -0
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +9 -1
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/tools/codex-lens.d.ts +12 -1
- package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens.js +56 -7
- package/ccw/dist/tools/codex-lens.js.map +1 -1
- package/ccw/src/cli.ts +1 -0
- package/ccw/src/commands/issue.ts +498 -158
- package/ccw/src/core/dashboard-generator.ts +4 -1
- package/ccw/src/core/data-aggregator.ts +94 -11
- package/ccw/src/core/routes/discovery-routes.ts +607 -0
- package/ccw/src/core/server.ts +9 -1
- package/ccw/src/templates/dashboard-css/34-discovery.css +783 -0
- package/ccw/src/templates/dashboard-js/components/cli-status.js +1 -78
- package/ccw/src/templates/dashboard-js/components/navigation.js +8 -0
- package/ccw/src/templates/dashboard-js/i18n.js +140 -4
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +0 -18
- package/ccw/src/templates/dashboard-js/views/codexlens-manager.js +13 -3
- package/ccw/src/templates/dashboard-js/views/issue-discovery.js +730 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +57 -26
- package/ccw/src/templates/dashboard-js/views/project-overview.js +153 -0
- package/ccw/src/templates/dashboard.html +5 -0
- package/ccw/src/tools/codex-lens.ts +75 -9
- package/package.json +1 -1
- package/.claude/workflows/context-tools-ace.md +0 -105
|
@@ -1,104 +1,163 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Execute issue queue
|
|
3
|
-
argument-hint: "
|
|
2
|
+
description: Execute all solutions from issue queue with git commit after each task
|
|
3
|
+
argument-hint: ""
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Issue Execute (Codex Version)
|
|
7
7
|
|
|
8
8
|
## Core Principle
|
|
9
9
|
|
|
10
|
-
**Serial Execution**: Execute
|
|
10
|
+
**Serial Execution**: Execute solutions ONE BY ONE from the issue queue via `ccw issue next`. For each solution, complete all tasks sequentially (implement → test → commit per task). Continue autonomously until queue is empty.
|
|
11
11
|
|
|
12
12
|
## Execution Flow
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
INIT: Fetch first
|
|
16
|
-
|
|
17
|
-
WHILE
|
|
18
|
-
1. Receive
|
|
19
|
-
2. Execute
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
INIT: Fetch first solution via ccw issue next
|
|
16
|
+
|
|
17
|
+
WHILE solution exists:
|
|
18
|
+
1. Receive solution JSON from ccw issue next
|
|
19
|
+
2. Execute all tasks in solution.tasks sequentially:
|
|
20
|
+
FOR each task:
|
|
21
|
+
- IMPLEMENT: Follow task.implementation steps
|
|
22
|
+
- TEST: Run task.test commands
|
|
23
|
+
- VERIFY: Check task.acceptance criteria
|
|
24
|
+
- COMMIT: Stage files, commit with task.commit.message_template
|
|
25
|
+
3. Report completion via ccw issue done <item_id>
|
|
26
|
+
4. Fetch next solution via ccw issue next
|
|
26
27
|
|
|
27
28
|
WHEN queue empty:
|
|
28
29
|
Output final summary
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
## Step 1: Fetch First
|
|
32
|
+
## Step 1: Fetch First Solution
|
|
32
33
|
|
|
33
|
-
Run this command to get your first
|
|
34
|
+
Run this command to get your first solution:
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
37
|
ccw issue next
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
This returns JSON with the full
|
|
40
|
-
- `item_id`:
|
|
41
|
-
- `issue_id`: Parent issue ID (e.g., "
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
40
|
+
This returns JSON with the full solution definition:
|
|
41
|
+
- `item_id`: Solution identifier in queue (e.g., "S-1")
|
|
42
|
+
- `issue_id`: Parent issue ID (e.g., "ISS-20251227-001")
|
|
43
|
+
- `solution_id`: Solution ID (e.g., "SOL-20251227-001")
|
|
44
|
+
- `solution`: Full solution with all tasks
|
|
44
45
|
- `execution_hints`: Timing and executor hints
|
|
45
46
|
|
|
46
|
-
If response contains `{ "status": "empty" }`, all
|
|
47
|
+
If response contains `{ "status": "empty" }`, all solutions are complete - skip to final summary.
|
|
47
48
|
|
|
48
|
-
## Step 2: Parse
|
|
49
|
+
## Step 2: Parse Solution Response
|
|
49
50
|
|
|
50
|
-
Expected
|
|
51
|
+
Expected solution structure:
|
|
51
52
|
|
|
52
53
|
```json
|
|
53
54
|
{
|
|
54
|
-
"item_id": "
|
|
55
|
-
"issue_id": "
|
|
56
|
-
"solution_id": "SOL-001",
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
"item_id": "S-1",
|
|
56
|
+
"issue_id": "ISS-20251227-001",
|
|
57
|
+
"solution_id": "SOL-20251227-001",
|
|
58
|
+
"status": "pending",
|
|
59
|
+
"solution": {
|
|
60
|
+
"id": "SOL-20251227-001",
|
|
61
|
+
"description": "Description of solution approach",
|
|
62
|
+
"tasks": [
|
|
63
|
+
{
|
|
64
|
+
"id": "T1",
|
|
65
|
+
"title": "Task title",
|
|
66
|
+
"scope": "src/module/",
|
|
67
|
+
"action": "Create|Modify|Fix|Refactor|Add",
|
|
68
|
+
"description": "What to do",
|
|
69
|
+
"modification_points": [
|
|
70
|
+
{ "file": "path/to/file.ts", "target": "function name", "change": "description" }
|
|
71
|
+
],
|
|
72
|
+
"implementation": [
|
|
73
|
+
"Step 1: Do this",
|
|
74
|
+
"Step 2: Do that"
|
|
75
|
+
],
|
|
76
|
+
"test": {
|
|
77
|
+
"commands": ["npm test -- --filter=xxx"],
|
|
78
|
+
"unit": ["Unit test requirement 1", "Unit test requirement 2"]
|
|
79
|
+
},
|
|
80
|
+
"regression": ["Verify existing tests still pass"],
|
|
81
|
+
"acceptance": {
|
|
82
|
+
"criteria": ["Criterion 1: Must pass", "Criterion 2: Must verify"],
|
|
83
|
+
"verification": ["Run test command", "Manual verification step"]
|
|
84
|
+
},
|
|
85
|
+
"commit": {
|
|
86
|
+
"type": "feat|fix|test|refactor",
|
|
87
|
+
"scope": "module",
|
|
88
|
+
"message_template": "feat(scope): description"
|
|
89
|
+
},
|
|
90
|
+
"depends_on": [],
|
|
91
|
+
"estimated_minutes": 30,
|
|
92
|
+
"priority": 1
|
|
93
|
+
}
|
|
65
94
|
],
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
"test": {
|
|
71
|
-
"commands": ["npm test -- --filter=xxx"],
|
|
72
|
-
"unit": "Unit test requirements",
|
|
73
|
-
"integration": "Integration test requirements (optional)"
|
|
95
|
+
"exploration_context": {
|
|
96
|
+
"relevant_files": ["path/to/reference.ts"],
|
|
97
|
+
"patterns": "Follow existing pattern in xxx",
|
|
98
|
+
"integration_points": "Used by other modules"
|
|
74
99
|
},
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
"analysis": {
|
|
101
|
+
"risk": "low|medium|high",
|
|
102
|
+
"impact": "low|medium|high",
|
|
103
|
+
"complexity": "low|medium|high"
|
|
104
|
+
},
|
|
105
|
+
"score": 0.95,
|
|
106
|
+
"is_bound": true
|
|
82
107
|
},
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
108
|
+
"execution_hints": {
|
|
109
|
+
"executor": "codex",
|
|
110
|
+
"estimated_minutes": 180
|
|
86
111
|
}
|
|
87
112
|
}
|
|
88
113
|
```
|
|
89
114
|
|
|
90
|
-
## Step
|
|
115
|
+
## Step 2.5: Initialize Todo Tracking
|
|
116
|
+
|
|
117
|
+
After parsing solution, create todo list to track each task:
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// Create todos for all tasks in current solution
|
|
121
|
+
TodoWrite({
|
|
122
|
+
todos: solution.tasks.map(task => ({
|
|
123
|
+
content: `${task.id}: ${task.title}`,
|
|
124
|
+
activeForm: `Executing ${task.id}: ${task.title}`,
|
|
125
|
+
status: "pending"
|
|
126
|
+
}))
|
|
127
|
+
})
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Step 3: Execute Tasks Sequentially
|
|
131
|
+
|
|
132
|
+
Iterate through `solution.tasks` array and execute each task.
|
|
133
|
+
|
|
134
|
+
**Before starting each task**, mark it as in_progress:
|
|
135
|
+
```javascript
|
|
136
|
+
// Update current task status to in_progress
|
|
137
|
+
TodoWrite({ todos: [...existingTodos.map(t =>
|
|
138
|
+
t.content.startsWith(currentTask.id) ? {...t, status: "in_progress"} : t
|
|
139
|
+
)] })
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**After completing each task** (commit done), mark it as completed:
|
|
143
|
+
```javascript
|
|
144
|
+
// Update completed task status
|
|
145
|
+
TodoWrite({ todos: [...existingTodos.map(t =>
|
|
146
|
+
t.content.startsWith(completedTask.id) ? {...t, status: "completed"} : t
|
|
147
|
+
)] })
|
|
148
|
+
```
|
|
91
149
|
|
|
92
150
|
### Phase A: IMPLEMENT
|
|
93
151
|
|
|
94
|
-
1. Read all `
|
|
152
|
+
1. Read all `solution.exploration_context.relevant_files` to understand existing patterns
|
|
95
153
|
2. Follow `task.implementation` steps in order
|
|
96
154
|
3. Apply changes to `task.modification_points` files
|
|
97
|
-
4. Follow `
|
|
155
|
+
4. Follow `solution.exploration_context.patterns` for code style consistency
|
|
156
|
+
5. Run `task.regression` checks if specified to ensure no breakage
|
|
98
157
|
|
|
99
158
|
**Output format:**
|
|
100
159
|
```
|
|
101
|
-
## Implementing: [task.title]
|
|
160
|
+
## Implementing: [task.title] (Task [N]/[Total])
|
|
102
161
|
|
|
103
162
|
**Scope**: [task.scope]
|
|
104
163
|
**Action**: [task.action]
|
|
@@ -132,7 +191,7 @@ Expected task structure:
|
|
|
132
191
|
|
|
133
192
|
### Phase C: VERIFY
|
|
134
193
|
|
|
135
|
-
Check all `task.acceptance`
|
|
194
|
+
Check all `task.acceptance.criteria` are met using `task.acceptance.verification` steps:
|
|
136
195
|
|
|
137
196
|
```
|
|
138
197
|
## Verifying: [task.title]
|
|
@@ -142,6 +201,10 @@ Check all `task.acceptance` criteria are met:
|
|
|
142
201
|
- [x] Criterion 2: Verified
|
|
143
202
|
...
|
|
144
203
|
|
|
204
|
+
**Verification Steps**:
|
|
205
|
+
- [x] Run test command
|
|
206
|
+
- [x] Manual verification step
|
|
207
|
+
|
|
145
208
|
All criteria met: YES
|
|
146
209
|
```
|
|
147
210
|
|
|
@@ -149,7 +212,7 @@ All criteria met: YES
|
|
|
149
212
|
|
|
150
213
|
### Phase D: COMMIT
|
|
151
214
|
|
|
152
|
-
After all phases pass, commit the changes:
|
|
215
|
+
After all phases pass, commit the changes for this task:
|
|
153
216
|
|
|
154
217
|
```bash
|
|
155
218
|
# Stage all modified files
|
|
@@ -159,7 +222,7 @@ git add path/to/file1.ts path/to/file2.ts ...
|
|
|
159
222
|
git commit -m "$(cat <<'EOF'
|
|
160
223
|
[task.commit.message_template]
|
|
161
224
|
|
|
162
|
-
|
|
225
|
+
Solution-ID: [solution_id]
|
|
163
226
|
Issue-ID: [issue_id]
|
|
164
227
|
Task-ID: [task.id]
|
|
165
228
|
EOF
|
|
@@ -175,30 +238,44 @@ EOF
|
|
|
175
238
|
**Files**: N files changed
|
|
176
239
|
```
|
|
177
240
|
|
|
241
|
+
### Repeat for Next Task
|
|
242
|
+
|
|
243
|
+
Continue to next task in `solution.tasks` array until all tasks are complete.
|
|
244
|
+
|
|
178
245
|
## Step 4: Report Completion
|
|
179
246
|
|
|
180
|
-
After
|
|
247
|
+
After ALL tasks in the solution are complete, report to queue system:
|
|
181
248
|
|
|
182
249
|
```bash
|
|
183
|
-
ccw issue
|
|
250
|
+
ccw issue done <item_id> --result '{
|
|
184
251
|
"files_modified": ["path1", "path2"],
|
|
185
252
|
"tests_passed": true,
|
|
186
253
|
"acceptance_passed": true,
|
|
187
254
|
"committed": true,
|
|
188
|
-
"
|
|
255
|
+
"commits": [
|
|
256
|
+
{ "task_id": "T1", "hash": "abc123" },
|
|
257
|
+
{ "task_id": "T2", "hash": "def456" }
|
|
258
|
+
],
|
|
189
259
|
"summary": "[What was accomplished]"
|
|
190
260
|
}'
|
|
191
261
|
```
|
|
192
262
|
|
|
193
|
-
**If
|
|
263
|
+
**If solution failed and cannot be fixed:**
|
|
194
264
|
|
|
195
265
|
```bash
|
|
196
|
-
ccw issue
|
|
266
|
+
ccw issue done <item_id> --fail --reason "Task [task.id] failed: [details]"
|
|
197
267
|
```
|
|
198
268
|
|
|
199
|
-
## Step 5: Continue to Next
|
|
269
|
+
## Step 5: Continue to Next Solution
|
|
270
|
+
|
|
271
|
+
Clear current todo list and fetch next solution:
|
|
200
272
|
|
|
201
|
-
|
|
273
|
+
```javascript
|
|
274
|
+
// Reset todos for next solution
|
|
275
|
+
TodoWrite({ todos: [] })
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Then fetch next solution:
|
|
202
279
|
|
|
203
280
|
```bash
|
|
204
281
|
ccw issue next
|
|
@@ -206,8 +283,8 @@ ccw issue next
|
|
|
206
283
|
|
|
207
284
|
**Output progress:**
|
|
208
285
|
```
|
|
209
|
-
✓ [N/M] Completed: [item_id] - [
|
|
210
|
-
→ Fetching next
|
|
286
|
+
✓ [N/M] Completed: [item_id] - [solution.approach]
|
|
287
|
+
→ Fetching next solution...
|
|
211
288
|
```
|
|
212
289
|
|
|
213
290
|
**DO NOT STOP.** Return to Step 2 and continue until queue is empty.
|
|
@@ -219,12 +296,15 @@ When `ccw issue next` returns `{ "status": "empty" }`:
|
|
|
219
296
|
```markdown
|
|
220
297
|
## Issue Queue Execution Complete
|
|
221
298
|
|
|
222
|
-
**Total
|
|
299
|
+
**Total Solutions Executed**: N
|
|
300
|
+
**Total Tasks Executed**: M
|
|
301
|
+
|
|
223
302
|
**All Commits**:
|
|
224
|
-
| # |
|
|
225
|
-
|
|
226
|
-
| 1 |
|
|
227
|
-
| 2 |
|
|
303
|
+
| # | Solution | Task | Commit |
|
|
304
|
+
|---|----------|------|--------|
|
|
305
|
+
| 1 | S-1 | T1 | abc123 |
|
|
306
|
+
| 2 | S-1 | T2 | def456 |
|
|
307
|
+
| 3 | S-2 | T1 | ghi789 |
|
|
228
308
|
|
|
229
309
|
**Files Modified**:
|
|
230
310
|
- path/to/file1.ts
|
|
@@ -237,23 +317,33 @@ When `ccw issue next` returns `{ "status": "empty" }`:
|
|
|
237
317
|
## Execution Rules
|
|
238
318
|
|
|
239
319
|
1. **Never stop mid-queue** - Continue until queue is empty
|
|
240
|
-
2. **One
|
|
241
|
-
3. **
|
|
242
|
-
4. **
|
|
243
|
-
5. **
|
|
244
|
-
6. **
|
|
245
|
-
7. **
|
|
320
|
+
2. **One solution at a time** - Fully complete (all tasks + report) before moving on
|
|
321
|
+
3. **Sequential within solution** - Complete each task (including commit) before next
|
|
322
|
+
4. **Tests MUST pass** - Do not proceed to commit if tests fail
|
|
323
|
+
5. **Commit after each task** - Each task gets its own commit
|
|
324
|
+
6. **Self-verify** - All acceptance criteria must pass before commit
|
|
325
|
+
7. **Report accurately** - Use `ccw issue done` after each solution
|
|
326
|
+
8. **Handle failures gracefully** - If a solution fails, report via `ccw issue done --fail` and continue to next
|
|
327
|
+
9. **Track with todos** - Use TodoWrite to track task progress within each solution
|
|
246
328
|
|
|
247
329
|
## Error Handling
|
|
248
330
|
|
|
249
331
|
| Situation | Action |
|
|
250
332
|
|-----------|--------|
|
|
251
|
-
| ccw issue next returns empty | All done - output final summary |
|
|
333
|
+
| `ccw issue next` returns empty | All done - output final summary |
|
|
252
334
|
| Tests fail | Fix code, re-run tests |
|
|
253
335
|
| Verification fails | Go back to implement phase |
|
|
254
336
|
| Git commit fails | Check staging, retry commit |
|
|
255
|
-
| ccw issue
|
|
256
|
-
| Unrecoverable error | Call ccw issue fail
|
|
337
|
+
| `ccw issue done` fails | Log error, continue to next solution |
|
|
338
|
+
| Unrecoverable error | Call `ccw issue done --fail`, continue to next |
|
|
339
|
+
|
|
340
|
+
## CLI Command Reference
|
|
341
|
+
|
|
342
|
+
| Command | Purpose |
|
|
343
|
+
|---------|---------|
|
|
344
|
+
| `ccw issue next` | Fetch next solution from queue |
|
|
345
|
+
| `ccw issue done <id>` | Mark solution complete with result |
|
|
346
|
+
| `ccw issue done <id> --fail` | Mark solution failed with reason |
|
|
257
347
|
|
|
258
348
|
## Start Execution
|
|
259
349
|
|
|
@@ -263,4 +353,4 @@ Begin by running:
|
|
|
263
353
|
ccw issue next
|
|
264
354
|
```
|
|
265
355
|
|
|
266
|
-
Then follow the lifecycle for each
|
|
356
|
+
Then follow the solution lifecycle for each solution until queue is empty.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan issue(s) into bound solutions (writes solutions JSONL via ccw issue bind)
|
|
3
|
+
argument-hint: "<issue-id>[,<issue-id>,...] [--all-pending] [--batch-size 3]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Issue Plan (Codex Version)
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
Create executable solution(s) for issue(s) and bind the selected solution to each issue using `ccw issue bind`.
|
|
11
|
+
|
|
12
|
+
This workflow is **planning + registration** (no implementation): it explores the codebase just enough to produce a high-quality task breakdown that can be executed later (e.g., by `issue-execute.md`).
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
- **Explicit issues**: comma-separated IDs, e.g. `ISS-123,ISS-124`
|
|
17
|
+
- **All pending**: `--all-pending` → plan all issues in `registered` status
|
|
18
|
+
- **Batch size**: `--batch-size N` (default `3`) → max issues per batch
|
|
19
|
+
|
|
20
|
+
## Output Requirements
|
|
21
|
+
|
|
22
|
+
For each issue:
|
|
23
|
+
- Register at least one solution and bind one solution to the issue (updates `.workflow/issues/issues.jsonl` and appends to `.workflow/issues/solutions/{issue-id}.jsonl`).
|
|
24
|
+
- Ensure tasks conform to `.claude/workflows/cli-templates/schemas/solution-schema.json`.
|
|
25
|
+
- Each task includes quantified `acceptance.criteria` and concrete `acceptance.verification`.
|
|
26
|
+
|
|
27
|
+
Return a final summary JSON:
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"bound": [{ "issue_id": "...", "solution_id": "...", "task_count": 0 }],
|
|
31
|
+
"pending_selection": [{ "issue_id": "...", "solutions": [{ "id": "...", "task_count": 0, "description": "..." }] }],
|
|
32
|
+
"conflicts": [{ "file": "...", "issues": ["..."] }]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
### Step 1: Resolve issue list
|
|
39
|
+
|
|
40
|
+
- If `--all-pending`:
|
|
41
|
+
- Run `ccw issue list --status registered --json` and plan all returned issues.
|
|
42
|
+
- Else:
|
|
43
|
+
- Parse IDs from user input (split by `,`), and ensure each issue exists:
|
|
44
|
+
- `ccw issue init <issue-id> --title "Issue <issue-id>"` (safe if already exists)
|
|
45
|
+
|
|
46
|
+
### Step 2: Load issue details
|
|
47
|
+
|
|
48
|
+
For each issue ID:
|
|
49
|
+
- `ccw issue status <issue-id> --json`
|
|
50
|
+
- Extract the issue title/context/labels and any discovery hints (affected files, snippets, etc. if present).
|
|
51
|
+
|
|
52
|
+
### Step 3: Minimal exploration (evidence-based)
|
|
53
|
+
|
|
54
|
+
- If issue context names specific files or symbols: open them first.
|
|
55
|
+
- Otherwise:
|
|
56
|
+
- Use `rg` to locate relevant code paths by keywords from the title/context.
|
|
57
|
+
- Read 3+ similar patterns before proposing refactors or API changes.
|
|
58
|
+
|
|
59
|
+
### Step 4: Draft solutions and tasks (schema-driven)
|
|
60
|
+
|
|
61
|
+
Default to **one** solution per issue unless there are genuinely different approaches.
|
|
62
|
+
|
|
63
|
+
Task rules (from schema):
|
|
64
|
+
- `id`: `T1`, `T2`, ...
|
|
65
|
+
- `action`: one of `Create|Update|Implement|Refactor|Add|Delete|Configure|Test|Fix`
|
|
66
|
+
- `implementation`: step-by-step, executable instructions
|
|
67
|
+
- `test.commands`: include at least one command per task when feasible
|
|
68
|
+
- `acceptance.criteria`: testable statements
|
|
69
|
+
- `acceptance.verification`: concrete steps/commands mapping to criteria
|
|
70
|
+
- Prefer small, independently testable tasks; encode dependencies in `depends_on`.
|
|
71
|
+
|
|
72
|
+
### Step 5: Register & bind solutions via CLI
|
|
73
|
+
|
|
74
|
+
Create an import JSON file per solution (NOT JSONL), then bind it:
|
|
75
|
+
|
|
76
|
+
1. Write a file (example path):
|
|
77
|
+
- `.workflow/issues/solutions/_imports/<issue-id>-<timestamp>.json`
|
|
78
|
+
2. File contents shape (minimum):
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"description": "High-level summary",
|
|
82
|
+
"approach": "Technical approach",
|
|
83
|
+
"tasks": []
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
3. Register+bind in one step:
|
|
87
|
+
- `ccw issue bind <issue-id> --solution <import-file>`
|
|
88
|
+
|
|
89
|
+
If you intentionally generated multiple solutions for the same issue:
|
|
90
|
+
- Register each via `ccw issue bind <issue-id> <solution-id> --solution <import-file>` (do NOT bind yet).
|
|
91
|
+
- Present the alternatives in `pending_selection` and stop for user choice.
|
|
92
|
+
- Bind chosen solution with: `ccw issue bind <issue-id> <solution-id>`.
|
|
93
|
+
|
|
94
|
+
### Step 6: Detect cross-issue file conflicts (best-effort)
|
|
95
|
+
|
|
96
|
+
Across the issues planned in this run:
|
|
97
|
+
- Build a set of touched files from each solution’s `modification_points.file` (and/or task `scope` when explicit files are missing).
|
|
98
|
+
- If the same file appears in multiple issues, add it to `conflicts` with all involved issue IDs.
|
|
99
|
+
- Recommend a safe execution order (sequential) when conflicts exist.
|
|
100
|
+
|
|
101
|
+
## Done Criteria
|
|
102
|
+
|
|
103
|
+
- A bound solution exists for each issue unless explicitly deferred for user selection.
|
|
104
|
+
- All tasks validate against the solution schema fields (especially acceptance criteria + verification).
|
|
105
|
+
- The final summary JSON matches the required shape.
|
|
106
|
+
|