bmad-module-skill-forge 1.2.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.
@@ -30,7 +30,7 @@
30
30
  "name": "skill-forge",
31
31
  "source": "./",
32
32
  "description": "Evidence-based agent skills compiler with progressive capability tiers (Quick/Forge/Forge+/Deep).",
33
- "version": "1.2.0",
33
+ "version": "1.3.0",
34
34
  "author": {
35
35
  "name": "Armel"
36
36
  },
@@ -26,7 +26,7 @@
26
26
  # Enforced two ways: (1) release.yaml bumps this line in the same commit
27
27
  # as package.json + marketplace.json on every release; (2) validate-docs-drift.js
28
28
  # cross-checks this value against package.json.version and fails on mismatch.
29
- skf_version: "1.2.0"
29
+ skf_version: "1.3.0"
30
30
 
31
31
  # Path to the oh-my-skills repo, resolved relative to this repo's root.
32
32
  # Override at runtime with the OMS environment variable if oh-my-skills
@@ -25,51 +25,45 @@ Setup detects your installed tools and sets your tier automatically:
25
25
  ```
26
26
 
27
27
  ```
28
- ┌─────────────────────────────┐
29
- FORGE STATUS
30
- └─────────────────────────────┘
28
+ ═══════════════════════════════════════
29
+ FORGE STATUS
30
+ ═══════════════════════════════════════
31
31
 
32
32
  Tier: Deep
33
-
34
- Deep tier active. Full capability unlocked AST-backed code
35
- analysis, GitHub repository exploration, and QMD knowledge search
36
- with cross-repository synthesis. Maximum provenance and intelligence.
33
+ Deep tier active. Full capability unlocked — AST-backed code analysis,
34
+ GitHub repository exploration, and QMD knowledge search with
35
+ cross-repository synthesis. Maximum provenance and intelligence.
37
36
 
38
37
  Tools Detected:
39
- ast-grep 0.42.0
40
- gh 2.89.0
41
- qmd operational (104 docs indexed globally)
42
- ccc 0.2.10 (daemon healthy)
38
+ - ast-grep 0.42.0
39
+ - gh 2.91.0 (2026-04-22)
40
+ - qmd 2.0.1
41
+ - ccc (daemon healthy)
43
42
 
44
43
  QMD Registry:
45
- 0 collection(s) healthy
46
- 39 orphaned collection(s) removed
47
- (empty — collections are created automatically when you run [CS] Create Skill)
44
+ 0 collection(s) healthy
45
+ 23 orphaned collection(s) kept
48
46
 
49
47
  CCC Index:
50
- indexed this run — semantic discovery ready (2 files, 14 chunks)
51
- SKF infrastructure excluded: _bmad, _bmad-output, .claude,
52
- _skf-learn, skills, forge-data
53
-
54
- ┌────────────────────────────────┐
55
- │ Forge ready. Deep tier active. │
56
- └────────────────────────────────┘
57
-
58
- Health Check: Clean run. No workflow issues to report.
48
+ indexed this run — semantic discovery ready (1 file)
59
49
 
60
- Workflow complete.
50
+ Files written this run:
51
+ - forge-tier.yaml — {project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml
52
+ - .cocoindex_code/settings.yml — {project-root}/.cocoindex_code/settings.yml (6 SKF exclusion patterns merged)
53
+ - .cocoindex_code/ ccc index — 1 file indexed
61
54
 
62
- ---
63
- Forge is live at Deep tier, armel. All four core tools are available, the CCC semantic index is built, and the QMD registry is clean.
55
+ ═══════════════════════════════════════
56
+ Forge ready. Deep tier active.
57
+ ═══════════════════════════════════════
64
58
 
65
- What would you like to forge next? Common starting points:
59
+ Next: try [BS] Brief Skill to scope your first compilation target,
60
+ or [QS] Quick Skill for a fast template-driven path.
61
+ Already have a skill? [AS] Audit Skill drift-checks an existing skill
62
+ against current sources.
66
63
 
67
- - QS fast skill from a GitHub URL or package name
68
- - BS → CS — brief, then compile a skill from source
69
- - AN — analyze a large repo to discover what's worth skilling
70
- - WS — show current lifecycle status
64
+ Health Check: Clean run. No workflow issues to report.
71
65
 
72
- Or chain them: forge (BS CS TS EX), forge-quick (QS TS EX), onboard (AN CS TS EX).
66
+ Workflow complete.
73
67
  ```
74
68
 
75
69
  Don't have ast-grep, cocoindex-code, or QMD yet? No problem — Quick mode works with no additional tools. Optional GitHub CLI improves source access. Install tools later; your tier upgrades automatically.
@@ -9,6 +9,18 @@ If something isn't working, start here. For general setup help see [Getting Star
9
9
 
10
10
  ## Common errors
11
11
 
12
+ ### "Setup cannot proceed: `uv` is not installed"
13
+
14
+ Surfaced by `/skf-setup` On Activation when `uv --version` is missing on `$PATH`. SKF helpers depend on `uv` to auto-resolve their Python dependencies via PEP 723 inline metadata; bare `python3` ignores that metadata and would fail later with `ModuleNotFoundError: No module named 'yaml'`. The probe halts the workflow up-front with one cohesive diagnostic instead of letting five steps each fail individually.
15
+
16
+ **Fix:** install `uv` from <https://docs.astral.sh/uv/getting-started/installation/> and re-run `/skf-setup`. `uv` is documented as a runtime prerequisite in [Getting Started → Prerequisites](../getting-started/#prerequisites-full-reference).
17
+
18
+ ### "Setup cannot proceed: `_bmad/skf/config.yaml` was not found"
19
+
20
+ Surfaced by `/skf-setup` On Activation when the SKF install config is missing — typically because you invoked `/skf-setup` from a directory that is not an SKF-initialised project. The check runs before any file mutation so nothing is written.
21
+
22
+ **Fix:** from the project root, run `npx bmad-module-skill-forge install` (or `npx bmad-method install` and add SKF as a custom module — see [Getting Started → Install](../getting-started/#install)), then re-run `/skf-setup`. If you ARE in the right project but the file was deleted, restore it from version control or re-run the SKF installer. A separate "config.yaml is not valid YAML" diagnostic surfaces the parser error inline if the file exists but is malformed — open the file at the named path and repair the YAML.
23
+
12
24
  ### Forge reports ast-grep is unavailable
13
25
 
14
26
  If setup reports that ast-grep was not detected, install it to unlock the Forge tier: <https://ast-grep.github.io>. Re-run `@Ferris SF` afterward — your tier upgrades automatically.
package/docs/workflows.md CHANGED
@@ -21,6 +21,11 @@ Trigger workflows by typing commands to [Ferris](../agents/). See [Concepts](../
21
21
 
22
22
  **Key Steps:** Detect tools + Determine tier → CCC index check (Forge+) → Write forge-tier.yaml → QMD + CCC registry hygiene (Deep/Forge+) → Status report
23
23
 
24
+ **Flags:**
25
+
26
+ - `--require-tier=<Quick|Forge|Forge+|Deep>` — fail-fast for CI: if the calculated tier does not satisfy the requested tier (tool-prerequisite check, not a name comparison — Deep does NOT subsume Forge+ because Deep does not require ccc), the workflow halts with a "REQUIRED TIER NOT MET" block and exits without chaining to the health check. Pipelines branch on the JSON envelope's `require_tier_satisfied` field.
27
+ - `--headless` / `-H` — see [Headless Mode](#headless-mode) below. For `/skf-setup` specifically, headless mode emits a single-line `SKF_SETUP_RESULT_JSON: {…}` envelope to stdout (schema-locked, includes `tier`, `previous_tier`, `tier_changed`, `tools`, `tools_added`/`removed`, `files_written`, `warnings`, `error`) and SUPPRESSES the human-readable banner — the entire payload pipelines need is on one parseable line.
28
+
24
29
  **Agent:** Ferris (Architect mode)
25
30
 
26
31
  ---
@@ -79,6 +84,19 @@ Trigger workflows by typing commands to [Ferris](../agents/). See [Concepts](../
79
84
 
80
85
  **Key Steps:** Resolve target → Ecosystem check → Quick extract → Compile → Validate → Write
81
86
 
87
+ **Headless / batch flags:**
88
+
89
+ - `--headless` / `-H` — auto-proceed all confirmation gates with documented defaults; emits structured stderr progress events and exit codes (see [Headless Mode](#headless-mode))
90
+ - `--batch <file>` — process N targets from a text file in sequence (one target per line, `#` comments and `language=<lang>` / `scope=<path>` per-line modifiers supported); implies `--headless`
91
+ - `--fail-fast` — only with `--batch`; abort the whole batch on the first per-target failure instead of recording it and proceeding
92
+
93
+ **Per-target overrides** (apply to a single-target run, or globally to every target in `--batch`):
94
+
95
+ - `--description "<string>"` — override the LLM-derived description used in `SKILL.md` frontmatter and `metadata.json`
96
+ - `--exports "name1,name2,..."` — override the extracted export list (comma-separated)
97
+ - `--skip-snippet` — skip `context-snippet.md` generation and write
98
+ - `--no-active-pointer` — skip the active-pointer flip in finalize (deliverables still land in `{skill_package}`)
99
+
82
100
  **Agent:** Ferris (Architect mode)
83
101
 
84
102
  ---
@@ -337,6 +355,41 @@ Add `--headless` or `-H` to any workflow command to skip all confirmation gates.
337
355
 
338
356
  You can also set `headless_mode: true` in your forge preferences (`_bmad/_memory/forger-sidecar/preferences.yaml`) to make headless the default for all workflows.
339
357
 
358
+ **Exception — `/skf-setup` headless emits a single-line JSON envelope.** Unlike other workflows, headless `/skf-setup` SUPPRESSES the human-readable status banner entirely and emits exactly one prefixed line on stdout:
359
+
360
+ ```
361
+ SKF_SETUP_RESULT_JSON: {"skf_setup":{"tier":"Deep","previous_tier":"Forge","tier_changed":true,"tools":{...},"tools_added":[...],"tools_removed":[],"config_path":"...","ccc_index":{...},"files_written":[...],"tier_override_active":false,"tier_override_invalid":false,"require_tier_satisfied":null,"warnings":[],"error":null}}
362
+ ```
363
+
364
+ Parent skills and CI pipelines `grep` one line out of the workflow log to learn the outcome — no ASCII-art parsing, no race against the [`forge-tier.yaml`](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-setup/steps-c/step-02-write-config.md) writer. The envelope schema is versioned at [`src/shared/scripts/schemas/skf-setup-result-envelope.v1.json`](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json) and asserted against on every emit.
365
+
366
+ **Exception — `/skf-quick-skill` headless emits structured progress + result envelopes.** Headless `/skf-quick-skill` runs are first-class building blocks for batch automators. Three operational contracts beyond per-gate auto-proceed:
367
+
368
+ 1. **Per-step JSON progress events to `stderr`** at each step's entry / exit / HARD HALT — one line per event, no pretty-print:
369
+
370
+ ```
371
+ {"step":3,"name":"quick-extract","status":"start"}
372
+ {"step":3,"name":"quick-extract","status":"done"}
373
+ {"step":1,"name":"resolve-target","status":"halt","exit":3}
374
+ ```
375
+
376
+ `<name>` is the kebab portion of the step filename: `resolve-target`, `ecosystem-check`, `quick-extract`, `compile`, `write-and-validate`, `finalize`, `health-check`.
377
+
378
+ 2. **Structured exit-code map.** Every HARD HALT exits with a stable code so pipelines branch on the failure class without grepping message text:
379
+
380
+ | Code | Meaning |
381
+ | ---- | ------------------- |
382
+ | 0 | success |
383
+ | 3 | resolution-failure |
384
+ | 4 | write-failure |
385
+ | 5 | overwrite-cancelled |
386
+ | 6 | compile-cancelled |
387
+ | 7 | finalize-blocked |
388
+
389
+ 3. **Error-variant result contract on every HARD HALT.** A `SKF_QUICK_SKILL_RESULT_JSON: {…}` envelope is emitted on `stderr` (always) and copied to `{skill_package}/quick-skill-result-latest.json` when the skill package is known (HALTs at step-05 §1 onward). The schema and full population rules live in [`src/skf-quick-skill/SKILL.md`](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-quick-skill/SKILL.md) § "Result Contract on HARD HALT".
390
+
391
+ **Batch mode (`--batch <file>`).** Drives N targets through the full pipeline (steps 1–7 each) in sequence. Input format: one target per line, `#` comments and blank lines ignored, optional per-line modifiers `language=<lang>` and `scope=<path>`. Per-target output lands in `{skill_package}/` as today; an aggregated summary writes to `{skills_output_folder}/_batch/quick-skill-batch-{ts}.json` (with `quick-skill-batch-latest.json` copy). Per-target boundary events (`{"batch":N,"target":"…","status":"start|done|fail",…}`) and a final `{"batch_summary":true,…}` event extend the per-step event stream above. Full input grammar, summary schema, and exit-code semantics in [`src/skf-quick-skill/SKILL.md`](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-quick-skill/SKILL.md) § "Batch Mode".
392
+
340
393
  ---
341
394
 
342
395
  ## Terminal Step: Health Check
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": "1.2.0",
4
+ "version": "1.3.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",
@@ -53,7 +53,7 @@
53
53
  "test:cli": "node test/test-cli-integration.js",
54
54
  "test:install": "node test/test-installation-components.js",
55
55
  "test:knowledge": "node test/test-knowledge-base.js",
56
- "test:python": "uv run --with pytest --with pyyaml pytest test/test-compute-score-contract.py test/test-skf-preflight.py test/test-skf-skill-inventory.py test/test-skf-validate-output.py test/test-skf-validate-frontmatter.py test/test-skf-manifest-ops.py test/test-skf-rebuild-managed-sections.py test/test-skf-severity-classify.py test/test-skf-structural-diff.py test/test-skf-detect-tools.py test/test-skf-forge-tier-rw.py test/test-skf-emit-result-envelope.py test/test-skf-qmd-classify-collections.py test/test-skf-merge-ccc-exclusions.py -v",
56
+ "test:python": "uv run --with pytest --with pyyaml pytest test/test-compute-score-contract.py test/test-skf-preflight.py test/test-skf-skill-inventory.py test/test-skf-validate-output.py test/test-skf-validate-frontmatter.py test/test-skf-manifest-ops.py test/test-skf-rebuild-managed-sections.py test/test-skf-severity-classify.py test/test-skf-structural-diff.py test/test-skf-detect-tools.py test/test-skf-forge-tier-rw.py test/test-skf-emit-result-envelope.py test/test-skf-qmd-classify-collections.py test/test-skf-merge-ccc-exclusions.py test/test-skf-resolve-package.py test/test-skf-extract-public-api.py test/test-skf-render-quick-metadata.py -v",
57
57
  "test:schemas": "node test/test-agent-schema.js",
58
58
  "test:workflow": "node test/test-workflow-state.js",
59
59
  "validate:refs": "node tools/validate-file-refs.js --strict",
@@ -33,3 +33,13 @@ Each run writes **two files** to `{output_dir}`:
33
33
  Write the per-run record first, then copy it to the `-latest.json` path. If the copy fails, the per-run record still exists — the run is not lost.
34
34
 
35
35
  **Consumers (forger, CI, chained workflows):** read from `{skill-name}-result-latest.json`. Do not enumerate timestamped files unless inspecting prior-run history.
36
+
37
+ ## Available Helpers
38
+
39
+ There is no generic helper that writes the schema above; each skill assembles the JSON in its terminal step today. One specialised helper exists:
40
+
41
+ - **`src/shared/scripts/skf-emit-result-envelope.py`** — `skf-setup`-specific. Writes a different envelope (`SKF_SETUP_RESULT_JSON: {…}`) following the JSON schema at `src/shared/scripts/schemas/skf-setup-result-envelope.v1.json`. Carries setup-specific fields (`tier`, `previous_tier`, `tools`, `ccc_index`, `tier_override_*`, `qmd_status`, etc.) that have no analogue in other workflows. **Do not reuse for non-skf-setup skills.**
42
+
43
+ A generalised emitter (matching this document's schema) is a reasonable future helper when a second consumer materialises with the same shape. For now, skills that write this contract assemble the JSON in their terminal step — the work is small (5–8 fields) and skill-specific summary content benefits from being expressed inline alongside the rest of the step's logic.
44
+
45
+ skf-quick-skill writes both the success-variant contract (`step-06-finalize.md` §3) and the error-variant contract on every HARD HALT (per `SKILL.md` § "Result Contract on HARD HALT") in this hand-assembled style.