@cbartens/bkit 0.0.0-stage → 5.0.1

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 +417 -0
  2. package/.bkit/core/.agents/context.md +95 -0
  3. package/.bkit/core/.agents/docs.md +62 -0
  4. package/.bkit/core/.agents/rules.md +147 -0
  5. package/.bkit/core/.agents/skills.md +43 -0
  6. package/.bkit/core/.bkit/LICENSE.md +151 -0
  7. package/.bkit/core/.bkit/README.md +417 -0
  8. package/.bkit/core/.bkit/cloud.md +493 -0
  9. package/.bkit/core/.bkit/comparison.md +321 -0
  10. package/.bkit/core/.bkit/install.md +401 -0
  11. package/.bkit/core/.bkit/jsonl.md +497 -0
  12. package/.bkit/core/.bkit/prompts.md +474 -0
  13. package/.bkit/core/.bkit/providers.md +598 -0
  14. package/.bkit/core/.bkit/templates.md +470 -0
  15. package/.bkit/core/.bkit/trackers.md +95 -0
  16. package/.bkit/core/.bkit/workflows.md +1550 -0
  17. package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +82 -0
  18. package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +93 -0
  19. package/.bkit/core/.claude/hooks/bkit-preflight.sh +74 -0
  20. package/.bkit/core/.codex/hooks/bkit-gateguard.cjs +115 -0
  21. package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +135 -0
  22. package/.bkit/core/.cursor/hooks/bkit-gateguard.cjs +111 -0
  23. package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +169 -0
  24. package/.bkit/core/.cursor/hooks/bkit-preflight.sh +63 -0
  25. package/.bkit/core/.opencode/plugin/bkit-gateguard.js +225 -0
  26. package/.bkit/core/AGENTS.md +77 -0
  27. package/.bkit/core/LICENSE.md +149 -0
  28. package/.bkit/core/docs/templates/bkit-audit-accessibility.md +272 -0
  29. package/.bkit/core/docs/templates/bkit-audit-adoption.md +223 -0
  30. package/.bkit/core/docs/templates/bkit-audit-agents.md +230 -0
  31. package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +227 -0
  32. package/.bkit/core/docs/templates/bkit-audit-analytics.md +266 -0
  33. package/.bkit/core/docs/templates/bkit-audit-annotations.md +230 -0
  34. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +270 -0
  35. package/.bkit/core/docs/templates/bkit-audit-app-store.md +254 -0
  36. package/.bkit/core/docs/templates/bkit-audit-architecture.md +221 -0
  37. package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +241 -0
  38. package/.bkit/core/docs/templates/bkit-audit-config.md +230 -0
  39. package/.bkit/core/docs/templates/bkit-audit-cost.md +218 -0
  40. package/.bkit/core/docs/templates/bkit-audit-coverage.md +221 -0
  41. package/.bkit/core/docs/templates/bkit-audit-database.md +229 -0
  42. package/.bkit/core/docs/templates/bkit-audit-dead-code.md +251 -0
  43. package/.bkit/core/docs/templates/bkit-audit-deferrals.md +283 -0
  44. package/.bkit/core/docs/templates/bkit-audit-dependencies.md +268 -0
  45. package/.bkit/core/docs/templates/bkit-audit-documentation.md +280 -0
  46. package/.bkit/core/docs/templates/bkit-audit-duplication.md +253 -0
  47. package/.bkit/core/docs/templates/bkit-audit-failures.md +259 -0
  48. package/.bkit/core/docs/templates/bkit-audit-flakes.md +237 -0
  49. package/.bkit/core/docs/templates/bkit-audit-gates.md +250 -0
  50. package/.bkit/core/docs/templates/bkit-audit-issues.md +273 -0
  51. package/.bkit/core/docs/templates/bkit-audit-llm.md +239 -0
  52. package/.bkit/core/docs/templates/bkit-audit-logs.md +266 -0
  53. package/.bkit/core/docs/templates/bkit-audit-models.md +210 -0
  54. package/.bkit/core/docs/templates/bkit-audit-privacy.md +211 -0
  55. package/.bkit/core/docs/templates/bkit-audit-prompts.md +216 -0
  56. package/.bkit/core/docs/templates/bkit-audit-red-team.md +220 -0
  57. package/.bkit/core/docs/templates/bkit-audit-reliability.md +222 -0
  58. package/.bkit/core/docs/templates/bkit-audit-repo.md +224 -0
  59. package/.bkit/core/docs/templates/bkit-audit-security.md +274 -0
  60. package/.bkit/core/docs/templates/bkit-audit-slop.md +200 -0
  61. package/.bkit/core/docs/templates/bkit-audit-testing.md +270 -0
  62. package/.bkit/core/docs/templates/bkit-audit-usability.md +237 -0
  63. package/.bkit/core/docs/templates/bkit-plan.md +476 -0
  64. package/.bkit/core/engine/checks/after/auth.ts +149 -0
  65. package/.bkit/core/engine/checks/after/ci-yml.ts +701 -0
  66. package/.bkit/core/engine/checks/after/github.ts +424 -0
  67. package/.bkit/core/engine/checks/after/index.ts +530 -0
  68. package/.bkit/core/engine/checks/after/managed.ts +217 -0
  69. package/.bkit/core/engine/checks/after/suppression.ts +53 -0
  70. package/.bkit/core/engine/checks/after/tools.ts +427 -0
  71. package/.bkit/core/engine/checks/before/context-fetch.ts +429 -0
  72. package/.bkit/core/engine/checks/before/env.ts +187 -0
  73. package/.bkit/core/engine/checks/before/files.ts +204 -0
  74. package/.bkit/core/engine/checks/before/index.ts +206 -0
  75. package/.bkit/core/engine/checks/before/mcp.ts +127 -0
  76. package/.bkit/core/engine/checks/before/repo.ts +77 -0
  77. package/.bkit/core/engine/checks/before/version.ts +67 -0
  78. package/.bkit/core/engine/checks/status-holes.ts +479 -0
  79. package/.bkit/core/engine/cli.ts +867 -0
  80. package/.bkit/core/engine/commands/analysis.ts +550 -0
  81. package/.bkit/core/engine/commands/ci/ci.ts +483 -0
  82. package/.bkit/core/engine/commands/comply.ts +415 -0
  83. package/.bkit/core/engine/commands/harvest.ts +459 -0
  84. package/.bkit/core/engine/commands/install/check.ts +70 -0
  85. package/.bkit/core/engine/commands/install/doctor.ts +254 -0
  86. package/.bkit/core/engine/commands/install/install.ts +550 -0
  87. package/.bkit/core/engine/commands/install/uninstall.ts +995 -0
  88. package/.bkit/core/engine/commands/install/upgrade.ts +1037 -0
  89. package/.bkit/core/engine/commands/launch.ts +139 -0
  90. package/.bkit/core/engine/commands/lib.ts +495 -0
  91. package/.bkit/core/engine/commands/registry.ts +53 -0
  92. package/.bkit/core/engine/commands/setup/setup.ts +184 -0
  93. package/.bkit/core/engine/commands/telemetry.ts +32 -0
  94. package/.bkit/core/engine/commands/workflow/branches.ts +1514 -0
  95. package/.bkit/core/engine/commands/workflow/context.ts +961 -0
  96. package/.bkit/core/engine/commands/workflow/counters.ts +268 -0
  97. package/.bkit/core/engine/commands/workflow/fids.ts +243 -0
  98. package/.bkit/core/engine/commands/workflow/issues.ts +675 -0
  99. package/.bkit/core/engine/commands/workflow/ledgers.ts +575 -0
  100. package/.bkit/core/engine/commands/workflow/locks.ts +478 -0
  101. package/.bkit/core/engine/commands/workflow/prs.ts +1087 -0
  102. package/.bkit/core/engine/commands/workflow/repo.ts +220 -0
  103. package/.bkit/core/engine/commands/workflow/roadmap.ts +576 -0
  104. package/.bkit/core/engine/commands/workflow/runs.ts +2140 -0
  105. package/.bkit/core/engine/commands/workflow/runtime.ts +300 -0
  106. package/.bkit/core/engine/commands/workflow/skills.ts +118 -0
  107. package/.bkit/core/engine/commands/workflow/status.ts +455 -0
  108. package/.bkit/core/engine/commands/workflow/steps.ts +1300 -0
  109. package/.bkit/core/engine/commands/workflow/tests.ts +161 -0
  110. package/.bkit/core/engine/commands/workflow/workflows.ts +1573 -0
  111. package/.bkit/core/engine/commands/workflow/workstreams.ts +164 -0
  112. package/.bkit/core/engine/commands/workflow/worktrees.ts +534 -0
  113. package/.bkit/core/engine/install/cloud-env.ts +924 -0
  114. package/.bkit/core/engine/install/managed-block.ts +212 -0
  115. package/.bkit/core/engine/install/manifest.ts +448 -0
  116. package/.bkit/core/engine/install/modules/claude.ts +362 -0
  117. package/.bkit/core/engine/install/modules/cloud.ts +173 -0
  118. package/.bkit/core/engine/install/modules/codex.ts +219 -0
  119. package/.bkit/core/engine/install/modules/core.ts +620 -0
  120. package/.bkit/core/engine/install/modules/cursor.ts +231 -0
  121. package/.bkit/core/engine/install/modules/index.ts +242 -0
  122. package/.bkit/core/engine/install/modules/opencode.ts +573 -0
  123. package/.bkit/core/engine/install/payload-links.ts +150 -0
  124. package/.bkit/core/engine/install/placeholders.ts +108 -0
  125. package/.bkit/core/engine/install/template-copies.ts +119 -0
  126. package/.bkit/core/engine/install/version-file.ts +284 -0
  127. package/.bkit/core/engine/install/write.ts +467 -0
  128. package/.bkit/core/engine/ledgers/clamp-log.ts +32 -0
  129. package/.bkit/core/engine/ledgers/status.ts +213 -0
  130. package/.bkit/core/engine/ledgers/telemetry.ts +1143 -0
  131. package/.bkit/core/engine/render/hosts.ts +372 -0
  132. package/.bkit/core/engine/render/models.ts +323 -0
  133. package/.bkit/core/engine/render/parts.ts +38 -0
  134. package/.bkit/core/engine/render/trackers.ts +170 -0
  135. package/.bkit/core/engine/shared/egress.ts +345 -0
  136. package/.bkit/core/engine/shared/json.ts +16 -0
  137. package/.bkit/core/engine/shared/log-prefix.ts +9 -0
  138. package/.bkit/core/engine/shared/package-json.ts +29 -0
  139. package/.bkit/core/engine/shared/package-manager.ts +38 -0
  140. package/.bkit/core/engine/shared/package-roots.ts +163 -0
  141. package/.bkit/core/engine/shared/protected-paths.ts +164 -0
  142. package/.bkit/core/engine/shared/settings.ts +72 -0
  143. package/.bkit/core/engine/shared/timeouts.ts +20 -0
  144. package/.bkit/core/engine/tools/wording.ts +748 -0
  145. package/.bkit/core/hooks/gateguard-edit-payload.js +18 -0
  146. package/.bkit/core/hooks/gateguard-engine.js +193 -0
  147. package/.bkit/core/hooks/guardrails-shell.js +154 -0
  148. package/.bkit/core/hooks/guardrails-tiers.js +68 -0
  149. package/.bkit/core/hooks/preflight-linear.sh +73 -0
  150. package/.bkit/core/prompts/bkit-audit-generate.md +66 -0
  151. package/.bkit/core/prompts/bkit-build-challenge-1.md +79 -0
  152. package/.bkit/core/prompts/bkit-build-challenge-2.md +81 -0
  153. package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +68 -0
  154. package/.bkit/core/prompts/bkit-build-challenge-remediate.md +70 -0
  155. package/.bkit/core/prompts/bkit-build-challenge-tests.md +73 -0
  156. package/.bkit/core/prompts/bkit-build-install-skills.md +67 -0
  157. package/.bkit/core/prompts/bkit-build-plan-current.md +75 -0
  158. package/.bkit/core/prompts/bkit-build-plan-execute.md +72 -0
  159. package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +73 -0
  160. package/.bkit/core/prompts/bkit-build-plan-verify.md +88 -0
  161. package/.bkit/core/prompts/bkit-build-summary.md +93 -0
  162. package/.bkit/core/prompts/bkit-debug-abort-handover.md +90 -0
  163. package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +151 -0
  164. package/.bkit/core/prompts/bkit-debug-failure-remediate.md +78 -0
  165. package/.bkit/core/prompts/bkit-debug-failure-soak.md +73 -0
  166. package/.bkit/core/prompts/bkit-debug-summary.md +95 -0
  167. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +72 -0
  168. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +72 -0
  169. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +75 -0
  170. package/.bkit/core/prompts/bkit-design-generate.md +110 -0
  171. package/.bkit/core/prompts/bkit-design-organise.md +85 -0
  172. package/.bkit/core/prompts/bkit-design-review-1.md +121 -0
  173. package/.bkit/core/prompts/bkit-design-review-2.md +111 -0
  174. package/.bkit/core/prompts/bkit-design-spike.md +97 -0
  175. package/.bkit/core/prompts/bkit-design-summary.md +106 -0
  176. package/.bkit/core/prompts/bkit-design-update.md +66 -0
  177. package/.bkit/core/prompts/bkit-plan-complexity-check.md +66 -0
  178. package/.bkit/core/prompts/bkit-plan-complexity-split.md +87 -0
  179. package/.bkit/core/prompts/bkit-plan-generate.md +74 -0
  180. package/.bkit/core/prompts/bkit-plan-review-1.md +90 -0
  181. package/.bkit/core/prompts/bkit-plan-review-2.md +80 -0
  182. package/.bkit/core/prompts/bkit-plan-review-3.md +92 -0
  183. package/.bkit/core/prompts/bkit-plan-scope-check-1.md +84 -0
  184. package/.bkit/core/prompts/bkit-plan-scope-check-2.md +84 -0
  185. package/.bkit/core/prompts/bkit-plan-summary.md +106 -0
  186. package/.bkit/core/prompts/bkit-plan-update.md +68 -0
  187. package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +90 -0
  188. package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +94 -0
  189. package/.bkit/core/prompts/bkit-ship-summary.md +77 -0
  190. package/.bkit/core/prompts/bkit-ship-update-docs.md +71 -0
  191. package/.bkit/core/prompts/bkit-utility-compress-markdown.md +91 -0
  192. package/.bkit/core/prompts/bkit-utility-update-decisions.md +75 -0
  193. package/.bkit/core/prompts/bkit-utility-update-deferrals.md +76 -0
  194. package/.bkit/core/prompts/bkit-utility-update-documentation.md +61 -0
  195. package/.bkit/core/prompts/bkit-utility-update-failures.md +76 -0
  196. package/.bkit/core/prompts/bkit-utility-update-knowledge.md +75 -0
  197. package/.bkit/core/prompts/bkit-utility-update-roadmap.md +82 -0
  198. package/.bkit/core/workflows/bkit-auto.md +121 -0
  199. package/.bkit/core/workflows/bkit-build.md +802 -0
  200. package/.bkit/core/workflows/bkit-debug.md +649 -0
  201. package/.bkit/core/workflows/bkit-design.md +495 -0
  202. package/.bkit/core/workflows/bkit-plan.md +510 -0
  203. package/.bkit/core/workflows/bkit-ship.md +650 -0
  204. package/.bkit/shared/.bkit/.env.example +86 -0
  205. package/.bkit/shared/.claude/bkit-cloud.md +117 -0
  206. package/.bkit/shared/.claude/settings.json +88 -0
  207. package/.bkit/shared/.codex/hooks.json +26 -0
  208. package/.bkit/shared/.cursor/bkit-cloud.md +84 -0
  209. package/.bkit/shared/.cursor/hooks.json +26 -0
  210. package/.bkit/shared/.cursor/mcp.json +15 -0
  211. package/.bkit/shared/.cursor/rules/bkit-rules.mdc +12 -0
  212. package/.bkit/shared/.gitattributes +37 -0
  213. package/.bkit/shared/.mcp.json +16 -0
  214. package/.bkit/shared/.opencode/opencode.json +62 -0
  215. package/.bkit/shared/CLAUDE.md +11 -0
  216. package/.bkit/shared/LICENSE.md +22 -0
  217. package/.bkit/shared/docs/architecture.md +19 -0
  218. package/.bkit/shared/docs/data-schema.md +19 -0
  219. package/.bkit/shared/docs/deployments.md +433 -0
  220. package/.bkit/shared/docs/design.md +39 -0
  221. package/.bkit/shared/docs/noise.md +19 -0
  222. package/.bkit/shared/docs/observability.md +25 -0
  223. package/.bkit/shared/docs/security.md +42 -0
  224. package/.bkit/shared/docs/setup.md +30 -0
  225. package/.bkit/shared/docs/technology.md +18 -0
  226. package/.bkit/shared/docs/testing.md +413 -0
  227. package/.bkit/shared/gitignore +97 -0
  228. package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +187 -0
  229. package/.bkit/templates/.cursor/Dockerfile +68 -0
  230. package/.bkit/templates/.cursor/environment.json +6 -0
  231. package/.bkit/templates/.cursor/settings.json +11 -0
  232. package/.bkit/templates/.envrc +7 -0
  233. package/.bkit/templates/.github/dependabot.yml +52 -0
  234. package/.bkit/templates/.github/renovate.json5 +224 -0
  235. package/.bkit/templates/.github/workflows/bkit-ci.yml +1062 -0
  236. package/.bkit/templates/.github/workflows/bkit-cloud.yml +564 -0
  237. package/.bkit/templates/.github/workflows/bkit-renovate.yml +102 -0
  238. package/.bkit/templates/.graphifyignore +108 -0
  239. package/.bkit/templates/.husky/pre-commit +16 -0
  240. package/.bkit/templates/.husky/pre-push +91 -0
  241. package/.bkit/templates/.lintstagedrc.json +3 -0
  242. package/.bkit/templates/.prettierignore +41 -0
  243. package/.bkit/templates/.serena/project.yml +243 -0
  244. package/.bkit/templates/.vale/styles/House/Filler.yml +11 -0
  245. package/.bkit/templates/.vale/styles/House/Hedging.yml +12 -0
  246. package/.bkit/templates/.vale/styles/House/LLMSlop.yml +13 -0
  247. package/.bkit/templates/.vale/styles/House/Verbose.yml +12 -0
  248. package/.bkit/templates/.vale.ini +67 -0
  249. package/.bkit/templates/LICENSE.md +22 -0
  250. package/.bkit/templates/context/bkit-cloudrun.md +84 -0
  251. package/.bkit/templates/context/bkit-expo.md +186 -0
  252. package/.bkit/templates/context/bkit-github.md +79 -0
  253. package/.bkit/templates/context/bkit-inngest.md +45 -0
  254. package/.bkit/templates/context/bkit-maestro.md +76 -0
  255. package/.bkit/templates/context/bkit-playwright.md +62 -0
  256. package/.bkit/templates/context/bkit-resend.md +36 -0
  257. package/.bkit/templates/context/bkit-sentry.md +65 -0
  258. package/.bkit/templates/context/bkit-serena.md +33 -0
  259. package/.bkit/templates/context/bkit-stripe.md +36 -0
  260. package/.bkit/templates/context/bkit-supabase.md +59 -0
  261. package/.bkit/templates/context/bkit-tavily.md +49 -0
  262. package/.bkit/templates/context/bkit-vercel.md +64 -0
  263. package/.bkit/templates/docs/capabilities.md +72 -0
  264. package/.bkit/templates/scripts/ci/accepted-divergences.json +21 -0
  265. package/.bkit/templates/scripts/ci/check-accepted-divergences.mjs +152 -0
  266. package/.bkit/templates/scripts/ci/check-accepted-divergences.test.mjs +130 -0
  267. package/.bkit/templates/scripts/ci/lanes/resolve-push-base.mjs +98 -0
  268. package/.bkit/templates/scripts/ci/lanes/resolve-push-base.test.mjs +86 -0
  269. package/.bkit/templates/scripts/graphify/bkit-graph-drift-rules.json +23 -0
  270. package/.bkit/templates/scripts/graphify/bkit-graph-drift.py +208 -0
  271. package/.bkit/templates/scripts/graphify/bkit-graph-eager-rules.json +35 -0
  272. package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +236 -0
  273. package/.bkit/templates/scripts/graphify/bkit-graph-external-rules.json +17 -0
  274. package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +290 -0
  275. package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +19 -0
  276. package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +120 -0
  277. package/.bkit/templates/scripts/graphify/bkit-graph-surface.py +232 -0
  278. package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +36 -0
  279. package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +927 -0
  280. package/.bkit/templates/scripts/graphify/bkit-graphify.sh +351 -0
  281. package/.bkit/templates/scripts/launchd/ai.bkit.launchd.plist +26 -0
  282. package/.bkit/templates/scripts/launchd/bkit-launchd-env.sh +53 -0
  283. package/.bkit/templates/scripts/launchd/launchd.env.example +13 -0
  284. package/.bkit/templates/scripts/prettier/bkit-insert-ignore.mjs +275 -0
  285. package/.bkit/templates/scripts/secrets/bkit-secrets.config.mjs +66 -0
  286. package/.bkit/templates/scripts/secrets/bkit-secrets.mjs +785 -0
  287. package/.bkit/templates/scripts/serena/bkit-serena-mcp.sh +30 -0
  288. package/.bkit/templates/scripts/serena/bkit-serena.mcp.json +9 -0
  289. package/.bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs +286 -0
  290. package/.bkit/templates/slop-scan.config.json +120 -0
  291. package/CHANGELOG.md +1503 -0
  292. package/LICENSE.md +161 -0
  293. package/README.md +184 -2
  294. package/dist/checks/after/auth.js +140 -0
  295. package/dist/checks/after/ci-yml.js +681 -0
  296. package/dist/checks/after/github.js +400 -0
  297. package/dist/checks/after/index.js +431 -0
  298. package/dist/checks/after/managed.js +187 -0
  299. package/dist/checks/after/suppression.js +39 -0
  300. package/dist/checks/after/tools.js +351 -0
  301. package/dist/checks/before/context-fetch.js +426 -0
  302. package/dist/checks/before/env.js +163 -0
  303. package/dist/checks/before/files.js +187 -0
  304. package/dist/checks/before/index.js +162 -0
  305. package/dist/checks/before/mcp.js +111 -0
  306. package/dist/checks/before/repo.js +71 -0
  307. package/dist/checks/before/version.js +60 -0
  308. package/dist/checks/status-holes.js +393 -0
  309. package/dist/cli.js +688 -0
  310. package/dist/commands/analysis.js +325 -0
  311. package/dist/commands/ci/ci.js +438 -0
  312. package/dist/commands/comply.js +310 -0
  313. package/dist/commands/harvest.js +354 -0
  314. package/dist/commands/install/check.js +61 -0
  315. package/dist/commands/install/doctor.js +209 -0
  316. package/dist/commands/install/install.js +475 -0
  317. package/dist/commands/install/uninstall.js +839 -0
  318. package/dist/commands/install/upgrade.js +782 -0
  319. package/dist/commands/launch.js +118 -0
  320. package/dist/commands/lib.js +363 -0
  321. package/dist/commands/registry.js +50 -0
  322. package/dist/commands/setup/setup.js +158 -0
  323. package/dist/commands/telemetry.js +29 -0
  324. package/dist/commands/workflow/branches.js +1265 -0
  325. package/dist/commands/workflow/context.js +846 -0
  326. package/dist/commands/workflow/counters.js +227 -0
  327. package/dist/commands/workflow/fids.js +224 -0
  328. package/dist/commands/workflow/issues.js +585 -0
  329. package/dist/commands/workflow/ledgers.js +472 -0
  330. package/dist/commands/workflow/locks.js +364 -0
  331. package/dist/commands/workflow/prs.js +904 -0
  332. package/dist/commands/workflow/repo.js +199 -0
  333. package/dist/commands/workflow/roadmap.js +495 -0
  334. package/dist/commands/workflow/runs.js +1717 -0
  335. package/dist/commands/workflow/runtime.js +257 -0
  336. package/dist/commands/workflow/skills.js +110 -0
  337. package/dist/commands/workflow/status.js +392 -0
  338. package/dist/commands/workflow/steps.js +1093 -0
  339. package/dist/commands/workflow/tests.js +144 -0
  340. package/dist/commands/workflow/workflows.js +1342 -0
  341. package/dist/commands/workflow/workstreams.js +141 -0
  342. package/dist/commands/workflow/worktrees.js +473 -0
  343. package/dist/install/cloud-env.js +818 -0
  344. package/dist/install/managed-block.js +182 -0
  345. package/dist/install/manifest.js +376 -0
  346. package/dist/install/modules/claude.js +288 -0
  347. package/dist/install/modules/cloud.js +151 -0
  348. package/dist/install/modules/codex.js +193 -0
  349. package/dist/install/modules/core.js +531 -0
  350. package/dist/install/modules/cursor.js +186 -0
  351. package/dist/install/modules/index.js +152 -0
  352. package/dist/install/modules/opencode.js +504 -0
  353. package/dist/install/payload-links.js +119 -0
  354. package/dist/install/placeholders.js +87 -0
  355. package/dist/install/template-copies.js +106 -0
  356. package/dist/install/version-file.js +204 -0
  357. package/dist/install/write.js +342 -0
  358. package/dist/ledgers/clamp-log.js +27 -0
  359. package/dist/ledgers/status.js +156 -0
  360. package/dist/ledgers/telemetry.js +637 -0
  361. package/dist/render/hosts.js +339 -0
  362. package/dist/render/models.js +288 -0
  363. package/dist/render/parts.js +33 -0
  364. package/dist/render/trackers.js +135 -0
  365. package/dist/shared/egress.js +299 -0
  366. package/dist/shared/json.js +16 -0
  367. package/dist/shared/log-prefix.js +7 -0
  368. package/dist/shared/package-json.js +22 -0
  369. package/dist/shared/package-manager.js +32 -0
  370. package/dist/shared/package-roots.js +145 -0
  371. package/dist/shared/protected-paths.js +153 -0
  372. package/dist/shared/settings.js +44 -0
  373. package/dist/shared/timeouts.js +19 -0
  374. package/dist/tools/wording.js +680 -0
  375. package/package.json +101 -4
@@ -0,0 +1,187 @@
1
+ #!/usr/bin/env bash
2
+ # bkit-cloud-bootstrap.sh — Claude Code SessionStart hook
3
+ # Example. Copy into the repo and own it.
4
+ # bkit install does not write this file and does not overwrite a copy.
5
+ #
6
+ # Project install for cloud sessions: runs `pnpm install` and `vale sync` so a
7
+ # fresh Claude Code on the web session has dependencies + vale styles ready.
8
+ #
9
+ # Cloud-only: no-op when CLAUDE_CODE_REMOTE != "true". Local sessions rely on
10
+ # pre-commit / lefthook for the same checks.
11
+ #
12
+ # Companion to the cloud environment setup script — see bkit's `cloud.md` for
13
+ # what installs vale/gh binaries (those live in the cloud env, not the repo).
14
+ #
15
+ # IMPORTANT — SessionStart hooks cannot block the session: non-zero exits are
16
+ # informational only (docs.claude.com/docs/en/hooks.md). Failures are surfaced
17
+ # via stderr.
18
+ #
19
+ # The `bkit baseline install` section below is bkit's starting point; the whole
20
+ # file is yours now — add your own steps anywhere (examples at the bottom).
21
+
22
+ set -euo pipefail
23
+
24
+ # Consume hook payload so the writer doesn't block.
25
+ cat >/dev/null
26
+
27
+ if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
28
+ exit 0
29
+ fi
30
+
31
+ log() { printf '[cloud-bootstrap] %s\n' "$*" >&2; }
32
+
33
+ REPO_ROOT="${CLAUDE_PROJECT_DIR:-$(pwd)}"
34
+ cd "$REPO_ROOT"
35
+
36
+ # --- bkit baseline install --------------------------------------------------
37
+
38
+ # Workspace-trust check + drift alarm.
39
+ #
40
+ # Claude Code applies permissions.allow rows in .claude/settings.json only once the
41
+ # workspace trust dialog has been accepted, and a cloud session never shows that
42
+ # dialog: unset, every allow row is ignored. deny/ask are unaffected.
43
+ #
44
+ # The setup script (cloud.md section 4) records trust at snapshot time, keyed on the
45
+ # repo path it baked in. This re-checks the DISCOVERED git repository root (the key
46
+ # Claude Code uses). Settings resolve before SessionStart, so this cannot change the
47
+ # CURRENT session; on a mismatch it logs how to fix the snapshot.
48
+ if [ "${CLAUDE_CODE_REMOTE:-}" = "true" ] && command -v jq >/dev/null 2>&1; then
49
+ TRUST_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || printf '%s' "$REPO_ROOT")
50
+ TRUST_FILE="${CLAUDE_CONFIG_DIR:-${HOME:-}}/.claude.json"
51
+ TRUSTED=$(jq -r --arg p "$TRUST_ROOT" '.projects[$p].hasTrustDialogAccepted // false' "$TRUST_FILE" 2>/dev/null || printf 'false')
52
+ if [ "$TRUSTED" != "true" ]; then
53
+ log "WORKSPACE NOT TRUSTED at $TRUST_ROOT -- Claude Code is ignoring EVERY permissions.allow row in .claude/settings.json for this session (deny/ask still apply, so destructive-op gating is unaffected). This container clones to a different path than the setup script baked in. Fix: re-paste the setup script from .claude/bkit-cloud.md section 4, which re-stamps the cache-bust line and rebuilds the snapshot."
54
+ fi
55
+ fi
56
+
57
+ if [ -f pnpm-lock.yaml ] && command -v pnpm >/dev/null 2>&1; then
58
+ log "pnpm install --frozen-lockfile"
59
+ pnpm install --frozen-lockfile --prefer-offline || log "pnpm install failed (non-blocking)"
60
+ fi
61
+
62
+ if [ -f .vale.ini ] && command -v vale >/dev/null 2>&1; then
63
+ if [ ! -d .vale/styles/write-good ]; then
64
+ log "vale sync"
65
+ vale sync || log "vale sync failed (non-blocking)"
66
+ fi
67
+ fi
68
+
69
+ # gh probe: "<authenticates> <exit>" — "false 127" when gh is not on PATH. Needs only gh,
70
+ # so the login below runs even when bkit or jq is missing.
71
+ gh_probe() {
72
+ if ! command -v gh >/dev/null 2>&1; then
73
+ printf 'false 127'
74
+ elif gh auth status >/dev/null 2>&1; then
75
+ printf 'true 0'
76
+ else
77
+ printf 'false 1'
78
+ fi
79
+ }
80
+ GH_STATE=$(gh_probe)
81
+
82
+ # Authenticate the gh CLI for the PR / branch / git-push surface (session-scoped).
83
+ # Runs only where the probe fails (e.g. Claude Code on the web); on GitHub Actions
84
+ # runners gh is already authed via GITHUB_TOKEN. BKIT_GH_TOKEN comes from the
85
+ # dashboard env vars (see cloud.md § Environment variables).
86
+ #
87
+ # gh reads GH_TOKEN -> GITHUB_TOKEN with TOP precedence over any stored
88
+ # `gh auth login` credential (gh manual; cli/cli#2922). A working GH_TOKEN /
89
+ # GITHUB_TOKEN is used as-is. Branches on the PROBE, not on presence: a
90
+ # present-but-broken env token gets its own diagnosis.
91
+ #
92
+ # BKIT_GH_TOKEN is the one secret both this hook (gh) and the GitHub MCP server
93
+ # (.mcp.json's Authorization header) read.
94
+ if [ "${GH_STATE#* }" = "127" ]; then
95
+ log "gh-preflight: gh is not on PATH — the GitHub MCP server is the only GitHub lane this session"
96
+ elif [ "${GH_STATE% *}" = "true" ]; then
97
+ log "gh-preflight: gh already authenticates (sanctioned env token or stored credential) — leaving that lane alone"
98
+ elif [ -n "${GH_TOKEN:-}" ] || [ -n "${GITHUB_TOKEN:-}" ]; then
99
+ # Present but NOT authenticating: a placeholder or expired token. It outranks any
100
+ # stored credential, so `--with-token` cannot override it, and a SessionStart hook's
101
+ # `export` does not reach the agent's later Bash processes (cloud env vars are set
102
+ # in the dashboard; see cloud.md). Logs the fault and its fix; the workflow-level
103
+ # Step-1 preflight fails the run closed onto the MCP lane.
104
+ log "gh-preflight: WARNING — GH_TOKEN/GITHUB_TOKEN is set but does NOT authenticate (placeholder or expired). It takes precedence over any stored 'gh auth login' credential, so gh cannot be repaired from this hook. Fix it where it is defined — the cloud environment's Environment variables — by setting a valid token or removing the variable so BKIT_GH_TOKEN can be used instead. Until then gh stays down and workflows fall back to the GitHub MCP lane. See .bkit/cloud.md § Environment variables."
105
+ elif [ -n "${BKIT_GH_TOKEN:-}" ]; then
106
+ log "gh auth login --with-token"
107
+ printf '%s' "$BKIT_GH_TOKEN" | gh auth login --with-token || log "gh auth login failed (non-blocking)"
108
+ fi
109
+
110
+ # gh-preflight: always logs RUNTIME_GITHUBCLI (probed again, after any login).
111
+ # NON-BLOCKING (SessionStart hooks cannot hard-stop the session; see header note).
112
+ # The ENFORCING dual-lane abort lives in each workflow's Step-1 preflight
113
+ # (`bkit runtime detect` / `bkit runtime assert` reading RUNTIME_GITHUBCLI).
114
+ GH_STATE=$(gh_probe)
115
+ RUNTIME_GITHUBCLI=${GH_STATE% *}
116
+ log "gh-preflight: RUNTIME_GITHUBCLI=${RUNTIME_GITHUBCLI}"
117
+
118
+ # Dual-lane signal: gh and the GitHub MCP server are BOTH keyed off the same
119
+ # BKIT_GH_TOKEN (this hook + .mcp.json's Authorization header) — if none of
120
+ # BKIT_GH_TOKEN/GH_TOKEN/GITHUB_TOKEN are set, neither lane can authenticate.
121
+ # Loud, non-blocking (see above); the workflow-level Step-1 preflight is what
122
+ # actually fails the run closed.
123
+ if [ "$RUNTIME_GITHUBCLI" = "false" ] && [ -z "${BKIT_GH_TOKEN:-}" ] && [ -z "${GH_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
124
+ log "DUAL-LANE WARNING: neither gh nor the GitHub MCP server can authenticate — BKIT_GH_TOKEN/GH_TOKEN/GITHUB_TOKEN are all unset. Both lanes read the same credential; the workflow's Step-1 preflight will fail closed. Non-blocking signal only (SessionStart hooks cannot abort the session) — see .bkit/cloud.md § MCP issue-tracker integration."
125
+ fi
126
+
127
+ # Provision context-fetch CLIs the consumer declared in .agents/context.md. Stack-agnostic:
128
+ # bkit runs whatever `context-fetch:provision` recipe each block carries (self-guarded with
129
+ # `command -v <cli> || <install>`), so no stack name is baked into bkit. Runs every session
130
+ # (a no-op once the CLI is present); the web setup script bakes the same recipes into its
131
+ # snapshot, so this is the gh-runner + resumed-session path. `bkit context list-blocks`
132
+ # returns each block's bash body below `bkit:end` as `provision`; bkit (installed by the
133
+ # `pnpm install` above) lists them and jq (installed by the cloud setup script) reads the
134
+ # JSON. See .agents/context.md.
135
+ if [ -f .agents/context.md ]; then
136
+ BKIT="$REPO_ROOT/node_modules/.bin/bkit"
137
+ if [ ! -x "$BKIT" ] || ! command -v jq >/dev/null 2>&1; then
138
+ log "context-fetch provisioning: SKIPPED — bkit (node_modules/.bin/bkit) or jq is missing. Fix: a working 'pnpm install' and the cloud setup script from .claude/bkit-cloud.md."
139
+ else
140
+ PROVISION=$("$BKIT" context list-blocks 2>/dev/null | jq -r '.provision[]' 2>/dev/null || true)
141
+ if [ -n "$PROVISION" ]; then
142
+ log "provisioning context-fetch CLIs from .agents/context.md"
143
+ # pnpm refuses `add -g` unless its global-bin dir is on PATH (corepack pnpm skips
144
+ # `pnpm setup`); export it so `pnpm add -g` provision recipes don't self-skip. Mirrors
145
+ # the web setup script's provision region, which bkit's install engine renders.
146
+ export PNPM_HOME="${PNPM_HOME:-$HOME/.local/share/pnpm}"
147
+ export PATH="$PNPM_HOME:$PNPM_HOME/bin:$PATH"
148
+ printf '%s\n' "$PROVISION" | bash || log "context-fetch CLI provisioning failed (non-blocking)"
149
+ fi
150
+ fi
151
+ fi
152
+
153
+ # --- Per-repo install steps -------------------------------------------------
154
+ # Add your own steps here. Examples:
155
+ #
156
+ # Docker daemon — PREREQUISITE for any containerised local stack below. Cloud
157
+ # sessions ship the docker CLI but no init system, so nothing starts the daemon
158
+ # for you, and image pulls go through the egress proxy: declare the registry
159
+ # hosts in .agents/context.md § Allowed domains or every pull 403s. Needs
160
+ # root / a privileged container; on a plain host this self-skips.
161
+ # if command -v dockerd >/dev/null 2>&1 && ! docker info >/dev/null 2>&1; then
162
+ # log "starting dockerd"
163
+ # nohup dockerd >/tmp/dockerd.log 2>&1 &
164
+ # for _ in $(seq 1 30); do docker info >/dev/null 2>&1 && break; sleep 1; done
165
+ # docker info >/dev/null 2>&1 || log "dockerd did not come up (non-blocking) — see /tmp/dockerd.log"
166
+ # fi
167
+ #
168
+ # Local backend stack (Supabase / Postgres / Redis / etc.):
169
+ # Gates on the DAEMON, not just the CLI: a context-fetch:provision recipe
170
+ # (.agents/context.md § CLI provisioning) can put the CLI on PATH with no container
171
+ # runtime running. No daemon → logs a SKIPPED line.
172
+ # if [ -f supabase/config.toml ] && command -v supabase >/dev/null 2>&1; then
173
+ # if docker info >/dev/null 2>&1; then
174
+ # log "supabase start"
175
+ # supabase start || log "supabase start failed (non-blocking)"
176
+ # else
177
+ # log "supabase start SKIPPED — no docker daemon (see prerequisite above)"
178
+ # fi
179
+ # fi
180
+ #
181
+ # Turbo prebuild for monorepo packages:
182
+ # if [ -f turbo.json ] && command -v pnpm >/dev/null 2>&1; then
183
+ # log "turbo run build --filter='./packages/*'"
184
+ # pnpm turbo run build --filter='./packages/*' || log "turbo prebuild failed (non-blocking)"
185
+ # fi
186
+
187
+ exit 0
@@ -0,0 +1,68 @@
1
+ # Cursor Background Agents Dockerfile.
2
+ # Example. Copy into the repo and own it.
3
+ # bkit install does not write this file and does not overwrite a copy.
4
+ #
5
+ # The `bkit toolchain` section below installs the toolchain bkit's workflows use
6
+ # (vale, gh, jq, python3, corepack-pinned pnpm). Adapt the rest to your stack:
7
+ # - `FROM` base image
8
+ # - Node major (default 20; pin to match `engines.node` / `.nvmrc`)
9
+ # - System deps (curl, ca-certificates baseline; add libpq, ruby, etc.)
10
+ # - Per-repo dev tooling (Playwright, Supabase CLI, AWS CLI, etc.)
11
+
12
+ # Base image digest-pinned — an `ubuntu:26.04` tag is mutable, so pinning the digest keeps builds
13
+ # reproducible and the supply chain fixed. Refresh with `docker pull ubuntu:26.04` (prints `Digest:`),
14
+ # or let Renovate's dockerfile manager bump it. Consumer-owned — repin to your own base as needed.
15
+ FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b
16
+
17
+ # --- Consumer-owned: base system + Node ------------------------------------
18
+ # bkit's toolchain assumes curl, ca-certificates, and Node >=20 are on PATH
19
+ # before the bkit toolchain section runs. Pin Node to match your repo's `engines.node`.
20
+ RUN apt-get update && apt-get install -y --no-install-recommends \
21
+ curl ca-certificates \
22
+ && rm -rf /var/lib/apt/lists/*
23
+ RUN curl -fsSL --retry 3 --retry-all-errors https://deb.nodesource.com/setup_20.x | bash - \
24
+ && apt-get install -y --no-install-recommends nodejs \
25
+ && rm -rf /var/lib/apt/lists/*
26
+
27
+ # --- bkit toolchain (keep as shipped; diff against bkit's template) ---------
28
+ # Aligned with the Claude Code on the web setup script in bkit's `cloud.md`.
29
+ # Updates arrive in `.bkit/templates/.cursor/Dockerfile` on `bkit upgrade`; put repo
30
+ # extensions under Consumer extensions below.
31
+
32
+ # System deps the preflight hook + bkit workflows depend on.
33
+ RUN apt-get update && apt-get install -y --no-install-recommends \
34
+ git jq python3 \
35
+ && rm -rf /var/lib/apt/lists/*
36
+
37
+ # gh CLI — git push, PR ops, CI cache lookup.
38
+ RUN curl -fsSL --retry 3 --retry-all-errors https://cli.github.com/packages/githubcli-archive-keyring.gpg \
39
+ -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
40
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
41
+ > /etc/apt/sources.list.d/github-cli.list \
42
+ && apt-get update && apt-get install -y --no-install-recommends gh \
43
+ && rm -rf /var/lib/apt/lists/*
44
+
45
+ # vale — `pnpm lint:prose`. Version pinned for snapshot reproducibility.
46
+ ARG VALE_VERSION=3.9.1
47
+ RUN cd /tmp \
48
+ && curl -fsSLO --retry 3 --retry-all-errors "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" \
49
+ && tar -xzf "vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -C /usr/local/bin vale \
50
+ && chmod +x /usr/local/bin/vale \
51
+ && rm -f "vale_${VALE_VERSION}_Linux_64-bit.tar.gz"
52
+
53
+ # pnpm — corepack-pinned to match `packageManager` in package.json.
54
+ RUN corepack enable && corepack prepare pnpm@10.34.4 --activate
55
+
56
+ # --- Consumer extensions ---------------------------------------------------
57
+ # Add per-repo install steps here. Uncomment / adapt as needed:
58
+ #
59
+ # Playwright Chromium for E2E (drop if your repo has no Playwright tests):
60
+ # RUN npx playwright install --with-deps chromium
61
+ #
62
+ # Supabase CLI (postgres-backed apps):
63
+ # RUN curl -fsSL https://github.com/supabase/cli/releases/latest/download/supabase_linux_amd64.tar.gz \
64
+ # | tar -xz -C /usr/local/bin supabase
65
+ #
66
+ # Postgres client (psql) for inspect / db: scripts:
67
+ # RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client \
68
+ # && rm -rf /var/lib/apt/lists/*
@@ -0,0 +1,6 @@
1
+ {
2
+ "build": {
3
+ "dockerfile": "Dockerfile"
4
+ },
5
+ "install": "pnpm install --frozen-lockfile && ([ ! -f .vale.ini ] || vale sync)"
6
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extensions": {
3
+ "recommendations": [
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode",
6
+ "bradlc.vscode-tailwindcss"
7
+ ]
8
+ },
9
+ "editor.formatOnSave": true,
10
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
11
+ }
@@ -0,0 +1,7 @@
1
+ # .envrc — direnv config shipped by bkit.
2
+ # Example. Copy into the repo and own it.
3
+ # bkit install does not write this file and does not overwrite a copy.
4
+ #
5
+ # Append more `dotenv_if_exists <path>` lines to expose additional env files
6
+ # (e.g. .env.local, infra/secrets.env). After editing, run `direnv allow`.
7
+ dotenv_if_exists .bkit/.env
@@ -0,0 +1,52 @@
1
+ # Example Dependabot config. Copy it to `.github/dependabot.yml` and own it.
2
+ # bkit install does not write this file and does not overwrite a copy.
3
+ # Use this OR Renovate, not both.
4
+ #
5
+ # GitHub reads .github/dependabot.yml ONLY from the default branch (typically
6
+ # `main`). Merge it through to that branch before Dependabot opens PRs. PRs land
7
+ # on `dev` (per `target-branch:` below).
8
+ #
9
+ # Repo settings (not in this file): enable the dependency graph and Dependabot
10
+ # alerts. If this is your only updater, enable security updates. If you also run
11
+ # Renovate, disable Dependabot version updates and security updates so the two
12
+ # bots do not compete.
13
+ #
14
+ # Reference: https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference
15
+ version: 2
16
+ updates:
17
+ # GitHub Actions — refreshes SHA-pinned `uses:` lines on upstream releases
18
+ # and CVE disclosures (paired with bkit's SHA-pinning rule documented
19
+ # in docs/deployments.md § GitHub Actions pinning).
20
+ - package-ecosystem: github-actions
21
+ directory: /
22
+ target-branch: dev
23
+ schedule:
24
+ interval: weekly
25
+ open-pull-requests-limit: 10
26
+ commit-message:
27
+ prefix: "chore(deps)"
28
+ include: scope
29
+ groups:
30
+ github-actions:
31
+ patterns:
32
+ - "*"
33
+
34
+ # npm — opt-in. Uncomment and tune to your monorepo shape. For pnpm
35
+ # workspaces, `directory: "/"` relies on hoisting; for explicit per-workspace
36
+ # coverage, replace with `directories: ["/", "/packages/*"]` (Dependabot v2.1+).
37
+ # - package-ecosystem: npm
38
+ # directory: /
39
+ # target-branch: dev
40
+ # schedule:
41
+ # interval: weekly
42
+ # open-pull-requests-limit: 10
43
+ # commit-message:
44
+ # prefix: "chore(deps)"
45
+ # prefix-development: "chore(deps-dev)"
46
+ # include: scope
47
+ # groups:
48
+ # types:
49
+ # patterns:
50
+ # - "@types/*"
51
+ # dev-dependencies:
52
+ # dependency-type: development
@@ -0,0 +1,224 @@
1
+ // Example Renovate config. Copy it to `.github/renovate.json5` and own it.
2
+ // bkit install does not write this file and does not overwrite a copy.
3
+ //
4
+ // Reference: https://docs.renovatebot.com/configuration-options/
5
+ //
6
+ // Mend App install is one-click via GitHub UI (https://github.com/apps/renovate).
7
+ // No `gh api` equivalent exists. Land this file on the default branch before
8
+ // installing the App. Self-hosted runner: copy
9
+ // `.bkit/templates/.github/workflows/bkit-renovate.yml` as well, and suspend the
10
+ // Mend App for this repo so both do not open the same PRs.
11
+ {
12
+ $schema: "https://docs.renovatebot.com/renovate-schema.json",
13
+
14
+ // `config:recommended` is Renovate's curated baseline (timezone-aware schedules,
15
+ // dependency dashboard, etc.). Repo-specific rules go in this file.
16
+ // A `local>` preset with no `#` is read from the default branch. `useBaseBranchConfig`
17
+ // does not change that fetch. Append the branch `baseBranchPatterns` names — a branch
18
+ // after `#` works (branch, tag, or commit SHA):
19
+ // "local>owner/repo//path/to/preset.json5#dev"
20
+ // The `extends` line itself is still read from the default branch, so `#dev` needs
21
+ // one merge there before edits on `dev` apply.
22
+ extends: [
23
+ "config:recommended",
24
+ ":dependencyDashboard",
25
+ ],
26
+
27
+ // Renovate opens PRs against `dev`, not the default branch. `main` accepts
28
+ // PRs from `dev` only.
29
+ baseBranchPatterns: ["dev"],
30
+
31
+ // Renovate reads its config from the default branch (`main`). `merge` layers
32
+ // `dev`'s config over `main`'s for dev-targeted runs, so config edits on `dev`
33
+ // apply to them. This option is itself read from `main`, so it needs one merge
34
+ // to `main` before dev-side config edits apply.
35
+ // See docs/deployments.md § Dependency updaters.
36
+ useBaseBranchConfig: "merge",
37
+
38
+ // Weekly batched runs. CVE-driven updates are not held to this schedule
39
+ // (`osvVulnerabilityAlerts` below).
40
+ schedule: ["before 6am on Monday"],
41
+ timezone: "UTC",
42
+
43
+ // CVE alerts → Renovate opens a PR immediately, outside the weekly schedule.
44
+ // These PRs target `dev` (baseBranchPatterns above).
45
+ osvVulnerabilityAlerts: true,
46
+
47
+ // Conventional-commit prefix.
48
+ commitMessagePrefix: "chore(deps):",
49
+
50
+ // ─────────────────────────────────────────────────────────────────────
51
+ // pnpm 11 release-age freshness + Renovate-runner memory ceiling.
52
+ //
53
+ // `env` caps pnpm's worker pool at 1 in Renovate's runner only; CI, Vercel
54
+ // and local installs are untouched. PNPM_WORKERS / PNPM_MAX_WORKERS are on
55
+ // Mend's `global:safeEnv` allow-list, so no admin `allowedEnv` change is needed.
56
+ //
57
+ // `minimumReleaseAge: "1 day"` holds any dependency younger than 24h out of
58
+ // PRs. Security / osvVulnerabilityAlerts PRs are exempt. With this set, set
59
+ // `minimumReleaseAge: 0` in pnpm-workspace.yaml: pnpm 11 defaults the
60
+ // per-install gate to 1440 when the key is absent, and only 0 turns it off.
61
+ // See docs/deployments.md § Renovate pnpm-11 freshness gate & microvm memory.
62
+ // ─────────────────────────────────────────────────────────────────────
63
+ env: {
64
+ PNPM_WORKERS: "1",
65
+ PNPM_MAX_WORKERS: "1",
66
+ },
67
+ minimumReleaseAge: "1 day",
68
+
69
+ // Lockfile maintenance — picks up indirect-dependency updates that a
70
+ // direct-dependency bump alone wouldn't catch. Same weekly slot.
71
+ lockFileMaintenance: {
72
+ enabled: true,
73
+ schedule: ["before 6am on Monday"],
74
+ },
75
+
76
+ // Respect ignore paths from .gitignore + add common monorepo cruft.
77
+ // `.bkit/templates/**` and `.agents/skills/**` are bkit-owned and stay out of
78
+ // the scan. To keep Renovate off a file entirely, list it here:
79
+ // a packageRule `enabled: false` suppresses version bumps, but the github-actions
80
+ // manager still scans the file and applies tag->SHA pinDigests. Workflows you
81
+ // copied from `.bkit/templates/` (bkit-ci.yml, bkit-cloud.yml, bkit-renovate.yml) are yours —
82
+ // leave them out of ignorePaths so their action pins refresh.
83
+ ignorePaths: [
84
+ "**/node_modules/**",
85
+ "**/dist/**",
86
+ "**/build/**",
87
+ ".bkit/templates/**",
88
+ ".agents/skills/**",
89
+ ],
90
+
91
+ // Caps on open and hourly PRs.
92
+ prConcurrentLimit: 10,
93
+ prHourlyLimit: 4,
94
+
95
+ packageRules: [
96
+ // ─────────────────────────────────────────────────────────────────────
97
+ // The bkit package itself — Renovate does not bump it.
98
+ // Upgrade with `pnpm bkit upgrade --latest`, which bumps the pin and
99
+ // re-syncs bkit's files and `.bkit/templates/` in one step.
100
+ // ─────────────────────────────────────────────────────────────────────
101
+ {
102
+ matchPackageNames: ["@cbartens/bkit"],
103
+ enabled: false,
104
+ },
105
+
106
+ // ─────────────────────────────────────────────────────────────────────
107
+ // Every auto-mergeable non-major npm bump lands in ONE PR: the auto-merge
108
+ // rules below share one groupName. Manual-review groups (prod minor,
109
+ // tanstack, vitest, playwright, majors) stay separate.
110
+ // ─────────────────────────────────────────────────────────────────────
111
+ {
112
+ matchManagers: ["npm"],
113
+ matchUpdateTypes: ["minor", "patch"],
114
+ matchDepTypes: ["devDependencies"],
115
+ groupName: "non-major dependencies",
116
+ automerge: true,
117
+ automergeType: "pr",
118
+ platformAutomerge: true,
119
+ },
120
+ {
121
+ matchManagers: ["npm"],
122
+ matchUpdateTypes: ["patch"],
123
+ matchDepTypes: ["dependencies"],
124
+ groupName: "non-major dependencies",
125
+ automerge: true,
126
+ automergeType: "pr",
127
+ platformAutomerge: true,
128
+ },
129
+ {
130
+ matchManagers: ["npm"],
131
+ matchUpdateTypes: ["minor"],
132
+ matchDepTypes: ["dependencies"],
133
+ groupName: "minor dependencies",
134
+ // Minor prod bumps are reviewed manually. `false` is explicit so it
135
+ // overrides any earlier matching automerge rule.
136
+ automerge: false,
137
+ },
138
+
139
+ // Major bumps — always separate, never auto-merged.
140
+ {
141
+ matchUpdateTypes: ["major"],
142
+ automerge: false,
143
+ labels: ["dep-major"],
144
+ },
145
+
146
+ // @types/* and the eslint family fold into the unified non-major
147
+ // auto-merge PR above. Scoped to minor/patch; a major bump falls to the
148
+ // majors rule (own PR, no auto-merge).
149
+ {
150
+ matchPackageNames: ["@types/**"],
151
+ matchUpdateTypes: ["minor", "patch"],
152
+ groupName: "non-major dependencies",
153
+ automerge: true,
154
+ platformAutomerge: true,
155
+ },
156
+ {
157
+ matchPackageNames: ["eslint*", "@eslint/**", "@typescript-eslint/**"],
158
+ matchUpdateTypes: ["minor", "patch"],
159
+ groupName: "non-major dependencies",
160
+ automerge: true,
161
+ platformAutomerge: true,
162
+ },
163
+
164
+ // Multi-package ecosystems. NON-major bumps fold into the unified
165
+ // auto-merge PR above. A MAJOR bump of each ecosystem (e.g.
166
+ // @tanstack/react-query + @tanstack/query-core, or vitest + @vitest/*)
167
+ // lands as one lockstep PR, reviewed, never auto-merged.
168
+ {
169
+ matchPackageNames: ["@tanstack/**"],
170
+ matchUpdateTypes: ["major"],
171
+ groupName: "major tanstack",
172
+ automerge: false,
173
+ },
174
+ {
175
+ matchPackageNames: ["vitest*", "@vitest/**"],
176
+ matchUpdateTypes: ["major"],
177
+ groupName: "major vitest",
178
+ automerge: false,
179
+ },
180
+ {
181
+ matchPackageNames: ["@playwright/**"],
182
+ matchUpdateTypes: ["major"],
183
+ groupName: "major playwright",
184
+ automerge: false,
185
+ },
186
+
187
+ // ─────────────────────────────────────────────────────────────────────
188
+ // GitHub Actions — refreshes SHA-pinned `uses:` lines on upstream releases
189
+ // and CVE disclosures (pairs with bkit's SHA-pinning rule in
190
+ // docs/deployments.md § GitHub Actions pinning).
191
+ // ─────────────────────────────────────────────────────────────────────
192
+ {
193
+ matchManagers: ["github-actions"],
194
+ groupName: "github-actions",
195
+ // Pin to SHA + tag comment; Renovate maintains the tag comment.
196
+ pinDigests: true,
197
+ // Reviewed manually. `false` is explicit, as in the prod-minor rule.
198
+ automerge: false,
199
+ },
200
+
201
+ // ─────────────────────────────────────────────────────────────────────
202
+ // Docker base images — keeps the `FROM <image>:<tag>@sha256:<digest>`
203
+ // pins fresh on upstream releases and CVE disclosures (pairs with bkit's
204
+ // image-digest pinning in docs/deployments.md § GitHub Actions pinning).
205
+ // The tag must stay INLINE (`ubuntu:26.04@sha256:...`), not in a trailing
206
+ // comment, or the dockerfile manager can't map the digest to its tag.
207
+ // Reviewed manually.
208
+ // NOTE: version+checksum-paired installer fetches (e.g. the Vale tarball
209
+ // sha256, the pinned actionlint download-script SHA in bkit-ci.yml) are NOT
210
+ // Renovate-managed — it cannot recompute a tarball checksum — so bump those
211
+ // version+sha pairs by hand. See docs/deployments.md § GitHub Actions pinning.
212
+ // ─────────────────────────────────────────────────────────────────────
213
+ {
214
+ matchManagers: ["dockerfile"],
215
+ groupName: "docker images",
216
+ automerge: false,
217
+ },
218
+ ],
219
+
220
+ // Where to send PRs. `dev` per baseBranchPatterns above.
221
+ // Auto-merge config: Renovate uses GitHub's native auto-merge when
222
+ // `platformAutomerge: true` is set (above), which respects branch
223
+ // protection — required checks must pass before auto-merge fires.
224
+ }