@cbartens/bkit 6.1.1 → 6.2.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 (313) hide show
  1. package/.bkit/README.md +14 -12
  2. package/.bkit/core/.agents/docs.md +1 -11
  3. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-gateguard.cjs +30 -9
  4. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +25 -27
  5. package/.bkit/core/.agents/rules.md +22 -9
  6. package/.bkit/core/.bkit/README.md +13 -11
  7. package/.bkit/core/.bkit/authoring.md +58 -13
  8. package/.bkit/core/.bkit/cli.md +42 -32
  9. package/.bkit/core/.bkit/cloud.md +93 -30
  10. package/.bkit/core/.bkit/install.md +55 -16
  11. package/.bkit/core/.bkit/jsonl.md +24 -7
  12. package/.bkit/core/.bkit/pipeline.md +8 -8
  13. package/.bkit/core/.bkit/prompts.md +160 -43
  14. package/.bkit/core/.bkit/providers.md +97 -36
  15. package/.bkit/core/.bkit/templates.md +162 -34
  16. package/.bkit/core/.bkit/trackers.md +39 -6
  17. package/.bkit/core/.bkit/workflows.md +344 -136
  18. package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +50 -27
  19. package/.bkit/core/.claude/hooks/bkit-preflight.sh +11 -11
  20. package/.bkit/core/.codex/hooks/bkit-gateguard.cjs +13 -8
  21. package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +14 -25
  22. package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +20 -9
  23. package/.bkit/core/.cursor/hooks/bkit-preflight.sh +8 -8
  24. package/.bkit/core/.opencode/plugin/bkit-gateguard.js +14 -4
  25. package/.bkit/core/.opencode/plugin/bkit-guardrails.js +114 -0
  26. package/.bkit/core/docs/templates/bkit-audit-accessibility.md +1 -1
  27. package/.bkit/core/docs/templates/bkit-audit-adoption.md +30 -6
  28. package/.bkit/core/docs/templates/bkit-audit-agents.md +1 -1
  29. package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +1 -1
  30. package/.bkit/core/docs/templates/bkit-audit-analytics.md +1 -1
  31. package/.bkit/core/docs/templates/bkit-audit-annotations.md +1 -1
  32. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +1 -1
  33. package/.bkit/core/docs/templates/bkit-audit-app-store.md +1 -1
  34. package/.bkit/core/docs/templates/bkit-audit-architecture.md +1 -1
  35. package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +2 -2
  36. package/.bkit/core/docs/templates/bkit-audit-config.md +3 -2
  37. package/.bkit/core/docs/templates/bkit-audit-cost.md +1 -1
  38. package/.bkit/core/docs/templates/bkit-audit-coverage.md +1 -1
  39. package/.bkit/core/docs/templates/bkit-audit-database.md +3 -3
  40. package/.bkit/core/docs/templates/bkit-audit-dead-code.md +1 -1
  41. package/.bkit/core/docs/templates/bkit-audit-deferrals.md +1 -1
  42. package/.bkit/core/docs/templates/bkit-audit-dependencies.md +3 -3
  43. package/.bkit/core/docs/templates/bkit-audit-documentation.md +32 -2
  44. package/.bkit/core/docs/templates/bkit-audit-duplication.md +1 -1
  45. package/.bkit/core/docs/templates/bkit-audit-failures.md +1 -1
  46. package/.bkit/core/docs/templates/bkit-audit-flakes.md +2 -2
  47. package/.bkit/core/docs/templates/bkit-audit-gates.md +5 -3
  48. package/.bkit/core/docs/templates/bkit-audit-issues.md +1 -1
  49. package/.bkit/core/docs/templates/bkit-audit-llm.md +2 -2
  50. package/.bkit/core/docs/templates/bkit-audit-logs.md +1 -1
  51. package/.bkit/core/docs/templates/bkit-audit-models.md +2 -2
  52. package/.bkit/core/docs/templates/bkit-audit-privacy.md +1 -1
  53. package/.bkit/core/docs/templates/bkit-audit-prompts.md +1 -1
  54. package/.bkit/core/docs/templates/bkit-audit-red-team.md +2 -2
  55. package/.bkit/core/docs/templates/bkit-audit-reliability.md +3 -2
  56. package/.bkit/core/docs/templates/bkit-audit-repo.md +1 -1
  57. package/.bkit/core/docs/templates/bkit-audit-security.md +1 -1
  58. package/.bkit/core/docs/templates/bkit-audit-slop.md +1 -1
  59. package/.bkit/core/docs/templates/bkit-audit-testing.md +3 -2
  60. package/.bkit/core/docs/templates/bkit-audit-usability.md +1 -1
  61. package/.bkit/core/docs/templates/bkit-plan.md +38 -8
  62. package/.bkit/core/engine/checks/after/auth.ts +118 -47
  63. package/.bkit/core/engine/checks/after/github.ts +89 -37
  64. package/.bkit/core/engine/checks/after/index.ts +15 -3
  65. package/.bkit/core/engine/checks/after/tools.ts +245 -1
  66. package/.bkit/core/engine/checks/before/files.ts +59 -1
  67. package/.bkit/core/engine/checks/before/index.ts +8 -0
  68. package/.bkit/core/engine/checks/status-holes.ts +20 -26
  69. package/.bkit/core/engine/checks/tips/catalogue.ts +107 -10
  70. package/.bkit/core/engine/checks/tips/detect.ts +36 -3
  71. package/.bkit/core/engine/checks/tips/index.ts +1 -1
  72. package/.bkit/core/engine/cli.ts +13 -13
  73. package/.bkit/core/engine/commands/ci/ci.ts +64 -11
  74. package/.bkit/core/engine/commands/ci/push-gate.ts +101 -43
  75. package/.bkit/core/engine/commands/install/install.ts +28 -25
  76. package/.bkit/core/engine/commands/install/uninstall.ts +42 -30
  77. package/.bkit/core/engine/commands/install/upgrade.ts +14 -2
  78. package/.bkit/core/engine/commands/land.ts +2 -3
  79. package/.bkit/core/engine/commands/lib.ts +394 -39
  80. package/.bkit/core/engine/commands/registry.ts +1 -1
  81. package/.bkit/core/engine/commands/workflow/branches.ts +351 -78
  82. package/.bkit/core/engine/commands/workflow/challenge.ts +63 -14
  83. package/.bkit/core/engine/commands/workflow/context.ts +71 -10
  84. package/.bkit/core/engine/commands/workflow/counters.ts +298 -23
  85. package/.bkit/core/engine/commands/workflow/decisions.ts +260 -125
  86. package/.bkit/core/engine/commands/workflow/disk.ts +2 -1
  87. package/.bkit/core/engine/commands/workflow/feature-base.ts +66 -0
  88. package/.bkit/core/engine/commands/workflow/issues.ts +312 -17
  89. package/.bkit/core/engine/commands/workflow/junit.ts +204 -0
  90. package/.bkit/core/engine/commands/workflow/ledgers.ts +904 -99
  91. package/.bkit/core/engine/commands/workflow/locks.ts +186 -29
  92. package/.bkit/core/engine/commands/workflow/loops.ts +87 -0
  93. package/.bkit/core/engine/commands/workflow/open-decision.ts +251 -0
  94. package/.bkit/core/engine/commands/workflow/plan-blocks.ts +8 -0
  95. package/.bkit/core/engine/commands/workflow/plans.ts +1 -1
  96. package/.bkit/core/engine/commands/workflow/prs.ts +311 -16
  97. package/.bkit/core/engine/commands/workflow/repo.ts +1 -1
  98. package/.bkit/core/engine/commands/workflow/run-facts.ts +6 -0
  99. package/.bkit/core/engine/commands/workflow/runs.ts +877 -174
  100. package/.bkit/core/engine/commands/workflow/runtime.ts +12 -4
  101. package/.bkit/core/engine/commands/workflow/status.ts +324 -11
  102. package/.bkit/core/engine/commands/workflow/step-table.ts +41 -15
  103. package/.bkit/core/engine/commands/workflow/steps.ts +604 -29
  104. package/.bkit/core/engine/commands/workflow/summary-findings.ts +1 -1
  105. package/.bkit/core/engine/commands/workflow/summary.ts +314 -8
  106. package/.bkit/core/engine/commands/workflow/tasks.ts +400 -27
  107. package/.bkit/core/engine/commands/workflow/tests-base.ts +319 -0
  108. package/.bkit/core/engine/commands/workflow/tests-changed.ts +138 -74
  109. package/.bkit/core/engine/commands/workflow/tests-jump.ts +93 -0
  110. package/.bkit/core/engine/commands/workflow/tests.ts +815 -182
  111. package/.bkit/core/engine/commands/workflow/tracker.ts +1134 -137
  112. package/.bkit/core/engine/commands/workflow/workflows.ts +100 -72
  113. package/.bkit/core/engine/commands/workflow/worktrees.ts +421 -57
  114. package/.bkit/core/engine/install/cloud-env.ts +38 -10
  115. package/.bkit/core/engine/install/managed-block.ts +105 -0
  116. package/.bkit/core/engine/install/manifest.ts +7 -1
  117. package/.bkit/core/engine/install/modules/claude.ts +6 -2
  118. package/.bkit/core/engine/install/modules/cloud.ts +84 -95
  119. package/.bkit/core/engine/install/modules/codex.ts +10 -2
  120. package/.bkit/core/engine/install/modules/core.ts +148 -14
  121. package/.bkit/core/engine/install/modules/opencode.ts +18 -23
  122. package/.bkit/core/engine/install/network-allowlist.ts +8 -3
  123. package/.bkit/core/engine/install/project-docs.ts +650 -0
  124. package/.bkit/core/engine/install/template-copies.ts +58 -5
  125. package/.bkit/core/engine/install/write.ts +128 -7
  126. package/.bkit/core/engine/ledgers/journal.ts +18 -10
  127. package/.bkit/core/engine/ledgers/migrate.ts +20 -8
  128. package/.bkit/core/engine/ledgers/status.ts +604 -8
  129. package/.bkit/core/engine/ledgers/telemetry.ts +115 -13
  130. package/.bkit/core/engine/render/trackers.ts +3 -1
  131. package/.bkit/core/engine/shared/package-manager.ts +7 -3
  132. package/.bkit/core/engine/shared/settings.ts +12 -1
  133. package/.bkit/core/engine/shared/text.ts +14 -0
  134. package/.bkit/core/engine/tools/instructions-sources.ts +1 -0
  135. package/.bkit/core/engine/tools/instructions.ts +116 -20
  136. package/.bkit/core/hooks/antigravity-hook.js +20 -4
  137. package/.bkit/core/hooks/gateguard-edit-payload.js +8 -5
  138. package/.bkit/core/hooks/gateguard-engine.js +249 -23
  139. package/.bkit/core/hooks/guardrails-deny.js +167 -0
  140. package/.bkit/core/hooks/guardrails-read.js +3 -3
  141. package/.bkit/core/hooks/guardrails-shell.js +1122 -167
  142. package/.bkit/core/hooks/guardrails-tiers.js +247 -176
  143. package/.bkit/core/hooks/preflight-tracker.sh +219 -0
  144. package/.bkit/core/prompts/bkit-audit-generate.md +23 -6
  145. package/.bkit/core/prompts/bkit-build-challenge-1.md +5 -4
  146. package/.bkit/core/prompts/bkit-build-challenge-2.md +6 -5
  147. package/.bkit/core/prompts/bkit-build-install-skills.md +2 -2
  148. package/.bkit/core/prompts/bkit-build-plan-convert.md +21 -7
  149. package/.bkit/core/prompts/bkit-build-plan-current.md +5 -4
  150. package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +22 -17
  151. package/.bkit/core/prompts/bkit-build-plan-tasks.md +16 -12
  152. package/.bkit/core/prompts/bkit-build-plan-tests.md +14 -10
  153. package/.bkit/core/prompts/bkit-build-plan-verify.md +21 -8
  154. package/.bkit/core/prompts/bkit-debug-abort-handover.md +10 -5
  155. package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +22 -6
  156. package/.bkit/core/prompts/bkit-debug-failure-remediate.md +19 -3
  157. package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +22 -6
  158. package/.bkit/core/prompts/bkit-debug-failure-soak.md +10 -7
  159. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +3 -3
  160. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +4 -4
  161. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +3 -3
  162. package/.bkit/core/prompts/bkit-design-generate.md +6 -4
  163. package/.bkit/core/prompts/bkit-design-organise.md +4 -3
  164. package/.bkit/core/prompts/bkit-design-review-1.md +5 -4
  165. package/.bkit/core/prompts/bkit-design-review-2.md +6 -5
  166. package/.bkit/core/prompts/bkit-design-spike.md +4 -3
  167. package/.bkit/core/prompts/bkit-design-update.md +6 -4
  168. package/.bkit/core/prompts/bkit-plan-generate.md +35 -14
  169. package/.bkit/core/prompts/bkit-plan-review-1.md +9 -7
  170. package/.bkit/core/prompts/bkit-plan-review-2.md +9 -7
  171. package/.bkit/core/prompts/bkit-plan-scope-check.md +8 -6
  172. package/.bkit/core/prompts/bkit-plan-update.md +22 -8
  173. package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +11 -8
  174. package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +9 -5
  175. package/.bkit/core/prompts/bkit-ship-update-docs.md +26 -4
  176. package/.bkit/core/prompts/bkit-utility-compress-markdown.md +3 -3
  177. package/.bkit/core/prompts/bkit-utility-update-decisions.md +10 -7
  178. package/.bkit/core/prompts/bkit-utility-update-deferrals.md +8 -5
  179. package/.bkit/core/prompts/bkit-utility-update-documentation.md +31 -7
  180. package/.bkit/core/prompts/bkit-utility-update-failures.md +8 -5
  181. package/.bkit/core/prompts/bkit-utility-update-knowledge.md +10 -7
  182. package/.bkit/core/prompts/bkit-utility-update-roadmap.md +4 -4
  183. package/.bkit/core/prompts/bkit-utility-update-tracker.md +4 -4
  184. package/.bkit/core/workflows/bkit-auto.md +23 -11
  185. package/.bkit/core/workflows/bkit-build.md +331 -100
  186. package/.bkit/core/workflows/bkit-debug.md +135 -64
  187. package/.bkit/core/workflows/bkit-design.md +58 -32
  188. package/.bkit/core/workflows/bkit-plan.md +73 -45
  189. package/.bkit/core/workflows/bkit-ship.md +233 -167
  190. package/.bkit/shared/.agents/plugins/bkit/hooks.json +1 -1
  191. package/.bkit/shared/.bkit/.env.example +5 -0
  192. package/.bkit/shared/.claude/bkit-cloud.md +7 -7
  193. package/.bkit/shared/.claude/settings.json +5 -1
  194. package/.bkit/shared/.cursor/bkit-cloud.md +1 -1
  195. package/.bkit/shared/.cursor/hooks.json +1 -1
  196. package/.bkit/shared/.opencode/opencode.json +11 -2
  197. package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +27 -0
  198. package/.bkit/templates/.cursor/Dockerfile +7 -7
  199. package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +1 -1
  200. package/.bkit/templates/.github/dependabot.yml +5 -0
  201. package/.bkit/templates/.github/renovate.json5 +5 -3
  202. package/.bkit/templates/.github/workflows/bkit-ci.yml +11 -11
  203. package/.bkit/templates/.github/workflows/bkit-cloud.yml +525 -161
  204. package/.bkit/templates/.github/workflows/bkit-renovate.yml +2 -2
  205. package/.bkit/templates/.husky/pre-push +123 -6
  206. package/.bkit/templates/context/bkit-serena.md +1 -1
  207. package/.bkit/templates/docs/architecture.md +98 -0
  208. package/.bkit/templates/docs/capabilities.md +33 -37
  209. package/.bkit/templates/docs/components.md +142 -0
  210. package/.bkit/templates/docs/data-schema.md +87 -0
  211. package/.bkit/{shared → templates}/docs/deployments.md +128 -142
  212. package/.bkit/templates/docs/design.md +117 -0
  213. package/.bkit/templates/docs/noise.md +54 -0
  214. package/.bkit/templates/docs/observability.md +99 -0
  215. package/.bkit/templates/docs/security.md +137 -0
  216. package/.bkit/templates/docs/setup.md +93 -0
  217. package/.bkit/templates/docs/technology.md +70 -0
  218. package/.bkit/{shared → templates}/docs/testing.md +200 -87
  219. package/.bkit/templates/scripts/ci/bkit-machine-lock.sh +511 -103
  220. package/.bkit/templates/scripts/ci/bkit-test-awake.mjs +228 -35
  221. package/.bkit/templates/scripts/ci/bkit-test-awake.test.mjs +270 -2
  222. package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +1 -1
  223. package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +92 -63
  224. package/.bkit/templates/scripts/graphify/bkit-graphify.sh +59 -11
  225. package/.bkit/templates/slop-scan.config.json +2 -0
  226. package/CHANGELOG.md +64 -0
  227. package/DETAILS.md +24 -19
  228. package/README.md +1 -1
  229. package/dist/checks/after/auth.js +114 -46
  230. package/dist/checks/after/github.js +77 -35
  231. package/dist/checks/after/index.js +12 -3
  232. package/dist/checks/after/tools.js +224 -1
  233. package/dist/checks/before/files.js +59 -1
  234. package/dist/checks/before/index.js +7 -1
  235. package/dist/checks/status-holes.js +20 -21
  236. package/dist/checks/tips/catalogue.js +99 -10
  237. package/dist/checks/tips/detect.js +35 -3
  238. package/dist/checks/tips/index.js +1 -1
  239. package/dist/cli.js +13 -13
  240. package/dist/commands/ci/ci.js +56 -12
  241. package/dist/commands/ci/push-gate.js +79 -44
  242. package/dist/commands/install/install.js +23 -22
  243. package/dist/commands/install/uninstall.js +36 -30
  244. package/dist/commands/install/upgrade.js +10 -2
  245. package/dist/commands/land.js +2 -3
  246. package/dist/commands/lib.js +323 -25
  247. package/dist/commands/workflow/branches.js +312 -72
  248. package/dist/commands/workflow/challenge.js +66 -13
  249. package/dist/commands/workflow/context.js +46 -10
  250. package/dist/commands/workflow/counters.js +231 -23
  251. package/dist/commands/workflow/decisions.js +221 -106
  252. package/dist/commands/workflow/disk.js +2 -1
  253. package/dist/commands/workflow/feature-base.js +60 -0
  254. package/dist/commands/workflow/issues.js +243 -15
  255. package/dist/commands/workflow/junit.js +137 -0
  256. package/dist/commands/workflow/ledgers.js +726 -112
  257. package/dist/commands/workflow/locks.js +150 -29
  258. package/dist/commands/workflow/loops.js +67 -0
  259. package/dist/commands/workflow/open-decision.js +199 -0
  260. package/dist/commands/workflow/plan-blocks.js +6 -0
  261. package/dist/commands/workflow/plans.js +1 -1
  262. package/dist/commands/workflow/prs.js +272 -16
  263. package/dist/commands/workflow/repo.js +1 -1
  264. package/dist/commands/workflow/run-facts.js +6 -0
  265. package/dist/commands/workflow/runs.js +747 -155
  266. package/dist/commands/workflow/runtime.js +8 -4
  267. package/dist/commands/workflow/status.js +259 -13
  268. package/dist/commands/workflow/step-table.js +41 -15
  269. package/dist/commands/workflow/steps.js +530 -26
  270. package/dist/commands/workflow/summary-findings.js +1 -1
  271. package/dist/commands/workflow/summary.js +289 -8
  272. package/dist/commands/workflow/tasks.js +294 -27
  273. package/dist/commands/workflow/tests-base.js +266 -0
  274. package/dist/commands/workflow/tests-changed.js +130 -56
  275. package/dist/commands/workflow/tests-jump.js +77 -0
  276. package/dist/commands/workflow/tests.js +608 -131
  277. package/dist/commands/workflow/tracker.js +920 -112
  278. package/dist/commands/workflow/workflows.js +80 -59
  279. package/dist/commands/workflow/worktrees.js +387 -58
  280. package/dist/install/cloud-env.js +32 -10
  281. package/dist/install/managed-block.js +101 -0
  282. package/dist/install/manifest.js +7 -1
  283. package/dist/install/modules/claude.js +6 -2
  284. package/dist/install/modules/cloud.js +73 -86
  285. package/dist/install/modules/codex.js +9 -2
  286. package/dist/install/modules/core.js +133 -14
  287. package/dist/install/modules/opencode.js +18 -23
  288. package/dist/install/network-allowlist.js +8 -3
  289. package/dist/install/project-docs.js +551 -0
  290. package/dist/install/template-copies.js +55 -5
  291. package/dist/install/write.js +117 -5
  292. package/dist/ledgers/journal.js +10 -8
  293. package/dist/ledgers/migrate.js +20 -9
  294. package/dist/ledgers/status.js +461 -8
  295. package/dist/ledgers/telemetry.js +71 -13
  296. package/dist/render/trackers.js +3 -1
  297. package/dist/shared/package-manager.js +7 -2
  298. package/dist/shared/settings.js +8 -0
  299. package/dist/shared/text.js +13 -0
  300. package/dist/tools/instructions-sources.js +1 -0
  301. package/dist/tools/instructions.js +97 -24
  302. package/package.json +22 -15
  303. package/.bkit/core/hooks/preflight-linear.sh +0 -73
  304. package/.bkit/shared/docs/architecture.md +0 -16
  305. package/.bkit/shared/docs/data-schema.md +0 -16
  306. package/.bkit/shared/docs/design.md +0 -38
  307. package/.bkit/shared/docs/noise.md +0 -20
  308. package/.bkit/shared/docs/observability.md +0 -22
  309. package/.bkit/shared/docs/security.md +0 -62
  310. package/.bkit/shared/docs/setup.md +0 -52
  311. package/.bkit/shared/docs/technology.md +0 -15
  312. /package/.bkit/templates/{.lintstagedrc.json → lintstagedrc.example.json} +0 -0
  313. /package/.bkit/templates/{.prettierignore → prettierignore.example} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Reliability Audit
8
8
 
@@ -31,7 +31,8 @@ Failure paths are the least tested. The happy path is tested, while a vendor out
31
31
  - Google SRE Book (online edition): Postmortem Culture.
32
32
  - AWS Well-Architected Framework, Reliability Pillar: REL05 BP01-BP07 (graceful degradation, throttling, retries, fail fast, client timeouts, stateless, emergency levers), REL11 (static stability), REL13 (disaster recovery). Record the publication date read.
33
33
  - Background-job flow-control docs (e.g., Inngest concurrency and `createFunction`, Temporal task queues).
34
- - bkit block of `docs/deployments.md` (bkit version from `.bkit/version`): § Production rollback runbook; § Dev rollback runbook; § Consumer rollback path; § Smoke trigger plumbing; § Applying migrations at deploy time; § Build-vs-migration race; § Promote before the lanes (`bkit-tests-deploy`)
34
+ - bkit block of `docs/deployments.md` (bkit version from `.bkit/version`): § Production rollback runbook; § Dev rollback runbook; § Smoke trigger plumbing; § Applying migrations at deploy time; § Build-vs-migration race; § Promote before the lanes (`bkit-tests-deploy`)
35
+ - `.bkit/workflows.md` § Test and release mechanics (Consumer rollback path)
35
36
 
36
37
  ### Scope
37
38
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Repo Audit
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Security Audit
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Slop Audit
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Testing Audit
8
8
 
@@ -39,7 +39,8 @@ A green suite means the tests passed. It does not mean they could fail, that eve
39
39
  - Test-smell catalogue (e.g., xUnit Test Patterns, Meszaros 2007).
40
40
  - Test lint (e.g., `@vitest/eslint-plugin`, `eslint-plugin-playwright`, `eslint-plugin-testing-library`, or Oxlint's `vitest` + `typescript` plugins); record each version. typescript-eslint type-aware rules need a TypeScript version it supports; newer → Oxlint `--type-aware` (oxlint-tsgolint).
41
41
  - Network mock that fails closed (e.g., MSW); record the major read.
42
- - bkit block of `docs/testing.md` (bkit version from `.bkit/version`): § Validated means executed, not "didn't fail"; § A guard asserts the rule, not the sentence that explains it; § Which tier does a behaviour need?; § Test first; § Tests lock; § Local test sleep prevention; § What each tier must do; § Design assertions are a dimension, not a lane; § Schema-invariant DB checks (e.g. RLS coverage); § Provision backing services fresh; § Optional hardening (adopt when the cost is justified); § Coverage on PRs
42
+ - bkit block of `docs/testing.md` (bkit version from `.bkit/version`): § Validated means executed, not "didn't fail"; § A guard asserts the rule, not the sentence that explains it; § Which tier does a behaviour need?; § What each tier must do; § Test first; § Design assertions are a dimension, not a lane; § Schema-invariant DB checks (e.g. RLS coverage); § Provision backing services fresh; § Optional hardening (adopt when the cost is justified); § Coverage on PRs
43
+ - `.bkit/workflows.md` § Test and release mechanics (Tests lock; Local test sleep prevention); `.bkit/workflows.md` § Test-first
43
44
 
44
45
  ### Scope
45
46
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
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. -->
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. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # Usability Review
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{BKIT_MANAGED_MARKER}}
4
4
 
5
- <!-- Note: @bkit-plan-generate fills this template. The plan lives at `docs/plans/{YYYYMM}/{FID}-plan.md`, the canonical month bucket, where `{YYYYMM}` is the month the first workflow run for `{FID}` created it, set once. Logs sit at `docs/plans/{YYYYMM}/logs/{FID}/`, and may be deleted. The canonical copy is stamped with a `bkit:anchor` block that records the base commit (`baseSha`), its ref (`baseRef`) and the design it targets (`designPath`, `designBaseSha`). NEVER write or edit that block by hand. -->
5
+ <!-- Note: @bkit-plan-generate fills this template. The plan lives at `docs/plans/{YYYYMM}/{FID}-plan.md`, the canonical month bucket, where `{YYYYMM}` is the month the first workflow run for `{FID}` created it, set once. Logs sit at `docs/plans/{YYYYMM}/logs/{FID}/`, and may be deleted. The canonical copy is stamped with a `bkit:anchor` block that records the base commit (`baseSha`), its ref (`baseRef`) and the design it targets (`designPath`, `designBaseSha`). NEVER write or edit that block by hand. When you edit this template, follow `.bkit/authoring.md` § Doc Templates. -->
6
6
 
7
7
  # [Plan Title] Implementation Plan
8
8
 
@@ -75,6 +75,7 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
75
75
  | [e.g., the API endpoint enforces tenant isolation] | Integration | [e.g., `packages/api/[feature].integration.test.ts`] | 2 |
76
76
  | [e.g., the real third-party API returns the expected shape and a boundary-only identity, not just "did not throw"] | @live (golden) | [e.g., `packages/[pkg]/[feature].live.test.ts`] | 2 |
77
77
  | [e.g., the new migration replays from empty and the seed loads] | fresh-DB replay | [e.g., `packages/db/migrations/*`] (replayed by `bkit-tests-migration`) | 1 |
78
+ | [e.g., `setStatus` accepts `archived` and still rejects an unknown status] | Unit | [e.g., `packages/api/src/items/setStatus.test.ts`] | 3 |
78
79
 
79
80
  ### 👤 ✅ Human Confirmation
80
81
 
@@ -102,10 +103,12 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
102
103
  > These are the unknowns and assumptions this plan relies on. An unresolved question is a risk, and a wrong assumption breaks what follows. **If** there are none → write `None`.
103
104
 
104
105
  - **Assumption:** [what the plan takes as given] → [what breaks if it is wrong]
105
- - **Open Question:** [the decision needed] → [who resolves it, and how]
106
- - **Options:** A) [option] — [trade-off] · B) [option] — [trade-off] · C) [option] — [trade-off, optional]
107
- - **Recommended:** A) [option] — [why, in one line]
108
- - **Default if unanswered:** [what the agent proceeds with]
106
+ - **Q{n} — [title]:** [the decision needed, in plain English] → [who resolves it, and how]
107
+ - A) [option] — [trade-off]
108
+ - B) [option] — [trade-off]
109
+ - C) [option] — [trade-off] (optional)
110
+ - Recommended: A) [option] — [why]
111
+ - Default if unanswered: [the plan assumes A | the plan stops at Gate 1 until you answer]
109
112
 
110
113
  ### 👤 ✅ Human Confirmation
111
114
 
@@ -158,7 +161,7 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
158
161
  - [ ] **Existing-Solution Search (reuse over duplicate):** the in-repo, dependency and ecosystem searches are recorded in `Reuse Inventory`.
159
162
  - [ ] **User Context:** access to the files is confirmed, and missing user information is requested.
160
163
  - [ ] **Project Context:** the relevant `docs/knowledge.jsonl` and `docs/decisions.jsonl` rows are read.
161
- - [ ] **Testing & Quality:** the testing strategy matches `docs/testing.md`.
164
+ - [ ] **Project Documents:** `docs/architecture.md`, `docs/technology.md`, `docs/security.md` and `docs/testing.md` are assessed through the `.agents/docs.md` index (a missing or starter-only document is a warning, not a stop), and the plan's strategy matches `docs/testing.md`. Record each source in `Documentation Consultation`.
162
165
  - [ ] **Prerequisite Plans:** [the plans to finish first. **If** none → `None`.]
163
166
 
164
167
  ### Conditional
@@ -167,6 +170,7 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
167
170
  - [ ] **Schema State:** the database state is confirmed against `docs/data-schema.md`.
168
171
  - [ ] **Architecture & UI:** the topology is checked against `docs/architecture.md`, and any UI against `docs/design.md`.
169
172
  - [ ] **Observability:** logs, audit tables and traces follow `docs/observability.md`.
173
+ - [ ] **Deployments & Setup:** release, CI and branch behaviour follows `docs/deployments.md`, and local-setup changes follow `docs/setup.md`.
170
174
  - [ ] **Notifications:** the alert or toast tier follows the notifications doc.
171
175
 
172
176
  ### 🔒 Gate 1: Prerequisites Check
@@ -179,6 +183,21 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
179
183
  - [ ] **Reuse reasons:** every `NEW` row cites its reason.
180
184
  - [ ] **Gate 1 — Verified:** every item above, every Core item and every applicable Conditional item is checked.
181
185
 
186
+ ## Documentation Consultation
187
+
188
+ [Read the `.agents/docs.md` index when it exists, and consult each applicable topic's recommended document or a valid indexed equivalent. Always assess `docs/architecture.md`, `docs/technology.md`, `docs/security.md` and `docs/testing.md`. Consult `docs/data-schema.md` for database changes, `docs/design.md` for UI, `docs/observability.md` for logging, `docs/deployments.md` for release or CI behaviour, and `docs/noise.md` or `docs/setup.md` when relevant. A missing index, a missing or empty document, or a starter-only document is a warning: continue from repository evidence, and never stop the plan. Mark an irrelevant topic not applicable with the reason. Initially set to `PENDING`.]
189
+
190
+ <!-- prettier-ignore -->
191
+ | Topic | Recommended path | Applies | Source used (path and section) | Coverage | Gap and action |
192
+ | --- | --- | --- | --- | --- | --- |
193
+ | [architecture] | `docs/architecture.md` | [yes / no — reason] | [the path and section actually read, or `none`] | [covered / partial / none] | [the gap, the alternative evidence, the action. **If** none → `None`.] |
194
+
195
+ Carry each required read and each doc update into the runbook task that needs it (`READ:` and `UPDATE:` lines).
196
+
197
+ ## Documentation Warnings
198
+
199
+ [One JSON object per line in a fenced `jsonl` block, with the fields `topic`, `gap`, `recommendedPath`, `alternativeEvidence` and `action`, all non-empty (`"None available"` when no alternative evidence exists). Example line: `{"topic": "security", "gap": "starter-only", "recommendedPath": "docs/security.md", "alternativeEvidence": "The CI configuration defines token permissions.", "action": "Populate the security document with the project's credential and permission boundaries."}`. **If** every applicable topic is covered → write `None`. A warning never blocks the plan. Initially set to `PENDING`.]
200
+
182
201
  ## Data Schema Integration
183
202
 
184
203
  [How this feature uses the existing schema, and what changes. Initially set to `PENDING`.]
@@ -307,6 +326,17 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
307
326
 
308
327
  <!-- bkit:task 2 end -->
309
328
 
329
+ <!-- bkit:task 3 start -->
330
+
331
+ - [ ] **TASK 3:** [e.g., Accept the `archived` status]
332
+ - **UPDATE:** `ItemStatus` in `packages/api/src/items/schema.ts`: [e.g., adds `archived`]
333
+ - **DEPENDS ON:** 2
334
+ - **DONE WHEN:** [e.g., `setStatus` stores `archived`, and still rejects an unknown status]
335
+ - **TEST FIRST:**
336
+ - `packages/api/src/items/setStatus.test.ts` `rejects an unknown status` fails on [e.g., `archived` being rejected] — TASK 2's test, taken over because this task changes what it asserts
337
+
338
+ <!-- bkit:task 3 end -->
339
+
310
340
  <!-- bkit:group 1 end -->
311
341
 
312
342
  ### 🔒 Gate 2: Code Implementation Check
@@ -314,8 +344,8 @@ _e.g.,_ **WHEN** a user submits the form with a valid file **→ THEN** it is qu
314
344
  - [ ] **No bolt-on:** every `[NEW]` file traces to a `Reuse Inventory` `NEW` row.
315
345
  - [ ] **Extensions landed:** every `EXTEND` landed in the artifact its row names.
316
346
  - [ ] **No gate weakened:** no gate was weakened.
317
- - [ ] **Red before code:** the tests step recorded every planned test of the group red, or as an `updated` existing test, before its code step ran.
318
- - [ ] **Tests unchanged:** every planned test case matches the lines its red row recorded.
347
+ - [ ] **Red before code:** the tests step recorded every planned test of the group red, or as an `updated` existing test, before its code step ran. A later task that names an earlier task's test takes it over: the build reports the takeover and does not refuse it.
348
+ - [ ] **Tests unchanged:** every planned test case matches the lines its red row recorded, or a code step's `BLOCKED` line names the change for the owner.
319
349
  - [ ] **Unproven tests:** each planned test with no proven red is cleared only by a human-committed `TEST EXCEPTION` field.
320
350
  - [ ] **Gate 2 — Verified:** every box above is checked.
321
351
 
@@ -6,6 +6,8 @@ import * as path from "node:path";
6
6
  import { spawnSync } from "node:child_process";
7
7
  import type { PreflightFinding } from "../before/index.js";
8
8
  import { readJsonFile } from "../../shared/json.js";
9
+ import { readBkitConfig } from "../../shared/settings.js";
10
+ import { OPENCODE_PROVIDER_DEFAULTS } from "../../shared/egress.js";
9
11
 
10
12
  // ---------------------------------------------------------------------------
11
13
  // Token-surface detectors
@@ -137,13 +139,24 @@ export function buildCloudDashboardsAdvisory(cwd: string): PreflightFinding | nu
137
139
 
138
140
  const sections: string[] = [];
139
141
  if (hasRouter) {
140
- sections.push(
142
+ const config = readBkitConfig(cwd);
143
+ const agent = config.cloudAgents === "none" ? "claude" : config.cloudAgents;
144
+ let secret = "BKIT_ANTHROPIC_API_KEY";
145
+ if (agent === "codex") secret = "BKIT_OPENAI_API_KEY";
146
+ else if (agent === "opencode")
147
+ secret = config.opencodeProvider
148
+ ? OPENCODE_PROVIDER_DEFAULTS[config.opencodeProvider].envVar
149
+ : "BKIT_<PROVIDER>_API_KEY";
150
+ let text =
141
151
  "**GitHub Actions** (used by bkit-cloud.yml and your own workflows):\n" +
142
- " gh secret set ANTHROPIC_API_KEY --body='<value>'\n\n" +
143
- " Verify: `gh secret list | grep -E 'ANTHROPIC_API_KEY'`\n\n" +
152
+ ` gh secret set ${secret} --body='<value>'\n\n` +
153
+ ` Verify: \`gh secret list | grep -E '${secret}'\`\n\n`;
154
+ if (agent === "claude")
155
+ text +=
144
156
  " Keyless alternative for bkit-cloud.yml (workload identity federation): leave the secret unset and set the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables (`gh variable set`) from a Claude Console federation rule.\n\n" +
145
- " ANTHROPIC_API_KEY is read from the Anthropic dashboard (https://console.anthropic.com/settings/keys); `.bkit/.env` holds the same value as BKIT_ANTHROPIC_API_KEY. The Claude GitHub App (`/install-github-app`) is also required for `cloud=claude`.",
146
- );
157
+ " BKIT_ANTHROPIC_API_KEY is read from the Anthropic dashboard (https://console.anthropic.com/settings/keys); `.bkit/.env` holds the same value. The Claude GitHub App (`/install-github-app`) is also required for `cloud=claude`.";
158
+ else text += ` \`.bkit/.env\` holds the same value as ${secret}.`;
159
+ sections.push(text);
147
160
  }
148
161
  for (const [, text] of present) sections.push(text);
149
162
  return {
@@ -162,66 +175,124 @@ export function buildCloudDashboardsAdvisory(cwd: string): PreflightFinding | nu
162
175
  /** Repo variables that, both set, switch bkit-cloud.yml's claude job to workload identity federation. */
163
176
  const FEDERATION_VARIABLES = ["ANTHROPIC_FEDERATION_RULE_ID", "ANTHROPIC_ORGANIZATION_ID"];
164
177
 
178
+ const LEGACY_ANTHROPIC = "ANTHROPIC_API_KEY";
179
+ const BKIT_ANTHROPIC = "BKIT_ANTHROPIC_API_KEY";
180
+
165
181
  /**
166
- * Detect whether `bkit-cloud.yml`'s claude job has a credential. Only fires when
167
- * `.github/workflows/bkit-cloud.yml` exists. The claude job (claude-code-action) takes the
168
- * `ANTHROPIC_API_KEY` repo secret OR workload identity federation (both
169
- * `FEDERATION_VARIABLES` repo variables). The workflow is GitHub-tracker only — no
170
- * `BKIT_LINEAR_API_KEY` dependency. Silent when gh cannot list secrets; when only the
171
- * variables are unlistable, a missing key still raises the missing-credential finding.
182
+ * Secret findings for the adopted `bkit-cloud.yml`, per recorded variant and tracker.
183
+ * Only fires when `.github/workflows/bkit-cloud.yml` exists. Every finding is keyed on the
184
+ * secret names the adopted copy reads (`secrets.BKIT_` sniff): a legacy copy keeps its
185
+ * legacy names and gets no rename finding; a current copy gets `BKIT_` names plus
186
+ * `cloud-router-secret-renamed` when only the legacy twin is set. Claude: the key secret or
187
+ * workload identity federation (both `FEDERATION_VARIABLES` repo variables). Codex:
188
+ * `BKIT_OPENAI_API_KEY`. Linear / Jira: the tracker key (current copies only). Silent when
189
+ * gh cannot list secrets; when only the variables are unlistable, a missing key still
190
+ * raises the missing-credential finding.
172
191
  */
173
192
  export function detectCiRouterSecrets(cwd: string): PreflightFinding[] {
174
193
  const routerPath = path.join(cwd, ".github", "workflows", "bkit-cloud.yml");
175
194
  if (!fs.existsSync(routerPath)) return [];
176
- const key = detectGhSecret("ANTHROPIC_API_KEY");
177
- if (key === "unknown") return [];
178
- const variables = listGhNames("variable");
179
- const federated = variables !== null && FEDERATION_VARIABLES.every((v) => variables.includes(v));
195
+ const names = listGhNames("secret");
196
+ if (names === null) return [];
197
+ const content = fs.readFileSync(routerPath, "utf-8");
198
+ const legacy = !content.includes("secrets.BKIT_");
199
+ const config = readBkitConfig(cwd);
200
+ const agent = config.cloudAgents === "none" ? "claude" : config.cloudAgents;
201
+ const findings: PreflightFinding[] = [];
202
+
203
+ if (!legacy && (config.issueTracker === "linear" || config.issueTracker === "jira")) {
204
+ const tk = config.issueTracker === "linear" ? "BKIT_LINEAR_API_KEY" : "BKIT_JIRA_API_KEY";
205
+ if (!names.includes(tk))
206
+ findings.push({
207
+ id: "cloud-router-tracker-secret-missing",
208
+ severity: "advisory",
209
+ detect: `The \`${tk}\` repo secret is not set. The router reads the \`bkit:auto\` label from ${config.issueTracker} with it; without it the router starts no agent.`,
210
+ action: `\`gh secret set ${tk} --body='<paste-value-here>'\`, then verify with \`gh secret list\`.`,
211
+ });
212
+ }
180
213
 
181
- if (key === "present" && federated) {
182
- return [
183
- {
184
- id: "anthropic-api-key-shadows-federation",
214
+ if (agent === "codex") {
215
+ if (!legacy && !names.includes("BKIT_OPENAI_API_KEY"))
216
+ findings.push({
217
+ id: "codex-api-key-secret-missing",
185
218
  severity: "advisory",
186
219
  detect:
187
- "The `ANTHROPIC_API_KEY` repo secret and the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables are all set. claude-code-action uses the key and skips workload identity federation.",
220
+ "`bkit.cloud.agent` is `codex` but the `BKIT_OPENAI_API_KEY` repo secret is not set; the codex job exits no-op.",
188
221
  action:
189
- "To run keyless, delete the secret: `gh secret delete ANTHROPIC_API_KEY`. To stay on the key, delete the variables: `gh variable delete ANTHROPIC_FEDERATION_RULE_ID` and `gh variable delete ANTHROPIC_ORGANIZATION_ID`.",
190
- },
191
- ];
222
+ "`gh secret set BKIT_OPENAI_API_KEY --body='<paste-value-here>'`, then verify with `gh secret list`.",
223
+ });
224
+ return findings;
192
225
  }
193
- if (key === "present") return [];
226
+
227
+ if (agent === "opencode") {
228
+ const envVar = config.opencodeProvider
229
+ ? OPENCODE_PROVIDER_DEFAULTS[config.opencodeProvider].envVar
230
+ : null;
231
+ if (!legacy && envVar && names.includes("OPENCODE_PROVIDER_KEY") && !names.includes(envVar))
232
+ findings.push({
233
+ id: "cloud-router-secret-renamed",
234
+ severity: "advisory",
235
+ detect: `The legacy \`OPENCODE_PROVIDER_KEY\` repo secret is set but \`${envVar}\`, the name the router now reads, is not.`,
236
+ action: `\`gh secret set ${envVar} --body='<same-value>'\`, then \`gh secret delete OPENCODE_PROVIDER_KEY\`.`,
237
+ });
238
+ return findings;
239
+ }
240
+
241
+ if (agent !== "claude") return findings;
242
+
243
+ const keyName = legacy ? LEGACY_ANTHROPIC : BKIT_ANTHROPIC;
244
+ if (!legacy && names.includes(LEGACY_ANTHROPIC) && !names.includes(BKIT_ANTHROPIC)) {
245
+ findings.push({
246
+ id: "cloud-router-secret-renamed",
247
+ severity: "advisory",
248
+ detect: `The legacy \`${LEGACY_ANTHROPIC}\` repo secret is set but \`${BKIT_ANTHROPIC}\`, the name the router now reads, is not.`,
249
+ action: `\`gh secret set ${BKIT_ANTHROPIC} --body='<same-value>'\`, then \`gh secret delete ${LEGACY_ANTHROPIC}\`.`,
250
+ });
251
+ return findings;
252
+ }
253
+ const keyPresent = names.includes(keyName);
254
+ const variables = listGhNames("variable");
255
+ const federated = variables !== null && FEDERATION_VARIABLES.every((v) => variables.includes(v));
256
+
257
+ if (keyPresent && federated) {
258
+ findings.push({
259
+ id: "anthropic-api-key-shadows-federation",
260
+ severity: "advisory",
261
+ detect: `The \`${keyName}\` repo secret and the \`ANTHROPIC_FEDERATION_RULE_ID\` + \`ANTHROPIC_ORGANIZATION_ID\` repo variables are all set. claude-code-action uses the key and skips workload identity federation.`,
262
+ action: `To run keyless, delete the secret: \`gh secret delete ${keyName}\`. To stay on the key, delete the variables: \`gh variable delete ANTHROPIC_FEDERATION_RULE_ID\` and \`gh variable delete ANTHROPIC_ORGANIZATION_ID\`.`,
263
+ });
264
+ return findings;
265
+ }
266
+ if (keyPresent) return findings;
194
267
 
195
268
  if (federated) {
196
- if (fs.readFileSync(routerPath, "utf-8").includes("anthropic_federation_rule_id:")) return [];
197
- return [
198
- {
269
+ if (!content.includes("anthropic_federation_rule_id:"))
270
+ findings.push({
199
271
  id: "anthropic-federation-template-stale",
200
272
  severity: "advisory",
201
273
  detect:
202
274
  "The `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables are set, but `.github/workflows/bkit-cloud.yml` does not pass `anthropic_federation_rule_id` to claude-code-action — the claude job exits no-op.",
203
275
  action:
204
276
  "Re-copy the template: `cp .bkit/templates/.github/workflows/bkit-cloud.yml .github/workflows/bkit-cloud.yml`, then re-apply your own edits (the `runs-on` runner at minimum).",
205
- },
206
- ];
277
+ });
278
+ return findings;
207
279
  }
208
280
 
209
- return [
210
- {
211
- id: "anthropic-api-key-secret-missing",
212
- severity: "advisory",
213
- detect:
214
- variables === null
215
- ? "gh confirms the `ANTHROPIC_API_KEY` repo secret is not set on this GitHub repo, and could not list repo variables to check for the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` federation variables."
216
- : "gh confirms neither the `ANTHROPIC_API_KEY` repo secret nor both `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables are set on this GitHub repo.",
217
- action:
218
- "`.github/workflows/bkit-cloud.yml`'s claude job needs one claude credential; without it, the job exits no-op. Set ONE of:\n\n" +
219
- "- API key:\n\n gh secret set ANTHROPIC_API_KEY --body='<paste-value-here>'\n\n" +
220
- "- Workload identity federation (keyless): Claude Console → Settings → Workload identity → Connect workload → GitHub Actions creates the issuer, service account and federation rule. Then:\n\n" +
221
- " gh variable set ANTHROPIC_FEDERATION_RULE_ID --body='fdrl_...'\n" +
222
- " gh variable set ANTHROPIC_ORGANIZATION_ID --body='<organization-uuid>'\n\n" +
223
- " Optional: `ANTHROPIC_SERVICE_ACCOUNT_ID` (`svac_...`) and `ANTHROPIC_WORKSPACE_ID` (`wrkspc_...`, needed when the rule covers more than one workspace).\n\n" +
224
- "Then verify: `gh secret list` / `gh variable list`. The workflow itself does not need redeploying — both are read at run time.",
225
- },
226
- ];
281
+ findings.push({
282
+ id: "anthropic-api-key-secret-missing",
283
+ severity: "advisory",
284
+ detect:
285
+ variables === null
286
+ ? `gh confirms the \`${keyName}\` repo secret is not set on this GitHub repo, and could not list repo variables to check for the \`ANTHROPIC_FEDERATION_RULE_ID\` + \`ANTHROPIC_ORGANIZATION_ID\` federation variables.`
287
+ : `gh confirms neither the \`${keyName}\` repo secret nor both \`ANTHROPIC_FEDERATION_RULE_ID\` + \`ANTHROPIC_ORGANIZATION_ID\` repo variables are set on this GitHub repo.`,
288
+ action:
289
+ "`.github/workflows/bkit-cloud.yml`'s claude job needs one claude credential; without it, the job exits no-op. Set ONE of:\n\n" +
290
+ `- API key:\n\n gh secret set ${keyName} --body='<paste-value-here>'\n\n` +
291
+ "- Workload identity federation (keyless): Claude Console → Settings → Workload identity → Connect workload → GitHub Actions creates the issuer, service account and federation rule. Then:\n\n" +
292
+ " gh variable set ANTHROPIC_FEDERATION_RULE_ID --body='fdrl_...'\n" +
293
+ " gh variable set ANTHROPIC_ORGANIZATION_ID --body='<organization-uuid>'\n\n" +
294
+ " Optional: `ANTHROPIC_SERVICE_ACCOUNT_ID` (`svac_...`) and `ANTHROPIC_WORKSPACE_ID` (`wrkspc_...`, needed when the rule covers more than one workspace).\n\n" +
295
+ "Then verify: `gh secret list` / `gh variable list`. The workflow itself does not need redeploying — both are read at run time.",
296
+ });
297
+ return findings;
227
298
  }
@@ -6,6 +6,7 @@ import * as fs from "node:fs";
6
6
  import * as path from "node:path";
7
7
  import { execFileSync } from "node:child_process";
8
8
  import type { PreflightFinding } from "../before/index.js";
9
+ import { ISSUE_TRACKERS } from "../../install/manifest.js";
9
10
  import { MCP_TOOLSETS_HEADER, parseToolsets } from "../../install/write.js";
10
11
  import { parseJson, readJsonFile } from "../../shared/json.js";
11
12
  import { readBkitConfig } from "../../shared/settings.js";
@@ -72,6 +73,7 @@ export function detectActionsWritePermissions(): TokenPresence {
72
73
  * - `github` → GitHub tracker: the GitHub MCP server authenticates with `BKIT_GH_TOKEN`; `gh` uses `gh auth login`.
73
74
  * - `linear` → existing Linear setup message (BKIT_LINEAR_API_KEY + LINEAR_ISSUE_ID).
74
75
  * - `jira` → admin switch, BKIT_JIRA_API_KEY and `bkit.tracker.jira` in package.json.
76
+ * - unknown → blocker naming the value and the valid names (the tracker guard fails on it too).
75
77
  * - `none` → prompt to run `bkit install --tracker=github`, `--tracker=linear` or `--tracker=jira`.
76
78
  *
77
79
  * Only fires when bkit workflows are installed (.claude/ or .cursor/ present).
@@ -81,7 +83,16 @@ export function buildTrackerSetupAdvisory(cwd: string): PreflightFinding | null
81
83
  const hasCursor = fs.existsSync(path.join(cwd, ".cursor"));
82
84
  if (!hasClaude && !hasCursor) return null;
83
85
 
84
- const { issueTracker: tracker, issueTrackerExplicit } = readBkitConfig(cwd);
86
+ const { issueTracker: tracker, issueTrackerExplicit, issueTrackerUnknown } = readBkitConfig(cwd);
87
+
88
+ if (issueTrackerUnknown !== null) {
89
+ return {
90
+ id: "tracker-setup-unknown",
91
+ severity: "blocker",
92
+ detect: `\`bkit.tracker.default\` in package.json is "${issueTrackerUnknown}", which names no tracker bkit knows. bkit reads it as \`none\`, and the session-start tracker guard fails in every session it checks.`,
93
+ action: `Set \`bkit.tracker.default\` to one of: ${ISSUE_TRACKERS.join(", ")} (lowercase), or run \`bkit install --tracker=<name>\`.`,
94
+ };
95
+ }
85
96
 
86
97
  if (tracker === "github") {
87
98
  return {
@@ -376,60 +387,101 @@ export function buildGithubProjectTokenScopeAdvisory(cwd: string): PreflightFind
376
387
  /**
377
388
  * Emit a cloud-agents setup advisory (parity with the tracker / dep-updater
378
389
  * advisories). Post-CI auto-routing (`bkit-cloud.yml`) is opt-in via
379
- * `bkit install --auto=claude`; it does NOT ship with a default install. This nudges
380
- * consumers to make the choice post-install.
390
+ * `bkit install --auto=<claude|opencode|codex|cursor>`; it does NOT ship with a default
391
+ * install. This nudges consumers to make the choice post-install.
381
392
  *
382
- * Also performs the cloud=claude config-consistency assertion: when
383
- * `bkit.cloud.agent === "claude"` but the installed `bkit-cloud.yml` lacks
384
- * `id-token: write`, it surfaces a consistency warning (exit-1 signal surfaced via
385
- * the `blocker` severity in the checks/before/index.ts caller).
393
+ * Resolution order (file presence is authoritative, package.json field is the opt-out):
394
+ * - router present, claude without `id-token: write` → `cloud-claude-missing-id-token` (blocker)
395
+ * - router present, linear / jira, copy says it serves GitHub only → `cloud-router-tracker-stale`
396
+ * - router present, `cloud.agent` codex, no `openai/codex-action` → `cloud-router-codex-missing`
397
+ * - router present, `cloud.agent` absent → `cloud-router-agent-unset`
398
+ * - router present, `cloud.agent` none / cursor → `cloud-router` (router starts nothing)
399
+ * - router present otherwise → `cloud-router` (informational)
400
+ * - `bkit.cloud.agent === "none"` (explicit) → null (opt-out — stay quiet)
401
+ * - otherwise (undecided) → `cloud-router-none` (nudge)
386
402
  *
387
- * Resolution order (file presence is authoritative, package.json field is the
388
- * opt-out):
389
- * - `.github/workflows/bkit-cloud.yml` present → `cloud-router` (informational; active)
390
- * - `bkit.cloud.agent === "none"` → null (opt-out — stay quiet)
391
- * - `bkit.tracker.default === "jira"` → null (Jira runs locally only)
392
- * - otherwise (undecided) → `cloud-router-none` (nudge to choose)
393
- *
394
- * Only fires when there is a `.github/workflows/` dir (the router wakes on a CI
403
+ * Only nudges when there is a `.github/workflows/` dir (the router wakes on a CI
395
404
  * completion event).
396
405
  */
397
406
  export function buildCloudSetupAdvisory(cwd: string): PreflightFinding | null {
398
407
  const routerPath = path.join(cwd, ".github", "workflows", "bkit-cloud.yml");
399
408
 
400
409
  if (fs.existsSync(routerPath)) {
401
- // Config-consistency assertion: cloud=claude requires id-token: write.
402
- // If the recorded variant is "claude" and the workflow file lacks id-token: write,
403
- // surface a consistency finding.
404
- if (readBkitConfig(cwd).cloudAgents === "claude") {
405
- const workflowContent = fs.readFileSync(routerPath, "utf-8");
406
- if (!workflowContent.includes("id-token: write")) {
407
- return {
408
- id: "cloud-claude-missing-id-token",
409
- severity: "blocker",
410
- detect:
411
- "`bkit.cloud.agent` is `claude` but `.github/workflows/bkit-cloud.yml` lacks `id-token: write`. `claude-code-action@v1` will fail at boot with an OIDC error.",
412
- action:
413
- "Re-run `pnpm bkit install --auto=claude --tracker=github` to regenerate the workflow with `id-token: write` and the App-auth framing. Also verify the Claude GitHub App is installed (`/install-github-app`). See bkit's `cloud.md` § Post-CI auto-routing.",
414
- };
415
- }
410
+ const { cloudAgents, cloudAgentsExplicit, issueTracker } = readBkitConfig(cwd);
411
+ const content = fs.readFileSync(routerPath, "utf-8");
412
+ const recopy =
413
+ "Re-copy the template: `cp .bkit/templates/.github/workflows/bkit-cloud.yml .github/workflows/bkit-cloud.yml`, then re-apply your own edits (the `runs-on` runner and the `{{NODE_VERSION}}` value).";
414
+
415
+ if (cloudAgents === "claude" && !content.includes("id-token: write")) {
416
+ return {
417
+ id: "cloud-claude-missing-id-token",
418
+ severity: "blocker",
419
+ detect:
420
+ "`bkit.cloud.agent` is `claude` but `.github/workflows/bkit-cloud.yml` lacks `id-token: write`. `claude-code-action@v1` will fail at boot with an OIDC error.",
421
+ action: `${recopy} Also verify the Claude GitHub App is installed (\`/install-github-app\`). See bkit's \`cloud.md\` § Post-CI auto-routing.`,
422
+ };
423
+ }
424
+ if (
425
+ (issueTracker === "linear" || issueTracker === "jira") &&
426
+ content.includes("serves the GitHub tracker only")
427
+ ) {
428
+ return {
429
+ id: "cloud-router-tracker-stale",
430
+ severity: "advisory",
431
+ detect: `\`bkit.tracker.default\` is \`${issueTracker}\` but the adopted \`.github/workflows/bkit-cloud.yml\` serves the GitHub tracker only: it never dispatches an agent for ${issueTracker} issues.`,
432
+ action: recopy,
433
+ };
434
+ }
435
+ if (cloudAgents === "codex" && !content.includes("openai/codex-action")) {
436
+ return {
437
+ id: "cloud-router-codex-missing",
438
+ severity: "advisory",
439
+ detect:
440
+ "`bkit.cloud.agent` is `codex` but the adopted `.github/workflows/bkit-cloud.yml` has no `openai/codex-action` job, so no Codex run starts.",
441
+ action: recopy,
442
+ };
443
+ }
444
+ if (!cloudAgentsExplicit) {
445
+ return {
446
+ id: "cloud-router-agent-unset",
447
+ severity: "advisory",
448
+ detect:
449
+ "`.github/workflows/bkit-cloud.yml` is present but `bkit.cloud.agent` is not recorded, so the router cannot tell which agent job to start.",
450
+ action:
451
+ "Record the variant: `pnpm bkit install --auto=claude`, `--auto=opencode` or `--auto=codex` (the agent whose credential you set).",
452
+ };
416
453
  }
417
454
 
455
+ if (cloudAgents === "none" || cloudAgents === "cursor") {
456
+ return {
457
+ id: "cloud-router",
458
+ severity: "advisory",
459
+ detect: `\`.github/workflows/bkit-cloud.yml\` is present but \`bkit.cloud.agent\` is \`${cloudAgents}\`: the router starts no agent job for \`${cloudAgents}\`, so CI results dispatch nothing.`,
460
+ action:
461
+ "Record the agent whose credential you set: `pnpm bkit install --auto=claude`, `--auto=opencode` or `--auto=codex`.",
462
+ };
463
+ }
464
+
465
+ const claude = cloudAgents === "claude";
466
+ const secret =
467
+ cloudAgents === "codex"
468
+ ? "`BKIT_OPENAI_API_KEY` repo secret"
469
+ : cloudAgents === "opencode"
470
+ ? "opencode provider's `BKIT_` repo secret"
471
+ : "`BKIT_ANTHROPIC_API_KEY` repo secret OR the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables (keyless workload identity federation)";
418
472
  return {
419
473
  id: "cloud-router",
420
474
  severity: "advisory",
421
- detect:
422
- "Cloud agents: post-CI auto-routing is active (`.github/workflows/bkit-cloud.yml` present). The Claude GitHub App is required — run `/install-github-app` (Claude Code CLI) once if not already done.",
423
- action: `The workflow requires: the \`ANTHROPIC_API_KEY\` repo secret OR the \`ANTHROPIC_FEDERATION_RULE_ID\` + \`ANTHROPIC_ORGANIZATION_ID\` repo variables (keyless workload identity federation), the Claude GitHub App (\`/install-github-app\`), and GitHub Actions write permissions (org AND repo). See the \`bkit-auto-setup\` advisory (emitted by \`bkit install --auto=claude\`) and bkit's \`cloud.md\` § Post-CI auto-routing for the full checklist.\n\nbkit's agents comment as you, so every workflow those comments trigger notifies you, even ones that skip. To see only failures: GitHub → Settings → Notifications → System → Actions → "Only notify for failed workflows".`,
475
+ detect: `Cloud agents: post-CI auto-routing is configured for \`${cloudAgents}\` (\`.github/workflows/bkit-cloud.yml\` present).${claude ? " The Claude GitHub App is required — run `/install-github-app` (Claude Code CLI) once if not already done." : ""}`,
476
+ action: `The workflow requires: the ${secret}${claude ? ", the Claude GitHub App (`/install-github-app`)" : ""}, and GitHub Actions write permissions (org AND repo). See the \`bkit-auto-setup\` advisory (emitted by \`bkit install --auto=${cloudAgents}\`) and bkit's \`cloud.md\` § Post-CI auto-routing for the full checklist.\n\nbkit's agents comment as you, so every workflow those comments trigger notifies you, even ones that skip. To see only failures: GitHub → Settings → Notifications → System → Actions → "Only notify for failed workflows".`,
424
477
  };
425
478
  }
426
479
 
427
480
  // No router present — distinguish opt-out from undecided.
428
- const { cloudAgents, cloudAgentsExplicit, issueTracker } = readBkitConfig(cwd);
481
+ const { cloudAgents, cloudAgentsExplicit } = readBkitConfig(cwd);
429
482
  if (cloudAgents === "none" && cloudAgentsExplicit) {
430
483
  return null; // consumer explicitly chose `none` — stay quiet
431
484
  }
432
- if (issueTracker === "jira") return null; // no cloud setup exists for a Jira tracker
433
485
 
434
486
  // Only nudge if there's a workflows dir for the router to wake on.
435
487
  if (!fs.existsSync(path.join(cwd, ".github", "workflows"))) return null;
@@ -440,8 +492,8 @@ export function buildCloudSetupAdvisory(cwd: string): PreflightFinding | null {
440
492
  detect:
441
493
  "Cloud agents: post-CI auto-routing is not configured. `.github/workflows/` exists but no `bkit-cloud.yml` — CI pass/fail does not auto-dispatch bkit-ship / bkit-debug.",
442
494
  action:
443
- "Optional post-install decision. For a GitHub-tracker repo: `pnpm bkit install --auto=claude --tracker=github`. For a Linear-tracker repo: `pnpm bkit install --auto=cursor --tracker=linear`.\n\n" +
444
- "Prerequisites for `--auto=claude`: `ANTHROPIC_API_KEY` repo secret (or the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables for keyless workload identity federation) + Claude GitHub App (`/install-github-app`) + GitHub Actions write permissions.\n\n" +
495
+ "Optional post-install decision: `pnpm bkit install --auto=<claude|opencode|codex|cursor>` (any variant works with your wired tracker; `codex` also needs `--codex`).\n\n" +
496
+ "Prerequisites: the variant's `BKIT_` repo secret (`BKIT_ANTHROPIC_API_KEY`, `BKIT_OPENAI_API_KEY` or the opencode provider's key; claude may use the `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` repo variables instead), the tracker key under Linear / Jira, the Claude GitHub App (`/install-github-app`) for claude, and GitHub Actions write permissions.\n\n" +
445
497
  'To opt out and silence this advisory, set `bkit.cloud.agent` to `"none"` in package.json.',
446
498
  };
447
499
  }