bmad-module-skill-forge 0.10.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/shared/health-check.md +372 -0
  38. package/src/shared/references/feasibility-report-schema.md +86 -0
  39. package/src/shared/references/headless-gate-convention.md +62 -0
  40. package/src/shared/references/output-contract-schema.md +35 -0
  41. package/src/shared/references/pipeline-contracts.md +102 -0
  42. package/src/shared/scripts/skf-atomic-write.py +370 -0
  43. package/src/shared/scripts/skf-manifest-ops.py +236 -0
  44. package/src/shared/scripts/skf-preflight.py +164 -0
  45. package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
  46. package/src/shared/scripts/skf-severity-classify.py +163 -0
  47. package/src/shared/scripts/skf-skill-inventory.py +210 -0
  48. package/src/shared/scripts/skf-structural-diff.py +257 -0
  49. package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
  50. package/src/shared/scripts/skf-validate-output.py +247 -0
  51. package/src/skf-analyze-source/SKILL.md +57 -0
  52. package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
  53. package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
  54. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
  55. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
  56. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
  57. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
  58. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
  59. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
  60. package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -71
  61. package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
  62. package/src/skf-audit-skill/SKILL.md +59 -0
  63. package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
  64. package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
  65. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
  66. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
  67. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
  68. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
  69. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
  70. package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -64
  71. package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
  72. package/src/skf-brief-skill/SKILL.md +53 -0
  73. package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
  74. package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
  75. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
  76. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
  77. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
  78. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
  79. package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -70
  80. package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
  81. package/src/skf-create-skill/SKILL.md +63 -0
  82. package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
  83. package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
  84. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
  85. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
  86. package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
  87. package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
  88. package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
  89. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
  90. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
  91. package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
  92. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
  93. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
  94. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
  95. package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
  96. package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
  97. package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
  98. package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
  99. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
  100. package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
  101. package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
  102. package/src/skf-create-stack-skill/SKILL.md +64 -0
  103. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
  104. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
  105. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
  106. package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
  107. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
  108. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
  109. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
  110. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
  111. package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
  112. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
  113. package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
  114. package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
  115. package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
  116. package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
  117. package/src/skf-drop-skill/SKILL.md +57 -0
  118. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
  119. package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
  120. package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
  121. package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
  122. package/src/skf-export-skill/SKILL.md +57 -0
  123. package/src/skf-export-skill/assets/managed-section-format.md +138 -0
  124. package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
  125. package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
  126. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
  127. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
  128. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
  129. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
  130. package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +16 -68
  131. package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
  132. package/src/skf-forger/SKILL.md +110 -0
  133. package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
  134. package/src/skf-quick-skill/SKILL.md +56 -0
  135. package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
  136. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
  137. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
  138. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
  139. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
  140. package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
  141. package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
  142. package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
  143. package/src/skf-refine-architecture/SKILL.md +57 -0
  144. package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
  145. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
  146. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
  147. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
  148. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
  149. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
  150. package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +11 -64
  151. package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
  152. package/src/skf-rename-skill/SKILL.md +58 -0
  153. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
  154. package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
  155. package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
  156. package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
  157. package/src/skf-setup/SKILL.md +55 -0
  158. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
  159. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
  160. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
  161. package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
  162. package/src/skf-setup/steps-c/step-04-report.md +92 -0
  163. package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
  164. package/src/skf-test-skill/SKILL.md +59 -0
  165. package/src/skf-test-skill/references/migration-section-rules.md +114 -0
  166. package/src/skf-test-skill/references/scoring-rules.md +207 -0
  167. package/src/skf-test-skill/references/source-access-protocol.md +109 -0
  168. package/src/skf-test-skill/scripts/compute-score.py +310 -0
  169. package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
  170. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
  171. package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
  172. package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
  173. package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
  174. package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
  175. package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
  176. package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
  177. package/src/skf-test-skill/templates/test-report-template.md +58 -0
  178. package/src/skf-update-skill/SKILL.md +58 -0
  179. package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
  180. package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
  181. package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
  182. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
  183. package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
  184. package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
  185. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
  186. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
  187. package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
  188. package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -69
  189. package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
  190. package/src/skf-verify-stack/SKILL.md +60 -0
  191. package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
  192. package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
  193. package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
  194. package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
  195. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
  196. package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
  197. package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
  198. package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
  199. package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
  200. package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
  201. package/tools/cli/commands/install.js +1 -1
  202. package/tools/cli/commands/status.js +21 -23
  203. package/tools/cli/commands/uninstall.js +11 -19
  204. package/tools/cli/commands/update.js +2 -2
  205. package/tools/cli/lib/ide-skills.js +216 -0
  206. package/tools/cli/lib/installer.js +29 -52
  207. package/tools/cli/lib/manifest.js +11 -5
  208. package/tools/cli/lib/platform-codes.yaml +223 -0
  209. package/tools/cli/lib/ui.js +76 -47
  210. package/tools/validate-docs-drift.js +193 -0
  211. package/src/agents/forger.agent.yaml +0 -114
  212. package/src/workflows/README.md +0 -174
  213. package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
  214. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
  215. package/src/workflows/analyze-source/workflow.md +0 -61
  216. package/src/workflows/audit-skill/workflow.md +0 -64
  217. package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
  218. package/src/workflows/brief-skill/workflow.md +0 -58
  219. package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
  220. package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
  221. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
  222. package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
  223. package/src/workflows/create-skill/steps-c/step-08-report.md +0 -179
  224. package/src/workflows/create-skill/workflow.md +0 -53
  225. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
  226. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
  227. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -150
  228. package/src/workflows/create-stack-skill/workflow.md +0 -59
  229. package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -136
  230. package/src/workflows/drop-skill/workflow.md +0 -63
  231. package/src/workflows/export-skill/data/managed-section-format.md +0 -103
  232. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
  233. package/src/workflows/export-skill/workflow.md +0 -58
  234. package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -178
  235. package/src/workflows/quick-skill/workflow.md +0 -58
  236. package/src/workflows/refine-architecture/workflow.md +0 -61
  237. package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -133
  238. package/src/workflows/rename-skill/workflow.md +0 -64
  239. package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -159
  240. package/src/workflows/setup-forge/workflow.md +0 -51
  241. package/src/workflows/shared/health-check.md +0 -231
  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 -208
  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 -200
  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,8 +1,13 @@
1
1
  ---
2
- name: 'step-07-generate-artifacts'
3
- description: 'Write all output files — 4 deliverables to skills/ and 3 workspace artifacts to forge-data/'
4
2
  nextStepFile: './step-08-report.md'
5
3
  forgeTierConfig: '{sidecar_path}/forge-tier.yaml'
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 — the active-symlink flip and registry
7
+ # writes below MUST go through the atomic helper for concurrency safety.
8
+ atomicWriteProbeOrder:
9
+ - '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
10
+ - '{project-root}/src/shared/scripts/skf-atomic-write.py'
6
11
  ---
7
12
 
8
13
  # Step 7: Generate Artifacts
@@ -11,43 +16,11 @@ forgeTierConfig: '{sidecar_path}/forge-tier.yaml'
11
16
 
12
17
  To write all compiled content to disk — 4 deliverable files to `{skill_package}` and 3 workspace artifacts to `{forge_version}`, creating directories as needed. Then create or update the `active` symlink.
13
18
 
14
- ## MANDATORY EXECUTION RULES (READ FIRST):
19
+ ## Rules
15
20
 
16
- ### Universal Rules:
17
-
18
- - 📖 CRITICAL: Read the complete step file before taking any action
19
- - 🎯 ALWAYS follow the exact instructions in the step file
20
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a 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 compilation engine performing artifact generation
26
- - ✅ All content was assembled in step-05 and validated in step-06
27
- - ✅ This step ONLY writes — it does not modify, compile, or validate content
28
-
29
- ### Step-Specific Rules:
30
-
31
- - 🎯 Focus ONLY on writing files from the compiled content in context
32
- - 🚫 FORBIDDEN to modify content during writing — write exactly what was compiled
33
- - 🚫 FORBIDDEN to skip any artifact — all base artifact types must be written (4 deliverables + 3 workspace files + N reference files)
34
- - 💬 Report each file written with its path
35
- - 📁 Create directories before writing files
36
-
37
- ## EXECUTION PROTOCOLS:
38
-
39
- - 🎯 Follow MANDATORY SEQUENCE exactly
40
- - 💾 Write files using the compiled content from context
41
- - 📖 Create directory structure first, then write files
42
- - 🚫 Halt with error if a file write fails — do not continue with partial output
43
-
44
- ## CONTEXT BOUNDARIES:
45
-
46
- - Available: All compiled content from step-05, validation results from step-06, source_root from step-01 (needed for section 5b CCC registration)
47
- - Focus: File system operations — create directories, write files
48
- - Limits: Do NOT modify content during writing
49
- - Dependencies: All content must be compiled and validated in context
50
- - Path resolution: See `knowledge/version-paths.md` for canonical path templates (`{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}`)
21
+ - Focus only on writing files from compiled content — do not modify content during writing
22
+ - All base artifact types must be written (4 deliverables + 3 workspace files + N reference files)
23
+ - Create directories before writing files
51
24
 
52
25
  ## MANDATORY SEQUENCE
53
26
 
@@ -98,6 +71,10 @@ Write these 4 files from the compiled content:
98
71
  - One file per detected asset, copied from source with content preserved
99
72
  - Only created when `assets_inventory` is non-empty
100
73
 
74
+ **Note on `file_type: "doc"` entries** (promoted authoritative docs from step-03 §2a):
75
+
76
+ Promoted docs are tracked in `file_entries[]` with `file_type: "doc"` for drift detection but are **NOT** copied into the skill package. The source file remains at its original location outside `{skill_package}`. Step-07 must skip any `file_entries[]` row where `file_type == "doc"` when iterating for file copy — these entries exist only for provenance tracking, not bundling. Step-07 verification (§5) also does not check for doc files in the skill package.
77
+
101
78
  ### 3. Write Workspace Artifacts to {forge_version}
102
79
 
103
80
  Write these 3 files from the compiled content:
@@ -110,16 +87,21 @@ Write these 3 files from the compiled content:
110
87
 
111
88
  **File 7:** `{forge_version}/extraction-rules.yaml`
112
89
  - Language and ast-grep schema used for this extraction (for reproducibility)
90
+ - Note: This file is generated here from extraction data collected during steps 3-4, not assembled in step-05
113
91
 
114
- ### 4. Create Active Symlink
92
+ ### 4. Create Active Symlink (atomic flip)
115
93
 
116
- Create or update the `active` symlink at `{skill_group}/active` pointing to `{version}`:
94
+ Create or update the `active` symlink at `{skill_group}/active` pointing to `{version}` using the shared atomic-flip helper. The helper holds an `flock` on `{skill_group}/active.skf-lock`, refuses to replace a non-symlink at `{skill_group}/active` (protecting against accidental rm-rf of a real directory), and uses a rename-over-symlink pattern so the update is atomic from a concurrent reader's perspective:
117
95
 
96
+ ```bash
97
+ python3 {atomicWriteHelper} flip-link \
98
+ --link {skill_group}/active \
99
+ --target {version}
118
100
  ```
119
- {skill_group}/active -> {version}
120
- ```
121
101
 
122
- If the symlink already exists, remove it first and recreate. This ensures `{skill_group}/active/{name}/` resolves to the just-written skill package.
102
+ The helper returns non-zero (exit 2) if `{skill_group}/active` already exists as a real directory or file rather than a symlink — in that case, halt with: "Refusing to flip `{skill_group}/active` existing path is not a symlink. Investigate manually; expected a symlink pointing at a version directory."
103
+
104
+ **Never `rm` + `ln -s` the active link manually.** The bare-rm pattern has two failure modes: (1) a concurrent reader sees a missing `active` mid-flip, and (2) a bug or typo that replaces `{skill_group}/active` with a plain directory turns the next manual `rm -rf {skill_group}/active` into data loss. The helper encapsulates both guards.
123
105
 
124
106
  ### 5. Verify Write Completion
125
107
 
@@ -164,12 +146,12 @@ Index the generated skill artifacts into a QMD collection so that audit-skill an
164
146
  ```bash
165
147
  qmd collection remove {name}-extraction 2>/dev/null # no-op if new
166
148
  qmd collection add {skill_package} --name {name}-extraction --mask "**/*"
167
- qmd embed # generates vector embeddings for vector_search/deep_search
149
+ qmd embed --collection {name}-extraction # generates vector embeddings for semantic (vec) and HyDE query sub-types; scope to this collection to avoid re-embedding others. If the installed qmd CLI lacks --collection, gate the embed behind a per-skill freshness check (skip when the existing {name}-extraction entry is within 24 hours — rationale: an unscoped embed re-runs over every collection, which in a populated QMD store can cost minutes of GPU time per create-skill run; 24 hours is long enough to absorb rapid re-forges from the same brief without losing meaningful content freshness) and warn in evidence-report.
168
150
  ```
169
151
 
170
152
  **Registry update:**
171
153
 
172
- Read `{forgeTierConfig}` and update the `qmd_collections` array.
154
+ Read `{forgeTierConfig}` and update the `qmd_collections` array **under an exclusive `flock` on `{sidecar_path}/forge-tier.yaml.lock`** (see step-03b §4 for the full pattern — acquire lock → read → modify → atomic write via `skf-atomic-write.py write` → release). If `flock` is unavailable, fall back to read-CAS-by-mtime.
173
155
 
174
156
  If an entry with `name: "{name}-extraction"` already exists, replace it. Otherwise, append:
175
157
 
@@ -184,7 +166,7 @@ If an entry with `name: "{name}-extraction"` already exists, replace it. Otherwi
184
166
  Write the updated forge-tier.yaml.
185
167
 
186
168
  **Error handling:**
187
- - If QMD collection creation fails: log the error, note that indexing can be retried via [SF] setup-forge. Do NOT fail the workflow.
169
+ - If QMD collection creation fails: log the error, note that indexing can be retried via [SF] setup. Do NOT fail the workflow.
188
170
  - If forge-tier.yaml update fails: log the error, continue. The collection exists in QMD even if the registry entry failed.
189
171
 
190
172
  **IF forge tier is NOT Deep:** Skip this section silently. No messaging.
@@ -197,11 +179,11 @@ Ensure the source path used for extraction is indexed by ccc and registered in t
197
179
 
198
180
  **Index verification:**
199
181
 
200
- Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.ensure_index` is a conceptual interface, not a callable function. This is a no-op if the source was already indexed during setup-forge or step-02b.
182
+ Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.ensure_index` is a conceptual interface, not a callable function. This is a no-op if the source was already indexed during setup or step-02b.
201
183
 
202
184
  **Registry update:**
203
185
 
204
- Read `{forgeTierConfig}` and update the `ccc_index_registry` array.
186
+ Read `{forgeTierConfig}` and update the `ccc_index_registry` array **under an exclusive `flock` on `{sidecar_path}/forge-tier.yaml.lock`** (same pattern as §6 — acquire lock → read → modify → atomic write via `skf-atomic-write.py write` → release). If `flock` is unavailable, fall back to read-CAS-by-mtime.
205
187
 
206
188
  Deduplicate by `source_repo` + `skill_name` (NOT local `path`, which may be ephemeral). Replace existing match or append:
207
189
 
@@ -237,29 +219,3 @@ After all artifacts are written, verified, and optionally indexed into QMD, imme
237
219
 
238
220
  ONLY WHEN all 7 artifact files are written, the active symlink is created, and verification is complete will you proceed to load `{nextStepFile}` for the compilation report.
239
221
 
240
- ---
241
-
242
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
243
-
244
- ### ✅ SUCCESS:
245
-
246
- - Directory structure created ({skill_group}, {skill_package}, {forge_version})
247
- - All 4 deliverable files written to {skill_package}
248
- - All 3 workspace artifact files written to {forge_version}
249
- - Active symlink created at {skill_group}/active -> {version}
250
- - Write completion verified — all 7 files exist and symlink resolves
251
- - Deep tier: QMD collection `{name}-extraction` created/updated and registered in forge-tier.yaml
252
- - Non-Deep tier: QMD indexing skipped silently
253
- - Brief confirmation displayed with file list
254
- - Auto-proceeded to step-08
255
-
256
- ### ❌ SYSTEM FAILURE:
257
-
258
- - Modifying content during the write step
259
- - Skipping any of the 7 required files
260
- - Proceeding with partial output if a write fails
261
- - Not creating directories before writing
262
- - Not verifying all files were written
263
- - Failing the workflow due to QMD indexing errors (should degrade gracefully)
264
-
265
- **Master Rule:** This step writes artifacts, creates the active symlink, and registers QMD collections. All content was compiled and validated in previous steps. Write faithfully, verify completely. QMD indexing failures never block the workflow.
@@ -0,0 +1,145 @@
1
+ ---
2
+ nextStepFile: './step-09-health-check.md'
3
+ # Resolve `{atomicWriteHelper}` by probing `{atomicWriteProbeOrder}` in order
4
+ # (installed SKF module path first, src/ dev-checkout fallback); first existing
5
+ # path wins. HALT if neither resolves.
6
+ atomicWriteProbeOrder:
7
+ - '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
8
+ - '{project-root}/src/shared/scripts/skf-atomic-write.py'
9
+ ---
10
+
11
+ # Step 8: Report
12
+
13
+ ## STEP GOAL:
14
+
15
+ To display the final compilation summary — skill name, version, source, export count, confidence distribution, tier used, file list, and any warnings — and suggest next steps for the user.
16
+
17
+ ## Rules
18
+
19
+ - Focus only on reporting compilation results — do not modify any files
20
+ - Deliver structured report with confidence breakdown
21
+ - Chains to the local health-check step via `{nextStepFile}` after completion (non-batch mode, or after the final batch brief) — the user-facing report is NOT the terminal step
22
+
23
+ ## MANDATORY SEQUENCE
24
+
25
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
26
+
27
+ ### 1. Display Forge Completion Banner
28
+
29
+ "**Skill forged: {name} v{version} — {export_count} functions, {primary_confidence} confidence.**"
30
+
31
+ Where `{primary_confidence}` is the predominant confidence tier (T1 if Forge/Deep, T1-low if Quick).
32
+
33
+ ### 2. Display Compilation Summary
34
+
35
+ "**Compilation Summary**
36
+
37
+ | Field | Value |
38
+ |-------|-------|
39
+ | **Skill** | {name} v{version} |
40
+ | **Source** | {source_repo} @ {branch} ({commit_short}) |
41
+ | **Language** | {language} |
42
+ | **Forge Tier** | {tier} — {tier_description} |
43
+ | **Files Scanned** | {file_count} |
44
+ | **Exports Documented** | {documented_count} public API ({public_api_coverage}%) / {total_count} total ({total_coverage}%) |
45
+
46
+ **Confidence Distribution:**
47
+ | Tier | Count | Description |
48
+ |------|-------|-------------|
49
+ | T1 (AST) | {t1_count} | Structurally verified via ast-grep |
50
+ | T1-low (Source) | {t1_low_count} | Inferred from source reading |
51
+ | T2 (QMD) | {t2_count} | QMD-enriched semantic context |
52
+ | T3 (External) | {t3_count} | Sourced from external documentation URLs |
53
+
54
+ **Output Files:**
55
+ - `{skill_package}/SKILL.md` — Active skill with trigger-based usage
56
+ - `{skill_package}/context-snippet.md` — Passive context snippet (used by export-skill)
57
+ - `{skill_package}/metadata.json` — Machine-readable birth certificate
58
+ - `{skill_package}/references/` — Progressive disclosure ({ref_count} files)
59
+ - `{forge_version}/provenance-map.json` — Source map with AST bindings
60
+ - `{forge_version}/evidence-report.md` — Build audit trail
61
+ - `{forge_version}/extraction-rules.yaml` — Reproducible extraction schema
62
+ - `{skill_group}/active` -> `{version}` — Symlink to current version"
63
+
64
+ ### 3. Display Warnings (If Any)
65
+
66
+ If there were warnings from extraction, validation, or enrichment, display them:
67
+
68
+ "**Warnings:**
69
+ - {warning_1}
70
+ - {warning_2}
71
+ - ..."
72
+
73
+ If no warnings, omit this section entirely.
74
+
75
+ **Next steps:** After reviewing the report, recommend the next workflow:
76
+ - **TS** (test skill) — verify completeness before export
77
+ - **EX** (export) — publish to your IDE's context system
78
+ - If issues were flagged, suggest **reviewing the SKILL.md** and re-running compilation
79
+
80
+ ### 4. Suggest Next Steps
81
+
82
+ "**Recommended next steps:**
83
+ - **[TS] Test Skill** — verify completeness and accuracy before export
84
+ - **[EX] Export Skill** — publish to your skill library or agentskills.io
85
+ - **[US] Update Skill** — edit specific sections or add manual content
86
+
87
+ To use this skill immediately, add the context snippet to your CLAUDE.md:
88
+ ```
89
+ {context_snippet_content}
90
+ ```"
91
+
92
+ ### 5. Batch Mode Status (If Applicable)
93
+
94
+ **If running in --batch mode:**
95
+
96
+ "**Batch progress:** {completed_count} of {total_count} skills compiled.
97
+
98
+ {If more remaining:} Proceeding to next brief: {next_skill_name}..."
99
+
100
+ Update the batch checkpoint in `{sidecar_path}/batch-state.yaml` with:
101
+
102
+ ```yaml
103
+ batch_active: true
104
+ brief_list: [{full list of brief paths}]
105
+ current_index: {index of next brief to process, 0-based}
106
+ completed: [{list of completed skill names}]
107
+ last_updated: {ISO timestamp}
108
+ ```
109
+
110
+ **Before writing:** validate the same two invariants that step-01 re-checks on resume — `0 <= current_index < len(brief_list)` AND `os.path.exists(brief_list[current_index])`. If either fails (e.g., the next brief file was deleted mid-batch, or arithmetic pushed the index off the end), set `batch_active: false` and write `batch_halt_reason: "invalid checkpoint at write time — index or file missing"` instead of the active record. The next run will re-discover rather than resume a broken index.
111
+
112
+ Then load and execute `steps-c/step-01-load-brief.md` for the next brief. Step-01 detects an active batch via `batch-state.yaml` and loads the brief at `current_index` only after re-validating the same invariants (belt and braces — the checkpoint may have been edited between runs).
113
+
114
+ **If all batch briefs complete:**
115
+
116
+ Set `batch_active: false` in `{sidecar_path}/batch-state.yaml` to prevent stale state. Display: "Batch complete. {completed_count} skills compiled."
117
+
118
+ **If not batch mode:**
119
+
120
+ End workflow. No further steps.
121
+
122
+ ### Result Contract
123
+
124
+ **If not batch mode (or all batch briefs complete):**
125
+
126
+ **Resolve the schema reference:** before writing, verify that `{project-root}/src/shared/references/output-contract-schema.md` exists and is readable. Try in order: `{project-root}/src/shared/references/output-contract-schema.md`, then `{project-root}/_bmad/skf/shared/references/output-contract-schema.md` (installed-forge path).
127
+
128
+ - **If resolved:** write the result contract per the schema — the per-run record at `{forge_version}/create-skill-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{forge_version}/create-skill-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include `SKILL.md`, `context-snippet.md`, and `metadata.json` paths in `outputs` and confidence distribution in `summary`. Use `python3 {atomicWriteHelper} write --target {forge_version}/create-skill-result-{YYYYMMDD-HHmmss}.json` (stdin-piped JSON) for the per-run record, then the same helper for the `-latest.json` copy.
129
+
130
+ - **If neither candidate path resolves:** skip the result-contract write entirely. Append a warning to `evidence-report.md`: "Result contract skipped — `shared/references/output-contract-schema.md` could not be resolved at either candidate path." Then set `validation_status: 'schema-unavailable'` in `metadata.json` (and re-write metadata.json via `skf-atomic-write.py write`). Pipeline consumers will observe the missing `-latest.json` and the metadata flag.
131
+
132
+ ### 6. Chain to Health Check
133
+
134
+ **If not batch mode (or all batch briefs complete):**
135
+
136
+ ONLY WHEN the compilation report, warnings (if any), recommended next steps, and result contract have been handled 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 report reads as final.
137
+
138
+ **If batch mode with remaining briefs:** Skip the health-check chain — load and execute `steps-c/step-01-load-brief.md` for the next brief instead. The health check runs only after the final brief in the batch.
139
+
140
+ ## CRITICAL STEP COMPLETION NOTE
141
+
142
+ This step chains to the local health-check step (`{nextStepFile}`), which in turn delegates to `shared/health-check.md` (unless batch mode loops back to step-01). After the health check completes, the create-skill workflow is fully done.
143
+
144
+ For batch mode: load and execute `steps-c/step-01-load-brief.md` for remaining briefs via sidecar checkpoint. Health check runs only after the last brief.
145
+
@@ -0,0 +1,23 @@
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 9: 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 create-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-08
17
+ - Delegate directly to `{nextStepFile}` with no additional commentary
18
+ - In batch mode, this step is only reached after the final brief — step-08 loops back to step-01-load-brief for remaining briefs and skips chaining here
19
+ - Do not attempt any other action between loading this step and executing `{nextStepFile}`
20
+
21
+ ## MANDATORY SEQUENCE
22
+
23
+ Load `{nextStepFile}`, read it fully, then execute it.
@@ -1,7 +1,5 @@
1
1
  ---
2
- name: 'step-02b-ccc-discover'
3
- description: 'CCC semantic discovery pass — Forge+ and Deep tiers when ccc is available, skip for Quick/Forge'
4
- nextStepFile: './step-03-extract.md'
2
+ nextStepFile: '../step-03-extract.md'
5
3
  ---
6
4
 
7
5
  # Step 2b: CCC Semantic Discovery
@@ -12,44 +10,11 @@ If tier is Forge+ or Deep AND ccc is available, perform a semantic discovery pas
12
10
 
13
11
  For Quick and Forge tiers, or when ccc is unavailable, skip silently and proceed.
14
12
 
15
- ## MANDATORY EXECUTION RULES (READ FIRST):
13
+ ## Rules
16
14
 
17
- ### Universal Rules:
18
-
19
- - 📖 CRITICAL: Read the complete step file before taking any action
20
- - 🎯 ALWAYS follow the exact instructions in the step file
21
- - 🔄 CRITICAL: When loading next step, ensure entire file is read
22
- - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a 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 compilation engine performing semantic pre-discovery
28
- - ✅ CCC discovery is a hint layer — it guides extraction, it does not replace it
29
- - ✅ Discovery failure is graceful degradation, not an error
30
-
31
- ### Step-Specific Rules:
32
-
33
- - 🎯 Focus ONLY on running ccc semantic search and storing results
34
- - 🚫 FORBIDDEN to extract exports — that is step-03
35
- - 🚫 FORBIDDEN to modify brief data or source resolution
36
- - 🚫 FORBIDDEN to block the workflow if ccc fails
37
- - ⏱️ Quick and Forge tiers: skip this step entirely and silently
38
-
39
- ## EXECUTION PROTOCOLS:
40
-
41
- - 🎯 Follow MANDATORY SEQUENCE exactly
42
- - 💾 Discovery results stored in context as `{ccc_discovery}`
43
- - 📖 Results are consumed by step-03 to pre-rank the file extraction queue
44
- - 🚫 Never treat ccc results as verified extractions
45
-
46
- ## CONTEXT BOUNDARIES:
47
-
48
- - Available: tier, tools.ccc, ccc_index from forge-tier.yaml (loaded in step-01)
49
- - Available: brief_data (name, scope, description) from step-01
50
- - Available: source_root (resolved source path) from step-01 — note: for remote sources, `source_root` may not be a local path until step-03 performs the ephemeral clone
51
- - Focus: Semantic discovery only — no extraction, no compilation
52
- - Dependencies: step-02 must have completed
15
+ - Focus only on running ccc semantic search and storing results — do not extract exports
16
+ - Do not block the workflow if ccc fails
17
+ - Quick and Forge tiers: skip this step entirely and silently
53
18
 
54
19
  ## MANDATORY SEQUENCE
55
20
 
@@ -67,7 +32,7 @@ Check `tools.ccc` from forge-tier.yaml. If `tools.ccc` is false, set `{ccc_disco
67
32
 
68
33
  If `tools.ccc` is true, check the remote source guard **before** proceeding to section 2:
69
34
 
70
- **Remote source guard:** If `source_root` is a remote URL (GitHub repository not yet cloned locally ephemeral clone happens in step-03), CCC cannot operate yet. Set `{ccc_discovery: []}` and display: "CCC discovery deferred — remote source will be indexed after ephemeral clone in step-03." Auto-proceed to section 5 (step completion). Step-03 will detect the deferred scenario and run CCC discovery on the ephemeral clone before AST extraction begins.
35
+ **Remote source guard:** If `source_root` is a remote URL (GitHub repository workspace clone or ephemeral clone happens in step-03), CCC cannot operate yet. Set `{ccc_discovery: []}` and display: "CCC discovery deferred — remote source will be indexed after clone in step-03." Auto-proceed to section 5 (step completion). Step-03 will detect the deferred scenario and run CCC discovery on the resolved clone (workspace or ephemeral) before AST extraction begins.
71
36
 
72
37
  If `source_root` is a local path, continue to section 2.
73
38
 
@@ -79,7 +44,7 @@ Read `ccc_index` from forge-tier.yaml:
79
44
  - If `ccc_index.status` is `"stale"`: display brief note — "CCC index is stale — discovery results may miss recent changes." Continue to section 3.
80
45
  - If `ccc_index.status` is `"none"` or `"failed"`: attempt lazy indexing via `ccc_bridge.ensure_index(source_root)`. If indexing succeeds, continue to section 3. If indexing fails, set `{ccc_discovery: []}` and auto-proceed to section 5.
81
46
 
82
- **Tool resolution for ccc_bridge.ensure_index:** Use `/ccc` skill indexing (Claude Code), ccc MCP server (Cursor), or `cd {source_root} && ccc init` + `ccc index` (CLI). Note: `ccc init` takes no positional arguments — it initializes the index for the current working directory. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
47
+ **Tool resolution for ccc_bridge.ensure_index:** Use `/ccc` skill indexing (Claude Code), ccc MCP server (Cursor), or `cd {source_root} && ccc init` + `ccc index` (CLI). Note: `ccc init` takes no positional arguments — it initializes the index for the current working directory. See `knowledge/tool-resolution.md`.
83
48
 
84
49
  ### 3. Construct Semantic Query
85
50
 
@@ -97,7 +62,7 @@ Where:
97
62
 
98
63
  Run `ccc_bridge.search(query, source_root, top_k=20)`:
99
64
 
100
- **Tool resolution for ccc_bridge.search:** Use `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `cd {source_root} && ccc search --limit 20 "{query}"` (CLI). Note: `ccc search` operates on the index in the current working directory — there is no flag to specify a project directory. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
65
+ **Tool resolution for ccc_bridge.search:** Use `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `cd {source_root} && ccc search --limit 20 "{query}"` (CLI). Note: `ccc search` operates on the index in the current working directory — there is no flag to specify a project directory. See `knowledge/tool-resolution.md`.
101
66
 
102
67
  **If search succeeds:**
103
68
 
@@ -140,26 +105,3 @@ Immediately load, read entire file, then execute `{nextStepFile}`.
140
105
 
141
106
  ONLY WHEN discovery is complete (Forge+/Deep with ccc) or the step is skipped (Quick/Forge or ccc unavailable) will you proceed to load `{nextStepFile}` for AST extraction.
142
107
 
143
- ---
144
-
145
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
146
-
147
- ### ✅ SUCCESS:
148
-
149
- - Quick/Forge tiers: skipped silently with no output, auto-proceeded
150
- - Forge+/Deep with ccc: semantic query constructed from brief data
151
- - Forge+/Deep with ccc: ccc_bridge.search executed, results stored as `{ccc_discovery}` in context
152
- - Discovery summary displayed (count of regions and unique files)
153
- - CCC failures handled gracefully (empty discovery, continue)
154
- - Auto-proceeded to step-03
155
-
156
- ### ❌ SYSTEM FAILURE:
157
-
158
- - Halting on CCC unavailability or search failures
159
- - Extracting exports or signatures (that is step-03)
160
- - Displaying skip messages for Quick/Forge tiers
161
- - Treating CCC discovery results as verified extractions
162
- - Not storing `{ccc_discovery}` in context (even if empty)
163
- - Beginning compilation or SKILL.md assembly in this step
164
-
165
- **Master Rule:** CCC discovery is a hint layer. It improves extraction coverage but never replaces structural verification. Failures degrade gracefully.