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
package/docs/campaign.md CHANGED
@@ -3,54 +3,91 @@ title: Campaign Orchestration
3
3
  description: Multi-library skill production with dependency tracking, file-based state, and resume
4
4
  ---
5
5
 
6
- Campaign orchestration drives the production of 15+ coordinated skills through the full SKF pipeline (brief, generate, compile, test, export) in dependency order. It sits at the top of the pipeline ladder — it does not produce skill artifacts directly but sequences the workflows that do.
6
+ Campaign orchestration builds many related skills as one coordinated campaign, in dependency order. It is meant for projects with many libraries (15 or more), but one library is enough to start. Each Tier A library goes through the full SKF pipeline: brief, compile and test. Tier B libraries take a faster batch path. The finished skills are exported together at the end (see [Tier A vs Tier B](#tier-a-vs-tier-b)). The `skf-campaign` skill does not write skills itself. It runs the SKF workflows that do, in the right order.
7
7
 
8
- When your architecture declares many dependencies, running individual pipelines one at a time is tedious and error-prone. Campaign automates the entire loop: it reads the dependency graph, sorts skills topologically, drives each one through the pipeline, enforces quality gates, and tracks state to disk so you can resume after a context death or session break.
8
+ When your project depends on many libraries, building one skill at a time is slow and easy to get wrong. Campaign runs the whole loop for you. You list the libraries and what each one depends on, and Campaign orders them so every skill is built after the skills it depends on. It then drives each one through the pipeline, applies the quality gates, and saves its progress to disk as it goes. If the AI session runs out of context or you close it, you can resume where you left off.
9
+
10
+ ---
11
+
12
+ ## Before You Start
13
+
14
+ - Run `skf-setup` first, so SKF knows your tools and folders.
15
+ - Install the GitHub CLI (`gh`) and sign in. Pin Validation and Provenance use it to check every repository, and without it the campaign stops before any skill is built. Each library's repository must be on GitHub.
16
+ - An architecture document is optional. Only the Verification and Refinement stages use it (see [Stages](#stages)).
9
17
 
10
18
  ---
11
19
 
12
20
  ## Invocation
13
21
 
22
+ Ask Ferris to run `campaign`, or call the `skf-campaign` skill directly.
23
+
14
24
  ```
15
- @Ferris campaign — start a new campaign
16
- @Ferris campaign resume — resume from the last active skill
17
- @Ferris campaign resume --from=<skill> — resume from a specific skill
18
- @Ferris campaign status — read-only progress summary
25
+ @Ferris campaign # start a new campaign
26
+ @Ferris campaign resume # resume from the last active skill
27
+ @Ferris campaign resume --from=<skill> # resume from a specific skill
28
+ @Ferris campaign status # read-only progress summary
19
29
  ```
20
30
 
21
- - **`campaign`** starts a new campaign from stage 0 (Setup). If a `_campaign-state.yaml` already exists, Ferris offers a choice: resume the existing campaign or overwrite with a new one.
22
- - **`campaign resume`** picks up where the last session left off. State is validated on load — if the state file is corrupted, the `.bak` file is used as a fallback.
23
- - **`campaign status`** loads and validates the current state, prints the resume-detection summary plus the tail of the decision log, then stops — no backup, no mutation, no chaining. Use it to check on a long-running campaign without advancing it.
24
- - **`--from=<skill>`** overrides the resume point to the named skill, useful when you want to re-process a specific skill without restarting the entire campaign.
31
+ - **`campaign`** starts a new campaign from stage 0 (Setup). If a `_campaign-state.yaml` or its backup already exists, Ferris offers a choice: resume the existing campaign or overwrite with a new one.
32
+ - **`campaign resume`** picks up where the last session left off. Ferris checks the state file first. If it is damaged, Ferris restores the `.bak` backup copy and continues from that.
33
+ - **`campaign status`** checks the state file and shows the campaign name, the current stage, how many skills are done out of the total, and how many skills have each status. After that come the last lines of the decision log. Then it stops. It makes no backup, changes nothing and starts no stage, so you can check on a long campaign without moving it forward.
34
+ - **`--from=<skill>`** moves the resume point to the named skill. To rebuild a skill that already finished, choose `[R]e-run` when Ferris asks.
25
35
 
26
36
  ### Override flags
27
37
 
28
38
  | Flag | Effect |
29
39
  |------|--------|
30
- | `--headless` / `-H` | Auto-proceed every gate with its default action and emit structured output (see [Headless / Automation](#headless--automation)). |
31
- | `--brief <file>` | Seed targets from a `campaign-brief.yaml` instead of interactive prompts. Implies `--headless`. |
32
- | `--manifest <file>` | Seed targets from a plain-text `name,repo_url,tier,pin` manifest (one per line; trailing `;dep1,dep2` for `depends_on`). Implies `--headless`. |
40
+ | `--headless` / `-H` | Answer every question with its default and print machine-readable progress and results (see [Headless / Automation](#headless--automation)). |
41
+ | `--brief <file>` | Seed targets from a `campaign-brief.yaml` instead of interactive prompts. Implies `--headless`: a seeded run is an unattended (CI) run that takes every default. To review the plan and the export, give the same file at the Setup question instead, which stays interactive. |
42
+ | `--manifest <file>` | Seed targets from a plain-text `name,repo_url,tier,pin` manifest (one per line; trailing `;dep1,dep2` for `depends_on`). Implies `--headless`, as `--brief` does, for the same reason. |
33
43
  | `--from=<skill>` | Resume override (see above). |
34
44
 
45
+ ### What Setup Asks For
46
+
47
+ An interactive Setup opens with one question: give the targets in whatever form you have them, such as a manifest or `campaign-brief.yaml` path, a pasted list or repository URLs. Add a campaign name, and the path to a `_campaign-directive.md` file or to your architecture document, if you have them.
48
+
49
+ Setup then drafts the campaign and shows it once for you to correct: the campaign name (your project name unless you gave one), the directive and architecture paths, and one table of the targets with these columns:
50
+
51
+ - `name`: the skill name
52
+ - `repo_url`: the GitHub repository, as a URL, an SSH URL or `owner/repo`. Setup writes it as `https://github.com/<owner>/<repo>` and rejects another host or a path inside a repository
53
+ - `tier`: `A` (full pipeline) or `B` (quick batch), see [Tier A vs Tier B](#tier-a-vs-tier-b). `A` unless you say otherwise
54
+ - `pin`: empty for the latest release (the default). A Tier A pin must be a full `X.Y.Z` version (a `v` prefix is allowed), because brief-skill builds a Tier A skill from a release version only; a Tier B pin may also be a branch
55
+ - `depends_on`: the other skills in this campaign that it depends on, none by default
56
+
57
+ After your corrections, Setup asks only about what is still missing or ambiguous, such as a target with no repository URL or a dependency that names no target, all in one question.
58
+
59
+ To skip these questions, pass the list as a manifest file with `--manifest`:
60
+
61
+ ```
62
+ # name,repo_url,tier,pin;depends_on
63
+ core-lib,https://github.com/acme/core-lib,A,
64
+ web-sdk,https://github.com/acme/web-sdk,A,2.1.0;core-lib
65
+ cli-helpers,https://github.com/acme/cli-helpers,B
66
+ ```
67
+
68
+ Setup checks every target the same way, whether it comes from a manifest, a `--brief` file or a pasted list. It rejects a malformed line or target, a `repo_url` that is not a GitHub repository, a name that is not a skill name (lower-case letters, digits and hyphens, at most 64 characters), a Tier A pin that is not an `X.Y.Z` version, and a duplicate name. A headless run then stops with exit code 2 and lists each bad line or target with what is wrong with it, and an interactive Setup shows them and asks you to correct those targets. It never runs with only part of the list.
69
+
35
70
  ---
36
71
 
37
72
  ## Stages
38
73
 
39
- Campaign runs through 11 stages (0–10). All stages auto-proceed except Export, which requires explicit approval before writing skills to disk.
40
-
41
- | Stage | Name | Description | Auto-proceed |
42
- |-------|------|-------------|--------------|
43
- | 0 | Setup | Initialize campaign state, detect existing skills, and configure output paths | Yes |
44
- | 1 | Strategy | Generate the campaign brief from architecture and dependency analysis | Yes |
45
- | 2 | Pin Validation | Validate version pins for all declared dependencies | Yes |
46
- | 3 | Provenance | Establish provenance records for each target library | Yes |
47
- | 4 | Skill Loop | Drive each Tier A skill through its forge pipeline (AN → BS → CS → TS) in dependency order — export is deferred to the gated Export stage | Yes |
48
- | 5 | Tier B Batch | Process Tier B skills (lower-priority or transitive dependencies) in batch mode | Yes |
49
- | 6 | Capstone | Generate stack skill(s) that integrate individual skills into a cohesive project context | Yes |
50
- | 7 | Verification | Run verification passes across all produced skills for cross-skill consistency | Yes |
51
- | 8 | Refinement | Address gaps found during verification — re-run pipelines for skills that need improvement | Yes |
52
- | 9 | Export | Write all verified skills to disk and update context files — **requires user approval** | No |
53
- | 10 | Maintenance | Generate the campaign report and clean up temporary state | Yes |
74
+ Campaign runs through 11 stages, numbered 0 to 10. Most run on their own. Setup asks for your campaign details, unless you pass `--brief` or `--manifest`. Two stages always stop for your answer: Strategy shows you the plan before any skill is built, and Export asks before it writes anything. The Skill Loop, Verification and Refinement ask only when they need a decision. In headless mode, every question takes its default answer.
75
+
76
+ | Stage | Name | What happens | Waits for you? |
77
+ |-------|------|--------------|----------------|
78
+ | 0 | Setup | Asks for the campaign name and the libraries to skill, writes `_campaign-state.yaml`, and generates `campaign-brief.yaml` | Yes, for its questions (not with `--brief` or `--manifest`) |
79
+ | 1 | Strategy | Works out the build order so each skill comes after the skills it depends on, stops on a circular or unknown dependency, and shows you the plan | Yes: `[P]roceed` or `[C]ancel` |
80
+ | 2 | Pin Validation | Checks every version pin against the repository's real releases and branches, and fills an empty pin with the latest release | No |
81
+ | 3 | Provenance | Checks that every repository is reachable and records the exact commit each skill is built from | No |
82
+ | 4 | Skill Loop | Builds each Tier A skill in order through brief (BS), compile (CS) and test (TS). Export waits for stage 9 | Only when a skill's dependencies have not completed |
83
+ | 5 | Tier B Batch | Builds every Tier B skill in one Quick Skill batch run (`skf-quick-skill --batch`) | No |
84
+ | 6 | Capstone | Composes one stack skill from the completed skills that clear the quality gate, using `skf-create-stack-skill` in compose mode | No |
85
+ | 7 | Verification | Runs `skf-verify-stack` against your architecture document and records the overall verdict and coverage it reports | Only to ask for a missing architecture document |
86
+ | 8 | Refinement | Runs `skf-refine-architecture`, which writes a refined copy of your architecture document based on the skills | Only to ask for a missing architecture document |
87
+ | 9 | Export | Lists each completed skill with its quality-gate verdict, names the ones the gate leaves out and, once you approve, runs `skf-export-skill` on each `pass` and `fallback` skill to package it and update your context files | Yes: `[E]xport all` or `[C]ancel` |
88
+ | 10 | Maintenance | Writes `campaign-report.md`, runs your `on_complete` hook if you set one, then runs the end-of-workflow health check | No |
89
+
90
+ Verification and Refinement use the architecture document path you gave at Setup. Without one, they look for `docs/architecture.md` and then `_bmad-output/planning-artifacts/architecture.md`. A headless run with no architecture document skips both stages. If either stage fails, the failure is logged and the campaign carries on.
54
91
 
55
92
  ---
56
93
 
@@ -58,35 +95,49 @@ Campaign runs through 11 stages (0–10). All stages auto-proceed except Export,
58
95
 
59
96
  ### campaign-brief.yaml
60
97
 
61
- A machine-generated brief that captures the full scope of the campaign: which libraries to skill, their version pins, dependency relationships, and quality targets. Created during the Strategy stage from your architecture document and dependency declarations.
98
+ A machine-readable summary of the campaign, written during Setup by the same helper call that writes `_campaign-state.yaml`, from the targets Setup checked (what you enter, or `--brief` or `--manifest`). It holds the campaign name; each library's repository URL, tier, version pin and dependencies, and any language or scope hint its source gave; the quality gate; the architecture document path; and your notes. Later stages read the repository URLs from it, and a fresh session uses it to pick the campaign back up.
62
99
 
63
100
  ### _campaign-state.yaml
64
101
 
65
- The single source of truth for campaign progress. Every state mutation follows a read-backup-modify-write pattern — the current state is backed up before each write, so a crash during write never loses more than one operation. All progress tracking lives here, not in conversation context.
102
+ The single source of truth for campaign progress. Every write goes through one helper, `campaign-state.py`, which validates the state before and after the change, copies the valid state it read to `_campaign-state.yaml.bak` (never an invalid one), and writes the new state atomically, through a temporary file renamed over the old one, so a crash leaves the old state or the new one, never half of one. It takes every timestamp from the clock, in UTC. All progress lives in this file, not in the conversation.
66
103
 
67
104
  ### _campaign-directive.md
68
105
 
69
- A standing directive document that carries cross-cutting instructions for the campaign. See the [campaign directive spec](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-campaign/references/campaign-directive-spec.md) for the full specification and usage patterns.
106
+ An optional Markdown file of standing instructions for the whole campaign. You give its path at Setup. Each stage that uses it re-reads it when the stage starts, so edits you make between stages take effect. It can hold `## Quality Overrides`, `## Skip List`, `## Pipeline Flags` and `## Notes` sections, and any other heading is read as general guidance. See the [campaign directive spec](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-campaign/references/campaign-directive-spec.md) for the full format.
107
+
108
+ ### Where Campaign Files Live
109
+
110
+ Everything the campaign writes about itself sits in one folder: `forge-data/_campaign/` by default (`{forge_data_folder}/_campaign`). It holds `_campaign-state.yaml` and its `.bak` backup, `campaign-brief.yaml`, the decision log, the Tier B batch input, the `archive/` folder and `campaign-report.md`. To move it, set `campaign_workspace_path` (see [Customization](#customization)).
111
+
112
+ ### _campaign-decision-log.md
113
+
114
+ This log only grows. It records every decision in the campaign, whether you made it or a headless run took the default: skip or force at a dependency gate, overwrite, export or cancel at the Export gate, recovery from the backup, a cancel at any other question, and why a skill failed. Each entry is one timestamped line with its type: `decision` (your choice at a question), `auto` (the default a headless run took) or `event` (what happened without a choice, such as a failed skill). `campaign status` shows its last lines.
70
115
 
71
116
  ### Dependency Tracking
72
117
 
73
- Campaign sorts skills topologically by their dependency graph. If skill B depends on skill A, skill A is produced first. This ensures downstream skills can reference upstream APIs during compilation.
118
+ Campaign orders skills by their `depends_on` lists, so if skill B depends on skill A, skill A is built first. A dependency counts as met only when that skill has completed. If it has not, the Skill Loop stops at the waiting skill and asks you to `[S]kip` it, `[F]orce` it anyway, or `[H]alt`, which stops the campaign with exit code 13 (`dependency-blocked`) and leaves it ready to resume. A headless run never forces: it skips the waiting skill when every unmet dependency failed or was skipped, so the skills that do not depend on it still run, and halts with exit code 13 only while a dependency is still pending or active. A circular or unknown dependency stops the campaign at Strategy with exit code 4.
74
119
 
75
120
  ### Tier A vs Tier B
76
121
 
77
- - **Tier A** — primary dependencies declared in the architecture. Each gets a full individual pipeline run (AN → BS → CS → TS) during the Skill Loop stage; the tested skills are exported collectively at the gated Export stage.
78
- - **Tier B** — secondary or transitive dependencies. Processed in batch during the Tier B Batch stage with lighter-touch quality requirements.
122
+ You choose a tier for each library at Setup.
123
+
124
+ - **Tier A** gets the full pipeline during the Skill Loop: brief (BS), compile (CS) and test (TS). The tested skills that clear the quality gate are exported together at the Export stage.
125
+ - **Tier B** is built in one batch by Quick Skill (`skf-quick-skill --batch`) during the Tier B Batch stage. It is faster and gives best-effort skills, with no separate test step.
126
+
127
+ Do not make a Tier A library depend on a Tier B library. A dependency counts as met only once that skill has completed, and Tier B skills are built after the Skill Loop, so the Tier A skill could never pass the dependency gate. Strategy rejects such a plan with exit code 4 and names each Tier A skill and the Tier B skill it depends on (`tier_inversions`): make the dependency Tier A, or drop it.
79
128
 
80
129
  ### Customization
81
130
 
82
- Campaign ships a `customize.toml` workflow surface you can tune without forking the skill. The resolver merges three layers (scalars override, arrays append): the bundled `customize.toml`, then a committed team override at `_bmad/custom/<skill-name>.toml`, then a personal (gitignored) override at `_bmad/custom/<skill-name>.user.toml` — both under {project-root}. What you can set:
131
+ Campaign ships a `customize.toml` file that you can tune without forking the skill. When the campaign starts, it merges three layers: the bundled `customize.toml`, then a team override committed at `_bmad/custom/skf-campaign.toml`, then a personal override at `_bmad/custom/skf-campaign.user.toml` that git ignores. Both overrides sit under your project root. A single value in a later layer replaces the earlier one, and list entries add up. You can set:
83
132
 
84
- - **Quality-gate scalars** — `quality_gate_hard`, `quality_gate_soft_target`, `quality_gate_soft_fallback` (the thresholds above).
85
- - **`campaign_workspace_path`** — relocate the entire campaign workspace (state, backup, brief, archive, decision log) to a shared volume without editing any step file; empty means the default `{forge_data_folder}/_campaign`.
86
- - **`persistent_facts`** — literal sentences or `file:` references (globs supported) injected into every per-skill kickoff, so house style and guardrails reach the whole campaign.
87
- - **Template overrides** — `report_template_path`, `kickoff_template_path`, `brief_template_path` for house-style copies.
88
- - **`on_complete`** — a post-completion hook invoked with `--report-path=<…>` after the report finalizes; hook failures are logged but never fail the campaign.
89
- - **`activation_steps_prepend` / `activation_steps_append`** — org-wide pre-flight or context-load steps around activation.
133
+ - **Quality-gate values**: `quality_gate_hard`, `quality_gate_soft_target` and `quality_gate_soft_fallback` (see [Quality Gates](#quality-gates) below).
134
+ - **`campaign_workspace_path`**: moves the whole campaign folder (state, backup, brief, batch input, archive, report and decision log), for example to a shared volume. Empty means the default, `{forge_data_folder}/_campaign`.
135
+ - **`persistent_facts`**: plain sentences or `file:` references (globs allowed) added to every skill's kickoff message, so house style and guardrails reach the whole campaign. By default it loads every `project-context.md` in your project. A `file:` path with no glob character that names no file stops the campaign at its first Tier A kickoff with exit code 2, while a glob that matches nothing adds nothing. To drop the default, add `persistent_facts = ["!file:{project-root}/**/project-context.md"]` to a team or personal override: an entry that starts with `!` adds nothing and removes every earlier entry it names, so those files stay out of every Tier A kickoff.
136
+ - **Template overrides**: `report_template_path`, `kickoff_template_path` and `brief_template_path` point to your own copies of the templates.
137
+ - **`on_complete`**: a command run at the end of the campaign, after its final state write. It gets `--report-path=<path>` only when the report was written. If it fails, the failure is logged and the campaign still succeeds.
138
+ - **`activation_steps_prepend` / `activation_steps_append`**: extra steps run before or after activation, for org-wide checks or loading context.
139
+
140
+ These overrides need BMAD Method's customization script, which the BMAD Method installer adds. In a project with SKF alone, the campaign ignores `_bmad/custom/` and uses the bundled values, prints `[activation/warn] customization_resolver_unavailable: not found` and, except for `campaign status`, logs that event in its decision log. See [Workflows: Customizing a Workflow](/docs/workflows.md#customizing-a-workflow) for the settings every workflow shares.
90
141
 
91
142
  See the skill's [SKILL.md](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-campaign/SKILL.md) for the full merge contract.
92
143
 
@@ -94,79 +145,80 @@ See the skill's [SKILL.md](https://github.com/armelhbobdad/bmad-module-skill-for
94
145
 
95
146
  ## Quality Gates
96
147
 
97
- Campaign enforces two types of quality gates:
98
-
99
- The bar is **campaign-wide** — one set of thresholds applied to every skill, not a per-pipeline split:
148
+ One quality bar applies to every skill in the campaign. It has three parts:
100
149
 
101
- - **Hard gate** (`zero-critical-high`) — zero critical or high-severity issues allowed. Any skill that fails the hard gate is flagged for manual intervention and blocks the campaign from proceeding past that skill.
102
- - **Soft target** (default 90%) — the score a skill should reach.
103
- - **Soft fallback** (default 80%) — the floor. A skill scoring at or above the fallback but below the target still proceeds; only a skill below the fallback is treated as a soft-gate miss.
150
+ - **Hard gate** (`zero-critical-high`): a skill may have no critical or high-severity findings, such as a wrong or fabricated signature or a broken reference. The test step (`skf-test-skill`) fails a skill that has any. The campaign marks that skill failed and writes the reason to the decision log. Skills that depend on it wait at the dependency gate, and the other skills carry on. A missing export does not trip this gate: Test Skill rates it Medium, so it lowers the skill's score instead (see [Gap severities](/docs/verifying-a-skill.md#gap-severities)).
151
+ - **Soft target** (default 90%): the score a skill should reach.
152
+ - **Soft fallback** (default 80%): the floor. A skill that scores at or above the fallback but below the target still clears the gate, as `fallback`. A skill below the fallback is not exported.
104
153
 
105
- All three are tunable via [customization](#customization); the per-campaign brief and any directive `## Quality Overrides` still take precedence at runtime.
154
+ You can change all three through [customization](#customization). The campaign brief and a directive's `## Quality Overrides` section take precedence when the campaign runs. A Tier A skill completes only on a Test Skill PASS, with `--threshold` set to its effective soft target. Export then enforces the gate: a skill that scores at or above the soft target is `pass`, one at or above the soft fallback is `fallback`, and anything else is not exported. A Tier B skill is classified by its skill-check score, and one without a score is not exported.
106
155
 
107
156
  ---
108
157
 
109
158
  ## Resume
110
159
 
111
- Campaign is designed around the assumption that context will die. File-based state (`_campaign-state.yaml`) survives context death, session timeouts, and machine restarts.
160
+ Campaign expects the AI session to end before the campaign does, for example when it runs out of context. Its progress lives on disk in `_campaign-state.yaml`, so it survives a lost session, a timeout or a machine restart.
112
161
 
113
162
  When you resume:
114
163
 
115
- 1. Ferris validates the state file against the campaign schema
164
+ 1. Ferris validates the state file against the campaign schema. When it fails, `campaign-state.py recover` copies the backup over it, but only when the backup validates
116
165
  2. Completed skills are skipped automatically
117
- 3. The campaign picks up from the next incomplete skill in dependency order
166
+ 3. If a skill was in progress, the campaign returns to it (the Skill Loop for Tier A, the Tier B Batch for Tier B). Otherwise it starts the stage after the last stage that finished
118
167
  4. All cross-skill context (dependency graph, quality scores, provenance records) is restored from disk
119
168
 
120
- Use `--from=<skill>` to override the resume point if you need to re-process a specific skill.
169
+ A campaign that already finished has nothing to resume: Ferris says so, and a headless resume prints the campaign's success line again. A Setup that stopped after writing the state but before the brief halts the resume with exit code 8 (`missing-brief`): run `campaign` and choose overwrite to start again.
170
+
171
+ Use `--from=<skill>` to resume at a specific skill. If that skill already finished (completed, failed or skipped), Ferris asks whether to `[R]e-run` it, jump to the `[N]ext` unfinished skill, or `[H]alt`. Headless runs take `[N]ext`, so they never re-run a finished skill. An unknown skill name stops the campaign with exit code 2.
121
172
 
122
173
  ### Re-invocation and recovery
123
174
 
124
- - **`campaign` over an existing state** prompts resume-vs-overwrite. Choosing overwrite first archives the existing `_campaign-state.yaml` and `campaign-brief.yaml` to `archive/{name}-{timestamp}/` and logs it to the decision log, so a new campaign never silently clobbers an old one. In headless mode the default is **resume** — archive-and-overwrite happens only when `--brief`/`--manifest` explicitly seeds a new campaign.
125
- - **Corrupt primary, valid `.bak`** — resume auto-recovers by restoring the backup over the primary and logging the recovery; if the backup is also unusable it HALTs (exit 9, `corrupt-state`) reporting both errors.
126
- - **Primary behind the backup** — if the primary looks older than the `.bak` (a possible crash during the last write), Ferris offers `[R]ecover` from the backup or `[K]eep` the primary (the default; headless keeps the primary).
175
+ - **Running `campaign` when a state file or its backup already exists** asks whether to resume or overwrite. Overwrite first runs `campaign-state.py archive`, which moves `_campaign-state.yaml`, its `.bak` and `campaign-brief.yaml` into `archive/<name>-<UTC timestamp>/`, and records this in the decision log, so a new campaign never silently replaces an old one. Setup itself refuses to overwrite a state file or a backup. Headless runs resume by default; they archive and overwrite only when `--brief` or `--manifest` seeds a new campaign.
176
+ - **Damaged state file, good backup**: resume runs `campaign-state.py recover`, which copies the `.bak` over the state file only when the backup validates, and logs the recovery. If the backup is also unusable, the campaign stops with exit code 9 (`corrupt-state`) and reports both errors. Every write keeps a valid state in the backup and replaces the state file in one step, so a crash during a write never leaves a state file older than its backup.
127
177
 
128
178
  ---
129
179
 
130
180
  ## Expected Output
131
181
 
132
- A successful campaign produces:
182
+ A finished campaign leaves:
133
183
 
134
- - **Individual skill packages** — one per dependency, each tested and exported
135
- - **Stack skill(s)** — capstone skills that integrate individual skills into a cohesive project context
136
- - **Campaign report** (`campaign-report.md`) — a post-campaign summary with per-skill quality scores, dependency graph visualization, and overall campaign metrics
137
- - **Headless envelope** (`SKF_CAMPAIGN_RESULT_JSON`) — a structured JSON result for automation consumers
184
+ - **Individual skills**: one for each library that completed. The Export stage exports the ones that clear the quality gate; the others stay on disk and in the report.
185
+ - **One capstone stack skill**: composed from the completed skills that clear the quality gate. The Export stage exports only the individual skills, so run `skf-export-skill` on the stack skill yourself when you want it packaged.
186
+ - **Verification report and refined architecture**: from Verification and Refinement, when an architecture document was found.
187
+ - **Campaign report** (`campaign-report.md`): the quality gate; a table of every skill with its tier, status, score, pin and workarounds; an Export Gate section with each completed skill's verdict, whether Export exported it or why its export failed, and the skills the gate kept from export; the lowest, highest and average scores; time per skill; and a section on failed or skipped skills.
188
+ - **Decision log** (`_campaign-decision-log.md`): every decision made during the campaign.
189
+ - **Headless result line** (`SKF_CAMPAIGN_RESULT_JSON`): printed in headless mode for scripts to read, as the run's last line. Besides the counts and the score of each skill, it carries `export_verdicts` (each completed skill's verdict at Export), `skills_excluded` (the completed skills the gate kept from export), `skills_exported` (the skills Export exported) and `export_failures` (each skill whose export failed, with its `halt_reason` and `exit_code`). The last two are null when the Export stage did not run. A failed export does not fail the campaign, which still ends with `status` `success`, so a CI job that needs every skill exported checks `export_failures`.
138
190
 
139
- The Export stage (stage 9) is the only non-auto-proceed stage. Ferris presents a summary of all skills to be written and waits for explicit approval before modifying any context files. In headless mode, the write-gate auto-resolves.
191
+ The Export stage (stage 9) asks before it writes anything. It lists each completed skill with its verdict, names the skills it leaves out because they fall below the soft fallback or have no score, and waits for `[E]xport all` or `[C]ancel`. `[E]xport all` exports only the `pass` and `fallback` skills, each under the skill folder its build wrote: a Tier B skill under the name Quick Skill gave it, the library's name, even when you named the target differently. In headless mode it exports them without asking.
140
192
 
141
193
  ---
142
194
 
143
195
  ## Headless / Automation
144
196
 
145
- Campaign is a first-class headless front door for unattended, multi-session production. Add `--headless` / `-H` (or set `headless_mode: true` in preferences); `--brief`/`--manifest` imply it and seed targets non-interactively. In headless mode every confirmation gate auto-proceeds with its default action, each step emits a single-line JSON progress event to **stderr** on entry and exit (`{"stage":N,"name":"<slug>","status":"start|done"}`), and the terminal step emits the `SKF_CAMPAIGN_RESULT_JSON` envelope on stdout.
197
+ Campaign can run unattended across several sessions. Add `--headless` / `-H`, or set `headless_mode: true` in `_bmad/_memory/forger-sidecar/preferences.yaml`. `--brief` and `--manifest` turn headless mode on for you and supply the targets: a seeded run is meant for CI, so it takes every default. To review the plan and the export, give the same file at the Setup question of an interactive run instead. In headless mode every question takes its default answer. Each step prints a one-line JSON progress event to **stderr** when it starts and when it ends (`{"stage":N,"name":"<slug>","status":"start|done"}`), or `{"stage":N,"name":"<slug>","status":"halt","exit":<code>}` when it stops on an error. At the end, the health check displays the `SKF_CAMPAIGN_RESULT_JSON` line as the run's last line. The line follows [`skf-campaign-result-envelope.v1.json`](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/shared/scripts/schemas/skf-campaign-result-envelope.v1.json), and its success form carries `exit_code` 0 and a null `halt_reason`.
146
198
 
147
- - **Cancel affordance** — at any interactive gate the operator can type `cancel`, `exit`, or `:q` to leave cleanly; the campaign HALTs with exit code 12 (`user-cancelled`), logs the cancellation, and leaves state intact and resumable. The Export gate is the exception: its own `[C]ancel` exits 11 (`export-cancelled`).
148
- - **Exit codes** — every HARD HALT exits with a stable, documented code so automators branch on the failure class without grepping message text: `0` success, `3` invalid-state, `4` circular-deps, `5` invalid-pin, `6` inaccessible-repo, `7` dependency-deadlock, `8` missing-brief, `9` corrupt-state, `10` report-failure (degraded — the campaign still completes), `11` export-cancelled, `12` user-cancelled.
149
- - **Error envelope** — on any HARD HALT the `SKF_CAMPAIGN_RESULT_JSON` envelope is emitted on stderr in its error variant, carrying `status: "error"`, `exit_code`, the `phase` (step slug), and an `error` object with `code` and `message`.
199
+ - **Cancel**: at any question between Setup and the Export gate, type `cancel`, `exit` or `:q` to stop cleanly. The campaign stops with exit code 12 (`user-cancelled`), logs the cancel, and leaves its state ready to resume. The Export gate is the exception: its own `[C]ancel` exits with code 11 (`export-cancelled`).
200
+ - **Exit codes**: every stop on an error exits with a fixed code, so scripts can branch on the kind of failure without reading the message: `0` success, `2` invalid-input (for example no targets, a target Setup rejects, `gh` not available, or an unknown `--from` skill), `3` invalid-state, `4` circular-deps (a dependency cycle, an unknown dependency, or a Tier A skill that depends on a Tier B skill), `5` invalid-pin, `6` inaccessible-repo, `7` dependency-deadlock, `8` missing-brief, `9` corrupt-state, `10` report-failure (the campaign still completes; only the report is missing), `11` export-cancelled, `12` user-cancelled, `13` dependency-blocked (a `[H]alt` at a skill whose dependency has not completed; the campaign can resume).
201
+ - **Error line**: when the campaign stops on an error, it prints the `SKF_CAMPAIGN_RESULT_JSON` line on stderr in its error form. The line carries every field the schema requires, with `status: "error"`, `exit_code` and `halt_reason`, the counts so far and the other fields empty or null, plus `phase` (the step where it stopped) and an `error` object holding `code` and `message`, which only a halt carries.
150
202
 
151
- The full exit-code table and envelope schema live in the skill's [SKILL.md](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-campaign/SKILL.md) under "Exit Codes" and "Result Contract on HARD HALT".
203
+ The full exit-code table and result-line formats are in the skill's [campaign contracts](https://github.com/armelhbobdad/bmad-module-skill-forge/blob/main/src/skf-campaign/references/campaign-contracts.md), under "Exit Codes" and "Result Contract on HARD HALT".
152
204
 
153
205
  ---
154
206
 
155
207
  ## Timing
156
208
 
157
- Campaign duration scales with the number of declared dependencies — each Tier A skill runs a full `AN → BS → CS → TS` pipeline, and Tier B skills run in batch. A campaign is explicitly designed to **span multiple sessions**: file-based state means you can stop after any skill and resume later without losing progress. Factors that affect total time:
209
+ Campaign time grows with the number of libraries. Each Tier A skill runs the full brief, compile and test chain, and Tier B skills run in one batch. A campaign is meant to **span several sessions**: its state is on disk, so you can stop after any skill and resume later without losing progress. What affects total time:
158
210
 
159
- - **Skill count and tier mix** — Tier A skills (a full pipeline each) dominate; Tier B batch processing is lighter per skill.
160
- - **Dependency depth** — deep graphs serialize more work (downstream skills wait on upstream APIs); wide, shallow graphs spread more naturally across sessions.
161
- - **Capstone breadth** — stack-skill composition (stage 6) grows with the number of constituent skills.
162
- - **Forge tier** — Deep-tier projects (with QMD and CCC) spend more time per skill on enrichment.
211
+ - **Skill count and tier mix**: Tier A skills, each with a full pipeline, take most of the time. Tier B batch processing is lighter per skill.
212
+ - **Dependency depth**: in a deep chain of dependencies, each skill waits for the ones before it. A wide, shallow graph splits more easily across sessions.
213
+ - **Capstone breadth**: composing the stack skill (stage 6) takes longer the more skills it combines.
214
+ - **Forge tier**: at Deep tier (ast-grep, GitHub CLI and QMD), each skill spends more time on QMD knowledge search.
163
215
 
164
- Plan a campaign as multi-session work rather than a single sitting — the resume design above exists precisely so that context death between skills is a non-event.
216
+ Plan a campaign as work over several sessions, not one sitting. The campaign saves its state to disk as it goes, so losing the session between skills costs you nothing.
165
217
 
166
218
  ---
167
219
 
168
220
  ## Related
169
221
 
170
- - [Workflows](/docs/workflows.md) — pipeline mode mechanics, headless mode, circuit breakers
171
- - [forge-auto](/docs/forge-auto.md) — zero-ceremony single-skill creation (campaign orchestrates many of these)
172
- - [BMAD Synergy](/docs/bmad-synergy.md) — how campaign fits into BMAD Phase 3 as an orchestration layer
222
+ - [Workflows](/docs/workflows.md): pipeline mode, headless mode and circuit breakers
223
+ - [forge-auto](/docs/forge-auto.md): one command that builds and exports a single skill. A campaign runs a similar chain for each Tier A library and exports them together at the end
224
+ - [BMAD Synergy](/docs/bmad-synergy.md): where campaign fits in BMAD Phase 3 (Solutioning)
package/docs/concepts.md CHANGED
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  title: Concepts
3
- description: Seven load-bearing terms for using and understanding Skill Forge — agent skills, provenance, confidence tiers, capability tiers, drift, version pinning, and the BMAD module.
3
+ description: "Seven core terms for using and understanding Skill Forge: agent skills, provenance, confidence tiers, capability tiers, drift, version pinning, and the BMAD module."
4
4
  ---
5
5
 
6
6
  These are the seven terms you'll meet in every other page of this site. Each one names something SKF does differently from generic docs tooling. For the full mechanism behind them, see [Architecture](/docs/architecture.md) and [Skill Model](/docs/skill-model.md).
7
7
 
8
+ Commands on this page look like `@Ferris AS`. Ferris is the SKF agent you talk to, and the two letters are the menu code of the workflow you want (`AS` is Audit Skill). See [Agents](/docs/agents.md) for the full menu.
9
+
8
10
  ---
9
11
 
10
12
  ## Agent Skills
@@ -13,21 +15,21 @@ An agent skill is an instruction file that tells an AI agent how to use your cod
13
15
 
14
16
  Skills follow the [agentskills.io](https://agentskills.io) open standard, so they work across Claude, Cursor, Copilot, and other AI tools.
15
17
 
16
- **Example:** A skill for [cognee](https://github.com/topoteretes/cognee) tells your agent: "The function is `cognee.search()`, its first parameters are `query_text`, `query_type`, `user`, `datasets`, and `dataset_ids`, and it's defined at `cognee/api/v1/search/search.py:L26` (v1.0.0, commit `3c048aa4`)." Every parameter and location is AST-verified from the actual source code.
18
+ **Example:** A skill for [cognee](https://github.com/topoteretes/cognee) tells your agent: "The function is `cognee.search()`, its first parameters are `query_text`, `query_type`, `user`, `datasets`, and `dataset_ids`, and it's defined at `cognee/api/v1/search/search.py:L27` (v1.0.0, commit `3c048aa4`)." With ast-grep installed, SKF reads such a signature from the structure of the actual source code (its abstract syntax tree, or AST) and labels it T1; a signature it reads by eye instead is labeled T1-low (see [Confidence Tiers](#confidence-tiers-t1t1-lowt2t3)).
17
19
 
18
20
  ---
19
21
 
20
22
  ## Provenance
21
23
 
22
- Provenance means every instruction in a skill traces back to where it came from. For code, that's a file and line number. For documentation, it's a URL. For developer discourse, it's an issue or PR reference. **If SKF can't point to a source, it doesn't include the instruction.**
24
+ Provenance means every instruction in a skill traces back to where it came from. For code, that's a file and line number. For documentation, it's a URL. For developer discourse such as issues, pull requests, and changelogs, it's the indexed document the instruction came from. **If SKF can't point to a source, it doesn't include the instruction.**
23
25
 
24
- **Examples** (from a [real generated skill](https://github.com/armelhbobdad/oh-my-skills)):
25
- - `[AST:cognee/api/v1/search/search.py:L26]` — extracted from source code via AST parsing (T1)
26
- - `[SRC:cognee/api/v1/session/__init__.py:L7]` — read from source code without AST verification (T1-low)
27
- - `[QMD:cognee-temporal:issues.md]` — surfaced from indexed developer discourse (T2)
28
- - `[EXT:docs.cognee.ai/getting-started/quickstart]` — sourced from external documentation (T3)
26
+ **Examples** (the citation forms, with paths from the oms-cognee skill in [oh-my-skills](https://github.com/armelhbobdad/oh-my-skills)):
27
+ - `[AST:cognee/api/v1/search/search.py:L27]`: an ast-grep rule matched the definition in the source code (T1)
28
+ - `[SRC:cognee/api/v1/add/add.py:L166]`: read from source code by eye, without an ast-grep match (T1-low)
29
+ - `[QMD:oms-cognee-temporal:releases.md]`: found in indexed release notes and other developer discourse (T2)
30
+ - `[EXT:https://docs.cognee.ai/getting-started/quickstart]`: taken from external documentation (T3)
29
31
 
30
- This is the opposite of how most AI tools work. They generate plausible-sounding content from training data; SKF only includes what it can cite. Quick-tier skills rely on best-effort source reading rather than AST verification — but even Quick skills cite their sources, and nothing ships without a citation.
32
+ This is the opposite of how most AI tools work. They generate plausible-sounding content from training data; SKF only includes what it can cite. Skills compiled at the Quick tier rely on best-effort source reading rather than AST verification, but they still cite their sources, as `[SRC:file:Lnn]` (T1-low). Inside a compiled skill, the only content without a citation is clearly marked: sections you write yourself between `[MANUAL]` markers, and integrations labeled `[inferred from shared domain]` in a stack skill assembled from existing skills. Quick Skill (`@Ferris QS`) is the exception: it writes a fast, best-effort draft from the source and README, with no citation on each instruction and no provenance map.
31
33
 
32
34
  ---
33
35
 
@@ -35,27 +37,29 @@ This is the opposite of how most AI tools work. They generate plausible-sounding
35
37
 
36
38
  Each piece of information in a skill carries a confidence level based on where it came from:
37
39
 
38
- - **T1 — AST extraction:** Pulled directly from source code via AST parsing. The function signature exists in the code at the pinned commit. Cited as `[AST:file:Lnn]`.
39
- - **T1-low — Source reading:** Found by reading source files directly without AST parsing. The location is correct but the type signature may be inferred. Produced by Quick tier and by Forge/Forge+/Deep when ast-grep cannot parse a specific file. Cited as `[SRC:file:Lnn]`.
40
- - **T2 — Evidence (Deep tier only):** Surfaced by QMD knowledge search from issues, PRs, changelogs, or documentation within the repository. Available only when QMD is installed (Deep tier). Reliable context, but less definitive than source code itself. Cited as `[QMD:collection:document]`. T2 has two temporal subtypes:
41
- - **T2-past** — Historical context (closed issues, merged PRs, changelogs) explaining API design decisions. Surfaces in the skill's `references/` directory.
42
- - **T2-future** — Forward-looking context (open PRs, deprecation warnings, RFCs) about upcoming changes. Surfaces in SKILL.md Section 4b (Migration & Deprecation Warnings) and `references/`.
43
- - **T3 — External:** Pulled from external documentation or websites. Treated with caution and clearly marked. Cited as `[EXT:url]`.
40
+ - **T1 (AST extraction):** An ast-grep rule matched the export in the source code, so its signature comes from the code's structure at the pinned commit. Cited as `[AST:file:Lnn]`.
41
+ - **T1-low (source reading):** Found by reading source files directly without an ast-grep match. The location is correct but the type signature may be inferred. Produced by Quick tier, and by Forge, Forge+, or Deep when ast-grep cannot parse a specific file or when an export is read directly while ast-grep works. Cited as `[SRC:file:Lnn]`.
42
+ - **T2 (evidence, Deep tier only):** Found by QMD, a local search engine that SKF uses to index the project's issues, pull requests, changelogs, and fetched documentation. Reliable context, but less definitive than source code itself. Cited as `[QMD:collection:document]`. T2 has two temporal subtypes:
43
+ - **T2-past:** Historical context (closed issues, merged PRs, changelogs) explaining API design decisions. Surfaces in the skill's `references/` directory.
44
+ - **T2-future:** Forward-looking context (open PRs, deprecation warnings, RFCs) about upcoming changes. Surfaces in the Migration & Deprecation Warnings section of SKILL.md, which appears only when there is such context, and in `references/`.
45
+ - **T3 (external):** Pulled from external documentation or websites. Treated with caution and clearly marked. Cited as `[EXT:url]`.
46
+
47
+ **The label follows the tool, not the tier.** SKF labels each export by the tool that actually read it: an ast-grep match is T1 at any tier, and an export read by eye is T1-low, even in a Deep-tier skill. Before SKF 3.0.0 the label followed the forge tier, so a skill built at Forge or above could claim T1 for an export nothing parsed. A skill you build or update now can therefore show fewer T1 claims and more T1-low ones than the same skill built by an earlier version, with nothing less extracted. Audit Skill lists such label changes in their own table, "Provenance label differences (not drift)", and does not count them as drift.
44
48
 
45
- Forge+ semantic discovery (via cocoindex-code) does not introduce a new confidence tier — it influences *which* files are extracted, not *how* they're cited. Discovered files are verified by ast-grep (T1) or source reading (T1-low).
49
+ Forge+ semantic discovery (via cocoindex-code) does not introduce a new confidence tier. It changes the order in which a step reads files one at a time, not *how* they're cited. Every export is still labeled by the tool that read it: ast-grep (T1) or source reading (T1-low).
46
50
 
47
51
  ---
48
52
 
49
53
  ## Capability Tiers (Quick/Forge/Forge+/Deep)
50
54
 
51
- Your capability tier depends on which tools you have installed. Each tier builds on the previous one:
55
+ Your capability tier depends on which tools are installed and working on your machine. Forge, Forge+, and Deep all need ast-grep, and Forge+ and Deep each add different tools on top of it. Deep does not need cocoindex-code, so it does not build on Forge+:
52
56
 
53
- - **Quick** — No tools required. SKF reads source files and builds best-effort skills. Works in under a minute. GitHub CLI used when available.
54
- - **Forge** — Adds [ast-grep](https://ast-grep.github.io). SKF uses AST parsing to verify instructions against the actual code structure.
55
- - **Forge+** — Adds [cocoindex-code](https://github.com/cocoindex-io/cocoindex-code). SKF uses semantic code search to discover relevant source regions before AST extraction, improving coverage on large codebases.
56
- - **Deep** — Full pipeline: requires [ast-grep](https://ast-grep.github.io) + [GitHub CLI](https://cli.github.com) + [QMD](https://github.com/tobi/qmd) (all three). SKF indexes knowledge for semantic search and performs GitHub repository exploration. Skills get enriched with historical context, deprecation warnings, and cross-reference intelligence. CCC (cocoindex-code) enhances Deep tier when installed — ast-grep + gh + qmd + ccc gives maximum capability.
57
+ - **Quick:** No extra tools required. SKF reads source files and builds best-effort skills. Works in under a minute. GitHub CLI used when available.
58
+ - **Forge:** Adds [ast-grep](https://ast-grep.github.io). SKF uses AST parsing to verify instructions against the actual code structure: each export an ast-grep rule matches is T1, and one it cannot match is read by eye and stays T1-low.
59
+ - **Forge+:** Adds [cocoindex-code](https://github.com/cocoindex-io/cocoindex-code). SKF searches the code by meaning and ranks the files, so a step that reads files one at a time reads the most relevant first, which helps most on large codebases. The ast-grep recipe runner reads every file in scope either way.
60
+ - **Deep:** The full pipeline. Needs [ast-grep](https://ast-grep.github.io), the [GitHub CLI](https://cli.github.com), and [QMD](https://github.com/tobi/qmd), all three, with QMD running. SKF indexes the project's issues, pull requests, changelogs, and docs so it can search them, and it explores the GitHub repository. Skills gain historical context and deprecation warnings. cocoindex-code is optional here; adding it to Deep also brings its semantic code search, which gives the most capability.
57
61
 
58
- You don't need all tools to start. SKF detects what you have and sets your tier automatically. See [Skill Model → Progressive Capability Model](/docs/skill-model.md#progressive-capability-model) for the full technical treatment.
62
+ You don't need all tools to start. When you run Setup Forge (`@Ferris SF`), SKF checks which tools work and sets your tier from that. If you install a tool later, run `@Ferris SF` again to update your tier. See [Skill Model → Progressive Capability Model](/docs/skill-model.md#progressive-capability-model) for the full technical treatment.
59
63
 
60
64
  ---
61
65
 
@@ -63,9 +67,11 @@ You don't need all tools to start. SKF detects what you have and sets your tier
63
67
 
64
68
  Drift happens when the source code changes but the skill instructions haven't been updated to match. A skill might still reference a function that was renamed, removed, or had its signature changed upstream.
65
69
 
66
- SKF detects drift by comparing the skill's recorded provenance against the current code. The `audit-skill` workflow (`@Ferris AS`) scans for these mismatches — for both individual skills and stack skills. Stack skills track per-library provenance and, in compose-mode, constituent freshness via metadata hash comparison.
70
+ SKF detects drift by comparing the skill's recorded provenance against the current code. The Audit Skill workflow (`@Ferris AS`) scans for these mismatches in both single-library skills and stack skills (one skill that covers several libraries a project uses together). A stack built from source code is checked library by library. A stack assembled from skills you already have is checked for member skills that changed after it was assembled.
71
+
72
+ Audit Skill also checks the documentation pages a skill tracked when it was built, and reports which of them changed upstream since then. This check is informational and does not change the drift score. Neither does a provenance label that changed only because a different tool read the export (T1 to T1-low, or back): Audit Skill lists it under "Provenance label differences (not drift)".
67
73
 
68
- **Example:** Your skill says `createUser(name: string)` but the function was renamed to `registerUser(name: string, email: string)` in the last release. That's drift. For stack skills, constituent drift occurs when an individual skill is updated but the stack hasn't been re-composed to reflect the changes.
74
+ **Example:** Your skill says `createUser(name: string)` but the function was renamed to `registerUser(name: string, email: string)` in the last release. That's drift. For a stack assembled from existing skills, constituent drift means one of its member skills was updated after the stack was assembled, and the stack hasn't been rebuilt to pick up the change.
69
75
 
70
76
  ---
71
77
 
@@ -73,14 +79,14 @@ SKF detects drift by comparing the skill's recorded provenance against the curre
73
79
 
74
80
  Every skill records the exact version (or commit) of the source code it was built from. This means you always know which version of the library the instructions apply to.
75
81
 
76
- By default, the version is auto-detected from the source (package.json, pyproject.toml, etc.). You can also target a specific version — either by specifying it during `@Ferris BS` (brief-skill) or by appending `@version` to a quick skill command (`@Ferris QS cognee@1.0.0`). This is especially useful for docs-only skills where no source code is available for auto-detection. When targeting a specific version on a remote repository, SKF resolves the matching git tag and clones from it — so the extracted API signatures actually reflect the target version's code, not just the label applied to whatever happens to be on the default branch.
82
+ By default, the version is auto-detected from the source (package.json, pyproject.toml, etc.). You can also target a specific version, either by giving it during `@Ferris BS` (Brief Skill) or by adding `@version` to a Quick Skill command (`@Ferris QS cognee@1.0.0`). This is especially useful for docs-only skills, where there is no source code to detect a version from. When you target a version on a remote repository, SKF finds the matching git tag and clones from it. That way the extracted API signatures come from that version's code, not from whatever is on the default branch with a label added. If no tag matches, Quick Skill stops and lists the tags it found, while Create Skill warns you and falls back to the default branch.
77
83
 
78
- When the source updates, you can re-run `@Ferris US` (update-skill) to regenerate the skill for the new version while preserving any manual additions you've made.
84
+ When the source updates, re-run `@Ferris US` (Update Skill) to regenerate the skill. SKF writes the result as a new version and leaves the old one in place. Anything you wrote between `<!-- [MANUAL:name] -->` and `<!-- [/MANUAL:name] -->` markers is carried over; edits made anywhere else are not protected and can be overwritten. Update Skill follows the ref the skill was built from, so a skill built from a branch picks up that branch's new commits. To move a skill built from a release tag to a newer release, run `@Ferris US <name> --target-ref <tag>`.
79
85
 
80
86
  ---
81
87
 
82
88
  ## BMAD Module
83
89
 
84
- SKF is a plugin (called a "module") for [BMAD Method](https://docs.bmad-method.org/), a framework for running structured AI workflows. You don't need to know BMAD to use SKF — the standalone installer sets everything up.
90
+ SKF is a plugin (called a "module") for [BMAD Method](https://docs.bmad-method.org/), a framework for running structured AI workflows. You don't need to know BMAD to use SKF. The standalone installer (`npx bmad-module-skill-forge install`) sets everything up.
85
91
 
86
- If you already use BMAD, see [BMAD Synergy](/docs/bmad-synergy.md) for how SKF workflows pair with BMM phases and optional modules like TEA, BMB, and GDS.
92
+ If you already use BMAD, see [BMAD Synergy](/docs/bmad-synergy.md) for how SKF workflows fit into BMAD's main four-phase workflow (BMM) and optional modules such as TEA (Test Architect), BMB (BMAD Builder), and GDS (Game Dev Studio).