bmad-module-skill-forge 2.2.0 → 3.0.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 (435) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +49 -49
  3. package/docs/404.md +10 -8
  4. package/docs/_data/pinned.yaml +22 -13
  5. package/docs/_internal/STABILITY.md +58 -35
  6. package/docs/agents.md +39 -53
  7. package/docs/architecture.md +65 -51
  8. package/docs/bmad-synergy.md +53 -51
  9. package/docs/campaign.md +127 -75
  10. package/docs/concepts.md +34 -28
  11. package/docs/examples.md +70 -68
  12. package/docs/forge-auto.md +34 -31
  13. package/docs/getting-started.md +118 -57
  14. package/docs/how-it-works.md +25 -21
  15. package/docs/index.md +15 -15
  16. package/docs/skill-model.md +70 -59
  17. package/docs/troubleshooting.md +135 -18
  18. package/docs/verifying-a-skill.md +83 -57
  19. package/docs/why-skf.md +24 -22
  20. package/docs/workflows.md +274 -110
  21. package/package.json +18 -10
  22. package/src/forger/preferences.yaml +8 -1
  23. package/src/knowledge/agentskills-spec.md +2 -0
  24. package/src/knowledge/ccc-bridge.md +40 -24
  25. package/src/knowledge/confidence-tiers.md +9 -5
  26. package/src/knowledge/overview.md +3 -3
  27. package/src/knowledge/progressive-capability.md +8 -8
  28. package/src/knowledge/provenance-tracking.md +9 -5
  29. package/src/knowledge/qmd-registry.md +2 -2
  30. package/src/knowledge/skf-knowledge-index.csv +2 -2
  31. package/src/knowledge/skill-lifecycle.md +18 -11
  32. package/src/knowledge/split-body-strategy.md +0 -3
  33. package/src/knowledge/tool-resolution.md +4 -2
  34. package/src/knowledge/version-paths.md +101 -15
  35. package/src/module-help.csv +3 -3
  36. package/src/module.yaml +10 -0
  37. package/src/shared/data/ast-grep-recipes.yaml +608 -0
  38. package/src/shared/data/ide-context-files.json +30 -0
  39. package/src/shared/health-check.md +32 -12
  40. package/src/shared/references/description-guard-protocol.md +12 -9
  41. package/src/shared/references/feasibility-report-schema.md +19 -13
  42. package/src/shared/references/headless-gate-convention.md +55 -3
  43. package/src/shared/references/output-contract-schema.md +19 -8
  44. package/src/shared/references/pipeline-contracts.md +94 -29
  45. package/src/shared/references/tessl-review.md +77 -0
  46. package/src/shared/scripts/schemas/skf-analyze-result-envelope.v1.json +194 -0
  47. package/src/shared/scripts/schemas/skf-audit-result-envelope.v1.json +192 -0
  48. package/src/shared/scripts/schemas/skf-brief-result-envelope.v1.json +32 -4
  49. package/src/shared/scripts/schemas/skf-campaign-result-envelope.v1.json +174 -0
  50. package/src/shared/scripts/schemas/skf-create-skill-result-envelope.v1.json +284 -0
  51. package/src/shared/scripts/schemas/skf-drop-skill-result-envelope.v1.json +164 -0
  52. package/src/shared/scripts/schemas/skf-export-result-envelope.v1.json +160 -0
  53. package/src/shared/scripts/schemas/skf-quick-skill-result-envelope.v1.json +261 -0
  54. package/src/shared/scripts/schemas/skf-refine-architecture-result-envelope.v1.json +192 -0
  55. package/src/shared/scripts/schemas/skf-rename-skill-result-envelope.v1.json +179 -0
  56. package/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json +27 -11
  57. package/src/shared/scripts/schemas/skf-stack-result-envelope.v1.json +176 -0
  58. package/src/shared/scripts/schemas/skf-test-result-envelope.v1.json +173 -0
  59. package/src/shared/scripts/schemas/skf-update-result-envelope.v1.json +19 -5
  60. package/src/shared/scripts/schemas/skf-verify-stack-result-envelope.v1.json +180 -0
  61. package/src/shared/scripts/schemas/skill-brief.v1.json +34 -0
  62. package/src/shared/scripts/schemas/workspace-detection.v1.json +1 -1
  63. package/src/shared/scripts/skf-atomic-write.py +30 -14
  64. package/src/shared/scripts/skf-build-change-manifest.py +2203 -24
  65. package/src/shared/scripts/skf-ccc-git-hygiene.py +532 -0
  66. package/src/shared/scripts/skf-check-unit-records.py +184 -0
  67. package/src/shared/scripts/skf-check-workspace-drift.py +538 -9
  68. package/src/shared/scripts/skf-classify-changed-files.py +694 -0
  69. package/src/shared/scripts/skf-comention-pairs.py +1333 -123
  70. package/src/shared/scripts/skf-compare-file-hashes.py +1 -1
  71. package/src/shared/scripts/skf-count-imports.py +1867 -0
  72. package/src/shared/scripts/skf-count-tokens.py +1 -1
  73. package/src/shared/scripts/skf-derive-assembly-shape.py +3 -2
  74. package/src/shared/scripts/skf-description-guard.py +99 -11
  75. package/src/shared/scripts/skf-detect-docs.py +694 -2
  76. package/src/shared/scripts/skf-detect-language.py +486 -107
  77. package/src/shared/scripts/skf-detect-registry.py +887 -0
  78. package/src/shared/scripts/skf-detect-scripts-assets.py +1 -1
  79. package/src/shared/scripts/skf-detect-tools.py +209 -27
  80. package/src/shared/scripts/skf-detect-workspaces.py +506 -30
  81. package/src/shared/scripts/skf-disqualify-candidates.py +821 -182
  82. package/src/shared/scripts/skf-emit-brief-result-envelope.py +69 -191
  83. package/src/shared/scripts/skf-emit-result-envelope.py +1604 -106
  84. package/src/shared/scripts/skf-enumerate-stack-skills.py +986 -117
  85. package/src/shared/scripts/skf-extract-public-api.py +4084 -85
  86. package/src/shared/scripts/skf-extraction-inventory.py +746 -0
  87. package/src/shared/scripts/skf-extraction-snapshot.py +539 -0
  88. package/src/shared/scripts/skf-fetch-temporal.py +674 -0
  89. package/src/shared/scripts/skf-find-cycles.py +97 -29
  90. package/src/shared/scripts/skf-find-test-report.py +476 -0
  91. package/src/shared/scripts/skf-forge-tier-rw.py +444 -203
  92. package/src/shared/scripts/skf-github-fetch.py +365 -0
  93. package/src/shared/scripts/skf-github-probe.py +661 -0
  94. package/src/shared/scripts/skf-hash-content.py +166 -12
  95. package/src/shared/scripts/skf-language-corpora.py +1 -1
  96. package/src/shared/scripts/skf-load-provenance.py +159 -27
  97. package/src/shared/scripts/skf-manifest-ops.py +1 -1
  98. package/src/shared/scripts/skf-merge-ccc-exclusions.py +2307 -223
  99. package/src/shared/scripts/skf-merge-doc-urls.py +1 -1
  100. package/src/shared/scripts/skf-names-present.py +221 -0
  101. package/src/shared/scripts/skf-pair-intersect.py +119 -28
  102. package/src/shared/scripts/skf-parse-gaps.py +1384 -0
  103. package/src/shared/scripts/skf-preapply.py +1 -1
  104. package/src/shared/scripts/skf-preflight.py +161 -27
  105. package/src/shared/scripts/skf-promote-staged.py +430 -0
  106. package/src/shared/scripts/skf-provenance-gap-dispatch.py +39 -7
  107. package/src/shared/scripts/skf-qmd-classify-collections.py +229 -45
  108. package/src/shared/scripts/skf-quick-batch.py +774 -0
  109. package/src/shared/scripts/skf-rebuild-managed-sections.py +972 -88
  110. package/src/shared/scripts/skf-recommend-scope-type.py +323 -156
  111. package/src/shared/scripts/skf-render-metadata-stats.py +156 -12
  112. package/src/shared/scripts/skf-render-quick-metadata.py +132 -28
  113. package/src/shared/scripts/skf-render-stack-metadata.py +976 -0
  114. package/src/shared/scripts/skf-resolve-authoritative-files.py +128 -13
  115. package/src/shared/scripts/skf-resolve-package.py +523 -106
  116. package/src/shared/scripts/skf-rewrite-skill-name.py +433 -47
  117. package/src/shared/scripts/skf-run-lock.py +577 -0
  118. package/src/shared/scripts/skf-scan-manifests.py +998 -57
  119. package/src/shared/scripts/skf-scan-skill-md-structure.py +1341 -37
  120. package/src/shared/scripts/skf-severity-classify.py +712 -108
  121. package/src/shared/scripts/skf-shape-detect.py +298 -204
  122. package/src/shared/scripts/skf-shard-body.py +9 -8
  123. package/src/shared/scripts/skf-skill-inventory.py +2412 -89
  124. package/src/shared/scripts/skf-skills-module.py +472 -0
  125. package/src/shared/scripts/skf-source-tree.py +1796 -0
  126. package/src/shared/scripts/skf-structural-diff.py +670 -119
  127. package/src/shared/scripts/skf-tessl-review.py +706 -0
  128. package/src/shared/scripts/skf-update-active-symlink.py +5 -5
  129. package/src/shared/scripts/skf-update-run-state.py +624 -0
  130. package/src/shared/scripts/skf-validate-brief-inputs.py +92 -29
  131. package/src/shared/scripts/skf-validate-brief-schema.py +4 -1
  132. package/src/shared/scripts/skf-validate-feasibility-report.py +577 -66
  133. package/src/shared/scripts/skf-validate-frontmatter.py +103 -26
  134. package/src/shared/scripts/skf-validate-output.py +712 -64
  135. package/src/shared/scripts/skf-validate-pins.py +1 -1
  136. package/src/shared/scripts/skf-verify-no-trace.py +116 -10
  137. package/src/shared/scripts/skf-verify-provenance-completeness.py +2919 -54
  138. package/src/shared/scripts/skf-write-skill-brief.py +367 -19
  139. package/src/shared/tool-requirements.yaml +201 -0
  140. package/src/skf-analyze-source/SKILL.md +41 -36
  141. package/src/skf-analyze-source/assets/skill-brief-schema.md +7 -8
  142. package/src/skf-analyze-source/customize.toml +36 -24
  143. package/src/skf-analyze-source/references/auto-docs-only.md +58 -20
  144. package/src/skf-analyze-source/references/continue.md +2 -13
  145. package/src/skf-analyze-source/references/discover-additional-source.md +147 -0
  146. package/src/skf-analyze-source/references/generate-briefs.md +121 -55
  147. package/src/skf-analyze-source/references/headless-contract.md +42 -15
  148. package/src/skf-analyze-source/references/identify-units.md +96 -110
  149. package/src/skf-analyze-source/references/init.md +73 -71
  150. package/src/skf-analyze-source/references/map-and-detect.md +123 -105
  151. package/src/skf-analyze-source/references/map-unit-exports.md +68 -0
  152. package/src/skf-analyze-source/references/recommend.md +51 -70
  153. package/src/skf-analyze-source/references/scan-project.md +60 -84
  154. package/src/skf-analyze-source/references/scan-root.md +39 -0
  155. package/src/skf-analyze-source/references/step-auto-scope-coexistence.md +47 -0
  156. package/src/skf-analyze-source/references/step-auto-scope-corpora.md +53 -0
  157. package/src/skf-analyze-source/references/step-auto-scope-split.md +91 -0
  158. package/src/skf-analyze-source/references/step-auto-scope.md +208 -293
  159. package/src/skf-analyze-source/references/step-shape-detect.md +14 -12
  160. package/src/skf-analyze-source/references/unit-detection-heuristics.md +37 -42
  161. package/src/skf-audit-skill/SKILL.md +43 -51
  162. package/src/skf-audit-skill/assets/drift-report-template.md +27 -3
  163. package/src/skf-audit-skill/customize.toml +41 -20
  164. package/src/skf-audit-skill/references/constituent-freshness.md +91 -0
  165. package/src/skf-audit-skill/references/doc-drift.md +141 -0
  166. package/src/skf-audit-skill/references/headless-contract.md +29 -0
  167. package/src/skf-audit-skill/references/init.md +148 -210
  168. package/src/skf-audit-skill/references/re-index.md +96 -108
  169. package/src/skf-audit-skill/references/report.md +96 -33
  170. package/src/skf-audit-skill/references/semantic-diff.md +27 -18
  171. package/src/skf-audit-skill/references/severity-classify.md +79 -65
  172. package/src/skf-audit-skill/references/severity-rules.md +15 -6
  173. package/src/skf-audit-skill/references/structural-diff.md +75 -90
  174. package/src/skf-audit-skill/references/upstream-checkout.md +77 -0
  175. package/src/skf-audit-skill/scripts/render-drift-tables.py +685 -0
  176. package/src/skf-brief-skill/SKILL.md +36 -25
  177. package/src/skf-brief-skill/assets/description-voice-examples.md +1 -1
  178. package/src/skf-brief-skill/assets/scope-templates.md +17 -24
  179. package/src/skf-brief-skill/assets/skill-brief-schema.md +29 -15
  180. package/src/skf-brief-skill/customize.toml +48 -20
  181. package/src/skf-brief-skill/references/analyze-target.md +142 -125
  182. package/src/skf-brief-skill/references/confirm-brief.md +10 -8
  183. package/src/skf-brief-skill/references/draft-checkpoint.md +36 -17
  184. package/src/skf-brief-skill/references/gather-intent-ratify.md +68 -0
  185. package/src/skf-brief-skill/references/gather-intent.md +87 -182
  186. package/src/skf-brief-skill/references/headless-args.md +84 -16
  187. package/src/skf-brief-skill/references/health-check.md +1 -1
  188. package/src/skf-brief-skill/references/invocation-contract.md +18 -13
  189. package/src/skf-brief-skill/references/portfolio-similarity-check.md +1 -1
  190. package/src/skf-brief-skill/references/qmd-collection-registration.md +7 -10
  191. package/src/skf-brief-skill/references/scope-definition.md +123 -47
  192. package/src/skf-brief-skill/references/step-auto-brief.md +24 -80
  193. package/src/skf-brief-skill/references/step-auto-validate.md +20 -121
  194. package/src/skf-brief-skill/references/version-resolution.md +3 -2
  195. package/src/skf-brief-skill/references/write-brief.md +66 -57
  196. package/src/skf-campaign/SKILL.md +31 -34
  197. package/src/skf-campaign/assets/campaign-state-schema.json +25 -4
  198. package/src/skf-campaign/customize.toml +47 -16
  199. package/src/skf-campaign/references/campaign-contracts.md +39 -29
  200. package/src/skf-campaign/references/campaign-directive-spec.md +4 -2
  201. package/src/skf-campaign/references/health-check.md +7 -16
  202. package/src/skf-campaign/references/step-01-setup.md +46 -84
  203. package/src/skf-campaign/references/step-02-strategy.md +31 -30
  204. package/src/skf-campaign/references/step-03-pins.md +26 -18
  205. package/src/skf-campaign/references/step-04-provenance.md +24 -23
  206. package/src/skf-campaign/references/step-05-skill-loop.md +67 -48
  207. package/src/skf-campaign/references/step-06-batch.md +41 -34
  208. package/src/skf-campaign/references/step-07-capstone.md +40 -25
  209. package/src/skf-campaign/references/step-08-verify.md +28 -29
  210. package/src/skf-campaign/references/step-09-refine.md +29 -30
  211. package/src/skf-campaign/references/step-10-export.md +48 -36
  212. package/src/skf-campaign/references/step-11-maintenance.md +31 -34
  213. package/src/skf-campaign/references/step-resume.md +37 -68
  214. package/src/skf-campaign/scripts/campaign-deps.py +57 -18
  215. package/src/skf-campaign/scripts/campaign-parse-manifest.py +361 -54
  216. package/src/skf-campaign/scripts/campaign-provenance.py +96 -53
  217. package/src/skf-campaign/scripts/campaign-quality-gate.py +592 -0
  218. package/src/skf-campaign/scripts/campaign-render-batch.py +257 -49
  219. package/src/skf-campaign/scripts/campaign-render-kickoff.py +343 -50
  220. package/src/skf-campaign/scripts/campaign-report.py +204 -37
  221. package/src/skf-campaign/scripts/campaign-state.py +1128 -0
  222. package/src/skf-campaign/scripts/campaign-status.py +10 -74
  223. package/src/skf-campaign/scripts/campaign-validate-pins.py +30 -3
  224. package/src/skf-campaign/scripts/campaign-validate-state.py +34 -4
  225. package/src/skf-campaign/templates/campaign-brief-template.yaml +4 -5
  226. package/src/skf-campaign/templates/campaign-report-template.md +5 -1
  227. package/src/skf-campaign/templates/kickoff-template.md +0 -14
  228. package/src/skf-create-skill/SKILL.md +27 -20
  229. package/src/skf-create-skill/assets/compile-assembly-rules.md +6 -5
  230. package/src/skf-create-skill/assets/skill-sections.md +15 -5
  231. package/src/skf-create-skill/customize.toml +20 -8
  232. package/src/skf-create-skill/references/authoritative-files-protocol.md +41 -42
  233. package/src/skf-create-skill/references/batch-mode.md +81 -0
  234. package/src/skf-create-skill/references/ccc-index-check.md +27 -0
  235. package/src/skf-create-skill/references/compile.md +107 -29
  236. package/src/skf-create-skill/references/component-extraction.md +113 -91
  237. package/src/skf-create-skill/references/enrich.md +41 -23
  238. package/src/skf-create-skill/references/entry-points-by-hand.md +20 -0
  239. package/src/skf-create-skill/references/extract.md +200 -161
  240. package/src/skf-create-skill/references/extraction-patterns-by-hand.md +141 -0
  241. package/src/skf-create-skill/references/extraction-patterns-tracing.md +2 -2
  242. package/src/skf-create-skill/references/extraction-patterns.md +584 -196
  243. package/src/skf-create-skill/references/generate-artifacts.md +145 -93
  244. package/src/skf-create-skill/references/health-check.md +1 -1
  245. package/src/skf-create-skill/references/load-brief.md +53 -36
  246. package/src/skf-create-skill/references/relabel-rule.md +12 -0
  247. package/src/skf-create-skill/references/report.md +28 -59
  248. package/src/skf-create-skill/references/source-resolution-protocols.md +49 -155
  249. package/src/skf-create-skill/references/step-auto-shard.md +20 -93
  250. package/src/skf-create-skill/references/step-doc-rot.md +44 -60
  251. package/src/skf-create-skill/references/step-doc-sources.md +28 -19
  252. package/src/skf-create-skill/references/sub/ccc-discover.md +18 -7
  253. package/src/skf-create-skill/references/sub/fetch-docs.md +106 -59
  254. package/src/skf-create-skill/references/sub/fetch-temporal.md +53 -166
  255. package/src/skf-create-skill/references/tier-degradation-rules.md +18 -9
  256. package/src/skf-create-skill/references/validate.md +173 -99
  257. package/src/skf-create-skill/scripts/scan-doc-rot.py +232 -99
  258. package/src/skf-create-stack-skill/SKILL.md +29 -56
  259. package/src/skf-create-stack-skill/assets/metadata-contract.md +51 -0
  260. package/src/skf-create-stack-skill/assets/provenance-map-schema.md +15 -15
  261. package/src/skf-create-stack-skill/assets/stack-skill-template.md +23 -57
  262. package/src/skf-create-stack-skill/customize.toml +23 -12
  263. package/src/skf-create-stack-skill/references/compile-stack.md +57 -66
  264. package/src/skf-create-stack-skill/references/compose-mode-rules.md +24 -44
  265. package/src/skf-create-stack-skill/references/detect-integrations.md +92 -95
  266. package/src/skf-create-stack-skill/references/detect-manifests.md +46 -71
  267. package/src/skf-create-stack-skill/references/generate-output.md +138 -128
  268. package/src/skf-create-stack-skill/references/init.md +90 -32
  269. package/src/skf-create-stack-skill/references/integration-patterns.md +1 -17
  270. package/src/skf-create-stack-skill/references/invocation-contract.md +34 -0
  271. package/src/skf-create-stack-skill/references/manifest-patterns.md +32 -20
  272. package/src/skf-create-stack-skill/references/parallel-extract.md +112 -38
  273. package/src/skf-create-stack-skill/references/rank-and-confirm.md +57 -75
  274. package/src/skf-create-stack-skill/references/report.md +39 -33
  275. package/src/skf-create-stack-skill/references/validate.md +20 -39
  276. package/src/skf-drop-skill/SKILL.md +28 -51
  277. package/src/skf-drop-skill/customize.toml +44 -30
  278. package/src/skf-drop-skill/references/execute.md +79 -146
  279. package/src/skf-drop-skill/references/invocation-contract.md +64 -0
  280. package/src/skf-drop-skill/references/report.md +46 -30
  281. package/src/skf-drop-skill/references/select.md +118 -124
  282. package/src/skf-drop-skill/scripts/dir-sizes.py +54 -26
  283. package/src/skf-drop-skill/scripts/drop-roster.py +322 -0
  284. package/src/skf-export-skill/SKILL.md +40 -62
  285. package/src/skf-export-skill/assets/managed-section-format.md +14 -50
  286. package/src/skf-export-skill/assets/snippet-format.md +3 -1
  287. package/src/skf-export-skill/customize.toml +42 -13
  288. package/src/skf-export-skill/references/generate-snippet.md +54 -46
  289. package/src/skf-export-skill/references/health-check.md +2 -0
  290. package/src/skf-export-skill/references/invocation-contract.md +15 -0
  291. package/src/skf-export-skill/references/load-skill.md +88 -62
  292. package/src/skf-export-skill/references/manifest-rebuild.md +9 -10
  293. package/src/skf-export-skill/references/multi-skill-mode.md +4 -4
  294. package/src/skf-export-skill/references/orphan-context-detection.md +13 -5
  295. package/src/skf-export-skill/references/orphan-row-detection.md +31 -22
  296. package/src/skf-export-skill/references/package.md +15 -73
  297. package/src/skf-export-skill/references/preflight-snippet-root-probe.md +51 -70
  298. package/src/skf-export-skill/references/result-envelope.md +31 -16
  299. package/src/skf-export-skill/references/summary.md +41 -17
  300. package/src/skf-export-skill/references/token-report.md +4 -12
  301. package/src/skf-export-skill/references/update-context.md +118 -237
  302. package/src/skf-forger/SKILL.md +61 -37
  303. package/src/skf-forger/bmad-skill-manifest.yaml +4 -1
  304. package/src/skf-forger/customize.toml +43 -0
  305. package/src/skf-forger/references/pipeline-mode.md +73 -18
  306. package/src/skf-forger/scripts/forge-status.py +299 -0
  307. package/src/skf-forger/scripts/parse-pipeline.py +322 -54
  308. package/src/skf-forger/scripts/pipeline-gate.py +428 -0
  309. package/src/skf-forger/scripts/pipeline-journal.py +1052 -0
  310. package/src/skf-quick-skill/SKILL.md +54 -53
  311. package/src/skf-quick-skill/assets/skill-template.md +4 -2
  312. package/src/skf-quick-skill/customize.toml +51 -20
  313. package/src/skf-quick-skill/references/batch-mode.md +74 -21
  314. package/src/skf-quick-skill/references/compile.md +30 -31
  315. package/src/skf-quick-skill/references/ecosystem-check.md +7 -57
  316. package/src/skf-quick-skill/references/finalize.md +69 -18
  317. package/src/skf-quick-skill/references/halt-contract.md +41 -29
  318. package/src/skf-quick-skill/references/health-check.md +5 -3
  319. package/src/skf-quick-skill/references/quick-extract.md +114 -45
  320. package/src/skf-quick-skill/references/registry-resolution.md +9 -64
  321. package/src/skf-quick-skill/references/resolve-target.md +116 -66
  322. package/src/skf-quick-skill/references/write-and-validate.md +79 -40
  323. package/src/skf-refine-architecture/SKILL.md +43 -53
  324. package/src/skf-refine-architecture/customize.toml +49 -20
  325. package/src/skf-refine-architecture/references/compile.md +97 -54
  326. package/src/skf-refine-architecture/references/exit-codes.md +30 -0
  327. package/src/skf-refine-architecture/references/finding-storage.md +21 -0
  328. package/src/skf-refine-architecture/references/gap-analysis.md +101 -38
  329. package/src/skf-refine-architecture/references/improvements.md +14 -20
  330. package/src/skf-refine-architecture/references/init.md +98 -57
  331. package/src/skf-refine-architecture/references/issue-detection.md +32 -39
  332. package/src/skf-refine-architecture/references/refinement-rules.md +37 -48
  333. package/src/skf-refine-architecture/references/report.md +65 -54
  334. package/src/skf-refine-architecture/scripts/skf-check-preservation.py +1619 -0
  335. package/src/skf-rename-skill/SKILL.md +19 -54
  336. package/src/skf-rename-skill/customize.toml +32 -26
  337. package/src/skf-rename-skill/references/execute.md +230 -184
  338. package/src/skf-rename-skill/references/exit-codes.md +7 -7
  339. package/src/skf-rename-skill/references/health-check.md +1 -7
  340. package/src/skf-rename-skill/references/invocation-contract.md +25 -0
  341. package/src/skf-rename-skill/references/report.md +63 -52
  342. package/src/skf-rename-skill/references/select.md +197 -115
  343. package/src/skf-rename-skill/scripts/skf-validate-rename-name.py +161 -21
  344. package/src/skf-setup/SKILL.md +26 -26
  345. package/src/skf-setup/customize.toml +14 -10
  346. package/src/skf-setup/references/auto-index.md +50 -63
  347. package/src/skf-setup/references/ccc-index.md +29 -90
  348. package/src/skf-setup/references/detect-and-tier.md +58 -67
  349. package/src/skf-setup/references/health-check.md +2 -0
  350. package/src/skf-setup/references/invocation-contract.md +14 -0
  351. package/src/skf-setup/references/report.md +43 -166
  352. package/src/skf-setup/references/tier-rules.md +5 -5
  353. package/src/skf-setup/references/write-config.md +34 -57
  354. package/src/skf-test-skill/SKILL.md +17 -57
  355. package/src/skf-test-skill/assets/output-section-formats.md +33 -34
  356. package/src/skf-test-skill/customize.toml +27 -13
  357. package/src/skf-test-skill/references/coherence-check.md +134 -62
  358. package/src/skf-test-skill/references/coverage-check-tiers.md +35 -0
  359. package/src/skf-test-skill/references/coverage-check.md +217 -254
  360. package/src/skf-test-skill/references/detect-mode.md +5 -5
  361. package/src/skf-test-skill/references/external-validators.md +94 -82
  362. package/src/skf-test-skill/references/health-check.md +6 -7
  363. package/src/skf-test-skill/references/init.md +163 -88
  364. package/src/skf-test-skill/references/invocation-contract.md +66 -0
  365. package/src/skf-test-skill/references/migration-section-rules.md +5 -2
  366. package/src/skf-test-skill/references/report.md +162 -142
  367. package/src/skf-test-skill/references/score.md +80 -107
  368. package/src/skf-test-skill/references/scoring-rules.md +41 -155
  369. package/src/skf-test-skill/references/source-access-protocol.md +19 -92
  370. package/src/skf-test-skill/references/step-hard-gate.md +51 -33
  371. package/src/skf-test-skill/scripts/aggregate-coherence.py +218 -30
  372. package/src/skf-test-skill/scripts/build-result-context.py +287 -0
  373. package/src/skf-test-skill/scripts/check-metadata-coherence.py +37 -4
  374. package/src/skf-test-skill/scripts/combine-external-scores.py +23 -6
  375. package/src/skf-test-skill/scripts/compute-score.py +223 -45
  376. package/src/skf-test-skill/scripts/gap-ledger.py +1381 -0
  377. package/src/skf-test-skill/scripts/hard-gate.py +203 -0
  378. package/src/skf-test-skill/scripts/load-coverage-inputs.py +760 -0
  379. package/src/skf-test-skill/scripts/locate-export-segments.py +835 -0
  380. package/src/skf-test-skill/scripts/reconcile-coverage.py +273 -79
  381. package/src/skf-test-skill/scripts/score-signatures.py +459 -0
  382. package/src/skf-test-skill/scripts/stage-helper-payload.py +148 -0
  383. package/src/skf-test-skill/scripts/validate-inventory.py +311 -16
  384. package/src/skf-test-skill/scripts/verify-declared-numerator.py +127 -52
  385. package/src/skf-test-skill/templates/test-report-template.md +21 -15
  386. package/src/skf-update-skill/SKILL.md +38 -25
  387. package/src/skf-update-skill/customize.toml +27 -12
  388. package/src/skf-update-skill/references/detect-changes.md +233 -222
  389. package/src/skf-update-skill/references/gap-driven.md +336 -0
  390. package/src/skf-update-skill/references/health-check.md +31 -5
  391. package/src/skf-update-skill/references/init.md +250 -84
  392. package/src/skf-update-skill/references/invocation-contract.md +12 -0
  393. package/src/skf-update-skill/references/manual-section-rules.md +6 -23
  394. package/src/skf-update-skill/references/merge.md +180 -47
  395. package/src/skf-update-skill/references/re-extract.md +53 -262
  396. package/src/skf-update-skill/references/report.md +100 -35
  397. package/src/skf-update-skill/references/write.md +331 -149
  398. package/src/skf-update-skill/scripts/skf-new-file-diff.py +29 -7
  399. package/src/skf-verify-stack/SKILL.md +23 -42
  400. package/src/skf-verify-stack/assets/feasibility-report-template.md +11 -5
  401. package/src/skf-verify-stack/customize.toml +55 -22
  402. package/src/skf-verify-stack/references/coverage-patterns.md +17 -8
  403. package/src/skf-verify-stack/references/coverage.md +67 -64
  404. package/src/skf-verify-stack/references/exit-codes.md +21 -8
  405. package/src/skf-verify-stack/references/init.md +107 -62
  406. package/src/skf-verify-stack/references/integration-verification-rules.md +12 -13
  407. package/src/skf-verify-stack/references/integrations.md +106 -65
  408. package/src/skf-verify-stack/references/report.md +59 -42
  409. package/src/skf-verify-stack/references/requirements.md +32 -9
  410. package/src/skf-verify-stack/references/synthesize.md +53 -39
  411. package/src/skf-verify-stack/scripts/skf-coverage-tally.py +398 -52
  412. package/src/skf-verify-stack/scripts/skf-previous-report.py +330 -0
  413. package/src/skf-verify-stack/scripts/skf-report-delta.py +453 -49
  414. package/src/skf-verify-stack/scripts/skf-verdict-rollup.py +240 -27
  415. package/tools/cli/commands/install.js +11 -4
  416. package/tools/cli/commands/status.js +15 -3
  417. package/tools/cli/commands/update.js +11 -4
  418. package/tools/cli/lib/tool-check.js +320 -0
  419. package/tools/cli/lib/version-check.js +22 -9
  420. package/tools/cli/skf-cli.js +4 -1
  421. package/.gitattributes +0 -16
  422. package/.nvmrc +0 -1
  423. package/docs/_internal/RELEASING.md +0 -679
  424. package/release-audits/v1.0.0-launch-audit.md +0 -728
  425. package/src/skf-audit-skill/references/step-doc-drift.md +0 -177
  426. package/src/skf-brief-skill/references/headless-source-authority-detection.md +0 -26
  427. package/src/skf-campaign/manifest.yaml +0 -15
  428. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +0 -106
  429. package/src/skf-create-skill/references/ecosystem-check.md +0 -74
  430. package/src/skf-drop-skill/references/headless-contract.md +0 -18
  431. package/src/skf-update-skill/references/merge-conflict-rules.md +0 -15
  432. package/src/skf-update-skill/references/remote-source-resolution.md +0 -98
  433. package/src/skf-update-skill/references/validate.md +0 -124
  434. package/tools/validate-docs-drift.js +0 -233
  435. package/tools/validate-docs-links.js +0 -665
@@ -0,0 +1,201 @@
1
+ # The external tools SKF uses, with the oldest version SKF supports
2
+ # (minimum) and the versions SKF has run on (tested). This is the one list:
3
+ # the prerequisites table in docs/getting-started.md is generated from it,
4
+ # and the installer copies it to _bmad/skf/shared/ with the rest of
5
+ # src/shared/, so the CLI and the Python helpers can read it too.
6
+ #
7
+ # How the numbers are set:
8
+ # - `tested` lists versions SKF has actually run on, and `basis` names the
9
+ # run: a CI pin, the CI runner, the install smoke test or a named release
10
+ # run. An empty list means no run is recorded yet.
11
+ # - `minimum` starts at a tested version, the only version SKF has evidence
12
+ # for. It starts lower only where the repository already sets a floor for
13
+ # a stated reason (Node 22, Python 3.11, git 2.15), and `basis` says which.
14
+ # - A minimum comes down only after a run on an older version passes. It is
15
+ # never guessed lower.
16
+ # - `minimum: null` means SKF has no floor it can check yet. A null minimum
17
+ # never warns. Node and Python always have one, since --check compares
18
+ # their copies with it.
19
+ # - A tier tool's minimum also decides its tier: skf-setup counts a tier tool
20
+ # below its minimum as unavailable. So a first minimum for gh, qmd or ccc
21
+ # waits for a recorded run, and stays at or below the versions package
22
+ # managers ship, or their users drop out of Deep or Forge+. Other tools
23
+ # below their minimum only warn.
24
+ # - Raising a minimum, or giving a tool its first one, is a breaking change:
25
+ # the release check (tools/covered-surfaces.js) asks for a major release
26
+ # and a breaking change fragment that names the tool. Lowering or removing
27
+ # one is additive, and changing `tested` is neither.
28
+ #
29
+ # To change a version, edit this file and run
30
+ # `node tools/tool-requirements.js --write`, which regenerates the
31
+ # prerequisites table. `node tools/tool-requirements.js --check` (run in CI)
32
+ # also compares the copies elsewhere in the repository: the minimums in the
33
+ # README, docs/ and CONTRIBUTING.md, `engines.node` in package.json, the
34
+ # workflows' node-version and python-version, .nvmrc, the ast-grep-cli pin in
35
+ # package.json `test:python`, and the README Acknowledgements rows.
36
+ #
37
+ # Keys of each tool (keyed like skf-detect-tools.py's tool keys where it
38
+ # probes the tool):
39
+ # name the name the docs use
40
+ # summary what the tool is, in a few words (optional)
41
+ # kind runtime (SKF needs it at every tier), tier (a capability
42
+ # tier needs it) or optional (a workflow uses it when present)
43
+ # tiers the capability tiers that need it (none for optional)
44
+ # workflows the workflows that run it, as skf-<name> folder names
45
+ # without the prefix, or [all]
46
+ # used_for what SKF uses it for, as the prerequisites table says it
47
+ # minimum the oldest supported version as a string, or null
48
+ # tested the versions SKF has run on, as strings
49
+ # basis where minimum and tested come from
50
+ # version_command the command that prints the installed version
51
+ # install_url where to install it from
52
+ # upgrade how to upgrade it
53
+ # acknowledged_as its row in the README Acknowledgements table (required
54
+ # for tier and optional tools)
55
+
56
+ schema_version: 1
57
+ tools:
58
+ node:
59
+ name: Node.js
60
+ kind: runtime
61
+ tiers: [Quick, Forge, Forge+, Deep]
62
+ workflows: [all]
63
+ used_for: Installation, npx commands
64
+ minimum: "22"
65
+ tested: ["22", "24"]
66
+ basis: The minimum is package.json engines.node, which the install smoke test runs on Linux, Windows and macOS. CI runs the version in .nvmrc.
67
+ version_command: [node, --version]
68
+ install_url: https://nodejs.org
69
+ upgrade: Install the current LTS release from https://nodejs.org
70
+
71
+ python:
72
+ name: Python
73
+ kind: runtime
74
+ tiers: [Quick, Forge, Forge+, Deep]
75
+ workflows: [all]
76
+ used_for: Deterministic scoring, validation, and utility scripts. The minimum is what the helpers that read package manifests need (used by Quick Skill, Brief Skill, Analyze Source and Stack Skill)
77
+ minimum: "3.11"
78
+ tested: ["3.11", "3.12"]
79
+ basis: The minimum is set by the helpers that import tomllib, new in Python 3.11. The quality workflow runs the Python tests on 3.11 and the release workflow on 3.12.
80
+ version_command: [python3, --version]
81
+ install_url: https://www.python.org
82
+ upgrade: uv python install
83
+
84
+ uv:
85
+ name: uv
86
+ summary: Python package runner
87
+ kind: runtime
88
+ tiers: [Quick, Forge, Forge+, Deep]
89
+ workflows: [all]
90
+ used_for: Running Python scripts with automatic dependency management
91
+ minimum: null
92
+ tested: ["0.12.15", "0.12.23"]
93
+ basis: No minimum yet. CI installs the latest uv without pinning one, so each run takes that day's release. Quality & Validation run 37190025809 (2026-10-04, pull request 665, the tree of main b5150b08, the v3.0.0 release candidate) ran the Python tests through uv 0.12.23 on ubuntu-latest and windows-latest. Pull request 665's npm run quality on its branch head (issue 556 step 5b fix round 8, 2026-10-04, commit 4fecff22, the same tree) ran on uv 0.12.15 on Linux.
94
+ version_command: [uv, --version]
95
+ install_url: https://docs.astral.sh/uv/getting-started/installation/
96
+ upgrade: uv self update
97
+
98
+ git:
99
+ name: git
100
+ kind: runtime
101
+ tiers: [Quick, Forge, Forge+, Deep]
102
+ workflows: [analyze-source, audit-skill, brief-skill, create-skill, setup, test-skill, update-skill]
103
+ used_for: Reading remote sources, and checking that a local source is still at the commit a skill was built from
104
+ minimum: "2.15"
105
+ tested: ["2.47.3", "2.55.0"]
106
+ basis: The minimum is the one skf-source-tree.py states. No run is recorded on it. Quality & Validation run 37190025809 (2026-10-04, pull request 665, the tree of main b5150b08, the v3.0.0 release candidate) ran the Python tests, which drive real git, on the runners' git 2.55.0 (2.55.0.windows.5 on windows-latest). Pull request 665's npm run quality on its branch head, and its verification of skf-skill-inventory.py derive-name --probe-git against live remotes (issue 556 step 5b fix round 8, 2026-10-04, commit 4fecff22, the same tree), ran on git 2.47.3 on Linux.
107
+ version_command: [git, --version]
108
+ install_url: https://git-scm.com/downloads
109
+ upgrade: Install the latest release from https://git-scm.com/downloads
110
+
111
+ gh_cli:
112
+ name: gh
113
+ summary: GitHub CLI
114
+ kind: tier
115
+ tiers: [Deep]
116
+ workflows: [analyze-source, audit-skill, brief-skill, campaign, create-skill, forger, quick-skill, test-skill]
117
+ used_for: Required for the Deep tier, for Campaign, and for `forge-auto --pin`. Optional otherwise, where it makes reading GitHub sources easier
118
+ minimum: null
119
+ tested: ["2.102.0"]
120
+ basis: No minimum yet. The tests stub gh. On 2026-10-04 the v3.0.0 pre-release tool check (recorded in the pull request that added these versions) ran every helper of main b5150b08 (the release candidate) that calls gh, the way the step files call them, against honojs/hono at v4.6.0 on gh 2.102.0, and each exited 0. They were skf-github-probe.py (repo, tags, tree), skf-validate-pins.py, skf-fetch-temporal.py, skf-detect-docs.py, campaign-provenance.py and skf-github-fetch.py, whose gh fallback ran with raw.githubusercontent.com blocked. Setup's skf-detect-tools.py also read the version.
121
+ version_command: [gh, --version]
122
+ install_url: https://cli.github.com
123
+ upgrade: Install the latest release from https://cli.github.com
124
+ acknowledged_as: GitHub CLI
125
+
126
+ ast_grep:
127
+ name: ast-grep
128
+ summary: CLI tool for code structural search, lint, and rewriting
129
+ kind: tier
130
+ tiers: [Forge, Forge+, Deep]
131
+ workflows: [analyze-source, audit-skill, brief-skill, create-skill, create-stack-skill, test-skill, update-skill]
132
+ used_for: Forge, Forge+ and Deep tiers
133
+ minimum: "0.45.3"
134
+ tested: ["0.45.3"]
135
+ basis: The create-skill recipes are verified by test/test-skf-create-skill-recipes.py on the ast-grep-cli version package.json test:python pins. No older version has run them.
136
+ version_command: [ast-grep, --version]
137
+ install_url: https://ast-grep.github.io
138
+ upgrade: npm install -g @ast-grep/cli@latest
139
+ acknowledged_as: ast-grep
140
+
141
+ ccc:
142
+ name: ccc
143
+ summary: cocoindex-code semantic code search
144
+ kind: tier
145
+ tiers: [Forge+]
146
+ workflows: [analyze-source, audit-skill, brief-skill, create-skill, create-stack-skill, update-skill]
147
+ used_for: Forge+ tier, and the Deep tier when installed
148
+ minimum: null
149
+ tested: ["0.2.41"]
150
+ basis: No minimum yet. The tests stub ccc. On 2026-10-04 the v3.0.0 pre-release tool check (recorded in the pull request that added these versions) ran the ccc commands of main b5150b08 (the release candidate) on cocoindex-code 0.2.41. skf-detect-tools.py found ccc with a healthy daemon (Forge+), and skf-merge-ccc-exclusions.py in setup and clone mode (ccc init, ccc index and ccc status) and the create-skill and audit-skill ccc search commands ran on scratch projects. Earlier full workflow runs on 0.2.41 were /skf-setup on SKF 2.2.0 (issue 490, 2026-09-23), the workspace-clone and audit-skill runs of pull request 509 (2026-09-27), and the /skf-setup re-runs of pull request 517 (2026-09-28). Both pull requests are unreleased v3 development.
151
+ # ccc has no --version flag: the version is on the cocoindex-code line of
152
+ # `uv tool list` when ccc was installed with uv.
153
+ version_command: [uv, tool, list]
154
+ install_url: https://github.com/cocoindex-io/cocoindex-code
155
+ upgrade: uv tool upgrade cocoindex-code
156
+ acknowledged_as: cocoindex-code
157
+
158
+ qmd:
159
+ name: qmd
160
+ summary: local hybrid search engine for project files
161
+ kind: tier
162
+ tiers: [Deep]
163
+ workflows: [audit-skill, brief-skill, create-skill, create-stack-skill, update-skill]
164
+ used_for: Deep tier
165
+ minimum: null
166
+ tested: ["2.8.3"]
167
+ basis: No minimum yet. The tests stub qmd. On 2026-10-04 the v3.0.0 pre-release tool check (recorded in the pull request that added these versions) ran the qmd commands of main b5150b08 (the release candidate) on qmd 2.8.3 with an isolated index. It ran create-skill's qmd collection remove and add (first run and re-run) and qmd search, audit-skill's qmd ls and qmd search, and setup's qmd status and collection classifier. qmd embed and the vector searches did not run, because no embedding model was cached and the check downloaded none. Before that, qmd 2.8.3 ran in the Deep-tier create-skill runs of 2026-09-28 in bmad-module-ultracode-goal, which built four skills with qmd collection add, embed and search, on SKF main 8ce1db01, an unreleased build between v2.2.0 and v3.0.0.
168
+ version_command: [qmd, --version]
169
+ install_url: https://github.com/tobi/qmd
170
+ upgrade: bun install -g @tobilu/qmd@latest
171
+ acknowledged_as: QMD
172
+
173
+ tessl:
174
+ name: tessl
175
+ summary: Tessl CLI
176
+ kind: optional
177
+ tiers: []
178
+ workflows: [create-skill, test-skill]
179
+ used_for: Opt-in Tessl Review in Create Skill and Test Skill (`tessl_review_workspace` in preferences)
180
+ minimum: null
181
+ tested: ["0.111.0"]
182
+ basis: No minimum yet, since no older tessl has run Tessl Review. The tests stub tessl. Pull request 517 (unreleased v3 development, merged 2026-09-28 as 2b3b5113) records live create-skill and test-skill runs on tessl 0.111.0 in which Tessl Review returned a score. On 2026-10-04 the v3.0.0 pre-release tool check (recorded in the pull request that added these versions) ran `skf status` from main b5150b08 (the release candidate), which read tessl 0.111.0, and ran skf-tessl-review.py collect against it signed out, which starts no review.
183
+ version_command: [tessl, --version]
184
+ install_url: https://tessl.io
185
+ upgrade: tessl cli update
186
+ acknowledged_as: tessl
187
+
188
+ skill_check:
189
+ name: skill-check
190
+ summary: skill validator
191
+ kind: optional
192
+ tiers: []
193
+ workflows: [create-skill, create-stack-skill, quick-skill, test-skill, update-skill]
194
+ used_for: Spec validation, auto-fix and quality scoring. SKF runs it with npx, so it needs no install; without it, validation is done by hand
195
+ minimum: null
196
+ tested: ["1.2.0"]
197
+ basis: SKF runs it through npx at whatever version npx resolves, so there is no floor it can check. In the v3.0.0 pre-release tool check (recorded in the pull request that added these versions) on 2026-10-04, on main b5150b08 (the release candidate), npx resolved skill-check 1.2.0, npm's latest since 2026-02-21, and test-skill's check (`npx skill-check check <skill-dir> --format json --no-security-scan`) on a copy of an oh-my-skills skill returned every field SKF reads. No other version has a recorded run.
198
+ version_command: [skill-check, --version]
199
+ install_url: https://github.com/thedaviddias/skill-check
200
+ upgrade: npm install -g skill-check@latest
201
+ acknowledged_as: skill-check
@@ -7,12 +7,14 @@ description: Discover what to skill in a large repo and produce recommended skil
7
7
 
8
8
  ## Overview
9
9
 
10
- Analyzes a large repo or multi-service project to identify discrete skillable units, map exports and integration points, and produce recommended skill-brief.yaml files as the primary entry point for brownfield onboarding. The analysis must be thorough enough to produce actionable briefs, but scoped enough to avoid overwhelming the user with false positives. Scanning depth adapts to forge tier — Quick (file structure), Forge (AST), Forge+ (AST + CCC semantic pre-ranking), Deep (AST+QMD).
10
+ Analyzes a large repo or multi-service project to identify discrete skillable units, map exports and integration points, and produce recommended skill-brief.yaml files as the primary entry point for brownfield onboarding. The analysis must be thorough enough to produce actionable briefs, but scoped enough to avoid overwhelming the user with false positives. Exports come from the ast-grep recipe runner at every forge tier (read by eye where ast-grep is missing or the language has no recipe).
11
11
 
12
12
  ## Conventions
13
13
 
14
14
  - Bare paths (e.g. `references/<name>.md`) resolve from the skill root.
15
- - `references/` holds prompt content carved out of SKILL.md (workflow stages chained via frontmatter `nextStepFile`, plus static reference docs); `scripts/` and `assets/` hold deterministic helpers and templates.
15
+ - **Module-level path exception:** bare paths beginning with `knowledge/` or `shared/` resolve from the SKF module root (`{project-root}/_bmad/skf/` installed, `src/` in dev), not the skill root; e.g. `shared/health-check.md`, which the terminal step chains to.
16
+ - **Sibling skills:** a path that names another SKF skill's folder (`skf-<name>/...`) resolves from the SKF module root, and that skill must be installed with this one.
17
+ - `references/` holds prompt content carved out of SKILL.md (workflow stages chained via frontmatter `nextStepFile`, plus static reference docs); `assets/` holds the brief schema and `templates/` the analysis report skeleton.
16
18
  - `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives, if present).
17
19
  - `{project-root}`-prefixed paths resolve from the project working directory.
18
20
  - `{skill-name}` resolves to the skill directory's basename.
@@ -26,24 +28,26 @@ You are a source code analyst and decomposition architect collaborating with a d
26
28
  These rules apply to every step in this workflow:
27
29
 
28
30
  - Only load one step file at a time — never preload future steps
29
- - Always communicate in `{communication_language}` (the language for user-facing prose). Written artifact text — the per-unit recommendation `description` and `scope.notes` persisted into `skill-brief.yaml` — is in `{document_output_language}`; per-step rules call this out where it applies. The two values may be the same.
30
- - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
31
+ - Always communicate in `{communication_language}`; the text persisted into `skill-brief.yaml` (each recommendation's `description` and `scope.notes`) is written in `{document_output_language}`
32
+ - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action, and record each one in the run sink as the gate says
31
33
 
32
34
  ## Stages
33
35
 
34
36
  | # | Step | File | Auto-proceed | Condition |
35
37
  |---|------|------|--------------|-----------|
36
38
  | 1 | Initialize | references/init.md | Yes | Always |
37
- | 1a | Auto-Scope | references/step-auto-scope.md | Yes | `[auto]` mode only — bypasses steps 2–6; owns pin resolution, coexistence detection, and the docs-only short-circuit |
38
- | 1b | Continue (session resume) | references/continue.md | Yes | Always |
39
+ | 1a | Auto-Scope | references/step-auto-scope.md | Conditional (the coexistence gate) | `[auto]` mode only: bypasses steps 2–6; owns pin resolution, coexistence detection, and the docs-only short-circuit |
40
+ | 1b | Continue (session resume) | references/continue.md | Yes | An unfinished step-by-step report (`mode` not `'auto'`) of the same target and inputs, run again without `[auto]` (init section 1) |
39
41
  | 2 | Scan Project | references/scan-project.md | No (confirm) | Interactive mode only |
40
42
  | 3 | Identify Units | references/identify-units.md | No (confirm) | Interactive mode only |
41
- | 4 | Map & Detect | references/map-and-detect.md | Yes | Interactive mode only |
43
+ | 4 | Map & Detect | references/map-and-detect.md | No (confirm) | Interactive mode only |
42
44
  | 5 | Recommend | references/recommend.md | No (confirm) | Interactive mode only |
43
45
  | 6 | Generate Briefs | references/generate-briefs.md | No (confirm) | Interactive mode only |
44
46
  | 7 | Workflow Health Check | references/health-check.md | Yes | Always |
45
47
 
46
- **Auto mode path:** With `[auto]` present, init routes directly to step 1a. Step 1a may confirm N > 1 units (a monorepo splits into N briefs / N `brief_paths`, or merges to one), and routes docs-only targets to `references/auto-docs-only.md`.
48
+ **Auto mode path:** With `[auto]` present, init routes directly to step 1a, which loads a branch file only when its branch fires: `references/step-auto-scope-coexistence.md` (a skill already matches), `references/step-auto-scope-split.md` (a monorepo splits into N briefs) and `references/step-auto-scope-corpora.md` (a whole-language reference), and routes docs-only targets to `references/auto-docs-only.md`.
49
+
50
+ **[D] Discover Additional Source** (steps 4 and 5) loads `references/discover-additional-source.md`. Step 2 and [D] make each project path's scan root by `references/scan-root.md` (steps 3 and 4 make one again when a resumed session no longer finds it), and step 4 and [D] map each unit's exports by `references/map-unit-exports.md`.
47
51
 
48
52
  **Shape detection reference:** `references/step-shape-detect.md` — loaded by step 1a as a reference doc (not a chained step).
49
53
 
@@ -51,51 +55,52 @@ These rules apply to every step in this workflow:
51
55
 
52
56
  | Aspect | Detail |
53
57
  |--------|--------|
54
- | **Inputs** | project_path [required], scope_hint [optional]. `project_path` is a GitHub repo URL or a local filesystem path. In `[auto]` mode it may also be a documentation URL — step 1a classifies the URL type and routes docs-only targets (see Stages row 1a). |
55
- | **Headless inputs** | `--project-path <path>` (skip Step 1 project-path prompt; in `[auto]` mode also accepts documentation URLs for docs-only mode), `--scope-hint <text>` (skip Step 1 scope-hint prompt), `--intent-hint <text>` (pre-supply analysis intent; drives recommendation ranking in Step 5), `--pin <version>` (`[auto]` mode only — pin to a specific version tag or branch; accepts semver tags, git tags, and branch names; when absent, resolves to the latest release tag; interactive/headless runs use `--target-refs`/`--target-ref` instead) |
58
+ | **Inputs** | project_path [required], intent_hint, scope_hint, target_ref or target_refs [optional]. `project_path` is a repository URL or a local path, or in `[auto]` mode a documentation URL (routed docs-only). An interactive run reads them from the invocation and asks at most one opening question. |
59
+ | **Headless inputs** | `--project-path <path>` (comma-separated for several), `--scope-hint <text>` (folders or packages to focus on or skip, `[auto]` included), `--intent-hint <text>` (the goal: ranks the step 5 recommendations; an interactive run also defers the units outside it before step 4, restorable, a headless run never; `[auto]` keeps a merged repo's facets it names), `--target-ref <ref>` (a tag or branch for every project path, written into every brief; not `[auto]`, which pins with `--pin`), `--target-refs <path:ref,...>` (one ref per path, written into each unit's brief; not with `--target-ref`, and not `[auto]`), `--pin <version>` (`[auto]` only: a tag or branch; absent, the latest release tag; a step-by-step analysis an `[auto]` run falls back to keeps its pin) |
56
60
  | **Headless flag** | `--headless` / `-H` flips every confirm gate to auto-proceed |
57
61
  | **Auto flag** | `[auto]` bracket modifier — activates auto-scope mode (step 1a; see **Auto mode path** above). Pipelines pass this as `AN[auto]`. Requires `--project-path`. |
58
- | **Gates** | steps 2/3/5: Confirm Gate [C]; step 6: Confirm Gate [Y] (write briefs) — all skipped in auto mode |
59
- | **Outputs** | analysis-report.md, skill-brief.yaml files (one per recommended unit); final `SKF_ANALYZE_RESULT_JSON` line on stdout when `{headless_mode}` is true. In auto mode, the envelope includes `"mode":"auto"`. |
60
- | **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
61
- | **Exit codes** | See `references/headless-contract.md` |
62
+ | **Gates** | one per step: steps 2 to 4 [C] (step 4 also takes composite merges, default accept); step 5 [C] after the decisions (default: confirm every card, flag every stack skill candidate); step 6 [Y] (write briefs). Headless takes each default and records it in `headless_decisions`. Auto mode: only the step 1a coexistence gate (default [A]longside) |
63
+ | **Outputs** | analysis-report.md, skill-brief.yaml files (one per recommended unit) and the run's result files, written by every run that ends, zero confirmed units included; final `SKF_ANALYZE_RESULT_JSON` line on stdout when `{headless_mode}` is true. In auto mode, the envelope includes `"mode":"auto"`. |
64
+ | **Exit codes** | Envelope, emitter, result files, `halt_reason` enum and exit codes: `references/headless-contract.md` |
62
65
 
63
- ## Headless Result Contract
66
+ ## On Activation
64
67
 
65
- Headless/pipeline runs emit a single-line `SKF_ANALYZE_RESULT_JSON` envelope — on **stdout** for the terminal success path (step 6 or step 1a), on **stderr** with `status: "error"` for every HARD HALT — and exit with a stable code per failure class. The envelope shape, the `halt_reason` enum, and the exit-code table live in `references/headless-contract.md`; step files emit the concrete instance at each site.
68
+ 1. **Resolve the envelope helper.** `{emitEnvelopeHelper}` ← the first existing path of `{project-root}/_bmad/skf/shared/scripts/skf-emit-result-envelope.py` and `{project-root}/src/shared/scripts/skf-emit-result-envelope.py`. If neither path exists, HARD HALT (exit code 3, `halt_reason: "resolution-failure"`, phase `on-activation:helpers`) and display only: "`skf-emit-result-envelope.py` is missing. Nothing was changed. Re-install SKF." In headless mode every other HARD HALT prints its envelope on stderr through the emitter: with the first command below once step 5 has created `{run_dir}`, before that with the second, the payload on one line. `references/headless-contract.md` (Halt Envelope) gives the payload rules, and each step file restates them in its opening.
66
69
 
67
- ## On Activation
70
+ ```bash
71
+ uv run {emitEnvelopeHelper} emit-halt --workflow skf-analyze-source --run-dir "{run_dir}" --target stderr < "{run_dir}/halt.json"
72
+ uv run {emitEnvelopeHelper} emit-halt --workflow skf-analyze-source --target stderr <<'SKF_ANALYZE_HALT'
73
+ {"phase": "on-activation:config", "reason": "<the halt message>", "halt_reason": "input-missing", "mode": "interactive"}
74
+ SKF_ANALYZE_HALT
75
+ ```
68
76
 
69
- 1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
77
+ 2. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
70
78
  - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `forge_data_folder`, `skills_output_folder`, `sidecar_path`
71
- - If the config cannot be loaded, HARD HALT with exit code 2 (`input-missing`) per `references/headless-contract.md` — the workflow has no forge context to run against.
79
+ - If the config cannot be loaded, HARD HALT (exit code 2, `halt_reason: "input-missing"`, phase `on-activation:config`): "SKF cannot load `{project-root}/_bmad/skf/config.yaml`: the workflow has no forge context to run against. Run setup first." When `--headless` or `-H` was passed, print its envelope with the second command above.
72
80
 
73
- 2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
81
+ 3. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in `{sidecar_path}/preferences.yaml`. Default: false.
74
82
 
75
- 3. **Resolve workflow customization.** Run:
83
+ 4. **Resolve workflow customization.** Run:
76
84
 
77
85
  ```bash
78
- python3 {project-root}/_bmad/scripts/resolve_customization.py \
79
- --skill {skill-root} --key workflow
86
+ uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow
80
87
  ```
81
88
 
82
- The script merges the three customization layers per `bmad-customize`'s structural merge rules (scalars override, arrays append):
89
+ It merges the bundled `{skill-root}/customize.toml` with `{project-root}/_bmad/custom/skf-analyze-source.toml` (team overrides, committed) and `.user.toml` (personal overrides, gitignored). When it exits non-zero, prints no JSON or is missing, print one line, `[activation/warn] customization_resolver_unavailable: <reason>` (`<reason>`: its first stderr line, `not found` when the script is missing, `no JSON` when it printed none). If the resolver cannot run, read `{skill-root}/customize.toml` alone and use its bundled defaults: the `{project-root}/_bmad/custom/` overrides do not apply to this run. In that case keep the reason as `{customization_resolver_unavailable}` (unset when the resolver ran) for step 5 to record in the run sink.
83
90
 
84
- - `{skill-root}/customize.toml` — bundled defaults
85
- - `_bmad/custom/<skill-name>.toml` under `{project-root}` — team overrides (committed)
86
- - `_bmad/custom/<skill-name>.user.toml` under `{project-root}` — personal overrides (gitignored)
91
+ Then bind, so stage files use the variable with no conditional at the usage site:
87
92
 
88
- If the script fails or is missing, fall back to reading `{skill-root}/customize.toml` directly — the bundled defaults are an empty string for each path scalar.
93
+ - `{analysisReportTemplatePath}` ← `workflow.analysis_report_template_path` (the bundled `templates/analysis-report-template.md` when an override leaves it empty)
94
+ - `{onCompleteCommand}` ← `workflow.on_complete` (empty: no hook)
89
95
 
90
- Apply the path-scalar fallback now, so stage files reference the resolved variable with no conditional at the usage site. For each scalar, if the merged value is empty or absent, use the bundled default:
96
+ Run `workflow.activation_steps_prepend` now, and treat `workflow.persistent_facts` as standing context for the run (`file:`-prefixed entries load their file/glob contents as facts: the bundled default loads every `project-context.md` under `{project-root}`; an entry prefixed `!` drops each earlier entry it names and loads nothing itself, so an override's `"!file:{project-root}/**/project-context.md"` turns that default off).
91
97
 
92
- - `{unitDetectionHeuristicsPath}` ← `workflow.unit_detection_heuristics_path` if non-empty, else `references/unit-detection-heuristics.md`
93
- - `{briefSchemaPath}` ← `workflow.brief_schema_path` if non-empty, else `assets/skill-brief-schema.md`
94
- - `{analysisReportTemplatePath}` ← `workflow.analysis_report_template_path` if non-empty, else `templates/analysis-report-template.md`
95
- - `{onCompleteCommand}` ← `workflow.on_complete` if non-empty, else empty string (hook invocation skipped)
98
+ 5. **Create the run folder.** It holds what the run stages for its helpers (the tree listing, each brief's context, the subagents' unit records, the halt and result payloads) and the sink of its auto-decisions:
96
99
 
97
- Stash all four as workflow-context variables. A non-empty value lets an org swap in a house-style copy (or wire a pipeline hook) without forking the skill.
100
+ ```bash
101
+ mkdir -p "{project-root}/_bmad-output/.skf-run" && mktemp -d "{project-root}/_bmad-output/.skf-run/skf-analyze-source-XXXXXXXX"
102
+ ```
98
103
 
99
- Apply the array surfaces too: run `workflow.activation_steps_prepend` now, treat `workflow.persistent_facts` as standing context for the run (`file:`-prefixed entries load their file/glob contents as facts), then run `workflow.activation_steps_append` after activation.
104
+ Bind `{run_dir}` ← the path it prints. The step that ends the run deletes it once the envelope is out; a HARD HALT keeps it. If it cannot be created, HARD HALT (exit code 4, `halt_reason: "write-failed"`, phase `on-activation:run-folder`, path `{project-root}/_bmad-output/.skf-run`): "SKF cannot create its run folder under `{project-root}/_bmad-output/.skf-run/`: {the first stderr line}. Nothing was changed." Its envelope goes through the second command of step 1, its payload with `"customization_resolver_unavailable": "<reason>"` added when step 4 kept one. Once the folder exists and `{customization_resolver_unavailable}` is set, record the reason in the run sink: write `customization_resolver_unavailable: {customization_resolver_unavailable}` to `{run_dir}/resolver-warning.txt` with a file write, never `echo` (the reason can hold quotes or `$( )`), then run `uv run {emitEnvelopeHelper} record --run-dir "{run_dir}" --warning "$(cat "{run_dir}/resolver-warning.txt")"`.
100
105
 
101
- 4. Load, read the full file, and then execute `references/init.md` to begin the workflow.
106
+ 6. Run `workflow.activation_steps_append`, then load, read the full file, and execute `references/init.md` to begin the workflow.
@@ -32,6 +32,9 @@ Defines the output contract for skill-brief.yaml files generated by analyze-sour
32
32
  | `source_authority` | string | `official` / `community` / `internal` | Default `community`. Set to `official` only when the skill creator is the library maintainer. Forced to `community` when `source_type: "docs-only"`. |
33
33
  | `source_ref` | string | Git ref (tag/branch/HEAD) | Resolved git ref used for source access. Set automatically during tag resolution — do not set manually. |
34
34
  | `scope.tier_a_include` | array | Glob patterns (min 1, non-empty) | Optional narrower tier-A include list for a curated-subset skill — stratified monorepo packages, single-crate `specific-modules` scopes, and multi-entry exports-map packages. When present, `skf-test-skill` re-derives the coverage denominator from this list instead of the coarse `scope.include`. **It also exempts the brief from the denominator deflation guard**, so supply it only when it genuinely narrows the surface — never as an empty list, and never as a way to widen. See `skf-test-skill/references/source-access-protocol.md`. |
35
+ | `scope.registry_path` | string | Path from the source root (non-empty) | Optional, for `scope.type: "component-library"`. The component registry file. `skf-create-skill` step 3d reads it instead of detecting a registry, and writes it back, with a `demo-and-registry` amendment, when the user confirms a detected registry or gives its path. |
36
+ | `scope.ui_variants` | array | `{name, package?}` objects (`name` non-empty) | Optional, for `scope.type: "component-library"`. The design system variants, the first one primary. |
37
+ | `scope.demo_patterns` | array | Glob patterns (non-empty strings) | Optional, for `scope.type: "component-library"`. The demo and example files `skf-create-skill` step 3d leaves out. Step 3d reads them instead of detecting demo files, and writes them back, with a `demo-and-registry` amendment per glob, when the user confirms or adjusts the detected ones. |
35
38
 
36
39
  When `source_type: "docs-only"`:
37
40
  - `source_repo` becomes optional (set to doc site URL for reference)
@@ -41,16 +44,12 @@ When `source_type: "docs-only"`:
41
44
 
42
45
  ## Version Detection
43
46
 
44
- During brief generation, attempt to auto-detect the source version before defaulting to `"1.0.0"`. Check the first matching file in the source:
47
+ A brief's `detected_version` starts from the manifest scan: it is the `version` that `skf-scan-manifests.py` gives the unit's own manifest (a Cargo `version.workspace = true` already resolved from its workspace), passed to the brief writer as found, null when there is none. The writer keeps a full `X.Y.Z` semver version and falls back to `"1.0.0"` otherwise, with a warning. Look a version up by hand only in two cases, and pass what you find the same way:
45
48
 
46
- - **Python:** `pyproject.toml` `[project] version` (static) → if `dynamic = ["version"]`, check `__init__.py` for `__version__` → `_version.py` if exists → `setup.py` `version=` → `git describe --tags --abbrev=0`
47
- - **JavaScript/TypeScript:** root `package.json` (`"version"`) → if root has `"private": true` with a `"workspaces"` array or lacks a `"version"` field, fall back to a primary workspace package's `package.json` (e.g., `code/core/package.json`, or the first matching `packages/*/package.json`). For GitHub sources, prefer `gh api repos/{owner}/{repo}/releases/latest` → `tag_name` when a non-pre-release tag exists, over a default-branch pre-release. Treat a version containing `-alpha`, `-beta`, `-rc`, `-next`, or `-canary` as a pre-release.
48
- - **Rust:** `Cargo.toml` `[package] version` (static) → if `version = { workspace = true }`, resolve from workspace root `Cargo.toml` → `git describe --tags --abbrev=0`
49
- - **Go:** version tag from `go.mod` or `git describe --tags --abbrev=0`
49
+ - **A `version_dynamic` manifest** (Python, a version computed at build time): `__version__` in the package's `__init__.py` → `_version.py` if it exists → `setup.py` `version=` → `git describe --tags --abbrev=0`
50
+ - **A private workspace root that gives none** (JavaScript/TypeScript: the root `package.json` has `"private": true` with `"workspaces"`, or no `"version"`): the `version` the same scan gives a primary workspace package (e.g., `code/core/package.json`, or the first matching `packages/*/package.json`)
50
51
 
51
- If the source is a remote GitHub repo, use `gh api repos/{owner}/{repo}/contents/{file}` to read the version file. If the source is local, read the file directly.
52
-
53
- If detection succeeds, use the detected version. If it fails or returns a non-semver value, fall back to `"1.0.0"`.
52
+ Read those files in the scan root. Where it holds only the manifests (step-auto-scope's remote fetch), `git -C "{scan_root}" sparse-checkout add '/<the file>'` brings one in.
54
53
 
55
54
  The create-skill workflow (extract) also performs version reconciliation at extraction time — if the source version has changed since the brief was created, the extraction step warns and uses the source version.
56
55
 
@@ -1,8 +1,8 @@
1
1
  # DO NOT EDIT -- overwritten on every update.
2
2
  #
3
3
  # Workflow customization surface for skf-analyze-source.
4
- # Team overrides: _bmad/custom/skf-analyze-source.toml (under {project-root})
5
- # Personal overrides: _bmad/custom/skf-analyze-source.user.toml (under {project-root})
4
+ # Team overrides: {project-root}/_bmad/custom/skf-analyze-source.toml
5
+ # Personal overrides: {project-root}/_bmad/custom/skf-analyze-source.user.toml
6
6
 
7
7
  [workflow]
8
8
 
@@ -10,15 +10,17 @@
10
10
  # scalars: override wins • arrays (persistent_facts, activation_steps_*): append
11
11
  # arrays-of-tables with `code`/`id`: replace matching items, append new ones.
12
12
 
13
- # Steps to run before the standard activation (uv probe, config load).
14
- # Overrides append. Use for org-wide pre-flight checks (auth, network,
15
- # compliance) that must precede any source-analysis work.
13
+ # Steps to run right after the customization resolve (On Activation step 4).
14
+ # Config and preferences are already loaded by then, so a step here can read
15
+ # them but cannot run before them. Overrides append. Use for org-wide
16
+ # pre-flight checks (auth, network, compliance) that must precede any
17
+ # source-analysis work.
16
18
 
17
19
  activation_steps_prepend = []
18
20
 
19
- # Steps to run after activation but before the first stage executes.
20
- # Overrides append. Use for context loads or banner customization that
21
- # should run once activation completes successfully.
21
+ # Steps to run once activation is complete (the run folder exists), just
22
+ # before the first stage executes. Overrides append. Use for context loads
23
+ # or banner customization.
22
24
 
23
25
  activation_steps_append = []
24
26
 
@@ -26,32 +28,42 @@ activation_steps_append = []
26
28
  # (house style, naming conventions, scope guardrails).
27
29
  # Overrides append.
28
30
  #
29
- # Each entry is either:
31
+ # Each entry is one of:
30
32
  # - a literal sentence, e.g. "Recommended skills must align with our agent stack."
31
33
  # - a file reference prefixed with `file:`, e.g.
32
34
  # "file:{project-root}/docs/analysis-style.md" (globs supported; file
33
35
  # contents are loaded and treated as facts).
36
+ # - an entry prefixed with `!`, which loads nothing and drops each earlier
37
+ # entry it names.
38
+ #
39
+ # The default below loads every project-context.md under {project-root}.
40
+ # Overrides append, so they cannot delete it; to stop loading those files,
41
+ # set in {project-root}/_bmad/custom/skf-analyze-source.toml:
42
+ # persistent_facts = ["!file:{project-root}/**/project-context.md"]
34
43
 
35
44
  persistent_facts = [
36
45
  "file:{project-root}/**/project-context.md",
37
46
  ]
38
47
 
39
- # --- Optional asset overrides ---
48
+ # --- Optional asset override ---
40
49
  #
41
- # Lift the canonical asset paths so orgs can substitute house-style copies
42
- # without forking the skill. Empty string = use the bundled default.
43
-
44
- unit_detection_heuristics_path = ""
45
- brief_schema_path = ""
46
- analysis_report_template_path = ""
47
-
48
- # Pipeline-integration hook invoked after the final result JSON is written
49
- # (see generate-briefs.md). The command is called as:
50
- # <on_complete> --result-path=<absolute_path_to_result_json>
51
- # Useful for Slack notifications, dashboard ingest, CI hooks, or chaining
52
- # into checkpoint-preview / a brief linter. Failures are logged to
53
- # workflow_warnings[] but never fail the workflow.
50
+ # The analysis report skeleton init copies to
51
+ # {forge_data_folder}/analyze-source-report-<project>.md: a path from the
52
+ # skill root, or a {project-root}/... path. A house-style copy keeps the
53
+ # frontmatter keys and the six `## ...` sections with their
54
+ # `[Appended by <step>]` placeholders, since each step replaces its own.
55
+
56
+ analysis_report_template_path = "templates/analysis-report-template.md"
57
+
58
+ # Pipeline hook: a shell command the run calls once the shared emitter has
59
+ # written the result files, at the end of every run that writes them
60
+ # (generate-briefs.md, step-auto-scope.md and auto-docs-only.md), as:
61
+ # <on_complete> --result-path=<forge_data_folder>/analyze-source-result-latest.json
62
+ # A run whose result file could not be written (result_path null in the
63
+ # envelope) and a HALT call no hook. Useful for Slack notifications,
64
+ # dashboard ingest, CI hooks, or chaining into a brief linter. A hook
65
+ # failure is displayed and never fails the run.
54
66
  #
55
- # Empty string = no-op (default).
67
+ # Empty string = no hook (default).
56
68
 
57
69
  on_complete = ""