@cbartens/bkit 5.5.0 β†’ 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/.bkit/README.md +30 -20
  2. package/.bkit/core/.agents/docs.md +1 -0
  3. package/.bkit/core/.agents/rules.md +51 -26
  4. package/.bkit/core/.bkit/README.md +29 -19
  5. package/.bkit/core/.bkit/authoring.md +117 -0
  6. package/.bkit/core/.bkit/cloud.md +11 -11
  7. package/.bkit/core/.bkit/comparison.md +5 -5
  8. package/.bkit/core/.bkit/install.md +20 -20
  9. package/.bkit/core/.bkit/jsonl.md +202 -122
  10. package/.bkit/core/.bkit/lite.md +1 -1
  11. package/.bkit/core/.bkit/pipeline.md +49 -52
  12. package/.bkit/core/.bkit/prompts.md +106 -167
  13. package/.bkit/core/.bkit/providers.md +29 -32
  14. package/.bkit/core/.bkit/templates.md +44 -18
  15. package/.bkit/core/.bkit/trackers.md +60 -28
  16. package/.bkit/core/.bkit/workflows.md +399 -359
  17. package/.bkit/core/AGENTS.md +16 -22
  18. package/.bkit/core/docs/templates/bkit-audit-accessibility.md +14 -38
  19. package/.bkit/core/docs/templates/bkit-audit-adoption.md +16 -40
  20. package/.bkit/core/docs/templates/bkit-audit-agents.md +19 -43
  21. package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +16 -40
  22. package/.bkit/core/docs/templates/bkit-audit-analytics.md +14 -38
  23. package/.bkit/core/docs/templates/bkit-audit-annotations.md +11 -35
  24. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +15 -39
  25. package/.bkit/core/docs/templates/bkit-audit-app-store.md +12 -36
  26. package/.bkit/core/docs/templates/bkit-audit-architecture.md +16 -40
  27. package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +16 -40
  28. package/.bkit/core/docs/templates/bkit-audit-config.md +18 -42
  29. package/.bkit/core/docs/templates/bkit-audit-cost.md +16 -40
  30. package/.bkit/core/docs/templates/bkit-audit-coverage.md +15 -39
  31. package/.bkit/core/docs/templates/bkit-audit-database.md +16 -40
  32. package/.bkit/core/docs/templates/bkit-audit-dead-code.md +15 -39
  33. package/.bkit/core/docs/templates/bkit-audit-deferrals.md +15 -38
  34. package/.bkit/core/docs/templates/bkit-audit-dependencies.md +16 -40
  35. package/.bkit/core/docs/templates/bkit-audit-documentation.md +11 -35
  36. package/.bkit/core/docs/templates/bkit-audit-duplication.md +18 -42
  37. package/.bkit/core/docs/templates/bkit-audit-failures.md +13 -37
  38. package/.bkit/core/docs/templates/bkit-audit-flakes.md +12 -36
  39. package/.bkit/core/docs/templates/bkit-audit-gates.md +14 -38
  40. package/.bkit/core/docs/templates/bkit-audit-issues.md +15 -39
  41. package/.bkit/core/docs/templates/bkit-audit-llm.md +16 -40
  42. package/.bkit/core/docs/templates/bkit-audit-logs.md +14 -38
  43. package/.bkit/core/docs/templates/bkit-audit-models.md +12 -36
  44. package/.bkit/core/docs/templates/bkit-audit-privacy.md +12 -36
  45. package/.bkit/core/docs/templates/bkit-audit-prompts.md +15 -39
  46. package/.bkit/core/docs/templates/bkit-audit-red-team.md +15 -39
  47. package/.bkit/core/docs/templates/bkit-audit-reliability.md +15 -39
  48. package/.bkit/core/docs/templates/bkit-audit-repo.md +12 -36
  49. package/.bkit/core/docs/templates/bkit-audit-security.md +13 -37
  50. package/.bkit/core/docs/templates/bkit-audit-slop.md +14 -38
  51. package/.bkit/core/docs/templates/bkit-audit-testing.md +12 -36
  52. package/.bkit/core/docs/templates/bkit-audit-usability.md +16 -40
  53. package/.bkit/core/docs/templates/bkit-plan.md +97 -226
  54. package/.bkit/core/engine/checks/after/ci-yml.ts +39 -30
  55. package/.bkit/core/engine/checks/after/github.ts +101 -72
  56. package/.bkit/core/engine/checks/after/index.ts +10 -12
  57. package/.bkit/core/engine/checks/after/suppression.ts +8 -5
  58. package/.bkit/core/engine/checks/after/tools.ts +47 -92
  59. package/.bkit/core/engine/checks/before/env.ts +2 -2
  60. package/.bkit/core/engine/checks/before/files.ts +5 -4
  61. package/.bkit/core/engine/checks/before/index.ts +18 -1
  62. package/.bkit/core/engine/checks/before/repo.ts +168 -2
  63. package/.bkit/core/engine/checks/tips/catalogue.ts +16 -5
  64. package/.bkit/core/engine/checks/tips/detect.ts +34 -0
  65. package/.bkit/core/engine/checks/tips/index.ts +10 -7
  66. package/.bkit/core/engine/cli.ts +20 -53
  67. package/.bkit/core/engine/commands/analysis.ts +171 -140
  68. package/.bkit/core/engine/commands/ci/ci.ts +6 -6
  69. package/.bkit/core/engine/commands/comply.ts +77 -103
  70. package/.bkit/core/engine/commands/install/doctor.ts +2 -2
  71. package/.bkit/core/engine/commands/install/install.ts +57 -18
  72. package/.bkit/core/engine/commands/install/uninstall.ts +65 -28
  73. package/.bkit/core/engine/commands/land.ts +18 -12
  74. package/.bkit/core/engine/commands/lib.ts +79 -17
  75. package/.bkit/core/engine/commands/registry.ts +4 -0
  76. package/.bkit/core/engine/commands/setup/setup.ts +7 -7
  77. package/.bkit/core/engine/commands/stats.ts +204 -0
  78. package/.bkit/core/engine/commands/tips.ts +10 -5
  79. package/.bkit/core/engine/commands/workflow/branches.ts +741 -62
  80. package/.bkit/core/engine/commands/workflow/challenge.ts +673 -0
  81. package/.bkit/core/engine/commands/workflow/context.ts +853 -29
  82. package/.bkit/core/engine/commands/workflow/counters.ts +267 -84
  83. package/.bkit/core/engine/commands/workflow/decisions.ts +541 -0
  84. package/.bkit/core/engine/commands/workflow/disk.ts +2 -2
  85. package/.bkit/core/engine/commands/workflow/fids.ts +793 -33
  86. package/.bkit/core/engine/commands/workflow/issues.ts +427 -105
  87. package/.bkit/core/engine/commands/workflow/ledgers.ts +884 -27
  88. package/.bkit/core/engine/commands/workflow/locks.ts +26 -2
  89. package/.bkit/core/engine/commands/workflow/plan-blocks.ts +582 -0
  90. package/.bkit/core/engine/commands/workflow/plan-versions.ts +21 -0
  91. package/.bkit/core/engine/commands/workflow/prs.ts +166 -30
  92. package/.bkit/core/engine/commands/workflow/repo.ts +59 -7
  93. package/.bkit/core/engine/commands/workflow/roadmap.ts +16 -7
  94. package/.bkit/core/engine/commands/workflow/run-facts.ts +501 -0
  95. package/.bkit/core/engine/commands/workflow/runs.ts +179 -49
  96. package/.bkit/core/engine/commands/workflow/runtime.ts +22 -1
  97. package/.bkit/core/engine/commands/workflow/status.ts +142 -29
  98. package/.bkit/core/engine/commands/workflow/step-table.ts +339 -0
  99. package/.bkit/core/engine/commands/workflow/steps.ts +213 -88
  100. package/.bkit/core/engine/commands/workflow/summary.ts +398 -0
  101. package/.bkit/core/engine/commands/workflow/tests.ts +1013 -148
  102. package/.bkit/core/engine/commands/workflow/tracker.ts +1195 -0
  103. package/.bkit/core/engine/commands/workflow/workflows.ts +984 -207
  104. package/.bkit/core/engine/commands/workflow/workstreams.ts +11 -5
  105. package/.bkit/core/engine/commands/workflow/worktrees.ts +276 -22
  106. package/.bkit/core/engine/install/manifest.ts +11 -9
  107. package/.bkit/core/engine/install/modules/cloud.ts +21 -13
  108. package/.bkit/core/engine/install/modules/core.ts +325 -7
  109. package/.bkit/core/engine/install/modules/opencode.ts +2 -2
  110. package/.bkit/core/engine/install/version-file.ts +6 -2
  111. package/.bkit/core/engine/ledgers/migrate.ts +92 -0
  112. package/.bkit/core/engine/ledgers/status.ts +92 -15
  113. package/.bkit/core/engine/ledgers/telemetry.ts +1261 -254
  114. package/.bkit/core/engine/render/hosts.ts +4 -0
  115. package/.bkit/core/engine/render/models.ts +12 -0
  116. package/.bkit/core/engine/shared/branches.ts +4 -1
  117. package/.bkit/core/engine/shared/egress.ts +7 -0
  118. package/.bkit/core/engine/shared/json.ts +25 -7
  119. package/.bkit/core/engine/shared/settings.ts +202 -33
  120. package/.bkit/core/engine/shared/text.ts +361 -0
  121. package/.bkit/core/engine/tools/grammar-density.ts +215 -0
  122. package/.bkit/core/engine/tools/instructions-sources.ts +834 -0
  123. package/.bkit/core/engine/tools/instructions.ts +1751 -0
  124. package/.bkit/core/hooks/gateguard-engine.js +24 -23
  125. package/.bkit/core/hooks/guardrails-shell.js +2 -3
  126. package/.bkit/core/hooks/guardrails-tiers.js +7 -1
  127. package/.bkit/core/hooks/readguard-engine.js +2 -2
  128. package/.bkit/core/prompts/bkit-audit-generate.md +62 -25
  129. package/.bkit/core/prompts/bkit-build-challenge-1.md +40 -17
  130. package/.bkit/core/prompts/bkit-build-challenge-2.md +44 -17
  131. package/.bkit/core/prompts/bkit-build-install-skills.md +26 -13
  132. package/.bkit/core/prompts/bkit-build-plan-convert.md +74 -0
  133. package/.bkit/core/prompts/bkit-build-plan-current.md +26 -13
  134. package/.bkit/core/prompts/bkit-build-plan-execute.md +74 -26
  135. package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +64 -23
  136. package/.bkit/core/prompts/bkit-build-plan-verify.md +57 -33
  137. package/.bkit/core/prompts/bkit-debug-abort-handover.md +30 -14
  138. package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +34 -14
  139. package/.bkit/core/prompts/bkit-debug-failure-remediate.md +34 -17
  140. package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +26 -13
  141. package/.bkit/core/prompts/bkit-debug-failure-soak.md +31 -16
  142. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +21 -11
  143. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +20 -11
  144. package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +20 -11
  145. package/.bkit/core/prompts/bkit-design-generate.md +33 -13
  146. package/.bkit/core/prompts/bkit-design-organise.md +25 -12
  147. package/.bkit/core/prompts/bkit-design-review-1.md +31 -15
  148. package/.bkit/core/prompts/bkit-design-review-2.md +28 -13
  149. package/.bkit/core/prompts/bkit-design-spike.md +30 -13
  150. package/.bkit/core/prompts/bkit-design-update.md +33 -19
  151. package/.bkit/core/prompts/bkit-plan-generate.md +75 -19
  152. package/.bkit/core/prompts/bkit-plan-review-1.md +50 -27
  153. package/.bkit/core/prompts/bkit-plan-review-2.md +59 -28
  154. package/.bkit/core/prompts/bkit-plan-scope-check.md +109 -0
  155. package/.bkit/core/prompts/bkit-plan-update.md +61 -24
  156. package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +27 -15
  157. package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +31 -16
  158. package/.bkit/core/prompts/bkit-ship-update-docs.md +30 -15
  159. package/.bkit/core/prompts/bkit-utility-compress-markdown.md +24 -14
  160. package/.bkit/core/prompts/bkit-utility-update-decisions.md +32 -14
  161. package/.bkit/core/prompts/bkit-utility-update-deferrals.md +29 -14
  162. package/.bkit/core/prompts/bkit-utility-update-documentation.md +28 -13
  163. package/.bkit/core/prompts/bkit-utility-update-failures.md +31 -14
  164. package/.bkit/core/prompts/bkit-utility-update-knowledge.md +33 -14
  165. package/.bkit/core/prompts/bkit-utility-update-roadmap.md +38 -17
  166. package/.bkit/core/prompts/bkit-utility-update-tracker.md +43 -20
  167. package/.bkit/core/workflows/bkit-auto.md +54 -46
  168. package/.bkit/core/workflows/bkit-build.md +577 -458
  169. package/.bkit/core/workflows/bkit-debug.md +348 -333
  170. package/.bkit/core/workflows/bkit-design.md +201 -237
  171. package/.bkit/core/workflows/bkit-plan.md +210 -321
  172. package/.bkit/core/workflows/bkit-ship.md +328 -278
  173. package/.bkit/shared/.bkit/.env.example +2 -2
  174. package/.bkit/shared/.claude/settings.json +11 -0
  175. package/.bkit/shared/.cursor/mcp.json +1 -1
  176. package/.bkit/shared/.cursor/rules/bkit-rules.mdc +1 -1
  177. package/.bkit/shared/.gitattributes +1 -1
  178. package/.bkit/shared/.mcp.json +1 -1
  179. package/.bkit/shared/.opencode/opencode.json +11 -0
  180. package/.bkit/shared/CLAUDE.md +2 -2
  181. package/.bkit/shared/GEMINI.md +2 -2
  182. package/.bkit/shared/docs/architecture.md +1 -1
  183. package/.bkit/shared/docs/data-schema.md +1 -1
  184. package/.bkit/shared/docs/deployments.md +16 -28
  185. package/.bkit/shared/docs/design.md +1 -1
  186. package/.bkit/shared/docs/noise.md +1 -1
  187. package/.bkit/shared/docs/observability.md +2 -2
  188. package/.bkit/shared/docs/security.md +1 -1
  189. package/.bkit/shared/docs/setup.md +1 -1
  190. package/.bkit/shared/docs/technology.md +1 -1
  191. package/.bkit/shared/docs/testing.md +27 -10
  192. package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +1 -1
  193. package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +26 -5
  194. package/.bkit/templates/.github/workflows/bkit-ci.yml +22 -84
  195. package/.bkit/templates/.github/workflows/bkit-cloud.yml +21 -19
  196. package/.bkit/templates/.husky/pre-push +52 -13
  197. package/.bkit/templates/.prettierignore +7 -0
  198. package/.bkit/templates/scripts/ci/bkit-local-stack-lock.sh +194 -0
  199. package/.bkit/templates/scripts/ci/check-capstone.mjs +2 -4
  200. package/.bkit/templates/scripts/ci/check-capstone.test.mjs +4 -23
  201. package/.bkit/templates/scripts/ci/lanes/resolve-push-base.mjs +104 -23
  202. package/.bkit/templates/scripts/ci/lanes/resolve-push-base.test.mjs +103 -6
  203. package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +1 -1
  204. package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +3 -1
  205. package/.bkit/templates/scripts/prettier/bkit-insert-ignore.mjs +49 -29
  206. package/CHANGELOG.md +142 -0
  207. package/README.md +58 -34
  208. package/dist/checks/after/ci-yml.js +39 -29
  209. package/dist/checks/after/github.js +99 -72
  210. package/dist/checks/after/index.js +11 -13
  211. package/dist/checks/after/suppression.js +8 -5
  212. package/dist/checks/after/tools.js +40 -83
  213. package/dist/checks/before/env.js +2 -2
  214. package/dist/checks/before/files.js +5 -3
  215. package/dist/checks/before/index.js +15 -2
  216. package/dist/checks/before/repo.js +163 -2
  217. package/dist/checks/tips/catalogue.js +14 -5
  218. package/dist/checks/tips/detect.js +32 -0
  219. package/dist/checks/tips/index.js +7 -5
  220. package/dist/cli.js +19 -47
  221. package/dist/commands/analysis.js +109 -100
  222. package/dist/commands/ci/ci.js +6 -6
  223. package/dist/commands/comply.js +54 -91
  224. package/dist/commands/install/doctor.js +2 -2
  225. package/dist/commands/install/install.js +50 -19
  226. package/dist/commands/install/uninstall.js +59 -28
  227. package/dist/commands/land.js +16 -12
  228. package/dist/commands/lib.js +51 -16
  229. package/dist/commands/registry.js +4 -0
  230. package/dist/commands/setup/setup.js +7 -7
  231. package/dist/commands/stats.js +136 -0
  232. package/dist/commands/tips.js +7 -3
  233. package/dist/commands/workflow/branches.js +656 -56
  234. package/dist/commands/workflow/challenge.js +556 -0
  235. package/dist/commands/workflow/context.js +709 -30
  236. package/dist/commands/workflow/counters.js +208 -75
  237. package/dist/commands/workflow/decisions.js +441 -0
  238. package/dist/commands/workflow/disk.js +2 -2
  239. package/dist/commands/workflow/fids.js +689 -33
  240. package/dist/commands/workflow/issues.js +362 -99
  241. package/dist/commands/workflow/ledgers.js +762 -27
  242. package/dist/commands/workflow/locks.js +24 -2
  243. package/dist/commands/workflow/plan-blocks.js +437 -0
  244. package/dist/commands/workflow/plan-versions.js +22 -0
  245. package/dist/commands/workflow/prs.js +142 -32
  246. package/dist/commands/workflow/repo.js +52 -7
  247. package/dist/commands/workflow/roadmap.js +9 -7
  248. package/dist/commands/workflow/run-facts.js +426 -0
  249. package/dist/commands/workflow/runs.js +144 -43
  250. package/dist/commands/workflow/runtime.js +12 -1
  251. package/dist/commands/workflow/status.js +130 -29
  252. package/dist/commands/workflow/step-table.js +276 -0
  253. package/dist/commands/workflow/steps.js +171 -80
  254. package/dist/commands/workflow/summary.js +275 -0
  255. package/dist/commands/workflow/tests.js +834 -136
  256. package/dist/commands/workflow/tracker.js +983 -0
  257. package/dist/commands/workflow/workflows.js +834 -195
  258. package/dist/commands/workflow/workstreams.js +11 -5
  259. package/dist/commands/workflow/worktrees.js +221 -22
  260. package/dist/install/manifest.js +11 -9
  261. package/dist/install/modules/cloud.js +22 -13
  262. package/dist/install/modules/core.js +326 -7
  263. package/dist/install/modules/opencode.js +2 -2
  264. package/dist/install/version-file.js +6 -2
  265. package/dist/ledgers/migrate.js +81 -0
  266. package/dist/ledgers/status.js +61 -8
  267. package/dist/ledgers/telemetry.js +905 -124
  268. package/dist/render/hosts.js +4 -0
  269. package/dist/render/models.js +12 -0
  270. package/dist/shared/branches.js +3 -1
  271. package/dist/shared/egress.js +7 -0
  272. package/dist/shared/json.js +20 -7
  273. package/dist/shared/settings.js +147 -26
  274. package/dist/shared/text.js +333 -0
  275. package/dist/tools/grammar-density.js +183 -0
  276. package/dist/tools/instructions-sources.js +721 -0
  277. package/dist/tools/instructions.js +1579 -0
  278. package/package.json +114 -23
  279. package/.bkit/core/engine/commands/harvest.ts +0 -459
  280. package/.bkit/core/engine/tools/wording.ts +0 -748
  281. package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +0 -69
  282. package/.bkit/core/prompts/bkit-build-challenge-remediate.md +0 -71
  283. package/.bkit/core/prompts/bkit-build-challenge-tests.md +0 -74
  284. package/.bkit/core/prompts/bkit-build-summary.md +0 -94
  285. package/.bkit/core/prompts/bkit-debug-summary.md +0 -96
  286. package/.bkit/core/prompts/bkit-design-summary.md +0 -107
  287. package/.bkit/core/prompts/bkit-plan-complexity-check.md +0 -67
  288. package/.bkit/core/prompts/bkit-plan-complexity-split.md +0 -88
  289. package/.bkit/core/prompts/bkit-plan-review-3.md +0 -93
  290. package/.bkit/core/prompts/bkit-plan-scope-check-1.md +0 -85
  291. package/.bkit/core/prompts/bkit-plan-scope-check-2.md +0 -85
  292. package/.bkit/core/prompts/bkit-plan-summary.md +0 -107
  293. package/.bkit/core/prompts/bkit-ship-summary.md +0 -78
  294. package/.bkit/templates/scripts/ci/lanes/check-tree-cache.mjs +0 -138
  295. package/.bkit/templates/scripts/ci/lanes/check-tree-cache.test.mjs +0 -181
  296. package/dist/commands/harvest.js +0 -353
  297. package/dist/tools/wording.js +0 -680
@@ -11,14 +11,6 @@
11
11
  >
12
12
  > **Rules:**
13
13
  >
14
- > - Read-only audit; never edit code, config, or data.
15
- > - `Universal Instructions` apply to all projects; `Project Instructions` apply only to this project.
16
- > - Local audit instructions / overrides β†’ `Project Instructions` below the bkit-managed block; universal instructions stay in-block.
17
- > - Any tools mentioned in `Universal Instructions` are examples only; swap for actual tools in final output; drop inapplicable.
18
- > - Use dense token-efficient phrasing; no filler / hedging / restating; tables > prose, bullets > paragraphs.
19
- > - Read `.agents/docs.md` β†’ load docs for workflow / step / task; skip missing; cite docs inline where required.
20
- > - Every claim cites this run's evidence (`file:line`, or command / query and its output) and tool behind it; a previous report's figure, list, or status is a lead, not evidence.
21
- > - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
22
14
  > - NEVER delete code, files, routes, schema objects, or dependencies. The report names the destination; applying it is the next step.
23
15
  > - A detector proves use, never absence. Dead only when every method that would have found a use found none, and the file was opened. never write a finding from tool output alone.
24
16
 
@@ -32,7 +24,7 @@ Dead code = control that looks live, is not: limiter on unset env var; E2E asser
32
24
 
33
25
  **Cadence:** quarterly; extra pass when a cycle deletes a feature or moves a package.
34
26
 
35
- **Anchor Standards:** record version and date read. Newer version β†’ `Standards` step reads what changed.
27
+ **Anchor Standards:**
36
28
 
37
29
  - Reachability scanner, version run, including production mode, workspaces, and issue types (e.g. knip, ts-prune, vulture).
38
30
  - Compiler unused and unreachable options (e.g. TypeScript `noUnusedLocals`, `noUnusedParameters`, `allowUnreachableCode`; Ruff `F401`, `F841`).
@@ -73,26 +65,18 @@ Dead code = control that looks live, is not: limiter on unset env var; E2E asser
73
65
 
74
66
  ### Pre-Flight / Dependencies
75
67
 
76
- **Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available β†’ tool and version; missing β†’ fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
77
-
78
- **Credentials:** probe direnv before marking a token / env var missing: `direnv exec . sh -c '[ -n "${VAR}" ] && echo set || echo unset'`; `unset` = missing. Run credentialed CLIs as `direnv exec . <cmd>`. No direnv (cloud session) β†’ plain env check. Report names, never values.
79
-
80
68
  #### Core
81
69
 
82
- Always verify.
83
-
84
- - [ ] **Permissions:** Before Step 1 β€” one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) β†’ record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call β†’ `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
85
- - [ ] **Clean Tree:** Steps 2–17 β€” clean `git status` at recorded commit; one checkout all steps. Fallback: detached worktree off integration branch; dirty-path candidates = hypotheses.
86
- - [ ] **Text Search:** Steps 5–14 β€” repo search (`git grep`, ripgrep). Fallback: none β†’ those steps `Not Checked`.
87
- - [ ] **Reachability Scanner:** Steps 3–4 β€” ad hoc, not committed dependency (e.g. `pnpm dlx knip`, vulture). Fallback: language-server refs + text search; scanner categories `Not Checked`.
70
+ - [ ] **Permissions:** blocked calls recorded
71
+ - [ ] **Clean Tree:** Steps 2-17 β€” clean `git status` at recorded commit; one checkout all steps. Fallback: detached worktree off integration branch; dirty-path candidates = hypotheses.
72
+ - [ ] **Text Search:** Steps 5-14 β€” repo search (`git grep`, ripgrep). Fallback: none β†’ those steps `Not Checked`.
73
+ - [ ] **Reachability Scanner:** Steps 3-4 β€” ad hoc, not committed dependency (e.g. `pnpm dlx knip`, vulture). Fallback: language-server refs + text search; scanner categories `Not Checked`.
88
74
  - [ ] **Web:** Step 16 β€” fetch anchor standards. Fallback: versions unread.
89
75
 
90
76
  #### Conditional
91
77
 
92
- Verify only when applicable.
93
-
94
78
  - [ ] **Compiler Unused Checks:** Compiled language β†’ Step 2 β€” resolved compiler/linter config, not base file. Fallback: `Detectors` `Not Checked`.
95
- - [ ] **Language Server:** Typed language β†’ Steps 13–14 β€” refs (Serena, `tsserver`, pyright). Fallback: text search only; name it; re-run every empty result before recording dead.
79
+ - [ ] **Language Server:** Typed language β†’ Steps 13-14 β€” refs (Serena, `tsserver`, pyright). Fallback: text search only; name it; re-run every empty result before recording dead.
96
80
  - [ ] **Git History:** Flags or introduction dates β†’ Step 6 β€” `git log -S`. Fallback: flag ages `Not Checked`.
97
81
  - [ ] **E2E Locators:** E2E asserts test ids β†’ Step 7. Fallback: skip with evidence; `Assertions` = `N/A`.
98
82
  - [ ] **Hosted DB:** SQL migrations or hosted DB β†’ Step 10 β€” inspection CLI + unused-index advisor (e.g. `supabase inspect db`, Splinter `0005_unused_index`). Fallback: static grep only; runtime zero-use `Not Checked`.
@@ -100,14 +84,12 @@ Verify only when applicable.
100
84
 
101
85
  ### πŸ”’ Gate 1: Prerequisites Check
102
86
 
103
- **Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
104
-
105
87
  - [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
106
- - [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
88
+ - [ ] **Gate 1 β€” Verified:** All Core items checked. All applicable Conditional items checked.
107
89
 
108
90
  ### Probe Steps
109
91
 
110
- - [ ] **Step 1 β€” Previous Run:** Audited commit = this report's `bkit:anchor` `baseSha`. Read newest prior report for this slug under `docs/audits/`; its commit = its `bkit:anchor` `baseSha`, else the HEAD its `Previous Run` recorded. Count findings fixed / still open; age of oldest open. Open after 2 runs β†’ re-raise with age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
92
+ - [ ] **Step 1 β€” Previous Run:** **Done when:** closure rate in `Previous Run`, or run marked baseline.
111
93
  - [ ] **Step 2 β€” Detectors:** Compiled language β†’ scanner sees module exports only; dead branch/parameter inside live function β†’ compiler + linter. Read resolved config per workspace, not base: unused-local, unused-parameter, no-unreachable-code; linter unused-vars, unreachable, always-true/false (e.g. `@typescript-eslint/no-unnecessary-condition`). Workspace override or file disable switches one off silently. Detector off = finding β†’ `bkit-audit-gates` (gate candidate). Linter cannot run on project's compiler version (e.g. peer dependency range excludes it) β†’ same detector-off finding; its rules β†’ `Not Checked`. **Done when:** `Detectors` lists each config and resolved value.
112
94
  - [ ] **Step 3 β€” Reachability:** Ad hoc scanner, same resolved version both runs; record version. Do not add it as a dependency, and do not wire a CI gate this run. Report baseline-config readiness. First readiness check: scanner ignores exports used inside their own file (e.g. knip `ignoreExportsUsedInFile`); without it export signal = noise β†’ run with and without, report both counts. Gate before `False Positives` exclusions encoded β†’ structural noise β†’ disabled. Do not encode test-only code as ignore entries or negated project patterns β€” plugins add test files as entries; production mode separates. Check scanner stderr before trusting: plugin load failure drops entry class β†’ false unused files. Signal: files, exports, types, duplicates. Dependency categories β†’ `Dependencies` pass, not mixed. Same version in production mode (or strict: implies production + each workspace uses only its own deps). Export used default run, unused production β†’ test/config-only class. Report both runs side by side. Scanner has no class-member check (e.g. knip 6: no `classMembers` issue type) and project has classes β†’ gap in `Not Checked`; fallback = language-server references per public member. **Done when:** version, both runs, with/without in-file-use counts, plugin-load errors in `Reachability`.
113
95
  - [ ] **Step 4 β€” Dependencies:** Scanner dependency mode per workspace, categories the scanner offers (e.g. knip: unused, unlisted, unresolved, unlisted binaries, catalog entries unreferenced). Before unused verdict β†’ search name across manifest scripts, config, CI. Config-only consumers (e.g. linter, formatter, CSS presets, bundler plugins, `@types/*`) = usual false hits. Unused = install/supply-chain surface; unlisted = hoisted from another workspace. Unlisted or advisory β†’ `bkit-audit-dependencies`. **Done when:** `Dependencies` row per candidate: name Β· class Β· config-or-CI reader Β· verdict.
@@ -121,19 +103,17 @@ Verify only when applicable.
121
103
  - [ ] **Step 12 β€” Strings:** (a) Message catalogue β€” diff keys vs reads each app/shared UI both ways (`i18n-check` or search script). No reader = dead; read missing = renders key name; language server often blind β†’ search. Missing catalogue β†’ `bkit-audit-usability`. (b) Static assets β€” list shipped (incl. email templates); search basename in code, config, CSS; scanner skips assets; native bundle ships unused. (c) Scripts β€” per manifest script + scripts tree file β†’ search name in CI, hooks, task runner, docs, other scripts, plus its stem and every process-spawn site (e.g. `spawn`, `exec`, a directory listing filtered by extension) β€” runtime-built path misses name search; no invoker = candidate; doc-only = candidate + reader to update. **Done when:** `Strings` row per unused key, missing key, unread asset, uninvoked script.
122
104
  - [ ] **Step 13 β€” False Positives:** Filter these before reading anything as a finding. They are structural and recur every run. Ambient module augmentation: zero importers by design; applied through the compiler include. Never dead. Platform file splits (e.g. RN `.ios` / `.android` / `.web`): one specifier resolves to a per-platform file the scanner cannot follow, so unresolved entries are noise. The filter hides the opposite, so check once per run: for each platform pair, the platform that would load that variant imports the parent. A single-platform component carrying the other platform's file is dead and invisible, because both resolve through the same specifier. Files referenced from config, not code: check the referencing config before believing unused (app config, CI, test-runner project dependencies, agent hooks, deployed functions, an explicit worker registry). Test-only exports: only importer is a test = a seam, not dead code. Report separately from unreferenced code; never delete. A drift test is not a reader: generated artefact referenced only by its generator and a drift test (no runtime reader) = finding, not seam. A default export a preview server requires while code imports the named one. Mock-factory keys: no scanner and no language server sees them; a key inside a mock factory is a real use. **Done when:** `Candidates` names each class and what it removed.
123
105
  - [ ] **Step 14 β€” Eliminate:** Language server before opening files. One reference found means the candidate is not dead, and that verdict is sound even though the converse is not. Per surviving unused-export candidate: find the symbol, then find references. Any hit ends it. Empty β†’ fall through to text search, and re-run the empty language-server query once more before recording it. Record both measurements. Pace reference queries: back-to-back calls collapse to zero, and a partial answer looks exactly like a dead symbol. Empty is inconclusive, not absence. Text search over-reports (comments, same-named symbols in other modules); the language server under-reports. Agreement is the signal. Run search in addition to the language server, never instead of it. An unused export needs zero matches repo-wide other than its own definition: search, subtract the defining file, ignore prose comments. An unused file is not reached from JSON, YAML, or other config no typed tool reads. An env-var finding is a control, not an optional setting with a working default. A test id asserted in end-to-end tests exists on a component. No finding without opening the file. Cite `file:line` and the method. Non-typed surfaces (markdown, ledgers, YAML, SQL, shell, string literals) are search, not the language server. **Done when:** every survivor in `Candidates` has `file:line`, method, and the zero-reference re-run.
124
- - [ ] **Step 15 β€” Runtime:** Production request/job/query stats β†’ static says unreferenced; production says ran. Rank survivors: recent window of per-route counts/logs, job runs, SQL function query stats. "Zero executions" β‰  "zero static references". Thin/pre-launch β†’ signal, never proof; uncalled route β‰  dead. **Done when:** `Runtime` holds window, source, zero-execution rows, or skip.
106
+ - [ ] **Step 15 β€” Runtime:** Production request/job/query stats β†’ static says unreferenced; production says ran. Rank survivors: recent window of per-route counts/logs, job runs, SQL function query stats. "Zero executions" != "zero static references". Thin/pre-launch β†’ signal, never proof; uncalled route != dead. **Done when:** `Runtime` holds window, source, zero-execution rows, or skip.
125
107
  - [ ] **Step 16 β€” Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: row per anchor + scanner issue type β†’ checked (name step) / not applicable (why) / finding. Unapplied recommended practice β†’ adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
126
108
  - [ ] **Step 17 β€” Anything Else:** (a) Since previous commit, reachability-touching changes (features/packages deleted/moved, exports/files, deps, env/flags, routes/fetch URLs, events/functions/crons, migrations, i18n, assets, manifest scripts) β†’ one-line verdict each. (b) ~30 min bounded pass: senior code-health flags no step asks; since previous run (incidents, new `docs/failures.jsonl`, `bkit-audit-logs` reports, vendor status) β€” what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs β†’ propose step in `Process Improvements`.
127
109
 
128
110
  ### πŸ”’ Gate 2: Probes Check
129
111
 
130
- **Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
131
-
132
112
  - [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
133
113
  - [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
134
114
  - [ ] **Candidates eliminated:** every survivor opened the file; a method that found a use ended it; every zero-reference result was re-run and both measurements are recorded.
135
115
  - [ ] **Tree untouched:** no code, config, schema, or dependency change.
136
- - [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
116
+ - [ ] **Gate 2 β€” Verified:** Every checkbox above independently verified and checked off.
137
117
 
138
118
  ## Findings
139
119
 
@@ -145,7 +125,7 @@ Verify only when applicable.
145
125
  | `MEDIUM` | File or export with zero references after elimination; feature flag older than 90 days with rollout complete; unused or unlisted dependency; i18n key with no reader, or a reader missing from the catalogue |
146
126
  | `LOW` | Doc comment naming a moved path; test-only export (own class, never a delete); preview-only default export |
147
127
 
148
- Scale per `.bkit/jsonl.md` Β§ Severity. Within a severity: dead controls first.
128
+ Within a severity: dead controls first.
149
129
 
150
130
  <!-- prettier-ignore -->
151
131
  | ID | Severity | Location | Evidence | Expected |
@@ -245,17 +225,13 @@ PENDING
245
225
 
246
226
  ### πŸ”’ Gate 3: Report Check
247
227
 
248
- **Checkpoint.** Verify and check `[x]` all boxes below, then stop.
249
-
250
- - [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
228
+ - [ ] **No placeholders:** no `PENDING` left
251
229
  - [ ] **Summary:** names count per severity and candidate / surviving counts.
252
230
  - [ ] **Series:** `Reachability` counts and `Runtime` zeroes beside previous report's numbers, or marked baseline.
253
- - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
254
- - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
231
+ - [ ] **Writes:** only this report, template `Project Instructions`, and ledger rows changed; throwaway worktrees / remote targets removed.
232
+ - [ ] **Process Improvements:** `Universal` and `Project` filled
255
233
  - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
256
- - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
257
-
258
- > `Project Instructions` below `bkit:end` are consumer-owned β€” `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
234
+ - [ ] **Gate 3 β€” Verified:** Every checkbox above independently verified and checked off.
259
235
 
260
236
  <!-- bkit:end -->
261
237
 
@@ -11,14 +11,6 @@
11
11
  >
12
12
  > **Rules:**
13
13
  >
14
- > - Read-only audit; never edit code, config, or data.
15
- > - `Universal Instructions` apply to all projects; `Project Instructions` apply only to this project.
16
- > - Local audit instructions / overrides β†’ `Project Instructions` below the bkit-managed block; universal instructions stay in-block.
17
- > - Any tools mentioned in `Universal Instructions` are examples only; swap for actual tools in final output; drop inapplicable.
18
- > - Use dense token-efficient phrasing; no filler / hedging / restating; tables > prose, bullets > paragraphs.
19
- > - Read `.agents/docs.md` β†’ load docs for workflow / step / task; skip missing; cite docs inline where required.
20
- > - Every claim cites this run's evidence (`file:line`, or command / query and its output) and tool behind it; a previous report's figure, list, or status is a lead, not evidence.
21
- > - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
22
14
  > - NEVER append or edit a ledger line. Correction and close rows live in `Expected` only. `ts` is minted at append (`.bkit/jsonl.md` Β§ Write Idiom), never written in this report.
23
15
  > - A winning row whose `ts` is in the future outranks every correction. Name its `key`. Do not invent a later `ts`.
24
16
 
@@ -32,7 +24,7 @@ Deferred work appends rows; nothing re-reads them. Three drifts: silently done (
32
24
 
33
25
  **Cadence:** once per ship cycle; at least monthly when no cycle ships. Extra pass after release, or after another audit records deferred items (e.g. `bkit-audit-app-performance`).
34
26
 
35
- **Anchor Standards:** record version and date read. Newer version β†’ `Standards` step reads what changed.
27
+ **Anchor Standards:**
36
28
 
37
29
  - Technical debt, principal, and interest, and the Technical Debt Quadrant (e.g. Martin Fowler).
38
30
  - Hotspot analysis, churn against code health (e.g. CodeScene).
@@ -74,7 +66,7 @@ One per verified row.
74
66
  - **UNJUSTIFIED:** all four tests hold. `Expected` = same-`key` row, `reason: "unjustified"`, the failed test named in `description`, `status: "TRIAGED"`. Later rows carry `reason` verbatim. Work goes back in scope via a plan.
75
67
  - **OTHER:** fits none. Say what it is, why, and where it goes. Same `OTHER` on 2 runs β†’ propose new verdict in `Process Improvements`.
76
68
 
77
- **DONE is the verdict most likely to be wrong.** Plausible commit message β‰  evidence. DONE or SUPERSEDED needs positive reason β€” commit, deleted file, or new owner module. Empty query is not absence.
69
+ **DONE is the verdict most likely to be wrong.** Plausible commit message != evidence. DONE or SUPERSEDED needs positive reason β€” commit, deleted file, or new owner module. Empty query is not absence.
78
70
 
79
71
  **UNJUSTIFIED** when all four hold (`.bkit/jsonl.md` Β§ Deferral Reason):
80
72
 
@@ -91,39 +83,29 @@ Never set `unjustified` while repairing a missing or illegal `reason`. That repa
91
83
 
92
84
  ### Pre-Flight / Dependencies
93
85
 
94
- **Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available β†’ tool and version; missing β†’ fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
95
-
96
- **Credentials:** probe direnv before marking a token / env var missing: `direnv exec . sh -c '[ -n "${VAR}" ] && echo set || echo unset'`; `unset` = missing. Run credentialed CLIs as `direnv exec . <cmd>`. No direnv (cloud session) β†’ plain env check. Report names, never values.
97
-
98
86
  #### Core
99
87
 
100
- Always verify.
101
-
102
- - [ ] **Permissions:** Before Step 1 β€” one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) β†’ record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call β†’ `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
103
- - [ ] **Ledger:** Steps 3–9 β€” `docs/deferrals.jsonl` and `.bkit/jsonl.md`. Fallback: file absent β†’ one `N/A` row after Step 3 and STOP.
88
+ - [ ] **Permissions:** blocked calls recorded
89
+ - [ ] **Ledger:** Steps 3-9 β€” `docs/deferrals.jsonl` and `.bkit/jsonl.md`. Fallback: file absent β†’ one `N/A` row after Step 3 and STOP.
104
90
  - [ ] **Git History:** Steps 2, 7 β€” commits since the previous report, 90-day churn. Fallback: closures and churn `Not Checked`.
105
91
  - [ ] **Web:** Step 10 β€” fetch anchor standards. Fallback: versions recorded as unread.
106
92
 
107
93
  #### Conditional
108
94
 
109
- Verify only when applicable.
110
-
111
95
  - [ ] **Language Server:** Typed language β†’ Steps 5, 6 β€” symbol location and callers, e.g. Serena, `tsserver`. Fallback: text search. A close that needs a caller set stays a hypothesis until corroborated.
112
96
  - [ ] **Tracker:** Issues wired β†’ Steps 6, 8 β€” open issue, acceptance criteria, comments on issues closed since the previous report. Fallback: tracker pointers `Not Checked`.
113
97
  - [ ] **Run Stats:** `.bkit/stats.jsonl` has `outcome` rows β†’ Step 3 β€” sum `deferralsAdded`. Fallback: inflow `Not Checked`.
114
98
 
115
99
  ### πŸ”’ Gate 1: Prerequisites Check
116
100
 
117
- **Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
118
-
119
101
  - [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
120
- - [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
102
+ - [ ] **Gate 1 β€” Verified:** All Core items checked. All applicable Conditional items checked.
121
103
 
122
104
  ### Probe Steps
123
105
 
124
- - [ ] **Step 1 β€” Previous Run:** Audited commit = this report's `bkit:anchor` `baseSha`. Read newest prior report for this slug under `docs/audits/`; its commit = its `bkit:anchor` `baseSha`, else the HEAD its `Previous Run` recorded. Count findings fixed / still open; age of oldest open. Open after 2 runs β†’ re-raise with age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
106
+ - [ ] **Step 1 β€” Previous Run:** **Done when:** closure rate in `Previous Run`, or run marked baseline.
125
107
  - [ ] **Step 2 β€” Closures:** Re-verify every DONE and SUPERSEDED row from the previous report at `HEAD`. Each that no longer holds = finding, with what changed. **Done when:** `Closures` holds every row, each failure, and the failure rate, or run marked baseline.
126
- - [ ] **Step 3 β€” Fold:** Last-row-wins per `key`, not per line. Append-only (`.gitattributes` `merge=union`); editing a line keeps stale copy beside replacement. Highest numeric `ts` wins (`.bkit/jsonl.md` Β§ Updating a Row). Non-numeric `ts` on a `key` β†’ last line in file is latest. Open = every winning row with `status != "CLOSED"`, including `TRIAGED`, `RESOLVED`, `BLOCKED`, `SUPERSEDED`, `CANCELLED`, free text after the word, missing `status`, and any value outside the enum. Finished-looking words β‰  done. Order: `CRITICAL`, then `HIGH`, then oldest `ts`. Compare `severity` case-insensitively. No `severity` β†’ assign with verdict. Trend vs previous report: open count; inflow = sum `deferralsAdded` on `outcome` rows in `.bkit/stats.jsonl` since previous run where field exists; outflow = rows that became `CLOSED` since; age histogram by `ts`; share of open rows missing `severity` or `reason`. Large open set may be partial pass β†’ record rows verified / rows open. Invisible to fold: deferral with no `key`, or recorded only in a PR description. **Done when:** `Trend` holds counts, histogram, inflow, outflow, missing-field share, verified / open, and those limits, or `N/A` and STOP.
108
+ - [ ] **Step 3 β€” Fold:** Last-row-wins per `key`, not per line. Append-only (`.gitattributes` `merge=union`); editing a line keeps stale copy beside replacement. Highest numeric `ts` wins (`.bkit/jsonl.md` Β§ Updating a Row). Non-numeric `ts` on a `key` β†’ last line in file is latest. Open = every winning row with `status != "CLOSED"`, including `TRIAGED`, `RESOLVED`, `BLOCKED`, `SUPERSEDED`, `CANCELLED`, free text after the word, missing `status`, and any value outside the enum. Finished-looking words != done. Order: `CRITICAL`, then `HIGH`, then oldest `ts`. Compare `severity` case-insensitively. No `severity` β†’ assign with verdict. Trend vs previous report: open count; inflow = sum `deferralsAdded` on `outcome` rows in `.bkit/stats.jsonl` since previous run where field exists; outflow = rows that became `CLOSED` since; age histogram by `ts`; share of open rows missing `severity` or `reason`. Large open set may be partial pass β†’ record rows verified / rows open. Invisible to fold: deferral with no `key`, or recorded only in a PR description. **Done when:** `Trend` holds counts, histogram, inflow, outflow, missing-field share, verified / open, and those limits, or `N/A` and STOP.
127
109
  - [ ] **Step 4 β€” Defects:** Winning row of each `key`. Do not append. `Expected` = row writer appends: copy latest row, change only defective field, same `key`, `ts` minted at append, never literal and never in the future.
128
110
 
129
111
  <!-- prettier-ignore -->
@@ -131,7 +113,7 @@ Verify only when applicable.
131
113
  | --- | --- | --- |
132
114
  | `ts` | Not numeric Unix milliseconds: a string, seconds, or missing. Fold order is then undefined | The same row with a fresh `ts` |
133
115
  | `status` | Outside `OPEN` / `TRIAGED` / `CLOSED` (`RESOLVED`, `BLOCKED`, `SUPERSEDED`, free text) | `TRIAGED` where the row records analysis, otherwise `OPEN`, old word kept in `description`. `CLOSED` comes only from a verdict |
134
- | `reason` | Missing, or outside `scope-declared` / `hard-blocked` / `needs-decision` / `own-cycle` / `unjustified` | One of the first four the row's text supports, old text kept in `description`. Never `unjustified` |
116
+ | `reason` | Missing, or outside `scope-declared` / `hard-blocked` / `needs-decision` / `own-cycle` / `low-severity` / `unjustified` | One of the first four the row's text supports, old text kept in `description`. Never `unjustified`; `low-severity` only on a `LOW` row |
135
117
 
136
118
  Winning row with future `ts` β†’ finding names `key` for owner. No correction row. **Done when:** count of each defect, and each `Expected` row, in `Defects`, or `none`.
137
119
 
@@ -155,6 +137,7 @@ Pace reference queries. Re-run empty or surprisingly low results before close ve
155
137
  | `hard-blocked` | Is the blocker the row names still there? |
156
138
  | `needs-decision` | Was the decision made since? Search `docs/decisions.jsonl` |
157
139
  | `own-cycle` | Does a plan or an issue for it exist? |
140
+ | `low-severity` | Still `LOW`? Never `unjustified` by the four tests |
158
141
  | `scope-declared` | Does the cited doc section exist, and does it predate the row? |
159
142
 
160
143
  Blocker lifted = highest-yield finding. Flag on verdict. Apply KEEP trigger rule. **Done when:** every verified row's reason, and every KEEP trigger, has a result on the finding.
@@ -187,13 +170,11 @@ Blocker lifted = highest-yield finding. Flag on verdict. Apply KEEP trigger rule
187
170
 
188
171
  ### πŸ”’ Gate 2: Probes Check
189
172
 
190
- **Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
191
-
192
173
  - [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
193
174
  - [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
194
175
  - [ ] **Read-only:** no ledger line, code, or config changed. Every correction and close row is `Expected` only.
195
176
  - [ ] **Positive close:** every DONE and SUPERSEDED cites a positive reason, never an empty query.
196
- - [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
177
+ - [ ] **Gate 2 β€” Verified:** Every checkbox above independently verified and checked off.
197
178
 
198
179
  ## Findings
199
180
 
@@ -205,7 +186,7 @@ Blocker lifted = highest-yield finding. Flag on verdict. Apply KEEP trigger rule
205
186
  | `MEDIUM` | Data defect (`ts`, `status`, `reason`). KEEP whose trigger has fired. Real work with no issue. Reason no longer holds |
206
187
  | `LOW` | KEEP with no trigger. Missing `severity`. Locator drift. Superseded surface that changes no result |
207
188
 
208
- Scale per `.bkit/jsonl.md` Β§ Severity. Within a severity: oldest `ts` first. Finding keeps severity when it becomes a ledger row or an issue. Row bucket = ledger severity, or verdict-assigned.
189
+ Within a severity: oldest `ts` first. Finding keeps severity when it becomes a ledger row or an issue. Row bucket = ledger severity, or verdict-assigned.
209
190
 
210
191
  <!-- prettier-ignore -->
211
192
  | ID | Severity | Verdict | Location | Evidence | Expected |
@@ -277,17 +258,13 @@ PENDING
277
258
 
278
259
  ### πŸ”’ Gate 3: Report Check
279
260
 
280
- **Checkpoint.** Verify and check `[x]` all boxes below, then stop.
281
-
282
- - [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
261
+ - [ ] **No placeholders:** no `PENDING` left
283
262
  - [ ] **Summary:** names count per severity, count per verdict, and rows verified / rows open.
284
263
  - [ ] **Series:** `Trend` open count, inflow, and outflow beside previous report's numbers, or marked baseline.
285
- - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
286
- - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
264
+ - [ ] **Writes:** only this report, template `Project Instructions`, and ledger rows changed; throwaway worktrees / remote targets removed.
265
+ - [ ] **Process Improvements:** `Universal` and `Project` filled
287
266
  - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
288
- - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
289
-
290
- > `Project Instructions` below `bkit:end` are consumer-owned β€” `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
267
+ - [ ] **Gate 3 β€” Verified:** Every checkbox above independently verified and checked off.
291
268
 
292
269
  <!-- bkit:end -->
293
270
 
@@ -11,14 +11,6 @@
11
11
  >
12
12
  > **Rules:**
13
13
  >
14
- > - Read-only audit; never edit code, config, or data.
15
- > - `Universal Instructions` apply to all projects; `Project Instructions` apply only to this project.
16
- > - Local audit instructions / overrides β†’ `Project Instructions` below the bkit-managed block; universal instructions stay in-block.
17
- > - Any tools mentioned in `Universal Instructions` are examples only; swap for actual tools in final output; drop inapplicable.
18
- > - Use dense token-efficient phrasing; no filler / hedging / restating; tables > prose, bullets > paragraphs.
19
- > - Read `.agents/docs.md` β†’ load docs for workflow / step / task; skip missing; cite docs inline where required.
20
- > - Every claim cites this run's evidence (`file:line`, or command / query and its output) and tool behind it; a previous report's figure, list, or status is a lead, not evidence.
21
- > - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
22
14
  > - NEVER push, merge, label, close, or comment on a PR. NEVER commit onto the integration branch. Throwaway worktree = evidence; remove before report finishes.
23
15
  > - never resolve a lockfile conflict as text, and never with `-X ours` / `-X theirs`. NEVER run a recursive update that rewrites ranges the PRs did not name.
24
16
  > - A breaking major or a migration stays out of the batch even when green. This run records the plan; landing it is the next step.
@@ -33,7 +25,7 @@ Every dependency PR rewrites the lockfile. Unbatched β†’ PRs stale against each
33
25
 
34
26
  **Cadence:** weekly after bot open window. Extra pass: security PR outside window, bot config change on default branch, or `bkit-audit-app-store` deadline forcing SDK / target-API upgrade.
35
27
 
36
- **Anchor Standards:** record version and date read. Newer version β†’ `Standards` step reads what changed.
28
+ **Anchor Standards:**
37
29
 
38
30
  - Dependency-bot best-practice and security presets (e.g. Renovate `config:best-practices`, and the presets it extends: `security:minimumReleaseAgeNpm`, `helpers:pinGitHubActionDigests`, `docker:pinDigests`, `abandonments:recommended`, `:configMigration`). Record the bot version.
39
31
  - Package-manager supply-chain settings (e.g. pnpm `minimumReleaseAge`, `trustPolicy: no-downgrade`, `blockExoticSubdeps`, `allowBuilds`, `strictDepBuilds`).
@@ -88,40 +80,30 @@ Batch verdict, in `Summary`, not per PR. The landing push's CI is the next step'
88
80
 
89
81
  ### Pre-Flight / Dependencies
90
82
 
91
- **Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available β†’ tool and version; missing β†’ fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
92
-
93
- **Credentials:** probe direnv before marking a token / env var missing: `direnv exec . sh -c '[ -n "${VAR}" ] && echo set || echo unset'`; `unset` = missing. Run credentialed CLIs as `direnv exec . <cmd>`. No direnv (cloud session) β†’ plain env check. Report names, never values.
94
-
95
83
  #### Core
96
84
 
97
- Always verify.
98
-
99
- - [ ] **Permissions:** Before Step 1 β€” one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) β†’ record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call β†’ `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it. Call that ran but the API refused (e.g. HTTP 403 from an endpoint needing another token type, such as GitHub `GET /user/installations`) β†’ not a block; `Not Checked` only, no allow rule.
85
+ - [ ] **Permissions:** Call that ran but the API refused (e.g. HTTP 403 from an endpoint needing another token type, such as GitHub `GET /user/installations`) β†’ not a block; `Not Checked` only, no allow rule.
100
86
  - [ ] **Git Host:** Steps 2, 3, 11, 12 β€” open PRs by head-ref prefix, CI runs, behind-count, e.g. `gh`, GitLab API. Fallback: none; PR steps `Not Checked`, batch verdict `FAIL`.
101
- - [ ] **Package Manager:** Steps 5, 8–10 β€” install, lockfile, registry metadata, e.g. pnpm, npm. Fallback: none; `Batch` and `Verification` `Not Checked`, batch verdict `FAIL`.
102
- - [ ] **Clean Worktree:** Steps 8–10 β€” detached worktree off the audited commit (`bkit:anchor` `baseSha`), removed before the report finishes; local integration branch ahead of remote ref β†’ landing push carries those commits, so batch builds on them. Fallback: none; do not build the batch in the main checkout.
103
- - [ ] **Web:** Steps 13–15 β€” latest CLI releases, anchor standards, end-of-life dates, vendor support policy. Fallback: versions and days-left recorded as unread.
87
+ - [ ] **Package Manager:** Steps 5, 8-10 β€” install, lockfile, registry metadata, e.g. pnpm, npm. Fallback: none; `Batch` and `Verification` `Not Checked`, batch verdict `FAIL`.
88
+ - [ ] **Clean Worktree:** Steps 8-10 β€” detached worktree off the audited commit (`bkit:anchor` `baseSha`), removed before the report finishes; local integration branch ahead of remote ref β†’ landing push carries those commits, so batch builds on them. Fallback: none; do not build the batch in the main checkout.
89
+ - [ ] **Web:** Steps 13-15 β€” latest CLI releases, anchor standards, end-of-life dates, vendor support policy. Fallback: versions and days-left recorded as unread.
104
90
 
105
91
  #### Conditional
106
92
 
107
- Verify only when applicable.
108
-
109
93
  - [ ] **Bot Dashboard:** Bot publishes a dashboard β†’ Step 3 β€” blocked and will-not-rebase entries. Fallback: open PRs only; stopped-rebase set `Not Checked`.
110
94
  - [ ] **Config Validator:** Bot ships one β†’ Step 3 β€” e.g. `renovate-config-validator`, on the config as the default branch has it, in the bot's read mode (repository, not global / self-hosted) with runner's global options the config needs; wrong mode or missing runner option β†’ errors bot never hits (e.g. Renovate: bare file argument validates as global config; repository mode = `--no-global`, or no argument in a scratch checkout of the default-branch files, + runner `allowedEnv` as `RENOVATE_ALLOWED_ENV`, else false `allowedEnv` errors). Error left in bot's mode = finding, quoted with command; never waived as validator-only. Fallback: read the files; validity `Not Checked`.
111
95
  - [ ] **Vulnerability Scanner:** Lockfile, image, or requirements file β†’ Step 13 β€” e.g. Trivy (`trivy fs --include-dev-deps`), OSV-Scanner, `npm audit`, host advisory API, vendor repository advisories. Fallback: one source only; the missing source `Not Checked`.
112
96
 
113
97
  ### πŸ”’ Gate 1: Prerequisites Check
114
98
 
115
- **Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
116
-
117
99
  - [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
118
- - [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
100
+ - [ ] **Gate 1 β€” Verified:** All Core items checked. All applicable Conditional items checked.
119
101
 
120
102
  ### Probe Steps
121
103
 
122
- - [ ] **Step 1 β€” Previous Run:** Audited commit = this report's `bkit:anchor` `baseSha`. Read newest prior report for this slug under `docs/audits/`; its commit = its `bkit:anchor` `baseSha`, else the HEAD its `Previous Run` recorded. Count findings fixed / still open; age of oldest open. Open after 2 runs β†’ re-raise with age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
123
- - [ ] **Step 2 β€” Inventory:** From previous report, list deferred PRs and why. Deferred major whose blocker cleared β†’ first candidate. Select open PRs by head-ref prefix from updater config (`branchPrefix`, default `renovate/`; Dependabot `dependabot/`), never title or author. Token-authored PR on prefix = in scope; record author as evidence, not selector. Per PR: number, title, head ref, head SHA, mergeable, merge state, files, labels, commits behind integration branch, latest CI run (finished only; in-progress β‰  result). **Done when:** `Inventory` names prefix and config source, lists every open PR on prefix, or `none`.
124
- - [ ] **Step 3 β€” Bot Health:** No dependency updater config = CRITICAL. Examples: Renovate (`.github/renovate.json` or `.github/renovate.json5`; rules example `.bkit/templates/.github/renovate.json5`, self-hosted runner example `.bkit/templates/.github/workflows/bkit-renovate.yml`) or Dependabot (`.github/dependabot.yml`; example `.bkit/templates/.github/dependabot.yml`). See `docs/deployments.md` Β§ Dependency updaters. Both configs = finding; keep one. Bot dashboard: gather-only (bot rewrites). Record blocked entries and will-not-auto-rebase notices β†’ stale until person acts. Bot reads presets from default branch, not integration. Fence / group on integration branch inactive until release carries it. Base-config edits on integration apply only if bot merges base-branch config β€” option read from default branch. PR proposes what integration config blocks β†’ read default-branch copy before debugging rule; promotion-lag when branches differ = signal. Validate configs as default branch has them, in bot's repository mode (Pre-Flight); error left = finding. Dashboard + logs: config errors, PRs held by concurrency / hourly limits, awaiting approval, open config-migration PRs. Broken config β‰ˆ quiet week. **Done when:** `Bot Health` holds blocked PRs, config read branch, validator result, held / awaiting-approval items.
104
+ - [ ] **Step 1 β€” Previous Run:** **Done when:** closure rate in `Previous Run`, or run marked baseline.
105
+ - [ ] **Step 2 β€” Inventory:** From previous report, list deferred PRs and why. Deferred major whose blocker cleared β†’ first candidate. Select open PRs by head-ref prefix from updater config (`branchPrefix`, default `renovate/`; Dependabot `dependabot/`), never title or author. Token-authored PR on prefix = in scope; record author as evidence, not selector. Per PR: number, title, head ref, head SHA, mergeable, merge state, files, labels, commits behind integration branch, latest CI run (finished only; in-progress != result). **Done when:** `Inventory` names prefix and config source, lists every open PR on prefix, or `none`.
106
+ - [ ] **Step 3 β€” Bot Health:** No dependency updater config = CRITICAL. Examples: Renovate (`.github/renovate.json` or `.github/renovate.json5`; rules example `.bkit/templates/.github/renovate.json5`, self-hosted runner example `.bkit/templates/.github/workflows/bkit-renovate.yml`) or Dependabot (`.github/dependabot.yml`; example `.bkit/templates/.github/dependabot.yml`). See `docs/deployments.md` Β§ Dependency updaters. Both configs = finding; keep one. Bot dashboard: gather-only (bot rewrites). Record blocked entries and will-not-auto-rebase notices β†’ stale until person acts. Bot reads presets from default branch, not integration. Fence / group on integration branch inactive until release carries it. Base-config edits on integration apply only if bot merges base-branch config β€” option read from default branch. PR proposes what integration config blocks β†’ read default-branch copy before debugging rule; promotion-lag when branches differ = signal. Validate configs as default branch has them, in bot's repository mode (Pre-Flight); error left = finding. Dashboard + logs: config errors, PRs held by concurrency / hourly limits, awaiting approval, open config-migration PRs. Broken config ~ quiet week. **Done when:** `Bot Health` holds blocked PRs, config read branch, validator result, held / awaiting-approval items.
125
107
  - [ ] **Step 4 β€” Supply Chain:** Read settings as default branch has them. Record each vs bot best-practice preset and package manager supply-chain page. Bot: minimum release age >= three days (e.g. Renovate `minimumReleaseAge` / `security:minimumReleaseAgeNpm` + `internalChecksFilter: "strict"`; Dependabot `cooldown`); actions / images digest-pinned; abandonment flagging (e.g. Renovate abandonments preset); config-migration PRs enabled, where bot offers them. Package manager, where offered (e.g. pnpm): trust policy no-downgrade, exotic subdeps blocked, explicit install-script allowlist, strict dependency builds; none offered β†’ `N/A` with evidence. Release-age 0 on package manager = recorded trade-off where docs say so; re-deciding = person (`DECISION`). Gap: bot release age does not apply to lockfile-maintenance PRs (package manager makes changes; gate off β†’ no cooldown) β†’ batch with no cooldown; `Cooldown` stands in; `Screen` first. Missing / weaker setting β†’ `Recommendations` row + line to add. **Done when:** `Supply Chain` row per setting: value Β· standard Β· verdict.
126
108
  - [ ] **Step 5 β€” Cooldown:** Package-manager cooldown off or absent β†’ lockfile-maintenance PRs: no automerge; same age wait as other updates before land. Bot opens no lockfile-maintenance PRs (e.g. Dependabot) β†’ those checks `N/A`. Check: lockfile-maintenance block + matching rules β†’ no automerge; each merged lockfile-maintenance since previous run waited >= bot release age (e.g. Renovate `minimumReleaseAge`; newest version publish β†’ merge); open younger β†’ EXCLUDED + eligible date. Automerge groups that rewrite the lockfile: bot release-age check ages named packages only β†’ newest transitive version in the PR's lockfile diff vs bot release age; younger β†’ EXCLUDED + eligible date; automerge with package-manager cooldown off = finding. Same wait on other open non-security PRs: release-age check pending (e.g. `renovate/stability-days`) or newest version younger than bot release age β†’ EXCLUDED + eligible date. Security PRs bypass (Step 13). Lockfile-maintenance automerged or landed before release age = finding. **Done when:** `Cooldown` holds automerge, each merged PR wait, each open PR eligible date.
127
109
  - [ ] **Step 6 β€” Volume:** Each bot PR = lockfile rewrite + preview + CI; each rebase = another CI. Read on default branch; record what each setting would change; lines to add β†’ project-owned bot config. Grouping: related packages one PR (`group:monorepos`, `group:allNonMajor`, or equivalent). List solo opens that should group + catching rule. Schedule: one window; note outside opens (non-security) + why. Limits: concurrent, hourly, branch-concurrent; record held-back PRs. Rebase policy: conflict-only rebases skip CI on every integration move; unset β†’ record default + count rebase pushes since previous run. Lockfile PR conflicts with most dependency merges; lockfile maintenance own schedule, not every bot run. Automerge: low-risk groups passing CI via platform automerge; lockfile maintenance must not automerge while `Cooldown` off. Majors await dashboard approval; unset β†’ major PR + CI before decision. Scan scope: read bot's detected-file list (e.g. Renovate dashboard) for archived evidence, fixtures, test trees; repo-level ignore list replaces preset defaults (e.g. Renovate `ignorePaths` drops `:ignoreModulesAndTests`) β†’ list paths + PRs touching only them. Setting cutting PRs / CI β†’ `Recommendations` + line + PRs saved this run. **Done when:** `Volume` row per setting: value Β· what it would change Β· PRs saved.
@@ -138,20 +120,18 @@ Verify only when applicable.
138
120
  - [ ] **Step 10 β€” Verify:** `git status --porcelain` empty first (trap (1) in dirty tree). Frozen install β†’ static / unit / integration gate β†’ local E2E per app (store build vs deployed env tests none of batch β€” use local-build substrate). Beyond green typecheck: framework dependency doctor, where the framework ships one (e.g. `expo-doctor`; SDK-out-of-range packages compile/typecheck then break native/app); single-version check for runtime packages in `Project Instructions` (two versions = trap (3) β€” report + one version everywhere). Red may be stale install β€” clear installed deps (e.g. `node_modules`, `.venv`, `target/`), frozen install, re-run before blaming bump. Reproduce each red on audited commit without batch (clean worktree off `baseSha`); red there = baseline red β†’ `Verification` + finding, reported apart from batch, not a batch FAIL; batch judged on remaining reds. Remaining red β†’ drop suspect PR, rebuild batch, re-run; no single PR explains β†’ FAIL. **Done when:** `Verification` quotes every command and exit code, and each baseline red; `Summary` has PASS, CONCERNS, or FAIL.
139
121
  - [ ] **Step 11 β€” Plan:** Report asks and stops β€” no push, merge, close, label. Direct-push integration branch β†’ batch lands without feature-branch PR. Deployed-boundary checks on push only β†’ landing push = batch meets external services. Never merge bot PRs one-by-one: N sequential β†’ N integration runs + rebase per open PR after each; N one push β†’ one integration run. `Plan` table columns: `Wave`, `PRs`, `Commits`, `Why together, or why apart`, `Pushes`, `CI runs`. Rules: (1) Default one wave β€” all IN BATCH in one push; commit series (not squash): non-major groups, then one commit per major each with install matching manifests; each commit revert/bisect point; CI once on push head β€” `Verify` head; earlier commits β†’ frozen install + typecheck. (2) Second wave only for named reason β€” bisectability not enough; reason = production watch before next land (SDK / framework / native major, store build/submission, DB-client major); extra wave = +push, +integration run, rebase on open PRs β€” cost in row. (3) Order: security β†’ non-majors β†’ majors; within majors dependency before dependents (language before linter; UI lib + types together). (4) Unmerged automerge group β†’ batch; self-merge first = separate push + rebases β€” fold in and close at push; merged pre-landing β†’ rebase batch, drop from plan. (5) Close carried PRs right after push with `Excluded` comment β†’ landing commit; bot auto-close next run only β€” until then may rebase + CI. (6) Land after bot weekly window, no mid-landing opens/rebases, no queued integration push. (7) List excluded/deferred PRs landing will rebase + CI cost; multi-cycle exclude β†’ rebase each later push β€” recommend close + dashboard when wanted. (8) No skip-CI on dependency change; required checks test batch. Then ordered landing commands: push, close PRs + comments, labels for open. Cost one-by-one vs batch + CI already spent on branch PRs. Post-land watch: error-tracker release, error-rate / crash-free revert thresholds commit-by-commit β€” do not invent thresholds. **Done when:** `Plan` holds table, commands, both costs, watch.
140
122
  - [ ] **Step 12 β€” Excluded:** Report lists only β€” no label, comment, close. C-class + blocked stay open. Report supplies comment text (break + fix) and labels (deferred; major label on major). Comments start with marker in `Project Instructions`; next step finds marker and edits existing comment. Batch-carried PRs β†’ close after land with batch pointer. Breaking major / migration = DECISION β†’ `Recommendations`; real work β†’ issue to open. DECISION evidence (not bare PR): migration guide, breaking changes vs codebase + hit counts, codemods, peer-dep matrix, rollback path. **Done when:** `Excluded` row per out-of-batch PR: verdict Β· labels Β· comment text or DECISION evidence.
141
- - [ ] **Step 13 β€” Unseen:** Bot-blind surfaces. (a) New advisories vs committed baseline β€” delta script: not in baseline + stale entries; batch fix β†’ remove baseline entry same commit. Security PRs bypass release-age β€” confirm landing not queued; same as `bkit-audit-security`, do not duplicate. (b) Second vuln source β€” scanner on lockfile, language requirements, shipped images + host alerts + vendor repository advisories per shipped framework (e.g. `gh api repos/<owner>/<repo>/security-advisories`). Global databases (e.g. `gh api advisories/<id>`, OSV) can lag vendor advisories by days β†’ vendor advisory missing from global database = finding (scanners and CI gate blind to it); already there β†’ count once, no lag finding; no vendor advisories or host API β†’ global only, that source `Not Checked` + reason. Lockfile scanners reading first doc only β†’ empty without fail β€” confirm full read. Classify each advisory shipped, server-only, or dev-only, and say whether the vulnerable function is reachable. Destination for an advisory: `bkit-audit-security`. (c) Fix latency β€” shipped deps: publication β†’ integration land; CRITICAL ≀7d, HIGH ≀30d; breach = finding, list first. Per open `CRITICAL` / `HIGH`: earliest bot open date = fixed-version publish + bot release age (none for a security update, per (a)) + next bot run, vs deadline; bot date past deadline = finding before the breach; bot blind to advisory (vendor-only) β†’ no date, advisory itself = finding. (d) Container installing from bot-bumped manifest covered; second install line bypassing manifest = gap, back. (e) Unused deps β†’ `bkit-audit-dead-code`; unmaintained (no release >1y or archived) on new deps since last pass β†’ `Recommendations`. (f) Deprecated / abandoned whole tree β€” dashboard abandoned + frozen-install warnings. (g) Licences β€” new deps since last pass; copyleft (GPL, AGPL) or missing in shipped β†’ `Recommendations`. Production tree licence diff vs previous (BSL, SSPL, commercial upgrades too). Shipped app notices regenerated on dep change; bundled fonts/icons/images β€” licence + ship terms. (h) Off-manifest CLIs β€” bot reads manifests only. Sources: CI `run:` (global installs, `npx` / `pnpm dlx`, `curl | sh`, system packages), setup-action version inputs (e.g. `supabase/setup-cli` `version:`), build-service CLI pin (e.g. `eas.json` `cli.version`), Dockerfiles, build images, version files (e.g. `.tool-versions`), repo scripts, global-install setup docs. Per CLI: location Β· pin or `floating` (unpinned, `latest`, open range) Β· latest release, read live Β· majors behind Β· bot-watched (manifest entry or bot rule, e.g. Renovate `customManagers`) yes / no. Floating in CI / build image = finding (unreviewed version each run, bypasses release age). Major behind = finding; end of life β†’ Step 14. Unwatched β†’ `Recommendations`: move into manifest or add bot rule. **Done when:** `Unseen` holds advisories, vendor-advisory gaps, latency + earliest bot dates, container install path, deprecated packages, licence diffs, row per off-manifest CLI.
123
+ - [ ] **Step 13 β€” Unseen:** Bot-blind surfaces. (a) New advisories vs committed baseline β€” delta script: not in baseline + stale entries; batch fix β†’ remove baseline entry same commit. Security PRs bypass release-age β€” confirm landing not queued; same as `bkit-audit-security`, do not duplicate. (b) Second vuln source β€” scanner on lockfile, language requirements, shipped images + host alerts + vendor repository advisories per shipped framework (e.g. `gh api repos/<owner>/<repo>/security-advisories`). Global databases (e.g. `gh api advisories/<id>`, OSV) can lag vendor advisories by days β†’ vendor advisory missing from global database = finding (scanners and CI gate blind to it); already there β†’ count once, no lag finding; no vendor advisories or host API β†’ global only, that source `Not Checked` + reason. Lockfile scanners reading first doc only β†’ empty without fail β€” confirm full read. Classify each advisory shipped, server-only, or dev-only, and say whether the vulnerable function is reachable. Destination for an advisory: `bkit-audit-security`. (c) Fix latency β€” shipped deps: publication β†’ integration land; CRITICAL <=7d, HIGH <=30d; breach = finding, list first. Per open `CRITICAL` / `HIGH`: earliest bot open date = fixed-version publish + bot release age (none for a security update, per (a)) + next bot run, vs deadline; bot date past deadline = finding before the breach; bot blind to advisory (vendor-only) β†’ no date, advisory itself = finding. (d) Container installing from bot-bumped manifest covered; second install line bypassing manifest = gap, back. (e) Unused deps β†’ `bkit-audit-dead-code`; unmaintained (no release >1y or archived) on new deps since last pass β†’ `Recommendations`. (f) Deprecated / abandoned whole tree β€” dashboard abandoned + frozen-install warnings. (g) Licences β€” new deps since last pass; copyleft (GPL, AGPL) or missing in shipped β†’ `Recommendations`. Production tree licence diff vs previous (BSL, SSPL, commercial upgrades too). Shipped app notices regenerated on dep change; bundled fonts/icons/images β€” licence + ship terms. (h) Off-manifest CLIs β€” bot reads manifests only. Sources: CI `run:` (global installs, `npx` / `pnpm dlx`, `curl | sh`, system packages), setup-action version inputs (e.g. `supabase/setup-cli` `version:`), build-service CLI pin (e.g. `eas.json` `cli.version`), Dockerfiles, build images, version files (e.g. `.tool-versions`), repo scripts, global-install setup docs. Per CLI: location Β· pin or `floating` (unpinned, `latest`, open range) Β· latest release, read live Β· majors behind Β· bot-watched (manifest entry or bot rule, e.g. Renovate `customManagers`) yes / no. Floating in CI / build image = finding (unreviewed version each run, bypasses release age). Major behind = finding; end of life β†’ Step 14. Unwatched β†’ `Recommendations`: move into manifest or add bot rule. **Done when:** `Unseen` holds advisories, vendor-advisory gaps, latency + earliest bot dates, container install path, deprecated packages, licence diffs, row per off-manifest CLI.
142
124
  - [ ] **Step 14 β€” End of Life:** Compare versions in use with the end-of-life catalogue and each vendor's support policy. Record days left for the runtime, the framework, the native SDK, the package manager, the language, the database major, and container base images the project ships (sources in `Project Instructions`). An end of life inside 90 days is DECISION, and the report names the issue to open. **Done when:** `End of Life` row per runtime: version Β· days left Β· verdict.
143
125
  - [ ] **Step 15 β€” Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per bot preset, package-manager supply-chain setting, and Concise Guide rule β†’ checked (name step) / not applicable (why) / finding. Per bkit anchor (doc section, rule, or issue shape): one row β†’ followed (name step or evidence) / not applicable (why) / finding; departure with no recorded reason (e.g. `docs/decisions.jsonl` row, accepted-divergence entry) = finding. Unapplied recommended practice β†’ adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
144
126
  - [ ] **Step 16 β€” Anything Else:** (a) Since previous report commit β€” dependency-touching changes (manifests, workspace file, bot configs, workflow `uses:`, Dockerfiles, requirements, runtime-version files, build-image, hosting runtime) β†’ one-line verdict each. (b) ~30 min bounded pass β€” senior supply-chain gaps no step covers; since previous run: incidents, new `docs/failures.jsonl`, `bkit-audit-logs` reports, vendor status β€” what no step catches? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs β†’ propose step in `Process Improvements`.
145
127
 
146
128
  ### πŸ”’ Gate 2: Probes Check
147
129
 
148
- **Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
149
-
150
130
  - [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
151
131
  - [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
152
132
  - [ ] **Batch local:** drift check quoted with exit code; no push; throwaway worktree removed; integration branch unchanged.
153
133
  - [ ] **No landing:** no PR merged, labelled, closed, or commented on.
154
- - [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
134
+ - [ ] **Gate 2 β€” Verified:** Every checkbox above independently verified and checked off.
155
135
 
156
136
  ## Findings
157
137
 
@@ -163,7 +143,7 @@ Verify only when applicable.
163
143
  | `MEDIUM` | Updater config that scans bkit-owned trees (`.bkit/templates/**`, `.agents/skills/**`); supply-chain setting missing or weaker than the standard; setting that multiplies PR or CI runs; unmaintained or deprecated shipped dependency; end of life inside 90 days; two versions of one runtime package; off-manifest CLI floating in CI / build image, or a major behind |
164
144
  | `LOW` | Bot stopped rebasing a PR; grouping miss with no failure; shipped licence notice not regenerated; unwatched off-manifest CLI |
165
145
 
166
- Scale per `.bkit/jsonl.md` Β§ Severity. Within a severity: shipped exposure first.
146
+ Within a severity: shipped exposure first.
167
147
 
168
148
  <!-- prettier-ignore -->
169
149
  | ID | Severity | Verdict | Location | Evidence | Expected |
@@ -267,17 +247,13 @@ PENDING
267
247
 
268
248
  ### πŸ”’ Gate 3: Report Check
269
249
 
270
- **Checkpoint.** Verify and check `[x]` all boxes below, then stop.
271
-
272
- - [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
250
+ - [ ] **No placeholders:** no `PENDING` left
273
251
  - [ ] **Summary:** names count per severity, the batch verdict, and open / in-batch / excluded counts.
274
252
  - [ ] **Series:** security-fix latency and end-of-life days beside previous report's numbers, or marked baseline.
275
- - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
276
- - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
253
+ - [ ] **Writes:** only this report, template `Project Instructions`, and ledger rows changed; throwaway worktrees / remote targets removed.
254
+ - [ ] **Process Improvements:** `Universal` and `Project` filled
277
255
  - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
278
- - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
279
-
280
- > `Project Instructions` below `bkit:end` are consumer-owned β€” `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
256
+ - [ ] **Gate 3 β€” Verified:** Every checkbox above independently verified and checked off.
281
257
 
282
258
  <!-- bkit:end -->
283
259
 
@@ -11,14 +11,6 @@
11
11
  >
12
12
  > **Rules:**
13
13
  >
14
- > - Read-only audit; never edit code, config, or data.
15
- > - `Universal Instructions` apply to all projects; `Project Instructions` apply only to this project.
16
- > - Local audit instructions / overrides β†’ `Project Instructions` below the bkit-managed block; universal instructions stay in-block.
17
- > - Any tools mentioned in `Universal Instructions` are examples only; swap for actual tools in final output; drop inapplicable.
18
- > - Use dense token-efficient phrasing; no filler / hedging / restating; tables > prose, bullets > paragraphs.
19
- > - Read `.agents/docs.md` β†’ load docs for workflow / step / task; skip missing; cite docs inline where required.
20
- > - Every claim cites this run's evidence (`file:line`, or command / query and its output) and tool behind it; a previous report's figure, list, or status is a lead, not evidence.
21
- > - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
22
14
  > - NEVER paste a secret or credential value into the report.
23
15
  > - Historical records (`docs/plans/**`, `docs/archive/**`, `docs/completed.md`) and existing ledger rows are citers only; never edit them.
24
16
 
@@ -34,7 +26,7 @@ Docs are the record agents work from: memory points at them, plans cite them, co
34
26
 
35
27
  **Cadence:** monthly. Extra pass after ledger migration, `bkit upgrade`, or toolchain change (runtime, package manager, SDK, new required tool or hook).
36
28
 
37
- **Anchor Standards:** record version and date read. Newer version β†’ `Standards` step reads what changed.
29
+ **Anchor Standards:**
38
30
 
39
31
  - DiΓ‘taxis (unversioned; record the date read).
40
32
  - Docs-as-code prose linter and link checker (e.g. Vale, lychee); record versions.
@@ -71,22 +63,14 @@ Docs are the record agents work from: memory points at them, plans cite them, co
71
63
 
72
64
  ### Pre-Flight / Dependencies
73
65
 
74
- **Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available β†’ tool and version; missing β†’ fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
75
-
76
- **Credentials:** probe direnv before marking a token / env var missing: `direnv exec . sh -c '[ -n "${VAR}" ] && echo set || echo unset'`; `unset` = missing. Run credentialed CLIs as `direnv exec . <cmd>`. No direnv (cloud session) β†’ plain env check. Report names, never values.
77
-
78
66
  #### Core
79
67
 
80
- Always verify.
81
-
82
- - [ ] **Permissions:** Before Step 1 β€” one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) β†’ record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call β†’ `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
83
- - [ ] **Repo Read:** Steps 2–13 β€” live docs, instruction files, manifests, CI workflow. Fallback: none; unreadable tree = finding.
68
+ - [ ] **Permissions:** blocked calls recorded
69
+ - [ ] **Repo Read:** Steps 2-13 β€” live docs, instruction files, manifests, CI workflow. Fallback: none; unreadable tree = finding.
84
70
  - [ ] **Web:** Step 14 β€” fetch anchor standards. Fallback: versions recorded as unread.
85
71
 
86
72
  #### Conditional
87
73
 
88
- Verify only when applicable.
89
-
90
74
  - [ ] **Prose and Format:** Step 4 β€” e.g. Vale, Prettier. Fallback: skip that check; name it in `Not Checked`.
91
75
  - [ ] **Managed-Block Check:** bkit project β†’ Step 4 β€” e.g. `bkit check`. Fallback: read managed blocks; drift `Not Checked`.
92
76
  - [ ] **Link Checker:** Step 4 β€” offline fragments plus cached external URLs, e.g. lychee. Fallback: open relative links by hand; external URLs `Not Checked`.
@@ -96,14 +80,12 @@ Verify only when applicable.
96
80
 
97
81
  ### πŸ”’ Gate 1: Prerequisites Check
98
82
 
99
- **Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
100
-
101
83
  - [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
102
- - [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
84
+ - [ ] **Gate 1 β€” Verified:** All Core items checked. All applicable Conditional items checked.
103
85
 
104
86
  ### Probe Steps
105
87
 
106
- - [ ] **Step 1 β€” Previous Run:** Audited commit = this report's `bkit:anchor` `baseSha`. Read newest prior report for this slug under `docs/audits/`; its commit = its `bkit:anchor` `baseSha`, else the HEAD its `Previous Run` recorded. Count findings fixed / still open; age of oldest open. Open after 2 runs β†’ re-raise with age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
88
+ - [ ] **Step 1 β€” Previous Run:** **Done when:** closure rate in `Previous Run`, or run marked baseline.
107
89
  - [ ] **Step 2 β€” Scope:** No live docs β†’ one `N/A` row with evidence and STOP. Else every live doc. Rank by drift: per live doc, commits since that doc last changed to repo paths it cites. Record ranking. Start from up-to-date default branch with clean `git status`. Historical records are citers: pointer leads nowhere = finding, fix at target. Stale fact inside them = history, not defect. **Done when:** every live doc and drift ranking in `Scope`.
108
90
  - [ ] **Step 3 β€” Catalogue:** `.agents/docs.md`: every file on disk under `docs/` outside `plans/`, `archive/`, and `audits/` has a row, and every row's file exists; no doc listed twice (two docs on one topic = bug, including one doc in both tables with different reading columns); each row's one-line scope still matches the doc. Root `README.md` = working entry point: what the project is, links setup doc, architecture doc, and `.agents/docs.md`, and how to report a security issue. Missing community-health file with no README substitute = finding. **Done when:** `Catalogue` names every mismatch, and every clean check.
109
91
  - [ ] **Step 4 β€” Mechanical:** Run prose lint, format check, and managed-block check. Then:
@@ -160,13 +142,11 @@ Verify only when applicable.
160
142
 
161
143
  ### πŸ”’ Gate 2: Probes Check
162
144
 
163
- **Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
164
-
165
145
  - [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
166
146
  - [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
167
147
  - [ ] **No secrets:** no secret or credential value anywhere in the report.
168
148
  - [ ] **Tree clean:** no doc, ledger, memory, or instruction file changed; scratch only under repo-root `tmp/`.
169
- - [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
149
+ - [ ] **Gate 2 β€” Verified:** Every checkbox above independently verified and checked off.
170
150
 
171
151
  ## Findings
172
152
 
@@ -178,7 +158,7 @@ Verify only when applicable.
178
158
  | `MEDIUM` | Drifted `file:line`, count, or list; table that renders as raw text or drops cells; setup command wrong but recoverable; missing runbook; missing generated reference; same topic in two docs; mixed DiΓ‘taxis quadrant; choice with no decision row |
179
159
  | `LOW` | Catalogue one-line scope slightly off; wording drift that changes no instruction; quadrant label with no split needed |
180
160
 
181
- Scale per `.bkit/jsonl.md` Β§ Severity. Within a severity: destructive steps and contradictions first.
161
+ Within a severity: destructive steps and contradictions first.
182
162
 
183
163
  <!-- prettier-ignore -->
184
164
  | ID | Severity | Location | Evidence | Expected |
@@ -274,17 +254,13 @@ PENDING
274
254
 
275
255
  ### πŸ”’ Gate 3: Report Check
276
256
 
277
- **Checkpoint.** Verify and check `[x]` all boxes below, then stop.
278
-
279
- - [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
257
+ - [ ] **No placeholders:** no `PENDING` left
280
258
  - [ ] **Summary:** names count per severity.
281
259
  - [ ] **Series:** load size, and setup-walk times when the walk ran, beside previous report's numbers, or marked baseline.
282
- - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
283
- - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
260
+ - [ ] **Writes:** only this report, template `Project Instructions`, and ledger rows changed; throwaway worktrees / remote targets removed.
261
+ - [ ] **Process Improvements:** `Universal` and `Project` filled
284
262
  - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
285
- - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
286
-
287
- > `Project Instructions` below `bkit:end` are consumer-owned β€” `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
263
+ - [ ] **Gate 3 β€” Verified:** Every checkbox above independently verified and checked off.
288
264
 
289
265
  <!-- bkit:end -->
290
266