bmad-module-skill-forge 0.10.0 → 1.0.0-rc.3

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 (269) hide show
  1. package/.claude-plugin/marketplace.json +56 -0
  2. package/.gitattributes +16 -0
  3. package/README.md +105 -38
  4. package/docs/404.md +13 -10
  5. package/docs/RELEASING.md +616 -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 +30 -9
  22. package/release-audits/v1.0.0-launch-audit.md +207 -0
  23. package/src/README.md +23 -25
  24. package/src/forger/forge-tier.yaml +4 -2
  25. package/src/forger/preferences.yaml +7 -1
  26. package/src/knowledge/agentskills-spec.md +1 -1
  27. package/src/knowledge/architecture-verification.md +1 -1
  28. package/src/knowledge/ccc-bridge.md +16 -15
  29. package/src/knowledge/overview.md +11 -11
  30. package/src/knowledge/progressive-capability.md +3 -3
  31. package/src/knowledge/provenance-tracking.md +9 -3
  32. package/src/knowledge/qmd-registry.md +8 -8
  33. package/src/knowledge/skf-knowledge-index.csv +2 -2
  34. package/src/knowledge/skill-lifecycle.md +16 -1
  35. package/src/knowledge/split-body-strategy.md +1 -1
  36. package/src/knowledge/version-paths.md +17 -12
  37. package/src/module-help.csv +18 -17
  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 -71
  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 -64
  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 -70
  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 +16 -68
  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 +11 -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 -69
  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 +4 -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 +6 -4
  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 -179
  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 -150
  229. package/src/workflows/create-stack-skill/workflow.md +0 -59
  230. package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -136
  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 -178
  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 -133
  239. package/src/workflows/rename-skill/workflow.md +0 -64
  240. package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -159
  241. package/src/workflows/setup-forge/workflow.md +0 -51
  242. package/src/workflows/shared/health-check.md +0 -231
  243. package/src/workflows/test-skill/data/scoring-rules.md +0 -123
  244. package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
  245. package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
  246. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
  247. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
  248. package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
  249. package/src/workflows/test-skill/steps-c/step-06-report.md +0 -208
  250. package/src/workflows/test-skill/templates/test-report-template.md +0 -28
  251. package/src/workflows/test-skill/workflow.md +0 -57
  252. package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
  253. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
  254. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
  255. package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
  256. package/src/workflows/update-skill/workflow.md +0 -56
  257. package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
  258. package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
  259. package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
  260. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
  261. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
  262. package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -200
  263. package/src/workflows/verify-stack/workflow.md +0 -61
  264. package/tools/cli/lib/compiler.js +0 -306
  265. package/tools/cli/lib/ide-commands.js +0 -244
  266. /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
  267. /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
  268. /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
  269. /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
@@ -1,9 +1,6 @@
1
1
  ---
2
- name: 'step-02-gap-analysis'
3
- description: 'Find undocumented integration paths that the architecture does not describe but skill APIs suggest'
4
-
5
2
  nextStepFile: './step-03-issue-detection.md'
6
- refinementRulesData: '../data/refinement-rules.md'
3
+ refinementRulesData: 'references/refinement-rules.md'
7
4
  ---
8
5
 
9
6
  # Step 2: Gap Analysis
@@ -12,42 +9,10 @@ refinementRulesData: '../data/refinement-rules.md'
12
9
 
13
10
  Find undocumented integration paths — library pairs that have compatible APIs (from the generated skills) but are not described in the architecture document. For each gap, document what APIs connect and propose an architecture section describing the integration.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
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
- - ⚙️ 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 an architecture refinement analyst performing gap detection
27
- - ✅ Every gap must cite specific APIs from the generated skills — no speculation
28
- - ✅ Apply the gap detection rules from {refinementRulesData} strictly
29
-
30
- ### Step-Specific Rules:
12
+ ## Rules
31
13
 
32
- - 🎯 Focus ONLY on undocumented integration paths (gaps)
33
- - 🚫 FORBIDDEN to detect contradictions or issues that is Step 03
34
- - 🚫 FORBIDDEN to suggest capability expansions or improvements — that is Step 04
35
- - 💬 Every gap MUST include evidence citations from actual skill content
36
-
37
- ## EXECUTION PROTOCOLS:
38
-
39
- - Load refinement rules for gap detection criteria
40
- - Extract integration claims from architecture document using prose co-mention analysis
41
- - Generate all possible library pairs and cross-reference against architecture
42
- - Append gap analysis findings as workflow state for Step 05
43
- - Only gap detection — no issue detection, no improvement suggestions
44
-
45
- ## CONTEXT BOUNDARIES:
46
-
47
- - Available: Architecture document content, skill inventory from Step 01, SKILL.md and metadata.json files, refinement rules
48
- - Focus: Finding library pairs with compatible APIs that the architecture does not describe
49
- - Limits: Only detect gaps — do not flag issues or suggest improvements
50
- - Dependencies: Step 01 must have loaded skill inventory and validated architecture document
14
+ - Focus only on undocumented integration paths (gaps) — do not detect contradictions (Step 03) or suggest expansions (Step 04)
15
+ - Every gap must include evidence citations from actual skill content
51
16
 
52
17
  ## MANDATORY SEQUENCE
53
18
 
@@ -85,15 +50,33 @@ For N skills, this produces N*(N-1)/2 unique pairs.
85
50
 
86
51
  ### 4. Load Skill API Surfaces for Cross-Reference
87
52
 
88
- For each library in the skill inventory, load the skill artifacts:
53
+ <!-- Subagent delegation: read SKILL.md files in parallel, return compact JSON -->
54
+
55
+ For each library in the skill inventory, delegate reading to a parallel subagent. Launch up to **8 subagents concurrently** (batch larger inventories in rounds of 8).
89
56
 
90
- **From SKILL.md, extract:**
91
- - Exported functions and their signatures
92
- - Exported types, interfaces, and classes
93
- - Protocol indicators (HTTP, gRPC, WebSocket, message queue, file I/O, IPC)
94
- - Data format indicators (JSON, protobuf, CSV, binary, streaming)
57
+ **Each subagent receives one skill's SKILL.md path and MUST:**
58
+ 1. Read the SKILL.md file
59
+ 2. Extract the API surface
60
+ 3. ONLY return this compact JSON no prose, no extra commentary:
95
61
 
96
- **From metadata.json, extract:**
62
+ ```json
63
+ {
64
+ "skill_name": "...",
65
+ "exports": ["functionName(params): ReturnType", "..."],
66
+ "protocols": ["HTTP", "gRPC", "WebSocket", "message queue", "file I/O", "IPC"],
67
+ "data_formats": ["JSON", "protobuf", "CSV", "binary", "streaming"]
68
+ }
69
+ ```
70
+
71
+ **Extraction rules for subagents:**
72
+ - `exports`: exported functions with signatures, exported types/interfaces/classes
73
+ - `protocols`: any protocol indicators found in the SKILL.md
74
+ - `data_formats`: any data format indicators found in the SKILL.md
75
+ - If a field has no matches, return an empty array `[]`
76
+
77
+ **Parent collects all subagent JSON summaries.** Do not load full SKILL.md content into parent context.
78
+
79
+ **From metadata.json (read in parent — lightweight), also extract:**
97
80
  - `language` — primary programming language
98
81
  - `exports` — export count and names
99
82
 
@@ -152,28 +135,3 @@ Store all gap findings as workflow state for Step 05. To ensure durability acros
152
135
 
153
136
  Load, read the full file and then execute `{nextStepFile}`.
154
137
 
155
- ---
156
-
157
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
158
-
159
- ### ✅ SUCCESS:
160
-
161
- - Refinement rules loaded from {refinementRulesData}
162
- - Integration claims extracted from architecture document using prose co-mention analysis
163
- - All possible library pairs generated from skill inventory
164
- - Skill API surfaces loaded for cross-reference
165
- - Each gap includes evidence citations from actual skill content
166
- - Gap analysis results displayed with count and details
167
- - Gap findings stored as workflow state for Step 05
168
- - Auto-proceeded to step 03
169
-
170
- ### ❌ SYSTEM FAILURE:
171
-
172
- - Inventing APIs not present in the actual skills
173
- - Flagging contradictions or issues (that is Step 03)
174
- - Suggesting capability improvements (that is Step 04)
175
- - Gaps without evidence citations from generated skills
176
- - Parsing Mermaid diagrams instead of using prose-based co-mention analysis
177
- - Hardcoded paths instead of frontmatter variables
178
-
179
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,9 +1,6 @@
1
1
  ---
2
- name: 'step-03-issue-detection'
3
- description: 'Find contradictions between architecture claims and verified API reality from skills and optional VS report'
4
-
5
2
  nextStepFile: './step-04-improvements.md'
6
- refinementRulesData: '../data/refinement-rules.md'
3
+ refinementRulesData: 'references/refinement-rules.md'
7
4
  ---
8
5
 
9
6
  # Step 3: Issue Detection
@@ -12,43 +9,11 @@ refinementRulesData: '../data/refinement-rules.md'
12
9
 
13
10
  Find contradictions between what the architecture document claims and what the generated skills reveal about actual API surfaces. Detect language boundary issues not addressed, protocol mismatches assumed away, and missing bridge layers. If a VS feasibility report is available, incorporate RISKY and BLOCKED verdicts as confirmed issues.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
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
- - ⚙️ 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 an architecture refinement analyst performing contradiction detection
27
- - ✅ Every issue must cite evidence from actual skill content AND the architecture claim it contradicts
28
- - ✅ Apply the issue detection rules from {refinementRulesData} strictly
29
-
30
- ### Step-Specific Rules:
31
-
32
- - 🎯 Focus ONLY on contradictions between architecture claims and skill API reality
33
- - 🚫 FORBIDDEN to detect undocumented integration paths — that was Step 02
34
- - 🚫 FORBIDDEN to suggest capability expansions — that is Step 04
35
- - 💬 Every issue MUST cite both the architecture claim AND the contradicting skill evidence
36
-
37
- ## EXECUTION PROTOCOLS:
38
-
39
- - Load refinement rules for issue detection criteria
40
- - Extract all integration claims from the architecture document
41
- - Verify each claim against skill API surfaces
42
- - Incorporate VS report verdicts if available
43
- - Append issue findings as workflow state for Step 05
44
- - Only issue detection — no gap analysis, no improvement suggestions
12
+ ## Rules
45
13
 
46
- ## CONTEXT BOUNDARIES:
47
-
48
- - Available: Architecture document content, skill inventory and SKILL.md files, VS feasibility report (if provided), refinement rules
49
- - Focus: Finding contradictions between documented claims and verified API reality
50
- - Limits: Only detect issues — do not fill gaps or suggest improvements
51
- - Dependencies: Step 01 (skill inventory, architecture doc, VS report status), Step 02 (gap analysis complete)
14
+ - Focus only on contradictions between architecture claims and skill API reality
15
+ - Do not detect gaps (Step 02) or suggest expansions (Step 04)
16
+ - Every issue must cite both the architecture claim and the contradicting skill evidence
52
17
 
53
18
  ## MANDATORY SEQUENCE
54
19
 
@@ -155,28 +120,3 @@ Store all issue findings as workflow state for Step 05. To ensure durability acr
155
120
 
156
121
  Load, read the full file and then execute `{nextStepFile}`.
157
122
 
158
- ---
159
-
160
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
161
-
162
- ### ✅ SUCCESS:
163
-
164
- - Refinement rules loaded from {refinementRulesData}
165
- - All integration claims extracted from architecture document
166
- - Each claim verified against actual skill API surfaces
167
- - VS report verdicts incorporated if report was provided
168
- - Every issue includes both architecture citation AND contradicting skill evidence
169
- - Issues classified by severity (Critical, Major, Minor)
170
- - Issue detection results displayed with count and details
171
- - Issue findings stored as workflow state for Step 05
172
- - Auto-proceeded to step 04
173
-
174
- ### ❌ SYSTEM FAILURE:
175
-
176
- - Issues without evidence from actual skills (speculation)
177
- - Not citing the architecture claim that is contradicted
178
- - Filling gaps (that was Step 02) or suggesting improvements (that is Step 04)
179
- - Ignoring VS report verdicts when the report was provided
180
- - Hardcoded paths instead of frontmatter variables
181
-
182
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,9 +1,6 @@
1
1
  ---
2
- name: 'step-04-improvements'
3
- description: 'Suggest capability expansions from skill data not leveraged in the architecture'
4
-
5
2
  nextStepFile: './step-05-compile.md'
6
- refinementRulesData: '../data/refinement-rules.md'
3
+ refinementRulesData: 'references/refinement-rules.md'
7
4
  ---
8
5
 
9
6
  # Step 4: Improvement Detection
@@ -12,42 +9,11 @@ refinementRulesData: '../data/refinement-rules.md'
12
9
 
13
10
  Identify capability expansions — library features documented in the generated skills that the architecture does not leverage. Detect unused capabilities, cross-library synergies visible from skill API surfaces, and alternative patterns that could strengthen the architecture. For each improvement, document the capability and suggest how to incorporate it.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
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
- - ⚙️ 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 an architecture refinement analyst identifying untapped capabilities
27
- - ✅ Every improvement must cite specific APIs from the generated skills — no speculation
28
- - ✅ Improvements are suggestions, not mandates — present them as optional enhancements
29
-
30
- ### Step-Specific Rules:
31
-
32
- - 🎯 Focus ONLY on capability expansions not leveraged in the architecture
33
- - 🚫 FORBIDDEN to detect gaps (Step 02) or issues (Step 03) — those are already captured
34
- - 🎯 Improvements are ADDITIVE suggestions — they enhance, not contradict, the architecture
35
- - 💬 Every improvement MUST include evidence citations from actual skill content
36
-
37
- ## EXECUTION PROTOCOLS:
38
-
39
- - Load refinement rules for improvement detection criteria
40
- - Compare full skill API surfaces against architecture usage
41
- - Detect unused capabilities, cross-library synergies, and alternative patterns
42
- - Append improvement findings as workflow state for Step 05
43
- - Only improvement detection — no gap or issue analysis
12
+ ## Rules
44
13
 
45
- ## CONTEXT BOUNDARIES:
46
-
47
- - Available: Architecture document content, skill inventory and SKILL.md files, refinement rules
48
- - Focus: Finding capabilities in skills that the architecture does not use
49
- - Limits: Only detect improvements — do not re-detect gaps or issues from earlier steps
50
- - Dependencies: Step 01 (skill inventory), Steps 02-03 (complete — do not duplicate findings)
14
+ - Focus only on capability expansions not leveraged in the architecture — do not repeat gaps (Step 02) or issues (Step 03)
15
+ - Improvements are additive suggestions — they enhance, not contradict, the architecture
16
+ - Every improvement must include evidence citations from actual skill content
51
17
 
52
18
  ## MANDATORY SEQUENCE
53
19
 
@@ -142,28 +108,3 @@ Store all improvement findings as workflow state for Step 05. To ensure durabili
142
108
 
143
109
  Load, read the full file and then execute `{nextStepFile}`.
144
110
 
145
- ---
146
-
147
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
148
-
149
- ### ✅ SUCCESS:
150
-
151
- - Refinement rules loaded from {refinementRulesData}
152
- - Architecture usage map built for each referenced library
153
- - Full skill API surfaces compared against architecture usage
154
- - Cross-library synergies checked for complementary capabilities
155
- - Every improvement includes evidence citations from actual skill content
156
- - Improvements categorized by value (High, Medium, Low)
157
- - Improvement results displayed with count and details
158
- - Improvement findings stored as workflow state for Step 05
159
- - Auto-proceeded to step 05
160
-
161
- ### ❌ SYSTEM FAILURE:
162
-
163
- - Improvements without evidence from actual skills (speculation)
164
- - Re-detecting gaps (Step 02) or issues (Step 03)
165
- - Presenting trivial internal-only exports as improvements
166
- - Not categorizing improvements by value
167
- - Hardcoded paths instead of frontmatter variables
168
-
169
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,7 +1,4 @@
1
1
  ---
2
- name: 'step-05-compile'
3
- description: 'Produce the refined architecture document by annotating the original with gaps, issues, and improvements'
4
-
5
2
  nextStepFile: './step-06-report.md'
6
3
  outputFile: '{output_folder}/refined-architecture-{project_name}.md'
7
4
  ---
@@ -12,35 +9,11 @@ outputFile: '{output_folder}/refined-architecture-{project_name}.md'
12
9
 
13
10
  Produce the refined architecture document by starting with the original as a base, adding gap-fill subsections, issue callout blocks, and improvement suggestions. Append a Refinement Summary. Present for user review before finalizing.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
21
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
-
23
- ### Role Reinforcement:
24
-
25
- - ✅ You are an architecture refinement analyst compiling the final refined document
26
- - ✅ Additive, not destructive — preserve every word of the original, only add refinements
27
- - ✅ The document must be in `{document_output_language}`
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🚫 FORBIDDEN to discover new gaps, issues, or improvements — use only what Steps 02-04 produced
32
- - 🚫 FORBIDDEN to delete, reword, or rearrange original architecture content
33
- - 💬 Present compiled document for user review (Gate checkpoint)
34
-
35
- ## EXECUTION PROTOCOLS:
36
-
37
- - Compile refined architecture from original + findings from Steps 02-04
38
- - Write output to {outputFile}, wait for user approval before proceeding
12
+ ## Rules
39
13
 
40
- ## CONTEXT BOUNDARIES:
41
-
42
- - From Steps 01-04: Architecture document, skill inventory, gap/issue/improvement findings
43
- - This step produces: The refined architecture document at {outputFile}
14
+ - Do not discover new gaps, issues, or improvements — use only what Steps 02-04 produced
15
+ - Do not delete, reword, or rearrange original architecture content
16
+ - Present compiled document for user review (gate checkpoint)
44
17
 
45
18
  ## MANDATORY SEQUENCE
46
19
 
@@ -166,6 +139,7 @@ Display: **Select:** [C] Continue to Final Report
166
139
  #### EXECUTION RULES:
167
140
 
168
141
  - ALWAYS halt and wait for user input after presenting compilation
142
+ - **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-approve compiled architecture"
169
143
  - ONLY proceed to next step when user approves and selects 'C'
170
144
 
171
145
  #### Menu Handling Logic:
@@ -173,28 +147,3 @@ Display: **Select:** [C] Continue to Final Report
173
147
  - IF C: Load, read entire file, then execute {nextStepFile}
174
148
  - IF Any other: Process as feedback, adjust specific refinements in the document, rewrite {outputFile}, redisplay preview, then [Redisplay Menu Options](#8-present-menu-options)
175
149
 
176
- ---
177
-
178
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
179
-
180
- ### ✅ SUCCESS:
181
-
182
- - Original architecture document preserved in full without modifications
183
- - Gap-fill subsections inserted at logical locations with evidence citations
184
- - Issue callout blocks inserted adjacent to contradicted claims with severity
185
- - Improvement suggestions inserted with value ratings and evidence
186
- - Refinement Summary section appended with accurate counts
187
- - Refined document written to {outputFile}
188
- - User reviewed and approved compilation
189
- - Proceeded to step 06 only after user selected C
190
-
191
- ### ❌ SYSTEM FAILURE:
192
-
193
- - Deleting, rewording, or rearranging original architecture content
194
- - Discovering new findings not from Steps 02-04
195
- - Inserting refinements without evidence citations
196
- - Proceeding without user review (Gate checkpoint)
197
- - Not writing the document to {outputFile} before presenting for review
198
- - Hardcoded paths instead of frontmatter variables
199
-
200
- **Master Rule:** Additive only. Preserve the original. Get user approval before proceeding.
@@ -1,9 +1,6 @@
1
1
  ---
2
- name: 'step-06-report'
3
- description: 'Present refinement summary to user with counts, next steps, and review options'
4
-
5
2
  outputFile: '{output_folder}/refined-architecture-{project_name}.md'
6
- nextStepFile: '../../shared/health-check.md'
3
+ nextStepFile: './step-07-health-check.md'
7
4
  ---
8
5
 
9
6
  # Step 6: Present Report
@@ -12,40 +9,11 @@ nextStepFile: '../../shared/health-check.md'
12
9
 
13
10
  Present the complete refinement summary to the user. Display counts of gaps filled, issues flagged, and improvements suggested. Provide the output file path and recommend next steps. Offer the user options to review changes in detail or exit. Chains to the shared health check on exit.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
21
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
-
23
- ### Role Reinforcement:
24
-
25
- - ✅ You are an architecture refinement analyst delivering the final summary
26
- - ✅ Present findings clearly and concisely — the user needs to decide which refinements to keep
27
- - ✅ Next step recommendations must be specific and actionable
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🎯 Focus ONLY on presenting the completed refinement — no new analysis
32
- - 🚫 FORBIDDEN to discover new gaps, issues, or improvements
33
- - 🚫 FORBIDDEN to modify the refined document — only read and present
34
- - 📋 Chains to shared health check via `{nextStepFile}` — no further steps after that
35
-
36
- ## EXECUTION PROTOCOLS:
37
-
38
- - Load and present the refinement summary from the compiled document
39
- - No new content written — document was finalized in Step 05
40
- - Present summary, next steps, and review options clearly
41
- - Read-only presentation — do not alter document data
42
-
43
- ## CONTEXT BOUNDARIES:
12
+ ## Rules
44
13
 
45
- - Available: Complete {outputFile} with all refinements from Steps 02-05
46
- - Focus: Clear, actionable presentation of refinement results
47
- - Limits: Do not add new analysis or change any refinements
48
- - Dependencies: All previous steps must be complete (Steps 01-05)
14
+ - Focus only on presenting the completed refinement no new analysis
15
+ - Do not discover new gaps, issues, or improvements, and do not modify the refined document
16
+ - Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing summary is NOT the terminal step
49
17
 
50
18
  ## MANDATORY SEQUENCE
51
19
 
@@ -111,7 +79,11 @@ Re-run **[RA] Refine Architecture** anytime after updating your skills or archit
111
79
 
112
80
  **Architecture refinement complete.**"
113
81
 
114
- Then load and execute `{nextStepFile}` for workflow self-improvement check.
82
+ ### Result Contract
83
+
84
+ Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{output_folder}/refine-architecture-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{output_folder}/refine-architecture-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include the refined architecture doc path in `outputs`; include `gap_count`, `issue_count`, and `improvement_count` in `summary`.
85
+
86
+ Then load, read the full file, and execute `{nextStepFile}` — the health-check step is the true terminal step of this workflow.
115
87
 
116
88
  #### EXECUTION RULES:
117
89
 
@@ -121,30 +93,5 @@ Re-run **[RA] Refine Architecture** anytime after updating your skills or archit
121
93
 
122
94
  ## CRITICAL STEP COMPLETION NOTE
123
95
 
124
- When the user selects X, this step chains to the shared health check. After the health check completes, the refine-architecture workflow is fully done. The refined architecture at `{outputFile}` contains the full original content plus all gap-fills, issue annotations, and improvement suggestions backed by skill API evidence.
125
-
126
- ---
127
-
128
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
129
-
130
- ### ✅ SUCCESS:
131
-
132
- - Refined document loaded and verified for Refinement Summary section
133
- - Summary displayed with accurate counts for gaps, issues, and improvements
134
- - Output file path displayed prominently
135
- - Next steps presented with specific workflow recommendations
136
- - Critical issues highlighted if present
137
- - Menu presented with R and X options
138
- - Detailed review walkthrough available on R selection with full evidence citations
139
- - Workflow exits cleanly on X with saved file path
140
-
141
- ### ❌ SYSTEM FAILURE:
142
-
143
- - Discovering new findings or changing refinements in this step
144
- - Modifying the refined document content
145
- - Not presenting the menu
146
- - Not displaying the document save path on exit
147
- - Inaccurate counts in the summary
148
- - Hardcoded paths instead of frontmatter variables
96
+ When the user selects X, this step chains to the local health-check step (`{nextStepFile}`), which in turn delegates to `shared/health-check.md`. After the health check completes, the refine-architecture workflow is fully done. The refined architecture at `{outputFile}` contains the full original content plus all gap-fills, issue annotations, and improvement suggestions backed by skill API evidence.
149
97
 
150
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,22 @@
1
+ ---
2
+ # `shared/health-check.md` resolves relative to the SKF module root
3
+ # (`_bmad/skf/` when installed, `src/` during development), NOT relative
4
+ # to this step file.
5
+ nextStepFile: 'shared/health-check.md'
6
+ ---
7
+
8
+ # Step 7: Workflow Health Check
9
+
10
+ ## STEP GOAL:
11
+
12
+ Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of refine-architecture — after the shared health check completes, the workflow is fully done.
13
+
14
+ ## Rules
15
+
16
+ - No user-facing reports, file writes, or result contracts in this step — those belong in step-06
17
+ - Delegate directly to `{nextStepFile}` with no additional commentary
18
+ - Do not attempt any other action between loading this step and executing `{nextStepFile}`
19
+
20
+ ## MANDATORY SEQUENCE
21
+
22
+ Load `{nextStepFile}`, read it fully, then execute it.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: skf-rename-skill
3
+ description: Rename a skill across all its versions — transactional copy-verify-delete with platform context rebuild. Use when the user requests to "rename a skill."
4
+ ---
5
+
6
+ # Rename Skill
7
+
8
+ ## Overview
9
+
10
+ Renames a skill across all its versions with transactional safety — copy to the new name, verify all references updated, delete the old name only after verification succeeds. Rebuilds platform context files to reference the new name. The agentskills.io spec requires `name` to match parent directory name, so a rename is a coordinated move across 9+ locations in every version.
11
+
12
+ ## Role
13
+
14
+ You are Ferris in Management mode — a precision surgeon who operates on the entire skill group atomically. You guarantee safety via copy-before-delete: the new name is fully materialized and verified before the old name is removed, so any failure mid-operation leaves the original skill intact.
15
+
16
+ ## Workflow Rules
17
+
18
+ These rules apply to every step in this workflow:
19
+
20
+ - Never delete the old skill directories until the new name has been fully materialized and verified
21
+ - Never proceed past a verification failure — roll back (delete new directories) and halt
22
+ - Never allow a rename to collide with an existing skill name
23
+ - Read each step file completely before taking any action
24
+ - Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
25
+ - Only load one step file at a time — never preload future steps
26
+ - If any instruction references a subprocess or tool you lack, achieve the outcome in your main context thread
27
+ - Always communicate in `{communication_language}`
28
+ - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
29
+
30
+ ## Stages
31
+
32
+ | # | Step | File | Auto-proceed |
33
+ |---|------|------|--------------|
34
+ | 1 | Select & Validate | steps-c/step-01-select.md | No (confirm) |
35
+ | 2 | Execute Rename | steps-c/step-02-execute.md | No (confirm) |
36
+ | 3 | Report | steps-c/step-03-report.md | Yes |
37
+ | 4 | Workflow Health Check | steps-c/step-04-health-check.md | Yes |
38
+
39
+ ## Invocation Contract
40
+
41
+ | Aspect | Detail |
42
+ |--------|--------|
43
+ | **Inputs** | old_name [required], new_name [required] |
44
+ | **Gates** | step-01: Input Gate [use args] x2, Confirm Gate [Y] |
45
+ | **Outputs** | Renamed skill directories, updated manifest, updated context files |
46
+ | **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
47
+
48
+ ## On Activation
49
+
50
+ 1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
51
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
52
+ - `skills_output_folder`, `forge_data_folder`, `sidecar_path`
53
+ - `snippet_skill_root_override` (optional string) — when set, the context-file rebuild in step-02 preserves any snippet `root:` prefix that matches the override instead of rewriting it to the target IDE's skill root. See `skf-export-skill/assets/managed-section-format.md` for full semantics.
54
+ - Generate and store `timestamp` as `YYYYMMDD-HHmmss` format. This value is fixed for the entire workflow run.
55
+
56
+ 2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
57
+
58
+ 3. Load, read the full file, and then execute `./steps-c/step-01-select.md` to begin the workflow.