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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/.claude-plugin/marketplace.json +56 -0
  2. package/.gitattributes +16 -0
  3. package/README.md +105 -38
  4. package/docs/404.md +13 -10
  5. package/docs/RELEASING.md +616 -0
  6. package/docs/STABILITY.md +123 -0
  7. package/docs/_data/pinned.yaml +98 -0
  8. package/docs/agents.md +16 -11
  9. package/docs/architecture.md +221 -0
  10. package/docs/bmad-synergy.md +11 -13
  11. package/docs/concepts.md +18 -108
  12. package/docs/examples.md +121 -80
  13. package/docs/getting-started.md +85 -147
  14. package/docs/how-it-works.md +25 -536
  15. package/docs/index.md +44 -27
  16. package/docs/skill-model.md +328 -0
  17. package/docs/troubleshooting.md +39 -0
  18. package/docs/verifying-a-skill.md +232 -0
  19. package/docs/why-skf.md +93 -0
  20. package/docs/workflows.md +119 -13
  21. package/package.json +30 -9
  22. package/release-audits/v1.0.0-launch-audit.md +207 -0
  23. package/src/README.md +23 -25
  24. package/src/forger/forge-tier.yaml +4 -2
  25. package/src/forger/preferences.yaml +7 -1
  26. package/src/knowledge/agentskills-spec.md +1 -1
  27. package/src/knowledge/architecture-verification.md +1 -1
  28. package/src/knowledge/ccc-bridge.md +16 -15
  29. package/src/knowledge/overview.md +11 -11
  30. package/src/knowledge/progressive-capability.md +3 -3
  31. package/src/knowledge/provenance-tracking.md +9 -3
  32. package/src/knowledge/qmd-registry.md +8 -8
  33. package/src/knowledge/skf-knowledge-index.csv +2 -2
  34. package/src/knowledge/skill-lifecycle.md +16 -1
  35. package/src/knowledge/split-body-strategy.md +1 -1
  36. package/src/knowledge/version-paths.md +17 -12
  37. package/src/module-help.csv +18 -17
  38. package/src/shared/health-check.md +372 -0
  39. package/src/shared/references/feasibility-report-schema.md +86 -0
  40. package/src/shared/references/headless-gate-convention.md +62 -0
  41. package/src/shared/references/output-contract-schema.md +35 -0
  42. package/src/shared/references/pipeline-contracts.md +102 -0
  43. package/src/shared/scripts/skf-atomic-write.py +370 -0
  44. package/src/shared/scripts/skf-manifest-ops.py +236 -0
  45. package/src/shared/scripts/skf-preflight.py +164 -0
  46. package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
  47. package/src/shared/scripts/skf-severity-classify.py +163 -0
  48. package/src/shared/scripts/skf-skill-inventory.py +210 -0
  49. package/src/shared/scripts/skf-structural-diff.py +257 -0
  50. package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
  51. package/src/shared/scripts/skf-validate-output.py +247 -0
  52. package/src/skf-analyze-source/SKILL.md +57 -0
  53. package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
  54. package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
  55. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
  56. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
  57. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
  58. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
  59. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
  60. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
  61. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -71
  62. package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
  63. package/src/skf-audit-skill/SKILL.md +59 -0
  64. package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
  65. package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
  66. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
  67. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
  68. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
  69. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
  70. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
  71. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -64
  72. package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
  73. package/src/skf-brief-skill/SKILL.md +53 -0
  74. package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
  75. package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
  76. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
  77. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
  78. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
  79. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
  80. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -70
  81. package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
  82. package/src/skf-create-skill/SKILL.md +63 -0
  83. package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
  84. package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
  85. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
  86. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
  87. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
  88. package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
  89. package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
  90. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
  91. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
  92. package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
  93. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
  94. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
  95. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
  96. package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
  97. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
  98. package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
  99. package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
  100. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
  101. package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
  102. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
  103. package/src/skf-create-stack-skill/SKILL.md +64 -0
  104. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
  105. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
  106. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
  107. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
  108. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
  109. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
  110. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
  111. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
  112. package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
  113. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
  114. package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
  115. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
  116. package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
  117. package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
  118. package/src/skf-drop-skill/SKILL.md +57 -0
  119. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
  120. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
  121. package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
  122. package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
  123. package/src/skf-export-skill/SKILL.md +57 -0
  124. package/src/skf-export-skill/assets/managed-section-format.md +138 -0
  125. package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
  126. package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
  127. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
  128. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
  129. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
  130. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
  131. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +16 -68
  132. package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
  133. package/src/skf-forger/SKILL.md +110 -0
  134. package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
  135. package/src/skf-quick-skill/SKILL.md +56 -0
  136. package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
  137. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
  138. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
  139. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
  140. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
  141. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
  142. package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
  143. package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
  144. package/src/skf-refine-architecture/SKILL.md +57 -0
  145. package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
  146. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
  147. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
  148. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
  149. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
  150. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
  151. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +11 -64
  152. package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
  153. package/src/skf-rename-skill/SKILL.md +58 -0
  154. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
  155. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
  156. package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
  157. package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
  158. package/src/skf-setup/SKILL.md +55 -0
  159. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
  160. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
  161. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
  162. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
  163. package/src/skf-setup/steps-c/step-04-report.md +92 -0
  164. package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
  165. package/src/skf-test-skill/SKILL.md +59 -0
  166. package/src/skf-test-skill/references/migration-section-rules.md +114 -0
  167. package/src/skf-test-skill/references/scoring-rules.md +207 -0
  168. package/src/skf-test-skill/references/source-access-protocol.md +109 -0
  169. package/src/skf-test-skill/scripts/compute-score.py +310 -0
  170. package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
  171. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
  172. package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
  173. package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
  174. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
  175. package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
  176. package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
  177. package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
  178. package/src/skf-test-skill/templates/test-report-template.md +58 -0
  179. package/src/skf-update-skill/SKILL.md +58 -0
  180. package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
  181. package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
  182. package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
  183. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
  184. package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
  185. package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
  186. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
  187. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
  188. package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
  189. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -69
  190. package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
  191. package/src/skf-verify-stack/SKILL.md +60 -0
  192. package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
  193. package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
  194. package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
  195. package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
  196. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
  197. package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
  198. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
  199. package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
  200. package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
  201. package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
  202. package/tools/cli/commands/install.js +4 -1
  203. package/tools/cli/commands/status.js +21 -23
  204. package/tools/cli/commands/uninstall.js +11 -19
  205. package/tools/cli/commands/update.js +6 -4
  206. package/tools/cli/lib/ide-skills.js +216 -0
  207. package/tools/cli/lib/installer.js +29 -52
  208. package/tools/cli/lib/manifest.js +11 -5
  209. package/tools/cli/lib/platform-codes.yaml +223 -0
  210. package/tools/cli/lib/ui.js +76 -47
  211. package/tools/validate-docs-drift.js +193 -0
  212. package/src/agents/forger.agent.yaml +0 -114
  213. package/src/workflows/README.md +0 -174
  214. package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
  215. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
  216. package/src/workflows/analyze-source/workflow.md +0 -61
  217. package/src/workflows/audit-skill/workflow.md +0 -64
  218. package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
  219. package/src/workflows/brief-skill/workflow.md +0 -58
  220. package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
  221. package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
  222. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
  223. package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
  224. package/src/workflows/create-skill/steps-c/step-08-report.md +0 -179
  225. package/src/workflows/create-skill/workflow.md +0 -53
  226. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
  227. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
  228. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -150
  229. package/src/workflows/create-stack-skill/workflow.md +0 -59
  230. package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -136
  231. package/src/workflows/drop-skill/workflow.md +0 -63
  232. package/src/workflows/export-skill/data/managed-section-format.md +0 -103
  233. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
  234. package/src/workflows/export-skill/workflow.md +0 -58
  235. package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -178
  236. package/src/workflows/quick-skill/workflow.md +0 -58
  237. package/src/workflows/refine-architecture/workflow.md +0 -61
  238. package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -133
  239. package/src/workflows/rename-skill/workflow.md +0 -64
  240. package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -159
  241. package/src/workflows/setup-forge/workflow.md +0 -51
  242. package/src/workflows/shared/health-check.md +0 -231
  243. package/src/workflows/test-skill/data/scoring-rules.md +0 -123
  244. package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
  245. package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
  246. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
  247. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
  248. package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
  249. package/src/workflows/test-skill/steps-c/step-06-report.md +0 -208
  250. package/src/workflows/test-skill/templates/test-report-template.md +0 -28
  251. package/src/workflows/test-skill/workflow.md +0 -57
  252. package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
  253. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
  254. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
  255. package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
  256. package/src/workflows/update-skill/workflow.md +0 -56
  257. package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
  258. package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
  259. package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
  260. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
  261. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
  262. package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -200
  263. package/src/workflows/verify-stack/workflow.md +0 -61
  264. package/tools/cli/lib/compiler.js +0 -306
  265. package/tools/cli/lib/ide-commands.js +0 -244
  266. /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
  267. /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
  268. /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
  269. /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
@@ -1,10 +1,7 @@
1
1
  ---
2
- name: 'step-04-map-and-detect'
3
- description: 'Map exports per unit and detect cross-unit integration points, flag stack skill candidates'
4
-
5
2
  nextStepFile: './step-05-recommend.md'
6
3
  outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
- heuristicsFile: '../data/unit-detection-heuristics.md'
4
+ heuristicsFile: 'references/unit-detection-heuristics.md'
8
5
  ---
9
6
 
10
7
  # Step 4: Map Exports and Detect Integrations
@@ -13,46 +10,12 @@ heuristicsFile: '../data/unit-detection-heuristics.md'
13
10
 
14
11
  To analyze each qualifying unit's export surface and import graph, detect cross-unit integration points, and flag potential stack skill candidates — completing the analysis foundation needed for recommendations.
15
12
 
16
- ## MANDATORY EXECUTION RULES (READ FIRST):
17
-
18
- ### Universal Rules:
19
-
20
- - 🛑 NEVER generate content without user input
21
- - 📖 CRITICAL: Read the complete step file before taking any action
22
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
23
- - 📋 YOU ARE A FACILITATOR, not a content generator
24
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
25
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
26
-
27
- ### Role Reinforcement:
28
-
29
- - ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
30
- - ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
31
- - ✅ Prescriptive precision — zero-hallucination, only report what is found
32
- - ✅ File:line citation tracing — cite specific files and line numbers for all claims
33
-
34
- ### Step-Specific Rules:
35
-
36
- - 🎯 Use subprocess optimization (Pattern 2 — per-unit deep analysis): In Claude Code, use Agent tool for each unit sequentially. In CLI, use a per-unit script. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
37
- - 💬 DO NOT BE LAZY — For EACH qualifying unit, perform thorough export surface analysis
38
- - 🚫 FORBIDDEN to make recommendations in this step (that's step 05)
39
- - 📋 Tier-aware depth: Quick (file-level exports), Forge (AST export analysis), Deep (AST + semantic relationships)
40
-
41
- **AST Degradation Fallback:** If the AST tool (ast-grep) is unavailable at Forge or Deep tier, degrade to Quick-tier behavior for this step and emit a warning: "AST tool unavailable — falling back to file-level export mapping for this step."
42
-
43
- ## EXECUTION PROTOCOLS:
13
+ ## Rules
44
14
 
45
- - 🎯 Follow the MANDATORY SEQUENCE exactly
46
- - 💾 Append "## Export Map" and "## Integration Points" sections to {outputFile}
47
- - 📖 Update stepsCompleted in {outputFile} frontmatter
48
- - 🚫 FORBIDDEN to proceed without presenting findings to user
49
-
50
- ## CONTEXT BOUNDARIES:
51
-
52
- - Available: Identified Units section from report (qualifying units with paths, types, scope types, languages)
53
- - Focus: Export surfaces, import graphs, and cross-unit integration patterns
54
- - Limits: Do not recommend or filter units — present all findings objectively
55
- - Dependencies: step-03-identify-units must have populated the Identified Units section
15
+ - Use subprocess Pattern 2 (per-unit deep analysis) when available
16
+ - For each qualifying unit, perform thorough export surface analysis do not shortcut
17
+ - Do not make recommendations (Step 05)
18
+ - Tier-aware depth: Quick (file-level), Forge (AST), Deep (AST + semantic)
56
19
 
57
20
  ## MANDATORY SEQUENCE
58
21
 
@@ -82,7 +45,7 @@ DO NOT BE LAZY — For EACH qualifying unit, launch a subprocess (or analyze in
82
45
  - **Quick tier:** Count files by type, identify index/barrel files, list directory structure
83
46
  - **Forge tier:** Parse export statements, identify public API surface, count exported functions/classes/types
84
47
  - **Forge+ tier:** All Forge analysis plus:
85
- - If `tools.ccc` is true: run `ccc_bridge.search("{unit_name} exports public API", top_k=15)` — **Tool resolution:** `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `ccc search` CLI; see [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md) — to discover semantically relevant files beyond directory scan
48
+ - If `tools.ccc` is true: run `ccc_bridge.search("{unit_name} exports public API", top_k=15)` — **Tool resolution:** `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `ccc search` CLI; see `knowledge/tool-resolution.md` — to discover semantically relevant files beyond directory scan
86
49
  - Merge CCC-discovered files with scoped file list — files from CCC that are within the unit's directory are added to the analysis queue
87
50
  - Record CCC signals in per-unit findings: top 3 CCC-ranked file names (or "—" if no ccc results)
88
51
  - **Deep tier:** All Forge analysis plus:
@@ -216,27 +179,3 @@ Display: "**Select:** [C] Continue to Recommendations | [D] Discover Additional
216
179
 
217
180
  ONLY WHEN both the Export Map and Integration Points sections have been appended to {outputFile} with complete findings, and frontmatter stepsCompleted and stack_skill_candidates have been updated, will you load and read fully {nextStepFile} to begin recommendations.
218
181
 
219
- ---
220
-
221
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
222
-
223
- ### ✅ SUCCESS:
224
-
225
- - Every qualifying unit's export surface mapped with tier-appropriate depth
226
- - Import graph built showing cross-unit dependencies
227
- - Integration points documented with coupling strength
228
- - Stack skill candidates flagged with evidence
229
- - Findings presented to user for confirmation
230
- - Report updated with both Export Map and Integration Points sections
231
- - stepsCompleted and stack_skill_candidates updated in frontmatter
232
-
233
- ### ❌ SYSTEM FAILURE:
234
-
235
- - Skipping units during export analysis (DO NOT BE LAZY)
236
- - Not building the cross-reference matrix
237
- - Missing stack skill candidate detection
238
- - Making recommendations in this step (that's step 05)
239
- - Not citing specific files for integration points
240
- - Not presenting findings for user confirmation
241
-
242
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,10 +1,7 @@
1
1
  ---
2
- name: 'step-05-recommend'
3
- description: 'Present unit recommendations with rationale for user confirmation or rejection'
4
-
5
2
  nextStepFile: './step-06-generate-briefs.md'
6
3
  outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
- schemaFile: '../data/skill-brief-schema.md'
4
+ schemaFile: 'assets/skill-brief-schema.md'
8
5
  advancedElicitationSkill: '/bmad-advanced-elicitation'
9
6
  partyModeSkill: '/bmad-party-mode'
10
7
  ---
@@ -15,44 +12,11 @@ partyModeSkill: '/bmad-party-mode'
15
12
 
16
13
  To present each qualifying unit as a recommendation with evidence-based rationale, allow the user to confirm, reject, or modify each recommendation, and build the confirmed units list that drives brief generation.
17
14
 
18
- ## MANDATORY EXECUTION RULES (READ FIRST):
19
-
20
- ### Universal Rules:
21
-
22
- - 🛑 NEVER generate content without user input
23
- - 📖 CRITICAL: Read the complete step file before taking any action
24
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
25
- - 📋 YOU ARE A FACILITATOR, not a content generator
26
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
27
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
28
-
29
- ### Role Reinforcement:
30
-
31
- - ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
32
- - ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
33
- - ✅ Prescriptive precision — zero-hallucination, every recommendation backed by evidence
34
- - ✅ This is the COLLABORATIVE GATE — user must explicitly confirm each unit
35
-
36
- ### Step-Specific Rules:
37
-
38
- - 🎯 This is the primary user decision point — do NOT rush through it
39
- - 🚫 FORBIDDEN to proceed without explicit confirmation for each unit
40
- - 💬 Present evidence for each recommendation, invite questions and pushback
41
- - 📋 User can ask "why?" for any recommendation — explain with specific file citations
42
-
43
- ## EXECUTION PROTOCOLS:
44
-
45
- - 🎯 Follow the MANDATORY SEQUENCE exactly
46
- - 💾 Append "## Recommendations" section to {outputFile}
47
- - 📖 Update stepsCompleted and confirmed_units in {outputFile} frontmatter
48
- - 🚫 FORBIDDEN to generate briefs in this step (that's step 06)
15
+ ## Rules
49
16
 
50
- ## CONTEXT BOUNDARIES:
51
-
52
- - Available: Full report Project Scan, Identified Units, Export Map, Integration Points
53
- - Focus: Presenting evidence-based recommendations and capturing user decisions
54
- - Limits: Do not generate skill-brief.yaml files — only confirm which units to brief
55
- - Dependencies: steps 02-04 must have populated scan, units, exports, and integrations
17
+ - This is the primary user decision point — do not rush through it
18
+ - Do not proceed without explicit confirmation for each unit
19
+ - Present evidence for each recommendation, invite questions and pushback
56
20
 
57
21
  ## MANDATORY SEQUENCE
58
22
 
@@ -202,6 +166,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [D] Disc
202
166
  #### EXECUTION RULES:
203
167
 
204
168
  - ALWAYS halt and wait for user input after presenting menu
169
+ - **GATE [default: C]** — If `{headless_mode}`: accept all recommendations and auto-proceed, log: "headless: auto-accept all recommendations"
205
170
  - ONLY proceed to next step when user selects 'C'
206
171
  - After other menu items execution, return to this menu
207
172
  - User can chat or ask questions — always respond and then redisplay menu
@@ -210,28 +175,3 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [D] Disc
210
175
 
211
176
  ONLY WHEN all units have explicit user decisions (Y/N/M), the confirmed_units list is finalized in frontmatter, and the user has given final confirmation, will you load and read fully {nextStepFile} to begin brief generation.
212
177
 
213
- ---
214
-
215
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
216
-
217
- ### ✅ SUCCESS:
218
-
219
- - Every qualifying unit presented with evidence-based recommendation
220
- - User explicitly decided on each unit (Y/N/M)
221
- - Modifications captured and confirmed
222
- - Stack skill candidates addressed
223
- - Already-skilled units directed to update-skill
224
- - Final confirmation obtained before proceeding
225
- - Report updated with complete Recommendations section
226
- - confirmed_units populated in frontmatter
227
-
228
- ### ❌ SYSTEM FAILURE:
229
-
230
- - Auto-confirming units without user decision
231
- - Not presenting evidence/rationale for recommendations
232
- - Skipping the final confirmation
233
- - Generating skill-brief.yaml files in this step (that's step 06)
234
- - Not documenting rejection reasons
235
- - Proceeding with empty confirmed_units list without user acknowledgment
236
-
237
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,10 +1,7 @@
1
1
  ---
2
- name: 'step-06-generate-briefs'
3
- description: 'Generate skill-brief.yaml per confirmed unit, write analysis summary, recommend next workflow'
4
-
5
2
  outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
6
- schemaFile: '../data/skill-brief-schema.md'
7
- nextStepFile: '../../shared/health-check.md'
3
+ schemaFile: 'assets/skill-brief-schema.md'
4
+ nextStepFile: './step-07-health-check.md'
8
5
  ---
9
6
 
10
7
  # Step 6: Generate Briefs
@@ -13,44 +10,12 @@ nextStepFile: '../../shared/health-check.md'
13
10
 
14
11
  To generate a valid skill-brief.yaml file for each confirmed unit using the schema, write the files to the forge data folder, append generation results to the analysis report, and recommend the appropriate next workflow for each unit — completing the analyze-source workflow.
15
12
 
16
- ## MANDATORY EXECUTION RULES (READ FIRST):
17
-
18
- ### Universal Rules:
19
-
20
- - 🛑 NEVER generate content without user input
21
- - 📖 CRITICAL: Read the complete step file before taking any action
22
- - 📋 YOU ARE A FACILITATOR, not a content generator
23
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
24
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
25
-
26
- ### Role Reinforcement:
27
-
28
- - ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
29
- - ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
30
- - ✅ Prescriptive precision — zero-hallucination, every brief field backed by evidence from prior steps
31
- - ✅ This is the GENERATION step — produce files that are immediately consumable by downstream workflows
32
-
33
- ### Step-Specific Rules:
34
-
35
- - 🎯 Generate ONLY for units in confirmed_units — no extras, no omissions
36
- - 🚫 FORBIDDEN to modify recommendations or re-ask for confirmations (that was step 05)
37
- - 💬 Every generated field must trace back to data collected in steps 02-05
38
- - 📋 Validate each brief against the schema before writing
39
-
40
- ## EXECUTION PROTOCOLS:
13
+ ## Rules
41
14
 
42
- - 🎯 Follow the MANDATORY SEQUENCE exactly
43
- - 💾 Write skill-brief.yaml files to `{forge_data_folder}/{unit-name}/`
44
- - 💾 Append "## Generation Results" section to {outputFile}
45
- - 📖 Update stepsCompleted and mark workflow COMPLETE in {outputFile} frontmatter
46
- - 🚫 FORBIDDEN to skip validation of generated briefs
47
-
48
- ## CONTEXT BOUNDARIES:
49
-
50
- - Available: Full report — all sections from steps 02-05, confirmed_units list, stack_skill_candidates
51
- - Focus: YAML generation, file writing, downstream workflow recommendation
52
- - Limits: Do not re-analyze source code — use only data already captured in the report
53
- - Dependencies: step-05-recommend must have populated confirmed_units with at least one entry
15
+ - Generate only for units in confirmed_units — no extras, no omissions
16
+ - Do not modify recommendations or re-ask for confirmations
17
+ - Every generated field must trace back to data collected in steps 02-05
18
+ - Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing summary is NOT the terminal step
54
19
 
55
20
  ## MANDATORY SEQUENCE
56
21
 
@@ -186,9 +151,9 @@ lastStep: 'step-06-generate-briefs'
186
151
  nextWorkflow: '{primary recommendation}'
187
152
  ```
188
153
 
189
- ### 8. Present Completion Summary
154
+ ### 8. Present Summary
190
155
 
191
- "**Analyze-Source Workflow Complete**
156
+ "**Analyze-Source Summary**
192
157
 
193
158
  **Project:** {project_name}
194
159
  **Forge Tier:** {forge_tier}
@@ -211,35 +176,13 @@ nextWorkflow: '{primary recommendation}'
211
176
  **Stack Skill Candidates:**
212
177
  {List candidates with recommendation to run create-stack-skill after individual skills are created}
213
178
 
214
- **This analysis is complete.** To refine any brief, run the recommended next workflow. To re-analyze with different scope, run analyze-source again."
215
-
216
- ### 9. Workflow Health Check
217
-
218
- Load and execute `{nextStepFile}` for workflow self-improvement check.
219
-
220
- ---
221
-
222
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
179
+ To refine any brief, run the recommended next workflow. To re-analyze with different scope, run analyze-source again."
223
180
 
224
- ### SUCCESS:
181
+ ### 9. Result Contract
225
182
 
226
- - Every confirmed unit has a skill-brief.yaml generated and validated
227
- - All required schema fields present and all 8 validation rules passed in each brief
228
- - Files written to correct paths in forge_data_folder
229
- - User confirmed before files were written
230
- - Next workflow recommended per unit
231
- - Generation Results section appended to report
232
- - stepsCompleted fully populated and workflow marked complete
233
- - Completion summary presented with clear next steps
183
+ Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{forge_data_folder}/analyze-source-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{forge_data_folder}/analyze-source-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include all generated `skill-brief.yaml` paths in `outputs` and brief counts in `summary`.
234
184
 
235
- ### SYSTEM FAILURE:
185
+ ### 10. Chain to Health Check
236
186
 
237
- - Generating briefs for units NOT in confirmed_units
238
- - Writing files without user confirmation
239
- - Missing required schema fields in generated YAML
240
- - Not validating briefs against schema before writing
241
- - Re-analyzing source code instead of using report data
242
- - Not recommending next workflow per unit
243
- - Not marking workflow as complete in frontmatter
187
+ ONLY WHEN the briefs have been written (or skipped per user abort), the report updated, the summary presented, and the result contract saved will you then load, read the full file, and execute `{nextStepFile}`. The health-check step is the true terminal step — do not stop here even though the summary reads as final.
244
188
 
245
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,22 @@
1
+ ---
2
+ # `shared/health-check.md` resolves relative to the SKF module root
3
+ # (`_bmad/skf/` when installed, `src/` during development), NOT relative
4
+ # to this step file.
5
+ nextStepFile: 'shared/health-check.md'
6
+ ---
7
+
8
+ # Step 7: Workflow Health Check
9
+
10
+ ## STEP GOAL:
11
+
12
+ Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of analyze-source — after the shared health check completes, the workflow is fully done.
13
+
14
+ ## Rules
15
+
16
+ - No user-facing reports, file writes, or result contracts in this step — those belong in step-06
17
+ - Delegate directly to `{nextStepFile}` with no additional commentary
18
+ - Do not attempt any other action between loading this step and executing `{nextStepFile}`
19
+
20
+ ## MANDATORY SEQUENCE
21
+
22
+ Load `{nextStepFile}`, read it fully, then execute it.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: skf-audit-skill
3
+ description: Drift detection between skill and current source code. Use when the user requests to "audit a skill" or "audit skill" for drift.
4
+ ---
5
+
6
+ # Audit Skill
7
+
8
+ ## Overview
9
+
10
+ Detects drift between an existing skill and its current source code, producing a severity-graded drift report with AST-backed findings and actionable remediation suggestions. Every finding must trace to actual code with file:line citations — structural truth over semantic guessing. Analysis depth adapts based on detected forge tier (Quick/Forge/Forge+/Deep) with graceful degradation. Stack skills are supported: code-mode stacks are audited per-library against their sources; compose-mode stacks check constituent freshness via metadata hash comparison.
11
+
12
+ ## Role
13
+
14
+ You are a skill auditor operating in Ferris Audit mode. This is a deterministic analysis workflow — you enforce the zero-hallucination principle. You bring AST analysis expertise and drift detection methodology, while the source code provides the ground truth.
15
+
16
+ ## Workflow Rules
17
+
18
+ These rules apply to every step in this workflow:
19
+
20
+ - Never fabricate findings — all data must trace to source code with file:line citations
21
+ - Read each step file completely before taking any action
22
+ - Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
23
+ - Only load one step file at a time — never preload future steps
24
+ - Update `stepsCompleted` in output file frontmatter before loading next step
25
+ - If any instruction references a subprocess or tool you lack, achieve the outcome in your main context thread
26
+ - Always communicate in `{communication_language}`
27
+ - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
28
+
29
+ ## Stages
30
+
31
+ | # | Step | File | Auto-proceed |
32
+ |---|------|------|--------------|
33
+ | 1 | Initialize & Baseline | steps-c/step-01-init.md | No (confirm) |
34
+ | 2 | Re-Index Source | steps-c/step-02-re-index.md | Yes |
35
+ | 3 | Structural Diff | steps-c/step-03-structural-diff.md | Yes |
36
+ | 4 | Semantic Diff | steps-c/step-04-semantic-diff.md | Yes (skip at non-Deep) |
37
+ | 5 | Severity Classification | steps-c/step-05-severity-classify.md | Yes |
38
+ | 6 | Report | steps-c/step-06-report.md | Yes |
39
+ | 7 | Workflow Health Check | steps-c/step-07-health-check.md | Yes |
40
+
41
+ ## Invocation Contract
42
+
43
+ | Aspect | Detail |
44
+ |--------|--------|
45
+ | **Inputs** | skill_name [required] |
46
+ | **Gates** | step-01: Confirm Gate [C] |
47
+ | **Outputs** | drift-report-{timestamp}.md with drift_score and nextWorkflow |
48
+ | **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
49
+
50
+ ## On Activation
51
+
52
+ 1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
53
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
54
+ - `skills_output_folder`, `forge_data_folder`, `sidecar_path`
55
+ - Generate and store `timestamp` as `YYYYMMDD-HHmmss` format. This value is fixed for the entire workflow run.
56
+
57
+ 2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
58
+
59
+ 3. Load, read the full file, and then execute `./steps-c/step-01-init.md` to begin the workflow.
@@ -23,13 +23,13 @@ previousWorkflow: 'create-skill'
23
23
  **Date:** {date}
24
24
  **Overall Drift Score:** {drift_score}
25
25
 
26
- | Category | Count |
27
- |----------|-------|
28
- | CRITICAL | |
29
- | HIGH | |
30
- | MEDIUM | |
31
- | LOW | |
32
- | **Total** | |
26
+ | Category | Count |
27
+ |-----------|-------|
28
+ | CRITICAL | |
29
+ | HIGH | |
30
+ | MEDIUM | |
31
+ | LOW | |
32
+ | **Total** | |
33
33
 
34
34
  ---
35
35
 
@@ -35,18 +35,18 @@
35
35
 
36
36
  ## Overall Drift Score
37
37
 
38
- | Score | Criteria |
39
- |-------|----------|
40
- | CLEAN | 0 findings at any level |
41
- | MINOR | LOW findings only, no MEDIUM+ |
38
+ | Score | Criteria |
39
+ |-------------|------------------------------------------|
40
+ | CLEAN | 0 findings at any level |
41
+ | MINOR | LOW findings only, no MEDIUM+ |
42
42
  | SIGNIFICANT | Any MEDIUM or HIGH findings, no CRITICAL |
43
- | CRITICAL | Any CRITICAL findings present |
43
+ | CRITICAL | Any CRITICAL findings present |
44
44
 
45
45
  ## Confidence Tier Labels
46
46
 
47
- | Label | Source | Reliability |
48
- |-------|--------|-------------|
49
- | T1 | AST extraction (ast-grep) | High — structural truth |
50
- | T1-low | Text pattern matching (no AST) | Moderate — pattern-based |
51
- | T2 | QMD semantic context | High — evidence-backed temporal context |
52
- | T3 | External documentation reference | Variable — secondary source |
47
+ | Label | Source | Reliability |
48
+ |--------|----------------------------------|-----------------------------------------|
49
+ | T1 | AST extraction (ast-grep) | High — structural truth |
50
+ | T1-low | Text pattern matching (no AST) | Moderate — pattern-based |
51
+ | T2 | QMD semantic context | High — evidence-backed temporal context |
52
+ | T3 | External documentation reference | Variable — secondary source |
@@ -1,10 +1,7 @@
1
1
  ---
2
- name: 'step-01-init'
3
- description: 'Load existing skill, provenance map, and detect forge tier for drift analysis'
4
-
5
2
  nextStepFile: './step-02-re-index.md'
6
3
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
7
- templateFile: '../data/drift-report-template.md'
4
+ templateFile: 'assets/drift-report-template.md'
8
5
  ---
9
6
 
10
7
  # Step 1: Initialize Audit
@@ -13,45 +10,12 @@ templateFile: '../data/drift-report-template.md'
13
10
 
14
11
  Load the existing skill artifacts, provenance map, and forge tier configuration to establish the baseline for drift detection. Create the drift report document and present a baseline summary for user confirmation before proceeding with analysis.
15
12
 
16
- ## MANDATORY EXECUTION RULES (READ FIRST):
17
-
18
- ### Universal Rules:
19
-
20
- - 🛑 NEVER generate content without user input
21
- - 📖 CRITICAL: Read the complete step file before taking any action
22
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
23
- - 📋 YOU ARE A FACILITATOR, not a content generator
24
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
25
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
26
-
27
- ### Role Reinforcement:
28
-
29
- - ✅ You are a skill auditor operating in Ferris Audit mode
30
- - ✅ Every finding must trace to actual code with file:line citations
31
- - ✅ You enforce the zero-hallucination principle: structural truth over semantic guessing
32
- - ✅ You bring AST analysis expertise, the source code provides ground truth
33
-
34
- ### Step-Specific Rules:
13
+ ## Rules
35
14
 
36
- - 🎯 Focus only on loading skill artifacts and establishing the baseline
37
- - 🚫 FORBIDDEN to perform any diff or analysis that happens in later steps
38
- - 🚫 FORBIDDEN to proceed if skill path is invalid or SKILL.md not found
39
- - 💬 Present baseline summary clearly so user can confirm before analysis begins
40
-
41
- ## EXECUTION PROTOCOLS:
42
-
43
- - 🎯 Discover and load all required input artifacts
44
- - 💾 Create drift report from {templateFile} with populated frontmatter
45
- - 📖 Track loaded artifacts in report frontmatter
46
- - 🚫 Do not proceed to analysis without user confirmation at the gate
47
-
48
- ## CONTEXT BOUNDARIES:
49
-
50
- - Available: User-provided skill path, SKF module config variables
51
- - Focus: Loading and validating all inputs needed for drift analysis
52
- - Limits: Do not analyze or compare — only load and baseline
53
- - Dependencies: setup-forge must be completed (forge-tier.yaml exists), skill must have been created by create-skill (provenance-map.json exists for source-based skills)
54
- - Docs-only limitation: If `metadata.json` indicates `source_type: "docs-only"` or `confidence_tier: "Quick"` with all T3 citations, inform user: "**This is a docs-only skill.** Drift detection compares against upstream documentation, not source code. Re-run `@Ferris US` to re-fetch documentation URLs and detect content changes." Audit-skill's structural diff is not applicable to docs-only skills — recommend update-skill instead.
15
+ - Focus only on loading skill artifacts and establishing the baseline — do not perform any diff or analysis
16
+ - Do not proceed if skill path is invalid or SKILL.md not found
17
+ - Present baseline summary clearly so user can confirm before analysis begins
18
+ - Docs-only limitation: If `metadata.json` indicates `source_type: "docs-only"` or `confidence_tier: "Quick"` with all T3 citations, inform user: "**This is a docs-only skill.** Drift detection compares against upstream documentation, not source code. Re-run `@Ferris US` to re-fetch documentation URLs and detect content changes." Recommend update-skill instead.
55
19
 
56
20
  ## MANDATORY SEQUENCE
57
21
 
@@ -63,7 +27,7 @@ Load the existing skill artifacts, provenance map, and forge tier configuration
63
27
 
64
28
  Which skill would you like to audit? Please provide the skill name or path."
65
29
 
66
- **If user provides skill name (not full path) — version-aware path resolution (see [knowledge/version-paths.md](../../../knowledge/version-paths.md)):**
30
+ **If user provides skill name (not full path) — version-aware path resolution (see `knowledge/version-paths.md`):**
67
31
  1. Read `{skills_output_folder}/.export-manifest.json` and look up the skill name in `exports` to get `active_version`
68
32
  2. If found: resolve to `{skill_package}` = `{skills_output_folder}/{skill_name}/{active_version}/{skill_name}/`
69
33
  3. If not in manifest: check for `active` symlink at `{skills_output_folder}/{skill_name}/active` — resolve to `{skill_group}/active/{skill_name}/`
@@ -87,7 +51,7 @@ Load `{sidecar_path}/forge-tier.yaml` to detect available tools.
87
51
 
88
52
  **If found:**
89
53
  - Extract tier level: Quick / Forge / Forge+ / Deep
90
- - Extract available tools: gh_bridge, ast_bridge, qmd_bridge — see [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md) for concrete tool resolution per IDE
54
+ - Extract available tools: gh_bridge, ast_bridge, qmd_bridge — see `knowledge/tool-resolution.md` for concrete tool resolution per IDE
91
55
 
92
56
  **Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
93
57
 
@@ -120,6 +84,21 @@ Search for provenance map at `{forge_data_folder}/{skill_name}/{active_version}/
120
84
  - "**[X]** — abort audit"
121
85
  - Wait for user selection. If D, set `degraded_mode: true`. If X, halt workflow.
122
86
 
87
+ ### Stack Skill Detection
88
+
89
+ After loading provenance-map.json, detect skill type:
90
+ - If `provenance_version` is `"2.0"` and `skill_type` is `"stack"`: set `{is_stack_skill}` = true
91
+ - If provenance-map has top-level `libraries` key (v1 stack format): set `{is_stack_skill}` = true, `{legacy_stack_provenance}` = true
92
+ - Otherwise: `{is_stack_skill}` = false
93
+
94
+ If `{is_stack_skill}` is true and `constituents` array is present (compose-mode stack):
95
+ - For each constituent, compute the current metadata hash: read `{constituent.skill_path}/active/{constituent.skill_name}/metadata.json` and compute SHA-256
96
+ - Compare against `constituent.metadata_hash`
97
+ - Flag any mismatches as **constituent drift** with severity HIGH
98
+ - Record constituent freshness results for the report
99
+
100
+ If `{legacy_stack_provenance}` is true: log a note that this stack uses v1 provenance format with reduced audit depth (library-level only, no per-export verification).
101
+
123
102
  ### 5. Resolve Source Path
124
103
 
125
104
  **If provenance map loaded:**
@@ -173,33 +152,10 @@ Display: "**Select:** [C] Continue to Analysis"
173
152
  #### EXECUTION RULES:
174
153
 
175
154
  - ALWAYS halt and wait for user input after presenting menu
155
+ - **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-continue past baseline confirmation"
176
156
  - ONLY proceed to next step when user selects 'C'
177
157
 
178
158
  ## CRITICAL STEP COMPLETION NOTE
179
159
 
180
160
  ONLY WHEN C is selected and the drift report has been created with baseline data populated, will you then load and read fully `{nextStepFile}` to execute and begin source re-indexing.
181
161
 
182
- ---
183
-
184
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
185
-
186
- ### ✅ SUCCESS:
187
-
188
- - Skill artifacts loaded (SKILL.md, metadata.json)
189
- - Forge tier detected from sidecar (and override applied if set in preferences.yaml)
190
- - Provenance map loaded (or degraded mode confirmed)
191
- - Source path resolved and validated
192
- - Drift report created from template with populated frontmatter
193
- - Baseline summary presented to user
194
- - User confirmed via [C] Continue
195
-
196
- ### ❌ SYSTEM FAILURE:
197
-
198
- - Proceeding without valid skill path
199
- - Not loading provenance map or offering degraded mode
200
- - Not detecting forge tier
201
- - Performing analysis in this step (analysis is Steps 02-05)
202
- - Proceeding without user confirmation at the gate
203
- - Hardcoded paths instead of frontmatter variables
204
-
205
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.