bmad-module-skill-forge 0.6.0 → 0.7.1
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 +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +87 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +3 -2
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +11 -7
- package/src/knowledge/progressive-capability.md +5 -2
- package/src/knowledge/qmd-registry.md +5 -2
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/tool-resolution.md +55 -0
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +3 -3
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -1
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +8 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +7 -1
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +2 -2
- package/src/workflows/create-skill/data/tier-degradation-rules.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +14 -10
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +4 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +19 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +3 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/manifest-patterns.md +23 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +37 -3
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +29 -3
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +50 -7
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +35 -3
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- package/src/workflows/export-skill/data/managed-section-format.md +8 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +18 -6
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +5 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +3 -3
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +8 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +8 -12
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -41,10 +41,10 @@ Write the detected tool availability and calculated tier to forge-tier.yaml, cre
|
|
|
41
41
|
|
|
42
42
|
## CONTEXT BOUNDARIES:
|
|
43
43
|
|
|
44
|
-
- Available: {detected_tools}, {calculated_tier}, {previous_tier} from step-01
|
|
44
|
+
- Available: {detected_tools}, {calculated_tier}, {previous_tier} from step-01; {ccc_index_result}, {ccc_indexed_path}, {ccc_last_indexed} from step-01b
|
|
45
45
|
- Focus: file I/O operations only
|
|
46
46
|
- Limits: do not modify preferences.yaml if it exists
|
|
47
|
-
- Dependencies: step-01 must have completed with tool detection results
|
|
47
|
+
- Dependencies: step-01 and step-01b must have completed with tool detection and CCC index results
|
|
48
48
|
|
|
49
49
|
## MANDATORY SEQUENCE
|
|
50
50
|
|
|
@@ -76,18 +76,19 @@ tier_detected_at: {current ISO timestamp}
|
|
|
76
76
|
ccc_index:
|
|
77
77
|
indexed_path: {ccc_indexed_path from step-01b, or ~}
|
|
78
78
|
last_indexed: {ccc_last_indexed from step-01b, or ~}
|
|
79
|
-
status: {
|
|
79
|
+
status: {ccc_index_result from step-01b: "fresh"|"created"|"none"|"failed"}
|
|
80
80
|
staleness_threshold_hours: 24
|
|
81
81
|
|
|
82
82
|
# CCC index registry (tracks which source paths have been indexed for skill workflows)
|
|
83
|
-
|
|
83
|
+
# PRESERVE existing entries on re-runs — see Note below
|
|
84
|
+
ccc_index_registry: {preserved from existing forge-tier.yaml, or [] if first run}
|
|
84
85
|
|
|
85
86
|
# QMD collection registry (populated by create-skill, consumed by audit/update-skill)
|
|
86
|
-
#
|
|
87
|
-
qmd_collections: []
|
|
87
|
+
# PRESERVE existing entries on re-runs — see Note below
|
|
88
|
+
qmd_collections: {preserved from existing forge-tier.yaml, or [] if first run}
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
**Note on re-runs:** The `qmd_collections` and `
|
|
91
|
+
**Note on re-runs:** The `qmd_collections`, `ccc_index_registry` arrays, and `staleness_threshold_hours` value must be preserved across re-runs. Before overwriting forge-tier.yaml, read these existing values and re-inject them into the new write. These values are populated by create-skill workflows or customized by users and must not be reset.
|
|
91
92
|
|
|
92
93
|
**This file is ALWAYS overwritten** on every run — it reflects current tool state.
|
|
93
94
|
|
|
@@ -110,27 +111,25 @@ tier_override: ~
|
|
|
110
111
|
# Passive context injection (set to false to skip snippet generation and CLAUDE.md updates during export)
|
|
111
112
|
passive_context: true
|
|
112
113
|
|
|
113
|
-
#
|
|
114
|
-
output_language: ~
|
|
115
|
-
skill_format_version: ~
|
|
116
|
-
|
|
117
|
-
#
|
|
118
|
-
citation_style: ~
|
|
119
|
-
confidence_display: ~
|
|
114
|
+
# Reserved for future use — these fields are not yet consumed by any workflow step
|
|
115
|
+
# output_language: ~
|
|
116
|
+
# skill_format_version: ~
|
|
117
|
+
# citation_style: ~
|
|
118
|
+
# confidence_display: ~
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
**If it DOES exist:** Do not modify. Preserve entirely.
|
|
123
122
|
|
|
124
123
|
### 3. Ensure forge-data/ Directory
|
|
125
124
|
|
|
126
|
-
Check if `{
|
|
125
|
+
Check if `{forge_data_folder}` directory exists:
|
|
127
126
|
|
|
128
127
|
- If missing: create it
|
|
129
128
|
- If exists: skip silently
|
|
130
129
|
|
|
131
130
|
### 4. Auto-Proceed
|
|
132
131
|
|
|
133
|
-
"**Proceeding to
|
|
132
|
+
"**Proceeding to QMD collection hygiene...**"
|
|
134
133
|
|
|
135
134
|
#### Menu Handling Logic:
|
|
136
135
|
|
|
@@ -59,7 +59,7 @@ For Quick and Forge tiers (without ccc), skip silently and proceed. For Forge+ t
|
|
|
59
59
|
|
|
60
60
|
Read `{calculated_tier}` from context.
|
|
61
61
|
|
|
62
|
-
**If tier is Quick or Forge:** Proceed directly to section 6 (Auto-Proceed) — no output, no messaging.
|
|
62
|
+
**If tier is Quick or Forge:** Set `{ccc_registry_stale_cleaned: 0}`. Proceed directly to section 6 (Auto-Proceed) — no output, no messaging.
|
|
63
63
|
|
|
64
64
|
**If tier is Forge+:** Skip QMD hygiene (qmd is not available at Forge+). Proceed directly to section 5b (CCC Index Registry Hygiene) — no QMD output, no messaging.
|
|
65
65
|
|
|
@@ -115,10 +115,10 @@ Load and read {tierRulesData} for the tier capability descriptions and re-run me
|
|
|
115
115
|
|
|
116
116
|
### 3. Handle --update-spec Flag (Optional)
|
|
117
117
|
|
|
118
|
-
**If `--update-spec`
|
|
118
|
+
**If the user included `--update-spec` in their workflow invocation (e.g., `@Ferris SF --update-spec`):**
|
|
119
119
|
- Attempt to fetch the latest agentskills.io specification schema
|
|
120
120
|
- Use `gh` or `curl` to retrieve the spec
|
|
121
|
-
- Store in `{
|
|
121
|
+
- Store in `{forge_data_folder}/agentskills-spec.json` (or appropriate format)
|
|
122
122
|
- If fetch succeeds: display "agentskills.io spec updated."
|
|
123
123
|
- If fetch fails: display "Could not fetch agentskills.io spec. Existing spec (if any) unchanged."
|
|
124
124
|
- Do NOT fail the workflow over this — it is purely optional
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-forge
|
|
3
|
-
description: Initialize forge environment, detect tools, set tier,
|
|
3
|
+
description: Initialize forge environment, detect tools, set tier, verify QMD collection hygiene
|
|
4
4
|
web_bundle: true
|
|
5
5
|
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
6
6
|
---
|
|
@@ -15,7 +15,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
|
15
15
|
|
|
16
16
|
### Core Principles
|
|
17
17
|
|
|
18
|
-
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere
|
|
18
|
+
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere to 1 file as directed at a time
|
|
19
19
|
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
|
|
20
20
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
21
21
|
- **Fully Autonomous**: All steps auto-proceed with no user interaction until the final report
|
|
@@ -44,6 +44,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
|
44
44
|
Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
|
|
45
45
|
|
|
46
46
|
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
47
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
47
48
|
|
|
48
49
|
### 2. First Step Execution
|
|
49
50
|
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
## Naive Mode Weight Redistribution
|
|
19
19
|
|
|
20
|
+
The following weights replace the default table for naive mode. The 18% coherence weight from the default table has been proportionally redistributed into these values. Do not apply a second redistribution.
|
|
21
|
+
|
|
20
22
|
When running in naive mode (no coherence category):
|
|
21
23
|
- Export Coverage: 45%
|
|
22
24
|
- Signature Accuracy: 25%
|
|
@@ -38,6 +40,7 @@ tessl evaluates SKILL.md body content only — it does not read `references/*.md
|
|
|
38
40
|
- Signature Accuracy: skipped (no AST)
|
|
39
41
|
- Type Coverage: skipped (no AST)
|
|
40
42
|
- Score based on: structural completeness only
|
|
43
|
+
- Weight redistribution: skipped categories' weights (Signature Accuracy 22% + Type Coverage 14%) redistributed proportionally to remaining active categories
|
|
41
44
|
|
|
42
45
|
### Forge Tier (ast-grep)
|
|
43
46
|
- Export Coverage: AST-backed export comparison
|
|
@@ -32,7 +32,7 @@ If no provenance-map.json exists (typical for quick-skill output), fall back to
|
|
|
32
32
|
If neither provenance-map nor metadata exports provide a usable baseline, but remote reading tools (zread, deepwiki, gh API, or similar) are available and `source_repo` is set in metadata.json, read the entry point remotely to build the export inventory from scratch. Name-matching only — no AST. Set `analysis_confidence: remote-only`.
|
|
33
33
|
|
|
34
34
|
**State 5 — No source access at all:**
|
|
35
|
-
If none of the above succeed, fall through to docs-only mode (
|
|
35
|
+
If none of the above succeed, fall through to docs-only mode (as defined in step-01-init.md Section 0: pre-analysis source type detection). Set `analysis_confidence: docs-only`. Warn: "**No source access available.** Coverage check evaluates documentation self-consistency only. Re-run with local clone or remote access for source-backed verification."
|
|
36
36
|
|
|
37
37
|
Set `analysis_confidence` in context for use in Section 2 analysis depth, step-05 output, and step-05 scoring.
|
|
38
38
|
|
|
@@ -86,6 +86,8 @@ Read the skill metadata (loaded in step 01) and check:
|
|
|
86
86
|
- Default to **naive mode** (conservative — fewer checks, less chance of false negatives from missing context)
|
|
87
87
|
- Note the default in the report
|
|
88
88
|
|
|
89
|
+
**Quick-tier adjustment (applies to both modes):** If `forge_tier` is `Quick`, Signature Accuracy and Type Coverage are skipped during scoring (no AST available). Their weights are redistributed proportionally to remaining active categories. See `scoring-rules.md` Tier-Dependent Scoring section for details.
|
|
90
|
+
|
|
89
91
|
### 3. Update Output Document
|
|
90
92
|
|
|
91
93
|
Update `{outputFile}` frontmatter:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: test-skill
|
|
3
3
|
description: Cognitive completeness verification. Naive and contextual modes.
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/test-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/test-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Test Skill
|
|
@@ -15,7 +15,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/test-skill'
|
|
|
15
15
|
|
|
16
16
|
### Core Principles
|
|
17
17
|
|
|
18
|
-
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere
|
|
18
|
+
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere to 1 file as directed at a time
|
|
19
19
|
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
|
|
20
20
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
21
21
|
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array
|
|
@@ -35,7 +35,7 @@ Compare current source code state against the provenance map to produce a comple
|
|
|
35
35
|
- 🎯 Focus ONLY on detecting and classifying changes — do not extract or merge
|
|
36
36
|
- 🚫 FORBIDDEN to modify any files — read-only change detection
|
|
37
37
|
- 🚫 FORBIDDEN to re-extract content — that is step 03
|
|
38
|
-
- 💬 Use subprocess
|
|
38
|
+
- 💬 Use subprocess Pattern 4 (parallel): In Claude Code, use multiple parallel Agent tool calls or `run_in_background: true`. In Cursor, use parallel requests (IDE-dependent). In CLI, use `xargs -P` or background processes. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
39
39
|
- ⚙️ If subprocess unavailable, perform comparison sequentially in main thread
|
|
40
40
|
|
|
41
41
|
## EXECUTION PROTOCOLS:
|
|
@@ -110,7 +110,7 @@ Launch subprocesses in parallel that compare source state against provenance map
|
|
|
110
110
|
|
|
111
111
|
**Category C — Rename detection:**
|
|
112
112
|
- Cross-reference deleted files/exports with added files/exports
|
|
113
|
-
- If content similarity > 80%: classify as RENAMED instead of deleted+added
|
|
113
|
+
- If content similarity > 80%: classify as RENAMED instead of deleted+added. **Similarity mechanism by tier:** Quick: compare file size ratio (within 20%) and export name overlap (>70% of exports match by name). Forge and above: use ast-grep to compare export signatures between the deleted and added files. Forge+/Deep: use CCC semantic similarity when available
|
|
114
114
|
|
|
115
115
|
**Category D — Script/asset file changes:**
|
|
116
116
|
- Compare `file_entries` from provenance-map.json against current source files
|
|
@@ -177,7 +177,7 @@ The skill `{skill_name}` is current — no update needed.
|
|
|
177
177
|
| Files moved/renamed | {count} |
|
|
178
178
|
| Exports affected | {total_export_changes} |
|
|
179
179
|
|
|
180
|
-
**Proceeding to re-extraction of {affected_file_count}
|
|
180
|
+
**Proceeding to re-extraction of {affected_file_count if normal mode, or gap_count if gap-driven mode} changes...**"
|
|
181
181
|
|
|
182
182
|
### 6. Present MENU OPTIONS
|
|
183
183
|
|
|
@@ -4,8 +4,9 @@ description: 'Tier-aware AST extraction on changed files only, producing fresh e
|
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-04-merge.md'
|
|
6
6
|
extractionPatternsData: '../../create-skill/data/extraction-patterns.md'
|
|
7
|
-
|
|
7
|
+
extractionPatternsTracingData: '../../create-skill/data/extraction-patterns-tracing.md'
|
|
8
8
|
remoteSourceResolutionData: '../data/remote-source-resolution.md'
|
|
9
|
+
tierDegradationRulesData: '../../create-skill/data/tier-degradation-rules.md'
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Step 3: Re-Extract Changed Exports
|
|
@@ -92,12 +93,16 @@ Perform tier-aware extraction on only the changed files identified in step 02, p
|
|
|
92
93
|
- Extract: parameter types, return types, JSDoc/docstring comments
|
|
93
94
|
- Confidence: T1 (AST-verified structural truth)
|
|
94
95
|
|
|
96
|
+
**Tier degradation handling (Forge/Forge+/Deep):** If ast-grep is unavailable or fails on individual files, follow `{tierDegradationRulesData}` for fallback strategy and user notification requirements. Silent degradation is forbidden — the user must always know when AST extraction was skipped.
|
|
97
|
+
|
|
95
98
|
**Deep tier (AST + QMD semantic enrichment):**
|
|
96
99
|
- Perform all Forge tier extractions (T1)
|
|
97
100
|
- Additionally: launch a subprocess that queries qmd_bridge for temporal context on changed exports, returning T2 evidence per export
|
|
98
101
|
- QMD provides: usage patterns, historical context, related documentation
|
|
99
102
|
- Confidence: T1 for structural, T2 for semantic enrichment
|
|
100
103
|
|
|
104
|
+
**Tool resolution:** `ast_bridge` → ast-grep MCP tools (`find_code`, `find_code_by_rule`) or `ast-grep` CLI. `qmd_bridge` → QMD MCP tools (`mcp__plugin_qmd-plugin_qmd__search`, `vector_search`) or `qmd` CLI. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
105
|
+
|
|
101
106
|
### 2. Extract Changed Files
|
|
102
107
|
|
|
103
108
|
DO NOT BE LAZY — For EACH file in the change manifest with status MODIFIED, ADDED, or RENAMED, launch a subprocess that:
|
|
@@ -117,7 +122,7 @@ DO NOT BE LAZY — For EACH file in the change manifest with status MODIFIED, AD
|
|
|
117
122
|
|
|
118
123
|
**For MOVED files:** Re-extract at new location to update file:line references.
|
|
119
124
|
|
|
120
|
-
**Re-export tracing (Forge/Deep only):** After extracting changed files, check if any public exports from the package entry point (`__init__.py`, `index.ts`, `lib.rs`) are unresolved — particularly when a changed file is part of a module re-export chain. Follow the **Re-Export Tracing** protocol in `{
|
|
125
|
+
**Re-export tracing (Forge/Deep only):** After extracting changed files, check if any public exports from the package entry point (`__init__.py`, `index.ts`, `lib.rs`) are unresolved — particularly when a changed file is part of a module re-export chain. Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to trace unresolved symbols to their actual definition files.
|
|
121
126
|
|
|
122
127
|
### 2b. CCC Semantic Ranking (Forge+ and Deep with ccc)
|
|
123
128
|
|
|
@@ -125,7 +130,7 @@ DO NOT BE LAZY — For EACH file in the change manifest with status MODIFIED, AD
|
|
|
125
130
|
|
|
126
131
|
Before aggregating extraction results, use CCC to assess semantic significance of changes:
|
|
127
132
|
|
|
128
|
-
1. Run `ccc_bridge.search("{skill_name}", source_root, top_k=15)` to get the skill's most semantically central files
|
|
133
|
+
1. Run `ccc_bridge.search("{skill_name}", source_root, top_k=15)` — **Tool resolution:** `/ccc` skill search (Claude Code), ccc MCP (Cursor), `ccc search` (CLI) — to get the skill's most semantically central files
|
|
129
134
|
2. Cross-reference the change manifest files with CCC results
|
|
130
135
|
3. Files appearing in BOTH the change manifest AND CCC's top results are **semantically significant changes** — flag them for priority in the merge step
|
|
131
136
|
4. Store `{ccc_significant_changes: [{file, score}]}` in context
|
|
@@ -33,7 +33,7 @@ Validate the merged skill content against the agentskills.io specification, veri
|
|
|
33
33
|
|
|
34
34
|
- 🎯 Focus ONLY on validation — do not fix issues (that's the user's choice)
|
|
35
35
|
- 🚫 FORBIDDEN to modify merged content — validation is read-only
|
|
36
|
-
- 💬 Launch parallel validation checks when subprocess available (Pattern 4)
|
|
36
|
+
- 💬 Launch parallel validation checks when subprocess available (Pattern 4): In Claude Code, use multiple parallel Agent tool calls. In Cursor, use parallel requests (IDE-dependent). In CLI, use `xargs -P`. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
37
37
|
- ⚙️ If subprocess unavailable, perform checks sequentially in main thread
|
|
38
38
|
|
|
39
39
|
## EXECUTION PROTOCOLS:
|
|
@@ -69,13 +69,9 @@ Run: `npx skill-check -h`
|
|
|
69
69
|
|
|
70
70
|
Launch subprocesses in parallel for each validation category, aggregating results when complete:
|
|
71
71
|
|
|
72
|
-
**Check A — Spec Compliance (
|
|
72
|
+
**Check A — Spec Compliance (deferred to post-write):**
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Parse JSON output for quality score (0-100), auto-fixed issues, and remaining diagnostics. If `body.max_lines` reported, prefer selective split: extract only the largest Tier 2 section(s) to `references/`, keeping all Tier 1 content inline (selective split preserves agent accuracy — inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval per Vercel research). Fall back to `npx skill-check split-body <skill-dir> --write` only if selective split is not feasible. After any split, verify `#quick-start` and `#key-types` anchors still resolve in SKILL.md.
|
|
77
|
-
|
|
78
|
-
**If unavailable**, perform manual check: validate merged SKILL.md structure, verify required sections (exports, usage patterns, conventions), verify export entries have name/type/signature/file:line reference, flag missing sections.
|
|
74
|
+
Skill-check requires written files on disk. This check is deferred to step-06 section 7. Perform manual structural check only: verify merged SKILL.md has required sections (exports, usage patterns, conventions), verify export entries have name/type/signature/file:line reference, flag missing sections.
|
|
79
75
|
|
|
80
76
|
**Check B — [MANUAL] Section Integrity:**
|
|
81
77
|
- Compare [MANUAL] inventory from step 01 against merged content
|
|
@@ -84,7 +80,7 @@ Parse JSON output for quality score (0-100), auto-fixed issues, and remaining di
|
|
|
84
80
|
|
|
85
81
|
**Check C — Confidence Tier Consistency:**
|
|
86
82
|
- Verify all re-extracted exports have confidence labels (T1/T1-low/T2)
|
|
87
|
-
- Verify tier labels match forge tier: Quick=T1-low only, Forge=T1 (T1-low for degraded), Deep=T1+T2
|
|
83
|
+
- Verify tier labels match forge tier: Quick=T1-low only, Forge=T1 (T1-low for degraded), Forge+=T1 (same as Forge, CCC improves coverage not confidence), Deep=T1+T2
|
|
88
84
|
- Flag mismatched or missing tier labels
|
|
89
85
|
|
|
90
86
|
**Check D — Provenance Completeness:**
|
|
@@ -166,9 +162,9 @@ ONLY WHEN all validation checks have completed and findings are displayed will y
|
|
|
166
162
|
|
|
167
163
|
### ✅ SUCCESS:
|
|
168
164
|
|
|
169
|
-
- All six checks executed (spec, [MANUAL], confidence, provenance, diff, security)
|
|
170
|
-
-
|
|
171
|
-
-
|
|
165
|
+
- All six checks executed (spec-manual, [MANUAL], confidence, provenance, diff, security)
|
|
166
|
+
- Checks A (spec compliance via skill-check), E (diff), and F (security scan) deferred to post-write in step-06
|
|
167
|
+
- Manual structural check performed for spec compliance in this step
|
|
172
168
|
- Stack skill reference files validated if applicable
|
|
173
169
|
- Findings reported with severity and specific locations; [MANUAL] integrity verified
|
|
174
170
|
- Auto-proceeds regardless of findings (advisory mode)
|
|
@@ -177,7 +173,7 @@ ONLY WHEN all validation checks have completed and findings are displayed will y
|
|
|
177
173
|
|
|
178
174
|
- Skipping any of the six checks; blocking on validation warnings
|
|
179
175
|
- Not verifying [MANUAL] integrity; hallucinating findings not backed by comparison
|
|
180
|
-
- Modifying merged content during validation (
|
|
176
|
+
- Modifying merged content during validation (validation is read-only in this step)
|
|
181
177
|
- Not recording quality score when skill-check is available
|
|
182
178
|
|
|
183
179
|
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -74,7 +74,9 @@ Update `{skills_output_folder}/{skill_name}/metadata.json`:
|
|
|
74
74
|
- `exports_total`: `exports_public_api` + `exports_internal`
|
|
75
75
|
- `public_api_coverage`: `exports_documented / exports_public_api` (`null` if `exports_public_api` is 0)
|
|
76
76
|
- `total_coverage`: `exports_documented / exports_total` (`null` if `exports_total` is 0)
|
|
77
|
-
|
|
77
|
+
- Update `confidence_distribution` from re-extraction results:
|
|
78
|
+
- `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3`: update counts from re-extraction results
|
|
79
|
+
- `scripts_count`, `assets_count`: update from re-extraction results if scripts/assets changed
|
|
78
80
|
- For stack skills: update `library_count`, `integration_count` if changed
|
|
79
81
|
|
|
80
82
|
### 3. Write Updated provenance-map.json
|
|
@@ -154,7 +156,7 @@ For each affected reference file from the merge:
|
|
|
154
156
|
- Regenerate `context-snippet.md` with updated export summaries
|
|
155
157
|
- Verify [MANUAL] sections preserved in each reference file
|
|
156
158
|
|
|
157
|
-
**If skill_type != "stack":** Skip
|
|
159
|
+
**If skill_type != "stack":** Skip reference file updates. However, if exports changed (added, removed, or renamed), warn: "⚠️ `context-snippet.md` was NOT updated — exports have changed. Run **[EX] Export Skill** to regenerate the context snippet and update CLAUDE.md/AGENTS.md."
|
|
158
160
|
|
|
159
161
|
### 6. Verify All Writes
|
|
160
162
|
|
|
@@ -182,6 +184,7 @@ External tool checks deferred from step-05 now run against the written files:
|
|
|
182
184
|
|
|
183
185
|
**If skill-check available:**
|
|
184
186
|
- Run: `npx skill-check check {skills_output_folder}/{skill_name} --fix --format json --no-security-scan`
|
|
187
|
+
- **Context sync after --fix:** If `fixed[]` is non-empty (i.e., `--fix` modified files on disk), re-read the modified SKILL.md to update the in-context copy. This prevents silent divergence between the in-context SKILL.md and the on-disk version that step-07-report will reference.
|
|
185
188
|
- If `body.max_lines` reported, prefer selective split — extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 inline (inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval). Fall back to `npx skill-check split-body {skills_output_folder}/{skill_name} --write` if not feasible. Verify anchors resolve after split.
|
|
186
189
|
- Run: `npx skill-check diff` if original version was preserved
|
|
187
190
|
- Run: `npx skill-check check {skills_output_folder}/{skill_name} --format json` for security scan
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: update-skill
|
|
3
3
|
description: Smart regeneration preserving [MANUAL] sections. Detects individual vs stack internally.
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/update-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/update-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Update Skill
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Coverage Patterns
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Rules for detecting technology/library references in architecture and PRD documents, and matching them against generated skills.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Technology Detection in Documents
|
|
10
|
+
|
|
11
|
+
### Direct Name Matching
|
|
12
|
+
|
|
13
|
+
Search the architecture document for exact mentions of:
|
|
14
|
+
1. Library names from generated skills (case-insensitive)
|
|
15
|
+
2. Common aliases (e.g., "React" also matches "ReactJS", "react.js")
|
|
16
|
+
3. Framework names that encompass libraries (e.g., "Tauri" encompasses the Tauri ecosystem)
|
|
17
|
+
|
|
18
|
+
### Section-Based Detection
|
|
19
|
+
|
|
20
|
+
Parse document section headers for technology groupings:
|
|
21
|
+
- `## Desktop App` → technologies listed under this section
|
|
22
|
+
- `## Backend Core` → technologies in backend layer
|
|
23
|
+
- `## AI Layer` → AI-related technologies
|
|
24
|
+
|
|
25
|
+
**Mermaid Diagram Handling:** Do NOT parse Mermaid diagram syntax (`graph`, `flowchart`, `sequenceDiagram`, etc.) for technology detection. Only use prose text (headings, paragraphs, lists, tables) for detection. If the architecture document appears to list technologies exclusively inside Mermaid diagrams, note this in the coverage results as a detection limitation and recommend the user add prose-based technology listings.
|
|
26
|
+
|
|
27
|
+
### Coverage Verdict
|
|
28
|
+
|
|
29
|
+
| Verdict | Meaning |
|
|
30
|
+
|---------|---------|
|
|
31
|
+
| **Covered** | A generated skill exists in `skills/` for this technology |
|
|
32
|
+
| **Missing** | Technology is referenced in architecture doc but no skill exists |
|
|
33
|
+
| **Extra** | A skill exists but the technology is not referenced in the architecture doc (informational, not an error) |
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
When presenting coverage results, use the following structure:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
| Technology | Source Section | Skill Match | Verdict |
|
|
41
|
+
|------------|---------------|-------------|---------|
|
|
42
|
+
| {tech_name} | {section_heading} | {skill_name or '—'} | Covered / Missing |
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Include a summary line: `Coverage: {covered_count}/{total_count} ({percentage}%)`
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
workflowType: 'verify-stack'
|
|
3
|
+
project_name: ''
|
|
4
|
+
architecture_doc: ''
|
|
5
|
+
prd_doc: ''
|
|
6
|
+
date: ''
|
|
7
|
+
overall_verdict: ''
|
|
8
|
+
stepsCompleted: []
|
|
9
|
+
skills_analyzed: 0
|
|
10
|
+
coverage_percentage: 0
|
|
11
|
+
integrations_verified: 0
|
|
12
|
+
integrations_plausible: 0
|
|
13
|
+
integrations_risky: 0
|
|
14
|
+
integrations_blocked: 0
|
|
15
|
+
requirements_fulfilled: null
|
|
16
|
+
requirements_partial: null
|
|
17
|
+
requirements_not_addressed: null
|
|
18
|
+
requirements_pass: ''
|
|
19
|
+
recommendation_count: 0
|
|
20
|
+
prd_available: false
|
|
21
|
+
previous_report: ''
|
|
22
|
+
delta_improved: null
|
|
23
|
+
delta_regressed: null
|
|
24
|
+
delta_new: null
|
|
25
|
+
delta_unchanged: null
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Stack Feasibility Report: {project_name}
|
|
29
|
+
|
|
30
|
+
**Verification Date:** {date}
|
|
31
|
+
**Architecture Document:** {architecture_doc}
|
|
32
|
+
**PRD Document:** {prd_doc}
|
|
33
|
+
**Skills Analyzed:** {skills_analyzed}
|
|
34
|
+
|
|
35
|
+
## Overall Verdict
|
|
36
|
+
|
|
37
|
+
{FEASIBLE / CONDITIONALLY FEASIBLE / NOT FEASIBLE}
|
|
38
|
+
|
|
39
|
+
{1-2 sentence summary}
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Coverage Matrix
|
|
44
|
+
|
|
45
|
+
<!-- Appended by step-02-coverage -->
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Integration Verdicts
|
|
50
|
+
|
|
51
|
+
<!-- Appended by step-03-integrations -->
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Requirements Coverage
|
|
56
|
+
|
|
57
|
+
<!-- Appended by step-04-requirements (if PRD provided) -->
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Synthesis & Recommendations
|
|
62
|
+
|
|
63
|
+
<!-- Appended by step-05-synthesize -->
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Integration Verification Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Rules for cross-referencing API surfaces between two skills to determine integration feasibility.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Verdict Definitions
|
|
10
|
+
|
|
11
|
+
| Verdict | Meaning | Required Evidence |
|
|
12
|
+
|---------|---------|-------------------|
|
|
13
|
+
| **Verified** | APIs demonstrably connect — matching types, documented bridge, or shared protocol | At least one export from Skill A is consumable by an API in Skill B (or vice versa) with compatible types |
|
|
14
|
+
| **Plausible** | Compatible types or protocols but no documented integration path | Both libraries operate in compatible domains with compatible data formats, but no direct API bridge is evident |
|
|
15
|
+
| **Risky** | Type mismatch, protocol gap, or language boundary requiring a bridge | A clear gap exists (e.g., TypeScript↔Rust FFI needed) but a workaround is architecturally feasible |
|
|
16
|
+
| **Blocked** | Fundamental incompatibility — no feasible integration path even with a bridge or adapter layer | The two libraries cannot exchange data in any documented way; requires replacing one of the libraries |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Cross-Reference Protocol
|
|
21
|
+
|
|
22
|
+
For each integration pair (Library A ↔ Library B):
|
|
23
|
+
|
|
24
|
+
### 1. Language Boundary Check
|
|
25
|
+
|
|
26
|
+
| A Language | B Language | Assessment |
|
|
27
|
+
|-----------|-----------|------------|
|
|
28
|
+
| Same language | Same language | No boundary — direct API calls possible |
|
|
29
|
+
| TypeScript ↔ Rust | Requires FFI, IPC, or WebSocket bridge | Check if a bridge library exists in the stack (e.g., Tauri provides JS↔Rust IPC) |
|
|
30
|
+
| TypeScript ↔ Python | Requires REST/gRPC/WebSocket bridge | Typically not direct |
|
|
31
|
+
| Any ↔ C/C++ | FFI available in most languages | Check for bindings |
|
|
32
|
+
|
|
33
|
+
### 2. Protocol Compatibility Check
|
|
34
|
+
|
|
35
|
+
| A Protocol | B Protocol | Assessment |
|
|
36
|
+
|-----------|-----------|------------|
|
|
37
|
+
| In-process (same runtime) | In-process | Direct — function calls |
|
|
38
|
+
| HTTP/REST | HTTP/REST | Network bridge — compatible if API endpoints match |
|
|
39
|
+
| WebSocket | WebSocket | Real-time bridge — check message format compatibility |
|
|
40
|
+
| Shared filesystem | Shared filesystem | Async — check format compatibility |
|
|
41
|
+
| Embedded database | Embedded database | May conflict on lock files — check for multi-writer support |
|
|
42
|
+
|
|
43
|
+
### 3. Type Compatibility Check
|
|
44
|
+
|
|
45
|
+
- Extract the primary data types each library produces/consumes from the skill's export list
|
|
46
|
+
- Check: does Library A export a type that Library B accepts as input?
|
|
47
|
+
- Common patterns: JSON serialization (universal bridge), binary formats (check codec), shared schemas (strong compatibility)
|
|
48
|
+
|
|
49
|
+
### 4. Documentation Cross-Reference
|
|
50
|
+
|
|
51
|
+
- Search Skill A's content for mentions of Library B's name
|
|
52
|
+
- Search Skill B's content for mentions of Library A's name
|
|
53
|
+
- If either mentions the other: strong evidence of documented integration
|
|
54
|
+
- Check if either library's README lists the other as a companion/integration
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Verdict Evidence Format
|
|
59
|
+
|
|
60
|
+
Each verdict MUST include:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
**{Library A} ↔ {Library B}: {VERDICT}**
|
|
64
|
+
|
|
65
|
+
Evidence:
|
|
66
|
+
- A exports: `{function_name}({params}) → {return_type}` [from skill: {skill_name}]
|
|
67
|
+
- B accepts: `{function_name}({params})` [from skill: {skill_name}]
|
|
68
|
+
- Compatibility: {explanation}
|
|
69
|
+
- Language boundary: {same | bridge required via {mechanism}}
|
|
70
|
+
|
|
71
|
+
{If RISKY or BLOCKED:}
|
|
72
|
+
Recommendation: {actionable next step}
|
|
73
|
+
```
|