bmad-module-skill-forge 1.1.0 → 1.3.0
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-plugin/marketplace.json +1 -1
- package/README.md +6 -4
- package/docs/_data/pinned.yaml +1 -1
- package/docs/bmad-synergy.md +2 -2
- package/docs/getting-started.md +1 -1
- package/docs/skill-model.md +26 -32
- package/docs/troubleshooting.md +13 -1
- package/docs/why-skf.md +5 -4
- package/docs/workflows.md +53 -0
- package/package.json +2 -2
- package/src/knowledge/ccc-bridge.md +1 -1
- package/src/shared/references/output-contract-schema.md +10 -0
- package/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json +134 -0
- package/src/shared/scripts/skf-detect-tools.py +359 -0
- package/src/shared/scripts/skf-emit-result-envelope.py +419 -0
- package/src/shared/scripts/skf-extract-public-api.py +505 -0
- package/src/shared/scripts/skf-forge-tier-rw.py +413 -0
- package/src/shared/scripts/skf-merge-ccc-exclusions.py +324 -0
- package/src/shared/scripts/skf-preflight.py +14 -4
- package/src/shared/scripts/skf-qmd-classify-collections.py +212 -0
- package/src/shared/scripts/skf-render-quick-metadata.py +192 -0
- package/src/shared/scripts/skf-resolve-package.py +264 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +9 -3
- package/src/shared/scripts/skf-validate-output.py +24 -7
- package/src/skf-create-skill/steps-c/step-06-validate.md +1 -1
- package/src/skf-quick-skill/SKILL.md +178 -10
- package/src/skf-quick-skill/assets/skill-template.md +5 -1
- package/src/skf-quick-skill/references/registry-resolution.md +2 -0
- package/src/skf-quick-skill/steps-c/step-01-resolve-target.md +84 -16
- package/src/skf-quick-skill/steps-c/step-02-ecosystem-check.md +3 -3
- package/src/skf-quick-skill/steps-c/step-03-quick-extract.md +86 -43
- package/src/skf-quick-skill/steps-c/step-04-compile.md +49 -56
- package/src/skf-quick-skill/steps-c/step-05-write-and-validate.md +164 -0
- package/src/skf-quick-skill/steps-c/{step-06-write.md → step-06-finalize.md} +15 -7
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +5 -3
- package/src/skf-setup/SKILL.md +25 -10
- package/src/skf-setup/references/tier-rules.md +2 -2
- package/src/skf-setup/steps-c/step-01-detect-and-tier.md +58 -71
- package/src/skf-setup/steps-c/step-01b-ccc-index.md +49 -66
- package/src/skf-setup/steps-c/step-02-write-config.md +59 -86
- package/src/skf-setup/steps-c/step-03-auto-index.md +73 -91
- package/src/skf-setup/steps-c/step-04-report.md +135 -11
- package/src/skf-setup/steps-c/step-05-health-check.md +4 -2
- package/src/skf-test-skill/steps-c/step-01-init.md +4 -4
- package/src/skf-quick-skill/steps-c/step-05-validate.md +0 -193
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
nextStepFile: './step-06-write.md'
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Step 5: Write & Validate
|
|
6
|
-
|
|
7
|
-
## STEP GOAL:
|
|
8
|
-
|
|
9
|
-
To write the compiled SKILL.md, context-snippet.md, and metadata.json to the versioned skill package, then validate them on disk against the agentskills.io specification at community tier. Writing happens here (before step-06 finalization) because `skill-check` is a file-based CLI — it reads artifacts from disk — so the files must exist before validation runs. Report any gaps or issues. Validation is advisory — issues are reported but do not block the workflow.
|
|
10
|
-
|
|
11
|
-
## Rules
|
|
12
|
-
|
|
13
|
-
- Write exactly what was compiled — do not modify content during writing
|
|
14
|
-
- Validation is advisory — report issues but never block output
|
|
15
|
-
- Do not modify compiled content post-validation — report only
|
|
16
|
-
- Community-tier validation (lighter than official requirements)
|
|
17
|
-
|
|
18
|
-
## MANDATORY SEQUENCE
|
|
19
|
-
|
|
20
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
21
|
-
|
|
22
|
-
### 1. Create Output Directory
|
|
23
|
-
|
|
24
|
-
Resolve `{version}` from the extraction inventory's detected version, defaulting to `1.0.0` if not detected. Create the skill output directories:
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
{skill_group} # {skills_output_folder}/{repo_name}/
|
|
28
|
-
{skill_package} # {skills_output_folder}/{repo_name}/{version}/{repo_name}/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
If `{skill_package}` already exists, confirm with user before overwriting:
|
|
32
|
-
|
|
33
|
-
"**Directory `{skill_package}` already exists.** Overwrite will replace the prior compiled output; validation results, result contracts, and any manual tweaks from the previous run will not be preserved. Overwrite existing files? [Y/N]"
|
|
34
|
-
|
|
35
|
-
- **If user selects Y:** Proceed to section 2.
|
|
36
|
-
- **If user selects N:** Halt with: "Overwrite cancelled. Existing skill preserved. Run [QS] with a different skill name or remove the existing directory manually."
|
|
37
|
-
|
|
38
|
-
**GATE [default: Y]** — If `{headless_mode}` is true, auto-proceed with Y and log: "headless: overwriting existing `{skill_package}`".
|
|
39
|
-
|
|
40
|
-
### 2. Write Deliverables
|
|
41
|
-
|
|
42
|
-
Write the three compiled artifacts to the skill package so that validation in sections 3–9 has files on disk to read:
|
|
43
|
-
|
|
44
|
-
**File 1:** `{skill_package}/SKILL.md` — the compiled skill document
|
|
45
|
-
**File 2:** `{skill_package}/context-snippet.md` — the compressed context snippet
|
|
46
|
-
**File 3:** `{skill_package}/metadata.json` — the machine-readable metadata
|
|
47
|
-
|
|
48
|
-
Confirm after each write: "Written: SKILL.md" / "Written: context-snippet.md" / "Written: metadata.json".
|
|
49
|
-
|
|
50
|
-
**If any write fails — HARD HALT:**
|
|
51
|
-
|
|
52
|
-
"**Write failed:** Could not write to `{file_path}`.
|
|
53
|
-
|
|
54
|
-
Error: {error details}
|
|
55
|
-
|
|
56
|
-
Please check:
|
|
57
|
-
- Does the output directory exist and is it writable?
|
|
58
|
-
- Is there sufficient disk space?
|
|
59
|
-
- Are there permission issues?"
|
|
60
|
-
|
|
61
|
-
### 3. Check Tool Availability
|
|
62
|
-
|
|
63
|
-
Run: `npx skill-check -h`
|
|
64
|
-
|
|
65
|
-
- If succeeds (returns usage information): Continue to automated validation (section 4)
|
|
66
|
-
- If fails (command not found or error): Skip to manual fallback in section 4
|
|
67
|
-
|
|
68
|
-
**Important:** Use the verification command. Do not assume availability — empirical check required.
|
|
69
|
-
|
|
70
|
-
### 4. Validate SKILL.md via skill-check (if available)
|
|
71
|
-
|
|
72
|
-
**If `npx skill-check` is available**, run automated validation with auto-fix against the skill package written in section 2:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npx skill-check check {skill_package} --fix --format json --no-security-scan
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This validates frontmatter, description, body limits, links, and formatting — and auto-fixes deterministic issues (field ordering, slug format, required fields, trailing newlines).
|
|
79
|
-
|
|
80
|
-
**Parse JSON output** to extract:
|
|
81
|
-
- `qualityScore` — overall score (0-100)
|
|
82
|
-
- `diagnostics[]` — remaining issues after auto-fix
|
|
83
|
-
- `fixed[]` — issues automatically corrected
|
|
84
|
-
|
|
85
|
-
Record quality score and any remaining diagnostics as validation issues.
|
|
86
|
-
|
|
87
|
-
**If skill-check is NOT available**, perform manual frontmatter check:
|
|
88
|
-
|
|
89
|
-
- [ ] **Frontmatter present** — file starts with `---` delimiter and has closing `---`
|
|
90
|
-
- [ ] **`name` field** — present, non-empty, lowercase alphanumeric + hyphens only, 1-64 chars
|
|
91
|
-
- [ ] **`name` matches directory** — frontmatter `name` matches the skill output directory name
|
|
92
|
-
- [ ] **`description` field** — present, non-empty, 1-1024 characters
|
|
93
|
-
- [ ] **No unknown fields** — only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools` are permitted
|
|
94
|
-
|
|
95
|
-
**For each violation, log an issue.** Missing frontmatter or missing required fields are high-severity issues — skills without valid frontmatter will fail `npx skills add` and `npx skill-check check`.
|
|
96
|
-
|
|
97
|
-
### 5. Validate SKILL.md Body Structure
|
|
98
|
-
|
|
99
|
-
Check that SKILL.md has these required sections populated:
|
|
100
|
-
|
|
101
|
-
- [ ] **Overview section** present with package name, repo, language, authority
|
|
102
|
-
- [ ] **Description section** present with non-empty content
|
|
103
|
-
- [ ] **Key Exports section** present (may be empty if confidence is low)
|
|
104
|
-
- [ ] **Usage Patterns section** present (may have README fallback)
|
|
105
|
-
|
|
106
|
-
**For each missing or empty required section, log an issue.**
|
|
107
|
-
|
|
108
|
-
### 6. Validate Context Snippet Format
|
|
109
|
-
|
|
110
|
-
Check context-snippet.md format compliance:
|
|
111
|
-
|
|
112
|
-
- [ ] **Vercel-aligned indexed format** — pipe-delimited with version, retrieval instruction, section anchors
|
|
113
|
-
- [ ] **First line** matches pattern: `[{name} v{version}]|root: {prefix}{name}/` where prefix is `skills/` (draft form) or any IDE skill root (`.{dir}/skills/`)
|
|
114
|
-
- [ ] **Second line** starts with: `|IMPORTANT:`
|
|
115
|
-
- [ ] **Approximate token count** is ~80-120 tokens
|
|
116
|
-
|
|
117
|
-
**If format is wrong, log an issue.**
|
|
118
|
-
|
|
119
|
-
### 7. Validate Metadata JSON
|
|
120
|
-
|
|
121
|
-
Check metadata.json has required fields:
|
|
122
|
-
|
|
123
|
-
- [ ] `name` — present, non-empty
|
|
124
|
-
- [ ] `version` — present (auto-detected or "1.0.0")
|
|
125
|
-
- [ ] `source_authority` — must be "community"
|
|
126
|
-
- [ ] `source_repo` — present, valid GitHub URL
|
|
127
|
-
- [ ] `language` — present, non-empty
|
|
128
|
-
- [ ] `generated_by` — must be "quick-skill"
|
|
129
|
-
- [ ] `generation_date` — present
|
|
130
|
-
- [ ] `stats.exports_documented` — present, number
|
|
131
|
-
- [ ] `stats.exports_public_api` — present, number
|
|
132
|
-
- [ ] `stats.exports_total` — present, number
|
|
133
|
-
- [ ] `stats.public_api_coverage` — present, number
|
|
134
|
-
- [ ] `stats.total_coverage` — present, number
|
|
135
|
-
- [ ] `confidence_tier` — present
|
|
136
|
-
|
|
137
|
-
**For each missing or invalid field, log an issue.**
|
|
138
|
-
|
|
139
|
-
### 8. Security Scan (if skill-check available)
|
|
140
|
-
|
|
141
|
-
Run security scan on the compiled skill package:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
npx skill-check check {skill_package} --format json
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
(Security scan is enabled by default when `--no-security-scan` is omitted.)
|
|
148
|
-
|
|
149
|
-
Record any security findings as advisory warnings. Security issues do not block output.
|
|
150
|
-
|
|
151
|
-
**If skill-check unavailable:** Skip with note in validation results.
|
|
152
|
-
|
|
153
|
-
### 9. Report Validation Results
|
|
154
|
-
|
|
155
|
-
"**Validation complete:**
|
|
156
|
-
|
|
157
|
-
**SKILL.md:** {pass/issues found} (quality score: {score}/100 if skill-check was available)
|
|
158
|
-
{list any issues}
|
|
159
|
-
{list any auto-fixed issues}
|
|
160
|
-
|
|
161
|
-
**context-snippet.md:** {pass/issues found}
|
|
162
|
-
{list any issues}
|
|
163
|
-
|
|
164
|
-
**metadata.json:** {pass/issues found}
|
|
165
|
-
{list any issues}
|
|
166
|
-
|
|
167
|
-
**Security:** {pass/warn/skipped}
|
|
168
|
-
{list any security findings}
|
|
169
|
-
|
|
170
|
-
**Overall:** {pass / N issues found}
|
|
171
|
-
|
|
172
|
-
{If issues found:}
|
|
173
|
-
These issues are advisory for community-tier skills. You can proceed to finalize or go back to adjust.
|
|
174
|
-
|
|
175
|
-
**Proceeding to finalize...**"
|
|
176
|
-
|
|
177
|
-
Set `validation_result` with pass/fail status, quality score, and issues list.
|
|
178
|
-
|
|
179
|
-
### 10. Auto-Proceed to Finalize
|
|
180
|
-
|
|
181
|
-
#### Menu Handling Logic:
|
|
182
|
-
|
|
183
|
-
- After validation report, immediately load, read entire file, then execute {nextStepFile}
|
|
184
|
-
|
|
185
|
-
#### EXECUTION RULES:
|
|
186
|
-
|
|
187
|
-
- This is an auto-proceed step — validation is advisory
|
|
188
|
-
- Proceed directly to finalize step after reporting results
|
|
189
|
-
|
|
190
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
191
|
-
|
|
192
|
-
ONLY WHEN deliverables have been written to `{skill_package}` and validation checks are complete and results reported will you load and read fully `{nextStepFile}` to execute finalization.
|
|
193
|
-
|