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,9 +1,6 @@
1
1
  ---
2
- name: 'step-06-compile-stack'
3
- description: 'Compile SKILL.md with integration layer and present for user review'
4
-
5
2
  nextStepFile: './step-07-generate-output.md'
6
- stackSkillTemplate: '../data/stack-skill-template.md'
3
+ stackSkillTemplate: 'assets/stack-skill-template.md'
7
4
  ---
8
5
 
9
6
  # Step 6: Compile Stack Skill
@@ -12,40 +9,11 @@ stackSkillTemplate: '../data/stack-skill-template.md'
12
9
 
13
10
  Assemble the main SKILL.md by combining per-library extractions with the integration layer, and present for user review before writing output files.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
21
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
-
23
- ### Role Reinforcement:
24
-
25
- - ✅ You are an integration architect operating in Ferris Architect mode
26
- - ✅ The integration layer is the VALUE — not just concatenated library docs
27
- - ✅ Zero hallucination — only include content backed by extraction evidence
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🎯 Compile SKILL.md following the stack-skill-template structure
32
- - 🚫 FORBIDDEN to write output files — that is step 07
33
- - 💬 Present compiled content for user review (Gate 2)
34
- - 🎯 Integration patterns go FIRST — they are the primary value
35
-
36
- ## EXECUTION PROTOCOLS:
37
-
38
- - 🎯 Load stack-skill-template.md for section structure
39
- - 💾 Store compiled skill_content as workflow state
40
- - 📖 Wait for user review and approval before proceeding
41
- - 🚫 FORBIDDEN to proceed without user confirming the compilation
12
+ ## Rules
42
13
 
43
- ## CONTEXT BOUNDARIES:
44
-
45
- - From step 04: per_library_extractions[] with exports, patterns, confidence
46
- - From step 05: integration_graph with pairs, types, hub libraries, cross-cutting patterns
47
- - This step produces: skill_content (compiled SKILL.md ready for writing)
48
- - User interaction: Gate 2 — compile checkpoint required
14
+ - Compile SKILL.md following the stack-skill-template structure — integration patterns go first (primary value)
15
+ - Do not write output files (Step 07)
16
+ - Present compiled content for user review
49
17
 
50
18
  ## MANDATORY SEQUENCE
51
19
 
@@ -72,7 +40,7 @@ description: >
72
40
 
73
41
  **Frontmatter rules:**
74
42
 
75
- - `name`: lowercase alphanumeric + hyphens only, must match skill output directory name. Prefer gerund form (`processing-pdfs`) for clarity.
43
+ - `name`: lowercase alphanumeric + hyphens only, must match skill output directory name. **Stack skills MUST end in `-stack`** (e.g., `{project_name}-stack`) this is how consumers (skf-verify-stack, skf-test-skill) detect stack vs individual skills.
76
44
  - `description`: non-empty, max 1024 chars, trigger-optimized for agent discovery. MUST use third-person voice ("Processes..." not "I can..." or "You can...").
77
45
  - No other frontmatter fields — only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools` are permitted by spec
78
46
 
@@ -154,6 +122,7 @@ Display: **Select:** [C] Continue to Output Generation
154
122
  #### EXECUTION RULES:
155
123
 
156
124
  - ALWAYS halt and wait for user input after presenting compilation
125
+ - **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-approve stack compilation"
157
126
  - ONLY proceed to next step when user approves and selects 'C'
158
127
 
159
128
  #### Menu Handling Logic:
@@ -161,25 +130,3 @@ Display: **Select:** [C] Continue to Output Generation
161
130
  - IF C: Store skill_content, then load, read entire file, then execute {nextStepFile}
162
131
  - IF Any other: Process as feedback, adjust compilation, redisplay preview, then [Redisplay Menu Options](#8-present-menu-options)
163
132
 
164
- ---
165
-
166
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
167
-
168
- ### ✅ SUCCESS:
169
-
170
- - SKILL.md follows stack-skill-template structure
171
- - Integration layer presented FIRST (primary value)
172
- - All content includes confidence tier labels
173
- - Per-library sections ordered by connectivity
174
- - User reviewed and approved compilation
175
- - skill_content stored for step 07
176
-
177
- ### ❌ SYSTEM FAILURE:
178
-
179
- - Integration layer missing or buried below library listings
180
- - Content without confidence tier labels
181
- - Proceeding without user review (Gate 2)
182
- - Writing files in this step (step 07's job)
183
- - Fabricating integration patterns not from step 05
184
-
185
- **Master Rule:** Integration layer is the value. Present it first, get user approval before writing.
@@ -0,0 +1,328 @@
1
+ ---
2
+ nextStepFile: './step-08-validate.md'
3
+ stackSkillTemplate: 'assets/stack-skill-template.md'
4
+ # Resolve `{atomicWriteHelper}` by probing `{atomicWriteProbeOrder}` in order
5
+ # (installed SKF module path first, src/ dev-checkout fallback); first existing
6
+ # path wins. HALT if neither resolves — stage/commit/flip-link/write below
7
+ # MUST go through the atomic helper, per §1 rollback contract.
8
+ atomicWriteProbeOrder:
9
+ - '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
10
+ - '{project-root}/src/shared/scripts/skf-atomic-write.py'
11
+ ---
12
+
13
+ # Step 7: Generate Output Files
14
+
15
+ ## STEP GOAL:
16
+
17
+ Write all deliverable and workspace artifact files to their target directories.
18
+
19
+ ## Rules
20
+
21
+ - Write all output files in correct directory structure — do not modify compiled content from Step 06
22
+ - Create directory structure before writing files
23
+ - Report each file written with path and size
24
+
25
+ ## MANDATORY SEQUENCE
26
+
27
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
28
+
29
+ ### 1. Resolve Paths and Stage Target Directory
30
+
31
+ Resolve `{version}` from the primary library version or default to `1.0.0` (see S11 in "Primary library" note below). The final artifact paths are:
32
+
33
+ ```
34
+ {skill_group} # {skills_output_folder}/{project_name}-stack/
35
+ {skill_package} # {skills_output_folder}/{project_name}-stack/{version}/{project_name}-stack/
36
+ ├── references/
37
+ │ └── integrations/
38
+ {forge_version} # {forge_data_folder}/{project_name}-stack/{version}/
39
+ ```
40
+
41
+ Where the skill name is `{project_name}-stack` and `{version}` is the semver version (with build metadata stripped per `knowledge/version-paths.md`).
42
+
43
+ **Primary library definition (S11):** In code-mode, the primary library is the dependency with the highest import count from step-03; its `version` (from the manifest) becomes `{primary_library_version}`. In compose-mode, use the highest semver across constituent skill `metadata.json` files. If neither is available, fall back to `1.0.0`.
44
+
45
+ **Pre-flight: group-dir type check (S3):** If `{skills_output_folder}/{project_name}-stack/` already exists, probe `{skills_output_folder}/{project_name}-stack/active/{project_name}-stack/metadata.json`. If that metadata exists and `skill_type != "stack"`, HALT with:
46
+
47
+ "**Cannot proceed.** `{skills_output_folder}/{project_name}-stack/` exists but is not a stack skill (`skill_type={found_type}`). Rename the existing directory or choose a different `project_name` to avoid collision."
48
+
49
+ Do NOT proceed to staging or commit.
50
+
51
+ **Atomic write strategy (C2 / B5):** All artifact writes for `{skill_package}` MUST stage into a temp directory first, then commit atomically via `skf-atomic-write.py commit-dir`. The active symlink flip only happens AFTER the commit succeeds.
52
+
53
+ Create the staging directory:
54
+
55
+ ```bash
56
+ python3 {atomicWriteHelper} stage-dir --target {skill_package}
57
+ ```
58
+
59
+ After this call, writes land in `{skill_package}.skf-tmp/` (referred to below as `{skill_staging}`). Create the required subdirectories inside the staging dir:
60
+
61
+ ```bash
62
+ mkdir -p {skill_staging}/references/integrations
63
+ ```
64
+
65
+ Also create the forge workspace directory directly (these are workspace artifacts, not deliverables — they do not need stage-dir / commit-dir):
66
+
67
+ ```bash
68
+ mkdir -p {forge_version}
69
+ ```
70
+
71
+ **Rollback contract:** If ANY write in sections 2–7 below fails, immediately run:
72
+
73
+ ```bash
74
+ python3 {atomicWriteHelper} commit-dir --rollback --target {skill_package}
75
+ ```
76
+
77
+ Then abort with a structured error contract (see B7): purge any `{forge_version}/*-tmp` staging artifacts, emit `{"status":"error","skill":"skf-create-stack-skill","stage":"step-07","reason":"<message>"}` on stderr, and halt the workflow.
78
+
79
+ ### 2. Stage SKILL.md
80
+
81
+ Write the approved `skill_content` from step 06 to `{skill_staging}/SKILL.md` (regular write — the whole staging dir will be atomically committed later).
82
+
83
+ ### 3. Stage Per-Library Reference Files
84
+
85
+ For each confirmed library, write `{skill_staging}/references/{library_name}.md`:
86
+
87
+ Load structure from `{stackSkillTemplate}` references section:
88
+ - Library name, version from manifest (**in compose-mode**: version from source skill `metadata.json`)
89
+ - Import count and file count (**in compose-mode**: export count from source skill metadata)
90
+ - Key exports with signatures
91
+ - Usage patterns with file:line citations (**in compose-mode**: usage patterns from source skill SKILL.md)
92
+ - Confidence tier label
93
+
94
+ ### 4. Stage Integration Pair Reference Files
95
+
96
+ For each detected integration pair, write `{skill_staging}/references/integrations/{libraryA}-{libraryB}.md`:
97
+
98
+ Load structure from `{stackSkillTemplate}` integrations section:
99
+ - Library pair and integration type
100
+ - Co-import file count
101
+ - Integration pattern description with file:line citations
102
+ - Usage convention
103
+ - Confidence tier label
104
+
105
+ **If no integrations detected:** Skip this section (no files to write).
106
+
107
+ ### 5. Stage context-snippet.md
108
+
109
+ Write `{skill_staging}/context-snippet.md`:
110
+
111
+ Use the Vercel-aligned indexed format targeting **~80-120 tokens** (M2). Token estimation is heuristic — use `ceil(char_count / 4)` as the working approximation (the standard rule-of-thumb for English text in BPE-style tokenizers; precise counts differ per model). Compute against the rendered snippet body (excluding trailing newline).
112
+
113
+ ```
114
+ [{project_name}-stack v{version — in code-mode: primary_library_version or 1.0.0; in compose-mode: highest version across constituent skill metadata.json files, or 1.0.0 if none}]|root: skills/{project_name}-stack/
115
+ |IMPORTANT: {project_name}-stack — read SKILL.md before writing integration code. Do NOT rely on training data.
116
+ |stack: {dep-1}@{v1}, {dep-2}@{v2}, {dep-3}@{v3}
117
+ |integrations: {pattern-1}, {pattern-2}
118
+ |gotchas: {1-2 most critical integration pitfalls}
119
+ ```
120
+
121
+ **Overflow strategy (M2):** If the estimated token count exceeds **120 tokens**, trim in this fixed order until under budget:
122
+
123
+ 1. **Drop the `gotchas` line first.** Pitfalls live in SKILL.md and references; the snippet's job is discovery, not full warning surface.
124
+ 2. **Strip versions from the `stack` line** (`{dep-1}, {dep-2}` instead of `{dep-1}@{v1}`). Versions are recoverable from `metadata.json`.
125
+ 3. **Truncate the `stack` list to the top 8 dependencies by import count** (or by export count in compose-mode), appending `, ...+{N} more`.
126
+ 4. **Truncate the `integrations` list to the top 5 by file count**, appending `, ...+{N} more`.
127
+
128
+ If the snippet is still over budget after step 4, log a warning to workflow_warnings (see Workflow Rules in SKILL.md) — do not block the write. The `IMPORTANT:` line is mandatory and never trimmed.
129
+
130
+ **Underflow note:** Snippets below ~80 tokens are acceptable (small stacks naturally produce short snippets). The lower bound is informational, not enforced.
131
+
132
+ ### 6. Stage metadata.json
133
+
134
+ Write `{skill_staging}/metadata.json`:
135
+
136
+ Populate all fields from the metadata.json schema defined in `{stackSkillTemplate}`.
137
+
138
+ **Tier fields:**
139
+ - `forge_tier` — the run tier (Quick/Forge/Forge+/Deep) resolved in step-01.
140
+ - `confidence_tier` — the dominant T-code from `confidence_distribution`. Pick the tier with the highest count; resolve ties toward the weaker tier (T1-low > T1, T2 > T1-low, T3 > T2) so the reported value never overstates confidence. When `confidence_distribution` is empty (no libraries extracted), emit `"T1-low"` as the conservative default.
141
+
142
+ ```json
143
+ {
144
+ "skill_type": "stack",
145
+ "name": "{project_name}-stack",
146
+ "version": "{primary_library_version or 1.0.0}",
147
+ "generation_date": "{current_date}",
148
+ "forge_tier": "{Quick|Forge|Forge+|Deep — the tier under which this run executed}",
149
+ "confidence_tier": "{T1|T1-low|T2|T3 — dominant T-code from confidence_distribution below}",
150
+ "spec_version": "1.3",
151
+ "source_authority": "{official|community|internal — use the lowest authority among constituent skills}",
152
+ "generated_by": "create-stack-skill",
153
+ "exports": [],
154
+ "library_count": N,
155
+ "integration_count": N,
156
+ "libraries": ["lib1", "lib2"],
157
+ "integration_pairs": [["lib1", "lib2"]],
158
+ "language": "{primary language or list of languages from constituent skills}",
159
+ "ast_node_count": "{number or omit if no AST extraction performed}",
160
+ "confidence_distribution": {"t1": N, "t1_low": N, "t2": N, "t3": N},
161
+ "tool_versions": {
162
+ "ast_grep": "{version or null}",
163
+ "qmd": "{version or null}",
164
+ "skf": "{skf_version}"
165
+ },
166
+ "stats": {
167
+ "exports_documented": N,
168
+ "exports_public_api": N,
169
+ "exports_internal": N,
170
+ "exports_total": N,
171
+ "public_api_coverage": 0.0,
172
+ "total_coverage": 0.0,
173
+ "scripts_count": N,
174
+ "assets_count": N
175
+ },
176
+ "dependencies": [],
177
+ "compatibility": "{semver-range}"
178
+ }
179
+ ```
180
+
181
+ ### 7. Write Forge Data Artifacts (Workspace)
182
+
183
+ Write workspace artifacts directly to `{forge_version}` (these are workspace-only, not part of the skill package — no staging required). Each individual file MUST be written via `skf-atomic-write.py write` to avoid partial-write corruption:
184
+
185
+ ```bash
186
+ <json-content> | python3 {atomicWriteHelper} write --target {forge_version}/provenance-map.json
187
+ <md-content> | python3 {atomicWriteHelper} write --target {forge_version}/evidence-report.md
188
+ ```
189
+
190
+ If any workspace write fails, invoke the rollback contract from §1.
191
+
192
+ **provenance-map.json:**
193
+
194
+ **In code-mode:**
195
+ ```json
196
+ {
197
+ "provenance_version": "2.0",
198
+ "skill_name": "{project_name}-stack",
199
+ "skill_type": "stack",
200
+ "source_repo": ["{repo_url_1}", "{repo_url_2}"],
201
+ "source_commit": {"{repo_1}": "{hash_1}", "{repo_2}": "{hash_2}"},
202
+ "generated_at": "{ISO-8601}",
203
+ "entries": [
204
+ {
205
+ "export_name": "{name}",
206
+ "export_type": "{type}",
207
+ "source_library": "{library-name}",
208
+ "params": [],
209
+ "return_type": "{type}",
210
+ "source_file": "{file}",
211
+ "source_line": 0,
212
+ "confidence": "T1|T1-low|T2",
213
+ "extraction_method": "ast_bridge|source_reading|qmd_bridge",
214
+ "signature_source": "T1|T2|T3"
215
+ }
216
+ ],
217
+ "integrations": [
218
+ {
219
+ "libraries": ["{libA}", "{libB}"],
220
+ "pattern_type": "{type}",
221
+ "detection_method": "co-import grep",
222
+ "co_import_files": [{"file": "{path}", "line": 0}],
223
+ "confidence": "T1|T2"
224
+ }
225
+ ]
226
+ }
227
+ ```
228
+
229
+ **In compose-mode:**
230
+ ```json
231
+ {
232
+ "provenance_version": "2.0",
233
+ "skill_name": "{project_name}-stack",
234
+ "skill_type": "stack",
235
+ "source_repo": null,
236
+ "source_commit": null,
237
+ "source_ref": null,
238
+ "generated_at": "{ISO-8601}",
239
+ "entries": [
240
+ {
241
+ "export_name": "{name}",
242
+ "export_type": "{type}",
243
+ "source_library": "{library-name}",
244
+ "params": [],
245
+ "return_type": "{type}",
246
+ "source_file": "{from constituent skill}",
247
+ "source_line": 0,
248
+ "confidence": "T1|T1-low|T2",
249
+ "extraction_method": "compose-from-skill",
250
+ "signature_source": "T1|T2|T3"
251
+ }
252
+ ],
253
+ "integrations": [
254
+ {
255
+ "libraries": ["{libA}", "{libB}"],
256
+ "pattern_type": "{type}",
257
+ "detection_method": "architecture_co_mention|inferred_from_shared_domain",
258
+ "co_import_files": [],
259
+ "confidence": "T2|T3"
260
+ }
261
+ ],
262
+ "constituents": [
263
+ {
264
+ "skill_name": "{constituent-skill-name}",
265
+ "skill_path": "skills/{skill-dir}/",
266
+ "version": "{version from constituent metadata.json}",
267
+ "composed_at": "{ISO-8601}",
268
+ "metadata_hash": "sha256:{hash of constituent metadata.json}"
269
+ }
270
+ ]
271
+ }
272
+ ```
273
+
274
+ > **Note:** Per-export entries use the same schema as single skills (see `skill-sections.md`), with `source_library` identifying the originating library. In compose-mode, `constituents[]` enables audit to detect constituent drift via metadata hash comparison. **Use the `metadata_hash` value already stored in workflow state during step-02 (S13) — do NOT re-read and re-hash at step-07 time. The stored hash captures the state as it was at manifest-detection time, which is the correct provenance anchor.**
275
+
276
+ **evidence-report.md:**
277
+ - Extraction summary per library
278
+ - Integration detection results per pair
279
+ - Warnings and failures encountered
280
+ - Confidence tier distribution
281
+
282
+ ### 8. Commit Staging Directory
283
+
284
+ After all staged writes in sections 2–6 completed successfully, atomically swap the staging dir into place:
285
+
286
+ ```bash
287
+ python3 {atomicWriteHelper} commit-dir --target {skill_package}
288
+ ```
289
+
290
+ The helper moves any existing `{skill_package}` aside to a `.skf-rollback-<pid>` dir before the swap. On failure the helper restores the prior target and exits non-zero — in that case invoke the rollback contract from §1 and HALT.
291
+
292
+ ### 9. Flip Active Symlink
293
+
294
+ ONLY AFTER `commit-dir` succeeds, flip the `{skill_group}/active` symlink to point at `{version}`:
295
+
296
+ ```bash
297
+ python3 {atomicWriteHelper} flip-link --link {skill_group}/active --target {version}
298
+ ```
299
+
300
+ The helper holds an flock on `{skill_group}/active.skf-lock` and refuses to replace a non-symlink at `{skill_group}/active` — this guards against accidentally overwriting a real directory (ECH BLOCKER 6/B6). After the flip, `{skill_group}/active/{project_name}-stack/` resolves to the just-committed skill package.
301
+
302
+ If `flip-link` fails, emit a warning (the committed package is still valid), note the symlink-flip failure in the evidence report, and continue.
303
+
304
+ ### 10. Display Write Summary
305
+
306
+ "**Output files written.**
307
+
308
+ **Deliverables** ({skill_package}):
309
+ - SKILL.md ({line_count} lines)
310
+ - context-snippet.md ({token_estimate} tokens)
311
+ - metadata.json
312
+ - references/ -- {lib_count} library files
313
+ - references/integrations/ -- {pair_count} integration files
314
+
315
+ **Workspace** ({forge_version}):
316
+ - provenance-map.json
317
+ - evidence-report.md
318
+
319
+ **Symlink:** {skill_group}/active -> {version}
320
+
321
+ **Total files written:** {total_count}
322
+
323
+ **Proceeding to validation...**"
324
+
325
+ ### 11. Auto-Proceed to Next Step
326
+
327
+ Load, read the full file and then execute `{nextStepFile}`.
328
+
@@ -1,9 +1,6 @@
1
1
  ---
2
- name: 'step-08-validate'
3
- description: 'Validate all output files against structure requirements and confidence tier completeness'
4
-
5
2
  nextStepFile: './step-09-report.md'
6
- stackSkillTemplate: '../data/stack-skill-template.md'
3
+ stackSkillTemplate: 'assets/stack-skill-template.md'
7
4
  ---
8
5
 
9
6
  # Step 8: Validate Output
@@ -12,40 +9,10 @@ stackSkillTemplate: '../data/stack-skill-template.md'
12
9
 
13
10
  Validate all written output files against their expected structure and verify confidence tier label completeness.
14
11
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
16
-
17
- ### Universal Rules:
18
-
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
21
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
-
23
- ### Role Reinforcement:
24
-
25
- - ✅ You are a quality gate operator in Ferris Architect mode
26
- - ✅ Validation is advisory — findings are warnings, not blockers
27
- - ✅ Report findings accurately — do not downplay or exaggerate
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🎯 Validate structure and completeness, not content quality
32
- - 🚫 FORBIDDEN to modify any output files — validation is read-only
33
- - 💬 Report findings with specific file paths and issue descriptions
34
- - 🎯 Advisory mode: always proceed to report regardless of findings
35
-
36
- ## EXECUTION PROTOCOLS:
37
-
38
- - 🎯 Check each deliverable file against its expected structure
39
- - 💾 Store validation_result as workflow state
40
- - 📖 Auto-proceed to report after validation complete
41
- - 🚫 FORBIDDEN to halt on validation warnings (advisory only)
42
-
43
- ## CONTEXT BOUNDARIES:
12
+ ## Rules
44
13
 
45
- - From step 07: written_files[] (all output artifacts with paths)
46
- - From step 01: forge_tier, project_name, skills_output_folder, forge_data_folder
47
- - This step produces: validation_result {status, findings[], warnings[]}
48
- - This is a quality gate — findings inform the report but do not block it
14
+ - Validate structure and completeness, not content quality validation is read-only
15
+ - Advisory mode: always proceed to report regardless of findings
49
16
 
50
17
  ## MANDATORY SEQUENCE
51
18
 
@@ -73,10 +40,14 @@ Record any missing files as **ERROR** findings.
73
40
 
74
41
  ### 2. Check Tool Availability
75
42
 
76
- Run: `npx skill-check -h`
43
+ Probe skill-check with `--no-install` to avoid cold-install hangs, wrap in a short timeout, and treat any hang or non-zero exit as unavailable (S14):
77
44
 
78
- - If succeeds: Use skill-check for automated validation in sections 3, 9
79
- - If fails: Use manual fallback paths in those sections
45
+ ```bash
46
+ timeout 10s npx --no-install skill-check -h
47
+ ```
48
+
49
+ - If exits 0: Use skill-check for automated validation in sections 3, 9.
50
+ - If exits non-zero, times out, or returns "command not found": Use manual fallback paths. Mark `metadata.validation_status: "manual-only"` (do this in step-07 when appropriate) and record every skipped check in the evidence report.
80
51
 
81
52
  **Important:** Do not assume availability — empirical check required.
82
53
 
@@ -86,6 +57,8 @@ Run: `npx skill-check -h`
86
57
 
87
58
  This validates frontmatter, description, body limits, links, formatting — and auto-fixes deterministic issues. Parse JSON for `qualityScore`, `diagnostics[]`, `fixed[]`.
88
59
 
60
+ **Post-fix provenance drift guard (S15):** If `fixed[]` is non-empty, `skill-check --fix` has modified `SKILL.md` after step-07 wrote it. The safe default for v1.0 is to emit a **WARNING** finding listing each auto-fix (`"skill-check --fix modified SKILL.md: {fix_description} — metadata.json hashes/provenance may be out of date"`). Do NOT silently accept the fixes without surfacing the drift. If the caller wants authoritative metadata, they should re-run the workflow.
61
+
89
62
  **If `body.max_lines` reported**, prefer selective split: extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 content inline (inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval). Fall back to `npx skill-check split-body <skill-dir> --write` if not feasible. Verify `#quick-start` and `#key-types` anchors still resolve after split. Then re-validate.
90
63
 
91
64
  **If unavailable**, perform manual frontmatter check:
@@ -115,7 +88,8 @@ Parse metadata.json and verify required fields:
115
88
  - [ ] `skill_type` equals "stack"
116
89
  - [ ] `name` matches `{project_name}-stack`
117
90
  - [ ] `version` and `generation_date` present
118
- - [ ] `confidence_tier` matches forge tier from step 01 (Quick/Forge/Forge+/Deep) — in both code-mode and compose-mode, this is the forge tier; per-library inherited confidence is tracked separately in `confidence_distribution`
91
+ - [ ] `forge_tier` is present and matches the forge tier from step 01 (`Quick|Forge|Forge+|Deep`)
92
+ - [ ] `confidence_tier` is present and is exactly one of `T1|T1-low|T2|T3` — the dominant T-code computed from `confidence_distribution` (pick the tier with the highest count; ties resolve to the weaker tier: T1-low > T1, T2 > T1-low, T3 > T2 for tie-break so the reported tier never overstates confidence)
119
93
  - [ ] `library_count` matches actual reference files; `integration_count` matches pair files
120
94
  - [ ] `libraries` array present and non-empty
121
95
  - [ ] `confidence_distribution` object present with `t1`, `t1_low`, `t2`, `t3` keys (lowercase, matching template definition)
@@ -143,10 +117,10 @@ Record missing tier labels as **WARNING** findings.
143
117
  ### 8. Validate context-snippet.md
144
118
 
145
119
  Verify context-snippet.md follows Vercel-aligned indexed format:
146
- - [ ] First line matches: `[{project}-stack v{version}]|root: {prefix}{project}-stack/` where prefix is `skills/` or a platform root (`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`)
120
+ - [ ] First line matches: `[{project}-stack v{version}]|root: {prefix}{project}-stack/` where prefix is `skills/` (draft form) or any IDE skill root (`.{dir}/skills/`)
147
121
  - [ ] Second line starts with `|IMPORTANT:`
148
122
  - [ ] Stack and integrations lines present
149
- - [ ] Approximate token count is ~80-120 tokens
123
+ - [ ] Approximate token count is ~80-120 tokens (use the `ceil(char_count / 4)` heuristic from step-07 §5; tolerate up to ~150 if the overflow strategy was applied and a workflow_warning was emitted)
150
124
 
151
125
  Record format violations as **WARNING** findings.
152
126
 
@@ -172,23 +146,3 @@ Record security findings as advisory **WARNING** findings — they do not block
172
146
 
173
147
  Load, read the full file and then execute `{nextStepFile}`.
174
148
 
175
- ---
176
-
177
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
178
-
179
- ### ✅ SUCCESS:
180
-
181
- - All expected files checked; `npx skill-check check --fix` executed if available (or manual fallback)
182
- - Quality score captured; auto-fix and split-body applied as needed; security scan executed (or skipped with note)
183
- - SKILL.md validated against template; metadata.json fields verified; reference files checked
184
- - Confidence tier coverage verified; validation results displayed with specific findings
185
- - Advisory mode: always proceeded to report
186
-
187
- ### ❌ SYSTEM FAILURE:
188
-
189
- - Modifying output files during validation (except via skill-check --fix)
190
- - Halting on validation warnings; not checking all expected files
191
- - Reporting vague findings without file paths; skipping confidence tier check
192
- - Not recording quality score when skill-check is available
193
-
194
- **Master Rule:** Validate everything, fix what's deterministic via skill-check, scan for security issues. Advisory findings — always proceed to report.