bmad-module-skill-forge 0.8.4 → 0.10.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.
Files changed (82) hide show
  1. package/README.md +5 -3
  2. package/docs/bmad-synergy.md +183 -0
  3. package/docs/concepts.md +30 -2
  4. package/docs/examples.md +57 -17
  5. package/docs/getting-started.md +17 -0
  6. package/docs/how-it-works.md +143 -29
  7. package/docs/index.md +1 -1
  8. package/docs/workflows.md +43 -5
  9. package/package.json +1 -1
  10. package/src/README.md +47 -0
  11. package/src/agents/forger.agent.yaml +8 -0
  12. package/src/knowledge/agentskills-spec.md +3 -0
  13. package/src/knowledge/overview.md +1 -0
  14. package/src/knowledge/provenance-tracking.md +3 -0
  15. package/src/knowledge/skf-knowledge-index.csv +1 -0
  16. package/src/knowledge/skill-lifecycle.md +19 -7
  17. package/src/knowledge/version-paths.md +243 -0
  18. package/src/module-help.csv +2 -0
  19. package/src/module.yaml +4 -0
  20. package/src/workflows/README.md +9 -1
  21. package/src/workflows/analyze-source/data/skill-brief-schema.md +4 -0
  22. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +5 -0
  23. package/src/workflows/audit-skill/steps-c/step-01-init.md +10 -6
  24. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +1 -1
  25. package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +1 -1
  26. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
  27. package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
  28. package/src/workflows/audit-skill/steps-c/step-06-report.md +7 -2
  29. package/src/workflows/brief-skill/data/skill-brief-schema.md +11 -0
  30. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +24 -1
  31. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +10 -0
  32. package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +9 -0
  33. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +18 -4
  34. package/src/workflows/create-skill/data/skill-sections.md +2 -0
  35. package/src/workflows/create-skill/data/source-resolution-protocols.md +40 -4
  36. package/src/workflows/create-skill/steps-c/step-03-extract.md +1 -1
  37. package/src/workflows/create-skill/steps-c/step-05-compile.md +1 -0
  38. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +48 -32
  39. package/src/workflows/create-skill/steps-c/step-08-report.md +16 -12
  40. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +12 -6
  41. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +4 -1
  42. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +11 -5
  43. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +1 -1
  44. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +1 -1
  45. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +40 -23
  46. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +6 -3
  47. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +11 -4
  48. package/src/workflows/drop-skill/steps-c/step-01-select.md +298 -0
  49. package/src/workflows/drop-skill/steps-c/step-02-execute.md +290 -0
  50. package/src/workflows/drop-skill/steps-c/step-03-report.md +136 -0
  51. package/src/workflows/drop-skill/workflow.md +63 -0
  52. package/src/workflows/export-skill/data/managed-section-format.md +33 -8
  53. package/src/workflows/export-skill/data/snippet-format.md +16 -4
  54. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +46 -7
  55. package/src/workflows/export-skill/steps-c/step-02-package.md +2 -2
  56. package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +39 -7
  57. package/src/workflows/export-skill/steps-c/step-04-update-context.md +185 -13
  58. package/src/workflows/export-skill/steps-c/step-05-token-report.md +2 -2
  59. package/src/workflows/export-skill/steps-c/step-06-summary.md +35 -8
  60. package/src/workflows/quick-skill/steps-c/step-01-resolve-target.md +10 -0
  61. package/src/workflows/quick-skill/steps-c/step-03-quick-extract.md +2 -0
  62. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  63. package/src/workflows/quick-skill/steps-c/step-06-write.md +36 -21
  64. package/src/workflows/refine-architecture/steps-c/step-01-init.md +8 -3
  65. package/src/workflows/refine-architecture/steps-c/step-06-report.md +7 -4
  66. package/src/workflows/rename-skill/steps-c/step-01-select.md +281 -0
  67. package/src/workflows/rename-skill/steps-c/step-02-execute.md +391 -0
  68. package/src/workflows/rename-skill/steps-c/step-03-report.md +133 -0
  69. package/src/workflows/rename-skill/workflow.md +64 -0
  70. package/src/workflows/setup-forge/steps-c/step-04-report.md +8 -5
  71. package/src/workflows/shared/health-check.md +231 -0
  72. package/src/workflows/test-skill/steps-c/step-01-init.md +14 -6
  73. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +1 -1
  74. package/src/workflows/test-skill/steps-c/step-06-report.md +4 -3
  75. package/src/workflows/update-skill/data/remote-source-resolution.md +18 -4
  76. package/src/workflows/update-skill/steps-c/step-01-init.md +15 -8
  77. package/src/workflows/update-skill/steps-c/step-06-write.md +43 -13
  78. package/src/workflows/update-skill/steps-c/step-07-report.md +13 -8
  79. package/src/workflows/verify-stack/steps-c/step-01-init.md +8 -3
  80. package/src/workflows/verify-stack/steps-c/step-06-report.md +6 -3
  81. package/tools/cli/lib/compiler.js +1 -1
  82. package/tools/cli/lib/ui.js +24 -2
@@ -11,7 +11,7 @@ This page is for people who want to understand how SKF works under the hood. It
11
11
 
12
12
  ## How BMad Works
13
13
 
14
- BMad works because it turns big, fuzzy work into **repeatable workflows**. Each workflow is broken into small steps with clear instructions, so the AI follows the same path every time. It also uses a **shared knowledge base** (standards and patterns) so outputs are consistent, not random. In short: **structured steps + shared standards = reliable results**.
14
+ [BMad](https://docs.bmad-method.org/) works because it turns big, fuzzy work into **repeatable workflows**. Each workflow is broken into small steps with clear instructions, so the AI follows the same path every time. It also uses a **shared knowledge base** (standards and patterns) so outputs are consistent, not random. In short: **structured steps + shared standards = reliable results**.
15
15
 
16
16
  ## How SKF Fits In
17
17
 
@@ -185,26 +185,135 @@ Your forge tier limits what authority claims a skill can make:
185
185
 
186
186
  ---
187
187
 
188
+ ## Completeness Scoring
189
+
190
+ The Test Skill workflow (`@Ferris TS`) calculates a **completeness score** — a weighted measure of how thoroughly and accurately a skill documents its target. This score is the quality gate: pass and the skill is ready for export; fail and it routes to update-skill for remediation.
191
+
192
+ ### Categories & Weights
193
+
194
+ The score is the weighted sum of five categories:
195
+
196
+ | Category | Weight | What It Measures |
197
+ |----------|--------|------------------|
198
+ | **Export Coverage** | 36% | Percentage of source exports documented in SKILL.md |
199
+ | **Signature Accuracy** | 22% | Documented function signatures match actual source signatures (parameter names, types, order, return types) |
200
+ | **Type Coverage** | 14% | Types and interfaces referenced in exports are fully documented |
201
+ | **Coherence** | 18% | Cross-references resolve, integration patterns are complete (contextual mode only) |
202
+ | **External Validation** | 10% | Average of skill-check quality score (0-100) and tessl content score (0-100%) |
203
+
204
+ ### Formula
205
+
206
+ ```
207
+ total_score = sum(category_weight × category_score)
208
+ ```
209
+
210
+ Each category score is a percentage: `(items_passing / items_total) × 100`.
211
+
212
+ **Coherence** (contextual mode) combines two sub-scores:
213
+
214
+ ```
215
+ coherence = (reference_validity × 0.6) + (integration_completeness × 0.4)
216
+ ```
217
+
218
+ If no integration patterns exist, coherence equals reference validity alone.
219
+
220
+ **External validation** averages the two tools when both are available. When only one tool is available, that tool's score is used. When neither is available, the 10% weight is redistributed proportionally to the other active categories.
221
+
222
+ ### Naive vs Contextual Mode
223
+
224
+ Test Skill runs in one of two modes, detected automatically:
225
+
226
+ - **Contextual mode** (stack skills) — All five categories scored with the default weights above.
227
+ - **Naive mode** (individual skills) — Coherence is not scored. Its 18% weight is redistributed:
228
+
229
+ | Category | Naive Weight |
230
+ |----------|-------------|
231
+ | Export Coverage | 45% |
232
+ | Signature Accuracy | 25% |
233
+ | Type Coverage | 20% |
234
+ | External Validation | 10% |
235
+
236
+ ### Tier Adjustments
237
+
238
+ Your forge tier determines which categories can be scored:
239
+
240
+ | Tier | Skipped Categories | Reason |
241
+ |------|-------------------|--------|
242
+ | **Quick** | Signature Accuracy, Type Coverage | No AST parsing available |
243
+ | **Docs-only** | Signature Accuracy, Type Coverage | No source code to compare against |
244
+ | **Provenance-map** (State 2) | Signature Accuracy, Type Coverage | String comparison only, no semantic AST verification |
245
+ | **Forge / Forge+ / Deep** | None | Full AST-backed scoring |
246
+
247
+ When categories are skipped, their combined weight (36%) is redistributed proportionally to the remaining active categories. A Quick-tier skill and a Deep-tier skill both pass at the same 80% threshold — the score reflects what your tier can actually measure.
248
+
249
+ ### Pass/Fail
250
+
251
+ ```
252
+ threshold = custom_threshold OR 80% (default)
253
+
254
+ score >= threshold → PASS → Recommend export-skill
255
+ score < threshold → FAIL → Recommend update-skill
256
+ ```
257
+
258
+ The default is 80%. You can override it by specifying a custom threshold when invoking the workflow (e.g., "test this skill with a 70% threshold").
259
+
260
+ ### Gap Severities
261
+
262
+ When the score is calculated, each finding is classified by severity to guide remediation:
263
+
264
+ | Severity | Examples |
265
+ |----------|----------|
266
+ | **Critical** | Missing exported function/class documentation |
267
+ | **High** | Signature mismatch between source and SKILL.md |
268
+ | **Medium** | Missing type/interface documentation; scripts/assets directory inconsistencies |
269
+ | **Low** | Missing optional metadata or examples; description optimization opportunities |
270
+ | **Info** | Style suggestions; discovery testing recommendations |
271
+
272
+ ### Score Report Output
273
+
274
+ The test report includes a score breakdown table showing each category's raw score, weight, and weighted contribution:
275
+
276
+ | Category | Score | Weight | Weighted |
277
+ |----------|-------|--------|----------|
278
+ | Export Coverage | 92% | 36% | 33.1% |
279
+ | Signature Accuracy | 85% | 22% | 18.7% |
280
+ | Type Coverage | 100% | 14% | 14.0% |
281
+ | Coherence | 80% | 18% | 14.4% |
282
+ | External Validation | 78% | 10% | 7.8% |
283
+ | **Total** | | **100%** | **88.0%** |
284
+
285
+ The report also records `analysisConfidence` (full, provenance-map, metadata-only, remote-only, or docs-only) and includes a degradation notice when source access was limited.
286
+
287
+ ---
288
+
188
289
  ## Output Architecture
189
290
 
190
291
  ### Per-Skill Output
191
292
 
192
- Every generated skill produces a self-contained directory:
293
+ Every generated skill produces a self-contained, version-aware directory:
193
294
 
194
295
  ```
195
296
  skills/{name}/
196
- ├── SKILL.md # Active skill (loaded on trigger)
197
- ├── context-snippet.md # Passive context (compressed, always-on)
198
- ├── metadata.json # Machine-readable provenance
199
- ├── references/ # Progressive disclosure
200
- ├── {function-a}.md
201
- └── {function-b}.md
202
- ├── scripts/ # Executable automation (when detected in source)
203
- └── {script-name}.sh
204
- └── assets/ # Templates, schemas, configs (when detected in source)
205
- └── {asset-name}.json
297
+ ├── active -> {version} # Symlink to current version
298
+ ├── {version}/
299
+ │ └── {name}/ # agentskills.io-compliant package
300
+ ├── SKILL.md # Active skill (loaded on trigger)
301
+ ├── context-snippet.md # Passive context (compressed, always-on)
302
+ ├── metadata.json # Machine-readable provenance
303
+ ├── references/ # Progressive disclosure
304
+ ├── {function-a}.md
305
+ │ │ └── {function-b}.md
306
+ │ ├── scripts/ # Executable automation (when detected in source)
307
+ │ │ └── {script-name}.sh
308
+ │ └── assets/ # Templates, schemas, configs (when detected in source)
309
+ │ └── {asset-name}.json
310
+ └── {older-version}/
311
+ └── {name}/ # Previous version preserved
312
+ └── ...
206
313
  ```
207
314
 
315
+ Multiple versions coexist under the same skill name. The `active` symlink points to the current version. Updating a skill for a new library release creates a new version directory — users pinned to older versions keep their skill intact. The inner `{name}/` directory is a standalone [agentskills.io](https://agentskills.io) package, directly installable via `npx skills add`.
316
+
208
317
  The `scripts/` and `assets/` directories are optional — only created when the source repository contains executable scripts or static assets matching detection heuristics. Each file traces to its source via `[SRC:file:L1]` provenance citations with SHA-256 content hashes for drift detection. User-authored files go in `scripts/[MANUAL]/` or `assets/[MANUAL]/` subdirectories and are preserved during updates.
209
318
 
210
319
  ### SKILL.md Format
@@ -247,6 +356,7 @@ Machine-readable provenance for every skill:
247
356
  "source_repo": "https://github.com/topoteretes/cognee",
248
357
  "source_root": "cognee/",
249
358
  "source_commit": null,
359
+ "source_ref": "v0.5.5",
250
360
  "confidence_tier": "Deep",
251
361
  "spec_version": "1.3",
252
362
  "generation_date": "2026-03-20T16:55:00+04:00",
@@ -272,15 +382,18 @@ Stack skills map how your dependencies interact — shared types, co-import patt
272
382
 
273
383
  ```
274
384
  skills/{project}-stack/
275
- ├── SKILL.md # Integration patterns + project conventions
276
- ├── context-snippet.md # Compressed stack index
277
- ├── metadata.json # Component versions, integration graph
278
- └── references/
279
- ├── nextjs.md # Project-specific subset
280
- ├── better-auth.md # Project-specific subset
281
- └── integrations/
282
- ├── auth-db.md # Cross-library pattern
283
- └── pwa-auth.md # Cross-library pattern
385
+ ├── active -> {version}
386
+ └── {version}/
387
+ └── {project}-stack/
388
+ ├── SKILL.md # Integration patterns + project conventions
389
+ ├── context-snippet.md # Compressed stack index
390
+ ├── metadata.json # Component versions, integration graph
391
+ └── references/
392
+ ├── nextjs.md # Project-specific subset
393
+ ├── better-auth.md # Project-specific subset
394
+ └── integrations/
395
+ ├── auth-db.md # Cross-library pattern
396
+ └── pwa-auth.md # Cross-library pattern
284
397
  ```
285
398
 
286
399
  The primary source is your project repo. Component references trace to library repos. `skill_type: "stack"` in metadata.
@@ -294,9 +407,9 @@ Based on [Vercel research](https://vercel.com/blog/agents-md-outperforms-skills-
294
407
  Every skill generates both:
295
408
 
296
409
  1. **SKILL.md** — Active skill loaded on trigger with full instructions
297
- 2. **context-snippet.md** — Passive context, compressed index; injected into CLAUDE.md/AGENTS.md only when `export-skill` is run
410
+ 2. **context-snippet.md** — Passive context, compressed index; injected into platform context files (CLAUDE.md/AGENTS.md/.cursorrules) only when `export-skill` is run. Export reads configured IDEs from `config.yaml` and writes to all target platforms in one pass.
298
411
 
299
- ### Managed CLAUDE.md Section
412
+ ### Managed Context Section
300
413
 
301
414
  Export injects a managed section between markers:
302
415
 
@@ -305,7 +418,7 @@ Export injects a managed section between markers:
305
418
  [SKF Skills]|1 skill
306
419
  |IMPORTANT: Prefer documented APIs over training data.
307
420
  |
308
- [cognee v0.5.5]|root: skills/cognee/
421
+ [cognee v0.5.5]|root: .agents/skills/cognee/
309
422
  |IMPORTANT: cognee v0.5.5 — read SKILL.md before writing cognee code. Do NOT rely on training data.
310
423
  |quick-start:{SKILL.md#quick-start} — add → cognify → search async workflow
311
424
  |api: add(), cognify(), search(), memify(), config, datasets, prune, update(), session, SearchType, run_custom_pipeline(), visualize_graph()
@@ -314,7 +427,7 @@ Export injects a managed section between markers:
314
427
  <!-- SKF:END -->
315
428
  ```
316
429
 
317
- ~80-120 tokens per skill (version-pinned, retrieval instruction, section anchors, inline gotchas). Aligned with [Vercel's research](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals) finding that indexed format with explicit retrieval instructions dramatically improves agent performance. Developer controls placement. Ferris controls content. Snippet updates only happen at `export-skill` — create and update are draft operations.
430
+ ~80-120 tokens per skill (version-pinned, retrieval instruction, section anchors, inline gotchas). Root paths are platform-aware (`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`). Aligned with [Vercel's research](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals) finding that indexed format with explicit retrieval instructions dramatically improves agent performance. Developer controls placement. Ferris controls content. Snippet updates only happen at `export-skill` — create and update are draft operations. An `.export-manifest.json` tracks which skills have been explicitly exported, preventing draft skills from leaking into the managed section.
318
431
 
319
432
  ---
320
433
 
@@ -361,10 +474,11 @@ Build artifacts are committable — another developer can reproduce the same ski
361
474
 
362
475
  ```
363
476
  forge-data/{skill-name}/
364
- ├── skill-brief.yaml # Compilation config
365
- ├── provenance-map.json # Source map with AST bindings
366
- ├── evidence-report.md # Build audit trail
367
- └── extraction-rules.yaml # Language-specific ast-grep schema
477
+ ├── skill-brief.yaml # Compilation config (version-independent)
478
+ └── {version}/
479
+ ├── provenance-map.json # Source map with AST bindings
480
+ ├── evidence-report.md # Build audit trail
481
+ └── extraction-rules.yaml # Language-specific ast-grep schema
368
482
  ```
369
483
 
370
484
  The `provenance-map.json` includes a `file_entries` array for script/asset file-level provenance (SHA-256 hashes, source paths) alongside the export-level `entries` array.
package/docs/index.md CHANGED
@@ -41,7 +41,7 @@ See the [Getting Started](./getting-started/) guide for full installation and us
41
41
  - **[Getting Started](./getting-started/)** — Installation, prerequisites, and your first skill
42
42
  - **[Concepts](./concepts/)** — Plain-English definitions of key terms (provenance, tiers, drift, and more)
43
43
  - **[How It Works](./how-it-works/)** — Architecture, capability model, output format, and design decisions
44
- - **[Workflows](./workflows/)** — All 12 workflows with commands and connection diagrams
44
+ - **[Workflows](./workflows/)** — All 14 workflows with commands and connection diagrams
45
45
  - **[Agents](./agents/)** — Ferris: the AI agent that runs all SKF workflows
46
46
  - **[Examples](./examples/)** — Real-world scenarios, tips, and troubleshooting
47
47
 
package/docs/workflows.md CHANGED
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  title: Workflows
3
- description: All 12 SKF workflows with commands, steps, and connection diagram
3
+ description: All 14 SKF workflows with commands, steps, and connection diagram
4
4
  ---
5
5
 
6
6
  # Workflows Reference
7
7
 
8
- SKF has 12 workflows. You trigger them by typing commands to [Ferris](../agents/), the AI agent that runs everything. Each workflow handles a specific part of the skill lifecycle — from analyzing source code to packaging for distribution. If any terms are unfamiliar, see the [Concepts](../concepts/) page for definitions.
8
+ SKF has 14 workflows. You trigger them by typing commands to [Ferris](../agents/), the AI agent that runs everything. Each workflow handles a specific part of the skill lifecycle — from analyzing source code to packaging for distribution, plus management operations for renaming and dropping skills. If any terms are unfamiliar, see the [Concepts](../concepts/) page for definitions.
9
+
10
+ > Already using BMAD? See [BMAD Synergy](../bmad-synergy/) for when to invoke each SKF workflow during BMM phases and alongside TEA, BMB, and GDS.
9
11
 
10
12
  ---
11
13
 
@@ -71,11 +73,11 @@ SKF has 12 workflows. You trigger them by typing commands to [Ferris](../agents/
71
73
 
72
74
  ### Quick Skill (QS)
73
75
 
74
- **Command:** `@Ferris QS <package-or-url>`
76
+ **Command:** `@Ferris QS <package-or-url>` or `@Ferris QS <package-or-url>@<version>`
75
77
 
76
78
  **Purpose:** Brief-less fast skill with package-to-repo resolution.
77
79
 
78
- **When to Use:** When you need a skill quickly — no brief needed. Accepts package names or GitHub URLs.
80
+ **When to Use:** When you need a skill quickly — no brief needed. Accepts package names or GitHub URLs. Append `@version` to target a specific version (e.g., `@Ferris QS cognee@0.5.0`).
79
81
 
80
82
  **Key Steps:** Resolve target → Ecosystem check → Quick extract → Compile → Validate → Write
81
83
 
@@ -139,6 +141,8 @@ SKF has 12 workflows. You trigger them by typing commands to [Ferris](../agents/
139
141
 
140
142
  **Key Steps:** Load skill → Detect mode → Coverage check → Coherence check → External validation (skill-check, tessl) → Score → Gap report
141
143
 
144
+ **Scored Categories:** Export Coverage (36%), Signature Accuracy (22%), Type Coverage (14%), Coherence (18%), External Validation (10%). Default pass threshold: **80%**. Pass routes to Export Skill; fail routes to Update Skill with a gap report. See [Completeness Scoring](../how-it-works/#completeness-scoring) for the full formula and tier adjustments.
145
+
142
146
  **Agent:** Ferris (Audit mode)
143
147
 
144
148
  ---
@@ -181,7 +185,7 @@ SKF has 12 workflows. You trigger them by typing commands to [Ferris](../agents/
181
185
 
182
186
  **Purpose:** Validate package structure, generate context snippets, and inject managed sections into CLAUDE.md/AGENTS.md/.cursorrules.
183
187
 
184
- **When to Use:** When a skill is ready for CLAUDE.md/AGENTS.md integration. Also provides distribution instructions for `npx skills publish`.
188
+ **When to Use:** When a skill is ready for CLAUDE.md/AGENTS.md integration. Also provides a local install command (`npx skills add <path>`) and distribution instructions for `npx skills publish`. See [Installation → Source Formats](https://www.npmjs.com/package/skills#installation) for other install methods.
185
189
 
186
190
  **Key Steps:** Load skill → Validate package → Generate snippet → Update context file (CLAUDE.md/AGENTS.md/.cursorrules) → Token report → Summary
187
191
 
@@ -189,6 +193,40 @@ SKF has 12 workflows. You trigger them by typing commands to [Ferris](../agents/
189
193
 
190
194
  ---
191
195
 
196
+ ## Management Workflows
197
+
198
+ ### Rename Skill (RS)
199
+
200
+ **Command:** `@Ferris RS`
201
+
202
+ **Purpose:** Rename a skill across all its versions. Because the agentskills.io spec requires `name` to match parent directory name, this is a coordinated move across outer/inner directories, SKILL.md frontmatter, metadata.json, context snippets, provenance maps, the export manifest, and platform context files.
203
+
204
+ **When to Use:** You need to change a skill's name — for example, graduating a `QS`-generated skill (named from the repo) to a formal name, or adding a suffix like `-community` to distinguish from an official skill.
205
+
206
+ **Key Steps:** Select skill + new name → Transactional copy → Update all references → Rebuild context files → Delete old name (point of no return)
207
+
208
+ **Safety:** Transactional — if any step fails before the final delete, the old skill remains intact. Warns if `source_authority: "official"` (rename is local-only; published registry skill won't change).
209
+
210
+ **Agent:** Ferris (Management mode)
211
+
212
+ ---
213
+
214
+ ### Drop Skill (DS)
215
+
216
+ **Command:** `@Ferris DS`
217
+
218
+ **Purpose:** Drop a specific skill version or an entire skill. Soft drop (default) marks the version as deprecated in the manifest and keeps files on disk. Hard drop (`--purge`) also deletes the files.
219
+
220
+ **When to Use:** Retire a deprecated version (e.g., drop `cognee 0.1.0` because it's obsolete), free disk space, or remove a skill you no longer need.
221
+
222
+ **Key Steps:** Select skill → Select version(s) + mode → Update manifest → Rebuild context files → Delete files (if purge)
223
+
224
+ **Safety:** Active version guard — cannot drop the currently active version when other non-deprecated versions exist (switch active first, or drop all). Soft drop is reversible by editing the manifest.
225
+
226
+ **Agent:** Ferris (Management mode)
227
+
228
+ ---
229
+
192
230
  ## Workflow Connections
193
231
 
194
232
  **Standard path (code-mode):**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-module-skill-forge",
4
- "version": "0.8.4",
4
+ "version": "0.10.0",
5
5
  "description": "BMAD module — Turn code and docs into instructions AI agents can actually follow. Progressive capability tiers (Quick/Forge/Forge+/Deep).",
6
6
  "keywords": [
7
7
  "bmad",
package/src/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # SKF Module Source
2
+
3
+ This directory contains the **Skill Forge (SKF)** BMAD module — the files that get installed into a BMAD project under `_bmad/skf/` when a user runs the installer.
4
+
5
+ For user-facing documentation (what SKF does, how to install it, how to use it), see the [repository README](../README.md) and the published docs at [armelhbobdad.github.io/bmad-module-skill-forge](https://armelhbobdad.github.io/bmad-module-skill-forge/).
6
+
7
+ ## Layout
8
+
9
+ ```
10
+ src/
11
+ ├── module.yaml # Module config: code, name, install prompts
12
+ ├── module-help.csv # Help registry — one row per agent command
13
+ ├── agents/
14
+ │ └── forger.agent.yaml # Ferris — the single agent persona
15
+ ├── workflows/ # 14 workflows (see workflows/README.md)
16
+ │ ├── setup-forge/
17
+ │ ├── analyze-source/
18
+ │ ├── brief-skill/
19
+ │ ├── create-skill/
20
+ │ ├── quick-skill/
21
+ │ ├── create-stack-skill/
22
+ │ ├── verify-stack/
23
+ │ ├── refine-architecture/
24
+ │ ├── update-skill/
25
+ │ ├── audit-skill/
26
+ │ ├── test-skill/
27
+ │ ├── export-skill/
28
+ │ ├── rename-skill/
29
+ │ └── drop-skill/
30
+ ├── knowledge/ # Cross-cutting knowledge fragments (JiT loaded)
31
+ │ └── skf-knowledge-index.csv
32
+ └── forger/ # Sidecar seed files (preferences, forge tier)
33
+ ```
34
+
35
+ ## Components
36
+
37
+ - **Agent:** [Ferris](agents/forger.agent.yaml) — single-persona module operating in four modes (Architect / Surgeon / Audit / Delivery)
38
+ - **Workflows:** see [workflows/README.md](workflows/README.md) for the full index, typical flows, and the knowledge-vs-data distinction
39
+ - **Knowledge fragments:** cross-cutting principles Ferris consults via `knowledge/skf-knowledge-index.csv`
40
+
41
+ ## Editing this module
42
+
43
+ - Agent edits — `agents/forger.agent.yaml`; validate with `bmad:bmb:agents:agent-validate`
44
+ - Workflow edits — each workflow in `workflows/{name}/`; validate with `bmad:bmb:workflows:workflow-validate`
45
+ - Module-level edits — `module.yaml` and `module-help.csv`; validate with `bmad:bmb:modules:validate-module`
46
+
47
+ See [CONTRIBUTING.md](../CONTRIBUTING.md) for the contribution workflow.
@@ -97,6 +97,14 @@ agent:
97
97
  workflow: "{project-root}/_bmad/skf/workflows/skillforge/export-skill/workflow.md"
98
98
  description: "[EX] Export Skill — package for distribution"
99
99
 
100
+ - trigger: RS or fuzzy match on rename-skill
101
+ workflow: "{project-root}/_bmad/skf/workflows/skillforge/rename-skill/workflow.md"
102
+ description: "[RS] Rename Skill — rename a skill across all its versions (transactional)"
103
+
104
+ - trigger: DS or fuzzy match on drop-skill
105
+ workflow: "{project-root}/_bmad/skf/workflows/skillforge/drop-skill/workflow.md"
106
+ description: "[DS] Drop Skill — deprecate (soft) or purge (hard) skill versions"
107
+
100
108
  - trigger: KI or fuzzy match on knowledge-index
101
109
  action: "Load and display {project-root}/_bmad/skf/knowledge/skf-knowledge-index.csv — cross-cutting knowledge fragments available for JiT loading"
102
110
  description: "[KI] Knowledge Index — list available knowledge fragments"
@@ -54,6 +54,8 @@ skill-name/
54
54
 
55
55
  All subdirectories are exactly one level deep. Files are loaded on demand when SKILL.md directs — never automatically.
56
56
 
57
+ **Version-aware storage:** Skill Forge stores skills in a version-nested layout: `{skill-name}/{version}/{skill-name}/`. The inner `{skill-name}/` directory is the agentskills.io-compliant package shown above. The outer `{skill-name}/` and `{version}/` directories are organizational wrappers managed by the forge — they are not part of the skill package structure. The "one level deep" subdirectory rule applies to the skill package root (the inner directory), not the forge's storage hierarchy. See [version-paths.md](version-paths.md) for full path resolution rules.
58
+
57
59
  Scripts and assets extracted by Skill Forge inherit provenance from their source repository. Each file receives a `[SRC:{source_path}:L1]` citation (T1-low confidence) and a SHA-256 content hash for drift detection. Scripts must follow the quality principles in the Script Quality section below. Assets are static files loaded on demand — agents use them as directed by SKILL.md instructions.
58
60
 
59
61
  ## Progressive Disclosure Model
@@ -179,5 +181,6 @@ Skills that include executable scripts in `scripts/` must follow these principle
179
181
  - [skill-lifecycle.md](skill-lifecycle.md) — where agentskills.io compliance fits in the pipeline
180
182
  - [confidence-tiers.md](confidence-tiers.md) — how citations appear within the formatted output
181
183
  - [zero-hallucination.md](zero-hallucination.md) — the integrity principle that shapes skill content
184
+ - [version-paths.md](version-paths.md) — version-aware storage layout and path resolution templates
182
185
 
183
186
  _Source: synthesized from agentskills.io specification, what-are-skills.mdx, integrate-skills.mdx, and Best Practices for Creating Agent Skills_
@@ -35,6 +35,7 @@ With knowledge files:
35
35
  | [architecture-verification.md](architecture-verification.md) | Pre-code verification pipeline, integration verdicts, iteration loop | VS, RA, SS |
36
36
  | [doc-fetcher.md](doc-fetcher.md) | T3 external documentation fetching, quarantine rules, tool-agnostic | CS, QS |
37
37
  | [split-body-strategy.md](split-body-strategy.md) | Selective vs full split-body, detection pattern, agent accuracy | CS, QS, US, TS, EX |
38
+ | [version-paths.md](version-paths.md) | Version-aware storage layout, path templates, export manifest v2, migration | CS, QS, SS, US, AS, TS, EX, VS, RA |
38
39
  | [overview.md](overview.md) | Knowledge map and JiT loading protocol (this file) | All (entry point) |
39
40
 
40
41
  ## JiT Loading Protocol
@@ -39,6 +39,7 @@ With provenance tracking:
39
39
  "skill_name": "express-skill",
40
40
  "source_repo": "https://github.com/expressjs/express",
41
41
  "source_commit": "abc1234",
42
+ "source_ref": "v0.5.0",
42
43
  "generated_at": "2025-01-15T10:30:00Z",
43
44
  "entries": [
44
45
  {
@@ -174,11 +175,13 @@ Citations appear directly in SKILL.md content:
174
175
  - Copying provenance from a previous extraction without re-verifying — timestamps must reflect actual verification time
175
176
  - Omitting the evidence report — it is required for every compilation, not optional
176
177
  - Using provenance from one source file version against a different version — provenance is version-bound
178
+ - Storing provenance at a flat path (`{forge_data_folder}/{skill-name}/provenance-map.json`) instead of the versioned path (`{forge_version}/provenance-map.json`) — each version has its own provenance chain (see [version-paths.md](version-paths.md))
177
179
 
178
180
  ## Related Fragments
179
181
 
180
182
  - [confidence-tiers.md](confidence-tiers.md) — defines the citation formats used in provenance
181
183
  - [zero-hallucination.md](zero-hallucination.md) — the principle that provenance enforces
182
184
  - [manual-section-integrity.md](manual-section-integrity.md) — how \[MANUAL\] sections interact with provenance
185
+ - [version-paths.md](version-paths.md) — version-aware storage layout where provenance artifacts are stored per-version
183
186
 
184
187
  _Source: consolidated from create-skill steps 03/05/07, audit-skill steps 02/03, and skill-sections.md_
@@ -13,3 +13,4 @@ doc-fetcher,Doc Fetcher,"T3 external documentation — tool-agnostic URL fetchin
13
13
  architecture-verification,Architecture Verification,"Pre-code verification pipeline — VS/RA/SS-compose lifecycle, integration verdicts, coverage analysis, iteration loop","architecture,verification,stack,feasibility,integration,vs,ra,ss,compose",core,knowledge/architecture-verification.md
14
14
  split-body-strategy,Split-Body Strategy,"Selective split guidance — detection pattern, recommended approach, impact on tessl scores and snippet anchors","split-body,selective-split,references,body-size",core,knowledge/split-body-strategy.md
15
15
  tool-resolution,Tool Resolution,"Bridge-to-tool and subprocess-to-tool mapping — ast_bridge, ccc_bridge, qmd_bridge, gh_bridge resolution per IDE, subprocess Pattern 1-4 definitions","bridge,tools,resolution,subprocess,mcp,cli,ide",core,knowledge/tool-resolution.md
16
+ version-paths,Version-Aware Paths,"Version-nested directory structure — path templates, version resolution, export manifest v2, migration from flat layout, version sanitization","version,paths,directory,structure,migration,manifest,symlink",core,knowledge/version-paths.md
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- The 12 SKF workflows form an end-to-end pipeline from source discovery through verified export, with a pre-code architecture verification path. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
5
+ The 14 SKF workflows form an end-to-end pipeline from source discovery through verified export, with a pre-code architecture verification path and post-distribution management operations. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -25,11 +25,12 @@ With lifecycle awareness:
25
25
  | Setup | SF (Setup Forge) | Detect environment and set capability tier | `forge-tier.yaml` |
26
26
  | Discovery | AN (Analyze Source) | Scan project, identify skillable units | Analysis report, skill briefs |
27
27
  | Design | BS (Brief Skill) | Interactive scope definition for one skill | `skill-brief.yaml` |
28
- | Compilation | CS, QS, SS (Create/Quick/Stack) | Extract source and compile skill | `SKILL.md`, metadata, provenance, `scripts/`, `assets/` (when source contains them) |
28
+ | Compilation | CS, QS, SS (Create/Quick/Stack) | Extract source and compile skill | `SKILL.md`, metadata, provenance, `scripts/`, `assets/` (when source contains them) — written to `{skill_package}` and `{forge_version}` (see [version-paths.md](version-paths.md)) |
29
29
  | Architecture Verification | VS, RA (Verify Stack, Refine Architecture) | Pre-code feasibility check and architecture refinement | Feasibility report, refined architecture doc |
30
30
  | Maintenance | US, AS (Update/Audit) | Detect drift and refresh skills | Updated `SKILL.md`, drift report |
31
31
  | Verification | TS (Test Skill) | Quality gate — completeness scoring | Test report, pass/fail decision |
32
32
  | Distribution | EX (Export Skill) | Package and inject into agent context | agentskills.io bundle, snippets |
33
+ | Management | RS, DS (Rename/Drop) | Rename or retire skills and versions | Renamed skill group, deprecated/purged versions |
33
34
 
34
35
  ## Typical Flows
35
36
 
@@ -92,6 +93,16 @@ AS → US → TS → EX
92
93
  3. **TS** re-verifies the updated skill
93
94
  4. **EX** re-exports the updated package
94
95
 
96
+ ### Management
97
+
98
+ ```
99
+ RS or DS → EX
100
+ ```
101
+
102
+ 1. **RS** renames a skill across all versions (transactional copy-verify-delete), OR
103
+ 2. **DS** drops a specific version (soft — deprecate, or hard — purge) or the entire skill
104
+ 3. **EX** rebuilds platform context files (CLAUDE.md/AGENTS.md/.cursorrules) to reflect the management operation — deprecated versions are excluded, renamed skills appear under their new name
105
+
95
106
  ## Pattern Examples
96
107
 
97
108
  ### Example 1: Workflow Selection Decision
@@ -124,11 +135,11 @@ SF → forge-tier.yaml
124
135
  ↓ (read by all subsequent workflows)
125
136
  AN → analysis-report.md + skill-brief.yaml[]
126
137
  ↓ (briefs consumed by CS)
127
- CS → SKILL.md + metadata.json + provenance-map.json + scripts/ + assets/ (when present) + evidence-report.md
128
- ↓ (skill consumed by TS)
129
- TS → test-report.md (pass/fail gate)
130
- ↓ (passing skill consumed by EX)
131
- EX → agentskills.io bundle + context snippets
138
+ CS → {skill_package}/SKILL.md + metadata.json + {forge_version}/provenance-map.json + scripts/ + assets/ (when present) + evidence-report.md
139
+ ↓ (skill consumed by TS — resolved via active version)
140
+ TS → {forge_version}/test-report.md (pass/fail gate)
141
+ ↓ (passing skill consumed by EX — resolved via export manifest v2)
142
+ EX → agentskills.io bundle + context snippets (flat platform paths)
132
143
 
133
144
  VS → feasibility-report-{project_name}.md (verdict + integration verdicts)
134
145
  ↓ (report consumed by RA)
@@ -170,5 +181,6 @@ SS (compose) → SKILL.md (stack skill synthesized from individual skills + arch
170
181
  - [progressive-capability.md](progressive-capability.md) — how the forge tier affects each pipeline phase
171
182
  - [agentskills-spec.md](agentskills-spec.md) — the output format that export-skill packages
172
183
  - [provenance-tracking.md](provenance-tracking.md) — how provenance flows through the pipeline
184
+ - [version-paths.md](version-paths.md) — version-aware storage layout, path templates, and migration rules
173
185
 
174
186
  _Source: synthesized from all 12 workflow.md files (including VS, RA) and module-help.csv_