bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/.claude-plugin/marketplace.json +39 -0
  2. package/.gitattributes +16 -0
  3. package/README.md +105 -38
  4. package/docs/404.md +13 -10
  5. package/docs/RELEASING.md +185 -0
  6. package/docs/STABILITY.md +123 -0
  7. package/docs/_data/pinned.yaml +98 -0
  8. package/docs/agents.md +16 -11
  9. package/docs/architecture.md +221 -0
  10. package/docs/bmad-synergy.md +11 -13
  11. package/docs/concepts.md +18 -108
  12. package/docs/examples.md +121 -80
  13. package/docs/getting-started.md +85 -147
  14. package/docs/how-it-works.md +25 -536
  15. package/docs/index.md +44 -27
  16. package/docs/skill-model.md +328 -0
  17. package/docs/troubleshooting.md +39 -0
  18. package/docs/verifying-a-skill.md +232 -0
  19. package/docs/why-skf.md +93 -0
  20. package/docs/workflows.md +119 -13
  21. package/package.json +25 -4
  22. package/src/README.md +23 -25
  23. package/src/forger/forge-tier.yaml +4 -2
  24. package/src/forger/preferences.yaml +7 -1
  25. package/src/knowledge/agentskills-spec.md +1 -1
  26. package/src/knowledge/architecture-verification.md +1 -1
  27. package/src/knowledge/ccc-bridge.md +16 -15
  28. package/src/knowledge/overview.md +11 -11
  29. package/src/knowledge/progressive-capability.md +3 -3
  30. package/src/knowledge/provenance-tracking.md +9 -3
  31. package/src/knowledge/qmd-registry.md +8 -8
  32. package/src/knowledge/skf-knowledge-index.csv +2 -2
  33. package/src/knowledge/skill-lifecycle.md +16 -1
  34. package/src/knowledge/split-body-strategy.md +1 -1
  35. package/src/knowledge/version-paths.md +17 -12
  36. package/src/module-help.csv +18 -17
  37. package/src/module.yaml +4 -0
  38. package/src/shared/health-check.md +372 -0
  39. package/src/shared/references/feasibility-report-schema.md +86 -0
  40. package/src/shared/references/headless-gate-convention.md +62 -0
  41. package/src/shared/references/output-contract-schema.md +35 -0
  42. package/src/shared/references/pipeline-contracts.md +102 -0
  43. package/src/shared/scripts/skf-atomic-write.py +370 -0
  44. package/src/shared/scripts/skf-manifest-ops.py +236 -0
  45. package/src/shared/scripts/skf-preflight.py +164 -0
  46. package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
  47. package/src/shared/scripts/skf-severity-classify.py +163 -0
  48. package/src/shared/scripts/skf-skill-inventory.py +210 -0
  49. package/src/shared/scripts/skf-structural-diff.py +257 -0
  50. package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
  51. package/src/shared/scripts/skf-validate-output.py +247 -0
  52. package/src/skf-analyze-source/SKILL.md +57 -0
  53. package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
  54. package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
  55. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
  56. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
  57. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
  58. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
  59. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
  60. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
  61. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
  62. package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
  63. package/src/skf-audit-skill/SKILL.md +59 -0
  64. package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
  65. package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
  66. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
  67. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
  68. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
  69. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
  70. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
  71. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
  72. package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
  73. package/src/skf-brief-skill/SKILL.md +53 -0
  74. package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
  75. package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
  76. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
  77. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
  78. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
  79. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
  80. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
  81. package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
  82. package/src/skf-create-skill/SKILL.md +63 -0
  83. package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
  84. package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
  85. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
  86. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
  87. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
  88. package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
  89. package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
  90. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
  91. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
  92. package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
  93. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
  94. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
  95. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
  96. package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
  97. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
  98. package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
  99. package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
  100. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
  101. package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
  102. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
  103. package/src/skf-create-stack-skill/SKILL.md +64 -0
  104. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
  105. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
  106. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
  107. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
  108. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
  109. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
  110. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
  111. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
  112. package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
  113. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
  114. package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
  115. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
  116. package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
  117. package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
  118. package/src/skf-drop-skill/SKILL.md +57 -0
  119. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
  120. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
  121. package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
  122. package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
  123. package/src/skf-export-skill/SKILL.md +57 -0
  124. package/src/skf-export-skill/assets/managed-section-format.md +138 -0
  125. package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
  126. package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
  127. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
  128. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
  129. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
  130. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
  131. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
  132. package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
  133. package/src/skf-forger/SKILL.md +110 -0
  134. package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
  135. package/src/skf-quick-skill/SKILL.md +56 -0
  136. package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
  137. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
  138. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
  139. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
  140. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
  141. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
  142. package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
  143. package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
  144. package/src/skf-refine-architecture/SKILL.md +57 -0
  145. package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
  146. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
  147. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
  148. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
  149. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
  150. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
  151. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
  152. package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
  153. package/src/skf-rename-skill/SKILL.md +58 -0
  154. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
  155. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
  156. package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
  157. package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
  158. package/src/skf-setup/SKILL.md +55 -0
  159. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
  160. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
  161. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
  162. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
  163. package/src/skf-setup/steps-c/step-04-report.md +92 -0
  164. package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
  165. package/src/skf-test-skill/SKILL.md +59 -0
  166. package/src/skf-test-skill/references/migration-section-rules.md +114 -0
  167. package/src/skf-test-skill/references/scoring-rules.md +207 -0
  168. package/src/skf-test-skill/references/source-access-protocol.md +109 -0
  169. package/src/skf-test-skill/scripts/compute-score.py +310 -0
  170. package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
  171. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
  172. package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
  173. package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
  174. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
  175. package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
  176. package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
  177. package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
  178. package/src/skf-test-skill/templates/test-report-template.md +58 -0
  179. package/src/skf-update-skill/SKILL.md +58 -0
  180. package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
  181. package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
  182. package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
  183. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
  184. package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
  185. package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
  186. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
  187. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
  188. package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
  189. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
  190. package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
  191. package/src/skf-verify-stack/SKILL.md +60 -0
  192. package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
  193. package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
  194. package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
  195. package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
  196. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
  197. package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
  198. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
  199. package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
  200. package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
  201. package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
  202. package/tools/cli/commands/install.js +1 -1
  203. package/tools/cli/commands/status.js +21 -23
  204. package/tools/cli/commands/uninstall.js +11 -19
  205. package/tools/cli/commands/update.js +2 -2
  206. package/tools/cli/lib/ide-skills.js +216 -0
  207. package/tools/cli/lib/installer.js +29 -52
  208. package/tools/cli/lib/manifest.js +11 -5
  209. package/tools/cli/lib/platform-codes.yaml +223 -0
  210. package/tools/cli/lib/ui.js +76 -47
  211. package/tools/validate-docs-drift.js +193 -0
  212. package/src/agents/forger.agent.yaml +0 -114
  213. package/src/workflows/README.md +0 -174
  214. package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
  215. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
  216. package/src/workflows/analyze-source/workflow.md +0 -61
  217. package/src/workflows/audit-skill/workflow.md +0 -64
  218. package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
  219. package/src/workflows/brief-skill/workflow.md +0 -58
  220. package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
  221. package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
  222. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
  223. package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
  224. package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
  225. package/src/workflows/create-skill/workflow.md +0 -53
  226. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
  227. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
  228. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
  229. package/src/workflows/create-stack-skill/workflow.md +0 -59
  230. package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
  231. package/src/workflows/drop-skill/workflow.md +0 -63
  232. package/src/workflows/export-skill/data/managed-section-format.md +0 -103
  233. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
  234. package/src/workflows/export-skill/workflow.md +0 -58
  235. package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
  236. package/src/workflows/quick-skill/workflow.md +0 -58
  237. package/src/workflows/refine-architecture/workflow.md +0 -61
  238. package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
  239. package/src/workflows/rename-skill/workflow.md +0 -64
  240. package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
  241. package/src/workflows/setup-forge/workflow.md +0 -51
  242. package/src/workflows/test-skill/data/scoring-rules.md +0 -123
  243. package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
  244. package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
  245. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
  246. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
  247. package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
  248. package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
  249. package/src/workflows/test-skill/templates/test-report-template.md +0 -28
  250. package/src/workflows/test-skill/workflow.md +0 -57
  251. package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
  252. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
  253. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
  254. package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
  255. package/src/workflows/update-skill/workflow.md +0 -56
  256. package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
  257. package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
  258. package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
  259. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
  260. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
  261. package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
  262. package/src/workflows/verify-stack/workflow.md +0 -61
  263. package/tools/cli/lib/compiler.js +0 -306
  264. package/tools/cli/lib/ide-commands.js +0 -244
  265. /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
  266. /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
  267. /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
  268. /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
@@ -1,265 +0,0 @@
1
- ---
2
- name: 'step-06-write'
3
- description: 'Write updated SKILL.md, provenance-map.json, evidence-report.md, and stack reference files'
4
-
5
- nextStepFile: './step-07-report.md'
6
- ---
7
-
8
- # Step 6: Write Updated Files
9
-
10
- ## STEP GOAL:
11
-
12
- Write all updated skill artifacts to disk: the merged SKILL.md, updated provenance-map.json with new timestamps and mappings, updated evidence-report.md with the update operation trail, and for stack skills, all affected reference files.
13
-
14
- ## MANDATORY EXECUTION RULES (READ FIRST):
15
-
16
- ### Universal Rules:
17
-
18
- - 🛑 NEVER generate content without user input
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
21
- - 📋 YOU ARE A FACILITATOR, not a content generator
22
- - ⚙️ 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
23
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
24
-
25
- ### Role Reinforcement:
26
-
27
- - ✅ You are a precision code analyst operating in Surgeon mode
28
- - ✅ File writes must be atomic — complete all writes or none
29
- - ✅ Every write must be verified after completion
30
- - ✅ Provenance metadata must accurately reflect the update operation
31
-
32
- ### Step-Specific Rules:
33
-
34
- - 🎯 Focus ONLY on writing files — all merge and validation is complete
35
- - 🚫 FORBIDDEN to modify merged content during write — write exactly what was produced
36
- - 🚫 FORBIDDEN to skip provenance map update — this is critical for future audits
37
- - 💬 Verify each file after writing to confirm integrity
38
-
39
- ## EXECUTION PROTOCOLS:
40
-
41
- - 🎯 Follow MANDATORY SEQUENCE exactly
42
- - 💾 Write all files in the correct locations
43
- - 📖 Update provenance map with current timestamps
44
- - 🚫 FORBIDDEN to proceed if any write fails
45
-
46
- ## CONTEXT BOUNDARIES:
47
-
48
- - Available: merged content from step 04, validation results from step 05, extraction results from step 03, change manifest from step 02
49
- - Focus: file I/O operations — write and verify
50
- - Limits: write only to skill output and forge data directories
51
- - Dependencies: steps 02-05 must all be complete
52
- - Path resolution: See `knowledge/version-paths.md` for canonical path templates (`{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}`)
53
-
54
- ## MANDATORY SEQUENCE
55
-
56
- **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
57
-
58
- ### 1. Write Updated SKILL.md
59
-
60
- Write the merged SKILL.md content to `{skill_package}/SKILL.md`:
61
- - Overwrite the existing file with merged content
62
- - Preserve file encoding (UTF-8)
63
- - Verify write by reading back and confirming [MANUAL] section count matches expected
64
-
65
- If the version changed (source version differs from the previous metadata version), write to the new `{skill_package}` (creating the version directory if needed). The previous version's directory is preserved on disk.
66
-
67
- ### 2. Write Updated metadata.json
68
-
69
- Update `{skill_package}/metadata.json`:
70
- - Update `version`: if a source version was detected during re-extraction and differs from the current metadata version, use the source version; otherwise increment patch version
71
- - Update `generation_date` timestamp to current ISO-8601 date
72
- - Update `exports` array to reflect current export list
73
- - Update `stats` from re-extraction results:
74
- - `exports_documented`: count of exports with documentation in the merged skill
75
- - `exports_public_api`: count of exports from public entry points (`__init__.py`, `index.ts`, `lib.rs`, or equivalent)
76
- - `exports_internal`: count of all other non-underscore-prefixed exports
77
- - `exports_total`: `exports_public_api` + `exports_internal`
78
- - `public_api_coverage`: `exports_documented / exports_public_api` (`null` if `exports_public_api` is 0)
79
- - `total_coverage`: `exports_documented / exports_total` (`null` if `exports_total` is 0)
80
- - Update `confidence_distribution` from re-extraction results:
81
- - `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3`: update counts from re-extraction results
82
- - `scripts_count`, `assets_count`: update from re-extraction results if scripts/assets changed
83
- - For stack skills: update `library_count`, `integration_count` if changed
84
-
85
- ### 3. Write Updated provenance-map.json
86
-
87
- Write to `{forge_version}/provenance-map.json`:
88
-
89
- **For each export in the updated skill:**
90
- - Update `export_name` if renamed
91
- - Update `params[]` array if parameters changed (add, remove, or modify individual entries)
92
- - Update `return_type` if changed
93
- - Update `source_file` if moved
94
- - Update `source_line` from fresh extraction
95
- - Update `confidence` from extraction results
96
- - Update `extraction_method` and `ast_node_type` if re-extracted with different tools
97
-
98
- **For deleted exports:**
99
- - Remove entry from provenance map
100
-
101
- **For new exports:**
102
- - Add new entry with full structured fields: `export_name`, `export_type`, `params[]`, `return_type`, `source_file`, `source_line`, `confidence`, `extraction_method`, `ast_node_type`
103
-
104
- **For script/asset file changes (if `file_entries` exists):**
105
- - MODIFIED_FILE: copy updated file to `scripts/` or `assets/`, update `content_hash` in `file_entries`
106
- - DELETED_FILE: remove file from `scripts/` or `assets/`, remove entry from `file_entries`
107
- - NEW_FILE: copy file to `scripts/` or `assets/`, add entry to `file_entries` with `file_name`, `file_type`, `source_file`, `confidence: "T1-low"`, `extraction_method: "file-copy"`, `content_hash`
108
-
109
- **Add update operation metadata:**
110
- ```json
111
- {
112
- "last_update": "{current_date}",
113
- "update_type": "{incremental if normal mode | full if degraded_mode}",
114
- "files_changed": {count},
115
- "exports_affected": {count},
116
- "confidence_tier": "{tier}",
117
- "manual_sections_preserved": {count}
118
- }
119
- ```
120
-
121
- ### 4. Write Updated evidence-report.md
122
-
123
- Append update operation section to `{forge_version}/evidence-report.md` (create the file with a standard header if it does not yet exist):
124
-
125
- ```markdown
126
- ## Update Operation — {current_date}
127
-
128
- **Trigger:** {manual / audit-skill chain}
129
- **Forge Tier:** {tier}
130
- **Mode:** {normal / degraded}
131
-
132
- ### Changes Detected
133
- - Files modified: {count}
134
- - Files added: {count}
135
- - Files deleted: {count}
136
- - Exports affected: {total}
137
-
138
- ### Merge Results
139
- - Exports updated: {count}
140
- - Exports added: {count}
141
- - Exports removed: {count}
142
- - [MANUAL] sections preserved: {count}
143
- - Conflicts resolved: {count}
144
-
145
- ### Validation Summary
146
- - Spec compliance: {PASS/WARN/FAIL}
147
- - [MANUAL] integrity: {PASS/WARN/FAIL}
148
- - Confidence tiers: {PASS/WARN/FAIL}
149
- - Provenance: {PASS/WARN/FAIL}
150
- ```
151
-
152
- ### 5. Write Stack Skill Reference Files (Conditional) and Regenerate context-snippet.md
153
-
154
- **ONLY if skill_type == "stack":**
155
-
156
- For each affected reference file from the merge:
157
- - Write updated `references/{library}.md` files
158
- - Write updated `references/integrations/{pair}.md` files
159
- - Verify [MANUAL] sections preserved in each reference file
160
-
161
- **For all skills (both single and stack) — regenerate `context-snippet.md`:**
162
-
163
- Per `knowledge/version-paths.md` "Writing Workflows (CS, QS, SS, US)", update-skill is a writing workflow that MUST write all deliverables to `{skill_package}`. `context-snippet.md` is one of those deliverables and goes stale whenever exports, version, or gotchas change.
164
-
165
- Regenerate the snippet using the format from the matching template file:
166
-
167
- - For single skills: `create-skill/data/skill-sections.md` (pipe-delimited indexed format)
168
- - For stack skills: `create-stack-skill/data/stack-skill-template.md`
169
-
170
- Use the **flat legacy form** for the `root:` path in the draft snippet: `root: skills/{skill-name}/`. The platform-specific prefix (`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`) is applied later by `export-skill` step-03 when the skill is exported. Do not choose a platform prefix in update-skill — that is an export-time decision that depends on config.yaml.
171
-
172
- Pull values for the regenerated snippet from the updated metadata.json (version, top exports), the merged SKILL.md (section anchors, inline summaries), and the evidence report (new gotchas). If gotchas cannot be derived from the updated evidence but the prior snippet has a `|gotchas:` line, carry forward the prior line with the `[CARRIED]` marker — see `export-skill/steps-c/step-03-generate-snippet.md` for the carry-forward protocol (one-cycle limit).
173
-
174
- Write the regenerated snippet to `{skill_package}/context-snippet.md`, preserving file permissions.
175
-
176
- **If skill_type == "stack"**, also verify that the reference file updates from the first half of this section have been applied before writing the snippet so the stack snippet reflects the newest integration list.
177
-
178
- ### 5b. Update Active Symlink (If Version Changed)
179
-
180
- If the version was incremented or changed in section 2 (metadata.json update):
181
- - Create or update the `active` symlink at `{skill_group}/active` pointing to the new `{version}`
182
- - If the symlink already exists, remove it first and recreate
183
-
184
- ```
185
- {skill_group}/active -> {version}
186
- ```
187
-
188
- If the version did not change, the existing symlink already points to the correct version -- no action needed.
189
-
190
- ### 6. Verify All Writes
191
-
192
- For each file written:
193
- - Read back the file
194
- - Confirm content matches expected output
195
- - Confirm [MANUAL] sections are intact (count comparison)
196
- - Report verification status
197
-
198
- "**Write Verification:**
199
-
200
- | File | Status |
201
- |------|--------|
202
- | SKILL.md | {VERIFIED/FAILED} |
203
- | metadata.json | {VERIFIED/FAILED} |
204
- | provenance-map.json | {VERIFIED/FAILED} |
205
- | evidence-report.md | {VERIFIED/FAILED} |
206
- | {stack reference files...} | {VERIFIED/FAILED} |
207
-
208
- **All files written and verified.**"
209
-
210
- ### 7. Run Post-Write Validation (Deferred from Step 05)
211
-
212
- External tool checks deferred from step-05 now run against the written files:
213
-
214
- **If skill-check available:**
215
- - Run: `npx skill-check check {skill_package} --fix --format json --no-security-scan`
216
- - **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.
217
- - 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 {skill_package} --write` if not feasible. Verify anchors resolve after split.
218
- - Run: `npx skill-check diff` if original version was preserved
219
- - Run: `npx skill-check check {skill_package} --format json` for security scan
220
-
221
- Record findings in the evidence report (section 4). These are advisory — do not block on warnings.
222
-
223
- **If skill-check unavailable:** Skip with note — structural checks from step-05 are sufficient.
224
-
225
- ### 8. Present MENU OPTIONS
226
-
227
- Display: "**Proceeding to report...**"
228
-
229
- #### Menu Handling Logic:
230
-
231
- - After all writes verified and post-write validation complete, immediately load, read entire file, then execute {nextStepFile}
232
-
233
- #### EXECUTION RULES:
234
-
235
- - This is an auto-proceed step with no user choices
236
- - Proceed directly to report after verification
237
-
238
- ## CRITICAL STEP COMPLETION NOTE
239
-
240
- ONLY WHEN all files have been written and verified will you load {nextStepFile} to display the change report.
241
-
242
- ---
243
-
244
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
245
-
246
- ### ✅ SUCCESS:
247
-
248
- - SKILL.md written to {skill_package} with all merged content and [MANUAL] sections intact
249
- - metadata.json updated with new version, timestamp, export counts
250
- - provenance-map.json updated at {forge_version} with current file:line references and timestamps
251
- - evidence-report.md appended at {forge_version} with update operation record
252
- - Stack reference files updated if applicable
253
- - Active symlink updated at {skill_group}/active -> {version} if version changed
254
- - All writes verified by read-back confirmation
255
-
256
- ### ❌ SYSTEM FAILURE:
257
-
258
- - Any [MANUAL] section content different after write (integrity violation)
259
- - Skipping provenance map update
260
- - Not verifying writes after completion
261
- - Writing partial content (incomplete merge result)
262
- - Not updating metadata version
263
- - Leaving stale provenance entries for deleted exports
264
-
265
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,56 +0,0 @@
1
- ---
2
- name: update-skill
3
- description: Smart regeneration preserving [MANUAL] sections. Detects individual vs stack internally.
4
- web_bundle: true
5
- installed_path: '{project-root}/_bmad/skf/workflows/skillforge/update-skill'
6
- ---
7
-
8
- # Update Skill
9
-
10
- **Goal:** Surgically update existing skills when source code changes, preserving all [MANUAL] developer content while re-extracting only affected exports with full provenance tracking.
11
-
12
- **Your Role:** In addition to your name, communication_style, and persona, you are also a precision code analyst operating in Surgeon mode. This is a surgical operation, not an exploratory session. You bring AST-backed structural analysis and provenance-driven change detection expertise, while the source code provides the ground truth. Every regenerated instruction must trace to code with file:line citations.
13
-
14
- ## WORKFLOW ARCHITECTURE
15
-
16
- ### Core Principles
17
-
18
- - **Micro-file Design**: Each step is a self-contained instruction file that must be followed exactly
19
- - **Just-In-Time Loading**: Only the current step file is in memory — never load future step files until told to do so
20
- - **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
21
- - **Surgical Precision**: Only changed exports are re-extracted — unchanged content is never touched
22
- - **[MANUAL] Preservation**: Developer-authored [MANUAL] sections survive regeneration with zero content loss
23
- - **Zero Hallucination**: Every instruction must trace to actual code with AST file:line citations and confidence tier labels
24
-
25
- ### Step Processing Rules
26
-
27
- 1. **READ COMPLETELY**: Always read the entire step file before taking any action
28
- 2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
29
- 3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
30
- 4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
31
- 5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
32
-
33
- ### Critical Rules (NO EXCEPTIONS)
34
-
35
- - 🛑 **NEVER** load multiple step files simultaneously
36
- - 📖 **ALWAYS** read entire step file before execution
37
- - 🚫 **NEVER** skip steps or optimize the sequence
38
- - 🎯 **ALWAYS** follow the exact instructions in the step file
39
- - ⏸️ **ALWAYS** halt at menus and wait for user input
40
- - 📋 **NEVER** create mental todo lists from future steps
41
- - 🔬 **NEVER** hallucinate — every statement must have AST provenance
42
-
43
- ---
44
-
45
- ## INITIALIZATION SEQUENCE
46
-
47
- ### 1. Module Configuration Loading
48
-
49
- Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
50
-
51
- - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
52
- - `skills_output_folder`, `forge_data_folder`, `sidecar_path`
53
-
54
- ### 2. First Step Execution
55
-
56
- Load, read the full file and then execute ./steps-c/step-01-init.md to begin the workflow.
@@ -1,63 +0,0 @@
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 -->
@@ -1,73 +0,0 @@
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
- ```
@@ -1,179 +0,0 @@
1
- ---
2
- name: 'step-01-init'
3
- description: 'Load generated skills from skills folder, accept architecture doc path and optional PRD path, validate all inputs exist'
4
-
5
- nextStepFile: './step-02-coverage.md'
6
- reportTemplate: '../data/feasibility-report-template.md'
7
- outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
8
- ---
9
-
10
- # Step 1: Initialize Verification
11
-
12
- ## STEP GOAL:
13
-
14
- Load all generated skills from the skills output folder, accept the architecture document path (required) and optional PRD/vision document path from the user, validate that all inputs exist and are readable, create the feasibility report document, and present an initialization summary before auto-proceeding.
15
-
16
- ## MANDATORY EXECUTION RULES (READ FIRST):
17
-
18
- ### Universal Rules:
19
-
20
- - 📖 CRITICAL: Read the complete step file before taking any action
21
- - ⚙️ 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
22
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
23
-
24
- ### Role Reinforcement:
25
-
26
- - ✅ You are a stack verification analyst operating in Ferris Audit mode
27
- - ✅ Execute with prescriptive precision — every loaded skill must be validated against actual files
28
- - ✅ You enforce the zero-hallucination principle: only report skills that physically exist on disk
29
-
30
- ### Step-Specific Rules:
31
-
32
- - 🎯 Focus ONLY on loading inputs, scanning skills, and creating the report skeleton
33
- - 🚫 FORBIDDEN to perform any coverage analysis or integration checking
34
- - 🚫 Auto-proceed init step — no user confirmation needed. Halts only on validation errors
35
- - 💬 Present a clear initialization summary so downstream steps have validated inputs
36
-
37
- ## EXECUTION PROTOCOLS:
38
-
39
- - 🎯 Collect and validate all input documents and skill artifacts
40
- - 💾 Create feasibility report from {reportTemplate} with populated frontmatter
41
- - 📖 Auto-proceed to next step after successful initialization
42
- - 🚫 HALT with actionable error if minimum requirements not met
43
-
44
- ## CONTEXT BOUNDARIES:
45
-
46
- - This is the first step — no prior workflow state exists
47
- - Requires skills to have been generated by create-skill or quick-skill workflows
48
- - User provides architecture document path (required) and optional PRD/vision document path
49
- - No dependency on setup-forge or forge-tier — this workflow operates on skill content only
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
- "**Verify Stack — Feasibility Analysis**
58
-
59
- Please provide the following:
60
- 1. **Architecture document path** (REQUIRED) — your project's architecture doc
61
- 2. **PRD or vision document path** (OPTIONAL) — for requirements coverage analysis
62
- 3. **Previous feasibility report path** (OPTIONAL) — for delta comparison with a prior run (provide a backup copy)"
63
-
64
- Wait for user input.
65
-
66
- **Validate architecture document:**
67
- - Confirm the file exists and is readable
68
- - If missing or unreadable → "Architecture document not found at `{path}`. Provide a valid path."
69
- - HALT until a valid architecture document is provided
70
-
71
- **Validate PRD document (if provided):**
72
- - Confirm the file exists and is readable
73
- - If missing → "PRD document not found at `{path}`. Proceeding without PRD — requirements pass will be skipped."
74
- - Store PRD availability as `prd_available: true|false`
75
-
76
- **Validate previous report (if provided):**
77
- - Confirm the file exists and is readable
78
- - **Collision check:** Resolve both the provided path and `{outputFile}` to their absolute form before comparing (do not rely on string equality alone). If they resolve to the same location, warn: "The previous report path points to the same location as the new report. This file will be overwritten during this run. Provide a path to a backup copy, or leave empty to skip delta comparison." HALT until resolved.
79
- - If missing → "Previous report not found at `{path}`. Proceeding without delta comparison."
80
- - Store as `previous_report: {path}` (or empty string if not provided)
81
-
82
- ### 2. Scan Skills Folder
83
-
84
- Read the `{skills_output_folder}` directory. Skills use a version-nested directory structure (see [knowledge/version-paths.md](../../../knowledge/version-paths.md)).
85
-
86
- **Version-aware skill discovery:**
87
- 1. Read `{skills_output_folder}/.export-manifest.json` if it exists. For each skill in `exports`, use `active_version` to resolve `{skill_package}` = `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/`
88
- 2. For any subdirectory not covered by the manifest, check for an `active` symlink at `{skills_output_folder}/{dir_name}/active` — resolve to `{skill_group}/active/{dir_name}/`
89
- 3. Fall back to flat path `{skills_output_folder}/{dir_name}/` for unmigrated skills
90
-
91
- For each resolved skill package, check for the presence of `SKILL.md` and `metadata.json`.
92
-
93
- **For each valid skill directory, extract from metadata.json:**
94
- - `name` — skill name
95
- - `language` — primary language
96
- - `confidence_tier` — Quick, Forge, Forge+, or Deep
97
- - `exports_documented` — read from `stats.exports_documented` in metadata.json (count of documented exports)
98
- - `source_repo` or `source_root` — original source repository
99
-
100
- **Build a skill inventory** as an internal list of all loaded skills with the fields above.
101
-
102
- **If a resolved skill package lacks SKILL.md or metadata.json:**
103
- - Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
104
- - Do not include in inventory
105
-
106
- ### 3. Validate Minimum Requirements
107
-
108
- **Check skill count:**
109
- - At least 2 valid skills must exist (a stack requires multiple libraries)
110
- - If fewer than 2 → "**Cannot proceed.** Only {count} skill(s) found in `{skills_output_folder}`. A stack requires at least 2 skills. Generate more skills with [CS] Create Skill or [QS] Quick Skill, then re-run [VS]."
111
- - HALT workflow
112
-
113
- **Check forge_data_folder:**
114
- - Verify `forge_data_folder` was resolved from config.yaml and is non-empty
115
- - If undefined or empty → "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Re-run [SF] Setup Forge to initialize."
116
- - HALT workflow
117
-
118
- **Check architecture document:**
119
- - Confirm it was loaded successfully in section 1
120
- - If not → HALT with error (should not reach here if section 1 validation passed)
121
-
122
- ### 4. Create Feasibility Report
123
-
124
- Load `{reportTemplate}` and create the output file at `{outputFile}`.
125
-
126
- **Populate frontmatter:**
127
- - `project_name`, `date`, `architecture_doc`, `prd_doc` (or "none")
128
- - `prd_available: true|false` (from section 1 validation)
129
- - `previous_report: {path}` (or empty string if not provided)
130
- - `skills_analyzed: {count}`
131
- - `overall_verdict: "pending"`
132
- - `stepsCompleted: ['step-01-init']`
133
-
134
- ### 5. Display Initialization Summary
135
-
136
- "**Stack Verification Initialized**
137
-
138
- | Field | Value |
139
- |-------|-------|
140
- | **Skills Loaded** | {count} |
141
- | **Architecture Doc** | {architecture_doc} |
142
- | **PRD Document** | {prd_doc or 'Not provided — requirements pass will be skipped'} |
143
- | **Previous Report** | {previous_report or 'Not provided — no delta comparison'} |
144
-
145
- **Skill Inventory:**
146
-
147
- | Skill | Language | Tier | Exports |
148
- |-------|----------|------|---------|
149
- | {skill_name} | {language} | {confidence_tier} | {exports_documented} |
150
-
151
- **Proceeding to coverage analysis...**"
152
-
153
- ### 6. Auto-Proceed to Next Step
154
-
155
- Load, read the full file and then execute `{nextStepFile}`.
156
-
157
- ---
158
-
159
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
160
-
161
- ### ✅ SUCCESS:
162
-
163
- - Architecture document loaded and validated
164
- - PRD document loaded or absence recorded
165
- - Skills folder scanned with SKILL.md and metadata.json validation per skill
166
- - At least 2 valid skills in inventory
167
- - Feasibility report created from template with populated frontmatter
168
- - Initialization summary displayed with skill inventory table
169
- - Auto-proceeded to step 02
170
-
171
- ### ❌ SYSTEM FAILURE:
172
-
173
- - Proceeding with fewer than 2 skills
174
- - Proceeding without a valid architecture document
175
- - Not validating SKILL.md and metadata.json existence per skill directory
176
- - Performing coverage or integration analysis in this step
177
- - Hardcoded paths instead of frontmatter variables
178
-
179
- **Master Rule:** This step validates inputs and initializes state. No analysis, no comparison, no verdicts.