bmad-module-skill-forge 0.2.0 → 0.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/README.md +88 -44
- package/docs/agents.md +1 -1
- package/docs/architecture.md +49 -20
- package/docs/examples.md +13 -2
- package/docs/getting-started.md +15 -13
- package/docs/index.md +3 -1
- package/docs/workflows.md +2 -2
- package/package.json +5 -3
- package/src/forger/forge-tier.yaml +1 -1
- package/src/forger/preferences.yaml +8 -1
- package/src/knowledge/doc-fetcher.md +55 -0
- package/src/knowledge/overview.md +17 -16
- package/src/knowledge/progressive-capability.md +9 -1
- package/src/knowledge/provenance-tracking.md +31 -23
- package/src/knowledge/qmd-registry.md +132 -0
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/workflows/analyze-source/data/skill-brief-schema.md +24 -4
- package/src/workflows/analyze-source/steps-c/step-01-init.md +19 -9
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +10 -2
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +17 -2
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +2 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +3 -3
- package/src/workflows/analyze-source/templates/analysis-report-template.md +1 -1
- package/src/workflows/analyze-source/validation-report.md +1 -1
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
- package/src/workflows/analyze-source/workflow.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +8 -5
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +12 -2
- package/src/workflows/audit-skill/validation-report.md +2 -2
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +1 -1
- package/src/workflows/brief-skill/data/scope-templates.md +60 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +38 -3
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +20 -4
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +20 -64
- package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +60 -5
- package/src/workflows/brief-skill/workflow.md +2 -1
- package/src/workflows/create-skill/data/compile-assembly-rules.md +110 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +248 -0
- package/src/workflows/create-skill/data/skill-sections.md +79 -25
- package/src/workflows/create-skill/data/source-resolution-protocols.md +130 -0
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +7 -4
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +10 -7
- package/src/workflows/create-skill/steps-c/step-03-extract.md +49 -9
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +238 -0
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +220 -0
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +40 -10
- package/src/workflows/create-skill/steps-c/step-05-compile.md +48 -81
- package/src/workflows/create-skill/steps-c/step-06-validate.md +149 -63
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +53 -3
- package/src/workflows/create-skill/steps-c/step-08-report.md +1 -1
- package/src/workflows/create-skill/workflow-plan-create-skill.md +42 -10
- package/src/workflows/create-skill/workflow.md +3 -2
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +20 -7
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +2 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +14 -0
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +28 -7
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +10 -7
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +66 -68
- package/src/workflows/create-stack-skill/validation-report.md +1 -1
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +4 -4
- package/src/workflows/export-skill/data/managed-section-format.md +1 -0
- package/src/workflows/export-skill/data/snippet-format.md +33 -14
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +16 -2
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +29 -22
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +1 -1
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/validation-report.md +1 -1
- package/src/workflows/export-skill/workflow-plan-export-skill.md +8 -8
- package/src/workflows/quick-skill/data/skill-template.md +27 -7
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +44 -13
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +79 -16
- package/src/workflows/quick-skill/validation-report.md +4 -4
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +4 -4
- package/src/workflows/quick-skill/workflow.md +2 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +12 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +10 -2
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +111 -40
- package/src/workflows/setup-forge/steps-c/step-04-report.md +13 -0
- package/src/workflows/setup-forge/workflow.md +1 -0
- package/src/workflows/test-skill/data/scoring-rules.md +14 -6
- package/src/workflows/test-skill/data/source-access-protocol.md +37 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +38 -13
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -3
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +25 -5
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +18 -43
- package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +213 -0
- package/src/workflows/test-skill/steps-c/step-05-score.md +24 -27
- package/src/workflows/test-skill/steps-c/step-06-report.md +9 -4
- package/src/workflows/test-skill/templates/test-report-template.md +2 -1
- package/src/workflows/test-skill/validation-report.md +1 -1
- package/src/workflows/test-skill/workflow-plan-test-skill.md +7 -3
- package/src/workflows/test-skill/workflow.md +1 -1
- package/src/workflows/update-skill/data/remote-source-resolution.md +43 -0
- package/src/workflows/update-skill/steps-c/step-01-init.md +13 -7
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +26 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +37 -9
- package/src/workflows/update-skill/steps-c/step-04-merge.md +3 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +63 -67
- package/src/workflows/update-skill/steps-c/step-06-write.md +37 -14
- package/src/workflows/update-skill/steps-c/step-07-report.md +1 -1
- package/src/workflows/update-skill/validation-report.md +4 -4
- package/src/workflows/update-skill/workflow-plan-update-skill.md +4 -4
- package/src/workflows/update-skill/workflow.md +1 -1
- package/tools/cli/commands/status.js +4 -4
- package/tools/cli/commands/uninstall.js +1 -1
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ui.js +60 -16
- package/tools/cli/lib/version-check.js +2 -2
|
@@ -53,7 +53,43 @@ To validate the compiled SKILL.md, context-snippet.md, and metadata.json against
|
|
|
53
53
|
|
|
54
54
|
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
55
55
|
|
|
56
|
-
### 1.
|
|
56
|
+
### 1. Check Tool Availability
|
|
57
|
+
|
|
58
|
+
Run: `npx skill-check -h`
|
|
59
|
+
|
|
60
|
+
- If succeeds (returns usage information): Continue to automated validation (section 2)
|
|
61
|
+
- If fails (command not found or error): Skip to manual fallback in section 2
|
|
62
|
+
|
|
63
|
+
**Important:** Use the verification command. Do not assume availability — empirical check required.
|
|
64
|
+
|
|
65
|
+
### 2. Validate SKILL.md via skill-check (if available)
|
|
66
|
+
|
|
67
|
+
**If `npx skill-check` is available**, run automated validation with auto-fix:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx skill-check check <skill-dir> --fix --format json --no-security-scan
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This validates frontmatter, description, body limits, links, and formatting — and auto-fixes deterministic issues (field ordering, slug format, required fields, trailing newlines).
|
|
74
|
+
|
|
75
|
+
**Parse JSON output** to extract:
|
|
76
|
+
- `qualityScore` — overall score (0-100)
|
|
77
|
+
- `diagnostics[]` — remaining issues after auto-fix
|
|
78
|
+
- `fixed[]` — issues automatically corrected
|
|
79
|
+
|
|
80
|
+
Record quality score and any remaining diagnostics as validation issues.
|
|
81
|
+
|
|
82
|
+
**If skill-check is NOT available**, perform manual frontmatter check:
|
|
83
|
+
|
|
84
|
+
- [ ] **Frontmatter present** — file starts with `---` delimiter and has closing `---`
|
|
85
|
+
- [ ] **`name` field** — present, non-empty, lowercase alphanumeric + hyphens only, 1-64 chars
|
|
86
|
+
- [ ] **`name` matches directory** — frontmatter `name` matches the skill output directory name
|
|
87
|
+
- [ ] **`description` field** — present, non-empty, 1-1024 characters
|
|
88
|
+
- [ ] **No unknown fields** — only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools` are permitted
|
|
89
|
+
|
|
90
|
+
**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`.
|
|
91
|
+
|
|
92
|
+
### 3. Validate SKILL.md Body Structure
|
|
57
93
|
|
|
58
94
|
Check that SKILL.md has these required sections populated:
|
|
59
95
|
|
|
@@ -64,39 +100,58 @@ Check that SKILL.md has these required sections populated:
|
|
|
64
100
|
|
|
65
101
|
**For each missing or empty required section, log an issue.**
|
|
66
102
|
|
|
67
|
-
###
|
|
103
|
+
### 4. Validate Context Snippet Format
|
|
68
104
|
|
|
69
105
|
Check context-snippet.md format compliance:
|
|
70
106
|
|
|
71
|
-
- [ ] **
|
|
72
|
-
- [ ] **First line** matches pattern: `{name}: {
|
|
73
|
-
- [ ] **Second line**
|
|
74
|
-
- [ ] **Approximate token count** is ~
|
|
107
|
+
- [ ] **Vercel-aligned indexed format** — pipe-delimited with version, retrieval instruction, section anchors
|
|
108
|
+
- [ ] **First line** matches pattern: `[{name} v{version}]|root: skills/{name}/`
|
|
109
|
+
- [ ] **Second line** starts with: `|IMPORTANT:`
|
|
110
|
+
- [ ] **Approximate token count** is ~80-120 tokens
|
|
75
111
|
|
|
76
112
|
**If format is wrong, log an issue.**
|
|
77
113
|
|
|
78
|
-
###
|
|
114
|
+
### 5. Validate Metadata JSON
|
|
79
115
|
|
|
80
116
|
Check metadata.json has required fields:
|
|
81
117
|
|
|
82
118
|
- [ ] `name` — present, non-empty
|
|
83
|
-
- [ ] `version` — present (
|
|
119
|
+
- [ ] `version` — present (auto-detected or "0.1.0")
|
|
84
120
|
- [ ] `source_authority` — must be "community"
|
|
85
121
|
- [ ] `source_repo` — present, valid GitHub URL
|
|
86
122
|
- [ ] `language` — present, non-empty
|
|
87
123
|
- [ ] `generated_by` — must be "quick-skill"
|
|
88
|
-
- [ ] `
|
|
89
|
-
- [ ] `
|
|
90
|
-
- [ ] `
|
|
124
|
+
- [ ] `generation_date` — present
|
|
125
|
+
- [ ] `stats.exports_documented` — present, number
|
|
126
|
+
- [ ] `stats.exports_public_api` — present, number
|
|
127
|
+
- [ ] `stats.exports_total` — present, number
|
|
128
|
+
- [ ] `stats.public_api_coverage` — present, number
|
|
129
|
+
- [ ] `stats.total_coverage` — present, number
|
|
130
|
+
- [ ] `confidence_tier` — present
|
|
91
131
|
|
|
92
132
|
**For each missing or invalid field, log an issue.**
|
|
93
133
|
|
|
94
|
-
###
|
|
134
|
+
### 6. Security Scan (if skill-check available)
|
|
135
|
+
|
|
136
|
+
Run security scan on the compiled skill:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npx skill-check check <skill-dir> --format json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
(Security scan is enabled by default when `--no-security-scan` is omitted.)
|
|
143
|
+
|
|
144
|
+
Record any security findings as advisory warnings. Security issues do not block output.
|
|
145
|
+
|
|
146
|
+
**If skill-check unavailable:** Skip with note in validation results.
|
|
147
|
+
|
|
148
|
+
### 7. Report Validation Results
|
|
95
149
|
|
|
96
150
|
"**Validation complete:**
|
|
97
151
|
|
|
98
|
-
**SKILL.md:** {pass/issues found}
|
|
152
|
+
**SKILL.md:** {pass/issues found} (quality score: {score}/100 if skill-check was available)
|
|
99
153
|
{list any issues}
|
|
154
|
+
{list any auto-fixed issues}
|
|
100
155
|
|
|
101
156
|
**context-snippet.md:** {pass/issues found}
|
|
102
157
|
{list any issues}
|
|
@@ -104,6 +159,9 @@ Check metadata.json has required fields:
|
|
|
104
159
|
**metadata.json:** {pass/issues found}
|
|
105
160
|
{list any issues}
|
|
106
161
|
|
|
162
|
+
**Security:** {pass/warn/skipped}
|
|
163
|
+
{list any security findings}
|
|
164
|
+
|
|
107
165
|
**Overall:** {pass / N issues found}
|
|
108
166
|
|
|
109
167
|
{If issues found:}
|
|
@@ -111,9 +169,9 @@ These issues are advisory for community-tier skills. You can proceed to write ou
|
|
|
111
169
|
|
|
112
170
|
**Proceeding to write output...**"
|
|
113
171
|
|
|
114
|
-
Set `validation_result` with pass/fail status and issues list.
|
|
172
|
+
Set `validation_result` with pass/fail status, quality score, and issues list.
|
|
115
173
|
|
|
116
|
-
###
|
|
174
|
+
### 8. Auto-Proceed to Write
|
|
117
175
|
|
|
118
176
|
#### Menu Handling Logic:
|
|
119
177
|
|
|
@@ -134,10 +192,14 @@ ONLY WHEN validation checks are complete and results reported will you load and
|
|
|
134
192
|
|
|
135
193
|
### ✅ SUCCESS:
|
|
136
194
|
|
|
195
|
+
- `npx skill-check check --fix --format json` executed if available (or manual fallback)
|
|
196
|
+
- Quality score (0-100) captured when skill-check available
|
|
197
|
+
- Auto-fix applied via `--fix` for deterministic issues
|
|
198
|
+
- Security scan executed (or skipped with note)
|
|
137
199
|
- All three outputs validated against requirements
|
|
138
200
|
- Issues reported clearly with specific details
|
|
139
201
|
- Community-tier validation applied (not official-tier strictness)
|
|
140
|
-
- validation_result set with pass/fail and issues list
|
|
202
|
+
- validation_result set with pass/fail, quality score, and issues list
|
|
141
203
|
- Auto-proceeding to write step
|
|
142
204
|
|
|
143
205
|
### ❌ SYSTEM FAILURE:
|
|
@@ -146,5 +208,6 @@ ONLY WHEN validation checks are complete and results reported will you load and
|
|
|
146
208
|
- Blocking output on validation issues (advisory only)
|
|
147
209
|
- Skipping validation checks
|
|
148
210
|
- Not reporting found issues
|
|
211
|
+
- Not recording quality score when skill-check is available
|
|
149
212
|
|
|
150
213
|
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -190,13 +190,13 @@ None.
|
|
|
190
190
|
### Document Production
|
|
191
191
|
|
|
192
192
|
- **Produces documents:** Yes — multi-file output (SKILL.md, context-snippet.md, metadata.json)
|
|
193
|
-
- **Template type:** Structured (SKILL.md sections) + Strict (snippet
|
|
193
|
+
- **Template type:** Structured (SKILL.md sections) + Strict (snippet ADR-L v2 format, metadata JSON schema)
|
|
194
194
|
- **Template location:** data/skill-template.md — serves as reference guide for section structure and format specifications
|
|
195
195
|
|
|
196
196
|
### Template Assessment
|
|
197
197
|
|
|
198
198
|
- ✅ data/skill-template.md exists and defines required/optional sections for SKILL.md
|
|
199
|
-
- ✅ Defines ADR-L
|
|
199
|
+
- ✅ Defines ADR-L v2 format for context-snippet.md
|
|
200
200
|
- ✅ Defines JSON schema for metadata.json with required fields
|
|
201
201
|
- ✅ Template type matches design (structured + strict)
|
|
202
202
|
- Note: No templates/ folder — template is in data/ because it's a reference guide, not a progressively-filled document template
|
|
@@ -243,7 +243,7 @@ No dedicated steps-v/ folder (create-only lifecycle, by design).
|
|
|
243
243
|
|
|
244
244
|
**Inline validation:** step-05-validate.md provides advisory community-tier validation:
|
|
245
245
|
- ✅ Checks SKILL.md required sections
|
|
246
|
-
- ✅ Checks context-snippet.md format (
|
|
246
|
+
- ✅ Checks context-snippet.md format (ADR-L v2)
|
|
247
247
|
- ✅ Checks metadata.json required fields
|
|
248
248
|
- ✅ Reports issues without blocking (advisory)
|
|
249
249
|
- ✅ Auto-proceeds to write step regardless of findings
|
|
@@ -449,7 +449,7 @@ None.
|
|
|
449
449
|
| Input: language hint (optional) | Optional | step-01 accepts, overrides detection | ✅ |
|
|
450
450
|
| Input: scope hint (optional) | Optional | step-01 accepts, step-03 uses for focused reading | ✅ |
|
|
451
451
|
| Output: SKILL.md | Structured sections | step-04 assembles from template, step-06 writes | ✅ |
|
|
452
|
-
| Output: context-snippet.md | ADR-L
|
|
452
|
+
| Output: context-snippet.md | ADR-L v2 | step-04 generates, step-05 validates format | ✅ |
|
|
453
453
|
| Output: metadata.json | Strict JSON schema | step-04 generates, step-05 validates fields | ✅ |
|
|
454
454
|
| Instruction style: prescriptive | Prescriptive pipeline | All steps use mandatory sequences, forbidden rules | ✅ |
|
|
455
455
|
|
|
@@ -156,7 +156,7 @@ Document-producing workflow generating three files:
|
|
|
156
156
|
- Type: multi-file document output
|
|
157
157
|
- Files:
|
|
158
158
|
- `{skills_output_folder}/{name}/SKILL.md` — structured template following agentskills.io spec sections
|
|
159
|
-
- `{skills_output_folder}/{name}/context-snippet.md` —
|
|
159
|
+
- `{skills_output_folder}/{name}/context-snippet.md` — ADR-L v2 format (~50-80 tokens)
|
|
160
160
|
- `{skills_output_folder}/{name}/metadata.json` — strict JSON with `source_authority: community`
|
|
161
161
|
- Format: structured (SKILL.md), strict (context-snippet.md, metadata.json)
|
|
162
162
|
- Frequency: single run per skill
|
|
@@ -165,7 +165,7 @@ Document-producing workflow generating three files:
|
|
|
165
165
|
- Package/URL successfully resolved to GitHub repo source
|
|
166
166
|
- Public exports documented (best-effort, may be incomplete)
|
|
167
167
|
- Valid SKILL.md with core sections populated
|
|
168
|
-
- context-snippet.md in correct
|
|
168
|
+
- context-snippet.md in correct ADR-L v2 format
|
|
169
169
|
- metadata.json with `source_authority: community` and required fields
|
|
170
170
|
- No ecosystem duplicate if official skill already exists (user chose to proceed)
|
|
171
171
|
|
|
@@ -277,14 +277,14 @@ quick-skill/
|
|
|
277
277
|
**Step 04 — compile (Checkpoint):**
|
|
278
278
|
- Load skill-template.md from data/
|
|
279
279
|
- Assemble SKILL.md from extraction_inventory
|
|
280
|
-
- Generate context-snippet.md in
|
|
280
|
+
- Generate context-snippet.md in ADR-L v2 format (~50-80 tokens)
|
|
281
281
|
- Generate metadata.json with source_authority: community
|
|
282
282
|
- Present compiled SKILL.md for review
|
|
283
283
|
- [C] Continue to validation
|
|
284
284
|
|
|
285
285
|
**Step 05 — validate (Auto-proceed):**
|
|
286
286
|
- Check SKILL.md has required sections populated
|
|
287
|
-
- Check context-snippet.md format compliance (
|
|
287
|
+
- Check context-snippet.md format compliance (ADR-L v2)
|
|
288
288
|
- Check metadata.json has required fields
|
|
289
289
|
- Community-tier validation (lighter than official)
|
|
290
290
|
- Report any gaps/issues
|
|
@@ -9,6 +9,8 @@ installed_path: '{project-root}/_bmad/skf/workflows/quick-skill'
|
|
|
9
9
|
|
|
10
10
|
**Goal:** The fastest path to a skill — accept a GitHub URL or package name, resolve to source, extract public API surface, and produce a best-effort SKILL.md with context snippet and metadata. No brief needed.
|
|
11
11
|
|
|
12
|
+
> **Note:** Quick Skill is tier-unaware by design. It does not load forge-tier.yaml or check preferences.yaml for tier_override. All output is produced at community-tier quality regardless of available tools.
|
|
13
|
+
|
|
12
14
|
**Your Role:** In addition to your name, communication_style, and persona, you are also a rapid skill compiler collaborating with a developer. This is a partnership, not a client-vendor relationship. You bring source analysis and skill document assembly expertise, while the user brings the target package or repository they want to create a skill for. Work together efficiently — speed is the priority.
|
|
13
15
|
|
|
14
16
|
---
|
|
@@ -86,7 +86,16 @@ Run: `qmd status`
|
|
|
86
86
|
- If succeeds and indicates operational: record `{qmd: true}`
|
|
87
87
|
- If fails or indicates not initialized: record `{qmd: false}`
|
|
88
88
|
|
|
89
|
-
### 6.
|
|
89
|
+
### 6. Check Optional: Security Scan (SNYK_TOKEN)
|
|
90
|
+
|
|
91
|
+
Check if the `SNYK_TOKEN` environment variable is set:
|
|
92
|
+
|
|
93
|
+
- If `SNYK_TOKEN` is non-empty: record `{security_scan: true}`
|
|
94
|
+
- If `SNYK_TOKEN` is empty or unset: record `{security_scan: false}`
|
|
95
|
+
|
|
96
|
+
This is informational only — security scan availability does NOT affect the tier level. It is recorded in forge-tier.yaml so that create-skill's validation step can report actionable guidance when security scanning is unavailable.
|
|
97
|
+
|
|
98
|
+
### 7. Calculate Tier
|
|
90
99
|
|
|
91
100
|
**If `{tier_override}` is set and valid (Quick, Forge, or Deep):**
|
|
92
101
|
- Use `{tier_override}` as `{calculated_tier}`
|
|
@@ -99,7 +108,7 @@ Run: `qmd status`
|
|
|
99
108
|
|
|
100
109
|
**If `{tier_override}` is set but invalid:** ignore it, use detected tier, flag for warning in report.
|
|
101
110
|
|
|
102
|
-
###
|
|
111
|
+
### 8. Auto-Proceed
|
|
103
112
|
|
|
104
113
|
"**Proceeding to write configuration...**"
|
|
105
114
|
|
|
@@ -114,7 +123,7 @@ Run: `qmd status`
|
|
|
114
123
|
|
|
115
124
|
## CRITICAL STEP COMPLETION NOTE
|
|
116
125
|
|
|
117
|
-
ONLY WHEN all 3 tools have been verified and the tier
|
|
126
|
+
ONLY WHEN all 3 core tools have been verified, optional security scan checked, and the tier calculated will you load and read fully `{nextStepFile}` to execute the configuration write step.
|
|
118
127
|
|
|
119
128
|
---
|
|
120
129
|
|
|
@@ -63,11 +63,16 @@ tools:
|
|
|
63
63
|
ast_grep: {true/false from detection}
|
|
64
64
|
gh_cli: {true/false from detection}
|
|
65
65
|
qmd: {true/false from detection}
|
|
66
|
+
security_scan: {true/false — true when SNYK_TOKEN is set}
|
|
66
67
|
|
|
67
68
|
# Capability tier (derived from tool availability)
|
|
68
|
-
# Quick = no tools | Forge = ast-grep | Deep = ast-grep + gh +
|
|
69
|
+
# Quick = no tools required | Forge = + ast-grep | Deep = + ast-grep + gh + QMD
|
|
69
70
|
tier: {calculated_tier}
|
|
70
71
|
tier_detected_at: {current ISO timestamp}
|
|
72
|
+
|
|
73
|
+
# QMD collection registry (populated by create-skill, consumed by audit/update-skill)
|
|
74
|
+
# Each entry tracks a QMD collection created during skill workflows
|
|
75
|
+
qmd_collections: []
|
|
71
76
|
```
|
|
72
77
|
|
|
73
78
|
**This file is ALWAYS overwritten** on every run — it reflects current tool state.
|
|
@@ -88,6 +93,9 @@ Check if `{project-root}/_bmad/_memory/forger-sidecar/preferences.yaml` exists:
|
|
|
88
93
|
# Override detected tier (set to Quick, Forge, or Deep to force a tier)
|
|
89
94
|
tier_override: ~
|
|
90
95
|
|
|
96
|
+
# Passive context injection (set to false to skip snippet generation and CLAUDE.md updates during export)
|
|
97
|
+
passive_context: true
|
|
98
|
+
|
|
91
99
|
# Skill generation defaults
|
|
92
100
|
default_source_authority: community
|
|
93
101
|
default_confidence_threshold: 0.7
|
|
@@ -125,7 +133,7 @@ ONLY WHEN forge-tier.yaml has been written successfully and preferences.yaml exi
|
|
|
125
133
|
|
|
126
134
|
### ✅ SUCCESS:
|
|
127
135
|
|
|
128
|
-
- forge-tier.yaml written with accurate tool booleans, tier, and
|
|
136
|
+
- forge-tier.yaml written with accurate tool booleans, tier, timestamp, and empty qmd_collections registry
|
|
129
137
|
- preferences.yaml exists (created with defaults on first run, preserved on re-run)
|
|
130
138
|
- forge-data/ directory exists (created or pre-existing)
|
|
131
139
|
- Auto-proceeded to step-03
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-03-auto-index'
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Verify and clean QMD collections against the forge-tier.yaml registry (Deep tier only)'
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-04-report.md'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Step 3:
|
|
8
|
+
# Step 3: QMD Collection Hygiene
|
|
9
9
|
|
|
10
10
|
## STEP GOAL:
|
|
11
11
|
|
|
12
|
-
If the detected tier is Deep,
|
|
12
|
+
If the detected tier is Deep, verify the health of existing QMD collections by cross-referencing them against the `qmd_collections` registry in `forge-tier.yaml`. Identify orphaned collections (in QMD but not in registry) and stale registry entries (in registry but collection missing from QMD). Prompt the user before removing orphaned collections.
|
|
13
|
+
|
|
14
|
+
For Quick and Forge tiers, skip silently and proceed.
|
|
13
15
|
|
|
14
16
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
17
|
|
|
@@ -17,34 +19,37 @@ If the detected tier is Deep, index the current project as a QMD collection for
|
|
|
17
19
|
|
|
18
20
|
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
19
21
|
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
20
|
-
- 🎯 Execute all operations autonomously —
|
|
22
|
+
- 🎯 Execute all operations autonomously — minimal user interaction (only prompt before deletion)
|
|
21
23
|
|
|
22
24
|
### Role Reinforcement:
|
|
23
25
|
|
|
24
|
-
- ✅ You are a system executor performing
|
|
25
|
-
- ✅ Graceful degradation is paramount — never fail the workflow over
|
|
26
|
+
- ✅ You are a system executor performing QMD collection maintenance
|
|
27
|
+
- ✅ Graceful degradation is paramount — never fail the workflow over hygiene checks
|
|
26
28
|
- ✅ No negative messaging — do not mention what non-Deep tiers are missing
|
|
27
29
|
|
|
28
30
|
### Step-Specific Rules:
|
|
29
31
|
|
|
30
|
-
- 🎯 Focus only on QMD
|
|
32
|
+
- 🎯 Focus only on verifying and cleaning QMD collections (Deep tier) or graceful skip (other tiers)
|
|
31
33
|
- 🚫 FORBIDDEN to display "missing" or "skipped" messages for non-Deep tiers
|
|
32
|
-
- 🚫 FORBIDDEN to fail the workflow if QMD
|
|
33
|
-
-
|
|
34
|
+
- 🚫 FORBIDDEN to fail the workflow if QMD hygiene encounters errors
|
|
35
|
+
- 🚫 FORBIDDEN to create new QMD collections — that responsibility belongs to create-skill
|
|
36
|
+
- 🚫 FORBIDDEN to silently delete collections — always prompt user before removal
|
|
37
|
+
- 💬 If hygiene fails: log the issue, note that it can be retried, continue
|
|
34
38
|
|
|
35
39
|
## EXECUTION PROTOCOLS:
|
|
36
40
|
|
|
37
41
|
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
38
|
-
- 💾 QMD
|
|
42
|
+
- 💾 QMD hygiene only verifies and cleans — it does NOT index new content
|
|
39
43
|
- 📖 Use {calculated_tier} from step-01 context
|
|
40
|
-
- 🚫 FORBIDDEN to attempt
|
|
44
|
+
- 🚫 FORBIDDEN to attempt hygiene for Quick or Forge tiers
|
|
41
45
|
|
|
42
46
|
## CONTEXT BOUNDARIES:
|
|
43
47
|
|
|
44
48
|
- Available: {calculated_tier} from step-01, forge-tier.yaml written in step-02
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
49
|
+
- Available: {project_name} from workflow config
|
|
50
|
+
- Focus: QMD collection verification and cleanup only
|
|
51
|
+
- Limits: only run if Deep tier
|
|
52
|
+
- Dependencies: step-02 must have completed (forge-tier.yaml exists with qmd_collections registry)
|
|
48
53
|
|
|
49
54
|
## MANDATORY SEQUENCE
|
|
50
55
|
|
|
@@ -54,46 +59,105 @@ If the detected tier is Deep, index the current project as a QMD collection for
|
|
|
54
59
|
|
|
55
60
|
Read `{calculated_tier}` from context.
|
|
56
61
|
|
|
57
|
-
**If tier is NOT Deep:** Proceed directly to
|
|
62
|
+
**If tier is NOT Deep:** Proceed directly to section 6 (Auto-Proceed) — no output, no messaging.
|
|
58
63
|
|
|
59
64
|
**If tier IS Deep:** Continue to section 2.
|
|
60
65
|
|
|
61
|
-
### 2.
|
|
66
|
+
### 2. Load Registry and QMD State
|
|
67
|
+
|
|
68
|
+
Read the `qmd_collections` array from `{project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml`.
|
|
69
|
+
|
|
70
|
+
List live QMD collections:
|
|
71
|
+
```bash
|
|
72
|
+
qmd collection list
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Store both lists for cross-reference:**
|
|
76
|
+
- `{registry_collections}` — entries from forge-tier.yaml qmd_collections
|
|
77
|
+
- `{live_collections}` — collections currently in QMD
|
|
78
|
+
|
|
79
|
+
**Error handling:** If `qmd collection list` fails, log the error, store `{hygiene_result: "qmd_unavailable"}`, and proceed to section 6.
|
|
80
|
+
|
|
81
|
+
### 3. Cross-Reference and Classify
|
|
82
|
+
|
|
83
|
+
Compare the two lists:
|
|
84
|
+
|
|
85
|
+
**Healthy** — collection exists in both registry AND QMD:
|
|
86
|
+
- Mark as verified
|
|
87
|
+
- No action needed
|
|
88
|
+
|
|
89
|
+
**Orphaned** — collection exists in QMD but NOT in registry:
|
|
90
|
+
- These may be leftover from prior auto-indexing or manual indexing
|
|
91
|
+
- Flag for user-prompted removal
|
|
92
|
+
|
|
93
|
+
**Stale** — entry exists in registry but collection is missing from QMD:
|
|
94
|
+
- The QMD collection was deleted or lost
|
|
95
|
+
- Remove the stale entry from the registry
|
|
96
|
+
|
|
97
|
+
### 4. Handle Orphaned Collections
|
|
98
|
+
|
|
99
|
+
**If orphaned collections found:**
|
|
100
|
+
|
|
101
|
+
Display to user:
|
|
102
|
+
"**QMD Hygiene: Found {count} orphaned collection(s) not tracked in the forge registry:**
|
|
103
|
+
|
|
104
|
+
{list orphaned collection names}
|
|
105
|
+
|
|
106
|
+
These collections exist in QMD but are not managed by any skill workflow. They may be from a previous auto-index run or manual creation.
|
|
107
|
+
|
|
108
|
+
**[R]emove** orphaned collections — clean up QMD
|
|
109
|
+
**[K]eep** orphaned collections — leave them as-is"
|
|
110
|
+
|
|
111
|
+
**If user selects R (Remove):**
|
|
112
|
+
For each orphaned collection:
|
|
113
|
+
```bash
|
|
114
|
+
qmd collection remove {collection_name}
|
|
115
|
+
```
|
|
116
|
+
Log each removal.
|
|
117
|
+
|
|
118
|
+
**If user selects K (Keep):**
|
|
119
|
+
Skip removal. Log that orphaned collections were kept.
|
|
120
|
+
|
|
121
|
+
**If no orphaned collections:** Skip this section silently.
|
|
122
|
+
|
|
123
|
+
### 5. Handle Stale Registry Entries
|
|
124
|
+
|
|
125
|
+
**If stale registry entries found:**
|
|
126
|
+
|
|
127
|
+
Remove stale entries from the `qmd_collections` array in forge-tier.yaml.
|
|
62
128
|
|
|
63
|
-
|
|
129
|
+
Display: "**Cleaned {count} stale registry entry/entries** (collection no longer exists in QMD)."
|
|
64
130
|
|
|
65
|
-
|
|
66
|
-
- Collection name: derive from project directory name
|
|
67
|
-
- Source: project root directory
|
|
68
|
-
- Scope: markdown files, source code, documentation
|
|
131
|
+
Update forge-tier.yaml with the cleaned registry.
|
|
69
132
|
|
|
70
|
-
**
|
|
71
|
-
- Log that indexing is in progress but may need more time
|
|
72
|
-
- Note in context that index may be incomplete
|
|
73
|
-
- Do NOT halt or fail the workflow
|
|
133
|
+
**If no stale entries:** Skip this section silently.
|
|
74
134
|
|
|
75
|
-
|
|
76
|
-
- Log the specific error
|
|
77
|
-
- Note that indexing can be retried by re-running setup-forge
|
|
78
|
-
- The forge-tier.yaml already records `qmd: true` — the tool is available even if indexing failed
|
|
79
|
-
- Continue to step 4
|
|
135
|
+
### 6. Store Hygiene Results and Auto-Proceed
|
|
80
136
|
|
|
81
|
-
|
|
137
|
+
Store in context for step-04 reporting:
|
|
138
|
+
```
|
|
139
|
+
{hygiene_result: "completed"|"skipped"|"qmd_unavailable"}
|
|
140
|
+
{hygiene_healthy: count}
|
|
141
|
+
{hygiene_orphaned_removed: count}
|
|
142
|
+
{hygiene_orphaned_kept: count}
|
|
143
|
+
{hygiene_stale_cleaned: count}
|
|
144
|
+
```
|
|
82
145
|
|
|
83
146
|
"**Proceeding to forge status report...**"
|
|
84
147
|
|
|
85
148
|
#### Menu Handling Logic:
|
|
86
149
|
|
|
87
|
-
- After
|
|
150
|
+
- After hygiene completes (or is skipped), immediately load, read entire file, then execute {nextStepFile}
|
|
88
151
|
|
|
89
152
|
#### EXECUTION RULES:
|
|
90
153
|
|
|
91
|
-
- This
|
|
92
|
-
-
|
|
154
|
+
- This step has one optional user interaction (orphan removal prompt)
|
|
155
|
+
- If no orphans found, this is an auto-proceed step
|
|
156
|
+
- Proceed directly to next step after hygiene or skip
|
|
93
157
|
|
|
94
158
|
## CRITICAL STEP COMPLETION NOTE
|
|
95
159
|
|
|
96
|
-
ONLY WHEN the
|
|
160
|
+
ONLY WHEN the hygiene check has been performed (or skipped for non-Deep tiers) will you load and read fully `{nextStepFile}` to execute the report step.
|
|
97
161
|
|
|
98
162
|
---
|
|
99
163
|
|
|
@@ -101,16 +165,23 @@ ONLY WHEN the tier check has been performed (and indexing completed or skipped a
|
|
|
101
165
|
|
|
102
166
|
### ✅ SUCCESS:
|
|
103
167
|
|
|
104
|
-
- Deep tier:
|
|
168
|
+
- Deep tier: forge-tier.yaml registry cross-referenced with live QMD collections
|
|
169
|
+
- Healthy collections identified and verified
|
|
170
|
+
- Orphaned collections flagged and user prompted before removal
|
|
171
|
+
- Stale registry entries cleaned from forge-tier.yaml
|
|
172
|
+
- Hygiene results stored for step-04 reporting
|
|
105
173
|
- Quick/Forge tier: skipped silently with no negative messaging
|
|
106
|
-
- Workflow continues regardless of
|
|
174
|
+
- Workflow continues regardless of hygiene outcome
|
|
107
175
|
- Auto-proceeded to step-04
|
|
108
176
|
|
|
109
177
|
### ❌ SYSTEM FAILURE:
|
|
110
178
|
|
|
111
|
-
-
|
|
179
|
+
- Creating new QMD collections (that's create-skill's responsibility)
|
|
180
|
+
- Silently deleting collections without user prompt
|
|
181
|
+
- Attempting QMD hygiene for Quick or Forge tiers
|
|
112
182
|
- Displaying "skipped" or "missing" messages for non-Deep tiers
|
|
113
|
-
- Halting the workflow due to QMD
|
|
183
|
+
- Halting the workflow due to QMD hygiene failure
|
|
184
|
+
- Indexing project directories (old auto-index behavior — removed)
|
|
114
185
|
- Not proceeding to step-04 after this step
|
|
115
186
|
|
|
116
|
-
**Master Rule:** This step
|
|
187
|
+
**Master Rule:** This step ONLY verifies and cleans. It never indexes new content. QMD collection creation is the responsibility of create-skill. Non-Deep tiers skip silently. Always prompt before removing orphaned collections.
|
|
@@ -43,6 +43,7 @@ Display the forge status report with positive capability framing, report tier ch
|
|
|
43
43
|
|
|
44
44
|
- Available: {detected_tools}, {calculated_tier}, {previous_tier}, {tier_override} from step-01
|
|
45
45
|
- Available: tool version strings from step-01
|
|
46
|
+
- Available: {hygiene_result}, {hygiene_healthy}, {hygiene_orphaned_removed}, {hygiene_orphaned_kept}, {hygiene_stale_cleaned} from step-03
|
|
46
47
|
- Focus: report display only — no file modifications
|
|
47
48
|
- Dependencies: steps 01-03 must have completed
|
|
48
49
|
|
|
@@ -69,6 +70,18 @@ Load and read {tierRulesData} for the tier capability descriptions and re-run me
|
|
|
69
70
|
Tools Detected:
|
|
70
71
|
{for each tool that is available, show: tool name — version}
|
|
71
72
|
|
|
73
|
+
{if hygiene_result is "completed":}
|
|
74
|
+
QMD Registry:
|
|
75
|
+
{hygiene_healthy} collection(s) healthy
|
|
76
|
+
{if hygiene_orphaned_removed > 0: {hygiene_orphaned_removed} orphaned collection(s) removed}
|
|
77
|
+
{if hygiene_orphaned_kept > 0: {hygiene_orphaned_kept} orphaned collection(s) kept}
|
|
78
|
+
{if hygiene_stale_cleaned > 0: {hygiene_stale_cleaned} stale registry entry/entries cleaned}
|
|
79
|
+
{end if}
|
|
80
|
+
|
|
81
|
+
{if hygiene_result is "completed" and hygiene_healthy is 0:}
|
|
82
|
+
QMD Registry: empty — collections are created automatically when you run [CS] Create Skill.
|
|
83
|
+
{end if}
|
|
84
|
+
|
|
72
85
|
{if tier_override is active:}
|
|
73
86
|
Note: Tier override active (set in preferences.yaml)
|
|
74
87
|
|
|
@@ -8,18 +8,24 @@
|
|
|
8
8
|
|
|
9
9
|
| Category | Weight | Description |
|
|
10
10
|
|----------|--------|-------------|
|
|
11
|
-
| Export Coverage |
|
|
12
|
-
| Signature Accuracy |
|
|
13
|
-
| Type Coverage |
|
|
14
|
-
| Coherence (contextual) |
|
|
11
|
+
| Export Coverage | 36% | Percentage of source exports documented in SKILL.md |
|
|
12
|
+
| Signature Accuracy | 22% | Documented signatures match actual source signatures |
|
|
13
|
+
| Type Coverage | 14% | Types and interfaces referenced are complete |
|
|
14
|
+
| Coherence (contextual) | 18% | Cross-references valid, integration patterns complete |
|
|
15
15
|
| Coherence (naive) | 0% | Not applicable — weight redistributed to other categories |
|
|
16
|
+
| External Validation | 10% | Average of skill-check quality score + tessl average score (redistributed if unavailable) |
|
|
16
17
|
|
|
17
18
|
## Naive Mode Weight Redistribution
|
|
18
19
|
|
|
19
20
|
When running in naive mode (no coherence category):
|
|
20
|
-
- Export Coverage:
|
|
21
|
-
- Signature Accuracy:
|
|
21
|
+
- Export Coverage: 45%
|
|
22
|
+
- Signature Accuracy: 25%
|
|
22
23
|
- Type Coverage: 20%
|
|
24
|
+
- External Validation: 10%
|
|
25
|
+
|
|
26
|
+
## External Validation Unavailable
|
|
27
|
+
|
|
28
|
+
When neither skill-check nor tessl is available, redistribute the 10% external validation weight proportionally to the other active categories. When only one tool is available, use that tool's score as the external validation score.
|
|
23
29
|
|
|
24
30
|
## Tier-Dependent Scoring
|
|
25
31
|
|
|
@@ -40,6 +46,7 @@ When running in naive mode (no coherence category):
|
|
|
40
46
|
- Cross-repository reference verification
|
|
41
47
|
- QMD knowledge enrichment for coherence
|
|
42
48
|
- Full scoring formula with maximum depth
|
|
49
|
+
- **Migration & Deprecation Warnings section:** If T2-future annotations exist in the enrichment data, verify that Section 4b is present in SKILL.md Tier 1 and that each warning traces to a T2 provenance citation. If no T2-future annotations exist, Section 4b should be absent (not empty). Presence/absence mismatch is a Medium severity gap.
|
|
43
50
|
|
|
44
51
|
## Score Calculation
|
|
45
52
|
|
|
@@ -70,5 +77,6 @@ If no integration patterns exist, combined coherence equals reference validity.
|
|
|
70
77
|
| Critical | Missing exported function/class documentation |
|
|
71
78
|
| High | Signature mismatch between source and SKILL.md |
|
|
72
79
|
| Medium | Missing type or interface documentation |
|
|
80
|
+
| Medium | Migration section present/absent mismatch with T2-future annotation data (Deep tier) |
|
|
73
81
|
| Low | Missing optional metadata or examples |
|
|
74
82
|
| Info | Style suggestions, non-blocking observations |
|