bmad-module-skill-forge 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +51 -49
  3. package/docs/404.md +10 -8
  4. package/docs/_data/pinned.yaml +22 -13
  5. package/docs/_internal/STABILITY.md +58 -35
  6. package/docs/agents.md +39 -53
  7. package/docs/architecture.md +65 -51
  8. package/docs/bmad-synergy.md +53 -51
  9. package/docs/campaign.md +127 -75
  10. package/docs/concepts.md +34 -28
  11. package/docs/examples.md +70 -68
  12. package/docs/forge-auto.md +34 -31
  13. package/docs/getting-started.md +118 -57
  14. package/docs/how-it-works.md +25 -21
  15. package/docs/index.md +15 -15
  16. package/docs/skill-model.md +70 -59
  17. package/docs/troubleshooting.md +135 -18
  18. package/docs/verifying-a-skill.md +83 -57
  19. package/docs/why-skf.md +24 -22
  20. package/docs/workflows.md +274 -110
  21. package/package.json +18 -10
  22. package/src/forger/preferences.yaml +8 -1
  23. package/src/knowledge/agentskills-spec.md +2 -0
  24. package/src/knowledge/ccc-bridge.md +40 -24
  25. package/src/knowledge/confidence-tiers.md +9 -5
  26. package/src/knowledge/overview.md +3 -3
  27. package/src/knowledge/progressive-capability.md +8 -8
  28. package/src/knowledge/provenance-tracking.md +9 -5
  29. package/src/knowledge/qmd-registry.md +2 -2
  30. package/src/knowledge/skf-knowledge-index.csv +2 -2
  31. package/src/knowledge/skill-lifecycle.md +18 -11
  32. package/src/knowledge/split-body-strategy.md +0 -3
  33. package/src/knowledge/tool-resolution.md +4 -2
  34. package/src/knowledge/version-paths.md +101 -15
  35. package/src/module-help.csv +3 -3
  36. package/src/module.yaml +10 -0
  37. package/src/shared/data/ast-grep-recipes.yaml +608 -0
  38. package/src/shared/data/ide-context-files.json +30 -0
  39. package/src/shared/health-check.md +32 -12
  40. package/src/shared/references/description-guard-protocol.md +14 -9
  41. package/src/shared/references/feasibility-report-schema.md +19 -13
  42. package/src/shared/references/headless-gate-convention.md +55 -3
  43. package/src/shared/references/output-contract-schema.md +19 -8
  44. package/src/shared/references/pipeline-contracts.md +94 -29
  45. package/src/shared/references/tessl-review.md +77 -0
  46. package/src/shared/scripts/schemas/skf-analyze-result-envelope.v1.json +194 -0
  47. package/src/shared/scripts/schemas/skf-audit-result-envelope.v1.json +192 -0
  48. package/src/shared/scripts/schemas/skf-brief-result-envelope.v1.json +32 -4
  49. package/src/shared/scripts/schemas/skf-campaign-result-envelope.v1.json +174 -0
  50. package/src/shared/scripts/schemas/skf-create-skill-result-envelope.v1.json +284 -0
  51. package/src/shared/scripts/schemas/skf-drop-skill-result-envelope.v1.json +164 -0
  52. package/src/shared/scripts/schemas/skf-export-result-envelope.v1.json +160 -0
  53. package/src/shared/scripts/schemas/skf-quick-skill-result-envelope.v1.json +261 -0
  54. package/src/shared/scripts/schemas/skf-refine-architecture-result-envelope.v1.json +192 -0
  55. package/src/shared/scripts/schemas/skf-rename-skill-result-envelope.v1.json +179 -0
  56. package/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json +27 -11
  57. package/src/shared/scripts/schemas/skf-stack-result-envelope.v1.json +176 -0
  58. package/src/shared/scripts/schemas/skf-test-result-envelope.v1.json +173 -0
  59. package/src/shared/scripts/schemas/skf-update-result-envelope.v1.json +19 -5
  60. package/src/shared/scripts/schemas/skf-verify-stack-result-envelope.v1.json +180 -0
  61. package/src/shared/scripts/schemas/skill-brief.v1.json +34 -0
  62. package/src/shared/scripts/schemas/workspace-detection.v1.json +1 -1
  63. package/src/shared/scripts/skf-atomic-write.py +30 -14
  64. package/src/shared/scripts/skf-build-change-manifest.py +2203 -24
  65. package/src/shared/scripts/skf-ccc-git-hygiene.py +532 -0
  66. package/src/shared/scripts/skf-check-unit-records.py +184 -0
  67. package/src/shared/scripts/skf-check-workspace-drift.py +538 -9
  68. package/src/shared/scripts/skf-classify-changed-files.py +694 -0
  69. package/src/shared/scripts/skf-comention-pairs.py +1333 -123
  70. package/src/shared/scripts/skf-compare-file-hashes.py +1 -1
  71. package/src/shared/scripts/skf-count-imports.py +1867 -0
  72. package/src/shared/scripts/skf-count-tokens.py +1 -1
  73. package/src/shared/scripts/skf-derive-assembly-shape.py +3 -2
  74. package/src/shared/scripts/skf-description-guard.py +117 -9
  75. package/src/shared/scripts/skf-detect-docs.py +892 -4
  76. package/src/shared/scripts/skf-detect-language.py +486 -107
  77. package/src/shared/scripts/skf-detect-registry.py +887 -0
  78. package/src/shared/scripts/skf-detect-scripts-assets.py +1 -1
  79. package/src/shared/scripts/skf-detect-tools.py +215 -27
  80. package/src/shared/scripts/skf-detect-workspaces.py +506 -30
  81. package/src/shared/scripts/skf-disqualify-candidates.py +821 -182
  82. package/src/shared/scripts/skf-emit-brief-result-envelope.py +69 -191
  83. package/src/shared/scripts/skf-emit-result-envelope.py +1604 -106
  84. package/src/shared/scripts/skf-enumerate-stack-skills.py +986 -117
  85. package/src/shared/scripts/skf-extract-public-api.py +4084 -85
  86. package/src/shared/scripts/skf-extraction-inventory.py +746 -0
  87. package/src/shared/scripts/skf-extraction-snapshot.py +539 -0
  88. package/src/shared/scripts/skf-fetch-temporal.py +674 -0
  89. package/src/shared/scripts/skf-find-cycles.py +97 -29
  90. package/src/shared/scripts/skf-find-test-report.py +476 -0
  91. package/src/shared/scripts/skf-forge-tier-rw.py +444 -203
  92. package/src/shared/scripts/skf-github-fetch.py +365 -0
  93. package/src/shared/scripts/skf-github-probe.py +661 -0
  94. package/src/shared/scripts/skf-hash-content.py +166 -12
  95. package/src/shared/scripts/skf-language-corpora.py +1 -1
  96. package/src/shared/scripts/skf-load-provenance.py +159 -27
  97. package/src/shared/scripts/skf-manifest-ops.py +1 -1
  98. package/src/shared/scripts/skf-merge-ccc-exclusions.py +2307 -223
  99. package/src/shared/scripts/skf-merge-doc-urls.py +1 -1
  100. package/src/shared/scripts/skf-names-present.py +221 -0
  101. package/src/shared/scripts/skf-pair-intersect.py +119 -28
  102. package/src/shared/scripts/skf-parse-gaps.py +1384 -0
  103. package/src/shared/scripts/skf-preapply.py +1 -1
  104. package/src/shared/scripts/skf-preflight.py +161 -27
  105. package/src/shared/scripts/skf-promote-staged.py +430 -0
  106. package/src/shared/scripts/skf-provenance-gap-dispatch.py +39 -7
  107. package/src/shared/scripts/skf-qmd-classify-collections.py +229 -45
  108. package/src/shared/scripts/skf-quick-batch.py +774 -0
  109. package/src/shared/scripts/skf-rebuild-managed-sections.py +972 -88
  110. package/src/shared/scripts/skf-recommend-scope-type.py +323 -156
  111. package/src/shared/scripts/skf-render-metadata-stats.py +156 -12
  112. package/src/shared/scripts/skf-render-quick-metadata.py +132 -28
  113. package/src/shared/scripts/skf-render-stack-metadata.py +976 -0
  114. package/src/shared/scripts/skf-resolve-authoritative-files.py +128 -13
  115. package/src/shared/scripts/skf-resolve-package.py +523 -106
  116. package/src/shared/scripts/skf-rewrite-skill-name.py +433 -47
  117. package/src/shared/scripts/skf-run-lock.py +577 -0
  118. package/src/shared/scripts/skf-scan-manifests.py +998 -57
  119. package/src/shared/scripts/skf-scan-skill-md-structure.py +1341 -37
  120. package/src/shared/scripts/skf-severity-classify.py +712 -108
  121. package/src/shared/scripts/skf-shape-detect.py +298 -204
  122. package/src/shared/scripts/skf-shard-body.py +9 -8
  123. package/src/shared/scripts/skf-skill-inventory.py +2412 -89
  124. package/src/shared/scripts/skf-skills-module.py +472 -0
  125. package/src/shared/scripts/skf-source-tree.py +1796 -0
  126. package/src/shared/scripts/skf-structural-diff.py +670 -119
  127. package/src/shared/scripts/skf-tessl-review.py +706 -0
  128. package/src/shared/scripts/skf-update-active-symlink.py +5 -5
  129. package/src/shared/scripts/skf-update-run-state.py +624 -0
  130. package/src/shared/scripts/skf-validate-brief-inputs.py +92 -29
  131. package/src/shared/scripts/skf-validate-brief-schema.py +4 -1
  132. package/src/shared/scripts/skf-validate-feasibility-report.py +577 -66
  133. package/src/shared/scripts/skf-validate-frontmatter.py +103 -26
  134. package/src/shared/scripts/skf-validate-output.py +712 -64
  135. package/src/shared/scripts/skf-validate-pins.py +1 -1
  136. package/src/shared/scripts/skf-verify-no-trace.py +116 -10
  137. package/src/shared/scripts/skf-verify-provenance-completeness.py +2919 -54
  138. package/src/shared/scripts/skf-write-skill-brief.py +367 -19
  139. package/src/shared/tool-requirements.yaml +201 -0
  140. package/src/skf-analyze-source/SKILL.md +41 -36
  141. package/src/skf-analyze-source/assets/skill-brief-schema.md +7 -8
  142. package/src/skf-analyze-source/customize.toml +36 -24
  143. package/src/skf-analyze-source/references/auto-docs-only.md +58 -20
  144. package/src/skf-analyze-source/references/continue.md +2 -13
  145. package/src/skf-analyze-source/references/discover-additional-source.md +147 -0
  146. package/src/skf-analyze-source/references/generate-briefs.md +121 -55
  147. package/src/skf-analyze-source/references/headless-contract.md +42 -15
  148. package/src/skf-analyze-source/references/identify-units.md +96 -110
  149. package/src/skf-analyze-source/references/init.md +73 -71
  150. package/src/skf-analyze-source/references/map-and-detect.md +123 -105
  151. package/src/skf-analyze-source/references/map-unit-exports.md +68 -0
  152. package/src/skf-analyze-source/references/recommend.md +51 -70
  153. package/src/skf-analyze-source/references/scan-project.md +60 -84
  154. package/src/skf-analyze-source/references/scan-root.md +39 -0
  155. package/src/skf-analyze-source/references/step-auto-scope-coexistence.md +47 -0
  156. package/src/skf-analyze-source/references/step-auto-scope-corpora.md +53 -0
  157. package/src/skf-analyze-source/references/step-auto-scope-split.md +91 -0
  158. package/src/skf-analyze-source/references/step-auto-scope.md +208 -293
  159. package/src/skf-analyze-source/references/step-shape-detect.md +14 -12
  160. package/src/skf-analyze-source/references/unit-detection-heuristics.md +37 -42
  161. package/src/skf-audit-skill/SKILL.md +43 -51
  162. package/src/skf-audit-skill/assets/drift-report-template.md +27 -3
  163. package/src/skf-audit-skill/customize.toml +41 -20
  164. package/src/skf-audit-skill/references/constituent-freshness.md +91 -0
  165. package/src/skf-audit-skill/references/doc-drift.md +141 -0
  166. package/src/skf-audit-skill/references/headless-contract.md +29 -0
  167. package/src/skf-audit-skill/references/init.md +148 -210
  168. package/src/skf-audit-skill/references/re-index.md +96 -108
  169. package/src/skf-audit-skill/references/report.md +96 -33
  170. package/src/skf-audit-skill/references/semantic-diff.md +27 -18
  171. package/src/skf-audit-skill/references/severity-classify.md +79 -65
  172. package/src/skf-audit-skill/references/severity-rules.md +15 -6
  173. package/src/skf-audit-skill/references/structural-diff.md +75 -90
  174. package/src/skf-audit-skill/references/upstream-checkout.md +77 -0
  175. package/src/skf-audit-skill/scripts/render-drift-tables.py +685 -0
  176. package/src/skf-brief-skill/SKILL.md +36 -25
  177. package/src/skf-brief-skill/assets/description-voice-examples.md +1 -1
  178. package/src/skf-brief-skill/assets/scope-templates.md +17 -24
  179. package/src/skf-brief-skill/assets/skill-brief-schema.md +29 -15
  180. package/src/skf-brief-skill/customize.toml +48 -20
  181. package/src/skf-brief-skill/references/analyze-target.md +142 -125
  182. package/src/skf-brief-skill/references/confirm-brief.md +10 -8
  183. package/src/skf-brief-skill/references/draft-checkpoint.md +36 -17
  184. package/src/skf-brief-skill/references/gather-intent-ratify.md +68 -0
  185. package/src/skf-brief-skill/references/gather-intent.md +87 -182
  186. package/src/skf-brief-skill/references/headless-args.md +84 -16
  187. package/src/skf-brief-skill/references/health-check.md +1 -1
  188. package/src/skf-brief-skill/references/invocation-contract.md +18 -13
  189. package/src/skf-brief-skill/references/portfolio-similarity-check.md +1 -1
  190. package/src/skf-brief-skill/references/qmd-collection-registration.md +7 -10
  191. package/src/skf-brief-skill/references/scope-definition.md +123 -47
  192. package/src/skf-brief-skill/references/step-auto-brief.md +24 -80
  193. package/src/skf-brief-skill/references/step-auto-validate.md +20 -121
  194. package/src/skf-brief-skill/references/version-resolution.md +3 -2
  195. package/src/skf-brief-skill/references/write-brief.md +66 -57
  196. package/src/skf-campaign/SKILL.md +31 -34
  197. package/src/skf-campaign/assets/campaign-state-schema.json +25 -4
  198. package/src/skf-campaign/customize.toml +47 -16
  199. package/src/skf-campaign/references/campaign-contracts.md +39 -29
  200. package/src/skf-campaign/references/campaign-directive-spec.md +4 -2
  201. package/src/skf-campaign/references/health-check.md +7 -16
  202. package/src/skf-campaign/references/step-01-setup.md +46 -84
  203. package/src/skf-campaign/references/step-02-strategy.md +31 -30
  204. package/src/skf-campaign/references/step-03-pins.md +26 -18
  205. package/src/skf-campaign/references/step-04-provenance.md +24 -23
  206. package/src/skf-campaign/references/step-05-skill-loop.md +67 -48
  207. package/src/skf-campaign/references/step-06-batch.md +41 -34
  208. package/src/skf-campaign/references/step-07-capstone.md +40 -25
  209. package/src/skf-campaign/references/step-08-verify.md +28 -29
  210. package/src/skf-campaign/references/step-09-refine.md +29 -30
  211. package/src/skf-campaign/references/step-10-export.md +48 -36
  212. package/src/skf-campaign/references/step-11-maintenance.md +31 -34
  213. package/src/skf-campaign/references/step-resume.md +37 -68
  214. package/src/skf-campaign/scripts/campaign-deps.py +57 -18
  215. package/src/skf-campaign/scripts/campaign-parse-manifest.py +361 -54
  216. package/src/skf-campaign/scripts/campaign-provenance.py +96 -53
  217. package/src/skf-campaign/scripts/campaign-quality-gate.py +592 -0
  218. package/src/skf-campaign/scripts/campaign-render-batch.py +257 -49
  219. package/src/skf-campaign/scripts/campaign-render-kickoff.py +343 -50
  220. package/src/skf-campaign/scripts/campaign-report.py +204 -37
  221. package/src/skf-campaign/scripts/campaign-state.py +1128 -0
  222. package/src/skf-campaign/scripts/campaign-status.py +10 -74
  223. package/src/skf-campaign/scripts/campaign-validate-pins.py +30 -3
  224. package/src/skf-campaign/scripts/campaign-validate-state.py +34 -4
  225. package/src/skf-campaign/templates/campaign-brief-template.yaml +4 -5
  226. package/src/skf-campaign/templates/campaign-report-template.md +5 -1
  227. package/src/skf-campaign/templates/kickoff-template.md +0 -14
  228. package/src/skf-create-skill/SKILL.md +27 -20
  229. package/src/skf-create-skill/assets/compile-assembly-rules.md +6 -5
  230. package/src/skf-create-skill/assets/skill-sections.md +17 -6
  231. package/src/skf-create-skill/customize.toml +20 -8
  232. package/src/skf-create-skill/references/authoritative-files-protocol.md +41 -42
  233. package/src/skf-create-skill/references/batch-mode.md +81 -0
  234. package/src/skf-create-skill/references/ccc-index-check.md +27 -0
  235. package/src/skf-create-skill/references/compile.md +107 -29
  236. package/src/skf-create-skill/references/component-extraction.md +113 -91
  237. package/src/skf-create-skill/references/enrich.md +41 -23
  238. package/src/skf-create-skill/references/entry-points-by-hand.md +20 -0
  239. package/src/skf-create-skill/references/extract.md +200 -161
  240. package/src/skf-create-skill/references/extraction-patterns-by-hand.md +141 -0
  241. package/src/skf-create-skill/references/extraction-patterns-tracing.md +2 -2
  242. package/src/skf-create-skill/references/extraction-patterns.md +584 -196
  243. package/src/skf-create-skill/references/generate-artifacts.md +145 -93
  244. package/src/skf-create-skill/references/health-check.md +1 -1
  245. package/src/skf-create-skill/references/load-brief.md +53 -36
  246. package/src/skf-create-skill/references/relabel-rule.md +12 -0
  247. package/src/skf-create-skill/references/report.md +28 -59
  248. package/src/skf-create-skill/references/source-resolution-protocols.md +49 -155
  249. package/src/skf-create-skill/references/step-auto-shard.md +20 -93
  250. package/src/skf-create-skill/references/step-doc-rot.md +44 -60
  251. package/src/skf-create-skill/references/step-doc-sources.md +55 -18
  252. package/src/skf-create-skill/references/sub/ccc-discover.md +18 -7
  253. package/src/skf-create-skill/references/sub/fetch-docs.md +106 -57
  254. package/src/skf-create-skill/references/sub/fetch-temporal.md +53 -166
  255. package/src/skf-create-skill/references/tier-degradation-rules.md +18 -9
  256. package/src/skf-create-skill/references/validate.md +173 -99
  257. package/src/skf-create-skill/scripts/scan-doc-rot.py +232 -99
  258. package/src/skf-create-stack-skill/SKILL.md +29 -56
  259. package/src/skf-create-stack-skill/assets/metadata-contract.md +51 -0
  260. package/src/skf-create-stack-skill/assets/provenance-map-schema.md +15 -15
  261. package/src/skf-create-stack-skill/assets/stack-skill-template.md +23 -57
  262. package/src/skf-create-stack-skill/customize.toml +23 -12
  263. package/src/skf-create-stack-skill/references/compile-stack.md +57 -66
  264. package/src/skf-create-stack-skill/references/compose-mode-rules.md +24 -44
  265. package/src/skf-create-stack-skill/references/detect-integrations.md +92 -95
  266. package/src/skf-create-stack-skill/references/detect-manifests.md +46 -71
  267. package/src/skf-create-stack-skill/references/generate-output.md +138 -128
  268. package/src/skf-create-stack-skill/references/init.md +90 -32
  269. package/src/skf-create-stack-skill/references/integration-patterns.md +1 -17
  270. package/src/skf-create-stack-skill/references/invocation-contract.md +34 -0
  271. package/src/skf-create-stack-skill/references/manifest-patterns.md +32 -20
  272. package/src/skf-create-stack-skill/references/parallel-extract.md +112 -38
  273. package/src/skf-create-stack-skill/references/rank-and-confirm.md +57 -75
  274. package/src/skf-create-stack-skill/references/report.md +39 -33
  275. package/src/skf-create-stack-skill/references/validate.md +20 -39
  276. package/src/skf-drop-skill/SKILL.md +28 -51
  277. package/src/skf-drop-skill/customize.toml +44 -30
  278. package/src/skf-drop-skill/references/execute.md +79 -146
  279. package/src/skf-drop-skill/references/invocation-contract.md +64 -0
  280. package/src/skf-drop-skill/references/report.md +46 -30
  281. package/src/skf-drop-skill/references/select.md +118 -124
  282. package/src/skf-drop-skill/scripts/dir-sizes.py +54 -26
  283. package/src/skf-drop-skill/scripts/drop-roster.py +322 -0
  284. package/src/skf-export-skill/SKILL.md +40 -62
  285. package/src/skf-export-skill/assets/managed-section-format.md +14 -50
  286. package/src/skf-export-skill/assets/snippet-format.md +3 -1
  287. package/src/skf-export-skill/customize.toml +42 -13
  288. package/src/skf-export-skill/references/generate-snippet.md +54 -46
  289. package/src/skf-export-skill/references/health-check.md +2 -0
  290. package/src/skf-export-skill/references/invocation-contract.md +15 -0
  291. package/src/skf-export-skill/references/load-skill.md +88 -62
  292. package/src/skf-export-skill/references/manifest-rebuild.md +9 -10
  293. package/src/skf-export-skill/references/multi-skill-mode.md +4 -4
  294. package/src/skf-export-skill/references/orphan-context-detection.md +13 -5
  295. package/src/skf-export-skill/references/orphan-row-detection.md +31 -22
  296. package/src/skf-export-skill/references/package.md +15 -73
  297. package/src/skf-export-skill/references/preflight-snippet-root-probe.md +51 -70
  298. package/src/skf-export-skill/references/result-envelope.md +31 -16
  299. package/src/skf-export-skill/references/summary.md +41 -17
  300. package/src/skf-export-skill/references/token-report.md +4 -12
  301. package/src/skf-export-skill/references/update-context.md +118 -237
  302. package/src/skf-forger/SKILL.md +61 -37
  303. package/src/skf-forger/bmad-skill-manifest.yaml +4 -1
  304. package/src/skf-forger/customize.toml +43 -0
  305. package/src/skf-forger/references/pipeline-mode.md +73 -18
  306. package/src/skf-forger/scripts/forge-status.py +299 -0
  307. package/src/skf-forger/scripts/parse-pipeline.py +322 -54
  308. package/src/skf-forger/scripts/pipeline-gate.py +428 -0
  309. package/src/skf-forger/scripts/pipeline-journal.py +1052 -0
  310. package/src/skf-quick-skill/SKILL.md +54 -53
  311. package/src/skf-quick-skill/assets/skill-template.md +4 -2
  312. package/src/skf-quick-skill/customize.toml +51 -20
  313. package/src/skf-quick-skill/references/batch-mode.md +74 -21
  314. package/src/skf-quick-skill/references/compile.md +30 -31
  315. package/src/skf-quick-skill/references/ecosystem-check.md +7 -57
  316. package/src/skf-quick-skill/references/finalize.md +69 -18
  317. package/src/skf-quick-skill/references/halt-contract.md +41 -29
  318. package/src/skf-quick-skill/references/health-check.md +5 -3
  319. package/src/skf-quick-skill/references/quick-extract.md +114 -45
  320. package/src/skf-quick-skill/references/registry-resolution.md +9 -64
  321. package/src/skf-quick-skill/references/resolve-target.md +116 -66
  322. package/src/skf-quick-skill/references/write-and-validate.md +79 -40
  323. package/src/skf-refine-architecture/SKILL.md +43 -53
  324. package/src/skf-refine-architecture/customize.toml +49 -20
  325. package/src/skf-refine-architecture/references/compile.md +97 -54
  326. package/src/skf-refine-architecture/references/exit-codes.md +30 -0
  327. package/src/skf-refine-architecture/references/finding-storage.md +21 -0
  328. package/src/skf-refine-architecture/references/gap-analysis.md +101 -38
  329. package/src/skf-refine-architecture/references/improvements.md +14 -20
  330. package/src/skf-refine-architecture/references/init.md +98 -57
  331. package/src/skf-refine-architecture/references/issue-detection.md +32 -39
  332. package/src/skf-refine-architecture/references/refinement-rules.md +37 -48
  333. package/src/skf-refine-architecture/references/report.md +65 -54
  334. package/src/skf-refine-architecture/scripts/skf-check-preservation.py +1619 -0
  335. package/src/skf-rename-skill/SKILL.md +19 -54
  336. package/src/skf-rename-skill/customize.toml +32 -26
  337. package/src/skf-rename-skill/references/execute.md +230 -184
  338. package/src/skf-rename-skill/references/exit-codes.md +7 -7
  339. package/src/skf-rename-skill/references/health-check.md +1 -7
  340. package/src/skf-rename-skill/references/invocation-contract.md +25 -0
  341. package/src/skf-rename-skill/references/report.md +63 -52
  342. package/src/skf-rename-skill/references/select.md +197 -115
  343. package/src/skf-rename-skill/scripts/skf-validate-rename-name.py +161 -21
  344. package/src/skf-setup/SKILL.md +26 -26
  345. package/src/skf-setup/customize.toml +14 -10
  346. package/src/skf-setup/references/auto-index.md +50 -63
  347. package/src/skf-setup/references/ccc-index.md +29 -89
  348. package/src/skf-setup/references/detect-and-tier.md +58 -66
  349. package/src/skf-setup/references/health-check.md +2 -0
  350. package/src/skf-setup/references/invocation-contract.md +14 -0
  351. package/src/skf-setup/references/report.md +43 -166
  352. package/src/skf-setup/references/tier-rules.md +5 -5
  353. package/src/skf-setup/references/write-config.md +34 -57
  354. package/src/skf-test-skill/SKILL.md +17 -57
  355. package/src/skf-test-skill/assets/output-section-formats.md +33 -34
  356. package/src/skf-test-skill/customize.toml +27 -13
  357. package/src/skf-test-skill/references/coherence-check.md +134 -62
  358. package/src/skf-test-skill/references/coverage-check-tiers.md +35 -0
  359. package/src/skf-test-skill/references/coverage-check.md +217 -254
  360. package/src/skf-test-skill/references/detect-mode.md +5 -5
  361. package/src/skf-test-skill/references/external-validators.md +94 -82
  362. package/src/skf-test-skill/references/health-check.md +6 -7
  363. package/src/skf-test-skill/references/init.md +163 -88
  364. package/src/skf-test-skill/references/invocation-contract.md +66 -0
  365. package/src/skf-test-skill/references/migration-section-rules.md +5 -2
  366. package/src/skf-test-skill/references/report.md +162 -142
  367. package/src/skf-test-skill/references/score.md +80 -107
  368. package/src/skf-test-skill/references/scoring-rules.md +41 -155
  369. package/src/skf-test-skill/references/source-access-protocol.md +19 -92
  370. package/src/skf-test-skill/references/step-hard-gate.md +51 -33
  371. package/src/skf-test-skill/scripts/aggregate-coherence.py +218 -30
  372. package/src/skf-test-skill/scripts/build-result-context.py +287 -0
  373. package/src/skf-test-skill/scripts/check-metadata-coherence.py +37 -4
  374. package/src/skf-test-skill/scripts/combine-external-scores.py +23 -6
  375. package/src/skf-test-skill/scripts/compute-score.py +223 -45
  376. package/src/skf-test-skill/scripts/gap-ledger.py +1381 -0
  377. package/src/skf-test-skill/scripts/hard-gate.py +203 -0
  378. package/src/skf-test-skill/scripts/load-coverage-inputs.py +760 -0
  379. package/src/skf-test-skill/scripts/locate-export-segments.py +835 -0
  380. package/src/skf-test-skill/scripts/reconcile-coverage.py +273 -79
  381. package/src/skf-test-skill/scripts/score-signatures.py +459 -0
  382. package/src/skf-test-skill/scripts/stage-helper-payload.py +148 -0
  383. package/src/skf-test-skill/scripts/validate-inventory.py +311 -16
  384. package/src/skf-test-skill/scripts/verify-declared-numerator.py +127 -52
  385. package/src/skf-test-skill/templates/test-report-template.md +21 -15
  386. package/src/skf-update-skill/SKILL.md +38 -25
  387. package/src/skf-update-skill/customize.toml +27 -12
  388. package/src/skf-update-skill/references/detect-changes.md +233 -222
  389. package/src/skf-update-skill/references/gap-driven.md +336 -0
  390. package/src/skf-update-skill/references/health-check.md +31 -5
  391. package/src/skf-update-skill/references/init.md +250 -84
  392. package/src/skf-update-skill/references/invocation-contract.md +12 -0
  393. package/src/skf-update-skill/references/manual-section-rules.md +6 -23
  394. package/src/skf-update-skill/references/merge.md +180 -47
  395. package/src/skf-update-skill/references/re-extract.md +53 -262
  396. package/src/skf-update-skill/references/report.md +100 -35
  397. package/src/skf-update-skill/references/write.md +331 -149
  398. package/src/skf-update-skill/scripts/skf-new-file-diff.py +29 -7
  399. package/src/skf-verify-stack/SKILL.md +23 -42
  400. package/src/skf-verify-stack/assets/feasibility-report-template.md +11 -5
  401. package/src/skf-verify-stack/customize.toml +55 -22
  402. package/src/skf-verify-stack/references/coverage-patterns.md +17 -8
  403. package/src/skf-verify-stack/references/coverage.md +67 -64
  404. package/src/skf-verify-stack/references/exit-codes.md +21 -8
  405. package/src/skf-verify-stack/references/init.md +107 -62
  406. package/src/skf-verify-stack/references/integration-verification-rules.md +12 -13
  407. package/src/skf-verify-stack/references/integrations.md +106 -65
  408. package/src/skf-verify-stack/references/report.md +59 -42
  409. package/src/skf-verify-stack/references/requirements.md +32 -9
  410. package/src/skf-verify-stack/references/synthesize.md +53 -39
  411. package/src/skf-verify-stack/scripts/skf-coverage-tally.py +398 -52
  412. package/src/skf-verify-stack/scripts/skf-previous-report.py +330 -0
  413. package/src/skf-verify-stack/scripts/skf-report-delta.py +453 -49
  414. package/src/skf-verify-stack/scripts/skf-verdict-rollup.py +240 -27
  415. package/tools/cli/commands/install.js +11 -4
  416. package/tools/cli/commands/status.js +15 -3
  417. package/tools/cli/commands/update.js +11 -4
  418. package/tools/cli/lib/tool-check.js +320 -0
  419. package/tools/cli/lib/version-check.js +22 -9
  420. package/tools/cli/skf-cli.js +4 -1
  421. package/.gitattributes +0 -16
  422. package/.nvmrc +0 -1
  423. package/docs/_internal/RELEASING.md +0 -645
  424. package/release-audits/v1.0.0-launch-audit.md +0 -728
  425. package/src/skf-audit-skill/references/step-doc-drift.md +0 -177
  426. package/src/skf-brief-skill/references/headless-source-authority-detection.md +0 -26
  427. package/src/skf-campaign/manifest.yaml +0 -15
  428. package/src/skf-create-skill/assets/tessl-dismissal-rules.md +0 -106
  429. package/src/skf-create-skill/references/ecosystem-check.md +0 -74
  430. package/src/skf-drop-skill/references/headless-contract.md +0 -18
  431. package/src/skf-update-skill/references/merge-conflict-rules.md +0 -15
  432. package/src/skf-update-skill/references/remote-source-resolution.md +0 -98
  433. package/src/skf-update-skill/references/validate.md +0 -124
  434. package/tools/validate-docs-drift.js +0 -233
  435. package/tools/validate-docs-links.js +0 -665
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-module-skill-forge",
4
- "version": "2.1.0",
4
+ "version": "3.0.0",
5
5
  "description": "BMAD module — Turn code and docs into instructions AI agents can actually follow. Progressive capability tiers (Quick/Forge/Forge+/Deep).",
6
6
  "keywords": [
7
7
  "bmad",
@@ -27,11 +27,12 @@
27
27
  },
28
28
  "license": "MIT",
29
29
  "author": "armelhbobdad",
30
- "main": "tools/cli/skf-cli.js",
31
30
  "bin": {
32
31
  "bmad-module-skill-forge": "tools/skf-npx-wrapper.js"
33
32
  },
34
33
  "scripts": {
34
+ "changes:pr": "node tools/changes.js pr",
35
+ "changes:preview": "node tools/changes.js preview",
35
36
  "docs:build": "node tools/build-docs.js",
36
37
  "docs:dev": "npm run --prefix website docs:dev",
37
38
  "docs:fix-links": "node tools/fix-doc-links.js --write",
@@ -42,26 +43,34 @@
42
43
  "format:fix": "prettier --write \"**/*.{js,cjs,mjs,json,yaml}\"",
43
44
  "lint": "eslint . --ext .js,.cjs,.mjs,.yaml --max-warnings=0",
44
45
  "lint:fix": "eslint . --ext .js,.cjs,.mjs,.yaml --fix",
45
- "lint:md": "markdownlint-cli2 \"**/*.md\"",
46
+ "lint:instructions": "uvx lintlang@0.8.2 scan src --fail-on fail",
47
+ "lint:md": "markdownlint-cli2 \"**/*.md\" && node tools/changes.js lint",
46
48
  "prepare": "husky || exit 0",
47
- "quality": "npm run format:check && npm run lint && npm run lint:md && npm run test:schemas && npm run test:install && npm run test:cli && npm run test:workflow && npm run test:python && npm run test:rehype && npm run test:docs-links-tool && npm run test:knowledge && npm run validate:schemas && npm run validate:skills && npm run validate:refs && npm run validate:docs-links && npm run docs:validate-drift",
49
+ "quality": "npm run format:check && npm run lint && npm run lint:md && npm run lint:instructions && npm run test:schemas && npm run test:install && npm run test:cli && npm run test:workflow && npm run test:python && npm run test:rehype && npm run test:docs-links-tool && npm run test:em-dash-tool && npm run test:file-refs-tool && npm run test:changes-tool && npm run test:tool-requirements-tool && npm run test:knowledge && npm run validate:schemas && npm run validate:skills && npm run validate:refs && npm run validate:docs-links && npm run validate:em-dash && npm run validate:changes && npm run validate:tool-requirements && npm run docs:validate-drift",
48
50
  "skf:install": "node tools/cli/skf-cli.js install",
49
51
  "skf:status": "node tools/cli/skf-cli.js status",
50
52
  "skf:uninstall": "node tools/cli/skf-cli.js uninstall",
51
53
  "skf:update": "node tools/cli/skf-cli.js update",
52
- "test": "npm run test:schemas && npm run test:install && npm run test:cli && npm run test:workflow && npm run test:python && npm run test:rehype && npm run test:docs-links-tool && npm run test:knowledge && npm run validate:schemas && npm run validate:skills && npm run validate:refs && npm run validate:docs-links && npm run lint && npm run lint:md && npm run format:check",
54
+ "test": "npm run test:schemas && npm run test:install && npm run test:cli && npm run test:workflow && npm run test:python && npm run test:rehype && npm run test:docs-links-tool && npm run test:em-dash-tool && npm run test:file-refs-tool && npm run test:changes-tool && npm run test:tool-requirements-tool && npm run test:knowledge && npm run validate:schemas && npm run validate:skills && npm run validate:refs && npm run validate:docs-links && npm run validate:em-dash && npm run validate:changes && npm run validate:tool-requirements && npm run lint && npm run lint:md && npm run lint:instructions && npm run format:check",
55
+ "test:changes-tool": "node test/test-changes.js && node test/test-release-state.js",
53
56
  "test:cli": "node test/test-cli-integration.js",
54
- "test:docs-links-tool": "node test/test-validate-docs-links.js",
55
- "test:install": "node test/test-installation-components.js",
57
+ "test:docs-links-tool": "node test/test-validate-docs-links.js && node test/test-check-required-checks.js && node tools/check-required-checks.js --releasing",
58
+ "test:em-dash-tool": "node test/test-validate-no-em-dash.js",
59
+ "test:file-refs-tool": "node test/test-validate-file-refs.js",
60
+ "test:install": "node test/test-installation-components.js && node test/test-pack-contents.js && node test/test-validate-skills.js",
56
61
  "test:knowledge": "node test/test-knowledge-base.js",
57
- "test:python": "uv run --with pytest --with pyyaml --with jsonschema pytest test/test-compute-score-contract.py test/test-skf-preflight.py test/test-skf-skill-inventory.py test/test-skf-validate-output.py test/test-skf-validate-frontmatter.py test/test-skf-manifest-ops.py test/test-skf-rebuild-managed-sections.py test/test-skf-atomic-write.py test/test-skf-severity-classify.py test/test-skf-structural-diff.py test/test-skf-detect-tools.py test/test-skf-forge-tier-rw.py test/test-skf-emit-result-envelope.py test/test-skf-qmd-classify-collections.py test/test-skf-merge-ccc-exclusions.py test/test-skf-resolve-package.py test/test-skf-extract-public-api.py test/test-skf-render-quick-metadata.py test/test-skf-validate-brief-inputs.py test/test-skf-emit-brief-result-envelope.py test/test-skf-write-skill-brief.py test/test-skf-detect-workspaces.py test/test-skf-recommend-scope-type.py test/test-skf-detect-language.py test/test-skf-language-corpora.py test/test-skf-merge-doc-urls.py test/test-skf-derive-assembly-shape.py test/test-skf-description-guard.py test/test-skf-detect-scripts-assets.py test/test-skf-hash-content.py test/test-skf-validate-brief-schema.py test/test-skf-check-workspace-drift.py test/test-skf-update-active-symlink.py test/test-skf-build-change-manifest.py test/test-skf-provenance-gap-dispatch.py test/test-skf-resolve-authoritative-files.py test/test-skf-scan-manifests.py test/test-skf-pair-intersect.py test/test-skf-enumerate-stack-skills.py test/test-skf-compare-file-hashes.py test/test-skf-load-provenance.py test/test-skf-scan-skill-md-structure.py test/test-skf-disqualify-candidates.py test/test-skf-chain-reachability.py test/test-skf-shape-detect.py test/test-skf-detect-docs.py test/test-skf-step-doc-sources.py test/test-skf-step-doc-drift.py test/test-skf-step-hard-gate.py test/test-skf-per-pipeline-thresholds.py test/test-skf-evidence-report-fallback.py test/test-skf-validate-pins.py test/test-skf-auto-shard.py test/test-skf-preapply.py test/test-skf-step-doc-rot.py test/test-skf-campaign-state.py test/test-skf-campaign-pins.py test/test-skf-campaign-deps.py test/test-skf-campaign-report.py test/test-skf-campaign-stepfiles.py test/test-skf-campaign-validate-state.py test/test-skf-campaign-provenance.py test/test-skf-campaign-parse-manifest.py test/test-skf-campaign-render-kickoff.py test/test-skf-campaign-render-batch.py test/test-skf-shard-body.py test/test-skf-render-metadata-stats.py test/test-skf-comention-pairs.py test/test-skf-count-tokens.py test/test-skf-reconcile-coverage.py test/test-skf-verify-provenance-completeness.py test/test-skf-find-cycles.py test/test-skf-validate-feasibility-report.py test/test-skf-rewrite-skill-name.py test/test-skf-verify-no-trace.py test/test-skf-validate-inventory.py test/test-skf-check-metadata-coherence.py test/test-skf-scan-doc-rot.py test/test-skf-aggregate-coherence.py test/test-skf-dir-sizes.py test/test-skf-parse-pipeline.py test/test-skf-validate-rename-name.py test/test-skf-verify-declared-numerator.py test/test-skf-combine-external-scores.py test/test-skf-new-file-diff.py test/test-skf-coverage-tally.py test/test-skf-report-delta.py test/test-skf-verdict-rollup.py -v",
62
+ "test:python": "uv run --with pytest --with pyyaml --with jsonschema --with ast-grep-cli==0.45.3 pytest test -o \"python_files=test-*.py test_*.py *_test.py\" -v",
58
63
  "test:rehype": "node test/test-rehype-markdown-links.js",
59
64
  "test:schemas": "node test/test-agent-schema.js",
65
+ "test:tool-requirements-tool": "node test/test-tool-requirements.js",
60
66
  "test:workflow": "node test/test-workflow-state.js",
67
+ "validate:changes": "node tools/changes.js check",
61
68
  "validate:docs-links": "node tools/validate-docs-links.js --strict",
69
+ "validate:em-dash": "node tools/validate-no-em-dash.js --strict",
62
70
  "validate:refs": "node tools/validate-file-refs.js --strict",
63
71
  "validate:schemas": "node test/validate-agent-schema.js",
64
- "validate:skills": "node tools/validate-skills.js --strict"
72
+ "validate:skills": "node tools/validate-skills.js --strict",
73
+ "validate:tool-requirements": "node tools/tool-requirements.js --check"
65
74
  },
66
75
  "lint-staged": {
67
76
  "*.{js,cjs,mjs}": [
@@ -97,7 +106,6 @@
97
106
  "archiver": "^7.0.1",
98
107
  "astro": "^5.16.0",
99
108
  "c8": "^10.1.3",
100
- "conventional-changelog-cli": "^5.0.0",
101
109
  "csv-parse": "^6.1.0",
102
110
  "eslint": "^9.33.0",
103
111
  "eslint-config-prettier": "^10.1.8",
@@ -1,5 +1,5 @@
1
1
  # Ferris Sidecar: User Preferences
2
- # Created by setup workflow on first run
2
+ # Created by the SKF installer (setup reads it, and never writes it)
3
3
  # Edit this file to customize Ferris behavior
4
4
 
5
5
  # Override detected tier (set to Quick, Forge, Forge+, or Deep to force a tier)
@@ -14,6 +14,13 @@ headless_mode: false
14
14
  # Compact greeting (set to true to skip the full capabilities table on session start)
15
15
  compact_greeting: false
16
16
 
17
+ # Tessl Review (off unless set). Set to the name of your Tessl workspace to have
18
+ # create-skill and test-skill send each skill's SKILL.md, references/, scripts/
19
+ # and assets/ to Tessl for an AI-judge review, kept in that workspace's review
20
+ # history. Needs the tessl CLI and `tessl login` (or TESSL_TOKEN); each fresh
21
+ # review spends Tessl credits.
22
+ tessl_review_workspace: ~
23
+
17
24
  # Reserved for future use — these fields are not yet consumed by any workflow step
18
25
  # output_language: ~
19
26
  # skill_format_version: ~
@@ -39,6 +39,7 @@ description: >
39
39
  - **Naming convention:** Prefer gerund form (verb + -ing) for clarity: `processing-pdfs`, `analyzing-spreadsheets`, `managing-databases`. Noun phrases (`pdf-processing`) and action-oriented forms (`process-pdfs`) are acceptable alternatives. Avoid vague names (`helper`, `utils`, `tools`).
40
40
  - `description`: 1-1024 characters, trigger-optimized for agent matching
41
41
  - **MUST use third-person voice.** The description is injected into the system prompt; inconsistent point-of-view causes discovery problems. Write "Processes Excel files and generates reports" — never "I can help you process Excel files" or "You can use this to process Excel files."
42
+ - **No XML tags.** The Claude platform does not accept a description that contains XML tags; write `{name}` or `NAME` instead of `<name>`. Create-skill replaces every `<` and `>` in the description with `{` and `}` and checks the result.
42
43
 
43
44
  **Body:** Free-form markdown — no structural restrictions, but Skill Forge follows a consistent section order (see skill-sections.md in create-skill/assets/).
44
45
 
@@ -141,6 +142,7 @@ the user's configuration against the expected structure.
141
142
  4. SKILL.md body under 500 lines (warning, not failure)
142
143
  5. All relative paths resolve to existing files
143
144
  6. No deeply nested subdirectories (max one level)
145
+ 7. `description` holds no `<` or `>` (the Claude platform does not accept XML tags in a description)
144
146
 
145
147
  **Key Points:**
146
148
  - Compliance is checked during create-skill, not as a post-hoc audit
@@ -23,11 +23,11 @@ ccc is **required** at the Forge+ tier (it defines Forge+) and **optionally avai
23
23
 
24
24
  ## Availability
25
25
 
26
- ccc_bridge operations are available when:
27
- - `tools.ccc: true` in forge-tier.yaml (verified by `ccc --help` + `ccc doctor` in setup)
28
- - `ccc_index.status` is `"fresh"` or `"stale"` in forge-tier.yaml (an index exists for the project)
26
+ ccc_bridge operations are available when `tools.ccc: true` in forge-tier.yaml (verified by `ccc --help` + `ccc doctor` in setup). When it is false, calling steps skip ccc discovery silently and proceed with direct ast-grep or source reading. This is standard Forge tier behavior — not a degradation.
29
27
 
30
- When either condition is false, calling steps skip ccc discovery silently and proceed with direct ast-grep or source reading. This is standard Forge tier behavior — not a degradation.
28
+ With ccc available, `ccc_index.status` decides how a step reaches the project index:
29
+ - `"fresh"`, `"created"`, `"skipped"`, or a status the step does not know (such as a `"stale"` an older SKF recorded): the index is usable, and the discovery steps search it with `ccc search --refresh`. After `"skipped"` there may be no index yet, but setup's `--ccc-skip-index` lane still wrote `settings.yml` with the SKF exclusions, so the first refresh search builds the index safely.
30
+ - `"none"` or `"failed"`: setup built no index. Create-skill discovery indexes lazily with `ensure_index`; a step without a lazy path skips ccc silently.
31
31
 
32
32
  ## Operations
33
33
 
@@ -37,13 +37,15 @@ When either condition is false, calling steps skip ccc discovery silently and pr
37
37
 
38
38
  Returns: list of `{file, score, snippet}` entries ranked by semantic relevance to the query. These are **candidates** for ast-grep extraction — not verified exports.
39
39
 
40
- **Usage context:** Called before ast-grep in Forge+ and Deep tier extraction steps to discover semantically relevant source regions. Results pre-rank the file extraction queue so ast-grep processes the most relevant files first.
40
+ **Usage context:** Called before extraction in Forge+ and Deep tier steps to discover semantically relevant source regions. The ranking orders the files a step reads by hand; the recipe runner reads every file in scope, so its result does not depend on it.
41
41
 
42
42
  ### `ccc_bridge.ensure_index(path)`
43
43
 
44
- **Resolves to:** Check `ccc_index.status` in forge-tier.yaml. If `"none"` or the indexed_path does not match, run `cd {path} && ccc init` then `ccc index` and update forge-tier.yaml. Note: `ccc init` takes no positional arguments — it initializes the index for the current working directory.
44
+ **Resolves to:** Check `ccc_index.status` in forge-tier.yaml. If `"none"` or the indexed_path does not match, run `cd {path} && ccc init` then `ccc index` and update forge-tier.yaml. Note: `ccc init` takes no positional arguments — it initializes the index for the current working directory. Exception: when `{path}` is `{project-root}` and `{project-root}/.cocoindex_code/settings.yml` does not exist, do not run `ccc init` or `ccc index` — setup's `skf-merge-ccc-exclusions.py` owns initializing the project root with the SKF exclusions, and in a project nested inside another git checkout `ccc index` would index the enclosing repository instead. Treat the index as unavailable and suggest re-running `/skf-setup`.
45
45
 
46
- **Usage context:** Called by setup step 1b to ensure the project root is indexed. Called lazily by extraction steps when `ccc_index.status` is `"none"` but ccc is available.
46
+ When `ccc init` exits non-zero with `A parent directory has a project marker`, run `ccc init -f` in `{path}`. Run `ccc index` only once `{path}/.cocoindex_code/settings.yml` exists: without it, `ccc index` initializes the enclosing git checkout with ccc's defaults and none of the SKF exclusions. Afterwards `skf-ccc-git-hygiene.py nested` keeps a project in a subfolder out of git (see Exclusion Patterns).
47
+
48
+ **Usage context:** Called lazily by extraction steps when `ccc_index.status` is `"none"` or `"failed"` but ccc is available. Setup step 1b does not call it: its helper runs `ccc init` and decides whether to index.
47
49
 
48
50
  ### `ccc_bridge.status()`
49
51
 
@@ -68,20 +70,25 @@ The ccc search is invisible in the output artifact. A Forge+ skill's citations a
68
70
  ### When Indexing Happens
69
71
 
70
72
  1. **setup step 1b:** Indexes the project root when setup runs. This is the primary indexing point.
71
- 2. **Workflow discovery steps:** If `ccc_index.status` is `"stale"` or `"none"`, discovery steps trigger a re-index and warn the user. They do not block.
73
+ 2. **Workflow discovery steps:** Create-skill discovery and create-stack-skill integration detection search setup's index with `ccc search --refresh`, which first indexes what changed since (after `--ccc-skip-index`, the whole project). When `ccc_index.status` is `"none"` or `"failed"`, create-skill discovery indexes lazily and integration detection skips ccc. Discovery never blocks.
72
74
  3. **ccc daemon:** Incremental indexing means re-indexing unchanged files is a near-no-op.
75
+ 4. **create-skill step 7:** Indexes the source of the skill and records it in `ccc_index_registry`: SKF's workspace clone of a remote source, which step 3 moved to the commit the skill was extracted from, or a local source folder, which becomes a ccc project of its own (`ccc init -f`) when it sits inside another git checkout or ccc project.
73
76
 
74
77
  ### Freshness
75
78
 
76
- - Staleness threshold: 24 hours (configurable via `ccc_index.staleness_threshold_hours` in forge-tier.yaml)
77
- - A stale index still produces useful results — the workflow proceeds with the stale index and notes the staleness
78
- - setup is the designated refresh authority
79
+ - setup is the designated authority for the `ccc_index` status in forge-tier.yaml. It records `"fresh"` (a re-run kept the index), `"created"`, `"failed"`, `"none"` or `"skipped"` (`--ccc-skip-index`); no status records staleness
80
+ - Staleness threshold: 24 hours (configurable via `ccc_index.staleness_threshold_hours` in forge-tier.yaml). A setup re-run compares `last_indexed` against it to decide whether to keep the index or index again
81
+ - A workflow step never computes staleness. Create-skill discovery and create-stack-skill integration detection search setup's index with `ccc search --refresh`, one incremental pass that indexes what changed since and costs almost nothing when nothing did; the refresh does not change the recorded status. Other steps search the index as it stands
79
82
 
80
83
  ### Exclusion Patterns
81
84
 
82
- CCC stores its configuration at `{project-root}/.cocoindex_code/settings.yml`. This file contains `exclude_patterns` and `include_patterns` arrays in glob format. `ccc init` creates the file with sensible defaults (excludes `node_modules`, `__pycache__`, hidden dirs, etc.).
85
+ CCC stores its configuration at `{project-root}/.cocoindex_code/settings.yml`. `ccc init` creates it with `exclude_patterns` and `include_patterns` holding ccc's defaults (hidden directories, `node_modules`, `__pycache__`, its own `.cocoindex_code`, and more) and, at the top of a git checkout, adds `/.cocoindex_code/` to `.gitignore`. An `exclude_patterns` list in the file replaces ccc's default exclusions, so SKF only ever extends a list that `ccc init` wrote.
86
+
87
+ ccc adds that line only when it creates a project at the top of a git checkout whose `.git` is a folder, and the line matches only that top-level folder; a `ccc index` that finds no `settings.yml` initializes the project the same way. A ccc project in a subfolder of a checkout (the `ccc init -f` case), in a linked worktree or in a submodule, whose `.git` is a file, therefore gets no entry, and git lists its index database as untracked. SKF never edits a project's own `.gitignore`. After create-skill runs ccc in a local source folder other than the project root, `skf-ccc-git-hygiene.py nested` runs `git check-ignore -q --no-index` there, once each for `settings.yml`, `target_sqlite.db` and `cocoindex.db/mdb/data.mdb` under `.cocoindex_code/`, and when any of them is not ignored writes `.cocoindex_code/.gitignore` holding `*` so the folder ignores itself. In an SKF workspace clone, `skf-ccc-git-hygiene.py workspace` instead undoes ccc's `.gitignore` edit and lists `.cocoindex_code/` and `/.skf-workspace.lock` in the clone's `.git/info/exclude` (see Deferred Discovery). ccc reads only `.gitignore` files and excludes `**/.cocoindex_code` by default, so neither changes what it indexes.
88
+
89
+ ccc reads `settings.yml` again on every index run. After an edit to `exclude_patterns` or `include_patterns`, a plain `ccc index` (or `ccc search --refresh`) drops the files a pattern now leaves out and indexes the ones it brings in, with the daemon already running; the index never needs deleting and the daemon never needs restarting. A plain `ccc search` does not re-index a project the daemon already has loaded, so run `ccc index` before a search that must reflect an edit.
83
90
 
84
- **SKF infrastructure exclusions:** setup step 1b appends SKF-specific exclusion patterns after `ccc init` creates the default config. These patterns prevent indexing of framework and output directories that have zero value for source extraction:
91
+ **SKF infrastructure exclusions:** setup step 1b runs `skf-merge-ccc-exclusions.py`, which runs `ccc init` when the file is missing, rebuilds a file that lacks the ccc defaults (keeping user entries), and keeps these patterns in it:
85
92
 
86
93
  | Pattern | Purpose |
87
94
  |---------|---------|
@@ -89,24 +96,32 @@ CCC stores its configuration at `{project-root}/.cocoindex_code/settings.yml`. T
89
96
  | `**/_bmad-output` | Build output artifacts (TODO files, reports) |
90
97
  | `**/.claude` | Claude Code configuration |
91
98
  | `**/_skf-learn` | SKF learning materials |
92
- | `**/{skills_output_folder}` | Generated skill files (from manifest, default: `skills`) |
93
- | `**/{forge_data_folder}` | Compilation workspace (from manifest, default: `forge-data`) |
99
+ | `{skills_output_folder}` | Generated skill files (default `skills`), anchored to the project root — a nested folder with the same name stays indexed. In a folder that also holds content SKF did not generate, one `{skills_output_folder}/<entry>` pattern per SKF entry instead |
100
+ | `{forge_data_folder}` | Compilation workspace (default `forge-data`), anchored to the project root. Per SKF entry in a folder that also holds other content, as above |
101
+
102
+ The folder values come from `_bmad/skf/config.yaml` and are used relative to the project root. Setup lists each folder with git, honouring only `.gitignore` files as ccc does. A skill folder in `{skills_output_folder}` counts as SKF output by the rule the workflows use before they write into, move or delete a skill (see `knowledge/version-paths.md` Ownership): its `metadata.json`, or a version's, carries an SKF marker, or it is `_batch`. The versioned layout, an `active` link, a manifest key or a result file do not count on their own, so a module's skills that an earlier SKF moved into that layout stay indexed. A folder in `{forge_data_folder}` counts as SKF output by the rule drop and rename use for a skill's forge folder: its name contains `.skf-`, it is `_campaign` or `improvement-queue`, or it holds a brief, `.brief-draft.json` or `*-result*.json` file directly, or a provenance map, evidence report, extraction rules or `*-result*.json` file in a folder directly inside it. Both rules read the folder on disk, so a file `.gitignore` hides still counts, and a linked folder never does. Setup handles each folder in one of four ways:
103
+
104
+ - **Only SKF output** (neutral files such as `.gitkeep` or a README do not count, and loose files directly in the folder beside SKF output are excluded with it): the bare folder pattern.
105
+ - **SKF output next to content SKF did not generate**, for example skills installed from elsewhere: one pattern per SKF entry, so the other content stays indexed. The forms are `{folder}/<entry>` for each SKF skill group or file, plus `{folder}/_batch`, `{folder}/.export-manifest.json`, `{folder}/export-skill-result*.json` and `{folder}/drop-skill-result*.json` whether or not they exist yet. The forge folder gets `{folder}/_campaign`, `{folder}/improvement-queue` and one `{folder}/<report prefix>*` per SKF report instead. Glob characters in an entry name are written as character classes, so `[x]` becomes `[[]x[]]`. A skill created there after setup stays indexed, twice through its version folder and its `active` link, until setup runs again. Setup warns and names the other entries.
106
+ - **No SKF output, only other content**, for example a module whose own source lives under `skills/`: setup leaves the folder out and warns, naming the setting to change.
107
+ - **Already in `exclude_patterns`**, added by the user: once a setup run with ccc has saved SKF's record (below), setup leaves it alone and adds no pattern for it. Without that record, setup treats a folder of only SKF output as its own, and keeps a folder that also holds other content with a one-time warning.
94
108
 
95
- The `skills_output_folder` and `forge_data_folder` values are resolved from the workflow activation context (sourced from `_bmad/skf/config.yaml`), falling back to the defaults `skills` and `forge-data`. Patterns are appended only if not already present — user customizations to `settings.yml` are preserved.
109
+ SKF never writes a `!` negation. ccc applies a negation against every exclude pattern, its own defaults included, so it would re-include `node_modules`, hidden folders and the user's own excludes inside the other content. ccc also walks into an excluded folder when a negation matches the folder, matches any name one level inside it (a wildcard such as `*/*` or `**/{folder}/*`; `*/x` is not one), or starts with `{folder}/`, and then indexes everything below it that no other pattern excludes. So a `!{folder}/…` entry, even one that names a single file or a path that does not exist, cancels a bare `{folder}` pattern entirely, for `{skills_output_folder}` and `{forge_data_folder}` alike, and the SKF files there are indexed again (a skill twice, through its version folder and its `active` link) unless another pattern still excludes them, as ccc's `**/.*` does inside a hidden folder. Setup keeps a user's `!` entry but warns on every run while one re-opens a folder pattern it writes (the bare pattern, or the pattern of an SKF entry in a shared folder) and ccc reaches the SKF output below it, including after a shared folder goes back to the bare pattern; the warning reaches the step 4 report and the envelope's `warnings`.
96
110
 
97
- The configured exclusion patterns are stored in `ccc_index.exclude_patterns` in forge-tier.yaml for reference.
111
+ `ccc_index.exclude_patterns` in forge-tier.yaml records the patterns SKF owns, per-entry patterns included. Each setup run removes a recorded pattern the current config no longer produces (for example after `skills_output_folder` changes, after a skill in a shared folder is dropped or renamed, or when a folder starts or stops holding other content), never removes entries it did not add, and keeps the record unchanged on a run without ccc. Ownership goes by the entry's text, so an entry identical to one SKF manages counts as SKF's: a user's copy of a bare folder pattern SKF already writes goes when SKF removes that pattern, and an entry present before a run with ccc first saved the record (an earlier run without ccc leaves it empty, which setup does not trust) is adopted when the folder holds only SKF output. To exclude a folder SKF leaves indexed, the user adds the entry after setup has run with ccc. Once that record exists, a folder value the user lists in `exclude_patterns` that the record does not hold stays the user's: setup never adopts it into the record and never removes it. The one exception is a record that still names per-entry patterns for that folder when none of them is left in `exclude_patterns`: a setup run swapped them for the bare pattern and stopped before it saved its record, so the bare pattern is SKF's and setup checks the folder again.
98
112
 
99
113
  ### Deferred Discovery (Remote Sources)
100
114
 
101
- For remote repository sources (GitHub URLs), CCC cannot operate during step 2b because no local code exists yet. The workspace clone or ephemeral clone happens in step 3. To provide CCC pre-ranking for remote sources:
115
+ For remote repository sources (GitHub URLs), CCC cannot operate during step 2b because no local code exists yet. Step 3 reads the source into a private tree and moves SKF's workspace clone to the same commit (`skf-source-tree.py resolve`); ccc indexes that clone, which persists, never the tree, which the run removes. To provide CCC pre-ranking for remote sources:
102
116
 
103
117
  1. **step 2b:** Detects remote source, sets `{ccc_discovery: []}`, displays deferred message
104
- 2. **step 3:** After source resolution succeeds, detects the deferred scenario (`tools.ccc == true AND {ccc_discovery} is empty AND remote_clone_path is set AND tier is Forge+/Deep`)
105
- 3. **step 3 (workspace fast path):** If `{remote_clone_path}/.cocoindex_code/` already exists (persisted workspace index), skips init/index and uses `ccc search --refresh` — CCC daemon re-indexes only if files changed since last index. This is near-instant for unchanged repos.
106
- 4. **step 3 (first-time path):** If no existing CCC index, runs `cd {remote_clone_path} && ccc init`, applies standard build/dependency exclusions (node_modules, dist, .git, vendor, etc.) to `settings.yml`, then runs `ccc index`. Brief-specific `include_patterns`/`exclude_patterns` are NOT written to `settings.yml` — the CCC index is general-purpose. Filtering happens at search result time.
118
+ 2. **step 3:** After source resolution succeeds, detects the deferred scenario (`tools.ccc == true AND {ccc_discovery} is empty AND remote_clone_path is set AND tier is Forge+/Deep`); `remote_clone_path` is set only when the clone holds the commit the run reads
119
+ 3. **step 3 (workspace reuse):** If `{remote_clone_path}/.cocoindex_code/settings.yml` already exists, `skf-merge-ccc-exclusions.py --clone-root` appends any missing standard exclusions, and step 3 runs a plain `ccc index`. The pass is incremental, so an unchanged repository costs almost nothing, and an edited exclude or include pattern takes effect in the same pass.
120
+ 4. **step 3 (first-time path):** If no existing CCC index, `skf-merge-ccc-exclusions.py --clone-root` runs `ccc init -f` in the clone and applies standard build/dependency exclusions (node_modules, dist, .git, vendor, etc.) to `settings.yml`, then step 3 runs `ccc index`. Brief-specific `include_patterns`/`exclude_patterns` are NOT written to `settings.yml`: the CCC index is general-purpose. Filtering happens at search result time.
107
121
  5. **step 3:** Executes CCC search and populates `{ccc_discovery}` before AST extraction begins
122
+ 6. **step 3 (leave the workspace clone clean):** The first `ccc init` in a workspace clone, or a `ccc index` that initializes it, appends `# CocoIndex Code (ccc)` and `/.cocoindex_code/` to the clone's tracked `.gitignore`, a local change that makes git refuse a later checkout of another ref. Once the block is done with a workspace clone, `skf-ccc-git-hygiene.py workspace` restores the tracked `.gitignore` (or deletes one holding only those lines) and lists `.cocoindex_code/` and `/.skf-workspace.lock` in the clone's `.git/info/exclude`. create-skill's `skf-source-tree.py resolve` runs the same check before it moves the clone, and update-skill runs it before it moves the clone to the commit an update recorded; each also repairs a clone an earlier SKF left edited. audit-skill never moves the clone: its `[C]` reads the newer ref into a tree of the run's own. Any other local change is left alone: create-skill and update-skill then leave the clone where it is, and create-skill still reads its own tree. update-skill reads a remote skill's source from a checkout of the run's own, which no ccc index covers, so it runs no ccc search there: re-extraction skips ccc ranking and rename detection keeps its ast-grep comparison. audit-skill's `[C]` tree has no index either, so its relocation check lists the candidate files with `git grep` there.
108
123
 
109
- For workspace repos, the CCC index persists at `{workspace_repo_path}/.cocoindex_code/` and is reused across forges, projects, and sessions. For ephemeral fallback clones, the index is not registered in `ccc_index_registry` — the clone is deleted after extraction.
124
+ For workspace repos, the CCC index persists at `{remote_clone_path}/.cocoindex_code/` and is reused across forges, projects, and sessions. When step 3 could not move the clone to the commit it reads, it indexes nothing and registers nothing in `ccc_index_registry`: an index of that clone would not match the skill's commit, and the private tree is removed at the end of the run.
110
125
 
111
126
  ### Relationship to QMD Registry
112
127
 
@@ -131,8 +146,9 @@ To prevent excessive daemon calls, workflow steps cap ccc queries:
131
146
  - Running ccc_bridge.ensure_index() without checking ccc_index.status first — unnecessary re-indexing
132
147
  - Passing ccc results directly to the extraction inventory — they are candidates, not extractions
133
148
  - Listing ccc as "unavailable" in reports for Quick/Forge tiers — ccc is a Forge+ capability, not something Quick/Forge tiers are missing
134
- - Indexing without configuring exclusions — for project root indexes, apply SKF exclusions (framework/output directories); for workspace repo indexes, apply standard build artifact exclusions (node_modules, dist, .git, etc.)
135
- - Writing brief-specific `exclude_patterns` to a workspace repo's `settings.yml` — workspace indexes are general-purpose and serve multiple briefs. Apply brief patterns at search result time, not index time. (Exception: ephemeral fallback clones are single-use, so brief exclusions may be applied to their `settings.yml` to reduce indexing time.)
149
+ - Indexing without configuring exclusions — for project root indexes, apply SKF exclusions (framework/output directories); for workspace repo indexes, apply standard build artifact exclusions in the `**/name` form (`**/node_modules`, `**/dist`, `**/build`, etc.), each written as a single-quoted YAML list item (`- '**/build'`), because ccc matches nothing with a trailing-slash form such as `build/`, and YAML reads an unquoted leading `*` as an alias, so ccc cannot load the file
150
+ - Writing brief-specific `exclude_patterns` to a workspace repo's `settings.yml`: workspace indexes are general-purpose and serve multiple briefs. Apply brief patterns at search result time, not index time.
151
+ - Running `ccc reset` to apply edited patterns or to repair an index missing the source language — a plain `ccc index` applies pattern edits, and a missing language is fixed in `include_patterns`. `ccc reset` deletes the index databases but keeps `settings.yml`; a `ccc index` right after it can fail and leave the project with no index until `ccc daemon restart`; and run from a folder without its own `settings.yml`, it deletes the enclosing project's index. Its real uses (switching the embedding model, or an index database `ccc doctor` reports as unreadable) are outside SKF.
136
152
  - Skipping CCC discovery for remote sources without deferring to step 3 — remote repos deserve the same pre-ranking as local sources
137
153
 
138
154
  ## Related Fragments
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- Every extracted claim carries a confidence tier label — T1, T1-low, T2, or T3 — that tells consuming agents how much to trust the information. The tier determines citation format, affects scoring weights, and governs how claims interact during updates and audits.
5
+ Every extracted claim carries a confidence tier label (T1, T1-low, T2, or T3) that tells consuming agents how much to trust the information. The label follows the tool that produced the claim, not the forge tier the run used. It determines citation format and governs how claims interact during updates and audits.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -15,7 +15,7 @@ Without confidence tiers:
15
15
 
16
16
  With confidence tiers:
17
17
  - Each claim transparently declares its evidence strength
18
- - Scoring weights adjust based on the distribution of tiers
18
+ - Agents and reviewers can tell a signature ast-grep matched from one read by eye
19
19
  - Update workflows know which claims to re-verify first
20
20
 
21
21
  ## Tier Definitions
@@ -142,17 +142,21 @@ Every generated skill includes a confidence distribution in `metadata.json`:
142
142
  "t2": 12,
143
143
  "t3": 3
144
144
  },
145
- "confidence_tier": "Deep" // valid values: "Quick", "Forge", "Forge+", "Deep"
145
+ "confidence_tier": "Deep" // single skill: "Quick", "Forge", "Forge+" or "Deep"; stack: "T1", "T1-low", "T2" or "T3"
146
146
  }
147
147
  ```
148
148
 
149
- This distribution feeds into test-skill scoring — skills with higher T1 ratios score better on signature accuracy.
149
+ `confidence_tier` uses a different scale per `skill_type`. A single skill records the forge tier it was compiled at (Quick, Forge, Forge+ or Deep). A stack skill records the dominant confidence tier of its libraries (T1, T1-low, T2 or T3) and keeps its forge tier in `forge_tier`. The export gate checks the value against the scale of the skill's `skill_type`. An older stack may still hold its forge tier in `confidence_tier`: the gate accepts it with a low warning, and re-running Stack Skill records the dominant tier.
150
+
151
+ The distribution counts each provenance entry once, by its `signature_source`, so it reports how each signature was obtained. It does not feed test-skill scoring: `compute-score.py` does not read these counts, and for library skills coverage-check §4b checks only that the bins sum to the documented-export count.
152
+
153
+ A stack skill is the exception to that unit: its `confidence_distribution` counts each library once, in the bin of the tier create-stack-skill's extraction step sets for it (`per_library_extractions[].confidence`: in code mode `T1` only when it recorded exports and an ast-grep rule matched each one, in compose mode the constituent's own tier), so the four bins sum to `library_count`. Its evidence report bins the provenance entries.
150
154
 
151
155
  ## Anti-Patterns
152
156
 
153
157
  - Omitting the confidence tier from a citation — every citation must declare its level
154
158
  - Using T1 format (`[AST:...]`) when ast-grep was not actually used for that extraction
155
- - Treating T1-low and T1 as equivalent during scoring — they have different weight impacts
159
+ - Labeling by forge tier instead of by tool: a signature read by eye is T1-low with a `[SRC:...]` citation even at Forge or Deep tier, because nothing structural verified it
156
160
  - Adding T2 enrichment without a QMD citation — enrichment without provenance is hallucination
157
161
 
158
162
  ## Related Fragments
@@ -6,7 +6,7 @@ Agent-level knowledge files capture cross-cutting principles and patterns that F
6
6
 
7
7
  ## Rationale
8
8
 
9
- The SKF module has 14 workflows containing operational `references/` and `assets/` files within each skill directory. References contain rules, patterns, and protocols for decision-making; assets contain templates, schemas, and output formats. Both are tightly coupled to individual steps. But several principles — zero hallucination, confidence tiers, provenance — cut across multiple workflows and need a single authoritative source rather than fragmented repetition.
9
+ The SKF module has 15 workflows containing operational `references/` and `assets/` files within each skill directory. References contain rules, patterns, and protocols for decision-making; assets contain templates, schemas, and output formats. Both are tightly coupled to individual steps. But several principles (zero hallucination, confidence tiers, provenance) cut across multiple workflows and need a single authoritative source rather than fragmented repetition.
10
10
 
11
11
  Without a knowledge folder:
12
12
  - Cross-cutting principles get duplicated across workflow steps
@@ -26,7 +26,7 @@ With knowledge files:
26
26
  | [confidence-tiers.md](confidence-tiers.md) | T1/T1-low/T2/T3 trust model and citation formats | AN, BS, CS, QS, SS, US, AS, TS, EX, RA, VS |
27
27
  | [progressive-capability.md](progressive-capability.md) | Quick/Forge/Forge+/Deep tier philosophy and behavior adaptation | SF, AN, BS, CS, QS, SS, US, AS, TS, EX, VS, RA |
28
28
  | [agentskills-spec.md](agentskills-spec.md) | agentskills.io output format principles and compliance | CS, QS, SS, US, TS, EX |
29
- | [skill-lifecycle.md](skill-lifecycle.md) | End-to-end pipeline — workflow connections, artifact flow, decision rules for workflow selection, pipeline invocation syntax and aliases | All 14 |
29
+ | [skill-lifecycle.md](skill-lifecycle.md) | End-to-end pipeline: workflow connections, artifact flow, decision rules for workflow selection, pipeline invocation syntax and aliases | All 15 |
30
30
  | [provenance-tracking.md](provenance-tracking.md) | Provenance-map.json entries and file_entries, evidence reports, claim traceability | CS, QS, SS, US, AS, TS |
31
31
  | [manual-section-integrity.md](manual-section-integrity.md) | \[MANUAL\] marker preservation and merge algorithm | CS, US, AS, TS, EX |
32
32
  | [qmd-registry.md](qmd-registry.md) | Progressive QMD collection registry and collection gate principle | SF, BS, CS, US, AS |
@@ -35,7 +35,7 @@ With knowledge files:
35
35
  | [architecture-verification.md](architecture-verification.md) | Pre-code verification pipeline, integration verdicts, iteration loop | VS, RA, SS |
36
36
  | [doc-fetcher.md](doc-fetcher.md) | T3 external documentation fetching, quarantine rules, tool-agnostic | CS, QS |
37
37
  | [split-body-strategy.md](split-body-strategy.md) | Selective vs full split-body, detection pattern, agent accuracy | CS, QS, US, TS, EX |
38
- | [version-paths.md](version-paths.md) | Version-aware storage layout, path templates, export manifest v2, migration | CS, QS, SS, US, AS, TS, EX, VS, RA |
38
+ | [version-paths.md](version-paths.md) | Version-aware storage layout, path templates, export manifest v2, ownership gate, flat migration (US, AS, TS, EX) | CS, QS, SS, US, AS, TS, EX, VS, RA |
39
39
  | [overview.md](overview.md) | Knowledge map and JiT loading protocol (this file) | All (entry point) |
40
40
 
41
41
  ## JiT Loading Protocol
@@ -24,7 +24,7 @@ With progressive capability:
24
24
  | --- | --- | --- | --- |
25
25
  | Quick | No tools required | Fast, template-driven, package-name resolution | Speed-first skill creation |
26
26
  | Forge | ast-grep available | AST-backed structural analysis, line-level citations | Precision-focused compilation |
27
- | Forge+ | ast-grep + ccc | Semantic discovery + AST verification, pre-ranked extraction | Intelligent precision compilation |
27
+ | Forge+ | ast-grep + ccc | Semantic discovery + AST verification | Intelligent precision compilation |
28
28
  | Deep | ast-grep + gh + qmd | AST + GitHub exploration + QMD synthesis, maximum provenance | Full intelligence pipeline |
29
29
 
30
30
  ## Pattern Examples
@@ -81,8 +81,8 @@ Deep: "Full intelligence pipeline — AST verification plus GitHub exploration
81
81
  **Implementation:**
82
82
  - **Quick:** Reads source files, applies pattern matching for exports and signatures, produces T1-low citations. Uses `gh_bridge` for file structure when available as a convenience, not a requirement.
83
83
  - **Forge:** Uses `ast_bridge.scan_definitions()` for structural parsing, produces T1 citations with exact AST node types. Falls back to source reading for files ast-grep cannot parse.
84
- - **Forge+:** Identical extraction to Forge, plus ccc semantic pre-discovery narrows the file set before ast-grep runs. For large codebases, `ccc_bridge.search()` produces a ranked candidate list. ast-grep operates on that list rather than the full tree. All results remain T1 (AST-verified) — ccc is upstream, not in the extraction chain.
85
- - **Deep:** Identical extraction to Forge, plus QMD enrichment in a separate step. T2 annotations layer on top of the T1 base without replacing it.
84
+ - **Forge+:** Identical extraction to Forge, plus ccc semantic pre-discovery: `ccc_bridge.search()` ranks the source files, and the files a step reads by eye follow that order, while the recipe runner reads every file in scope. Labels follow the tool exactly as at Forge (ccc is upstream, not in the extraction chain): an ast-grep match is T1 (AST-verified), an export read by eye is T1-low.
85
+ - **Deep:** Identical extraction to Forge, plus QMD enrichment in a separate step. T2 annotations layer on top of the extracted T1 and T1-low base without replacing it.
86
86
 
87
87
  *Bridge names (`gh_bridge`, `ast_bridge`, `ccc_bridge`, `qmd_bridge`) are conceptual interfaces. See [tool-resolution.md](tool-resolution.md) for concrete tool resolution per IDE.*
88
88
 
@@ -97,9 +97,9 @@ Deep: "Full intelligence pipeline — AST verification plus GitHub exploration
97
97
 
98
98
  **Implementation:**
99
99
  - **Forge/Deep (Naive mode — individual skill):** Coherence weight (18%) redistributed to remaining categories: Export Coverage 45%, Signature Accuracy 25%, Type Coverage 20%, External Validation 10%. All four active categories are scored with AST-backed data.
100
- - **Quick (any mode):** Signature Accuracy and Type Coverage are skipped (no AST available). Their weights redistribute proportionally to remaining active categories. For a Quick-tier individual skill (naive mode): after both adjustments (coherence removal + AST-dependent category removal), only Export Coverage and External Validation remain active — approximate redistributed weights: Export Coverage ~82%, External Validation ~18% (exact values depend on proportional redistribution; see scoring-rules.md for the calculation). When external validation tools (skill-check, tessl) are also unavailable, their weight is further redistributed, leaving Export Coverage as the sole scoring axis.
100
+ - **Quick (any mode):** Signature Accuracy and Type Coverage are skipped (no AST available). Their weights redistribute proportionally to remaining active categories. For a Quick-tier individual skill (naive mode): after both adjustments (coherence removal + AST-dependent category removal), only Export Coverage and External Validation remain active, with approximate redistributed weights: Export Coverage ~82%, External Validation ~18% (exact values depend on proportional redistribution; skf-test-skill's `scripts/compute-score.py` computes them). When the external validators (skill-check, and Tessl Review when the user opted in) also produce no score, their weight is further redistributed, leaving Export Coverage as the sole scoring axis.
101
101
  - **Forge (Contextual mode):** Export Coverage 36%, Signature Accuracy 22%, Type Coverage 14%, Coherence 18%, External Validation 10%. Full AST-backed verification. When external validation tools are unavailable, their 10% is redistributed proportionally.
102
- - **Forge+ (Contextual mode):** Same weights as Forge. The improved extraction coverage (from ccc pre-ranking) may increase T1 count and reduce gaps, but the scoring weights themselves do not change.
102
+ - **Forge+ (Contextual mode):** Same weights as Forge.
103
103
  - **Deep (Contextual mode):** Same weights as Forge, plus cross-repo verification and QMD coherence checks feed into the coherence score.
104
104
 
105
105
  **Key Points:**
@@ -117,9 +117,9 @@ When a tool becomes unavailable mid-session (e.g., ast-grep uninstalled between
117
117
 
118
118
  When source is remote (GitHub URL) and tier is Forge, Forge+, or Deep:
119
119
  1. AST extraction requires local files — ast-grep cannot operate on remote URLs
120
- 2. The extraction step attempts an **ephemeral shallow clone** to a system temp path (if `git` is available)
121
- 3. If the clone succeeds: AST extraction proceeds on the local clone, then the temp directory is cleaned up
122
- 4. If the clone fails (or `git` is unavailable): the step warns the user explicitly and degrades to source reading (T1-low) with actionable guidance
120
+ 2. The extraction step reads the resolved commit into a **private tree** of the run's own (if `git` is available), from SKF's workspace clone of the repository when it holds the commit and from the remote otherwise
121
+ 3. If the tree is read: AST extraction proceeds on it, and the tree is removed at the end of the run
122
+ 4. If no tree can be read (or `git` is unavailable): the step warns the user explicitly and degrades to source reading (T1-low) with actionable guidance
123
123
  5. Silent degradation is forbidden — the user must always know when AST extraction was skipped and why
124
124
 
125
125
  ## Anti-Patterns
@@ -54,7 +54,7 @@ With provenance tracking:
54
54
  "source_line": 23,
55
55
  "confidence": "T1",
56
56
  "extraction_method": "ast-grep",
57
- "ast_node_type": "export_statement > function_declaration",
57
+ "ast_node_type": "export_statement",
58
58
  "signature_source": "T1"
59
59
  },
60
60
  {
@@ -78,6 +78,7 @@ With provenance tracking:
78
78
  - Each entry uses structured fields (`export_name`, `params[]`, `return_type`) for incremental updates
79
79
  - `ast_node_type` is null for non-AST extractions — never fabricated
80
80
  - `extraction_method` distinguishes how the entry was obtained
81
+ - An ast-grep entry's `ast_node_type` is the `kind` the matching pattern or recipe declares in create-skill's `extraction-patterns.md`, copied because ast-grep's output never reports a match's kind. A TypeScript export records `export_statement`: its `export ...` recipe matches the whole export statement, not the `function_declaration` or `class_declaration` inside it. A name exported through a list records `export_specifier`, the one specifier that names it: a re-export (`export { a, b as c } from '...'`, the `js-reexports` recipe) or a local list with no `from` (`export { a, b as c }`, the `js-local-exports` recipe)
81
82
  - Confidence tier is recorded per-entry, not per-file
82
83
  - `params` is an array of typed strings (e.g., `"userId: string"`) — enables param-by-param diffing
83
84
 
@@ -140,19 +141,22 @@ With provenance tracking:
140
141
 
141
142
  **Implementation:**
142
143
  1. Load existing provenance map
143
- 2. Identify claims that need re-extraction (from audit drift report or source change detection)
144
- 3. Re-extract only affected claims using current tier tools
145
- 4. Merge fresh provenance entries into the existing map:
144
+ 2. Read the source at one commit: the commit the skill's `source_ref` points to now (or the ref `--target-ref` names), in a checkout of the update's own, so change detection and re-extraction read the same tree
145
+ 3. Identify claims that need re-extraction (from audit drift report or source change detection)
146
+ 4. Re-extract only affected claims using current tier tools
147
+ 5. Merge fresh provenance entries into the existing map:
146
148
  - Changed entries: replace with new provenance
147
149
  - Unchanged entries: preserve existing provenance (timestamp unchanged)
148
150
  - Removed exports: remove from provenance map
149
151
  - New exports: add with fresh provenance
150
- 5. Regenerate evidence report reflecting the update
152
+ 6. Record the commit the update read as `source_commit` in `metadata.json` and `provenance-map.json` (and the ref as `source_ref` when `--target-ref` re-pinned the skill); a gap-driven update keeps both
153
+ 7. Regenerate evidence report reflecting the update
151
154
 
152
155
  **Key Points:**
153
156
  - Selective re-extraction — only changed entries are re-processed
154
157
  - Provenance timestamps show when each entry was last verified
155
158
  - The merge preserves \[MANUAL\] section provenance (author: "manual", no source location)
159
+ - `source_commit` always names the commit the citations were read from
156
160
 
157
161
  ### File-Level Provenance (file_entries)
158
162
 
@@ -135,7 +135,7 @@ Then append/replace the registry entry in forge-tier.yaml. Failures never block
135
135
 
136
136
  ### Example 2: Consumer Discovery (audit-skill)
137
137
 
138
- **Context:** Audit-skill needs temporal context for drift detection.
138
+ **Context:** Audit-skill's Deep-tier semantic diff retrieves what the skill documents about each export, then checks each claim against the current source.
139
139
 
140
140
  **Implementation:** Read `qmd_collections` from forge-tier.yaml. Find entry where `skill_name` matches AND `type` is `"extraction"`. If found, query via qmd_bridge. If not found, log and continue without T2 enrichment — not an error.
141
141
 
@@ -143,7 +143,7 @@ Then append/replace the registry entry in forge-tier.yaml. Failures never block
143
143
 
144
144
  **Context:** Setup-forge verifies QMD health on every run.
145
145
 
146
- **Implementation:** Cross-reference live QMD collections against registry. Classify as healthy (in both), orphaned (in QMD only), or stale (in registry only). Prompt user before removing orphans. Silently clean stale registry entries.
146
+ **Implementation:** Cross-reference live QMD collections against registry. Classify as healthy (in both), orphaned (in QMD only, and indexed from a folder inside this project: QMD's index is shared by every project on the machine, so another project's collections never count), or stale (in registry only). Prompt user before removing orphans, and check each one's folder again just before removing it. Silently clean stale registry entries.
147
147
 
148
148
  ## Related Fragments
149
149
 
@@ -11,6 +11,6 @@ manual-section-integrity,Manual Section Integrity,"[MANUAL] preservation — mar
11
11
  qmd-registry,QMD Collection Registry,"Progressive registry architecture — producer/consumer/janitor roles, collection gate principle, forge-tier.yaml registry schema","qmd,registry,collections,deep,indexing",core,knowledge/qmd-registry.md
12
12
  doc-fetcher,Doc Fetcher,"T3 external documentation — tool-agnostic URL fetching, quarantine rules, conflict resolution","doc-fetcher,t3,external,documentation,quarantine",extended,knowledge/doc-fetcher.md
13
13
  architecture-verification,Architecture Verification,"Pre-code verification pipeline — VS/RA/SS-compose lifecycle, integration verdicts, coverage analysis, iteration loop","architecture,verification,stack,feasibility,integration,vs,ra,ss,compose",core,knowledge/architecture-verification.md
14
- split-body-strategy,Split-Body Strategy,"Selective split guidance — detection pattern, recommended approach, impact on tessl scores and snippet anchors","split-body,selective-split,references,body-size",core,knowledge/split-body-strategy.md
14
+ split-body-strategy,Split-Body Strategy,"Selective split guidance — detection pattern, recommended approach, impact on agent accuracy and snippet anchors","split-body,selective-split,references,body-size",core,knowledge/split-body-strategy.md
15
15
  tool-resolution,Tool Resolution,"Bridge-to-tool and subprocess-to-tool mapping — ast_bridge, ccc_bridge, qmd_bridge, gh_bridge resolution per IDE, subprocess Pattern 1-4 definitions","bridge,tools,resolution,subprocess,mcp,cli,ide",core,knowledge/tool-resolution.md
16
- version-paths,Version-Aware Paths,"Version-nested directory structure — path templates, version resolution, export manifest v2, migration from flat layout, version sanitization","version,paths,directory,structure,migration,manifest,symlink",core,knowledge/version-paths.md
16
+ version-paths,Version-Aware Paths,"Version-nested directory structure — path templates, version resolution, export manifest v2, ownership gate for skills SKF did not generate, migration from flat layout, version sanitization","version,paths,directory,structure,migration,manifest,symlink,ownership",core,knowledge/version-paths.md
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- The 14 SKF workflows form an end-to-end pipeline from source discovery through verified export, with a pre-code architecture verification path and post-distribution management operations. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
5
+ The 15 SKF workflows form an end-to-end pipeline from source discovery through verified export, with a pre-code architecture verification path, post-distribution management operations, and campaigns that drive many skills through the pipeline. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -31,6 +31,7 @@ With lifecycle awareness:
31
31
  | Verification | TS (Test Skill) | Quality gate — completeness scoring | Test report, pass/fail decision |
32
32
  | Distribution | EX (Export Skill) | Package and inject into agent context | agentskills.io bundle, snippets |
33
33
  | Management | RS, DS (Rename/Drop) | Rename or retire skills and versions | Renamed skill group, deprecated/purged versions |
34
+ | Orchestration | CA (Campaign) | Drive many skills through the pipeline in dependency order, across sessions | `_campaign-state.yaml`, `campaign-report.md`, and each skill's own artifacts |
34
35
 
35
36
  ## Typical Flows
36
37
 
@@ -115,10 +116,12 @@ RS or DS → EX
115
116
  | --- | --- |
116
117
  | User knows exactly what to skill, has a brief | CS directly |
117
118
  | User knows the library but needs scope guidance | BS → CS |
119
+ | User wants a verified skill from one repo or doc URL, without writing a brief | `forge-auto <repo-or-doc-url>` |
118
120
  | User has a package name, wants fast results | QS |
119
121
  | User wants to skill their entire project | AN → CS (batch) |
120
122
  | User has an existing skill that may be outdated | AS → US |
121
123
  | User wants to verify tech stack before building | CS×N → VS → RA → SS (compose) |
124
+ | User needs many skills built in dependency order across sessions | CA |
122
125
 
123
126
  **Key Points:**
124
127
  - SF is always prerequisite (but only needs to run once per project)
@@ -141,7 +144,7 @@ TS → {forge_version}/test-report.md (pass/fail gate)
141
144
  ↓ (passing skill consumed by EX — resolved via export manifest v2)
142
145
  EX → agentskills.io bundle + context snippets (flat platform paths)
143
146
 
144
- VS → feasibility-report-{project_name}.md (verdict + integration verdicts)
147
+ VS → feasibility-report-{project_slug}-{timestamp}.md + a feasibility-report-{project_slug}-latest.md copy (verdict + integration verdicts)
145
148
  ↓ (report consumed by RA)
146
149
  RA → refined-architecture-{arch_project_name}.md (gaps filled, issues flagged, improvements suggested)
147
150
  ↓ (refined doc consumed by SS compose-mode)
@@ -169,18 +172,22 @@ SS (compose) → SKILL.md (stack skill synthesized from individual skills + arch
169
172
 
170
173
  ## Pipeline Invocation
171
174
 
172
- Users can chain workflows by providing multiple codes to Ferris:
175
+ Users can chain workflows by providing multiple codes to Ferris, or one of four aliases:
173
176
 
174
177
  ```
175
- BS CS TS EX — space-separated
176
- forge — alias for BS CS TS EX
177
- forge-quick — alias for QS TS EX
178
- onboard — alias for AN CS TS EX
179
- maintain — alias for AS US TS EX
180
- CS[cocoindex] TS[min:80] EX — with arguments and circuit breakers
178
+ BS CS TS EX # codes, space- or arrow-separated
179
+ forge-auto <repo-or-doc-url> # auto-scope, auto-brief, compile, test and export
180
+ forge <repo-url-or-path> <skill-name> # alias for BS CS TS EX
181
+ forge-quick <package-or-url> # alias for QS TS EX
182
+ maintain <skill> # alias for AS US TS EX
183
+ CS[cocoindex] TS[min:80] EX # a target argument and a circuit-breaker override
181
184
  ```
182
185
 
183
- Pipelines automatically activate headless mode. The forger passes data between workflows using the artifact flow described above. Circuit breakers halt the pipeline when output quality falls below a threshold (e.g., TS score < 60 blocks EX). See `shared/references/pipeline-contracts.md` for the full specification.
186
+ A chain of codes whose first workflow lacks its input, such as `QS TS EX`, asks for that input before any workflow runs (`SF` and `SS` take none), and a headless one halts there instead. A leading `SF` is passed over, so `SF QS TS EX` asks for QS's target. A chain led by `BS` gets its target and skill name only as `forge <repo-url-or-path> <skill-name>`, `RS` and `DS` need more than one bracket and run on their own, a first code other than `CS` whose bracket already holds `auto`, or an AN or TS whose bracket holds `min:N` (such as `TS[min:80] EX`), is named as a conflict instead of asked, since a bracket holds one value, and a headless chain led by `CS` leaves the brief to create-skill, which compiles the only one and halts naming them when there are several.
187
+
188
+ `forge-auto` is the one-command verified path: it needs no brief, and its test step is stricter than the other pipelines'. `CA` (campaign) is not an alias and does not chain with other codes: it is a workflow of its own that drives many skills through this pipeline in dependency order and can resume across sessions.
189
+
190
+ Pipelines automatically activate headless mode. The forger passes data between workflows using the artifact flow described above. A circuit breaker halts the pipeline on the gate a workflow's result fails: TS on any verdict but PASS, VS on zero coverage. `shared/references/pipeline-contracts.md` holds each alias's expansion and every threshold its gates apply, and Test Skill's `skf-test-skill/references/init.md` §1b the test threshold each pipeline uses.
184
191
 
185
192
  ## Integration Points
186
193
 
@@ -198,4 +205,4 @@ Pipelines automatically activate headless mode. The forger passes data between w
198
205
  - [provenance-tracking.md](provenance-tracking.md) — how provenance flows through the pipeline
199
206
  - [version-paths.md](version-paths.md) — version-aware storage layout, path templates, and migration rules
200
207
 
201
- _Source: synthesized from all 14 SKILL.md files (including VS, RA, RS, DS) and module-help.csv_
208
+ _Source: synthesized from all 15 workflow SKILL.md files (including VS, RA, RS, DS, CA) and module-help.csv_
@@ -10,14 +10,12 @@ Vercel research shows inline passive context achieves 100% task accuracy vs 79%
10
10
 
11
11
  Without selective split awareness:
12
12
  - `skill-check split-body --write` extracts everything, reducing agent effectiveness
13
- - tessl content scores drop dramatically (65% → 38%) because only SKILL.md body is evaluated
14
13
  - Context snippet anchors (`#quick-start`, `#key-types`) may break if those sections move to references
15
14
 
16
15
  With selective split awareness:
17
16
  - Only the largest Tier 2 section(s) are extracted (usually Full API Reference or Full Type Definitions)
18
17
  - Quick Start, Key API Summary, Key Types, Migration Warnings stay inline
19
18
  - Agent accuracy remains high for common tasks
20
- - tessl scores reflect actual inline content quality
21
19
 
22
20
  ## Split-Body Detection Pattern
23
21
 
@@ -50,6 +48,5 @@ Split-body affects only SKILL.md content movement to `references/`. The `scripts
50
48
 
51
49
  - [agentskills-spec.md](agentskills-spec.md) — 500-line guideline for SKILL.md body size and the `references/` directory structure
52
50
  - [skill-lifecycle.md](skill-lifecycle.md) — where split-body decisions fit in the compilation pipeline
53
- - `test-skill/references/scoring-rules.md` — tessl/split-body interaction and the pre-split baseline recommendation during test reporting
54
51
 
55
52
  _Source: derived from agentskills.io split-body guidance and Vercel agent accuracy research (inline vs on-demand retrieval)_