bmad-module-skill-forge 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 +85 -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 +1 -1
- 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 +10 -7
- package/src/knowledge/progressive-capability.md +3 -2
- package/src/knowledge/qmd-registry.md +4 -1
- package/src/knowledge/skf-knowledge-index.csv +1 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- 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 +1 -1
- 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 +1 -0
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +5 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.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-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +13 -9
- package/src/workflows/create-skill/steps-c/step-03-extract.md +15 -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 +1 -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/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +23 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +30 -2
- 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 +1 -1
- 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 +2 -2
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +5 -2
- package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
- 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
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
| Cursor | `cursor` | .cursorrules |
|
|
23
23
|
| Copilot | `copilot` | AGENTS.md |
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Four-Case Logic
|
|
26
26
|
|
|
27
27
|
### Case 1: Create (No File Exists)
|
|
28
28
|
|
|
@@ -53,6 +53,13 @@ Target file contains `<!-- SKF:BEGIN` and `<!-- SKF:END -->` markers. Replace co
|
|
|
53
53
|
4. Replace everything between markers (inclusive) with new managed section
|
|
54
54
|
5. Write file
|
|
55
55
|
|
|
56
|
+
### Case 4: Malformed Markers (Halt)
|
|
57
|
+
|
|
58
|
+
Target file contains `<!-- SKF:BEGIN` but no matching `<!-- SKF:END -->` marker. This indicates a corrupted managed section.
|
|
59
|
+
|
|
60
|
+
1. Halt workflow with error: "Malformed managed section — `<!-- SKF:BEGIN` found but no `<!-- SKF:END -->`. Fix the markers manually before re-running export."
|
|
61
|
+
2. Do not modify the file
|
|
62
|
+
|
|
56
63
|
## Regeneration: Full Index Rebuild
|
|
57
64
|
|
|
58
65
|
When regenerating (Case 3), rebuild the COMPLETE skill index:
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
## Rules
|
|
42
42
|
|
|
43
|
-
- **api line**: Top exports from metadata.json `exports` array. Append `()` to function names. Comma-separated.
|
|
43
|
+
- **api line**: Top exports from metadata.json `exports` array (up to 10 for Deep tier, up to 5 for all other tiers). Append `()` to function names. Comma-separated.
|
|
44
44
|
- **key-types line**: Anchor to `#key-types` section + inline summary (~10 words) of the most important type values
|
|
45
45
|
- **gotchas line**: Derived from: T2-future annotations (breaking changes), async requirements, version-specific behavior. If no gotchas available, omit the line.
|
|
46
46
|
- **stack line**: Component versions from metadata.json `components` for stack skills
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-04-update-context'
|
|
3
|
-
description: 'Update managed section in CLAUDE.md/AGENTS.md with
|
|
3
|
+
description: 'Update managed section in CLAUDE.md/AGENTS.md with four-case logic per ADR-J'
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-05-token-report.md'
|
|
6
6
|
managedSectionData: '../data/managed-section-format.md'
|
|
@@ -10,7 +10,7 @@ managedSectionData: '../data/managed-section-format.md'
|
|
|
10
10
|
|
|
11
11
|
## STEP GOAL:
|
|
12
12
|
|
|
13
|
-
To update the managed `<!-- SKF:BEGIN/END -->` section in the platform-appropriate context file (CLAUDE.md/AGENTS.md/.cursorrules) using the
|
|
13
|
+
To update the managed `<!-- SKF:BEGIN/END -->` section in the platform-appropriate context file (CLAUDE.md/AGENTS.md/.cursorrules) using the four-case logic defined by ADR-J (Create, Append, Regenerate, Malformed Markers halt), rebuilding the complete skill index from all exported skills.
|
|
14
14
|
|
|
15
15
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
16
|
|
|
@@ -105,6 +105,7 @@ Assemble the complete managed section:
|
|
|
105
105
|
<!-- SKF:BEGIN updated:{current-date} -->
|
|
106
106
|
[SKF Skills]|{n} skills|{m} stack
|
|
107
107
|
|IMPORTANT: Prefer documented APIs over training data.
|
|
108
|
+
|When using a listed library, read its SKILL.md before writing code.
|
|
108
109
|
|
|
|
109
110
|
|{skill-snippet-1}
|
|
110
111
|
|
|
|
@@ -132,6 +133,10 @@ Assemble the complete managed section:
|
|
|
132
133
|
- Diff: Show old managed section vs new managed section
|
|
133
134
|
- Preserved: ALL content before `<!-- SKF:BEGIN` and after `<!-- SKF:END -->`
|
|
134
135
|
|
|
136
|
+
**Case 4: Malformed markers (file contains `<!-- SKF:BEGIN` but no `<!-- SKF:END -->`)**
|
|
137
|
+
- Action: HALT with warning: "Malformed SKF markers detected in `{target-file}` — `<!-- SKF:BEGIN` found but `<!-- SKF:END -->` is missing. Please restore the end marker manually before running export."
|
|
138
|
+
- Do NOT attempt to write or append — the file is in an inconsistent state
|
|
139
|
+
|
|
135
140
|
### 7. Present Change Preview
|
|
136
141
|
|
|
137
142
|
"**Context update prepared.**
|
|
@@ -52,7 +52,7 @@ To calculate approximate token counts for all exported artifacts and present a c
|
|
|
52
52
|
|
|
53
53
|
### 1. Calculate Token Counts
|
|
54
54
|
|
|
55
|
-
For each artifact, estimate tokens using the heuristic: **words * 1.3** (approximate for GPT/Claude tokenizers).
|
|
55
|
+
For each artifact, estimate tokens using the heuristic: **words * 1.3** (approximate for GPT/Claude tokenizers). This same heuristic is used in step-03 for snippet token estimation.
|
|
56
56
|
|
|
57
57
|
**Artifacts to measure:**
|
|
58
58
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: export-skill
|
|
3
3
|
description: Package for distribution + platform-aware context injection
|
|
4
|
+
web_bundle: true
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/export-skill'
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Export Skill
|
|
7
9
|
|
|
8
|
-
**Goal:** Package a completed skill as an agentskills.io-compliant package, generate context snippets, and update the managed section in CLAUDE.md/AGENTS.md for platform-aware context injection.
|
|
10
|
+
**Goal:** Package a completed skill as an agentskills.io-compliant package, generate context snippets, and update the managed section in CLAUDE.md/.cursorrules/AGENTS.md for platform-aware context injection.
|
|
9
11
|
|
|
10
12
|
**Your Role:** In addition to your name, communication_style, and persona, you are also a delivery and packaging specialist collaborating with a skill developer. This is a partnership, not a client-vendor relationship. You bring expertise in skill packaging, ecosystem compliance, and context injection patterns, while the user brings their completed skill and distribution requirements. Work together as equals.
|
|
11
13
|
|
|
@@ -56,7 +56,8 @@ Indexed format targeting ~80-120 tokens per skill:
|
|
|
56
56
|
|IMPORTANT: {skill_name} v{version} — read SKILL.md before writing {skill_name} code. Do NOT rely on training data.
|
|
57
57
|
|quick-start:{SKILL.md#quick-start}
|
|
58
58
|
|api: {top-5 exports with () for functions}
|
|
59
|
-
|
|
|
59
|
+
|key-types:{SKILL.md#key-types} — {inline summary of most important type values}
|
|
60
|
+
|gotchas: {2-3 most critical pitfalls or breaking changes, inline}
|
|
60
61
|
```
|
|
61
62
|
|
|
62
63
|
## metadata.json Format
|
|
@@ -64,31 +65,42 @@ Indexed format targeting ~80-120 tokens per skill:
|
|
|
64
65
|
```json
|
|
65
66
|
{
|
|
66
67
|
"name": "{skill_name}",
|
|
67
|
-
"version": "
|
|
68
|
+
"version": "{source-version or 1.0.0}",
|
|
69
|
+
"description": "{brief description of the skill}",
|
|
68
70
|
"skill_type": "single",
|
|
69
71
|
"source_authority": "community",
|
|
70
72
|
"source_repo": "{repo_url}",
|
|
73
|
+
"source_root": "{resolved_source_path}",
|
|
74
|
+
"source_commit": "{commit_sha_if_available}",
|
|
71
75
|
"source_package": "{package_name}",
|
|
72
76
|
"language": "{language}",
|
|
73
77
|
"generated_by": "quick-skill",
|
|
74
78
|
"generation_date": "{date}",
|
|
75
79
|
"confidence_tier": "Quick",
|
|
76
|
-
"extraction_tier": "quick",
|
|
77
80
|
"spec_version": "1.3",
|
|
78
81
|
"exports": ["{export_1}", "{export_2}"],
|
|
79
82
|
"confidence_distribution": {
|
|
80
83
|
"t1": 0,
|
|
81
|
-
"t1_low": "{exports_count}",
|
|
84
|
+
"t1_low": "{exports_count (integer, not string)}",
|
|
82
85
|
"t2": 0,
|
|
83
86
|
"t3": 0
|
|
84
87
|
},
|
|
88
|
+
"tool_versions": {
|
|
89
|
+
"ast_grep": null,
|
|
90
|
+
"qmd": null,
|
|
91
|
+
"skf": "{skf_version}"
|
|
92
|
+
},
|
|
85
93
|
"stats": {
|
|
86
94
|
"exports_documented": "{number}",
|
|
87
95
|
"exports_public_api": "{number}",
|
|
88
96
|
"exports_internal": 0,
|
|
89
97
|
"exports_total": "{number}",
|
|
90
98
|
"public_api_coverage": 1.0,
|
|
91
|
-
"total_coverage": 1.0
|
|
92
|
-
|
|
99
|
+
"total_coverage": 1.0,
|
|
100
|
+
"scripts_count": 0,
|
|
101
|
+
"assets_count": 0
|
|
102
|
+
},
|
|
103
|
+
"dependencies": [],
|
|
104
|
+
"compatibility": "{semver-range}"
|
|
93
105
|
}
|
|
94
106
|
```
|
|
@@ -107,7 +107,8 @@ Create context-snippet.md in Vercel-aligned indexed format (~80-120 tokens):
|
|
|
107
107
|
|IMPORTANT: {skill_name} v{version} — read SKILL.md before writing {skill_name} code. Do NOT rely on training data.
|
|
108
108
|
|quick-start:{SKILL.md#quick-start}
|
|
109
109
|
|api: {top-5 exports with () for functions}
|
|
110
|
-
|
|
|
110
|
+
|key-types:{SKILL.md#key-types} — {inline summary of most important type values}
|
|
111
|
+
|gotchas: {2-3 most critical pitfalls or breaking changes, inline}
|
|
111
112
|
```
|
|
112
113
|
|
|
113
114
|
**If fewer than 5 exports:** Use all available exports.
|
|
@@ -116,29 +117,48 @@ Create context-snippet.md in Vercel-aligned indexed format (~80-120 tokens):
|
|
|
116
117
|
|
|
117
118
|
### 4. Generate Metadata JSON
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
Generate metadata.json following the exact structure defined in {skillTemplateData} metadata.json section. Populate fields from extraction_inventory:
|
|
120
121
|
|
|
121
122
|
```json
|
|
122
123
|
{
|
|
123
|
-
"name": "{
|
|
124
|
-
"version": "{extraction_inventory.version or
|
|
124
|
+
"name": "{skill_name}",
|
|
125
|
+
"version": "{extraction_inventory.version or 1.0.0}",
|
|
126
|
+
"description": "{brief description of the skill}",
|
|
125
127
|
"skill_type": "single",
|
|
126
128
|
"source_authority": "community",
|
|
127
129
|
"source_repo": "{resolved_url}",
|
|
130
|
+
"source_root": "{resolved_source_path}",
|
|
131
|
+
"source_commit": "{commit_sha_if_available}",
|
|
128
132
|
"source_package": "{package_name from manifest}",
|
|
129
133
|
"language": "{language}",
|
|
130
134
|
"generated_by": "quick-skill",
|
|
131
135
|
"generation_date": "{current ISO date}",
|
|
132
136
|
"confidence_tier": "Quick",
|
|
137
|
+
"spec_version": "1.3",
|
|
133
138
|
"exports": ["{export_1}", "{export_2}"],
|
|
139
|
+
"confidence_distribution": {
|
|
140
|
+
"t1": 0,
|
|
141
|
+
"t1_low": "{number of exports found — must be integer, not string}",
|
|
142
|
+
"t2": 0,
|
|
143
|
+
"t3": 0
|
|
144
|
+
},
|
|
145
|
+
"tool_versions": {
|
|
146
|
+
"ast_grep": null,
|
|
147
|
+
"qmd": null,
|
|
148
|
+
"skf": "{skf_version}"
|
|
149
|
+
},
|
|
134
150
|
"stats": {
|
|
135
151
|
"exports_documented": "{number of exports found}",
|
|
136
152
|
"exports_public_api": "{number of exports found}",
|
|
137
153
|
"exports_internal": 0,
|
|
138
154
|
"exports_total": "{number of exports found}",
|
|
139
155
|
"public_api_coverage": 1.0,
|
|
140
|
-
"total_coverage": 1.0
|
|
141
|
-
|
|
156
|
+
"total_coverage": 1.0,
|
|
157
|
+
"scripts_count": 0,
|
|
158
|
+
"assets_count": 0
|
|
159
|
+
},
|
|
160
|
+
"dependencies": [],
|
|
161
|
+
"compatibility": "{semver-range or null}"
|
|
142
162
|
}
|
|
143
163
|
```
|
|
144
164
|
|
|
@@ -116,7 +116,7 @@ Check context-snippet.md format compliance:
|
|
|
116
116
|
Check metadata.json has required fields:
|
|
117
117
|
|
|
118
118
|
- [ ] `name` — present, non-empty
|
|
119
|
-
- [ ] `version` — present (auto-detected or "
|
|
119
|
+
- [ ] `version` — present (auto-detected or "1.0.0")
|
|
120
120
|
- [ ] `source_authority` — must be "community"
|
|
121
121
|
- [ ] `source_repo` — present, valid GitHub URL
|
|
122
122
|
- [ ] `language` — present, non-empty
|
|
@@ -62,6 +62,9 @@ If directory already exists, confirm with user before overwriting:
|
|
|
62
62
|
|
|
63
63
|
"**Directory `{skills_output_folder}/{repo_name}/` already exists.** Overwrite existing files? [Y/N]"
|
|
64
64
|
|
|
65
|
+
- **If user selects Y:** Proceed to section 2.
|
|
66
|
+
- **If user selects N:** Halt with: "Overwrite cancelled. Existing skill preserved. Run [QS] with a different skill name or remove the existing directory manually."
|
|
67
|
+
|
|
65
68
|
### 2. Write SKILL.md
|
|
66
69
|
|
|
67
70
|
Write the compiled SKILL.md content to:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: quick-skill
|
|
3
3
|
description: Brief-less fast skill with package-to-repo resolution
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/quick-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/quick-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Quick Skill
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Architecture Refinement Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Rules for detecting gaps, issues, and improvements in an architecture document using generated skill data as the evidence source.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Gap Detection Rules
|
|
10
|
+
|
|
11
|
+
Gaps are undocumented integration paths — library pairs that have compatible APIs but no architecture description.
|
|
12
|
+
|
|
13
|
+
### Detection Method
|
|
14
|
+
|
|
15
|
+
1. Generate all possible library pairs from the skill inventory
|
|
16
|
+
2. For each pair, check if both skills export APIs that could connect (compatible types, shared protocols, complementary producer/consumer patterns)
|
|
17
|
+
3. Cross-reference against the architecture document: does the document describe how these two libraries interact?
|
|
18
|
+
4. If compatible APIs exist but NO architecture description exists, this is a **gap**
|
|
19
|
+
|
|
20
|
+
### Gap Classification
|
|
21
|
+
|
|
22
|
+
| Gap Type | Description | Example |
|
|
23
|
+
|----------|-------------|---------|
|
|
24
|
+
| **Missing Integration Path** | Two libraries can connect but the architecture never describes how | Skill A exports JSON producer, Skill B accepts JSON input, no mention of A-to-B flow |
|
|
25
|
+
| **Undocumented Data Flow** | Data moves between libraries but the flow is not described | Architecture mentions both libraries but not their data exchange mechanism |
|
|
26
|
+
| **Absent Bridge Layer** | Cross-language or cross-protocol libraries need a bridge not mentioned | Rust library and TypeScript library with no IPC/FFI description |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Issue Detection Rules
|
|
31
|
+
|
|
32
|
+
Issues are contradictions between architecture claims and verified API reality from the skills.
|
|
33
|
+
|
|
34
|
+
### Detection Method
|
|
35
|
+
|
|
36
|
+
1. Extract every integration claim from the architecture document (prose co-mention analysis)
|
|
37
|
+
2. For each claim, verify against the actual API surfaces in the skills
|
|
38
|
+
3. Flag contradictions: claimed APIs that do not exist, assumed compatibility that breaks, missing bridge layers
|
|
39
|
+
|
|
40
|
+
### Issue Classification
|
|
41
|
+
|
|
42
|
+
| Issue Type | Description | Example |
|
|
43
|
+
|------------|-------------|---------|
|
|
44
|
+
| **API Mismatch** | Architecture describes an API that does not exist in the skill | "Library X exposes a streaming API" but skill shows only batch APIs |
|
|
45
|
+
| **Protocol Contradiction** | Architecture assumes a protocol the library does not support | "Communicates via gRPC" but skill shows HTTP-only exports |
|
|
46
|
+
| **Language Boundary Ignored** | Architecture assumes direct calls across language boundaries | "Calls Rust functions from TypeScript" with no FFI/IPC mechanism described |
|
|
47
|
+
| **Type Incompatibility** | Architecture assumes type compatibility that does not hold | "Passes CRDT documents directly" but types are incompatible across libraries |
|
|
48
|
+
|
|
49
|
+
### VS Report Integration
|
|
50
|
+
|
|
51
|
+
When a VS feasibility report is available:
|
|
52
|
+
- RISKY verdicts become **confirmed issues** with the VS evidence as additional citation
|
|
53
|
+
- BLOCKED verdicts become **critical issues** requiring architecture redesign
|
|
54
|
+
- Plausible verdicts become potential issues **only if** the VS rationale text explicitly states "no direct API evidence" or "weak evidence" — otherwise they are informational only
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Improvement Detection Rules
|
|
59
|
+
|
|
60
|
+
Improvements are capability expansions — library features documented in skills but not leveraged in the architecture.
|
|
61
|
+
|
|
62
|
+
### Detection Method
|
|
63
|
+
|
|
64
|
+
1. For each skill, enumerate its full API surface (all exports, types, protocols)
|
|
65
|
+
2. Compare against how the architecture uses that library
|
|
66
|
+
3. Identify capabilities present in the skill but absent from the architecture
|
|
67
|
+
|
|
68
|
+
### Improvement Classification
|
|
69
|
+
|
|
70
|
+
| Improvement Type | Description | Example |
|
|
71
|
+
|------------------|-------------|---------|
|
|
72
|
+
| **Unused Capability** | Library has a feature the architecture does not mention | "Loro supports document CRDTs but architecture only uses data sync" |
|
|
73
|
+
| **Cross-Library Synergy** | Two libraries have complementary features not combined in architecture | "Library A's event system could feed Library B's stream processor" |
|
|
74
|
+
| **Alternative Pattern** | Skill documents a better pattern than the one described in architecture | "Skill shows batch API is more efficient than the per-item approach described" |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Refinement Citation Format
|
|
79
|
+
|
|
80
|
+
Every refinement (gap, issue, or improvement) MUST cite evidence:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
**[GAP|ISSUE|IMPROVEMENT]**: {description}
|
|
84
|
+
|
|
85
|
+
Evidence:
|
|
86
|
+
- {skill_name} exports: `{function_name}({params}) -> {return_type}`
|
|
87
|
+
- {skill_name} provides: `{type_or_protocol}`
|
|
88
|
+
- Architecture states: "{quoted text from original document}"
|
|
89
|
+
- {IF VS report}: VS verdict: {verdict} for {pair}
|
|
90
|
+
|
|
91
|
+
Suggestion: {specific, actionable recommendation}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Preservation Rules
|
|
97
|
+
|
|
98
|
+
1. **NEVER delete original content** — only add annotations and subsections
|
|
99
|
+
2. **Follow original section layout** — add refinement subsections within existing sections
|
|
100
|
+
3. **Use callout blocks** for issues: `> [!WARNING]` or `> [!NOTE]` format
|
|
101
|
+
4. **Mark additions clearly** — prefix added subsections with "RA:" or use a refinement marker
|
|
102
|
+
5. **Maintain original heading hierarchy** — refinement subsections are one level deeper than the parent
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-01-init'
|
|
3
|
+
description: 'Load architecture doc, scan skills folder, load optional VS report, validate inputs'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-02-gap-analysis.md'
|
|
6
|
+
refinementRulesData: '../data/refinement-rules.md'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 1: Initialize Refinement
|
|
10
|
+
|
|
11
|
+
## STEP GOAL:
|
|
12
|
+
|
|
13
|
+
Load the architecture document (required), scan the skills folder to build a skill inventory with metadata, load the optional VS feasibility report for context, validate that all inputs exist and meet minimum requirements, and present an initialization summary before auto-proceeding.
|
|
14
|
+
|
|
15
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
|
+
|
|
17
|
+
### Universal Rules:
|
|
18
|
+
|
|
19
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
21
|
+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
22
|
+
|
|
23
|
+
### Role Reinforcement:
|
|
24
|
+
|
|
25
|
+
- ✅ You are an architecture refinement analyst operating in Ferris Architect mode
|
|
26
|
+
- ✅ Execute with analytical precision — every loaded skill must be validated against actual files
|
|
27
|
+
- ✅ You enforce the zero-hallucination principle: only report skills that physically exist on disk
|
|
28
|
+
|
|
29
|
+
### Step-Specific Rules:
|
|
30
|
+
|
|
31
|
+
- 🎯 Focus ONLY on loading inputs, scanning skills, and validating prerequisites
|
|
32
|
+
- 🚫 FORBIDDEN to perform any gap analysis, issue detection, or improvement suggestions
|
|
33
|
+
- 🚫 No A/P menu — this is an auto-proceed init step
|
|
34
|
+
- 💬 Present a clear initialization summary so downstream steps have validated inputs
|
|
35
|
+
|
|
36
|
+
## EXECUTION PROTOCOLS:
|
|
37
|
+
|
|
38
|
+
- Collect and validate all input documents and skill artifacts
|
|
39
|
+
- Load refinement rules from {refinementRulesData} for downstream step reference
|
|
40
|
+
- Auto-proceed to next step after successful initialization
|
|
41
|
+
- HALT with actionable error if minimum requirements not met
|
|
42
|
+
|
|
43
|
+
## CONTEXT BOUNDARIES:
|
|
44
|
+
|
|
45
|
+
- This is the first step — no prior workflow state exists
|
|
46
|
+
- Requires skills to have been generated by create-skill or quick-skill workflows
|
|
47
|
+
- User provides architecture document path (required) and optional VS report path
|
|
48
|
+
- No dependency on forge-tier — this workflow operates on skill content only
|
|
49
|
+
- Requires `forge_data_folder` from config.yaml for durability state (directory is created automatically if missing)
|
|
50
|
+
|
|
51
|
+
## MANDATORY SEQUENCE
|
|
52
|
+
|
|
53
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
54
|
+
|
|
55
|
+
### 1. Accept Input Documents
|
|
56
|
+
|
|
57
|
+
"**Refine Architecture — Evidence-Backed Refinement**
|
|
58
|
+
|
|
59
|
+
Please provide the following:
|
|
60
|
+
1. **Architecture document path** (REQUIRED) — your project's architecture doc to refine
|
|
61
|
+
2. **VS feasibility report path** (OPTIONAL) — from a previous [VS] Verify Stack run, for additional context"
|
|
62
|
+
|
|
63
|
+
Wait for user input. Store the validated architecture document path as `architecture_doc`.
|
|
64
|
+
|
|
65
|
+
**Validate architecture document:**
|
|
66
|
+
- Confirm the file exists and is readable
|
|
67
|
+
- If missing or unreadable: "Architecture document not found at `{path}`. Provide a valid path."
|
|
68
|
+
- HALT until a valid architecture document is provided
|
|
69
|
+
|
|
70
|
+
**Validate VS report (if provided):**
|
|
71
|
+
- Confirm the file exists and is readable
|
|
72
|
+
- If missing at user-provided path: attempt auto-probe (below) before giving up
|
|
73
|
+
- Store VS report availability as `vs_report_available: true|false` and `vs_report_path`
|
|
74
|
+
|
|
75
|
+
### 2. Scan Skills Folder
|
|
76
|
+
|
|
77
|
+
Read the `{skills_output_folder}` directory.
|
|
78
|
+
|
|
79
|
+
For each subdirectory, check for the presence of `SKILL.md` and `metadata.json`.
|
|
80
|
+
|
|
81
|
+
**For each valid skill directory, extract from metadata.json:**
|
|
82
|
+
- `name` — skill name
|
|
83
|
+
- `language` — primary language
|
|
84
|
+
- `confidence_tier` — Quick, Forge, Forge+, or Deep
|
|
85
|
+
- `exports_documented` — read from `stats.exports_documented` in metadata.json (count of documented exports)
|
|
86
|
+
- `source_repo` or `source_root` — original source repository
|
|
87
|
+
|
|
88
|
+
**Build a skill inventory** as an internal list of all loaded skills with the fields above.
|
|
89
|
+
|
|
90
|
+
**If a subdirectory lacks SKILL.md or metadata.json:**
|
|
91
|
+
- Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
|
|
92
|
+
- Do not include in inventory
|
|
93
|
+
|
|
94
|
+
### 3. Validate Minimum Requirements
|
|
95
|
+
|
|
96
|
+
**Check skill count:**
|
|
97
|
+
- At least 1 valid skill must exist
|
|
98
|
+
- If no skills found: "**Cannot proceed.** No skills found in `{skills_output_folder}`. Generate skills with [CS] Create Skill or [QS] Quick Skill, then re-run [RA]."
|
|
99
|
+
- HALT workflow
|
|
100
|
+
- If exactly 1 valid skill found: "⚠️ Proceeding with 1 skill. Note: gap analysis will find no gaps — pairwise analysis requires at least 2 skills. Step 02 will still execute and issue an appropriate notice. Issue detection and improvement detection will proceed normally."
|
|
101
|
+
|
|
102
|
+
**Check output_folder:**
|
|
103
|
+
- Verify `output_folder` was resolved from config.yaml and is non-empty
|
|
104
|
+
- If undefined or empty: "**Cannot proceed.** `output_folder` is not configured in config.yaml. Add an `output_folder` path and re-run [RA]."
|
|
105
|
+
- HALT workflow
|
|
106
|
+
- Verify the `output_folder` directory exists. If it does not exist, create it. HALT with error if creation fails.
|
|
107
|
+
|
|
108
|
+
**Check forge_data_folder:**
|
|
109
|
+
- Verify `forge_data_folder` was resolved from config.yaml and is non-empty
|
|
110
|
+
- If undefined or empty: "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Add a `forge_data_folder` path to your config.yaml and re-run [RA]."
|
|
111
|
+
- HALT workflow
|
|
112
|
+
- Verify the `forge_data_folder` directory exists. If it does not exist, attempt to create it. If creation fails: "**Cannot proceed.** `forge_data_folder` at `{forge_data_folder}` does not exist and could not be created. Create the directory manually and re-run [RA]."
|
|
113
|
+
- HALT workflow on creation failure
|
|
114
|
+
|
|
115
|
+
**Check architecture document:**
|
|
116
|
+
- Confirm it was loaded successfully in section 1
|
|
117
|
+
- If not: HALT with error (should not reach here if section 1 validation passed)
|
|
118
|
+
|
|
119
|
+
### 3b. Auto-Probe VS Report
|
|
120
|
+
|
|
121
|
+
**Auto-probe VS report (if not provided by user in section 1, OR if user-provided path was invalid):**
|
|
122
|
+
- Only attempt if `forge_data_folder` is non-empty and the directory exists (validated above); otherwise skip probe and set `vs_report_available: false`
|
|
123
|
+
- Check for `{forge_data_folder}/feasibility-report-{project_name}.md`
|
|
124
|
+
- If found: "Auto-discovered VS report at `{path}`. Loading for additional context."
|
|
125
|
+
- Store `vs_report_available: true` and `vs_report_path`
|
|
126
|
+
- If not found: `vs_report_available: false` — "Proceeding without VS report — issue detection will rely on skill data only."
|
|
127
|
+
|
|
128
|
+
### 3c. Reset RA State File
|
|
129
|
+
|
|
130
|
+
Create (or overwrite) `{forge_data_folder}/ra-state-{project_name}.md` with a fresh header:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
<!-- RA state for {project_name} — generated {current_date} -->
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This ensures steps 02-04 append to a clean slate and context recovery in step-05 never loads stale findings from a prior run.
|
|
137
|
+
|
|
138
|
+
### 4. Load Refinement Rules
|
|
139
|
+
|
|
140
|
+
Load `{refinementRulesData}` for reference by downstream steps.
|
|
141
|
+
|
|
142
|
+
Extract: gap detection rules, issue detection rules, improvement detection rules, citation format, and preservation rules.
|
|
143
|
+
|
|
144
|
+
### 5. Display Initialization Summary
|
|
145
|
+
|
|
146
|
+
"**Architecture Refinement Initialized**
|
|
147
|
+
|
|
148
|
+
| Field | Value |
|
|
149
|
+
|-------|-------|
|
|
150
|
+
| **Architecture Doc** | {architecture_doc} |
|
|
151
|
+
| **VS Report** | {vs_report_path or 'Not provided — issue detection will use skill data only'} |
|
|
152
|
+
| **Skills Loaded** | {skill_count} |
|
|
153
|
+
|
|
154
|
+
**Skill Inventory:**
|
|
155
|
+
|
|
156
|
+
| Skill | Language | Tier | Exports |
|
|
157
|
+
|-------|----------|------|---------|
|
|
158
|
+
| {skill_name} | {language} | {confidence_tier} | {exports_documented} |
|
|
159
|
+
|
|
160
|
+
**Proceeding to gap analysis...**"
|
|
161
|
+
|
|
162
|
+
### 6. Auto-Proceed to Next Step
|
|
163
|
+
|
|
164
|
+
Load, read the full file and then execute `{nextStepFile}`.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
169
|
+
|
|
170
|
+
### ✅ SUCCESS:
|
|
171
|
+
|
|
172
|
+
- Architecture document loaded and validated
|
|
173
|
+
- VS report loaded or absence recorded
|
|
174
|
+
- Skills folder scanned with SKILL.md and metadata.json validation per skill
|
|
175
|
+
- At least 1 valid skill in inventory
|
|
176
|
+
- Refinement rules loaded from {refinementRulesData}
|
|
177
|
+
- Initialization summary displayed with skill inventory table
|
|
178
|
+
- Auto-proceeded to step 02
|
|
179
|
+
|
|
180
|
+
### ❌ SYSTEM FAILURE:
|
|
181
|
+
|
|
182
|
+
- Proceeding with no valid skills
|
|
183
|
+
- Proceeding without a valid architecture document
|
|
184
|
+
- Not validating SKILL.md and metadata.json existence per skill directory
|
|
185
|
+
- Performing gap analysis, issue detection, or improvement suggestions in this step
|
|
186
|
+
- Hardcoded paths instead of frontmatter variables
|
|
187
|
+
|
|
188
|
+
**Master Rule:** This step validates inputs and initializes state. No analysis, no comparison, no refinement suggestions.
|