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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/.claude-plugin/marketplace.json +39 -0
  2. package/.gitattributes +16 -0
  3. package/README.md +105 -38
  4. package/docs/404.md +13 -10
  5. package/docs/RELEASING.md +185 -0
  6. package/docs/STABILITY.md +123 -0
  7. package/docs/_data/pinned.yaml +98 -0
  8. package/docs/agents.md +16 -11
  9. package/docs/architecture.md +221 -0
  10. package/docs/bmad-synergy.md +11 -13
  11. package/docs/concepts.md +18 -108
  12. package/docs/examples.md +121 -80
  13. package/docs/getting-started.md +85 -147
  14. package/docs/how-it-works.md +25 -536
  15. package/docs/index.md +44 -27
  16. package/docs/skill-model.md +328 -0
  17. package/docs/troubleshooting.md +39 -0
  18. package/docs/verifying-a-skill.md +232 -0
  19. package/docs/why-skf.md +93 -0
  20. package/docs/workflows.md +119 -13
  21. package/package.json +25 -4
  22. package/src/README.md +23 -25
  23. package/src/forger/forge-tier.yaml +4 -2
  24. package/src/forger/preferences.yaml +7 -1
  25. package/src/knowledge/agentskills-spec.md +1 -1
  26. package/src/knowledge/architecture-verification.md +1 -1
  27. package/src/knowledge/ccc-bridge.md +16 -15
  28. package/src/knowledge/overview.md +11 -11
  29. package/src/knowledge/progressive-capability.md +3 -3
  30. package/src/knowledge/provenance-tracking.md +9 -3
  31. package/src/knowledge/qmd-registry.md +8 -8
  32. package/src/knowledge/skf-knowledge-index.csv +2 -2
  33. package/src/knowledge/skill-lifecycle.md +16 -1
  34. package/src/knowledge/split-body-strategy.md +1 -1
  35. package/src/knowledge/version-paths.md +17 -12
  36. package/src/module-help.csv +18 -17
  37. package/src/module.yaml +4 -0
  38. package/src/shared/health-check.md +372 -0
  39. package/src/shared/references/feasibility-report-schema.md +86 -0
  40. package/src/shared/references/headless-gate-convention.md +62 -0
  41. package/src/shared/references/output-contract-schema.md +35 -0
  42. package/src/shared/references/pipeline-contracts.md +102 -0
  43. package/src/shared/scripts/skf-atomic-write.py +370 -0
  44. package/src/shared/scripts/skf-manifest-ops.py +236 -0
  45. package/src/shared/scripts/skf-preflight.py +164 -0
  46. package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
  47. package/src/shared/scripts/skf-severity-classify.py +163 -0
  48. package/src/shared/scripts/skf-skill-inventory.py +210 -0
  49. package/src/shared/scripts/skf-structural-diff.py +257 -0
  50. package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
  51. package/src/shared/scripts/skf-validate-output.py +247 -0
  52. package/src/skf-analyze-source/SKILL.md +57 -0
  53. package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
  54. package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
  55. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
  56. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
  57. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
  58. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
  59. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
  60. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
  61. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
  62. package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
  63. package/src/skf-audit-skill/SKILL.md +59 -0
  64. package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
  65. package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
  66. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
  67. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
  68. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
  69. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
  70. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
  71. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
  72. package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
  73. package/src/skf-brief-skill/SKILL.md +53 -0
  74. package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
  75. package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
  76. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
  77. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
  78. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
  79. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
  80. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
  81. package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
  82. package/src/skf-create-skill/SKILL.md +63 -0
  83. package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
  84. package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
  85. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
  86. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
  87. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
  88. package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
  89. package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
  90. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
  91. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
  92. package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
  93. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
  94. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
  95. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
  96. package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
  97. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
  98. package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
  99. package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
  100. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
  101. package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
  102. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
  103. package/src/skf-create-stack-skill/SKILL.md +64 -0
  104. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
  105. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
  106. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
  107. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
  108. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
  109. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
  110. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
  111. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
  112. package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
  113. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
  114. package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
  115. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
  116. package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
  117. package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
  118. package/src/skf-drop-skill/SKILL.md +57 -0
  119. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
  120. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
  121. package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
  122. package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
  123. package/src/skf-export-skill/SKILL.md +57 -0
  124. package/src/skf-export-skill/assets/managed-section-format.md +138 -0
  125. package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
  126. package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
  127. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
  128. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
  129. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
  130. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
  131. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
  132. package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
  133. package/src/skf-forger/SKILL.md +110 -0
  134. package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
  135. package/src/skf-quick-skill/SKILL.md +56 -0
  136. package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
  137. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
  138. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
  139. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
  140. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
  141. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
  142. package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
  143. package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
  144. package/src/skf-refine-architecture/SKILL.md +57 -0
  145. package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
  146. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
  147. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
  148. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
  149. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
  150. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
  151. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
  152. package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
  153. package/src/skf-rename-skill/SKILL.md +58 -0
  154. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
  155. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
  156. package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
  157. package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
  158. package/src/skf-setup/SKILL.md +55 -0
  159. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
  160. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
  161. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
  162. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
  163. package/src/skf-setup/steps-c/step-04-report.md +92 -0
  164. package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
  165. package/src/skf-test-skill/SKILL.md +59 -0
  166. package/src/skf-test-skill/references/migration-section-rules.md +114 -0
  167. package/src/skf-test-skill/references/scoring-rules.md +207 -0
  168. package/src/skf-test-skill/references/source-access-protocol.md +109 -0
  169. package/src/skf-test-skill/scripts/compute-score.py +310 -0
  170. package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
  171. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
  172. package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
  173. package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
  174. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
  175. package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
  176. package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
  177. package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
  178. package/src/skf-test-skill/templates/test-report-template.md +58 -0
  179. package/src/skf-update-skill/SKILL.md +58 -0
  180. package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
  181. package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
  182. package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
  183. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
  184. package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
  185. package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
  186. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
  187. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
  188. package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
  189. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
  190. package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
  191. package/src/skf-verify-stack/SKILL.md +60 -0
  192. package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
  193. package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
  194. package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
  195. package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
  196. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
  197. package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
  198. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
  199. package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
  200. package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
  201. package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
  202. package/tools/cli/commands/install.js +1 -1
  203. package/tools/cli/commands/status.js +21 -23
  204. package/tools/cli/commands/uninstall.js +11 -19
  205. package/tools/cli/commands/update.js +2 -2
  206. package/tools/cli/lib/ide-skills.js +216 -0
  207. package/tools/cli/lib/installer.js +29 -52
  208. package/tools/cli/lib/manifest.js +11 -5
  209. package/tools/cli/lib/platform-codes.yaml +223 -0
  210. package/tools/cli/lib/ui.js +76 -47
  211. package/tools/validate-docs-drift.js +193 -0
  212. package/src/agents/forger.agent.yaml +0 -114
  213. package/src/workflows/README.md +0 -174
  214. package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
  215. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
  216. package/src/workflows/analyze-source/workflow.md +0 -61
  217. package/src/workflows/audit-skill/workflow.md +0 -64
  218. package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
  219. package/src/workflows/brief-skill/workflow.md +0 -58
  220. package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
  221. package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
  222. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
  223. package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
  224. package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
  225. package/src/workflows/create-skill/workflow.md +0 -53
  226. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
  227. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
  228. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
  229. package/src/workflows/create-stack-skill/workflow.md +0 -59
  230. package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
  231. package/src/workflows/drop-skill/workflow.md +0 -63
  232. package/src/workflows/export-skill/data/managed-section-format.md +0 -103
  233. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
  234. package/src/workflows/export-skill/workflow.md +0 -58
  235. package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
  236. package/src/workflows/quick-skill/workflow.md +0 -58
  237. package/src/workflows/refine-architecture/workflow.md +0 -61
  238. package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
  239. package/src/workflows/rename-skill/workflow.md +0 -64
  240. package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
  241. package/src/workflows/setup-forge/workflow.md +0 -51
  242. package/src/workflows/test-skill/data/scoring-rules.md +0 -123
  243. package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
  244. package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
  245. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
  246. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
  247. package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
  248. package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
  249. package/src/workflows/test-skill/templates/test-report-template.md +0 -28
  250. package/src/workflows/test-skill/workflow.md +0 -57
  251. package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
  252. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
  253. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
  254. package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
  255. package/src/workflows/update-skill/workflow.md +0 -56
  256. package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
  257. package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
  258. package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
  259. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
  260. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
  261. package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
  262. package/src/workflows/verify-stack/workflow.md +0 -61
  263. package/tools/cli/lib/compiler.js +0 -306
  264. package/tools/cli/lib/ide-commands.js +0 -244
  265. /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
  266. /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
  267. /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
  268. /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
@@ -1,7 +1,4 @@
1
1
  ---
2
- name: 'step-02-re-index'
3
- description: 'Re-scan source code with current tier tools to build fresh extraction snapshot'
4
-
5
2
  nextStepFile: './step-03-structural-diff.md'
6
3
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
7
4
  ---
@@ -12,43 +9,11 @@ outputFile: '{forge_version}/drift-report-{timestamp}.md'
12
9
 
13
10
  Re-scan the source code using the current forge tier tools to build a fresh extraction snapshot. This snapshot will be compared against the original provenance map in Step 03 to detect structural drift.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 🛑 NEVER generate content without user input
20
- - 📖 CRITICAL: Read the complete step file before taking any action
21
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
22
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
23
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
24
-
25
- ### Role Reinforcement:
26
-
27
- - ✅ You are a skill auditor operating in Ferris Audit mode
28
- - ✅ Every extraction must be precise — file paths, line numbers, signatures
29
- - ✅ You enforce zero-hallucination: only extract what actually exists in source
30
-
31
- ### Step-Specific Rules:
12
+ ## Rules
32
13
 
33
- - 🎯 Focus only on extracting current source state — do NOT compare yet
34
- - 🚫 FORBIDDEN to perform any diff or comparison that happens in Step 03
35
- - 🚫 FORBIDDEN to skip files or take shortcuts in extraction
36
- - 💬 Use subprocess Pattern 2 (per-file deep analysis) when available for AST extraction
37
- - ⚙️ If subprocess unavailable, perform extraction in main thread file by file
38
-
39
- ## EXECUTION PROTOCOLS:
40
-
41
- - 🎯 Extract all public exports from source using tier-appropriate tools
42
- - 💾 Store current extraction as internal state for Step 03
43
- - 📖 Update {outputFile} frontmatter stepsCompleted when complete
44
- - 🚫 Do not append analysis sections to drift report — only update frontmatter
45
-
46
- ## CONTEXT BOUNDARIES:
47
-
48
- - Available: Source path, forge tier, tool availability (from Step 01)
49
- - Focus: Building a complete current-state extraction snapshot
50
- - Limits: Extract only — no comparison, no judgment, no severity
51
- - Dependencies: Step 01 must have loaded skill baseline and validated source path
14
+ - Focus only on extracting current source state — do not compare yet (that's Step 03)
15
+ - Do not skip files or take shortcuts in extraction
16
+ - Use subprocess Pattern 2 (per-file deep analysis) when available for AST extraction; if unavailable, extract in main thread file by file
52
17
 
53
18
  ## MANDATORY SEQUENCE
54
19
 
@@ -78,26 +43,47 @@ Based on forge tier detected in Step 01:
78
43
  - Query qmd_bridge for temporal context: when exports were added, modification history, usage frequency
79
44
  - Confidence labels: T1 for structural, T2 for temporal context
80
45
 
81
- **Tool resolution:** `gh_bridge` → `gh api` commands or direct file I/O if local. `ast_bridge` → ast-grep MCP tools (`find_code`, `find_code_by_rule`) or `ast-grep` CLI. `qmd_bridge` → QMD MCP tools (`search`, `vector_search`) or `qmd` CLI. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
46
+ **Tool resolution:** `gh_bridge` → `gh api` commands or direct file I/O if local. `ast_bridge` → ast-grep MCP tools (`find_code`, `find_code_by_rule`) or `ast-grep` CLI. `qmd_bridge` → QMD MCP tools (`search`, `vector_search`) or `qmd` CLI. See `knowledge/tool-resolution.md`.
47
+
48
+ ### 2. Build Bounded Scan List
49
+
50
+ Audit-skill detects drift on files that were in scope during create-skill. The authoritative record of "what was in scope" is the provenance map loaded in step-01. Scan only those files — **audit-skill does NOT discover new files**. New-file detection is the responsibility of `skf-update-skill`, which maintains its own change manifest. To audit a project that has grown new files since creation, run update-skill first, then audit-skill.
82
51
 
83
- ### 2. Scan Source Files
52
+ **Why bounded:** without this constraint, files that were deliberately excluded by the original brief's scope patterns (test fixtures, vendored code, generated artifacts, demo code, unrelated modules) get scanned on every audit and their exports are flagged by step-03 structural diff as "added" — false-positive drift that obscures real structural changes.
84
53
 
85
- Identify all source files in the source directory that contain public exports.
54
+ **If a provenance map was loaded in step-01** (normal mode):
86
55
 
87
- "**Scanning source files...**"
56
+ 1. Extract the unique set of file paths from the provenance map:
57
+ - `entries[].source_file` (one path per extracted export)
58
+ - `file_entries[].source_file` (one path per tracked script/asset, when present)
59
+ 2. Deduplicate the combined list. This is the **bounded scan list**.
60
+ 3. Verify each path under `{source_root}`. Files that existed at creation time but are now missing are **not** errors at this stage — keep them in the list so step-03 can classify them as DELETED. Handling missing files is step-03's job, not step-02's.
61
+ 4. Record `bounded_scan: true` and `bounded_scan_source: "provenance-map"` in context for the evidence report.
62
+ 5. Report:
88
63
 
89
- - List all relevant source files (exclude test files, config files, build artifacts)
90
- - Count files to process
91
- - Report: "Found {count} source files to extract."
64
+ "**Bounded scan:** {count} files from provenance map ({provenance_date})."
65
+
66
+ **If degraded mode** (no provenance map was loaded — user confirmed `[D]egraded mode` at step-01 §4):
67
+
68
+ 1. Fall back to a source-tree scan: list all source files under `{source_root}` matching the project's primary language extensions (derive from `metadata.json.language` — e.g., `*.ts` / `*.tsx` for typescript, `*.py` for python, `*.rs` for rust, `*.go` for go).
69
+ 2. Apply generic exclusions: `**/tests/**`, `**/test/**`, `**/__tests__/**`, `*.test.*`, `*.spec.*`, `node_modules/**`, `dist/**`, `build/**`, `target/**`, `__pycache__/**`, `.venv/**`, `vendor/**`.
70
+ 3. Record `bounded_scan: false` and `bounded_scan_source: "source-tree-fallback"` in context.
71
+ 4. Report:
72
+
73
+ "**Degraded mode scan:** {count} files from source tree (no provenance map — results may include files out of the original brief scope)."
74
+
75
+ **Count files to process** and proceed to section 3 with the resolved scan list.
92
76
 
93
77
  ### 3. Extract Current Exports
94
78
 
95
- **DO NOT BE LAZY — For EACH source file, launch a subprocess that:**
79
+ **DO NOT BE LAZY — For EACH file in the bounded scan list from §2, launch a subprocess that:**
96
80
  1. Loads the source file
97
81
  2. Extracts all public exports using tier-appropriate method
98
82
  3. Records: export name, type, signature, file path, line number, confidence tier
99
83
  4. Returns structured findings to parent
100
84
 
85
+ **If a file from the bounded scan list is missing on disk:** record `{file, exports: [], status: "missing"}` and continue — step-03 structural diff will classify exports previously at this path as DELETED.
86
+
101
87
  **If subprocess unavailable:** Perform extraction in main thread, processing each file sequentially.
102
88
 
103
89
  **Build extraction snapshot:**
@@ -107,6 +93,8 @@ Identify all source files in the source directory that contain public exports.
107
93
  "confidence_tier": "{tier}",
108
94
  "source_root": "{source_path}",
109
95
  "files_scanned": {count},
96
+ "bounded_scan": true|false,
97
+ "bounded_scan_source": "provenance-map|source-tree-fallback",
110
98
  "exports": [
111
99
  {
112
100
  "name": "{export_name}",
@@ -167,6 +155,7 @@ CCC failures: skip rename detection silently, proceed with standard structural d
167
155
 
168
156
  | Metric | Value |
169
157
  |--------|-------|
158
+ | Scan mode | {bounded (provenance-map) / degraded (source-tree)} |
170
159
  | Files scanned | {count} |
171
160
  | Exports found | {total_exports} |
172
161
  | Functions | {function_count} |
@@ -199,27 +188,3 @@ Display: "**Proceeding to structural diff...**"
199
188
 
200
189
  ONLY WHEN the extraction snapshot is complete with all source files processed will you then load and read fully `{nextStepFile}` to execute and begin structural comparison.
201
190
 
202
- ---
203
-
204
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
205
-
206
- ### ✅ SUCCESS:
207
-
208
- - All source files scanned (none skipped)
209
- - All public exports extracted with file:line references
210
- - Confidence tier labels applied to every extraction
211
- - Tier-appropriate tools used (AST for Forge+, text for Quick)
212
- - Deep tier temporal context added if applicable
213
- - Extraction snapshot complete and validated
214
- - Frontmatter stepsCompleted updated
215
-
216
- ### ❌ SYSTEM FAILURE:
217
-
218
- - Skipping source files or being lazy with extraction
219
- - Not recording file:line references for each export
220
- - Performing comparison in this step (comparison is Step 03)
221
- - Missing confidence tier labels
222
- - Hardcoded paths instead of frontmatter variables
223
- - Not using subprocess Pattern 2 when available
224
-
225
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,7 +1,4 @@
1
1
  ---
2
- name: 'step-03-structural-diff'
3
- description: 'Compare original provenance map extractions against current scan to detect structural drift'
4
-
5
2
  nextStepFile: './step-04-semantic-diff.md'
6
3
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
7
4
  ---
@@ -12,43 +9,11 @@ outputFile: '{forge_version}/drift-report-{timestamp}.md'
12
9
 
13
10
  Compare the original provenance map extractions from create-skill against the current re-index snapshot from Step 02 to detect structural drift. Identify added, removed, and changed exports with file:line citations and confidence tier labels.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 🛑 NEVER generate content without user input
20
- - 📖 CRITICAL: Read the complete step file before taking any action
21
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
22
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
23
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
24
-
25
- ### Role Reinforcement:
26
-
27
- - ✅ You are a skill auditor performing structural comparison
28
- - ✅ Every drift finding must have a file:line citation from either the provenance map or current scan
29
- - ✅ Zero hallucination — only report drift that is structurally verifiable
30
-
31
- ### Step-Specific Rules:
12
+ ## Rules
32
13
 
33
- - 🎯 Focus only on structural comparison — added/removed/changed exports
34
- - 🚫 FORBIDDEN to classify severity that happens in Step 05
35
- - 🚫 FORBIDDEN to suggest remediation that happens in Step 06
36
- - 💬 Use subprocess Pattern 4 (parallel): In Claude Code, use multiple parallel Agent tool calls or `run_in_background: true`. In Cursor, use parallel requests (IDE-dependent). In CLI, use `xargs -P` or background processes. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
37
- - ⚙️ If subprocess unavailable, compare categories sequentially in main thread
38
-
39
- ## EXECUTION PROTOCOLS:
40
-
41
- - 🎯 Compare provenance map exports against current extraction snapshot
42
- - 💾 Append ## Structural Drift section to {outputFile}
43
- - 📖 Update {outputFile} frontmatter stepsCompleted when complete
44
- - 🚫 Only structural findings — no semantic or severity analysis
45
-
46
- ## CONTEXT BOUNDARIES:
47
-
48
- - Available: Provenance map (from Step 01), current extraction snapshot (from Step 02), forge tier
49
- - Focus: Structural export-level comparison only
50
- - Limits: Do not classify severity, do not analyze semantics, do not suggest fixes
51
- - Dependencies: Steps 01 and 02 must be complete
14
+ - Focus only on structural comparison — added/removed/changed exports
15
+ - Do not classify severity (Step 05) or suggest remediation (Step 06)
16
+ - Use subprocess Pattern 4 (parallel) when available; if unavailable, compare sequentially
52
17
 
53
18
  ## MANDATORY SEQUENCE
54
19
 
@@ -122,6 +87,23 @@ For each entry in `file_entries`:
122
87
 
123
88
  Append results to the Structural Drift section as "### Script/Asset Drift ({count})".
124
89
 
90
+ ### Stack-Specific Structural Diff
91
+
92
+ If `{is_stack_skill}` is true:
93
+
94
+ **For v2 provenance (per-export entries with `source_library`):**
95
+ - Group entries by `source_library`
96
+ - For each library, perform the standard structural diff (same as single-skill) against current source
97
+ - Report per-library diff results
98
+
99
+ **For code-mode stacks:** Re-extract from each source repo and compare per-library entries.
100
+
101
+ **For compose-mode stacks:** Compare current constituent skill exports against the entries recorded at compose time. Use the `source_library` field to match entries to constituents.
102
+
103
+ **For v1 legacy provenance:** Report library-level summary only (export counts, extraction methods). Note that per-export drift detection requires re-composition with v2 provenance.
104
+
105
+ **Integration drift:** For each integration in `integrations[]`, verify that co-import files still contain the detected patterns (code-mode) or that constituent skills still document the integration (compose-mode).
106
+
125
107
  ### 5. Compile Structural Drift Section
126
108
 
127
109
  Append to {outputFile}:
@@ -182,27 +164,3 @@ Display: "**Structural diff complete. {total} drift items found. Proceeding to s
182
164
 
183
165
  ONLY WHEN the ## Structural Drift section has been appended to {outputFile} with all findings documented will you then load and read fully `{nextStepFile}` to execute and begin semantic diff analysis.
184
166
 
185
- ---
186
-
187
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
188
-
189
- ### ✅ SUCCESS:
190
-
191
- - All three categories compared: added, removed, changed
192
- - Every finding has file:line citation
193
- - Confidence tier labels on all findings
194
- - Moved exports distinguished from removed+added
195
- - Structured table format in drift report
196
- - Summary counts accurate
197
- - Frontmatter stepsCompleted updated
198
-
199
- ### ❌ SYSTEM FAILURE:
200
-
201
- - Missing any comparison category (added/removed/changed)
202
- - Findings without file:line citations
203
- - Missing confidence tier labels
204
- - Classifying severity in this step (severity is Step 05)
205
- - Not detecting moved exports (false removed + false added)
206
- - Hardcoded paths instead of frontmatter variables
207
-
208
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,7 +1,4 @@
1
1
  ---
2
- name: 'step-04-semantic-diff'
3
- description: 'Compare QMD knowledge context for meaning-level changes (Deep tier only, skip at Quick/Forge/Forge+)'
4
-
5
2
  nextStepFile: './step-05-severity-classify.md'
6
3
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
7
4
  ---
@@ -12,44 +9,12 @@ outputFile: '{forge_version}/drift-report-{timestamp}.md'
12
9
 
13
10
  Compare QMD knowledge context between the original skill creation and current state to detect meaning-level changes that structural diff cannot catch. This step executes ONLY at Deep tier — at Quick, Forge, and Forge+ tiers, it appends a skip notice and auto-proceeds.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 🛑 NEVER generate content without user input
20
- - 📖 CRITICAL: Read the complete step file before taking any action
21
- - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
22
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
23
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
24
-
25
- ### Role Reinforcement:
26
-
27
- - ✅ You are a skill auditor performing semantic analysis
28
- - ✅ Semantic findings have T2 confidence — evidence-backed but not structurally absolute
29
- - ✅ Distinguish clearly between structural facts (T1) and semantic observations (T2)
30
-
31
- ### Step-Specific Rules:
32
-
33
- - 🎯 Focus only on semantic/meaning-level changes via QMD context
34
- - 🚫 FORBIDDEN to classify severity — that happens in Step 05
35
- - 🚫 FORBIDDEN to repeat structural findings from Step 03
36
- - 💬 Use subprocess Pattern 3 (data operations — main thread Read + process in Claude Code, script in CLI) when available for QMD queries. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
37
- - ⚙️ If subprocess unavailable, query QMD in main thread
38
- - 🔀 CONDITIONAL: Skip entire analysis at Quick/Forge/Forge+ tier — append skip notice only
39
-
40
- ## EXECUTION PROTOCOLS:
41
-
42
- - 🎯 Check forge tier FIRST — skip if not Deep
43
- - 💾 Append ## Semantic Drift section (or skip notice) to {outputFile}
44
- - 📖 Update {outputFile} frontmatter stepsCompleted when complete
45
- - 🚫 Only semantic findings — no structural or severity analysis
12
+ ## Rules
46
13
 
47
- ## CONTEXT BOUNDARIES:
48
-
49
- - Available: Forge tier, structural drift findings (from Step 03), QMD access (Deep tier only)
50
- - Focus: Meaning-level changes that complement structural diff
51
- - Limits: Do not re-analyze structural changes, do not classify severity
52
- - Dependencies: Steps 01-03 must be complete; QMD collection must exist for Deep tier
14
+ - CONDITIONAL: Skip entire analysis at Quick/Forge/Forge+ tier — append skip notice only
15
+ - Focus only on semantic/meaning-level changes via QMD context — do not repeat structural findings from Step 03
16
+ - Do not classify severity (Step 05)
17
+ - Use subprocess Pattern 3 when available for QMD queries; if unavailable, query in main thread
53
18
 
54
19
  ## MANDATORY SEQUENCE
55
20
 
@@ -66,7 +31,7 @@ Append to {outputFile}:
66
31
 
67
32
  **Status:** Skipped — Semantic diff requires Deep tier (current tier: {tier})
68
33
 
69
- Semantic analysis compares QMD knowledge context for meaning-level changes that structural diff cannot detect. To enable semantic diff, run setup-forge with QMD available to unlock Deep tier.
34
+ Semantic analysis compares QMD knowledge context for meaning-level changes that structural diff cannot detect. To enable semantic diff, run setup with QMD available to unlock Deep tier.
70
35
  ```
71
36
 
72
37
  Update frontmatter: append `'step-04-semantic-diff'` to `stepsCompleted`
@@ -173,27 +138,3 @@ Display: "**Semantic diff complete. {total} semantic drift items found. Proceedi
173
138
 
174
139
  ONLY WHEN the ## Semantic Drift section (or skip notice) has been appended to {outputFile} will you then load and read fully `{nextStepFile}` to execute and begin severity classification.
175
140
 
176
- ---
177
-
178
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
179
-
180
- ### ✅ SUCCESS:
181
-
182
- - Forge tier checked FIRST — skip gracefully at Quick/Forge/Forge+
183
- - Deep tier: QMD knowledge context queried and compared
184
- - All semantic findings have T2 confidence labels
185
- - Findings clearly distinguished from structural drift (T1)
186
- - Skip notice includes explanation of what semantic diff provides
187
- - Structured table format in drift report
188
- - Frontmatter stepsCompleted updated
189
-
190
- ### ❌ SYSTEM FAILURE:
191
-
192
- - Not checking tier before attempting QMD analysis
193
- - Repeating structural findings from Step 03
194
- - Missing confidence tier labels on findings
195
- - Classifying severity in this step (severity is Step 05)
196
- - Failing to skip gracefully at non-Deep tiers
197
- - Hardcoded paths instead of frontmatter variables
198
-
199
- **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-severity-classify'
3
- description: 'Grade every drift finding by severity using classification rules'
4
-
5
2
  nextStepFile: './step-06-report.md'
6
3
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
7
- severityRulesFile: '../data/severity-rules.md'
4
+ severityRulesFile: 'references/severity-rules.md'
8
5
  ---
9
6
 
10
7
  # Step 5: Severity Classification
@@ -13,43 +10,11 @@ severityRulesFile: '../data/severity-rules.md'
13
10
 
14
11
  Grade every drift finding from Steps 03 and 04 by severity level (CRITICAL/HIGH/MEDIUM/LOW) using the classification rules. Calculate the overall drift score and produce a categorized findings table with confidence tier labels.
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
- - ⚙️ 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
24
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
25
-
26
- ### Role Reinforcement:
27
-
28
- - ✅ You are a skill auditor performing severity assessment
29
- - ✅ Classification must be deterministic — same finding always gets same severity
30
- - ✅ Apply rules strictly — do not invent new severity categories or soften classifications
31
-
32
- ### Step-Specific Rules:
33
-
34
- - 🎯 Focus only on classifying severity of existing findings
35
- - 🚫 FORBIDDEN to discover new drift items — only classify what Steps 03-04 found
36
- - 🚫 FORBIDDEN to suggest remediation — that happens in Step 06
37
- - 💬 Use subprocess Pattern 3 (data operations — main thread Read + process in Claude Code, script in CLI) to load severity rules and classify. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
38
- - ⚙️ If subprocess unavailable, load rules and classify in main thread
39
-
40
- ## EXECUTION PROTOCOLS:
41
-
42
- - 🎯 Load {severityRulesFile} and apply to every finding
43
- - 💾 Append ## Severity Classification section to {outputFile}
44
- - 📖 Update {outputFile} frontmatter stepsCompleted when complete
45
- - 🚫 Only classification — no new findings, no remediation
13
+ ## Rules
46
14
 
47
- ## CONTEXT BOUNDARIES:
48
-
49
- - Available: Structural drift findings (Step 03), semantic drift findings (Step 04 if Deep), severity rules
50
- - Focus: Applying deterministic severity classification to every finding
51
- - Limits: Do not discover new drift, do not suggest fixes
52
- - Dependencies: Steps 03 (and optionally 04) must be complete
15
+ - Only classify severity of existing findings — do not discover new drift items or suggest remediation
16
+ - Classification must be deterministic — apply {severityRulesFile} rules strictly
17
+ - Use subprocess Pattern 3 when available; if unavailable, load rules and classify in main thread
53
18
 
54
19
  ## MANDATORY SEQUENCE
55
20
 
@@ -185,26 +150,3 @@ Display: "**Severity classification complete. Overall drift score: {score}. Proc
185
150
 
186
151
  ONLY WHEN the ## Severity Classification section has been appended to {outputFile} with all findings classified will you then load and read fully `{nextStepFile}` to execute and begin final report generation.
187
152
 
188
- ---
189
-
190
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
191
-
192
- ### ✅ SUCCESS:
193
-
194
- - Severity rules loaded from {severityRulesFile}
195
- - Every finding from Steps 03-04 classified (none missed)
196
- - Classification is deterministic — follows rules strictly
197
- - Overall drift score calculated correctly
198
- - Structured tables with severity, source type, and confidence
199
- - Frontmatter drift_score and stepsCompleted updated
200
-
201
- ### ❌ SYSTEM FAILURE:
202
-
203
- - Inventing new severity categories beyond CRITICAL/HIGH/MEDIUM/LOW
204
- - Missing any finding from classification (incomplete coverage)
205
- - Softening classifications that should be CRITICAL
206
- - Discovering new drift items (classification only, not discovery)
207
- - Suggesting remediation (that is Step 06)
208
- - Hardcoded paths instead of frontmatter variables
209
-
210
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,8 +1,6 @@
1
1
  ---
2
- name: 'step-06-report'
3
- description: 'Finalize drift report with audit summary, remediation suggestions, and provenance metadata'
4
-
5
2
  outputFile: '{forge_version}/drift-report-{timestamp}.md'
3
+ nextStepFile: './step-07-health-check.md'
6
4
  ---
7
5
 
8
6
  # Step 6: Generate Report
@@ -11,41 +9,12 @@ outputFile: '{forge_version}/drift-report-{timestamp}.md'
11
9
 
12
10
  Finalize the drift report by completing the Audit Summary with calculated metrics, generating actionable remediation suggestions for each drift finding, and adding provenance metadata. Present the final report to the user with a next-workflow recommendation.
13
11
 
14
- ## MANDATORY EXECUTION RULES (READ FIRST):
15
-
16
- ### Universal Rules:
17
-
18
- - 🛑 NEVER generate content without user input
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
21
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
-
23
- ### Role Reinforcement:
24
-
25
- - ✅ You are a skill auditor delivering the final audit report
26
- - ✅ Remediation suggestions must be specific and actionable
27
- - ✅ Every suggestion must reference the specific drift finding it addresses
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🎯 Focus on completing the report — summary, remediation, provenance
32
- - 🚫 FORBIDDEN to discover new drift items or reclassify severity
33
- - 💬 Remediation suggestions must be practical: what to change, where, and why
34
- - 📋 This is the FINAL step — no nextStepFile
12
+ ## Rules
35
13
 
36
- ## EXECUTION PROTOCOLS:
37
-
38
- - 🎯 Complete all remaining sections in {outputFile}
39
- - 💾 Update {outputFile} frontmatter to mark workflow complete
40
- - 📖 Present final summary to user
41
- - 🚫 Do not re-analyze — only synthesize and present
42
-
43
- ## CONTEXT BOUNDARIES:
44
-
45
- - Available: Complete drift report with structural diff, semantic diff, severity classification
46
- - Focus: Synthesis, remediation guidance, and presentation
47
- - Limits: Do not add new findings or reclassify — only complete the report
48
- - Dependencies: Steps 01-05 must be complete
14
+ - Focus on completing the report — summary, remediation, provenance
15
+ - Do not discover new drift items or reclassify severity
16
+ - Remediation suggestions must be practical: what to change, where, and why
17
+ - Chains to the local health-check step via `{nextStepFile}` after completion the user-facing summary is NOT the terminal step
49
18
 
50
19
  ## MANDATORY SEQUENCE
51
20
 
@@ -189,29 +158,11 @@ Update {outputFile} frontmatter:
189
158
 
190
159
  **Audit workflow complete.**"
191
160
 
192
- ---
193
-
194
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
195
-
196
- ### ✅ SUCCESS:
161
+ ### Result Contract
197
162
 
198
- - Audit Summary completed with accurate metrics
199
- - Remediation suggestion for every CRITICAL and HIGH finding
200
- - Each remediation is specific: what to change, where, and why
201
- - Provenance section documents complete audit trail
202
- - Overall drift score correctly reflects findings
203
- - Frontmatter updated with completion status and nextWorkflow
204
- - Final summary presented clearly to user
205
- - Report saved to correct output path
163
+ Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{forge_version}/audit-skill-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{forge_version}/audit-skill-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include the drift report path in `outputs`; include `drift_count` and `severity` (CLEAN/MINOR/SIGNIFICANT/CRITICAL) in `summary`.
206
164
 
207
- ### SYSTEM FAILURE:
165
+ ### 6. Chain to Health Check
208
166
 
209
- - Missing remediation for any CRITICAL or HIGH finding
210
- - Vague remediation suggestions (e.g., "update the skill" without specifics)
211
- - Discovering new findings in this step
212
- - Reclassifying severity
213
- - Not presenting final summary to user
214
- - Missing provenance section
215
- - Hardcoded paths instead of frontmatter variables
167
+ ONLY WHEN the report has been written, 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 user-facing summary reads as final.
216
168
 
217
- **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 audit-skill — 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,53 @@
1
+ ---
2
+ name: skf-brief-skill
3
+ description: Design a skill scope through guided discovery. Use when the user requests to "create a skill brief" or "brief a skill."
4
+ ---
5
+
6
+ # Brief Skill
7
+
8
+ ## Overview
9
+
10
+ Helps the user define what to skill — target repo, scope, language, inclusion/exclusion patterns — and produces a skill-brief.yaml that drives create-skill. This is the first step in the skill creation pipeline. The brief becomes the input contract for create-skill, which performs the actual compilation.
11
+
12
+ ## Role
13
+
14
+ You are a skill scoping architect collaborating with a developer who wants to create an agent skill. You bring expertise in source code analysis, API surface identification, and skill boundary design, while the user brings their domain knowledge and specific use case. Work together as equals.
15
+
16
+ ## Workflow Rules
17
+
18
+ These rules apply to every step in this workflow:
19
+
20
+ - Read each step file completely before taking any action
21
+ - Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
22
+ - Only load one step file at a time — never preload future steps
23
+ - Always communicate in `{communication_language}`
24
+ - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
25
+
26
+ ## Stages
27
+
28
+ | # | Step | File | Auto-proceed |
29
+ |---|------|------|--------------|
30
+ | 1 | Gather Intent | steps-c/step-01-gather-intent.md | No (interactive) |
31
+ | 2 | Analyze Target | steps-c/step-02-analyze-target.md | Yes |
32
+ | 3 | Scope Definition | steps-c/step-03-scope-definition.md | No (interactive) |
33
+ | 4 | Confirm Brief | steps-c/step-04-confirm-brief.md | No (confirm) |
34
+ | 5 | Write Brief | steps-c/step-05-write-brief.md | Yes |
35
+ | 6 | Workflow Health Check | steps-c/step-06-health-check.md | Yes |
36
+
37
+ ## Invocation Contract
38
+
39
+ | Aspect | Detail |
40
+ |--------|--------|
41
+ | **Inputs** | target_repo [required], skill_name [required], scope_hint [optional], language_hint [optional] |
42
+ | **Gates** | step-01: Input Gate [use args] | step-03: Confirm Gate [C] | step-04: Confirm Gate [C] |
43
+ | **Outputs** | skill-brief.yaml |
44
+ | **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
45
+
46
+ ## On Activation
47
+
48
+ 1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
49
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `forge_data_folder`, `sidecar_path`
50
+
51
+ 2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
52
+
53
+ 3. Load, read the full file, and then execute `./steps-c/step-01-gather-intent.md` to begin the workflow.
@@ -22,6 +22,12 @@ Present these options to the user for selection:
22
22
  - Auto-exclude demo/example/story files (with user confirmation)
23
23
  - Variant consolidation across design systems
24
24
 
25
+ **[R] Reference App** — Whole-app pattern-reference skill. Use when the source is a working example app and the skill's value is **wiring patterns** (lifecycle, IPC, build-config, distribution) rather than a public library API.
26
+ - Pattern surface as primary API slot (not individual exports)
27
+ - Adoption Steps as primary workflow format (not API-call chains)
28
+ - Tier 2 organized as `references/pattern-*.md` groupings (not per-function)
29
+ - Export-count stats are pattern-surface proxies, not library exports
30
+
25
31
  ## Boundary Definitions by Scope Type
26
32
 
27
33
  ### Full Library Boundaries
@@ -65,6 +71,23 @@ Prompt: "Which of these would you like to include? (Enter numbers, or 'all'):"
65
71
  Exclusions will include all internal implementation files, tests, and utilities.
66
72
  Prompt: "Any additional items you'd like to include or exclude?"
67
73
 
74
+ ### Reference App Boundaries
75
+
76
+ **Phase 1 — Pattern surface intent:**
77
+
78
+ Ask: "What is the authored pattern surface for this skill? List the files (or directories) the user must touch to adopt the pattern — entry points, config files, lifecycle hooks, build scripts."
79
+
80
+ - Record the user's list as `scope.tier_a_include` when narrower than a broad `scope.include`. Reference-app briefs benefit strongly from `tier_a_include` because the denominator is small and precise.
81
+ - Prompt follow-up: "Any files outside that list that should still be in scope for completeness (tests, fixtures, supporting configs)?"
82
+
83
+ **Phase 2 — Scope.include and exclusions:**
84
+
85
+ Set `scope.include` to the pattern-surface file list (or broader union when the author flagged supporting files). Default exclusions mirror the Full Library defaults (tests, build artifacts, docs source). Record `scope.notes` with a one-sentence description of the pattern (e.g., "Embedded Python sidecar pattern for Electron apps — lifecycle orchestration, RPC proxy, build-copy wiring").
86
+
87
+ **Phase 3 — Confirmation:**
88
+
89
+ Summary showing: pattern surface count, `tier_a_include` vs `include` distinction, notes. Prompt: "Does this reference-app scope look right? Adjust before continuing."
90
+
68
91
  ### Docs-Only Boundaries
69
92
 
70
93
  **No source code access.** Scope is defined by the `doc_urls` collected during intent gathering.