claude-code-workflow 6.3.49 → 6.3.51
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/issue/new.md +1 -2
- package/.claude/commands/view.md +367 -0
- package/.claude/commands/workflow/unified-execute-with-file.md +807 -0
- package/.claude/skills/ccw-help/SKILL.md +72 -12
- package/.claude/skills/ccw-help/command.json +922 -520
- package/.claude/skills/ccw-help/index/all-agents.json +97 -0
- package/.claude/skills/ccw-help/index/all-commands.json +805 -0
- package/.claude/skills/ccw-help/index/by-category.json +833 -0
- package/.claude/skills/ccw-help/index/by-use-case.json +819 -0
- package/.claude/skills/ccw-help/index/command-relationships.json +160 -0
- package/.claude/skills/ccw-help/index/essential-commands.json +90 -0
- package/.claude/skills/ccw-help/scripts/auto-update.py +34 -0
- package/.claude/skills/skill-generator/SKILL.md +255 -208
- package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +238 -228
- package/.claude/skills/skill-generator/phases/02-structure-generation.md +261 -262
- package/.claude/skills/skill-generator/phases/03-phase-generation.md +976 -969
- package/.claude/skills/skill-generator/phases/04-specs-templates.md +398 -398
- package/.claude/skills/skill-generator/phases/05-validation.md +417 -417
- package/.claude/skills/skill-generator/specs/cli-integration.md +131 -131
- package/.claude/skills/skill-generator/specs/execution-modes.md +399 -396
- package/.claude/skills/skill-generator/specs/reference-docs-spec.md +271 -0
- package/.claude/skills/skill-generator/specs/scripting-integration.md +265 -265
- package/.claude/skills/skill-generator/specs/skill-requirements.md +466 -466
- package/.claude/skills/skill-generator/templates/autonomous-action.md +91 -88
- package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +89 -89
- package/.claude/skills/skill-generator/templates/code-analysis-action.md +148 -149
- package/.claude/skills/skill-generator/templates/llm-action.md +367 -367
- package/.claude/skills/skill-generator/templates/script-template.md +79 -79
- package/.claude/skills/skill-generator/templates/sequential-phase.md +129 -129
- package/.claude/skills/skill-generator/templates/skill-md.md +134 -75
- package/.codex/prompts/UNIFIED_EXECUTE_COMPARISON.md +205 -0
- package/.codex/prompts/analyze-with-file.md +5 -2
- package/.codex/prompts/brainstorm-to-cycle.md +4 -3
- package/.codex/prompts/brainstorm-with-file.md +6 -2
- package/.codex/prompts/clean.md +7 -2
- package/.codex/prompts/compact.md +5 -3
- package/.codex/prompts/debug-with-file.md +6 -2
- package/.codex/prompts/execute.md +6 -2
- package/.codex/prompts/issue-execute.md +10 -2
- package/.codex/prompts/issue-new.md +390 -285
- package/.codex/prompts/lite-execute.md +8 -7
- package/.codex/prompts/lite-fix.md +6 -2
- package/.codex/prompts/lite-plan-a.md +6 -2
- package/.codex/prompts/lite-plan-b.md +6 -2
- package/.codex/prompts/lite-plan-c.md +6 -2
- package/.codex/prompts/unified-execute-with-file.md +722 -0
- package/.codex/skills/codex-issue-plan-execute/SKILL.md +239 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-complete.md +173 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-execute.md +220 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-init.md +86 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-list.md +165 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-plan.md +170 -0
- package/.codex/skills/codex-issue-plan-execute/phases/orchestrator.md +210 -0
- package/.codex/skills/codex-issue-plan-execute/phases/state-schema.md +136 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent-system.md +136 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent.md +135 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent-system.md +107 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent.md +122 -0
- package/.codex/skills/codex-issue-plan-execute/specs/issue-handling.md +187 -0
- package/.codex/skills/codex-issue-plan-execute/specs/quality-standards.md +231 -0
- package/.codex/skills/codex-issue-plan-execute/specs/solution-schema.md +270 -0
- package/.codex/skills/codex-issue-plan-execute/specs/subagent-roles.md +268 -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/cli.d.ts +1 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +74 -6
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js +16 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/help-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/help-routes.js +51 -1
- package/ccw/dist/core/routes/help-routes.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +5 -3
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.d.ts +1 -0
- package/ccw/dist/tools/cli-executor-utils.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.js +3 -1
- package/ccw/dist/tools/cli-executor-utils.js.map +1 -1
- package/ccw/src/cli.ts +1 -0
- package/ccw/src/commands/cli.ts +77 -6
- package/ccw/src/core/routes/cli-routes.ts +16 -1
- package/ccw/src/core/routes/help-routes.ts +60 -1
- package/ccw/src/templates/dashboard-js/views/help.js +423 -1
- package/ccw/src/tools/cli-executor-core.ts +6 -3
- package/ccw/src/tools/cli-executor-utils.ts +5 -2
- package/package.json +1 -1
|
@@ -1,466 +1,466 @@
|
|
|
1
|
-
# Skill Requirements Specification
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
### 1.
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
13
|
-
| `skill_name` | string |
|
|
14
|
-
| `display_name` | string |
|
|
15
|
-
| `description` | string |
|
|
16
|
-
| `triggers` | string[] |
|
|
17
|
-
|
|
18
|
-
### 2.
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
| `execution_mode` | enum |
|
|
23
|
-
| `phase_count` | number |
|
|
24
|
-
| `action_count` | number |
|
|
25
|
-
|
|
26
|
-
### 2.5
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
30
|
-
| `context_strategy` | enum |
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
| `file` |
|
|
37
|
-
| `memory` |
|
|
38
|
-
|
|
39
|
-
### 2.6 LLM
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
| `llm_integration` | object |
|
|
44
|
-
| `llm_integration.enabled` | boolean | - |
|
|
45
|
-
| `llm_integration.default_tool` | enum | - | `gemini` \| `qwen` \| `codex` |
|
|
46
|
-
| `llm_integration.fallback_chain` | string[] | - |
|
|
47
|
-
|
|
48
|
-
### 3.
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
| `allowed_tools` | string[] |
|
|
53
|
-
| `mcp_tools` | string[] |
|
|
54
|
-
|
|
55
|
-
### 4.
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
59
|
-
| `output_format` | enum |
|
|
60
|
-
| `output_location` | string |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
interface SkillConfig {
|
|
68
|
-
//
|
|
69
|
-
skill_name: string; // "my-skill"
|
|
70
|
-
display_name: string; // "My Skill"
|
|
71
|
-
description: string; // "
|
|
72
|
-
triggers: string[]; // ["keyword1", "keyword2"]
|
|
73
|
-
|
|
74
|
-
//
|
|
75
|
-
execution_mode: 'sequential' | 'autonomous' | 'hybrid';
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
context_strategy: 'file' | 'memory'; //
|
|
79
|
-
|
|
80
|
-
// LLM
|
|
81
|
-
llm_integration?: {
|
|
82
|
-
enabled: boolean; //
|
|
83
|
-
default_tool: 'gemini' | 'qwen' | 'codex';
|
|
84
|
-
fallback_chain: string[]; // ['gemini', 'qwen', 'codex']
|
|
85
|
-
mode: 'analysis' | 'write'; //
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// Sequential
|
|
89
|
-
sequential_config?: {
|
|
90
|
-
phases: Array<{
|
|
91
|
-
id: string; // "01-init"
|
|
92
|
-
name: string; // "Initialization"
|
|
93
|
-
description: string; // "
|
|
94
|
-
input: string[]; //
|
|
95
|
-
output: string; //
|
|
96
|
-
}>;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// Autonomous
|
|
100
|
-
autonomous_config?: {
|
|
101
|
-
state_schema: {
|
|
102
|
-
fields: Array<{
|
|
103
|
-
name: string;
|
|
104
|
-
type: string;
|
|
105
|
-
description: string;
|
|
106
|
-
}>;
|
|
107
|
-
};
|
|
108
|
-
actions: Array<{
|
|
109
|
-
id: string; // "action-init"
|
|
110
|
-
name: string; // "Initialize"
|
|
111
|
-
description: string; // "
|
|
112
|
-
preconditions: string[]; //
|
|
113
|
-
effects: string[]; //
|
|
114
|
-
}>;
|
|
115
|
-
termination_conditions: string[];
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
allowed_tools: string[]; // ["Task", "Read", "Write", ...]
|
|
120
|
-
mcp_tools?: string[]; // ["mcp__chrome__*"]
|
|
121
|
-
|
|
122
|
-
//
|
|
123
|
-
output: {
|
|
124
|
-
format: 'markdown' | 'html' | 'json';
|
|
125
|
-
location: string; // ".workflow/.scratchpad/{skill}-{timestamp}"
|
|
126
|
-
filename_pattern: string; // "{name}-output.{ext}"
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
//
|
|
130
|
-
quality?: {
|
|
131
|
-
dimensions: string[]; // ["completeness", "consistency", ...]
|
|
132
|
-
pass_threshold: number; // 80
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
//
|
|
136
|
-
created_at: string;
|
|
137
|
-
version: string;
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
##
|
|
144
|
-
|
|
145
|
-
### Phase 1:
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
AskUserQuestion({
|
|
149
|
-
questions: [
|
|
150
|
-
{
|
|
151
|
-
question: "Skill
|
|
152
|
-
header: "Skill
|
|
153
|
-
multiSelect: false,
|
|
154
|
-
options: [
|
|
155
|
-
{ label: "
|
|
156
|
-
{ label: "
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
question: "Skill
|
|
161
|
-
header: "
|
|
162
|
-
multiSelect: false,
|
|
163
|
-
options: [
|
|
164
|
-
{ label: "
|
|
165
|
-
{ label: "
|
|
166
|
-
{ label: "
|
|
167
|
-
{ label: "
|
|
168
|
-
{ label: "
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Phase 2:
|
|
176
|
-
|
|
177
|
-
```javascript
|
|
178
|
-
AskUserQuestion({
|
|
179
|
-
questions: [
|
|
180
|
-
{
|
|
181
|
-
question: "
|
|
182
|
-
header: "
|
|
183
|
-
multiSelect: false,
|
|
184
|
-
options: [
|
|
185
|
-
{
|
|
186
|
-
label: "Sequential (
|
|
187
|
-
description: "
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
label: "Autonomous (
|
|
191
|
-
description: "
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
label: "Hybrid (
|
|
195
|
-
description: "
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
});
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Phase 3:
|
|
204
|
-
|
|
205
|
-
#### Sequential
|
|
206
|
-
|
|
207
|
-
```javascript
|
|
208
|
-
AskUserQuestion({
|
|
209
|
-
questions: [
|
|
210
|
-
{
|
|
211
|
-
question: "
|
|
212
|
-
header: "
|
|
213
|
-
multiSelect: false,
|
|
214
|
-
options: [
|
|
215
|
-
{ label: "3
|
|
216
|
-
{ label: "5
|
|
217
|
-
{ label: "7
|
|
218
|
-
{ label: "
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
]
|
|
222
|
-
});
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### Autonomous
|
|
226
|
-
|
|
227
|
-
```javascript
|
|
228
|
-
AskUserQuestion({
|
|
229
|
-
questions: [
|
|
230
|
-
{
|
|
231
|
-
question: "
|
|
232
|
-
header: "
|
|
233
|
-
multiSelect: true,
|
|
234
|
-
options: [
|
|
235
|
-
{ label: "
|
|
236
|
-
{ label: "
|
|
237
|
-
{ label: "
|
|
238
|
-
{ label: "
|
|
239
|
-
{ label: "
|
|
240
|
-
{ label: "
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
]
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Phase 4:
|
|
248
|
-
|
|
249
|
-
```javascript
|
|
250
|
-
AskUserQuestion({
|
|
251
|
-
questions: [
|
|
252
|
-
{
|
|
253
|
-
question: "
|
|
254
|
-
header: "
|
|
255
|
-
multiSelect: false,
|
|
256
|
-
options: [
|
|
257
|
-
{
|
|
258
|
-
label: "
|
|
259
|
-
description: "
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
label: "
|
|
263
|
-
description: "
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
]
|
|
268
|
-
});
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### Phase 5: LLM
|
|
272
|
-
|
|
273
|
-
```javascript
|
|
274
|
-
AskUserQuestion({
|
|
275
|
-
questions: [
|
|
276
|
-
{
|
|
277
|
-
question: "
|
|
278
|
-
header: "LLM
|
|
279
|
-
multiSelect: false,
|
|
280
|
-
options: [
|
|
281
|
-
{
|
|
282
|
-
label: "
|
|
283
|
-
description: "
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
label: "
|
|
287
|
-
description: "
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
]
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
//
|
|
295
|
-
if (llmEnabled) {
|
|
296
|
-
AskUserQuestion({
|
|
297
|
-
questions: [
|
|
298
|
-
{
|
|
299
|
-
question: "
|
|
300
|
-
header: "LLM
|
|
301
|
-
multiSelect: false,
|
|
302
|
-
options: [
|
|
303
|
-
{ label: "Gemini", description: "
|
|
304
|
-
{ label: "Qwen", description: "
|
|
305
|
-
{ label: "Codex", description: "
|
|
306
|
-
]
|
|
307
|
-
}
|
|
308
|
-
]
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### Phase 6:
|
|
314
|
-
|
|
315
|
-
```javascript
|
|
316
|
-
AskUserQuestion({
|
|
317
|
-
questions: [
|
|
318
|
-
{
|
|
319
|
-
question: "
|
|
320
|
-
header: "
|
|
321
|
-
multiSelect: true,
|
|
322
|
-
options: [
|
|
323
|
-
{ label: "
|
|
324
|
-
{ label: "
|
|
325
|
-
{ label: "Chrome
|
|
326
|
-
{ label: "
|
|
327
|
-
{ label: "CCW CLI
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
]
|
|
331
|
-
});
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
##
|
|
337
|
-
|
|
338
|
-
###
|
|
339
|
-
|
|
340
|
-
```javascript
|
|
341
|
-
function validateSkillName(name) {
|
|
342
|
-
const rules = [
|
|
343
|
-
{ test: /^[a-z][a-z0-9-]*$/, msg: "
|
|
344
|
-
{ test: /^.{3,30}$/, msg: "
|
|
345
|
-
{ test: /^(?!.*--)/, msg: "
|
|
346
|
-
{ test: /[^-]$/, msg: "
|
|
347
|
-
];
|
|
348
|
-
|
|
349
|
-
for (const rule of rules) {
|
|
350
|
-
if (!rule.test.test(name)) {
|
|
351
|
-
return { valid: false, error: rule.msg };
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
return { valid: true };
|
|
355
|
-
}
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
###
|
|
359
|
-
|
|
360
|
-
```javascript
|
|
361
|
-
function validateSkillConfig(config) {
|
|
362
|
-
const errors = [];
|
|
363
|
-
|
|
364
|
-
//
|
|
365
|
-
if (!config.skill_name) errors.push("
|
|
366
|
-
if (!config.description) errors.push("
|
|
367
|
-
if (!config.execution_mode) errors.push("
|
|
368
|
-
|
|
369
|
-
//
|
|
370
|
-
if (config.execution_mode === 'sequential') {
|
|
371
|
-
if (!config.sequential_config?.phases?.length) {
|
|
372
|
-
errors.push("Sequential
|
|
373
|
-
}
|
|
374
|
-
} else if (config.execution_mode === 'autonomous') {
|
|
375
|
-
if (!config.autonomous_config?.actions?.length) {
|
|
376
|
-
errors.push("Autonomous
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
return { valid: errors.length === 0, errors };
|
|
381
|
-
}
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
##
|
|
387
|
-
|
|
388
|
-
### Sequential
|
|
389
|
-
|
|
390
|
-
```json
|
|
391
|
-
{
|
|
392
|
-
"skill_name": "api-docs-generator",
|
|
393
|
-
"display_name": "API Docs Generator",
|
|
394
|
-
"description": "Generate API documentation from source code",
|
|
395
|
-
"triggers": ["generate api docs", "api documentation"],
|
|
396
|
-
"execution_mode": "sequential",
|
|
397
|
-
"context_strategy": "file",
|
|
398
|
-
"llm_integration": {
|
|
399
|
-
"enabled": true,
|
|
400
|
-
"default_tool": "gemini",
|
|
401
|
-
"fallback_chain": ["gemini", "qwen"],
|
|
402
|
-
"mode": "analysis"
|
|
403
|
-
},
|
|
404
|
-
"sequential_config": {
|
|
405
|
-
"phases": [
|
|
406
|
-
{
|
|
407
|
-
"id": "01-scan",
|
|
408
|
-
"name": "Code Scanning",
|
|
409
|
-
"output": "endpoints.json",
|
|
410
|
-
"agent": { "type": "universal-executor", "run_in_background": false }
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"id": "02-analyze",
|
|
414
|
-
"name": "LLM Analysis",
|
|
415
|
-
"output": "analysis.json",
|
|
416
|
-
"agent": { "type": "llm", "tool": "gemini", "mode": "analysis" }
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"id": "03-generate",
|
|
420
|
-
"name": "Doc Generation",
|
|
421
|
-
"output": "api-docs.md",
|
|
422
|
-
"agent": { "type": "universal-executor", "run_in_background": false }
|
|
423
|
-
}
|
|
424
|
-
]
|
|
425
|
-
},
|
|
426
|
-
"allowed_tools": ["Task", "Read", "Write", "Glob", "Grep", "Bash"],
|
|
427
|
-
"output": {
|
|
428
|
-
"format": "markdown",
|
|
429
|
-
"location": ".workflow/.scratchpad/api-docs-{timestamp}",
|
|
430
|
-
"filename_pattern": "{name}-api-docs.md"
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
### Autonomous
|
|
436
|
-
|
|
437
|
-
```json
|
|
438
|
-
{
|
|
439
|
-
"skill_name": "task-manager",
|
|
440
|
-
"display_name": "Task Manager",
|
|
441
|
-
"description": "Interactive task management with CRUD operations",
|
|
442
|
-
"triggers": ["manage tasks", "task list", "create task"],
|
|
443
|
-
"execution_mode": "autonomous",
|
|
444
|
-
"autonomous_config": {
|
|
445
|
-
"state_schema": {
|
|
446
|
-
"fields": [
|
|
447
|
-
{ "name": "tasks", "type": "Task[]", "description": "
|
|
448
|
-
{ "name": "current_view", "type": "string", "description": "
|
|
449
|
-
]
|
|
450
|
-
},
|
|
451
|
-
"actions": [
|
|
452
|
-
{ "id": "action-list", "name": "List Tasks", "preconditions": [], "effects": ["
|
|
453
|
-
{ "id": "action-create", "name": "Create Task", "preconditions": [], "effects": ["
|
|
454
|
-
{ "id": "action-edit", "name": "Edit Task", "preconditions": ["task_selected"], "effects": ["
|
|
455
|
-
{ "id": "action-delete", "name": "Delete Task", "preconditions": ["task_selected"], "effects": ["
|
|
456
|
-
],
|
|
457
|
-
"termination_conditions": ["user_exit", "error_limit"]
|
|
458
|
-
},
|
|
459
|
-
"allowed_tools": ["Task", "AskUserQuestion", "Read", "Write"],
|
|
460
|
-
"output": {
|
|
461
|
-
"format": "json",
|
|
462
|
-
"location": ".workflow/.scratchpad/tasks",
|
|
463
|
-
"filename_pattern": "tasks.json"
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
```
|
|
1
|
+
# Skill Requirements Specification
|
|
2
|
+
|
|
3
|
+
Requirements collection specification for new Skill creation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Required Information
|
|
8
|
+
|
|
9
|
+
### 1. Basic Information
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Description |
|
|
12
|
+
|-------|------|----------|-------------|
|
|
13
|
+
| `skill_name` | string | Yes | Skill identifier (lowercase with hyphens) |
|
|
14
|
+
| `display_name` | string | Yes | Display name |
|
|
15
|
+
| `description` | string | Yes | One-sentence description |
|
|
16
|
+
| `triggers` | string[] | Yes | List of trigger keywords |
|
|
17
|
+
|
|
18
|
+
### 2. Execution Mode
|
|
19
|
+
|
|
20
|
+
| Field | Type | Required | Description |
|
|
21
|
+
|-------|------|----------|-------------|
|
|
22
|
+
| `execution_mode` | enum | Yes | `sequential` \| `autonomous` \| `hybrid` |
|
|
23
|
+
| `phase_count` | number | Conditional | Number of phases in Sequential mode |
|
|
24
|
+
| `action_count` | number | Conditional | Number of actions in Autonomous mode |
|
|
25
|
+
|
|
26
|
+
### 2.5 Context Strategy (P0 Enhancement)
|
|
27
|
+
|
|
28
|
+
| Field | Type | Required | Description |
|
|
29
|
+
|-------|------|----------|-------------|
|
|
30
|
+
| `context_strategy` | enum | Yes | `file` \| `memory` |
|
|
31
|
+
|
|
32
|
+
**Strategy Comparison**:
|
|
33
|
+
|
|
34
|
+
| Strategy | Persistence | Debuggable | Recoverable | Applicable Scenarios |
|
|
35
|
+
|----------|-------------|-----------|------------|----------------------|
|
|
36
|
+
| `file` | Yes | Yes | Yes | Complex multi-phase tasks (recommended) |
|
|
37
|
+
| `memory` | No | No | No | Simple linear tasks |
|
|
38
|
+
|
|
39
|
+
### 2.6 LLM Integration Configuration (P1 Enhancement)
|
|
40
|
+
|
|
41
|
+
| Field | Type | Required | Description |
|
|
42
|
+
|-------|------|----------|-------------|
|
|
43
|
+
| `llm_integration` | object | Optional | LLM invocation configuration |
|
|
44
|
+
| `llm_integration.enabled` | boolean | - | Enable LLM invocation |
|
|
45
|
+
| `llm_integration.default_tool` | enum | - | `gemini` \| `qwen` \| `codex` |
|
|
46
|
+
| `llm_integration.fallback_chain` | string[] | - | Fallback tool chain on failure |
|
|
47
|
+
|
|
48
|
+
### 3. Tool Dependencies
|
|
49
|
+
|
|
50
|
+
| Field | Type | Required | Description |
|
|
51
|
+
|-------|------|----------|-------------|
|
|
52
|
+
| `allowed_tools` | string[] | Yes | List of allowed tools |
|
|
53
|
+
| `mcp_tools` | string[] | Optional | Required MCP tools |
|
|
54
|
+
|
|
55
|
+
### 4. Output Configuration
|
|
56
|
+
|
|
57
|
+
| Field | Type | Required | Description |
|
|
58
|
+
|-------|------|----------|-------------|
|
|
59
|
+
| `output_format` | enum | Yes | `markdown` \| `html` \| `json` |
|
|
60
|
+
| `output_location` | string | Yes | Output directory pattern |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Configuration File Structure
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
interface SkillConfig {
|
|
68
|
+
// Basic information
|
|
69
|
+
skill_name: string; // "my-skill"
|
|
70
|
+
display_name: string; // "My Skill"
|
|
71
|
+
description: string; // "One-sentence description"
|
|
72
|
+
triggers: string[]; // ["keyword1", "keyword2"]
|
|
73
|
+
|
|
74
|
+
// Execution mode
|
|
75
|
+
execution_mode: 'sequential' | 'autonomous' | 'hybrid';
|
|
76
|
+
|
|
77
|
+
// Context strategy (P0 Enhancement)
|
|
78
|
+
context_strategy: 'file' | 'memory'; // Default: 'file'
|
|
79
|
+
|
|
80
|
+
// LLM Integration Configuration (P1 Enhancement)
|
|
81
|
+
llm_integration?: {
|
|
82
|
+
enabled: boolean; // Enable LLM invocation
|
|
83
|
+
default_tool: 'gemini' | 'qwen' | 'codex';
|
|
84
|
+
fallback_chain: string[]; // ['gemini', 'qwen', 'codex']
|
|
85
|
+
mode: 'analysis' | 'write'; // Default mode
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Sequential mode configuration
|
|
89
|
+
sequential_config?: {
|
|
90
|
+
phases: Array<{
|
|
91
|
+
id: string; // "01-init"
|
|
92
|
+
name: string; // "Initialization"
|
|
93
|
+
description: string; // "Collect initial configuration"
|
|
94
|
+
input: string[]; // Input dependencies
|
|
95
|
+
output: string; // Output file
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Autonomous mode configuration
|
|
100
|
+
autonomous_config?: {
|
|
101
|
+
state_schema: {
|
|
102
|
+
fields: Array<{
|
|
103
|
+
name: string;
|
|
104
|
+
type: string;
|
|
105
|
+
description: string;
|
|
106
|
+
}>;
|
|
107
|
+
};
|
|
108
|
+
actions: Array<{
|
|
109
|
+
id: string; // "action-init"
|
|
110
|
+
name: string; // "Initialize"
|
|
111
|
+
description: string; // "Initialize state"
|
|
112
|
+
preconditions: string[]; // Preconditions
|
|
113
|
+
effects: string[]; // Execution effects
|
|
114
|
+
}>;
|
|
115
|
+
termination_conditions: string[];
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Tool dependencies
|
|
119
|
+
allowed_tools: string[]; // ["Task", "Read", "Write", ...]
|
|
120
|
+
mcp_tools?: string[]; // ["mcp__chrome__*"]
|
|
121
|
+
|
|
122
|
+
// Output configuration
|
|
123
|
+
output: {
|
|
124
|
+
format: 'markdown' | 'html' | 'json';
|
|
125
|
+
location: string; // ".workflow/.scratchpad/{skill}-{timestamp}"
|
|
126
|
+
filename_pattern: string; // "{name}-output.{ext}"
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Quality configuration
|
|
130
|
+
quality?: {
|
|
131
|
+
dimensions: string[]; // ["completeness", "consistency", ...]
|
|
132
|
+
pass_threshold: number; // 80
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Metadata
|
|
136
|
+
created_at: string;
|
|
137
|
+
version: string;
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Requirements Collection Questions
|
|
144
|
+
|
|
145
|
+
### Phase 1: Basic Information
|
|
146
|
+
|
|
147
|
+
```javascript
|
|
148
|
+
AskUserQuestion({
|
|
149
|
+
questions: [
|
|
150
|
+
{
|
|
151
|
+
question: "What is the Skill name? (English, lowercase with hyphens)",
|
|
152
|
+
header: "Skill Name",
|
|
153
|
+
multiSelect: false,
|
|
154
|
+
options: [
|
|
155
|
+
{ label: "Auto-generate", description: "Auto-generate name from description" },
|
|
156
|
+
{ label: "Manual input", description: "Enter custom name" }
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
question: "What is the primary purpose of this Skill?",
|
|
161
|
+
header: "Purpose Type",
|
|
162
|
+
multiSelect: false,
|
|
163
|
+
options: [
|
|
164
|
+
{ label: "Document Generation", description: "Generate Markdown/HTML documents" },
|
|
165
|
+
{ label: "Code Analysis", description: "Analyze code structure, quality, security" },
|
|
166
|
+
{ label: "Interactive Management", description: "Manage Issues, tasks, workflows" },
|
|
167
|
+
{ label: "Data Processing", description: "ETL, transformation, report generation" },
|
|
168
|
+
{ label: "Custom", description: "Other purposes" }
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Phase 2: Execution Mode
|
|
176
|
+
|
|
177
|
+
```javascript
|
|
178
|
+
AskUserQuestion({
|
|
179
|
+
questions: [
|
|
180
|
+
{
|
|
181
|
+
question: "Select execution mode:",
|
|
182
|
+
header: "Execution Mode",
|
|
183
|
+
multiSelect: false,
|
|
184
|
+
options: [
|
|
185
|
+
{
|
|
186
|
+
label: "Sequential (Fixed Order)",
|
|
187
|
+
description: "Phases execute in fixed order, suitable for pipeline tasks (recommended)"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: "Autonomous (Dynamic)",
|
|
191
|
+
description: "Dynamically select execution path, suitable for interactive tasks"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
label: "Hybrid (Mixed)",
|
|
195
|
+
description: "Fixed initialization and finalization, flexible middle interaction"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Phase 3: Phase/Action Definition
|
|
204
|
+
|
|
205
|
+
#### Sequential Mode
|
|
206
|
+
|
|
207
|
+
```javascript
|
|
208
|
+
AskUserQuestion({
|
|
209
|
+
questions: [
|
|
210
|
+
{
|
|
211
|
+
question: "How many execution phases do you need?",
|
|
212
|
+
header: "Phase Count",
|
|
213
|
+
multiSelect: false,
|
|
214
|
+
options: [
|
|
215
|
+
{ label: "3 phases", description: "Simple: Collect → Process → Output" },
|
|
216
|
+
{ label: "5 phases", description: "Standard: Collect → Explore → Analyze → Assemble → Validate" },
|
|
217
|
+
{ label: "7 phases", description: "Complete: Include parallel processing and iterative optimization" },
|
|
218
|
+
{ label: "Custom", description: "Manually specify phases" }
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Autonomous Mode
|
|
226
|
+
|
|
227
|
+
```javascript
|
|
228
|
+
AskUserQuestion({
|
|
229
|
+
questions: [
|
|
230
|
+
{
|
|
231
|
+
question: "What are the core actions?",
|
|
232
|
+
header: "Action Definition",
|
|
233
|
+
multiSelect: true,
|
|
234
|
+
options: [
|
|
235
|
+
{ label: "Initialize (init)", description: "Set initial state" },
|
|
236
|
+
{ label: "List (list)", description: "Display current items" },
|
|
237
|
+
{ label: "Create (create)", description: "Create new item" },
|
|
238
|
+
{ label: "Edit (edit)", description: "Modify existing item" },
|
|
239
|
+
{ label: "Delete (delete)", description: "Delete item" },
|
|
240
|
+
{ label: "Complete (complete)", description: "Complete task" }
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
});
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Phase 4: Context Strategy (P0 Enhancement)
|
|
248
|
+
|
|
249
|
+
```javascript
|
|
250
|
+
AskUserQuestion({
|
|
251
|
+
questions: [
|
|
252
|
+
{
|
|
253
|
+
question: "Select context management strategy:",
|
|
254
|
+
header: "Context Strategy",
|
|
255
|
+
multiSelect: false,
|
|
256
|
+
options: [
|
|
257
|
+
{
|
|
258
|
+
label: "File Strategy (file)",
|
|
259
|
+
description: "Persist to .scratchpad, supports debugging and recovery (recommended)"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
label: "Memory Strategy (memory)",
|
|
263
|
+
description: "Keep only at runtime, fast but no recovery"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Phase 5: LLM Integration (P1 Enhancement)
|
|
272
|
+
|
|
273
|
+
```javascript
|
|
274
|
+
AskUserQuestion({
|
|
275
|
+
questions: [
|
|
276
|
+
{
|
|
277
|
+
question: "Do you need LLM invocation capability?",
|
|
278
|
+
header: "LLM Integration",
|
|
279
|
+
multiSelect: false,
|
|
280
|
+
options: [
|
|
281
|
+
{
|
|
282
|
+
label: "Enable LLM Invocation",
|
|
283
|
+
description: "Use gemini/qwen/codex for analysis or generation"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
label: "Not needed",
|
|
287
|
+
description: "Only use local tools"
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// If LLM enabled
|
|
295
|
+
if (llmEnabled) {
|
|
296
|
+
AskUserQuestion({
|
|
297
|
+
questions: [
|
|
298
|
+
{
|
|
299
|
+
question: "Select default LLM tool:",
|
|
300
|
+
header: "LLM Tool",
|
|
301
|
+
multiSelect: false,
|
|
302
|
+
options: [
|
|
303
|
+
{ label: "Gemini", description: "Large context, suitable for analysis tasks (recommended)" },
|
|
304
|
+
{ label: "Qwen", description: "Strong code generation capability" },
|
|
305
|
+
{ label: "Codex", description: "Strong autonomous execution, suitable for implementation tasks" }
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Phase 6: Tool Dependencies
|
|
314
|
+
|
|
315
|
+
```javascript
|
|
316
|
+
AskUserQuestion({
|
|
317
|
+
questions: [
|
|
318
|
+
{
|
|
319
|
+
question: "What tools do you need?",
|
|
320
|
+
header: "Tool Selection",
|
|
321
|
+
multiSelect: true,
|
|
322
|
+
options: [
|
|
323
|
+
{ label: "Basic tools", description: "Task, Read, Write, Glob, Grep, Bash" },
|
|
324
|
+
{ label: "User interaction", description: "AskUserQuestion" },
|
|
325
|
+
{ label: "Chrome screenshot", description: "mcp__chrome__*" },
|
|
326
|
+
{ label: "External search", description: "mcp__exa__search" },
|
|
327
|
+
{ label: "CCW CLI invocation", description: "ccw cli (gemini/qwen/codex)" }
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
});
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## Validation Rules
|
|
337
|
+
|
|
338
|
+
### Name Validation
|
|
339
|
+
|
|
340
|
+
```javascript
|
|
341
|
+
function validateSkillName(name) {
|
|
342
|
+
const rules = [
|
|
343
|
+
{ test: /^[a-z][a-z0-9-]*$/, msg: "Must start with lowercase letter, only contain lowercase letters, digits, hyphens" },
|
|
344
|
+
{ test: /^.{3,30}$/, msg: "Length 3-30 characters" },
|
|
345
|
+
{ test: /^(?!.*--)/, msg: "Cannot have consecutive hyphens" },
|
|
346
|
+
{ test: /[^-]$/, msg: "Cannot end with hyphen" }
|
|
347
|
+
];
|
|
348
|
+
|
|
349
|
+
for (const rule of rules) {
|
|
350
|
+
if (!rule.test.test(name)) {
|
|
351
|
+
return { valid: false, error: rule.msg };
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return { valid: true };
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Configuration Validation
|
|
359
|
+
|
|
360
|
+
```javascript
|
|
361
|
+
function validateSkillConfig(config) {
|
|
362
|
+
const errors = [];
|
|
363
|
+
|
|
364
|
+
// Required fields
|
|
365
|
+
if (!config.skill_name) errors.push("Missing skill_name");
|
|
366
|
+
if (!config.description) errors.push("Missing description");
|
|
367
|
+
if (!config.execution_mode) errors.push("Missing execution_mode");
|
|
368
|
+
|
|
369
|
+
// Mode-specific validation
|
|
370
|
+
if (config.execution_mode === 'sequential') {
|
|
371
|
+
if (!config.sequential_config?.phases?.length) {
|
|
372
|
+
errors.push("Sequential mode requires phases definition");
|
|
373
|
+
}
|
|
374
|
+
} else if (config.execution_mode === 'autonomous') {
|
|
375
|
+
if (!config.autonomous_config?.actions?.length) {
|
|
376
|
+
errors.push("Autonomous mode requires actions definition");
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return { valid: errors.length === 0, errors };
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Example Configurations
|
|
387
|
+
|
|
388
|
+
### Sequential Mode Example (Enhanced)
|
|
389
|
+
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"skill_name": "api-docs-generator",
|
|
393
|
+
"display_name": "API Docs Generator",
|
|
394
|
+
"description": "Generate API documentation from source code",
|
|
395
|
+
"triggers": ["generate api docs", "api documentation"],
|
|
396
|
+
"execution_mode": "sequential",
|
|
397
|
+
"context_strategy": "file",
|
|
398
|
+
"llm_integration": {
|
|
399
|
+
"enabled": true,
|
|
400
|
+
"default_tool": "gemini",
|
|
401
|
+
"fallback_chain": ["gemini", "qwen"],
|
|
402
|
+
"mode": "analysis"
|
|
403
|
+
},
|
|
404
|
+
"sequential_config": {
|
|
405
|
+
"phases": [
|
|
406
|
+
{
|
|
407
|
+
"id": "01-scan",
|
|
408
|
+
"name": "Code Scanning",
|
|
409
|
+
"output": "endpoints.json",
|
|
410
|
+
"agent": { "type": "universal-executor", "run_in_background": false }
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"id": "02-analyze",
|
|
414
|
+
"name": "LLM Analysis",
|
|
415
|
+
"output": "analysis.json",
|
|
416
|
+
"agent": { "type": "llm", "tool": "gemini", "mode": "analysis" }
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"id": "03-generate",
|
|
420
|
+
"name": "Doc Generation",
|
|
421
|
+
"output": "api-docs.md",
|
|
422
|
+
"agent": { "type": "universal-executor", "run_in_background": false }
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"allowed_tools": ["Task", "Read", "Write", "Glob", "Grep", "Bash"],
|
|
427
|
+
"output": {
|
|
428
|
+
"format": "markdown",
|
|
429
|
+
"location": ".workflow/.scratchpad/api-docs-{timestamp}",
|
|
430
|
+
"filename_pattern": "{name}-api-docs.md"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Autonomous Mode Example
|
|
436
|
+
|
|
437
|
+
```json
|
|
438
|
+
{
|
|
439
|
+
"skill_name": "task-manager",
|
|
440
|
+
"display_name": "Task Manager",
|
|
441
|
+
"description": "Interactive task management with CRUD operations",
|
|
442
|
+
"triggers": ["manage tasks", "task list", "create task"],
|
|
443
|
+
"execution_mode": "autonomous",
|
|
444
|
+
"autonomous_config": {
|
|
445
|
+
"state_schema": {
|
|
446
|
+
"fields": [
|
|
447
|
+
{ "name": "tasks", "type": "Task[]", "description": "Task list" },
|
|
448
|
+
{ "name": "current_view", "type": "string", "description": "Current view" }
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
"actions": [
|
|
452
|
+
{ "id": "action-list", "name": "List Tasks", "preconditions": [], "effects": ["Display task list"] },
|
|
453
|
+
{ "id": "action-create", "name": "Create Task", "preconditions": [], "effects": ["Add new task"] },
|
|
454
|
+
{ "id": "action-edit", "name": "Edit Task", "preconditions": ["task_selected"], "effects": ["Update task"] },
|
|
455
|
+
{ "id": "action-delete", "name": "Delete Task", "preconditions": ["task_selected"], "effects": ["Delete task"] }
|
|
456
|
+
],
|
|
457
|
+
"termination_conditions": ["user_exit", "error_limit"]
|
|
458
|
+
},
|
|
459
|
+
"allowed_tools": ["Task", "AskUserQuestion", "Read", "Write"],
|
|
460
|
+
"output": {
|
|
461
|
+
"format": "json",
|
|
462
|
+
"location": ".workflow/.scratchpad/tasks",
|
|
463
|
+
"filename_pattern": "tasks.json"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
```
|