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.
Files changed (144) hide show
  1. package/README.md +2 -2
  2. package/docs/agents.md +9 -5
  3. package/docs/concepts.md +17 -13
  4. package/docs/examples.md +19 -4
  5. package/docs/getting-started.md +34 -19
  6. package/docs/how-it-works.md +87 -84
  7. package/docs/index.md +1 -1
  8. package/docs/workflows.md +88 -40
  9. package/package.json +1 -1
  10. package/src/agents/forger.agent.yaml +17 -5
  11. package/src/forger/README.md +1 -1
  12. package/src/forger/forge-tier.yaml +2 -1
  13. package/src/forger/preferences.yaml +5 -7
  14. package/src/knowledge/agentskills-spec.md +1 -1
  15. package/src/knowledge/architecture-verification.md +102 -0
  16. package/src/knowledge/ccc-bridge.md +3 -2
  17. package/src/knowledge/confidence-tiers.md +12 -1
  18. package/src/knowledge/doc-fetcher.md +1 -1
  19. package/src/knowledge/manual-section-integrity.md +2 -2
  20. package/src/knowledge/overview.md +11 -7
  21. package/src/knowledge/progressive-capability.md +5 -2
  22. package/src/knowledge/qmd-registry.md +5 -2
  23. package/src/knowledge/skf-knowledge-index.csv +2 -0
  24. package/src/knowledge/skill-lifecycle.md +26 -2
  25. package/src/knowledge/split-body-strategy.md +16 -2
  26. package/src/knowledge/tool-resolution.md +55 -0
  27. package/src/knowledge/zero-hallucination.md +11 -8
  28. package/src/module-help.csv +9 -6
  29. package/src/module.yaml +3 -0
  30. package/src/workflows/README.md +35 -17
  31. package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
  32. package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
  33. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
  34. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
  35. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
  36. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +3 -3
  37. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
  38. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
  39. package/src/workflows/analyze-source/workflow.md +2 -2
  40. package/src/workflows/audit-skill/data/severity-rules.md +1 -1
  41. package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -1
  42. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +8 -1
  43. package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +2 -2
  44. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +2 -2
  45. package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
  46. package/src/workflows/audit-skill/workflow.md +2 -1
  47. package/src/workflows/brief-skill/data/scope-templates.md +10 -0
  48. package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
  49. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
  50. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +1 -1
  51. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
  52. package/src/workflows/create-skill/data/extraction-patterns.md +7 -1
  53. package/src/workflows/create-skill/data/skill-sections.md +12 -11
  54. package/src/workflows/create-skill/data/source-resolution-protocols.md +2 -2
  55. package/src/workflows/create-skill/data/tier-degradation-rules.md +1 -1
  56. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +14 -10
  57. package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +4 -0
  58. package/src/workflows/create-skill/steps-c/step-03-extract.md +19 -19
  59. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
  60. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
  61. package/src/workflows/create-skill/steps-c/step-04-enrich.md +3 -1
  62. package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
  63. package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
  64. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
  65. package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
  66. package/src/workflows/create-skill/workflow.md +2 -2
  67. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
  68. package/src/workflows/create-stack-skill/data/manifest-patterns.md +23 -1
  69. package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
  70. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -7
  71. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +37 -3
  72. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +29 -3
  73. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +50 -7
  74. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +35 -3
  75. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
  76. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
  77. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
  78. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
  79. package/src/workflows/create-stack-skill/workflow.md +2 -2
  80. package/src/workflows/export-skill/data/managed-section-format.md +8 -1
  81. package/src/workflows/export-skill/data/snippet-format.md +1 -1
  82. package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
  83. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  84. package/src/workflows/export-skill/workflow.md +3 -1
  85. package/src/workflows/quick-skill/data/skill-template.md +18 -6
  86. package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
  87. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  88. package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
  89. package/src/workflows/quick-skill/workflow.md +1 -1
  90. package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
  91. package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
  92. package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
  93. package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
  94. package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
  95. package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
  96. package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
  97. package/src/workflows/refine-architecture/workflow.md +61 -0
  98. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
  99. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +5 -3
  100. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
  101. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
  102. package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
  103. package/src/workflows/setup-forge/workflow.md +3 -2
  104. package/src/workflows/test-skill/data/scoring-rules.md +3 -0
  105. package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
  106. package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
  107. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
  108. package/src/workflows/test-skill/workflow.md +2 -2
  109. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +3 -3
  110. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +8 -3
  111. package/src/workflows/update-skill/steps-c/step-05-validate.md +8 -12
  112. package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
  113. package/src/workflows/update-skill/workflow.md +1 -1
  114. package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
  115. package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
  116. package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
  117. package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
  118. package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
  119. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
  120. package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
  121. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
  122. package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
  123. package/src/workflows/verify-stack/workflow.md +61 -0
  124. package/src/workflows/analyze-source/validation-report.md +0 -657
  125. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
  126. package/src/workflows/audit-skill/validation-report.md +0 -545
  127. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
  128. package/src/workflows/brief-skill/validation-report.md +0 -630
  129. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
  130. package/src/workflows/create-skill/validation-report.md +0 -189
  131. package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
  132. package/src/workflows/create-stack-skill/validation-report.md +0 -401
  133. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
  134. package/src/workflows/export-skill/validation-report.md +0 -263
  135. package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
  136. package/src/workflows/quick-skill/validation-report.md +0 -543
  137. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
  138. package/src/workflows/setup-forge/validation-report.md +0 -504
  139. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
  140. package/src/workflows/test-skill/validation-report.md +0 -390
  141. package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
  142. package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
  143. package/src/workflows/update-skill/validation-report.md +0 -559
  144. package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
@@ -9,7 +9,7 @@ forgeTierConfig: '{sidecar_path}/forge-tier.yaml'
9
9
 
10
10
  ## STEP GOAL:
11
11
 
12
- To write all compiled content to disk — 4 deliverable files to `skills/{name}/` and 3 workspace artifacts to `forge-data/{name}/`, creating directories as needed.
12
+ To write all compiled content to disk — 4 deliverable files to `{skills_output_folder}/{name}/` and 3 workspace artifacts to `{forge_data_folder}/{name}/`, creating directories as needed.
13
13
 
14
14
  ## MANDATORY EXECUTION RULES (READ FIRST):
15
15
 
@@ -30,7 +30,7 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
30
30
 
31
31
  - 🎯 Focus ONLY on writing files from the compiled content in context
32
32
  - 🚫 FORBIDDEN to modify content during writing — write exactly what was compiled
33
- - 🚫 FORBIDDEN to skip any artifact — all 7 files must be written
33
+ - 🚫 FORBIDDEN to skip any artifact — all base artifact types must be written (4 deliverables + 3 workspace files + N reference files)
34
34
  - 💬 Report each file written with its path
35
35
  - 📁 Create directories before writing files
36
36
 
@@ -54,65 +54,66 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
54
54
 
55
55
  ### 1. Create Directory Structure
56
56
 
57
- Create the following directories at `{project-root}/`:
57
+ Create the following directories:
58
58
 
59
59
  ```
60
- skills/{name}/
61
- skills/{name}/references/
62
- forge-data/{name}/
60
+ {skills_output_folder}/{name}/
61
+ {skills_output_folder}/{name}/references/
62
+ {forge_data_folder}/{name}/
63
63
  ```
64
64
 
65
- If `scripts_inventory` is non-empty, also create: `skills/{name}/scripts/`
66
- If `assets_inventory` is non-empty, also create: `skills/{name}/assets/`
65
+ If `scripts_inventory` is non-empty, also create: `{skills_output_folder}/{name}/scripts/`
66
+ If `assets_inventory` is non-empty, also create: `{skills_output_folder}/{name}/assets/`
67
67
 
68
68
  Where `{name}` is the skill name from the brief (kebab-case).
69
69
 
70
70
  If directories already exist, do not error — proceed with file writing (overwrites existing files).
71
71
 
72
- ### 2. Write Deliverables to skills/{name}/
72
+ ### 2. Write Deliverables to {skills_output_folder}/{name}/
73
73
 
74
74
  Write these 4 files from the compiled content:
75
75
 
76
- **File 1:** `skills/{name}/SKILL.md`
76
+ **File 1:** `{skills_output_folder}/{name}/SKILL.md`
77
77
  - The complete compiled skill document
78
78
  - agentskills.io-compliant format with all sections
79
79
  - [MANUAL] markers seeded
80
80
 
81
- **File 2:** `skills/{name}/context-snippet.md`
81
+ **File 2:** `{skills_output_folder}/{name}/context-snippet.md`
82
82
  - Compressed 2-line format for CLAUDE.md integration
83
83
 
84
- **File 3:** `skills/{name}/metadata.json`
84
+ **File 3:** `{skills_output_folder}/{name}/metadata.json`
85
85
  - Machine-readable birth certificate with stats and provenance
86
86
 
87
- **File 4:** `skills/{name}/references/*.md`
87
+ **File 4:** `{skills_output_folder}/{name}/references/*.md`
88
88
  - One file per function group or type
89
89
  - Progressive disclosure detail files
90
90
 
91
- **Files 4b (conditional):** `skills/{name}/scripts/*`
91
+ **Files 4b (conditional):** `{skills_output_folder}/{name}/scripts/*`
92
92
  - One file per detected script, copied from source with content preserved
93
93
  - Only created when `scripts_inventory` is non-empty
94
94
 
95
- **Files 4c (conditional):** `skills/{name}/assets/*`
95
+ **Files 4c (conditional):** `{skills_output_folder}/{name}/assets/*`
96
96
  - One file per detected asset, copied from source with content preserved
97
97
  - Only created when `assets_inventory` is non-empty
98
98
 
99
- ### 3. Write Workspace Artifacts to forge-data/{name}/
99
+ ### 3. Write Workspace Artifacts to {forge_data_folder}/{name}/
100
100
 
101
101
  Write these 3 files from the compiled content:
102
102
 
103
- **File 5:** `forge-data/{name}/provenance-map.json`
103
+ **File 5:** `{forge_data_folder}/{name}/provenance-map.json`
104
104
  - Per-claim source map with AST bindings and confidence tiers
105
105
 
106
- **File 6:** `forge-data/{name}/evidence-report.md`
106
+ **File 6:** `{forge_data_folder}/{name}/evidence-report.md`
107
107
  - Build artifact with extraction summary, validation results, warnings
108
108
 
109
- **File 7:** `forge-data/{name}/extraction-rules.yaml`
109
+ **File 7:** `{forge_data_folder}/{name}/extraction-rules.yaml`
110
110
  - Language and ast-grep schema used for this extraction (for reproducibility)
111
111
 
112
112
  ### 4. Verify Write Completion
113
113
 
114
114
  After all files are written, verify:
115
- - All 7 base files exist at their expected paths, plus scripts/ and assets/ files when inventories are non-empty
115
+ - All 4 deliverable artifact types exist (SKILL.md, context-snippet.md, metadata.json, at least one file in references/), all 3 workspace artifacts exist (provenance-map.json, evidence-report.md, extraction-rules.yaml), plus scripts/ and assets/ files when inventories are non-empty
116
+ - Store `ref_count` = count of files written to `references/` for use in step-08 report
116
117
  - List each file with its path and size
117
118
 
118
119
  **If any write failed:**
@@ -123,7 +124,7 @@ Display brief confirmation:
123
124
 
124
125
  "**Artifacts generated.**
125
126
 
126
- **Deliverables (skills/{name}/):**
127
+ **Deliverables ({skills_output_folder}/{name}/):**
127
128
  - SKILL.md
128
129
  - context-snippet.md
129
130
  - metadata.json
@@ -131,7 +132,7 @@ Display brief confirmation:
131
132
  {if assets: - assets/ ({assets_count} files)}
132
133
  - references/ ({reference_count} files)
133
134
 
134
- **Workspace (forge-data/{name}/):**
135
+ **Workspace ({forge_data_folder}/{name}/):**
135
136
  - provenance-map.json
136
137
  - evidence-report.md
137
138
  - extraction-rules.yaml
@@ -144,23 +145,13 @@ Proceeding to compilation report..."
144
145
 
145
146
  Index the generated skill artifacts into a QMD collection so that audit-skill and update-skill can perform high-signal searches against curated extraction data instead of raw source files.
146
147
 
147
- **Collection creation:**
148
-
149
- Create a QMD collection from both artifact directories:
150
- ```bash
151
- qmd collection add {project-root}/skills/{name} --name {name}-extraction --mask "**/*"
152
- qmd embed
153
- ```
154
-
155
- If collection already exists (re-run): remove and recreate for atomic replace:
148
+ **Collection creation:** Create (or replace) a QMD collection from the skill artifacts:
156
149
  ```bash
157
- qmd collection remove {name}-extraction
158
- qmd collection add {project-root}/skills/{name} --name {name}-extraction --mask "**/*"
159
- qmd embed
150
+ qmd collection remove {name}-extraction 2>/dev/null # no-op if new
151
+ qmd collection add {skills_output_folder}/{name} --name {name}-extraction --mask "**/*"
152
+ qmd embed # generates vector embeddings for vector_search/deep_search
160
153
  ```
161
154
 
162
- **Note:** `qmd embed` generates vector embeddings required for `vector_search` and `deep_search`. Without it, only BM25 keyword `search` works.
163
-
164
155
  **Registry update:**
165
156
 
166
157
  Read `{forgeTierConfig}` and update the `qmd_collections` array.
@@ -197,7 +188,7 @@ Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.
197
188
 
198
189
  Read `{forgeTierConfig}` and update the `ccc_index_registry` array.
199
190
 
200
- Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combined with `skill_name` NOT by local `path`, which may be an ephemeral clone path that changes on every run for remote repos. If an entry with matching `source_repo` + `skill_name` already exists, replace it. Otherwise, append:
191
+ Deduplicate by `source_repo` + `skill_name` (NOT local `path`, which may be ephemeral). Replace existing match or append:
201
192
 
202
193
  ```yaml
203
194
  - source_repo: "{brief.source_repo}"
@@ -209,11 +200,9 @@ Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combin
209
200
 
210
201
  Write the updated forge-tier.yaml.
211
202
 
212
- **Error handling:**
213
- - If ccc indexing fails: log the error, continue. Do NOT fail the workflow.
214
- - If forge-tier.yaml update fails: log the error, continue.
203
+ **Error handling:** If ccc indexing or registry update fails, log and continue — do NOT fail the workflow.
215
204
 
216
- **IF `tools.ccc` is false:** Skip this section silently. No messaging.
205
+ **IF `tools.ccc` is false:** Skip this section silently.
217
206
 
218
207
  ### 6. Menu Handling Logic
219
208
 
@@ -239,9 +228,9 @@ ONLY WHEN all 7 artifact files are written and verified will you proceed to load
239
228
 
240
229
  ### ✅ SUCCESS:
241
230
 
242
- - Directory structure created (skills/{name}/, forge-data/{name}/)
243
- - All 4 deliverable files written to skills/{name}/
244
- - All 3 workspace artifact files written to forge-data/{name}/
231
+ - Directory structure created ({skills_output_folder}/{name}/, {forge_data_folder}/{name}/)
232
+ - All 4 deliverable files written to {skills_output_folder}/{name}/
233
+ - All 3 workspace artifact files written to {forge_data_folder}/{name}/
245
234
  - Write completion verified — all 7 files exist
246
235
  - Deep tier: QMD collection `{name}-extraction` created/updated and registered in forge-tier.yaml
247
236
  - Non-Deep tier: QMD indexing skipped silently
@@ -73,17 +73,17 @@ Where `{primary_confidence}` is the predominant confidence tier (T1 if Forge/Dee
73
73
  |------|-------|-------------|
74
74
  | T1 (AST) | {t1_count} | Structurally verified via ast-grep |
75
75
  | T1-low (Source) | {t1_low_count} | Inferred from source reading |
76
- | T2 (QMD) | {t2_count} | Enriched with temporal context |
76
+ | T2 (QMD) | {t2_count} | QMD-enriched semantic context |
77
77
  | T3 (External) | {t3_count} | Sourced from external documentation URLs |
78
78
 
79
79
  **Output Files:**
80
- - `skills/{name}/SKILL.md` — Active skill with trigger-based usage
81
- - `skills/{name}/context-snippet.md` — Passive context for CLAUDE.md
82
- - `skills/{name}/metadata.json` — Machine-readable birth certificate
83
- - `skills/{name}/references/` — Progressive disclosure ({ref_count} files)
84
- - `forge-data/{name}/provenance-map.json` — Source map with AST bindings
85
- - `forge-data/{name}/evidence-report.md` — Build audit trail
86
- - `forge-data/{name}/extraction-rules.yaml` — Reproducible extraction schema"
80
+ - `{skills_output_folder}/{name}/SKILL.md` — Active skill with trigger-based usage
81
+ - `{skills_output_folder}/{name}/context-snippet.md` — Passive context for CLAUDE.md
82
+ - `{skills_output_folder}/{name}/metadata.json` — Machine-readable birth certificate
83
+ - `{skills_output_folder}/{name}/references/` — Progressive disclosure ({ref_count} files)
84
+ - `{forge_data_folder}/{name}/provenance-map.json` — Source map with AST bindings
85
+ - `{forge_data_folder}/{name}/evidence-report.md` — Build audit trail
86
+ - `{forge_data_folder}/{name}/extraction-rules.yaml` — Reproducible extraction schema"
87
87
 
88
88
  ### 3. Display Warnings (If Any)
89
89
 
@@ -100,7 +100,7 @@ If no warnings, omit this section entirely.
100
100
 
101
101
  "**Recommended next steps:**
102
102
  - **[TS] Test Skill** — verify completeness and accuracy before export
103
- - **[ES] Export Skill** — publish to your skill library or agentskills.io
103
+ - **[EX] Export Skill** — publish to your skill library or agentskills.io
104
104
  - **[US] Update Skill** — edit specific sections or add manual content
105
105
 
106
106
  To use this skill immediately, add the context snippet to your CLAUDE.md:
@@ -116,9 +116,23 @@ To use this skill immediately, add the context snippet to your CLAUDE.md:
116
116
 
117
117
  {If more remaining:} Proceeding to next brief: {next_skill_name}..."
118
118
 
119
- Update sidecar checkpoint with batch progress, then loop back to step-01 for the next brief.
119
+ Update the batch checkpoint in `{sidecar_path}/batch-state.yaml` with:
120
120
 
121
- **If not batch mode or all batch briefs complete:**
121
+ ```yaml
122
+ batch_active: true
123
+ brief_list: [{full list of brief paths}]
124
+ current_index: {index of next brief to process, 0-based}
125
+ completed: [{list of completed skill names}]
126
+ last_updated: {ISO timestamp}
127
+ ```
128
+
129
+ Then loop back to step-01 for the next brief. Step-01 detects an active batch via `batch-state.yaml` and loads the brief at `current_index`.
130
+
131
+ **If all batch briefs complete:**
132
+
133
+ Set `batch_active: false` in `{sidecar_path}/batch-state.yaml` to prevent stale state. Display: "Batch complete. {completed_count} skills compiled."
134
+
135
+ **If not batch mode:**
122
136
 
123
137
  End workflow. No further steps.
124
138
 
@@ -9,13 +9,13 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/create-skill'
9
9
 
10
10
  **Goal:** Compile a verified agent skill from a skill-brief.yaml and source code, producing an agentskills.io-compliant SKILL.md with provenance map, evidence report, and progressive disclosure references.
11
11
 
12
- **Your Role:** You are a skill compilation engine performing structural extraction and assembly. This workflow is mostly autonomous with three interaction points — one after ecosystem check (if a match is found), one after source extraction (to confirm findings before compilation), and one after content quality review (when tessl produces suggestions). All other steps auto-proceed. Apply zero hallucination tolerance: every instruction in the output must trace to source code with a confidence tier citation.
12
+ **Your Role:** You are operating in **Ferris Architect mode** — a skill compilation engine performing structural extraction and assembly. This workflow is mostly autonomous with three interaction points — one after ecosystem check (if a match is found), one after source extraction (to confirm findings before compilation), and one after content quality review (when tessl produces suggestions). All other steps auto-proceed. Apply zero hallucination tolerance: every instruction in the output must trace to source code with a confidence tier citation.
13
13
 
14
14
  ## WORKFLOW ARCHITECTURE
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 too 1 file as directed at a time
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
  - **Tier-Aware Execution**: Steps adapt behavior based on forge tier (Quick/Forge/Forge+/Deep) loaded from sidecar at init
@@ -0,0 +1,65 @@
1
+ # Compose Mode Rules
2
+
3
+ Rules for synthesizing a stack skill from pre-generated individual skills and an architecture document, without requiring a codebase.
4
+
5
+ ## Skill Loading
6
+
7
+ 1. Scan `{skills_output_folder}` for subdirectories containing both `SKILL.md` and `metadata.json`
8
+ 2. **Filter:** Skip any subdirectory named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops
9
+ 3. Skip any subdirectory missing either `SKILL.md` or `metadata.json` — log a warning and skip
10
+ 4. Load each `metadata.json` and extract: `name`, `language`, `confidence_tier`, `source_repo`, `exports` (count), `version`
11
+ 5. Store the subdirectory name as `skill_dir` (distinct from `name` — the directory may differ from the metadata name)
12
+ 6. Store loaded skills as `raw_dependencies` with `source: "existing_skill"`
13
+
14
+ ## Architecture Integration Mapping
15
+
16
+ **If `{architecture_doc_path}` is null or the file does not exist:** Skip this section and proceed to [Inferred Integrations (No Architecture Document)](#inferred-integrations-no-architecture-document) below.
17
+
18
+ 1. Load the architecture document from `{architecture_doc_path}`
19
+ 2. Parse section headers and prose paragraphs for references to loaded skill names
20
+ 3. A **co-mention** is detected when a paragraph or section references 2+ loaded skill names
21
+ 4. For each co-mention pair, load both skills' export lists and API signatures from their `SKILL.md`
22
+ 5. Compose an integration section describing how the two libraries connect based on:
23
+ - Shared types or interfaces between the two skills' API surfaces
24
+ - Architecture document prose describing their interaction
25
+ - Complementary domain roles (e.g., one produces data the other consumes)
26
+
27
+ ## Confidence Tier Inheritance
28
+
29
+ - All compose-mode evidence inherits confidence tiers from the source individual skills
30
+ - If both skills in a pair are T1, the integration is T1
31
+ - If either skill is T1-low, the integration is T1-low
32
+ - If either skill is T2, the structural confidence still inherits the lower of T1/T1-low from the pair — the T2 temporal annotations from that skill are carried as an additive enrichment marker, not a tier upgrade
33
+ - T1 + T2 pair: inherits `T1 [composed, +T2 annotations]` — the T1 skill provides full structural confidence
34
+ - T1-low + T2 pair: inherits `T1-low [composed, +T2 annotations]` — T1-low structural confidence with T2 temporal annotations noted
35
+ - If both skills are T2 (no T1/T1-low base available): the integration confidence is `T1-low [composed, +T2 annotations from both]` — T2 temporal enrichment depends on structural extraction, so the most conservative structural tier is assumed
36
+ - Compose-mode integrations add suffix: `[composed]` — e.g., `T1 [composed]`, `T1-low [composed, +T2 annotations]`
37
+
38
+ ## Integration Evidence Format
39
+
40
+ Each integration entry must cite both source skills by name with function signatures:
41
+
42
+ ```
43
+ {Skill A name} + {Skill B name}
44
+ Type: [pattern type from integration-patterns.md]
45
+ Evidence:
46
+ [from skill: {Skill A name}] {exported_function_signature}
47
+ [from skill: {Skill B name}] {exported_function_signature}
48
+ Architecture reference: "{quoted prose from architecture doc}"
49
+ Confidence: {inherited_tier} [composed]
50
+ ```
51
+
52
+ ## Feasibility Report Integration
53
+
54
+ If a feasibility report (`feasibility-report-{project_name}.md`) exists in `{forge_data_folder}/`:
55
+ - Load the VS overall verdict from the report's YAML frontmatter `overall_verdict` field (`FEASIBLE`, `CONDITIONALLY FEASIBLE`, or `NOT FEASIBLE`) and parse per-pair verdicts from the `## Integration Verdicts` markdown table (`Verified`, `Plausible`, `Risky`, or `Blocked`)
56
+ - Include the verdict in the integration evidence: `VS overall: {FEASIBLE|CONDITIONALLY FEASIBLE|NOT FEASIBLE}`, `VS pair: {Verified|Plausible|Risky|Blocked}`
57
+ - Flag any pairs where VS reported `Risky` or `Blocked` verdicts
58
+
59
+ ## Inferred Integrations (No Architecture Document)
60
+
61
+ When no architecture document is available:
62
+ - Infer potential integrations from skills sharing the same `language` field
63
+ - Infer from skills sharing domain keywords in their `SKILL.md` descriptions
64
+ - Mark all inferred integrations: `[inferred from shared domain]`
65
+ - Inferred integrations default to lowest confidence of the pair with `[inferred from shared domain]` suffix (use this instead of `[composed]` for inferred integrations)
@@ -20,6 +20,28 @@
20
20
  3. Normalize names across ecosystems (e.g., `@scope/package` → `package`)
21
21
  4. Deduplicate across multiple manifests
22
22
 
23
+ ## Scan Exclusion Patterns
24
+
25
+ When scanning for manifest files, ALWAYS exclude these directories from glob results:
26
+
27
+ **Dependency/Vendor Directories:**
28
+ - `node_modules/`
29
+ - `.venv/` / `venv/` / `.env/`
30
+ - `vendor/` (PHP Composer, Go modules)
31
+ - `Pods/` (iOS CocoaPods)
32
+
33
+ **Build Output Directories:**
34
+ - `dist/` / `build/` / `out/`
35
+ - `target/` (Rust, Java/Maven)
36
+ - `__pycache__/`
37
+ - `.next/` / `.nuxt/` / `.output/`
38
+
39
+ **Hidden and VCS Directories:**
40
+ - `.git/`
41
+ - Any directory starting with `.` (except project root hidden config files like `.csproj`)
42
+
43
+ **Monorepo Note:** For monorepo structures (e.g., `packages/*/package.json`), the depth 0-1 scan rule already limits scope. If monorepo manifest detection is needed at deeper levels, these exclusions become critical to prevent scanning dependency trees within each package.
44
+
23
45
  ## Filtering Rules
24
46
 
25
47
  - Exclude dev-only dependencies unless they appear in production imports
@@ -32,4 +54,4 @@
32
54
  For each dependency, count distinct files that import it:
33
55
  - Use grep patterns from Import Pattern column
34
56
  - Count unique file paths, not total import statements
35
- - Exclude test files, config files, and build artifacts from count
57
+ - Exclude test files (`*/test/*`, `*_test.*`, `*.spec.*`, `*.test.*`), config files (`*.config.*`, `.eslintrc`, etc.), and build artifacts (`dist/`, `build/`, `node_modules/`, `target/`, `__pycache__/`) from count
@@ -70,17 +70,39 @@ Indexed format targeting ~80-120 tokens per stack:
70
70
  "version": "1.0.0",
71
71
  "generation_date": "{ISO-8601}",
72
72
  "confidence_tier": "{Quick|Forge|Forge+|Deep}",
73
+ "spec_version": "1.3",
73
74
  "source_authority": "{official|community|internal}",
75
+ "generated_by": "create-stack-skill",
74
76
  "exports": [],
75
77
  "library_count": 0,
76
78
  "integration_count": 0,
77
79
  "libraries": ["lib1", "lib2"],
78
80
  "integration_pairs": [["lib1", "lib2"]],
81
+ "language": "{primary language or list of languages from constituent skills}",
82
+ "ast_node_count": "{number-or-omitted-if-no-ast}",
79
83
  "confidence_distribution": {
80
- "T1": 0,
81
- "T1-low": 0,
82
- "T2": 0
83
- }
84
+ "t1": 0,
85
+ "t1_low": 0,
86
+ "t2": 0,
87
+ "t3": 0
88
+ },
89
+ "tool_versions": {
90
+ "ast_grep": "{version-or-null}",
91
+ "qmd": "{version-or-null}",
92
+ "skf": "{skf_version}"
93
+ },
94
+ "stats": {
95
+ "exports_documented": 0,
96
+ "exports_public_api": 0,
97
+ "exports_internal": 0,
98
+ "exports_total": 0,
99
+ "public_api_coverage": 0.0,
100
+ "total_coverage": 0.0,
101
+ "scripts_count": 0,
102
+ "assets_count": 0
103
+ },
104
+ "dependencies": [],
105
+ "compatibility": "{semver-range}"
84
106
  }
85
107
  ```
86
108
 
@@ -90,7 +112,7 @@ Indexed format targeting ~80-120 tokens per stack:
90
112
  # {library_name} Reference
91
113
 
92
114
  **Version:** {version_from_manifest}
93
- **Import count:** {count} files
115
+ **Import count:** {count} files *(compose-mode: replace with **Export count:** {count} exports)*
94
116
  **Confidence:** {T1/T1-low/T2}
95
117
 
96
118
  ## Key Exports
@@ -110,7 +132,7 @@ Indexed format targeting ~80-120 tokens per stack:
110
132
 
111
133
  **Type:** {pattern_type}
112
134
  **Co-import files:** {count}
113
- **Confidence:** {T1/T1-low}
135
+ **Confidence:** {T1/T1-low/T2 [composed]}
114
136
 
115
137
  ## Integration Pattern
116
138
  [Detailed description of how these libraries connect]
@@ -81,8 +81,11 @@ Extract:
81
81
  **Tier-dependent tools:**
82
82
  - **Quick:** gh_bridge (source reading) — graceful degradation to local file reading if unavailable
83
83
  - **Forge:** ast_bridge (ast-grep structural analysis) — required for Forge tier
84
+ - **Forge+:** ast_bridge + ccc_bridge (ccc semantic co-import augmentation) — ccc available for step-05
84
85
  - **Deep:** qmd_bridge (QMD temporal enrichment) — required for Deep tier
85
86
 
87
+ See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md) for how each bridge name resolves to concrete tools per IDE environment.
88
+
86
89
  Report tool availability. If a tier-required tool is missing, downgrade tier and note:
87
90
 
88
91
  "**Tier adjusted:** {original_tier} → {adjusted_tier} — {missing_tool} unavailable."
@@ -99,6 +102,18 @@ Check if the user provided:
99
102
  - If provided, store as `scope_overrides` for use in step 03
100
103
  - Format: `library_name: include|exclude`
101
104
 
105
+ **Compose mode detection:**
106
+
107
+ Set `compose_mode: false` as the default.
108
+
109
+ - If user provides an architecture document path for composition or explicitly requests compose mode → set `compose_mode: true` and store `architecture_doc_path`
110
+ - If no manifest files exist in project root AND at least one subdirectory in `{skills_output_folder}` contains both `SKILL.md` and `metadata.json` → suggest compose mode to the user and ask for optional architecture document path
111
+ - If user accepts → set `compose_mode: true` and store `architecture_doc_path` (may be `null` if user chose not to provide one)
112
+ - If user declines → `compose_mode` remains `false`, continue with code-mode
113
+
114
+ If compose_mode:
115
+ - Display: "**Compose mode detected.** Synthesizing stack skill from existing skills + architecture document."
116
+
102
117
  If no optional inputs provided, auto-detection will be used.
103
118
 
104
119
  ### 4. Display Initialization Summary
@@ -106,16 +121,19 @@ If no optional inputs provided, auto-detection will be used.
106
121
  "**Stack Skill Forge initialized.**
107
122
 
108
123
  **Project:** {project_name}
109
- **Forge Tier:** {tier_description}
110
- - Quick: Source reading and import counting
111
- - Forge: + AST-backed structural analysis
112
- - Forge+: + CCC semantic co-import augmentation
113
- - Deep: + Temporal integration evolution
124
+ **Forge Tier:** {forge_tier} — {tier_description}
125
+
126
+ Where tier_description follows positive capability framing:
127
+ - Quick: "Source reading and import counting"
128
+ - Forge: "AST-backed structural analysis"
129
+ - Forge+: "AST structural + CCC semantic co-import augmentation"
130
+ - Deep: "Full intelligence — structural + contextual + temporal"
114
131
 
115
132
  **Available Tools:** {tool_list}
116
- **Input Mode:** {auto-detect | explicit dependency list}
133
+ **Input Mode:** {auto-detect | explicit dependency list | compose mode}
117
134
 
118
- **Proceeding to manifest detection...**"
135
+ **If compose mode:** Proceeding to skill loading...
136
+ **If code mode:** Proceeding to manifest detection..."
119
137
 
120
138
  ### 5. Auto-Proceed to Next Step
121
139
 
@@ -38,7 +38,7 @@ Scan the project root for dependency manifest files, parse each to extract depen
38
38
  - 🎯 Load manifest-patterns.md for detection rules
39
39
  - 💾 Store manifests found and raw dependency list as workflow state
40
40
  - 📖 Auto-proceed to step 03 after successful detection
41
- - 🚫 HALT if no manifests found and no explicit list provided
41
+ - 🚫 HALT if no manifests found and no explicit list provided — **unless `compose_mode` is true** (compose mode skips manifest detection)
42
42
 
43
43
  ## CONTEXT BOUNDARIES:
44
44
 
@@ -50,6 +50,39 @@ Scan the project root for dependency manifest files, parse each to extract depen
50
50
 
51
51
  **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
52
 
53
+ ### 0. Check Compose Mode
54
+
55
+ **If `compose_mode` is true AND `explicit_deps` was provided in step 01:**
56
+
57
+ Use the explicit dependency list directly. Store the explicit list as `raw_dependencies` with `source: "explicit"` and skip to [Auto-Proceed to Next Step](#5-auto-proceed-to-next-step).
58
+
59
+ **If `compose_mode` is true AND `explicit_deps` was NOT provided:**
60
+
61
+ Scan `{skills_output_folder}` for subdirectories containing SKILL.md and metadata.json.
62
+
63
+ **Filter:** Skip any subdirectory named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops.
64
+
65
+ **If zero skills remain after filtering:** HALT with: "**Cannot proceed in compose-mode.** No individual skills found in `{skills_output_folder}` (after filtering stack skills). Run [CS] Create Skill or [QS] Quick Skill to generate individual skills first, then re-run [SS]."
66
+
67
+ For each skill found:
68
+ 1. Read metadata.json
69
+ 2. Extract: name, language, confidence_tier, source_repo, exports count, version
70
+ 3. Store the subdirectory name as `skill_dir` (distinct from `name` — the directory may differ from the metadata name)
71
+ 4. Store as `raw_dependencies` with source: "existing_skill"
72
+
73
+ Display:
74
+ "**Loaded {N} existing skills as dependencies.**
75
+
76
+ | Skill | Language | Tier | Exports | Source |
77
+ |-------|----------|------|---------|--------|
78
+ | {name} | {lang} | {tier} | {count} | {repo} |
79
+
80
+ **Proceeding to scope confirmation...**"
81
+
82
+ Skip to [Auto-Proceed to Next Step](#5-auto-proceed-to-next-step) — the skills table above serves as the detection summary.
83
+
84
+ **If not compose_mode:** Continue with section 1 (existing flow).
85
+
53
86
  ### 1. Check for Explicit Dependency List
54
87
 
55
88
  **If `explicit_deps` was provided in step 01:**
@@ -58,7 +91,7 @@ Scan the project root for dependency manifest files, parse each to extract depen
58
91
 
59
92
  **Dependencies:** {explicit_deps_count} libraries provided"
60
93
 
61
- Store the explicit list as `raw_dependencies` and skip to section 4.
94
+ Store the explicit list as `raw_dependencies` and skip to [Display Detection Summary](#4-display-detection-summary).
62
95
 
63
96
  **If no explicit list:** Continue to section 2.
64
97
 
@@ -66,10 +99,11 @@ Store the explicit list as `raw_dependencies` and skip to section 4.
66
99
 
67
100
  Load `{manifestPatterns}` for supported ecosystem detection patterns.
68
101
 
69
- Scan the project root (depth 0-1) for manifest files:
102
+ Scan the project root (depth 0-1) for manifest files, **excluding directories listed in the Scan Exclusion Patterns section of `{manifestPatterns}`**:
70
103
 
71
104
  - Search for each supported manifest filename
72
105
  - Record: file path, ecosystem type, file size
106
+ - **Apply exclusion patterns** from `{manifestPatterns}` — skip `node_modules/`, `.venv/`, `vendor/`, `dist/`, `build/`, `target/`, `.git/`, and all hidden directories when globbing
73
107
  - Note any unusual structures (monorepo with multiple manifests, workspace configurations)
74
108
 
75
109
  **If no manifest files found:**
@@ -30,7 +30,7 @@ Count import frequency for each dependency across the codebase, rank by usage, a
30
30
  - 🎯 Focus on counting imports, ranking, and getting user confirmation
31
31
  - 🚫 FORBIDDEN to extract library documentation — that is step 04
32
32
  - 💬 Present data clearly so user can make informed scope decisions
33
- - 🎯 Use subprocess (Pattern 1 grep) for import counting when available
33
+ - 🎯 Use subprocess (Pattern 1 grep/search): In Claude Code, use the Grep tool or Bash with `rg`. In Cursor, use built-in search. In CLI, use `grep`/`rg` directly. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
34
34
 
35
35
  ## EXECUTION PROTOCOLS:
36
36
 
@@ -52,10 +52,36 @@ Count import frequency for each dependency across the codebase, rank by usage, a
52
52
 
53
53
  ### 1. Count Import Frequency
54
54
 
55
+ **If `compose_mode` is true:**
56
+
57
+ Skip import counting entirely. All skills are included by default.
58
+
59
+ Set `confirmed_dependencies` = all `raw_dependencies` (the list already stored as workflow state from Step 02).
60
+
61
+ **Apply scope_overrides:** If `scope_overrides` were provided in step 01, apply them now — force-include or force-exclude skills as specified. Log any overrides applied.
62
+
63
+ Present skills sorted by architectural layer (from architecture doc if available):
64
+ - If `architecture_doc_path` is not null: parse architecture doc for section headers to determine layer grouping
65
+ - If `architecture_doc_path` is null or layers not detectable: present alphabetically
66
+
67
+ Display skills as a table:
68
+
69
+ | # | Skill | Language | Tier | Architecture Layer |
70
+ |---|-------|----------|------|--------------------|
71
+ | 1 | {name} | {language} | {confidence_tier} | {layer or 'Unclassified'} |
72
+
73
+ User confirms inclusion/exclusion at the gate (same [C] menu as code-mode).
74
+
75
+ Skip to [Present MENU OPTIONS](#5-present-menu-options).
76
+
77
+ **If not compose_mode:**
78
+
55
79
  For each dependency in `raw_dependencies`:
56
80
 
57
81
  **Launch a subprocess** that runs grep across all source files in the project to count import statements for each library. Return only the counts, not file contents.
58
82
 
83
+ **Subprocess resolution:** Use the Grep tool (Claude Code), built-in search (Cursor), or `grep`/`rg` (CLI). See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
84
+
59
85
  Use ecosystem-appropriate import patterns:
60
86
  - JavaScript/TypeScript: `import .* from ['"]library`, `require\(['"]library`
61
87
  - Python: `import library`, `from library import`
@@ -136,8 +162,8 @@ Display: **Select:** [C] Continue to Extraction
136
162
 
137
163
  #### Menu Handling Logic:
138
164
 
139
- - IF C: Store confirmed_dependencies, then load, read entire file, then execute {nextStepFile}
140
- - IF Any other: Process as scope modification, redisplay updated list, then [Redisplay Menu Options](#5-present-menu-options)
165
+ - IF C: Store current `confirmed_dependencies` (including any modifications made since initial presentation), then load, read entire file, then execute {nextStepFile}
166
+ - IF Any other: Process as scope modification (add/remove skills from `confirmed_dependencies`), update the in-memory `confirmed_dependencies` list accordingly, redisplay the updated skills table, then [Redisplay Menu Options](#5-present-menu-options)
141
167
 
142
168
  ---
143
169