claude-code-workflow 7.2.11 → 7.2.12
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/commands/workflow/analyze-with-file.md +108 -54
- package/.claude/commands/workflow-tune.md +811 -0
- package/.claude/skills/workflow-lite-execute/SKILL.md +106 -14
- package/.claude/skills/workflow-lite-plan/SKILL.md +34 -72
- package/.claude/skills/workflow-lite-test-review/SKILL.md +39 -26
- package/package.json +1 -1
- package/.claude/commands/ddd/auto.md +0 -359
- package/.claude/commands/ddd/doc-generate.md +0 -222
- package/.claude/commands/ddd/doc-refresh.md +0 -218
- package/.claude/commands/ddd/execute.md +0 -416
- package/.claude/commands/ddd/index-build.md +0 -212
- package/.claude/commands/ddd/plan.md +0 -611
- package/.claude/commands/ddd/scan.md +0 -365
- package/.claude/commands/ddd/sync.md +0 -353
- package/.claude/commands/ddd/update.md +0 -160
- package/.claude/commands/idaw/add.md +0 -287
- package/.claude/commands/idaw/resume.md +0 -442
- package/.claude/commands/idaw/run-coordinate.md +0 -648
- package/.claude/commands/idaw/run.md +0 -539
- package/.claude/commands/idaw/status.md +0 -182
- package/.claude/skills/workflow-tune/SKILL.md +0 -487
- package/.claude/skills/workflow-tune/phases/01-setup.md +0 -548
- package/.claude/skills/workflow-tune/phases/02-step-execute.md +0 -197
- package/.claude/skills/workflow-tune/phases/03-step-analyze.md +0 -386
- package/.claude/skills/workflow-tune/phases/04-synthesize.md +0 -257
- package/.claude/skills/workflow-tune/phases/05-optimize-report.md +0 -246
- package/.claude/skills/workflow-tune/specs/workflow-eval-criteria.md +0 -57
- package/.claude/skills/workflow-tune/templates/step-analysis-prompt.md +0 -88
- package/.claude/skills/workflow-tune/templates/synthesis-prompt.md +0 -90
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: add
|
|
3
|
-
description: Add IDAW tasks - manual creation or import from ccw issue
|
|
4
|
-
argument-hint: "[-y|--yes] [--from-issue <id>[,<id>,...]] \"description\" [--type <task_type>] [--priority <1-5>]"
|
|
5
|
-
allowed-tools: AskUserQuestion(*), Read(*), Bash(*), Write(*), Glob(*)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# IDAW Add Command (/idaw:add)
|
|
9
|
-
|
|
10
|
-
## Auto Mode
|
|
11
|
-
|
|
12
|
-
When `--yes` or `-y`: Skip clarification questions, create task with inferred details.
|
|
13
|
-
|
|
14
|
-
## IDAW Task Schema
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"id": "IDAW-001",
|
|
19
|
-
"title": "string",
|
|
20
|
-
"description": "string",
|
|
21
|
-
"status": "pending",
|
|
22
|
-
"priority": 2,
|
|
23
|
-
"task_type": null,
|
|
24
|
-
"skill_chain": null,
|
|
25
|
-
"context": {
|
|
26
|
-
"affected_files": [],
|
|
27
|
-
"acceptance_criteria": [],
|
|
28
|
-
"constraints": [],
|
|
29
|
-
"references": []
|
|
30
|
-
},
|
|
31
|
-
"source": {
|
|
32
|
-
"type": "manual|import-issue",
|
|
33
|
-
"issue_id": null,
|
|
34
|
-
"issue_snapshot": null
|
|
35
|
-
},
|
|
36
|
-
"execution": {
|
|
37
|
-
"session_id": null,
|
|
38
|
-
"started_at": null,
|
|
39
|
-
"completed_at": null,
|
|
40
|
-
"skill_results": [],
|
|
41
|
-
"git_commit": null,
|
|
42
|
-
"error": null
|
|
43
|
-
},
|
|
44
|
-
"created_at": "ISO",
|
|
45
|
-
"updated_at": "ISO"
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Valid task_type values**: `bugfix|bugfix-hotfix|feature|feature-complex|refactor|tdd|test|test-fix|review|docs`
|
|
50
|
-
|
|
51
|
-
## Implementation
|
|
52
|
-
|
|
53
|
-
### Phase 1: Parse Arguments
|
|
54
|
-
|
|
55
|
-
```javascript
|
|
56
|
-
const args = $ARGUMENTS;
|
|
57
|
-
const autoYes = /(-y|--yes)\b/.test(args);
|
|
58
|
-
const fromIssue = args.match(/--from-issue\s+([\w,-]+)/)?.[1];
|
|
59
|
-
const typeFlag = args.match(/--type\s+([\w-]+)/)?.[1];
|
|
60
|
-
const priorityFlag = args.match(/--priority\s+(\d)/)?.[1];
|
|
61
|
-
|
|
62
|
-
// Extract description: content inside quotes (preferred), or fallback to stripping flags
|
|
63
|
-
const quotedMatch = args.match(/(?:^|\s)["']([^"']+)["']/);
|
|
64
|
-
const description = quotedMatch
|
|
65
|
-
? quotedMatch[1].trim()
|
|
66
|
-
: args.replace(/(-y|--yes|--from-issue\s+[\w,-]+|--type\s+[\w-]+|--priority\s+\d)/g, '').trim();
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Phase 2: Route — Import or Manual
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
--from-issue present?
|
|
73
|
-
├─ YES → Import Mode (Phase 3A)
|
|
74
|
-
└─ NO → Manual Mode (Phase 3B)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Phase 3A: Import Mode (from ccw issue)
|
|
78
|
-
|
|
79
|
-
```javascript
|
|
80
|
-
const issueIds = fromIssue.split(',');
|
|
81
|
-
|
|
82
|
-
// Fetch all issues once (outside loop)
|
|
83
|
-
let issues = [];
|
|
84
|
-
try {
|
|
85
|
-
const issueJson = Bash(`ccw issue list --json`);
|
|
86
|
-
issues = JSON.parse(issueJson).issues || [];
|
|
87
|
-
} catch (e) {
|
|
88
|
-
console.log(`Error fetching CCW issues: ${e.message || e}`);
|
|
89
|
-
console.log('Ensure ccw is installed and issues exist. Use /issue:new to create issues first.');
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (const issueId of issueIds) {
|
|
94
|
-
// 1. Find issue data
|
|
95
|
-
const issue = issues.find(i => i.id === issueId.trim());
|
|
96
|
-
if (!issue) {
|
|
97
|
-
console.log(`Warning: Issue ${issueId} not found, skipping`);
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// 2. Check duplicate (same issue_id already imported)
|
|
102
|
-
const existing = Glob('.workflow/.idaw/tasks/IDAW-*.json');
|
|
103
|
-
for (const f of existing) {
|
|
104
|
-
const data = JSON.parse(Read(f));
|
|
105
|
-
if (data.source?.issue_id === issueId.trim()) {
|
|
106
|
-
console.log(`Warning: Issue ${issueId} already imported as ${data.id}, skipping`);
|
|
107
|
-
continue; // skip to next issue
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// 3. Generate next IDAW ID
|
|
112
|
-
const nextId = generateNextId();
|
|
113
|
-
|
|
114
|
-
// 4. Map issue → IDAW task
|
|
115
|
-
const task = {
|
|
116
|
-
id: nextId,
|
|
117
|
-
title: issue.title,
|
|
118
|
-
description: issue.context || issue.title,
|
|
119
|
-
status: 'pending',
|
|
120
|
-
priority: parseInt(priorityFlag) || issue.priority || 3,
|
|
121
|
-
task_type: typeFlag || inferTaskType(issue.title, issue.context || ''),
|
|
122
|
-
skill_chain: null,
|
|
123
|
-
context: {
|
|
124
|
-
affected_files: issue.affected_components || [],
|
|
125
|
-
acceptance_criteria: [],
|
|
126
|
-
constraints: [],
|
|
127
|
-
references: issue.source_url ? [issue.source_url] : []
|
|
128
|
-
},
|
|
129
|
-
source: {
|
|
130
|
-
type: 'import-issue',
|
|
131
|
-
issue_id: issue.id,
|
|
132
|
-
issue_snapshot: {
|
|
133
|
-
id: issue.id,
|
|
134
|
-
title: issue.title,
|
|
135
|
-
status: issue.status,
|
|
136
|
-
context: issue.context,
|
|
137
|
-
priority: issue.priority,
|
|
138
|
-
created_at: issue.created_at
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
execution: {
|
|
142
|
-
session_id: null,
|
|
143
|
-
started_at: null,
|
|
144
|
-
completed_at: null,
|
|
145
|
-
skill_results: [],
|
|
146
|
-
git_commit: null,
|
|
147
|
-
error: null
|
|
148
|
-
},
|
|
149
|
-
created_at: new Date().toISOString(),
|
|
150
|
-
updated_at: new Date().toISOString()
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
// 5. Write task file
|
|
154
|
-
Bash('mkdir -p .workflow/.idaw/tasks');
|
|
155
|
-
Write(`.workflow/.idaw/tasks/${nextId}.json`, JSON.stringify(task, null, 2));
|
|
156
|
-
console.log(`Created ${nextId} from issue ${issueId}: ${issue.title}`);
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Phase 3B: Manual Mode
|
|
161
|
-
|
|
162
|
-
```javascript
|
|
163
|
-
// 1. Validate description
|
|
164
|
-
if (!description && !autoYes) {
|
|
165
|
-
const answer = AskUserQuestion({
|
|
166
|
-
questions: [{
|
|
167
|
-
question: 'Please provide a task description:',
|
|
168
|
-
header: 'Task',
|
|
169
|
-
multiSelect: false,
|
|
170
|
-
options: [
|
|
171
|
-
{ label: 'Provide description', description: 'What needs to be done?' }
|
|
172
|
-
]
|
|
173
|
-
}]
|
|
174
|
-
});
|
|
175
|
-
// Use custom text from "Other"
|
|
176
|
-
description = answer.customText || '';
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (!description) {
|
|
180
|
-
console.log('Error: No description provided. Usage: /idaw:add "task description"');
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// 2. Generate next IDAW ID
|
|
185
|
-
const nextId = generateNextId();
|
|
186
|
-
|
|
187
|
-
// 3. Build title from first sentence
|
|
188
|
-
const title = description.split(/[.\n]/)[0].substring(0, 80).trim();
|
|
189
|
-
|
|
190
|
-
// 4. Determine task_type
|
|
191
|
-
const taskType = typeFlag || null; // null → inferred at run time
|
|
192
|
-
|
|
193
|
-
// 5. Create task
|
|
194
|
-
const task = {
|
|
195
|
-
id: nextId,
|
|
196
|
-
title: title,
|
|
197
|
-
description: description,
|
|
198
|
-
status: 'pending',
|
|
199
|
-
priority: parseInt(priorityFlag) || 3,
|
|
200
|
-
task_type: taskType,
|
|
201
|
-
skill_chain: null,
|
|
202
|
-
context: {
|
|
203
|
-
affected_files: [],
|
|
204
|
-
acceptance_criteria: [],
|
|
205
|
-
constraints: [],
|
|
206
|
-
references: []
|
|
207
|
-
},
|
|
208
|
-
source: {
|
|
209
|
-
type: 'manual',
|
|
210
|
-
issue_id: null,
|
|
211
|
-
issue_snapshot: null
|
|
212
|
-
},
|
|
213
|
-
execution: {
|
|
214
|
-
session_id: null,
|
|
215
|
-
started_at: null,
|
|
216
|
-
completed_at: null,
|
|
217
|
-
skill_results: [],
|
|
218
|
-
git_commit: null,
|
|
219
|
-
error: null
|
|
220
|
-
},
|
|
221
|
-
created_at: new Date().toISOString(),
|
|
222
|
-
updated_at: new Date().toISOString()
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
Bash('mkdir -p .workflow/.idaw/tasks');
|
|
226
|
-
Write(`.workflow/.idaw/tasks/${nextId}.json`, JSON.stringify(task, null, 2));
|
|
227
|
-
console.log(`Created ${nextId}: ${title}`);
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## Helper Functions
|
|
231
|
-
|
|
232
|
-
### ID Generation
|
|
233
|
-
|
|
234
|
-
```javascript
|
|
235
|
-
function generateNextId() {
|
|
236
|
-
const files = Glob('.workflow/.idaw/tasks/IDAW-*.json') || [];
|
|
237
|
-
if (files.length === 0) return 'IDAW-001';
|
|
238
|
-
|
|
239
|
-
const maxNum = files
|
|
240
|
-
.map(f => parseInt(f.match(/IDAW-(\d+)/)?.[1] || '0'))
|
|
241
|
-
.reduce((max, n) => Math.max(max, n), 0);
|
|
242
|
-
|
|
243
|
-
return `IDAW-${String(maxNum + 1).padStart(3, '0')}`;
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Task Type Inference (deferred — used at run time if task_type is null)
|
|
248
|
-
|
|
249
|
-
```javascript
|
|
250
|
-
function inferTaskType(title, description) {
|
|
251
|
-
const text = `${title} ${description}`.toLowerCase();
|
|
252
|
-
if (/urgent|production|critical/.test(text) && /fix|bug/.test(text)) return 'bugfix-hotfix';
|
|
253
|
-
if (/refactor|重构|tech.*debt/.test(text)) return 'refactor';
|
|
254
|
-
if (/tdd|test-driven|test first/.test(text)) return 'tdd';
|
|
255
|
-
if (/test fail|fix test|failing test/.test(text)) return 'test-fix';
|
|
256
|
-
if (/generate test|写测试|add test/.test(text)) return 'test';
|
|
257
|
-
if (/review|code review/.test(text)) return 'review';
|
|
258
|
-
if (/docs|documentation|readme/.test(text)) return 'docs';
|
|
259
|
-
if (/fix|bug|error|crash|fail/.test(text)) return 'bugfix';
|
|
260
|
-
if (/complex|multi-module|architecture/.test(text)) return 'feature-complex';
|
|
261
|
-
return 'feature';
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
## Examples
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
# Manual creation
|
|
269
|
-
/idaw:add "Fix login timeout bug" --type bugfix --priority 2
|
|
270
|
-
/idaw:add "Add rate limiting to API endpoints" --priority 1
|
|
271
|
-
/idaw:add "Refactor auth module to use strategy pattern"
|
|
272
|
-
|
|
273
|
-
# Import from ccw issue
|
|
274
|
-
/idaw:add --from-issue ISS-20260128-001
|
|
275
|
-
/idaw:add --from-issue ISS-20260128-001,ISS-20260128-002 --priority 1
|
|
276
|
-
|
|
277
|
-
# Auto mode (skip clarification)
|
|
278
|
-
/idaw:add -y "Quick fix for typo in header"
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
## Output
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
Created IDAW-001: Fix login timeout bug
|
|
285
|
-
Type: bugfix | Priority: 2 | Source: manual
|
|
286
|
-
→ Next: /idaw:run or /idaw:status
|
|
287
|
-
```
|