@cbartens/bkit 6.0.0 → 6.1.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 (375) hide show
  1. package/.bkit/README.md +154 -151
  2. package/.bkit/core/.agents/context.md +95 -29
  3. package/.bkit/core/.agents/docs.md +17 -15
  4. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-gateguard.cjs +1 -0
  5. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +6 -5
  6. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-readguard.cjs +1 -0
  7. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-rules.cjs +65 -0
  8. package/.bkit/core/.agents/rules.md +108 -107
  9. package/.bkit/core/.agents/skills.md +63 -15
  10. package/.bkit/core/.bkit/README.md +154 -151
  11. package/.bkit/core/.bkit/authoring.md +714 -84
  12. package/.bkit/core/.bkit/cli.md +407 -0
  13. package/.bkit/core/.bkit/cloud.md +281 -193
  14. package/.bkit/core/.bkit/comparison.md +43 -41
  15. package/.bkit/core/.bkit/install.md +154 -84
  16. package/.bkit/core/.bkit/jsonl.md +193 -130
  17. package/.bkit/core/.bkit/pipeline.md +114 -114
  18. package/.bkit/core/.bkit/prompts.md +272 -165
  19. package/.bkit/core/.bkit/providers.md +457 -271
  20. package/.bkit/core/.bkit/router.md +69 -0
  21. package/.bkit/core/.bkit/templates.md +529 -256
  22. package/.bkit/core/.bkit/trackers.md +80 -52
  23. package/.bkit/core/.bkit/workflows.md +589 -504
  24. package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +2 -2
  25. package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +3 -3
  26. package/.bkit/core/.claude/hooks/bkit-preflight.sh +45 -14
  27. package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +3 -3
  28. package/.bkit/core/.codex/hooks/bkit-rules.cjs +57 -0
  29. package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +7 -7
  30. package/.bkit/core/.cursor/hooks/bkit-preflight.sh +47 -12
  31. package/.bkit/core/.opencode/plugin/bkit-rules.js +89 -0
  32. package/.bkit/core/AGENTS.md +5 -73
  33. package/.bkit/core/docs/templates/bkit-audit-accessibility.md +127 -105
  34. package/.bkit/core/docs/templates/bkit-audit-adoption.md +104 -70
  35. package/.bkit/core/docs/templates/bkit-audit-agents.md +94 -72
  36. package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +99 -78
  37. package/.bkit/core/docs/templates/bkit-audit-analytics.md +140 -82
  38. package/.bkit/core/docs/templates/bkit-audit-annotations.md +98 -72
  39. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +121 -96
  40. package/.bkit/core/docs/templates/bkit-audit-app-store.md +157 -76
  41. package/.bkit/core/docs/templates/bkit-audit-architecture.md +113 -71
  42. package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +75 -72
  43. package/.bkit/core/docs/templates/bkit-audit-config.md +122 -76
  44. package/.bkit/core/docs/templates/bkit-audit-cost.md +85 -74
  45. package/.bkit/core/docs/templates/bkit-audit-coverage.md +75 -68
  46. package/.bkit/core/docs/templates/bkit-audit-database.md +101 -70
  47. package/.bkit/core/docs/templates/bkit-audit-dead-code.md +164 -83
  48. package/.bkit/core/docs/templates/bkit-audit-deferrals.md +115 -86
  49. package/.bkit/core/docs/templates/bkit-audit-dependencies.md +264 -88
  50. package/.bkit/core/docs/templates/bkit-audit-documentation.md +118 -93
  51. package/.bkit/core/docs/templates/bkit-audit-duplication.md +139 -86
  52. package/.bkit/core/docs/templates/bkit-audit-failures.md +110 -81
  53. package/.bkit/core/docs/templates/bkit-audit-flakes.md +99 -74
  54. package/.bkit/core/docs/templates/bkit-audit-gates.md +105 -77
  55. package/.bkit/core/docs/templates/bkit-audit-issues.md +104 -80
  56. package/.bkit/core/docs/templates/bkit-audit-llm.md +131 -58
  57. package/.bkit/core/docs/templates/bkit-audit-logs.md +123 -100
  58. package/.bkit/core/docs/templates/bkit-audit-models.md +98 -53
  59. package/.bkit/core/docs/templates/bkit-audit-privacy.md +56 -52
  60. package/.bkit/core/docs/templates/bkit-audit-prompts.md +63 -54
  61. package/.bkit/core/docs/templates/bkit-audit-red-team.md +124 -68
  62. package/.bkit/core/docs/templates/bkit-audit-reliability.md +95 -70
  63. package/.bkit/core/docs/templates/bkit-audit-repo.md +169 -73
  64. package/.bkit/core/docs/templates/bkit-audit-security.md +206 -96
  65. package/.bkit/core/docs/templates/bkit-audit-slop.md +77 -70
  66. package/.bkit/core/docs/templates/bkit-audit-testing.md +162 -114
  67. package/.bkit/core/docs/templates/bkit-audit-usability.md +113 -71
  68. package/.bkit/core/docs/templates/bkit-plan.md +138 -132
  69. package/.bkit/core/engine/checks/after/auth.ts +40 -37
  70. package/.bkit/core/engine/checks/after/ci-yml.ts +65 -2
  71. package/.bkit/core/engine/checks/after/index.ts +12 -2
  72. package/.bkit/core/engine/checks/after/tools.ts +80 -33
  73. package/.bkit/core/engine/checks/before/context-fetch.ts +227 -33
  74. package/.bkit/core/engine/checks/before/env.ts +1 -1
  75. package/.bkit/core/engine/checks/before/index.ts +7 -0
  76. package/.bkit/core/engine/checks/before/repo.ts +40 -0
  77. package/.bkit/core/engine/checks/status-holes.ts +916 -123
  78. package/.bkit/core/engine/checks/tips/catalogue.ts +68 -17
  79. package/.bkit/core/engine/checks/tips/detect.ts +32 -0
  80. package/.bkit/core/engine/checks/tips/index.ts +47 -6
  81. package/.bkit/core/engine/cli.ts +238 -84
  82. package/.bkit/core/engine/commands/analysis.ts +128 -76
  83. package/.bkit/core/engine/commands/ci/ci.ts +363 -29
  84. package/.bkit/core/engine/commands/ci/pins.ts +172 -0
  85. package/.bkit/core/engine/commands/ci/push-gate.ts +223 -0
  86. package/.bkit/core/engine/commands/install/uninstall.ts +21 -27
  87. package/.bkit/core/engine/commands/install/upgrade.ts +32 -15
  88. package/.bkit/core/engine/commands/land.ts +126 -11
  89. package/.bkit/core/engine/commands/lib.ts +303 -6
  90. package/.bkit/core/engine/commands/registry.ts +6 -2
  91. package/.bkit/core/engine/commands/setup/setup.ts +1 -0
  92. package/.bkit/core/engine/commands/stats.ts +91 -35
  93. package/.bkit/core/engine/commands/workflow/branches.ts +1477 -117
  94. package/.bkit/core/engine/commands/workflow/challenge.ts +114 -39
  95. package/.bkit/core/engine/commands/workflow/completeness.ts +109 -0
  96. package/.bkit/core/engine/commands/workflow/context.ts +433 -55
  97. package/.bkit/core/engine/commands/workflow/counters.ts +244 -39
  98. package/.bkit/core/engine/commands/workflow/decisions.ts +61 -17
  99. package/.bkit/core/engine/commands/workflow/disk.ts +237 -55
  100. package/.bkit/core/engine/commands/workflow/fids.ts +19 -1
  101. package/.bkit/core/engine/commands/workflow/issues.ts +6 -0
  102. package/.bkit/core/engine/commands/workflow/ledgers.ts +458 -18
  103. package/.bkit/core/engine/commands/workflow/locks.ts +2 -0
  104. package/.bkit/core/engine/commands/workflow/plan-blocks.ts +124 -15
  105. package/.bkit/core/engine/commands/workflow/plans.ts +257 -0
  106. package/.bkit/core/engine/commands/workflow/prs.ts +12 -3
  107. package/.bkit/core/engine/commands/workflow/repo.ts +8 -0
  108. package/.bkit/core/engine/commands/workflow/roadmap.ts +56 -15
  109. package/.bkit/core/engine/commands/workflow/run-facts.ts +22 -31
  110. package/.bkit/core/engine/commands/workflow/runs.ts +652 -34
  111. package/.bkit/core/engine/commands/workflow/runtime.ts +3 -0
  112. package/.bkit/core/engine/commands/workflow/skills.ts +1 -0
  113. package/.bkit/core/engine/commands/workflow/status.ts +200 -17
  114. package/.bkit/core/engine/commands/workflow/step-table.ts +75 -33
  115. package/.bkit/core/engine/commands/workflow/steps.ts +635 -24
  116. package/.bkit/core/engine/commands/workflow/summary-findings.ts +177 -0
  117. package/.bkit/core/engine/commands/workflow/summary.ts +192 -46
  118. package/.bkit/core/engine/commands/workflow/tasks.ts +409 -0
  119. package/.bkit/core/engine/commands/workflow/test-blocks.ts +254 -0
  120. package/.bkit/core/engine/commands/workflow/tests-changed.ts +201 -0
  121. package/.bkit/core/engine/commands/workflow/tests.ts +1285 -356
  122. package/.bkit/core/engine/commands/workflow/workflows.ts +228 -43
  123. package/.bkit/core/engine/commands/workflow/worktrees.ts +389 -47
  124. package/.bkit/core/engine/install/cloud-env.ts +251 -121
  125. package/.bkit/core/engine/install/context-ci-workflow.ts +102 -0
  126. package/.bkit/core/engine/install/manifest.ts +60 -12
  127. package/.bkit/core/engine/install/modules/antigravity.ts +3 -2
  128. package/.bkit/core/engine/install/modules/cloud.ts +3 -3
  129. package/.bkit/core/engine/install/modules/codex.ts +15 -2
  130. package/.bkit/core/engine/install/modules/core.ts +956 -52
  131. package/.bkit/core/engine/install/modules/cursor.ts +6 -6
  132. package/.bkit/core/engine/install/modules/opencode.ts +16 -4
  133. package/.bkit/core/engine/install/template-notes.ts +130 -0
  134. package/.bkit/core/engine/install/version-file.ts +3 -2
  135. package/.bkit/core/engine/install/write.ts +5 -0
  136. package/.bkit/core/engine/ledgers/compact.ts +124 -0
  137. package/.bkit/core/engine/ledgers/journal.ts +291 -0
  138. package/.bkit/core/engine/ledgers/status.ts +160 -9
  139. package/.bkit/core/engine/ledgers/telemetry.ts +158 -21
  140. package/.bkit/core/engine/render/hosts.ts +114 -14
  141. package/.bkit/core/engine/shared/bkit-latest.ts +26 -4
  142. package/.bkit/core/engine/shared/dep-updater.ts +60 -0
  143. package/.bkit/core/engine/shared/egress.ts +1 -1
  144. package/.bkit/core/engine/shared/package-manager.ts +9 -0
  145. package/.bkit/core/engine/shared/settings.ts +92 -17
  146. package/.bkit/core/engine/shared/timeouts.ts +2 -0
  147. package/.bkit/core/engine/tools/cli-doc.ts +111 -0
  148. package/.bkit/core/engine/tools/grammar-density.ts +1 -1
  149. package/.bkit/core/engine/tools/instructions-sources.ts +15 -17
  150. package/.bkit/core/engine/tools/instructions.ts +94 -43
  151. package/.bkit/core/hooks/antigravity-hook.js +25 -10
  152. package/.bkit/core/hooks/gateguard-engine.js +53 -29
  153. package/.bkit/core/hooks/guardrails-shell.js +4 -4
  154. package/.bkit/core/hooks/guardrails-tiers.js +3 -3
  155. package/.bkit/core/hooks/preflight-linear.sh +9 -9
  156. package/.bkit/core/hooks/preflight-rules.sh +8 -0
  157. package/.bkit/core/hooks/readguard-engine.js +29 -10
  158. package/.bkit/core/hooks/session-rules-advisory.js +61 -0
  159. package/.bkit/core/prompts/bkit-audit-generate.md +187 -116
  160. package/.bkit/core/prompts/bkit-build-challenge-1.md +56 -37
  161. package/.bkit/core/prompts/bkit-build-challenge-2.md +65 -45
  162. package/.bkit/core/prompts/bkit-build-install-skills.md +38 -29
  163. package/.bkit/core/prompts/bkit-build-plan-convert.md +43 -32
  164. package/.bkit/core/prompts/bkit-build-plan-current.md +49 -39
  165. package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +79 -55
  166. package/.bkit/core/prompts/bkit-build-plan-tasks.md +149 -0
  167. package/.bkit/core/prompts/bkit-build-plan-tests.md +120 -0
  168. package/.bkit/core/prompts/bkit-build-plan-verify.md +87 -50
  169. package/.bkit/core/prompts/bkit-debug-abort-handover.md +36 -35
  170. package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +96 -64
  171. package/.bkit/core/prompts/bkit-debug-failure-remediate.md +54 -45
  172. package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +42 -33
  173. package/.bkit/core/prompts/bkit-debug-failure-soak.md +53 -37
  174. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +35 -30
  175. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +34 -29
  176. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +32 -28
  177. package/.bkit/core/prompts/bkit-design-generate.md +68 -52
  178. package/.bkit/core/prompts/bkit-design-organise.md +73 -35
  179. package/.bkit/core/prompts/bkit-design-review-1.md +58 -54
  180. package/.bkit/core/prompts/bkit-design-review-2.md +54 -50
  181. package/.bkit/core/prompts/bkit-design-spike.md +54 -47
  182. package/.bkit/core/prompts/bkit-design-update.md +42 -31
  183. package/.bkit/core/prompts/bkit-plan-generate.md +76 -58
  184. package/.bkit/core/prompts/bkit-plan-review-1.md +63 -49
  185. package/.bkit/core/prompts/bkit-plan-review-2.md +60 -48
  186. package/.bkit/core/prompts/bkit-plan-scope-check.md +53 -46
  187. package/.bkit/core/prompts/bkit-plan-update.md +70 -52
  188. package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +82 -50
  189. package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +80 -45
  190. package/.bkit/core/prompts/bkit-ship-update-docs.md +35 -29
  191. package/.bkit/core/prompts/bkit-utility-compress-markdown.md +55 -49
  192. package/.bkit/core/prompts/bkit-utility-update-decisions.md +76 -49
  193. package/.bkit/core/prompts/bkit-utility-update-deferrals.md +70 -41
  194. package/.bkit/core/prompts/bkit-utility-update-documentation.md +33 -30
  195. package/.bkit/core/prompts/bkit-utility-update-failures.md +73 -43
  196. package/.bkit/core/prompts/bkit-utility-update-knowledge.md +77 -50
  197. package/.bkit/core/prompts/bkit-utility-update-roadmap.md +77 -45
  198. package/.bkit/core/prompts/bkit-utility-update-tracker.md +144 -68
  199. package/.bkit/core/workflows/bkit-auto.md +53 -30
  200. package/.bkit/core/workflows/bkit-build.md +635 -304
  201. package/.bkit/core/workflows/bkit-debug.md +301 -148
  202. package/.bkit/core/workflows/bkit-design.md +167 -95
  203. package/.bkit/core/workflows/bkit-plan.md +172 -84
  204. package/.bkit/core/workflows/bkit-ship.md +299 -152
  205. package/.bkit/shared/.agents/plugins/bkit/hooks.json +10 -0
  206. package/.bkit/shared/.claude/bkit-cloud.md +12 -10
  207. package/.bkit/shared/.claude/settings.json +3 -0
  208. package/.bkit/shared/.codex/bkit-cloud.md +98 -0
  209. package/.bkit/shared/.codex/hooks.json +20 -0
  210. package/.bkit/shared/.cursor/bkit-cloud.md +3 -3
  211. package/.bkit/shared/.opencode/opencode.json +1 -1
  212. package/.bkit/shared/CLAUDE.md +5 -1
  213. package/.bkit/shared/GEMINI.md +4 -1
  214. package/.bkit/shared/docs/architecture.md +4 -7
  215. package/.bkit/shared/docs/data-schema.md +4 -7
  216. package/.bkit/shared/docs/deployments.md +239 -166
  217. package/.bkit/shared/docs/design.md +11 -12
  218. package/.bkit/shared/docs/noise.md +8 -7
  219. package/.bkit/shared/docs/observability.md +5 -8
  220. package/.bkit/shared/docs/security.md +35 -17
  221. package/.bkit/shared/docs/setup.md +29 -18
  222. package/.bkit/shared/docs/technology.md +3 -6
  223. package/.bkit/shared/docs/testing.md +282 -176
  224. package/.bkit/shared/gitignore +6 -2
  225. package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +15 -16
  226. package/.bkit/templates/.cursor/Dockerfile +12 -8
  227. package/.bkit/templates/.cursor/environment.json +1 -1
  228. package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +10 -8
  229. package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +24 -12
  230. package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +3 -3
  231. package/.bkit/templates/.github/renovate.json5 +34 -6
  232. package/.bkit/templates/.github/workflows/bkit-ci.yml +53 -50
  233. package/.bkit/templates/.github/workflows/bkit-cloud.yml +13 -14
  234. package/.bkit/templates/.github/workflows/bkit-health.yml +97 -0
  235. package/.bkit/templates/.github/workflows/bkit-renovate.yml +5 -4
  236. package/.bkit/templates/.github/workflows/bkit-trivy.yml +5 -4
  237. package/.bkit/templates/.husky/pre-commit +2 -2
  238. package/.bkit/templates/.husky/pre-push +95 -35
  239. package/.bkit/templates/.prettierignore +6 -7
  240. package/.bkit/templates/.vale.ini +27 -27
  241. package/.bkit/templates/context/bkit-cloudrun.md +23 -15
  242. package/.bkit/templates/context/bkit-expo.md +70 -52
  243. package/.bkit/templates/context/bkit-github.md +93 -56
  244. package/.bkit/templates/context/bkit-inngest.md +21 -15
  245. package/.bkit/templates/context/bkit-maestro.md +22 -16
  246. package/.bkit/templates/context/bkit-playwright.md +23 -17
  247. package/.bkit/templates/context/bkit-resend.md +12 -10
  248. package/.bkit/templates/context/bkit-sentry.md +30 -20
  249. package/.bkit/templates/context/bkit-serena.md +8 -7
  250. package/.bkit/templates/context/bkit-stripe.md +14 -13
  251. package/.bkit/templates/context/bkit-supabase.md +16 -13
  252. package/.bkit/templates/context/bkit-tavily.md +14 -11
  253. package/.bkit/templates/context/bkit-vercel.md +27 -18
  254. package/.bkit/templates/docs/capabilities.md +15 -14
  255. package/.bkit/templates/scripts/ci/{check-accepted-divergences.mjs → bkit-check-accepted-divergences.mjs} +6 -3
  256. package/.bkit/templates/scripts/ci/{check-accepted-divergences.test.mjs → bkit-check-accepted-divergences.test.mjs} +3 -3
  257. package/.bkit/templates/scripts/ci/{check-capstone.mjs → bkit-check-capstone.mjs} +2 -2
  258. package/.bkit/templates/scripts/ci/{check-capstone.test.mjs → bkit-check-capstone.test.mjs} +4 -4
  259. package/.bkit/templates/scripts/ci/{check-dependency-audit.mjs → bkit-check-dependency-audit.mjs} +103 -18
  260. package/.bkit/templates/scripts/ci/{check-dependency-audit.test.mjs → bkit-check-dependency-audit.test.mjs} +31 -3
  261. package/.bkit/templates/scripts/ci/bkit-machine-lock.sh +387 -0
  262. package/.bkit/templates/scripts/ci/bkit-test-awake.mjs +75 -0
  263. package/.bkit/templates/scripts/ci/bkit-test-awake.test.mjs +160 -0
  264. package/.bkit/templates/scripts/ci/lanes/{resolve-push-base.mjs → bkit-resolve-push-base.mjs} +3 -3
  265. package/.bkit/templates/scripts/ci/lanes/{resolve-push-base.test.mjs → bkit-resolve-push-base.test.mjs} +4 -4
  266. package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +9 -1
  267. package/.bkit/templates/scripts/graphify/bkit-graph-drift.py +1 -1
  268. package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +3 -3
  269. package/.bkit/templates/scripts/graphify/bkit-graph-embed.py +63 -0
  270. package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +2 -2
  271. package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +69 -18
  272. package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -3
  273. package/.bkit/templates/scripts/graphify/bkit-graph-surface.py +1 -1
  274. package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +1 -1
  275. package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +197 -126
  276. package/.bkit/templates/scripts/graphify/bkit-graphify.sh +64 -41
  277. package/.bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs +23 -7
  278. package/.bkit/templates/slop-scan.config.json +9 -2
  279. package/CHANGELOG.md +119 -0
  280. package/README.md +250 -76
  281. package/dist/checks/after/auth.js +36 -33
  282. package/dist/checks/after/ci-yml.js +52 -2
  283. package/dist/checks/after/index.js +12 -4
  284. package/dist/checks/after/tools.js +73 -33
  285. package/dist/checks/before/context-fetch.js +218 -33
  286. package/dist/checks/before/env.js +1 -1
  287. package/dist/checks/before/index.js +6 -2
  288. package/dist/checks/before/repo.js +35 -1
  289. package/dist/checks/status-holes.js +739 -114
  290. package/dist/checks/tips/catalogue.js +59 -17
  291. package/dist/checks/tips/detect.js +30 -0
  292. package/dist/checks/tips/index.js +48 -6
  293. package/dist/cli.js +222 -84
  294. package/dist/commands/analysis.js +77 -53
  295. package/dist/commands/ci/ci.js +302 -25
  296. package/dist/commands/ci/pins.js +142 -0
  297. package/dist/commands/ci/push-gate.js +194 -0
  298. package/dist/commands/install/uninstall.js +23 -27
  299. package/dist/commands/install/upgrade.js +21 -11
  300. package/dist/commands/land.js +126 -10
  301. package/dist/commands/lib.js +244 -5
  302. package/dist/commands/registry.js +6 -2
  303. package/dist/commands/setup/setup.js +1 -0
  304. package/dist/commands/stats.js +69 -30
  305. package/dist/commands/workflow/branches.js +1232 -111
  306. package/dist/commands/workflow/challenge.js +90 -37
  307. package/dist/commands/workflow/completeness.js +97 -0
  308. package/dist/commands/workflow/context.js +371 -51
  309. package/dist/commands/workflow/counters.js +206 -40
  310. package/dist/commands/workflow/decisions.js +60 -17
  311. package/dist/commands/workflow/disk.js +213 -55
  312. package/dist/commands/workflow/fids.js +18 -1
  313. package/dist/commands/workflow/issues.js +6 -0
  314. package/dist/commands/workflow/ledgers.js +372 -21
  315. package/dist/commands/workflow/locks.js +2 -0
  316. package/dist/commands/workflow/plan-blocks.js +78 -14
  317. package/dist/commands/workflow/plans.js +205 -0
  318. package/dist/commands/workflow/prs.js +12 -3
  319. package/dist/commands/workflow/repo.js +6 -0
  320. package/dist/commands/workflow/roadmap.js +50 -17
  321. package/dist/commands/workflow/run-facts.js +23 -28
  322. package/dist/commands/workflow/runs.js +530 -33
  323. package/dist/commands/workflow/runtime.js +3 -0
  324. package/dist/commands/workflow/skills.js +1 -0
  325. package/dist/commands/workflow/status.js +166 -19
  326. package/dist/commands/workflow/step-table.js +61 -29
  327. package/dist/commands/workflow/steps.js +542 -26
  328. package/dist/commands/workflow/summary-findings.js +117 -0
  329. package/dist/commands/workflow/summary.js +154 -41
  330. package/dist/commands/workflow/tasks.js +378 -0
  331. package/dist/commands/workflow/test-blocks.js +231 -0
  332. package/dist/commands/workflow/tests-changed.js +172 -0
  333. package/dist/commands/workflow/tests.js +1013 -321
  334. package/dist/commands/workflow/workflows.js +191 -38
  335. package/dist/commands/workflow/worktrees.js +310 -42
  336. package/dist/install/cloud-env.js +233 -99
  337. package/dist/install/context-ci-workflow.js +85 -0
  338. package/dist/install/manifest.js +57 -12
  339. package/dist/install/modules/antigravity.js +3 -2
  340. package/dist/install/modules/cloud.js +3 -3
  341. package/dist/install/modules/codex.js +12 -2
  342. package/dist/install/modules/core.js +851 -53
  343. package/dist/install/modules/cursor.js +6 -6
  344. package/dist/install/modules/opencode.js +11 -5
  345. package/dist/install/template-notes.js +116 -0
  346. package/dist/install/version-file.js +3 -2
  347. package/dist/ledgers/compact.js +87 -0
  348. package/dist/ledgers/journal.js +233 -0
  349. package/dist/ledgers/status.js +115 -5
  350. package/dist/ledgers/telemetry.js +121 -17
  351. package/dist/render/hosts.js +100 -14
  352. package/dist/shared/bkit-latest.js +26 -4
  353. package/dist/shared/dep-updater.js +49 -0
  354. package/dist/shared/egress.js +1 -1
  355. package/dist/shared/package-manager.js +6 -0
  356. package/dist/shared/settings.js +59 -10
  357. package/dist/shared/timeouts.js +2 -0
  358. package/dist/tools/cli-doc.js +97 -0
  359. package/dist/tools/grammar-density.js +1 -1
  360. package/dist/tools/instructions-sources.js +15 -16
  361. package/dist/tools/instructions.js +83 -39
  362. package/package.json +58 -42
  363. package/.bkit/core/.bkit/lite.md +0 -73
  364. package/.bkit/core/engine/commands/workflow/workstreams.ts +0 -172
  365. package/.bkit/core/prompts/bkit-build-plan-execute.md +0 -124
  366. package/.bkit/templates/scripts/ci/bkit-local-stack-lock.sh +0 -194
  367. package/dist/commands/workflow/workstreams.js +0 -149
  368. /package/.bkit/templates/.vale/styles/{House → Bkit}/Filler.yml +0 -0
  369. /package/.bkit/templates/.vale/styles/{House → Bkit}/Hedging.yml +0 -0
  370. /package/.bkit/templates/.vale/styles/{House → Bkit}/LLMSlop.yml +0 -0
  371. /package/.bkit/templates/.vale/styles/{House → Bkit}/Verbose.yml +0 -0
  372. /package/.bkit/templates/scripts/ci/{accepted-advisories.json → bkit-accepted-advisories.json} +0 -0
  373. /package/.bkit/templates/scripts/ci/{accepted-divergences.json → bkit-accepted-divergences.json} +0 -0
  374. /package/.bkit/templates/scripts/launchd/{launchd.env.example → bkit-launchd.env.example} +0 -0
  375. /package/.bkit/templates/scripts/launchd/{ai.bkit.launchd.plist → bkit-launchd.plist} +0 -0
@@ -1,9 +1,9 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
-
3
1
  <!-- bkit:start -->
4
2
 
5
3
  {{BKIT_MANAGED_MARKER}}
6
4
 
5
+ <!-- Note: @bkit-audit-generate fills this template. The report lives at `docs/audits/{YYYYMM}/{slug}.md`, where `{YYYYMM}` is the UTC month of the run and `{slug}` is this file's name without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md`, where `{TIMESTAMP}` is the output of `date -u +%Y%m%dT%H%M%SZ`. NEVER overwrite an earlier report. The report is stamped with a `bkit:anchor` block that records the audited commit (`baseSha`) and branch (`baseRef`). NEVER write or edit that block by hand. -->
6
+
7
7
  # bkit Adoption Audit
8
8
 
9
9
  > [!CAUTION]
@@ -11,120 +11,149 @@
11
11
  >
12
12
  > **Rules:**
13
13
  >
14
- > - NEVER print or copy a token, key, or secret value; names and presence only.
15
- > - never run `bkit install` / `bkit upgrade`; bkit commands = `bkit check`, `bkit doctor` only.
16
- > - NEVER run a hook, script, or tool that writes, commits, pushes, or calls a remote write API; syntax checks and read-only modes only.
17
- > - No skip record exists: every unadopted template is re-listed each run, with the previous verdict and its age.
14
+ > - NEVER print or copy a token, key or secret value. Record names and presence only.
15
+ > - Do not run `bkit install` / `bkit upgrade`.
16
+ > - Run only `bkit check` and `bkit doctor` among the bkit commands.
17
+ > - NEVER run a hook, script or tool that writes, commits, pushes or calls a remote write API.
18
+ > - Run hooks, scripts and tools only as syntax checks or in read-only modes.
19
+ > - Re-list every unadopted template on each run, with the previous verdict and its age, because no skip record exists.
18
20
 
19
21
  ## Universal Instructions
20
22
 
21
23
  ### Context & Goals
22
24
 
23
- bkit ships three folders. Path inside a folder = path it lands at in the repo.
25
+ bkit ships three folders. A file's path inside its folder is the path it lands at in the repo.
24
26
 
25
27
  <!-- prettier-ignore -->
26
28
  | Package folder | Install does | Repo gets |
27
29
  | --- | --- | --- |
28
- | `.bkit/core/` | Writes, keeps current; `engine/`, `workflows/`, `prompts/` never written as-is (workflows + prompts render to host agent and command copies) | Whole files, managed blocks, hooks, reference docs in `.bkit/`, audit and plan templates |
29
- | `.bkit/shared/` | Writes, keeps current | bkit blocks and keys inside files you also edit (`docs/*.md`, `.gitignore`, settings, tool-server config) |
30
- | `.bkit/templates/` | Never writes into the repo; raw copy at `.bkit/templates/`, `bkit upgrade` lists changed paths | Nothing until you copy one and own it |
30
+ | `.bkit/core/` | Writes its files and keeps them current. It never writes `engine/`, `workflows/` or `prompts/` as they are: workflows and prompts render to host agent and command copies | Whole files, managed blocks, hooks, reference docs in `.bkit/`, audit and plan templates |
31
+ | `.bkit/shared/` | Writes its files and keeps them current | bkit blocks and keys inside files you also edit (`docs/*.md`, `.gitignore`, settings, tool-server config) |
32
+ | `.bkit/templates/` | Never writes them into the repo. It keeps a raw copy at `.bkit/templates/`, and `bkit upgrade` lists the changed paths | Nothing until you copy one and own it |
31
33
 
32
- `bkit check` proves written files match the package. Nothing proves the rest: a template never copied, a copy whose tool never runs, a written doc holding only bkit's block, a shipped audit never run. Target failure: **a shipped piece that would have caught something sits unused or half-wired, and every check stays green** — e.g. `.husky/pre-push` never copied, tests run only in CI; `.lintstagedrc.json` copied but `pre-commit` never calls lint-staged; `{{NODE_VERSION}}` left raw in `bkit-ci.yml`; `bkit-cloud.yml` waits on a workflow name that no longer exists; `docs/security.md` holds bkit's block and nothing else; `bkit-audit-security` never run; three releases behind with hand edits inside managed blocks.
34
+ `bkit check` proves that the written files match the package. Nothing proves the rest: a template never copied, a copy whose tool never runs, a written doc that holds only bkit's block, or a shipped audit never run. The failure this audit targets is a shipped piece that would have caught something but sits unused or half-wired, while every check stays green. Examples: `.husky/pre-push` was never copied, so tests run only in CI; `.lintstagedrc.json` was copied, but `pre-commit` never calls lint-staged; `{{NODE_VERSION}}` was left raw in `bkit-ci.yml`; `bkit-cloud.yml` waits on a workflow name that no longer exists; `docs/security.md` holds bkit's block and nothing else; `bkit-audit-security` was never run; or the install is three releases behind, with hand edits inside managed blocks.
33
35
 
34
- **Applies when:** `.bkit/version` present. Absent → one `N/A` row with evidence, never "clean".
36
+ **Applies when:** `.bkit/version` is present. **If** it is absent → write one `N/A` row with its evidence, and never report the surface as "clean".
35
37
 
36
- **Cadence:** monthly. Extra pass after `bkit upgrade`, after adopting or dropping a template, and after adding an agent host.
38
+ **Cadence:** Run once a month. Run an extra pass after `bkit upgrade`, after adopting or dropping a template, and after adding an agent host.
37
39
 
38
- **Anchor Standards:** record bkit version and date read.
40
+ **Anchor Standards:** Record the bkit version and the date read.
39
41
 
40
- - bkit, at the installed version: `.bkit/templates.md` (Contract, placeholders, Context-fetch blocks), `.bkit/README.md` § File ownership and § Ongoing CLI, `.bkit/install.md`; release notes since pinned version.
41
- - Config reference of each tool behind an adopted template (e.g. Husky, lint-staged, Vale, Prettier, Renovate, Dependabot, Trivy, GitHub Actions workflow syntax, direnv); record version read.
42
+ - bkit, at the installed version: `.bkit/templates.md` (Contract, placeholders, Context-fetch blocks), `.bkit/README.md` § File ownership and § Ongoing CLI, `.bkit/install.md`, and the release notes since the pinned version.
43
+ - Config reference of each tool behind an adopted template (e.g., Husky, lint-staged, Vale, Prettier, Renovate, Dependabot, Trivy, GitHub Actions workflow syntax, direnv). Record the version read.
42
44
 
43
45
  ### Scope
44
46
 
45
- - Inventory: every file in the package's `core/`, `shared/`, `templates/` vs `.bkit/version` `canonicalHashes` vs the repo's `.bkit/templates/` copy.
46
- - Version: pinned vs installed vs registry latest.
47
- - `bkit check` drift; `bkit doctor` advisories.
48
- - Hosts: agent hosts in use vs bkit hosts installed; host agent, command, and hook copies per host.
49
- - Written files: managed blocks and owned keys untouched; files bkit shares with you carry your part.
50
- - Audit templates: each run within its cadence.
51
- - Templates: each adopted, or not and why; adopted copies filled, reconciled, merged after upgrade, wired, running.
52
- - Context-fetch blocks: one per context with a lane; each matches the lane it names.
47
+ - Inventory every file in the package's `core/`, `shared/` and `templates/` against `.bkit/version` `canonicalHashes` and against the repo's `.bkit/templates/` copy.
48
+ - Compare the pinned, installed and registry-latest versions.
49
+ - Read the `bkit check` drift.
50
+ - Read the `bkit doctor` advisories.
51
+ - Compare the agent hosts in use with the bkit hosts installed.
52
+ - Check the agent, command and hook copies for each host.
53
+ - Check that the managed blocks and owned keys in written files are untouched.
54
+ - Check that each file bkit shares with you carries your part.
55
+ - Check that each audit template was run within its cadence.
56
+ - Record whether each template is adopted, and why when it is not.
57
+ - Check that each adopted copy is filled, reconciled, merged after upgrade, wired and running.
58
+ - Check that there is one context-fetch block per context with a lane, and that each matches the lane it names.
53
59
 
54
60
  ### Out of Scope
55
61
 
56
62
  <!-- prettier-ignore -->
57
63
  | Excluded item | Why | Where it belongs |
58
64
  | --- | --- | --- |
59
- | Agent permissions, hooks firing, tool servers, parity across hosts — bkit-shipped gates included | Agent config sweep | `bkit-audit-agents` |
60
- | Whether a doc's content is true | Documentation sweep | `bkit-audit-documentation` |
61
- | Branch protection, required checks, hosted variables | Config sweep | `bkit-audit-config` |
62
- | CI token permissions, action pinning, secret rotation | Security sweep | `bkit-audit-security` |
63
- | Lint and scanner suppressions inside adopted configs | Slop sweep | `bkit-audit-slop` |
64
- | Whether a sweep here should become a gate | Gate sweep | `bkit-audit-gates` |
65
- | Copying, editing, or merging a template; running `bkit install` / `bkit upgrade` | Audit reports only | Plan from this report |
65
+ | Agent permissions, hooks firing, tool servers, parity across hosts — bkit-shipped gates included | The agent config sweep owns them | `bkit-audit-agents` |
66
+ | Whether a doc's content is true | The documentation sweep owns it | `bkit-audit-documentation` |
67
+ | Branch protection, required checks, hosted variables | The config sweep owns them | `bkit-audit-config` |
68
+ | CI token permissions, action pinning, secret rotation | The security sweep owns them | `bkit-audit-security` |
69
+ | Lint and scanner suppressions inside adopted configs | The slop sweep owns them | `bkit-audit-slop` |
70
+ | Whether a sweep here should become a gate | The gate sweep owns it | `bkit-audit-gates` |
71
+ | Copying, editing or merging a template; running `bkit install` / `bkit upgrade` | The audit only reports | A plan made from this report |
66
72
 
67
73
  ### Pre-Flight / Dependencies
68
74
 
69
75
  #### Core
70
76
 
71
- - [ ] **Permissions:** blocked calls recorded
72
- - [ ] **Checkout:** Steps 2-11 — repo with `.bkit/version`. Fallback: none; absent → `N/A` and STOP.
73
- - [ ] **Package:** Step 2 — installed package root (e.g. `node_modules/@cbartens/bkit/.bkit/`, resolved via the package manager). Fallback: unpack the pinned version (e.g. `npm pack @cbartens/bkit@<pinnedVersion>` into a throwaway dir); else inventory from `.bkit/templates/` + `canonicalHashes` only, `core/` + `shared/` unwritten files `Not Checked`.
74
- - [ ] **bkit CLI:** Steps 4, 5 — `bkit check`, `bkit doctor` (or `pnpm bkit …`). Fallback: hash written files against `canonicalHashes` by hand; advisories `Not Checked`.
75
- - [ ] **Registry:** Step 3 — latest version and release notes (e.g. `npm view @cbartens/bkit version`, release page). Fallback: pinned vs installed only; currency `Not Checked`.
77
+ - [ ] **Permissions:** every blocked call is recorded.
78
+ - [ ] **Checkout:** Steps 2-11 — a repo with `.bkit/version`. Fallback: none. **If** it is absent → write one `N/A` row, then **STOP**.
79
+ - [ ] **Package:** Step 2 — the installed package root (e.g., `node_modules/@cbartens/bkit/.bkit/`, resolved through the package manager). Fallback: unpack the pinned version into a throwaway directory (e.g., `npm pack @cbartens/bkit@<pinnedVersion>`). **If** that fails → inventory from `.bkit/templates/` and `canonicalHashes` only, and mark the unwritten `core/` and `shared/` files `Not Checked`.
80
+ - [ ] **bkit CLI:** Steps 4, 5 — `bkit check` and `bkit doctor` (or `pnpm bkit …`). Fallback: hash the written files against `canonicalHashes` by hand, and mark the advisories `Not Checked`.
81
+ - [ ] **Registry:** Step 3 — the latest version and its release notes (e.g., `npm view @cbartens/bkit version`, the release page). Fallback: compare the pinned and installed versions only, and mark currency `Not Checked`.
76
82
 
77
83
  #### Conditional
78
84
 
79
- - [ ] **CI Host Read:** Repo has CI → Steps 8, 9 — workflow list, job names, recent runs, artifact names (e.g. `gh workflow list`, `gh run list`, `gh run view --json jobs`). Fallback: workflow files only; lane matching `Not Checked`.
80
- - [ ] **Template Tools:** >=1 adopted template → Step 9 — each tool behind one, installed version (e.g. `npx husky --version`, `vale --version`, `npx lint-staged --version`). Fallback: version from lockfile; runs `Not Checked`.
81
- - [ ] **Machine Config:** Audit runs on a developer machine → Step 9 — local git config (e.g. `git config core.hooksPath`), direnv allow state. Fallback: repo-level only; machine wiring `Not Checked`.
85
+ - [ ] **CI Host Read:** **If** the repo has CI → Steps 8, 9 — the workflow list, job names, recent runs and artifact names (e.g., `gh workflow list`, `gh run list`, `gh run view --json jobs`). Fallback: read the workflow files only, and mark lane matching `Not Checked`.
86
+ - [ ] **Template Tools:** **If** at least one template is adopted → Step 9 — the installed version of each tool behind one (e.g., `npx husky --version`, `vale --version`, `npx lint-staged --version`). Fallback: take the version from the lockfile, and mark runs `Not Checked`.
87
+ - [ ] **Machine Config:** **If** the audit runs on a developer machine → Step 9 — the local git config (e.g., `git config core.hooksPath`) and the direnv allow state. Fallback: check the repo level only, and mark machine wiring `Not Checked`.
82
88
 
83
89
  ### 🔒 Gate 1: Prerequisites Check
84
90
 
85
- - [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
86
- - [ ] **Gate 1 — Verified:** All Core items checked. All applicable Conditional items checked.
91
+ - [ ] **Gaps named:** every missing item names its fallback and its `Not Checked` entry.
92
+ - [ ] **Gate 1 — Verified:** every item above, every Core item and every applicable Conditional item is checked.
87
93
 
88
94
  ### Probe Steps
89
95
 
90
- - [ ] **Step 1 — Previous Run:** Carry each `Adoption` verdict forward with its age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
91
- - [ ] **Step 2 — Inventory:** List every file in the package's `core/`, `shared/`, `templates/`. Landing path = path inside the folder; `core/engine/`, `core/workflows/`, `core/prompts/` → no landing (workflows + prompts → Step 5 host copies). Join: package file · landing path present · in `canonicalHashes` · repo `.bkit/templates/` copy matches package `templates/`. Kind per file: whole file / managed block / owned keys / template. Findings: `core/` or `shared/` file with landing path absent; `canonicalHashes` entry the package no longer ships; repo `.bkit/templates/` differing from package. Group a folder into one row only when every file shares one verdict. **Done when:** `Inventory` row per shipped file or uniform folder: folder · landing path · kind · present · recorded.
92
- - [ ] **Step 3 — Version:** `pinnedVersion` vs installed package vs registry latest; pinned != installed = package bumped without `bkit upgrade`. Behind → release count; release-note changes touching this repo; template paths changed since pinned version. **Done when:** `Version` names all three versions and every relevant release-note change.
93
- - [ ] **Step 4 — Check and Doctor:** `bkit check`: exit code, each drift line → cause. `bkit doctor`: each advisory → adopt / reject (why) / not applicable; previous report's reject carried forward, re-raised only when the advisory text changed. **Done when:** `Check and Doctor` row per drift line and advisory.
94
- - [ ] **Step 5 — Hosts:** Agent hosts in use (repo config dirs, team use; newest `bkit-audit-agents` `Hosts` as cross-check, not source) vs bkit hosts installed. Per installed host: one agent copy per `core/prompts/` source, one command copy per `core/workflows/` source, every `core/` hook file present, executable, and wired in that host's settings. Findings: host in use with no bkit install (agents there run without bkit gates); missing or extra copy; hook file present but unwired, or wired but absent. Whether hooks fire and agree across hosts → `bkit-audit-agents`. **Done when:** `Hosts` row per host: in use · installed · agent copies · command copies · hooks wired.
95
- - [ ] **Step 6 — Written Files:** (a) Every `bkit:start` / `bkit:end` block and owned key: untouched (Step 4 drift). Hand edit → move below `bkit:end` / to `Project Instructions`; bkit-shipped defect → upstream bkit fix. (b) Files bkit shares with you (`shared/docs/*.md`, `AGENTS.md`, `CLAUDE.md`, `.agents/*.md`, `.gitignore`, `.gitattributes`, settings, tool-server config): your part present for every block that expects one — a doc holding only bkit's block is unadopted. `.bkit/.env.example` → `.bkit/.env` present, git-ignored, every listed key set (names only). Tracker or tool-server entry bkit wrote → credential env var it names is set. Whether your part is true → `bkit-audit-documentation`. **Done when:** `Written Files` row per shared file: block untouched · your part present · verdict.
96
- - [ ] **Step 7 — Audits:** Per `docs/templates/bkit-audit-*.md`: `**Applies when:**` met yes / no (evidence); `**Cadence:**`; newest report under `docs/audits/` by commit date (never run = due; same rule as `bkit-utility-update-roadmap`). `N/A` report with evidence = run. Findings: applies and never run; overdue past one cadence; `Process Improvements` `Project` edits proposed in a report and absent from that template's `Project Instructions`. **Done when:** `Audits` row per template: applies · cadence · last run · overdue by · verdict.
97
- - [ ] **Step 8 — Adoption:** Per file in package `templates/`, joined to `.bkit/templates.md` § Contract (file missing from Contract → upstream bkit doc fix): adopted (copy at landing path, or at the destination the Contract names) / not adopted. Not adopted → `gap` (fits this stack, nothing else does the job) / `covered` (name the tool that does) / `not applicable` (evidence, e.g. no GitHub Actions, no markdown docs). Two templates for one job (e.g. Renovate and Dependabot) → one adopted, or `bkit.dependencies.updater` recorded. Context-fetch: per context (`ci`, `diff`, `e2e`, `runtime`, `web`) the repo has a lane or provider for → block below `bkit:end` in `.agents/context.md`, or `<!-- context-fetch:none … -->` naming it; provider in use (dependency, config, CI step) with a shipped `templates/context/` file and no block → `gap`. Re-list every row each run; diff vs previous report: newly adopted, newly dropped, unchanged with age. **Done when:** `Adoption` row per template file and per context: adopted · verdict · evidence · age.
98
- - [ ] **Step 9 — Templates:** Per adopted template: (a) Filled: no raw `{{…}}` placeholder; default branch and runner real; no stub sentinel left. (b) Reconciled: `diff .bkit/templates/<path> <path>` → each difference adopt / reject (why); placeholder lines differ by design. (c) Merged: package changed the template after the copy's last change (Step 3, `git log` on `.bkit/templates/<path>`) → merged / rejected (why) / pending. (d) Wired: tool behind it installed, and invoked where the template expects — e.g. hook manager installed by a `prepare` script, hooks executable, `core.hooksPath` set; `pre-commit` calls lint-staged; prose linter styles synced and its config loads them; scanner plugin path resolves; tool-server snippet merged into the host's server config; secrets config names real stores; cloud workflow waits on a workflow `name:` that exists; CI template's job names are the ones the repo requires. (e) Runs: one read-only invocation where one exists (e.g. `sh -n` on a hook, `prettier --check`, `vale` on one doc, `actionlint` on a workflow). (f) Ignored: every repo-wide gate (formatter, prose linter, scanner, linter, type checker) skips `.bkit/templates/`. Context-fetch block → job regex and artifact name match exactly the lane it names (CI Host Read); widened regex catching another lane = finding. **Done when:** `Templates` row per adopted template: (a)-(f) verdict each.
99
- - [ ] **Step 10 — Standards:** Confirm anchor versions; read changes since previous report's version. `Standards Coverage`: one row per Contract row, per context-fetch file, and per tool reference read → checked (name step) / not applicable (why) / finding. Deprecated key or option in an adopted config per its tool reference → finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
100
- - [ ] **Step 11 — Anything Else:** (a) Everything changed since previous report's commit touching bkit-written files, `.bkit/templates/`, adopted copies, `.agents/context.md`, or `package.json` `bkit.*` → one-line verdict each. (b) Bounded ~30 min pass: what a senior engineer adopting bkit flags that no step asks; read what happened since previous run (`bkit upgrade` output, new `docs/failures.jsonl` rows, `.bkit/friction.jsonl`) — what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`.
96
+ - [ ] **Step 1 — Previous Run:** Carry each `Adoption` verdict forward with its age. **Done when:** `Previous Run` holds the closure rate, or the run is marked baseline.
97
+ - [ ] **Step 2 — Inventory:** List every file in the package's `core/`, `shared/` and `templates/`. A file's landing path is its path inside the folder. `core/engine/`, `core/workflows/` and `core/prompts/` have no landing path: workflows and prompts are checked as host copies in Step 5. For each file, join: the package file · landing path present · in `canonicalHashes` · the repo's `.bkit/templates/` copy matches the package's `templates/`. Give each file one kind: whole file / managed block / owned keys / template. Record these as findings: a `core/` or `shared/` file whose landing path is absent; a `canonicalHashes` entry the package no longer ships; and a repo `.bkit/templates/` that differs from the package. Group a folder into one row only when every file in it shares one verdict. **Done when:** `Inventory` holds one row per shipped file or uniform folder: folder · landing path · kind · present · recorded.
98
+ - [ ] **Step 3 — Version:** Compare `pinnedVersion`, the installed package and the registry latest. **If** pinned != installed → the package was bumped without `bkit upgrade`. **If** the repo is behind → record the release count, the release-note changes that touch this repo, and the template paths changed since the pinned version. **Done when:** `Version` names all three versions and every relevant release-note change.
99
+ - [ ] **Step 4 — Check and Doctor:** Run `bkit check`, and record its exit code and the cause of each drift line. Run `bkit doctor`, and mark each advisory adopt, reject (saying why) or not applicable. Carry the previous report's rejects forward, and re-raise one only when the advisory text changed. **Done when:** `Check and Doctor` holds one row per drift line and per advisory.
100
+ - [ ] **Step 5 — Hosts:** Compare the agent hosts in use with the bkit hosts installed. Find the hosts in use from the repo's config directories and from team use. Use the `Hosts` section of the newest `bkit-audit-agents` report as a cross-check, not as the source. For each installed host, check for one agent copy per `core/prompts/` source, one command copy per `core/workflows/` source, and every `core/` hook file present, executable and wired in that host's settings. Record these as findings: a host in use with no bkit install, because agents there run without bkit gates; a missing or extra copy; and a hook file present but unwired, or wired but absent. Whether hooks fire and agree across hosts goes to `bkit-audit-agents`. **Done when:** `Hosts` holds one row per host: in use · installed · agent copies · command copies · hooks wired.
101
+ - [ ] **Step 6 — Written Files:** (a) Check that every `bkit:start` / `bkit:end` block and owned key is untouched (the Step 4 drift). **If** one holds a hand edit → the fix moves the edit below `bkit:end` or to `Project Instructions`. **If** the defect is in what bkit shipped → the fix is upstream in bkit. (b) In each file bkit shares with you (`shared/docs/*.md`, `AGENTS.md`, `CLAUDE.md`, `.agents/*.md`, `.gitignore`, `.gitattributes`, settings, tool-server config), check that your part is present for every block that expects one. A doc that holds only bkit's block is unadopted. **If** `.bkit/.env.example` exists → check that `.bkit/.env` is present and git-ignored, and that every listed key is set (names only). **If** bkit wrote a tracker or tool-server entry → check that the credential env var it names is set. Whether your part is true goes to `bkit-audit-documentation`. **Done when:** `Written Files` holds one row per shared file: block untouched · your part present · verdict.
102
+ - [ ] **Step 7 — Audits:** For each `docs/templates/bkit-audit-*.md`, record whether its `**Applies when:**` is met, yes or no, with evidence; its `**Cadence:**`; and its newest report under `docs/audits/` by commit date. An audit never run is due, by the same rule as `bkit-utility-update-roadmap`. An `N/A` report with evidence counts as a run. Record these as findings: an audit that applies and was never run; an audit overdue by more than one cadence; and `Process Improvements` `Project` edits that a report proposed and that are absent from that template's `Project Instructions`. **Done when:** `Audits` holds one row per template: applies · cadence · last run · overdue by · verdict.
103
+ - [ ] **Step 8 — Adoption:** Join each file in the package's `templates/` to `.bkit/templates.md` § Contract.
104
+ - **If** a file is missing from the Contract → the fix is an upstream bkit doc fix.
105
+ - Mark each file adopted (a copy at its landing path, or at the destination the Contract names) or not adopted.
106
+ - Give each file not adopted one verdict: `gap` (it fits this stack, and nothing else does the job), `covered` (naming the tool that does) or `not applicable` (with evidence, e.g., no GitHub Actions or no markdown docs).
107
+ - **If** two templates do one job (e.g., Renovate and Dependabot) → check that one is adopted, or that `bkit.dependencies.updater` is recorded.
108
+ - For each context (`ci`, `diff`, `e2e`, `runtime`, `web`) that the repo has a lane or provider for, check for a context-fetch block below `bkit:end` in `.agents/context.md`, or a `<!-- context-fetch:none … -->` naming it.
109
+ - **If** a provider is in use (a dependency, config or CI step), a shipped `templates/context/` file exists for it, **and** there is no block → `gap`.
110
+ - Re-list every row on each run, and diff against the previous report: newly adopted, newly dropped, and unchanged with its age.
111
+
112
+ **Done when:** `Adoption` holds one row per template file and per context: adopted · verdict · evidence · age.
113
+
114
+ - [ ] **Step 9 — Templates:** For each adopted template, check:
115
+ - (a) Filled: no raw `{{…}}` placeholder is left, the default branch and runner are real, and no stub sentinel is left.
116
+ - (b) Reconciled: run `diff .bkit/templates/<path> <path>`, and mark each difference adopt or reject (saying why). Placeholder lines differ by design.
117
+ - (c) Merged:
118
+ - **If** the package changed the template after the copy's last change (Step 3, `git log` on `.bkit/templates/<path>`) → mark it merged, rejected (saying why) or pending.
119
+ - (d) Wired: the tool behind it is installed, and invoked where the template expects. For example, the hook manager is installed by a `prepare` script, the hooks are executable and `core.hooksPath` is set; `pre-commit` calls lint-staged; the prose linter's styles are synced and its config loads them; the scanner plugin path resolves; the tool-server snippet is merged into the host's server config; the secrets config names real stores; the cloud workflow waits on a workflow `name:` that exists; and the CI template's job names are the ones the repo requires.
120
+ - (e) Runs: one read-only invocation, where one exists (e.g., `sh -n` on a hook, `prettier --check`, `vale` on one doc, `actionlint` on a workflow).
121
+ - (f) Ignored: every repo-wide gate (formatter, prose linter, scanner, linter, type checker) skips `.bkit/templates/`.
122
+ - For each context-fetch block, check that its job regex and artifact name match exactly the lane it names (CI Host Read). A widened regex that catches another lane is a finding.
123
+
124
+ **Done when:** `Templates` holds one row per adopted template, with a verdict for each of (a)-(f).
125
+
126
+ - [ ] **Step 10 — Standards:** Confirm the current version of each anchor standard, and read what changed since the previous report's version. Give `Standards Coverage` one row per Contract row, one per context-fetch file and one per tool reference read, each marked checked (naming the step), not applicable (saying why) or finding. A key or option in an adopted config that its tool reference deprecates is a finding. Mark each recommended practice the project does not apply as adopt (with a proposed step), reject (saying why) or not applicable. **Done when:** no row is empty.
127
+ - [ ] **Step 11 — Anything Else:** (a) Give a one-line verdict on each change since the previous report's commit that touches bkit-written files, `.bkit/templates/`, adopted copies, `.agents/context.md` or `package.json` `bkit.*`. (b) In a bounded pass of about 30 minutes, note what a senior engineer adopting bkit would flag that no step asks about. Read what happened since the previous run (`bkit upgrade` output, new `docs/failures.jsonl` rows, `.bkit/friction.jsonl`), and ask what no step would catch. **Done when:** `Beyond the Steps` holds both passes, or says `none`. **If** one class of issue is seen on 2 runs → propose a step for it in `Process Improvements`.
101
128
 
102
129
  ### 🔒 Gate 2: Probes Check
103
130
 
104
- - [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
105
- - [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
106
- - [ ] **No secrets:** no token, key, or secret value anywhere in the report.
107
- - [ ] **Repo untouched:** no template copied or edited, no bkit-written file changed, no `bkit install` / `bkit upgrade` run, no writing hook or script run.
108
- - [ ] **Gate 2 — Verified:** Every checkbox above independently verified and checked off.
131
+ - [ ] **Steps complete:** every step is `[x]`, or skipped with evidence that its surface is absent.
132
+ - [ ] **Evidence:** every finding cites evidence someone can check again, and the tool that produced it.
133
+ - [ ] **No secrets:** no token, key, or secret value appears anywhere in the report.
134
+ - [ ] **Repo untouched:** no template was copied or edited, and no bkit-written file changed.
135
+ - [ ] **No install:** no `bkit install` / `bkit upgrade` was run.
136
+ - [ ] **No writing runs:** no hook or script that writes was run.
137
+ - [ ] **Gate 2 — Verified:** every item above holds.
109
138
 
110
139
  ## Findings
111
140
 
112
141
  <!-- prettier-ignore -->
113
142
  | Severity | Use |
114
143
  | --- | --- |
115
- | `CRITICAL` | Secret value in a tracked adopted copy or a tracked `.bkit/.env` (rotation → `bkit-audit-security`) |
116
- | `HIGH` | `bkit check` failing; pinned != installed; host in use with no bkit install; adopted template whose tool is not installed or never invoked; raw placeholder in an executed file (workflow, hook); cloud workflow waiting on a workflow name that does not exist; context-fetch block matching the wrong lane |
117
- | `MEDIUM` | Template `gap`; edits inside a bkit managed block; unaddressed `bkit doctor` advisory; package change to an adopted template unmerged; unreviewed difference from the template; written doc holding only bkit's block; `.bkit/.env` key unset; audit that applies never run or overdue; repo-wide gate scanning `.bkit/templates/`; context with a lane and no block or opt-out; bkit behind with relevant fix |
118
- | `LOW` | bkit behind, no relevant fix; shipped file missing from the Contract; two updaters adopted with one idle; naming drift, no behaviour change |
144
+ | `CRITICAL` | A secret value in a tracked adopted copy or a tracked `.bkit/.env`. Rotation goes to `bkit-audit-security` |
145
+ | `HIGH` | `bkit check` fails. Pinned != installed. A host in use with no bkit install. An adopted template whose tool is not installed or never invoked. A raw placeholder in an executed file (workflow, hook). A cloud workflow waiting on a workflow name that does not exist. A context-fetch block that matches the wrong lane |
146
+ | `MEDIUM` | A template `gap`. Edits inside a bkit managed block. An unaddressed `bkit doctor` advisory. A package change to an adopted template left unmerged. An unreviewed difference from the template. A written doc that holds only bkit's block. A `.bkit/.env` key unset. An audit that applies and was never run, or is overdue. A repo-wide gate that scans `.bkit/templates/`. A context with a lane and no block or opt-out. bkit behind with a relevant fix |
147
+ | `LOW` | bkit behind with no relevant fix. A shipped file missing from the Contract. Two updaters adopted, with one idle. Naming drift with no behaviour change |
119
148
 
120
- Within a severity: missing gates, then unwired copies, then drift.
149
+ Within a severity, list missing gates first, then unwired copies, then drift.
121
150
 
122
151
  <!-- prettier-ignore -->
123
152
  | ID | Severity | Folder | Location | Evidence | Expected |
124
153
  | --- | --- | --- | --- | --- | --- |
125
154
  | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
126
155
 
127
- Empty and clean → one row `None`.
156
+ **If** the run finds nothing → write one row: `None`.
128
157
 
129
158
  ## Report
130
159
 
@@ -197,13 +226,18 @@ PENDING
197
226
 
198
227
  ### 🔒 Gate 3: Report Check
199
228
 
200
- - [ ] **No placeholders:** no `PENDING` left
201
- - [ ] **Summary:** names count per severity, bkit version, hosts, and templates adopted / `gap` / `covered` / `not applicable`.
202
- - [ ] **Series:** `Adoption` diffed against previous report's, or marked baseline.
203
- - [ ] **Writes:** only this report, template `Project Instructions`, and ledger rows changed; throwaway package unpack removed.
204
- - [ ] **Process Improvements:** `Universal` and `Project` filled
205
- - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
206
- - [ ] **Gate 3 — Verified:** Every checkbox above independently verified and checked off.
229
+ - [ ] **No placeholders:** no `PENDING` is left.
230
+ - [ ] **Summary:** `Summary` gives the count per severity.
231
+ - [ ] **bkit version:** `Summary` gives the bkit version.
232
+ - [ ] **Hosts:** `Summary` names the hosts.
233
+ - [ ] **Template counts:** `Summary` gives the count of templates adopted / `gap` / `covered` / `not applicable`.
234
+ - [ ] **Series:** `Adoption` is diffed against the previous report's, or the run is marked baseline.
235
+ - [ ] **Writes:** this run changed only this report, the template's `Project Instructions` and its own `docs/failures.jsonl` rows.
236
+ - [ ] **Throwaways removed:** the throwaway package unpack is removed.
237
+ - [ ] **Process Improvements:** `Universal` and `Project` are both filled.
238
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID is in exactly one `Suggested Issues` row.
239
+ - [ ] **Next Step:** every `Suggested Issues` row has a `Next Step`.
240
+ - [ ] **Gate 3 — Verified:** every item above holds.
207
241
 
208
242
  <!-- bkit:end -->
209
243