claude-code-workflow 6.3.48 → 6.3.49
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 +6 -8
- package/.claude/agents/action-planning-agent.md +28 -45
- package/.claude/agents/cli-lite-planning-agent.md +93 -1
- package/.claude/agents/code-developer.md +144 -27
- package/.claude/commands/ccw-coordinator.md +175 -21
- package/.claude/commands/ccw-debug.md +832 -0
- package/.claude/commands/ccw.md +90 -9
- package/.claude/commands/cli/cli-init.md +1 -0
- package/.claude/commands/issue/convert-to-plan.md +718 -0
- package/.claude/commands/issue/from-brainstorm.md +382 -0
- package/.claude/commands/memory/tips.md +332 -0
- package/.claude/commands/workflow/analyze-with-file.md +804 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
- package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
- package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
- package/.claude/commands/workflow/debug-with-file.md +7 -5
- package/.claude/commands/workflow/execute.md +6 -4
- package/.claude/commands/workflow/lite-plan.md +2 -2
- package/.claude/commands/workflow/plan-verify.md +162 -327
- package/.claude/commands/workflow/plan.md +162 -26
- package/.claude/commands/workflow/replan.md +78 -2
- package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
- package/.claude/commands/workflow/review-module-cycle.md +2 -2
- package/.claude/commands/workflow/review-session-cycle.md +2 -2
- package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
- package/.claude/commands/workflow/tools/context-gather.md +81 -118
- package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
- package/.claude/skills/ccw-help/command.json +4 -4
- package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
- package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
- package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
- package/.claude/skills/skill-generator/SKILL.md +277 -85
- package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
- package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
- package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
- package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
- package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
- package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
- package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
- package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
- package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
- package/.claude/skills/skill-generator/templates/script-template.md +368 -0
- package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
- package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
- package/.claude/skills/skill-tuning/SKILL.md +130 -266
- package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
- package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
- package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
- package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
- package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
- package/.claude/workflows/cli-tools-usage.md +1 -1
- package/.codex/AGENTS.md +1 -3
- package/.codex/prompts/analyze-with-file.md +607 -0
- package/.codex/prompts/brainstorm-to-cycle.md +455 -0
- package/.codex/prompts/brainstorm-with-file.md +933 -0
- package/.codex/prompts/debug-with-file.md +15 -20
- package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +29 -5
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +2 -0
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +62 -20
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.js +5 -3
- package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
- package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
- package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
- package/ccw/dist/config/litellm-provider-models.js +172 -0
- package/ccw/dist/config/litellm-provider-models.js.map +1 -0
- package/ccw/dist/config/provider-models.d.ts +25 -51
- package/ccw/dist/config/provider-models.d.ts.map +1 -1
- package/ccw/dist/config/provider-models.js +84 -149
- package/ccw/dist/config/provider-models.js.map +1 -1
- package/ccw/dist/config/storage-paths.d.ts.map +1 -1
- package/ccw/dist/config/storage-paths.js +23 -5
- package/ccw/dist/config/storage-paths.js.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +3 -3
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
- package/ccw/dist/core/dashboard-generator.js +3 -1
- package/ccw/dist/core/dashboard-generator.js.map +1 -1
- package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/claude-routes.js +206 -14
- package/ccw/dist/core/routes/claude-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
- package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/commands-routes.js +480 -0
- package/ccw/dist/core/routes/commands-routes.js.map +1 -0
- package/ccw/dist/core/routes/model-routes.d.ts +11 -0
- package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/model-routes.js +112 -0
- package/ccw/dist/core/routes/model-routes.js.map +1 -0
- package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/nav-status-routes.js +84 -1
- package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
- package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
- package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/provider-routes.js +67 -0
- package/ccw/dist/core/routes/provider-routes.js.map +1 -0
- package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/skills-routes.js +219 -7
- package/ccw/dist/core/routes/skills-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +58 -6
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +13 -0
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +2 -2
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +146 -50
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +3 -27
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +7 -2
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.d.ts +11 -0
- package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.js +82 -2
- package/ccw/dist/tools/cli-history-store.js.map +1 -1
- package/ccw/dist/tools/command-registry.d.ts +7 -0
- package/ccw/dist/tools/command-registry.d.ts.map +1 -1
- package/ccw/dist/tools/command-registry.js +14 -1
- package/ccw/dist/tools/command-registry.js.map +1 -1
- package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
- package/ccw/dist/tools/generate-module-docs.js +11 -7
- package/ccw/dist/tools/generate-module-docs.js.map +1 -1
- package/ccw/dist/tools/litellm-executor.d.ts +1 -0
- package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
- package/ccw/dist/tools/litellm-executor.js +11 -9
- package/ccw/dist/tools/litellm-executor.js.map +1 -1
- package/ccw/dist/types/skill-types.d.ts +97 -0
- package/ccw/dist/types/skill-types.d.ts.map +1 -0
- package/ccw/dist/types/skill-types.js +6 -0
- package/ccw/dist/types/skill-types.js.map +1 -0
- package/ccw/src/commands/cli.ts +36 -5
- package/ccw/src/commands/issue.ts +81 -26
- package/ccw/src/config/litellm-api-config-manager.ts +5 -3
- package/ccw/src/config/litellm-provider-models.ts +222 -0
- package/ccw/src/config/provider-models.ts +91 -190
- package/ccw/src/config/storage-paths.ts +20 -5
- package/ccw/src/core/auth/csrf-middleware.ts +3 -3
- package/ccw/src/core/dashboard-generator.ts +3 -1
- package/ccw/src/core/routes/claude-routes.ts +233 -15
- package/ccw/src/core/routes/cli-routes.ts +2 -3
- package/ccw/src/core/routes/commands-routes.ts +620 -0
- package/ccw/src/core/routes/nav-status-routes.ts +95 -1
- package/ccw/src/core/routes/provider-routes.ts +78 -0
- package/ccw/src/core/routes/skills-routes.ts +266 -45
- package/ccw/src/core/routes/system-routes.ts +102 -50
- package/ccw/src/core/server.ts +13 -0
- package/ccw/src/mcp-server/index.ts +2 -2
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
- package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
- package/ccw/src/templates/dashboard-js/i18n.js +116 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
- package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
- package/ccw/src/templates/dashboard.html +7 -0
- package/ccw/src/tools/claude-cli-tools.ts +170 -56
- package/ccw/src/tools/cli-config-manager.ts +2 -33
- package/ccw/src/tools/cli-executor-core.ts +8 -2
- package/ccw/src/tools/cli-history-store.ts +92 -2
- package/ccw/src/tools/command-registry.ts +16 -1
- package/ccw/src/tools/generate-module-docs.ts +11 -7
- package/ccw/src/tools/litellm-executor.ts +13 -9
- package/ccw/src/types/skill-types.ts +99 -0
- package/package.json +1 -1
- package/.claude/commands/enhance-prompt.md +0 -93
- package/.claude/commands/memory/code-map-memory.md +0 -687
- package/.claude/commands/memory/docs.md +0 -615
- package/.claude/commands/memory/load-skill-memory.md +0 -182
- package/.claude/commands/memory/skill-memory.md +0 -525
- package/.claude/commands/memory/swagger-docs.md +0 -773
- package/.claude/commands/memory/tech-research-rules.md +0 -310
- package/.claude/commands/memory/workflow-skill-memory.md +0 -517
- package/.claude/commands/task/breakdown.md +0 -208
- package/.claude/commands/task/create.md +0 -152
- package/.claude/commands/task/execute.md +0 -270
- package/.claude/commands/task/replan.md +0 -441
- package/.claude/commands/version.md +0 -254
- package/.claude/commands/workflow/action-plan-verify.md +0 -485
- package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
- package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
- package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
- package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
- package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
- package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
- package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
- package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
- package/.claude/commands/workflow/debug.md +0 -331
- package/.claude/commands/workflow/develop-with-file.md +0 -1044
- package/.claude/skills/ccw-loop/README.md +0 -303
- package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
- package/.claude/skills/skill-generator/templates/script-python.md +0 -198
- package/.codex/prompts/debug.md +0 -318
- package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
|
@@ -1,27 +1,119 @@
|
|
|
1
1
|
# Phase 5: Validation & Documentation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Verify generated skill completeness and generate user documentation.
|
|
4
4
|
|
|
5
5
|
## Objective
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
Comprehensive validation and documentation:
|
|
8
|
+
- Verify all required files exist
|
|
9
|
+
- Check file content quality and completeness
|
|
10
|
+
- Generate validation report with issues and recommendations
|
|
11
|
+
- Generate README.md usage documentation
|
|
12
|
+
- Output final status and next steps
|
|
11
13
|
|
|
12
14
|
## Input
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
+
**File Dependencies**:
|
|
17
|
+
- `skill-config.json` (from Phase 1)
|
|
18
|
+
- `.claude/skills/{skill-name}/` directory (from Phase 2)
|
|
19
|
+
- All generated phase/action files (from Phase 3)
|
|
20
|
+
- All generated specs/templates files (from Phase 4)
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
**Required Information**:
|
|
23
|
+
- Skill name, display name, description
|
|
24
|
+
- Execution mode
|
|
25
|
+
- Trigger words
|
|
26
|
+
- Output configuration
|
|
27
|
+
- Complete skill directory structure
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
**Generated Files**:
|
|
32
|
+
|
|
33
|
+
| File | Purpose | Content |
|
|
34
|
+
|------|---------|---------|
|
|
35
|
+
| `validation-report.json` (workDir) | Validation report with detailed checks | File completeness, content quality, issues, recommendations |
|
|
36
|
+
| `README.md` (skillDir) | User documentation | Quick Start, Usage, Output, Directory Structure, Customization |
|
|
37
|
+
|
|
38
|
+
**Validation Report Structure** (`validation-report.json`):
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"skill_name": "...",
|
|
42
|
+
"execution_mode": "sequential|autonomous",
|
|
43
|
+
"generated_at": "ISO timestamp",
|
|
44
|
+
"file_checks": {
|
|
45
|
+
"total": N,
|
|
46
|
+
"existing": N,
|
|
47
|
+
"with_content": N,
|
|
48
|
+
"with_todos": N,
|
|
49
|
+
"details": [...]
|
|
50
|
+
},
|
|
51
|
+
"content_checks": {
|
|
52
|
+
"files_checked": N,
|
|
53
|
+
"all_passed": true|false,
|
|
54
|
+
"details": [...]
|
|
55
|
+
},
|
|
56
|
+
"summary": {
|
|
57
|
+
"status": "PASS|REVIEW|FAIL",
|
|
58
|
+
"issues": [...],
|
|
59
|
+
"recommendations": [...]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**README Structure** (`README.md`):
|
|
65
|
+
```markdown
|
|
66
|
+
# {display_name}
|
|
67
|
+
- Quick Start (Triggers, Execution Mode)
|
|
68
|
+
- Usage (Examples)
|
|
69
|
+
- Output (Format, Location, Filename)
|
|
70
|
+
- Directory Structure (Tree view)
|
|
71
|
+
- Customization (How to modify)
|
|
72
|
+
- Related Documents (Links)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Validation Status Gates**:
|
|
76
|
+
|
|
77
|
+
| Status | Condition | Meaning |
|
|
78
|
+
|--------|-----------|---------|
|
|
79
|
+
| PASS | All files exist + All content checks passed | Ready for use |
|
|
80
|
+
| REVIEW | All files exist + Some content checks failed | Needs refinement |
|
|
81
|
+
| FAIL | Missing files | Incomplete generation |
|
|
82
|
+
|
|
83
|
+
## Decision Logic
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Decision (Validation Flow):
|
|
87
|
+
├─ File Completeness Check
|
|
88
|
+
│ ├─ All files exist → Continue to content checks
|
|
89
|
+
│ └─ Missing files → Status = FAIL, collect missing file errors
|
|
90
|
+
│
|
|
91
|
+
├─ Content Quality Check
|
|
92
|
+
│ ├─ Sequential mode → Check phase files for structure
|
|
93
|
+
│ ├─ Autonomous mode → Check orchestrator + action files
|
|
94
|
+
│ └─ Common → Check SKILL.md, specs/, templates/
|
|
95
|
+
│
|
|
96
|
+
├─ Status Calculation
|
|
97
|
+
│ ├─ All files exist + All checks pass → Status = PASS
|
|
98
|
+
│ ├─ All files exist + Some checks fail → Status = REVIEW
|
|
99
|
+
│ └─ Missing files → Status = FAIL
|
|
100
|
+
│
|
|
101
|
+
└─ Generate Report & README
|
|
102
|
+
├─ validation-report.json (with issues and recommendations)
|
|
103
|
+
└─ README.md (with usage documentation)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Execution Protocol
|
|
20
107
|
|
|
21
108
|
```javascript
|
|
109
|
+
// Phase 5: Validation & Documentation
|
|
110
|
+
// Reference: phases/05-validation.md
|
|
111
|
+
|
|
112
|
+
// Load config and setup
|
|
22
113
|
const config = JSON.parse(Read(`${workDir}/skill-config.json`));
|
|
23
114
|
const skillDir = `.claude/skills/${config.skill_name}`;
|
|
24
115
|
|
|
116
|
+
// Step 1: File completeness check
|
|
25
117
|
const requiredFiles = {
|
|
26
118
|
common: [
|
|
27
119
|
'SKILL.md',
|
|
@@ -64,14 +156,11 @@ const fileCheckResults = filesToCheck.map(file => {
|
|
|
64
156
|
};
|
|
65
157
|
}
|
|
66
158
|
});
|
|
67
|
-
```
|
|
68
159
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```javascript
|
|
160
|
+
// Step 2: Content quality check
|
|
72
161
|
const contentChecks = [];
|
|
73
162
|
|
|
74
|
-
//
|
|
163
|
+
// Check SKILL.md structure
|
|
75
164
|
const skillMd = Read(`${skillDir}/SKILL.md`);
|
|
76
165
|
contentChecks.push({
|
|
77
166
|
file: 'SKILL.md',
|
|
@@ -83,11 +172,11 @@ contentChecks.push({
|
|
|
83
172
|
]
|
|
84
173
|
});
|
|
85
174
|
|
|
86
|
-
//
|
|
175
|
+
// Check phase files
|
|
87
176
|
const phaseFiles = Glob(`${skillDir}/phases/*.md`);
|
|
88
177
|
for (const phaseFile of phaseFiles) {
|
|
89
|
-
if (phaseFile.includes('/actions/')) continue; //
|
|
90
|
-
|
|
178
|
+
if (phaseFile.includes('/actions/')) continue; // Check separately
|
|
179
|
+
|
|
91
180
|
const content = Read(phaseFile);
|
|
92
181
|
contentChecks.push({
|
|
93
182
|
file: phaseFile.replace(skillDir + '/', ''),
|
|
@@ -100,7 +189,7 @@ for (const phaseFile of phaseFiles) {
|
|
|
100
189
|
});
|
|
101
190
|
}
|
|
102
191
|
|
|
103
|
-
//
|
|
192
|
+
// Check specs files
|
|
104
193
|
const specFiles = Glob(`${skillDir}/specs/*.md`);
|
|
105
194
|
for (const specFile of specFiles) {
|
|
106
195
|
const content = Read(specFile);
|
|
@@ -113,16 +202,13 @@ for (const specFile of specFiles) {
|
|
|
113
202
|
]
|
|
114
203
|
});
|
|
115
204
|
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Step 3: 生成验证报告
|
|
119
205
|
|
|
120
|
-
|
|
206
|
+
// Step 3: Generate validation report
|
|
121
207
|
const report = {
|
|
122
208
|
skill_name: config.skill_name,
|
|
123
209
|
execution_mode: config.execution_mode,
|
|
124
210
|
generated_at: new Date().toISOString(),
|
|
125
|
-
|
|
211
|
+
|
|
126
212
|
file_checks: {
|
|
127
213
|
total: fileCheckResults.length,
|
|
128
214
|
existing: fileCheckResults.filter(f => f.exists).length,
|
|
@@ -130,13 +216,13 @@ const report = {
|
|
|
130
216
|
with_todos: fileCheckResults.filter(f => f.hasTodo).length,
|
|
131
217
|
details: fileCheckResults
|
|
132
218
|
},
|
|
133
|
-
|
|
219
|
+
|
|
134
220
|
content_checks: {
|
|
135
221
|
files_checked: contentChecks.length,
|
|
136
222
|
all_passed: contentChecks.every(c => c.checks.every(ch => ch.pass)),
|
|
137
223
|
details: contentChecks
|
|
138
224
|
},
|
|
139
|
-
|
|
225
|
+
|
|
140
226
|
summary: {
|
|
141
227
|
status: calculateOverallStatus(fileCheckResults, contentChecks),
|
|
142
228
|
issues: collectIssues(fileCheckResults, contentChecks),
|
|
@@ -146,10 +232,11 @@ const report = {
|
|
|
146
232
|
|
|
147
233
|
Write(`${workDir}/validation-report.json`, JSON.stringify(report, null, 2));
|
|
148
234
|
|
|
235
|
+
// Helper functions
|
|
149
236
|
function calculateOverallStatus(fileResults, contentResults) {
|
|
150
237
|
const allFilesExist = fileResults.every(f => f.exists);
|
|
151
238
|
const allContentPassed = contentResults.every(c => c.checks.every(ch => ch.pass));
|
|
152
|
-
|
|
239
|
+
|
|
153
240
|
if (allFilesExist && allContentPassed) return 'PASS';
|
|
154
241
|
if (allFilesExist) return 'REVIEW';
|
|
155
242
|
return 'FAIL';
|
|
@@ -157,44 +244,41 @@ function calculateOverallStatus(fileResults, contentResults) {
|
|
|
157
244
|
|
|
158
245
|
function collectIssues(fileResults, contentResults) {
|
|
159
246
|
const issues = [];
|
|
160
|
-
|
|
247
|
+
|
|
161
248
|
fileResults.filter(f => !f.exists).forEach(f => {
|
|
162
249
|
issues.push({ type: 'ERROR', message: `文件缺失: ${f.file}` });
|
|
163
250
|
});
|
|
164
|
-
|
|
251
|
+
|
|
165
252
|
fileResults.filter(f => f.hasTodo).forEach(f => {
|
|
166
253
|
issues.push({ type: 'WARNING', message: `包含 TODO: ${f.file}` });
|
|
167
254
|
});
|
|
168
|
-
|
|
255
|
+
|
|
169
256
|
contentResults.forEach(c => {
|
|
170
257
|
c.checks.filter(ch => !ch.pass).forEach(ch => {
|
|
171
258
|
issues.push({ type: 'WARNING', message: `${c.file}: 缺少 ${ch.name}` });
|
|
172
259
|
});
|
|
173
260
|
});
|
|
174
|
-
|
|
261
|
+
|
|
175
262
|
return issues;
|
|
176
263
|
}
|
|
177
264
|
|
|
178
265
|
function generateRecommendations(fileResults, contentResults) {
|
|
179
266
|
const recommendations = [];
|
|
180
|
-
|
|
267
|
+
|
|
181
268
|
if (fileResults.some(f => f.hasTodo)) {
|
|
182
269
|
recommendations.push('替换所有 TODO 占位符为实际内容');
|
|
183
270
|
}
|
|
184
|
-
|
|
271
|
+
|
|
185
272
|
contentResults.forEach(c => {
|
|
186
273
|
if (c.checks.some(ch => !ch.pass)) {
|
|
187
274
|
recommendations.push(`完善 ${c.file} 的结构`);
|
|
188
275
|
}
|
|
189
276
|
});
|
|
190
|
-
|
|
277
|
+
|
|
191
278
|
return recommendations;
|
|
192
279
|
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### Step 4: 生成 README.md
|
|
196
280
|
|
|
197
|
-
|
|
281
|
+
// Step 4: Generate README.md
|
|
198
282
|
const readme = `# ${config.display_name}
|
|
199
283
|
|
|
200
284
|
${config.description}
|
|
@@ -210,10 +294,10 @@ ${config.triggers.map(t => `- "${t}"`).join('\n')}
|
|
|
210
294
|
**${config.execution_mode === 'sequential' ? 'Sequential (顺序)' : 'Autonomous (自主)'}**
|
|
211
295
|
|
|
212
296
|
${config.execution_mode === 'sequential' ?
|
|
213
|
-
`阶段按固定顺序执行:\n${config.sequential_config.phases.map((p, i) =>
|
|
297
|
+
`阶段按固定顺序执行:\n${config.sequential_config.phases.map((p, i) =>
|
|
214
298
|
`${i + 1}. ${p.name}`
|
|
215
299
|
).join('\n')}` :
|
|
216
|
-
`动作由编排器动态选择:\n${config.autonomous_config.actions.map(a =>
|
|
300
|
+
`动作由编排器动态选择:\n${config.autonomous_config.actions.map(a =>
|
|
217
301
|
`- ${a.name}: ${a.description || ''}`
|
|
218
302
|
).join('\n')}`}
|
|
219
303
|
|
|
@@ -283,24 +367,21 @@ ${config.execution_mode === 'sequential' ?
|
|
|
283
367
|
`;
|
|
284
368
|
|
|
285
369
|
Write(`${skillDir}/README.md`, readme);
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Step 5: 输出最终结果
|
|
289
370
|
|
|
290
|
-
|
|
371
|
+
// Step 5: Output final result
|
|
291
372
|
const finalResult = {
|
|
292
373
|
skill_name: config.skill_name,
|
|
293
374
|
skill_path: skillDir,
|
|
294
375
|
execution_mode: config.execution_mode,
|
|
295
|
-
|
|
376
|
+
|
|
296
377
|
generated_files: [
|
|
297
378
|
'SKILL.md',
|
|
298
379
|
'README.md',
|
|
299
380
|
...filesToCheck
|
|
300
381
|
],
|
|
301
|
-
|
|
382
|
+
|
|
302
383
|
validation: report.summary,
|
|
303
|
-
|
|
384
|
+
|
|
304
385
|
next_steps: [
|
|
305
386
|
'1. 审阅生成的文件结构',
|
|
306
387
|
'2. 替换 TODO 占位符',
|
|
@@ -319,16 +400,18 @@ console.log('下一步:');
|
|
|
319
400
|
finalResult.next_steps.forEach(s => console.log(s));
|
|
320
401
|
```
|
|
321
402
|
|
|
322
|
-
##
|
|
323
|
-
|
|
324
|
-
- `{workDir}/validation-report.json` - 验证报告
|
|
325
|
-
- `{skillDir}/README.md` - 使用说明
|
|
403
|
+
## Workflow Completion
|
|
326
404
|
|
|
327
|
-
|
|
405
|
+
**Final Status**: Skill generation pipeline complete
|
|
328
406
|
|
|
329
|
-
|
|
407
|
+
**Generated Artifacts**:
|
|
408
|
+
- Complete skill directory structure in `.claude/skills/{skill-name}/`
|
|
409
|
+
- Validation report in `{workDir}/validation-report.json`
|
|
410
|
+
- User documentation in `{skillDir}/README.md`
|
|
330
411
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
412
|
+
**Next Steps**:
|
|
413
|
+
1. Review validation report for any issues or recommendations
|
|
414
|
+
2. Replace TODO placeholders with actual implementation
|
|
415
|
+
3. Test skill execution with trigger words
|
|
416
|
+
4. Customize phase logic based on specific requirements
|
|
417
|
+
5. Update triggers and descriptions as needed
|