@cbartens/bkit 5.2.2 → 5.2.4

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 (100) hide show
  1. package/.bkit/README.md +4 -2
  2. package/.bkit/core/.agents/context.md +2 -2
  3. package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +7 -1
  4. package/.bkit/core/.bkit/README.md +3 -1
  5. package/.bkit/core/.bkit/comparison.md +114 -45
  6. package/.bkit/core/.bkit/install.md +6 -6
  7. package/.bkit/core/.bkit/jsonl.md +3 -3
  8. package/.bkit/core/.bkit/prompts.md +6 -5
  9. package/.bkit/core/.bkit/providers.md +5 -4
  10. package/.bkit/core/.bkit/templates.md +30 -11
  11. package/.bkit/core/.bkit/workflows.md +14 -7
  12. package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +5 -1
  13. package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +8 -2
  14. package/.bkit/core/docs/templates/bkit-audit-accessibility.md +13 -2
  15. package/.bkit/core/docs/templates/bkit-audit-adoption.md +13 -2
  16. package/.bkit/core/docs/templates/bkit-audit-agents.md +13 -2
  17. package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +13 -2
  18. package/.bkit/core/docs/templates/bkit-audit-analytics.md +13 -2
  19. package/.bkit/core/docs/templates/bkit-audit-annotations.md +15 -4
  20. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +13 -2
  21. package/.bkit/core/docs/templates/bkit-audit-app-store.md +13 -2
  22. package/.bkit/core/docs/templates/bkit-audit-architecture.md +13 -2
  23. package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +13 -2
  24. package/.bkit/core/docs/templates/bkit-audit-config.md +13 -2
  25. package/.bkit/core/docs/templates/bkit-audit-cost.md +14 -3
  26. package/.bkit/core/docs/templates/bkit-audit-coverage.md +13 -2
  27. package/.bkit/core/docs/templates/bkit-audit-database.md +13 -2
  28. package/.bkit/core/docs/templates/bkit-audit-dead-code.md +13 -2
  29. package/.bkit/core/docs/templates/bkit-audit-deferrals.md +13 -2
  30. package/.bkit/core/docs/templates/bkit-audit-dependencies.md +13 -2
  31. package/.bkit/core/docs/templates/bkit-audit-documentation.md +13 -2
  32. package/.bkit/core/docs/templates/bkit-audit-duplication.md +13 -2
  33. package/.bkit/core/docs/templates/bkit-audit-failures.md +14 -3
  34. package/.bkit/core/docs/templates/bkit-audit-flakes.md +15 -4
  35. package/.bkit/core/docs/templates/bkit-audit-gates.md +13 -2
  36. package/.bkit/core/docs/templates/bkit-audit-issues.md +13 -2
  37. package/.bkit/core/docs/templates/bkit-audit-llm.md +13 -2
  38. package/.bkit/core/docs/templates/bkit-audit-logs.md +25 -13
  39. package/.bkit/core/docs/templates/bkit-audit-models.md +13 -2
  40. package/.bkit/core/docs/templates/bkit-audit-privacy.md +13 -2
  41. package/.bkit/core/docs/templates/bkit-audit-prompts.md +13 -2
  42. package/.bkit/core/docs/templates/bkit-audit-red-team.md +14 -3
  43. package/.bkit/core/docs/templates/bkit-audit-reliability.md +14 -3
  44. package/.bkit/core/docs/templates/bkit-audit-repo.md +14 -3
  45. package/.bkit/core/docs/templates/bkit-audit-security.md +15 -4
  46. package/.bkit/core/docs/templates/bkit-audit-slop.md +13 -2
  47. package/.bkit/core/docs/templates/bkit-audit-testing.md +14 -3
  48. package/.bkit/core/docs/templates/bkit-audit-usability.md +13 -2
  49. package/.bkit/core/docs/templates/bkit-plan.md +1 -1
  50. package/.bkit/core/engine/checks/tips/catalogue.ts +10 -0
  51. package/.bkit/core/engine/commands/install/check.ts +3 -11
  52. package/.bkit/core/engine/commands/install/doctor.ts +2 -3
  53. package/.bkit/core/engine/commands/install/uninstall.ts +60 -44
  54. package/.bkit/core/engine/commands/install/upgrade.ts +13 -11
  55. package/.bkit/core/engine/commands/workflow/branches.ts +72 -9
  56. package/.bkit/core/engine/commands/workflow/repo.ts +16 -2
  57. package/.bkit/core/engine/commands/workflow/workflows.ts +4 -3
  58. package/.bkit/core/engine/install/hosts.ts +14 -4
  59. package/.bkit/core/engine/ledgers/telemetry.ts +3 -4
  60. package/.bkit/core/engine/shared/bkit-latest.ts +164 -0
  61. package/.bkit/core/engine/shared/timeouts.ts +6 -0
  62. package/.bkit/core/hooks/guardrails-read.js +4 -9
  63. package/.bkit/core/hooks/guardrails-tiers.js +312 -28
  64. package/.bkit/core/prompts/bkit-audit-generate.md +21 -5
  65. package/.bkit/core/workflows/bkit-build.md +1 -1
  66. package/.bkit/core/workflows/bkit-debug.md +1 -1
  67. package/.bkit/core/workflows/bkit-design.md +1 -1
  68. package/.bkit/core/workflows/bkit-plan.md +1 -1
  69. package/.bkit/core/workflows/bkit-ship.md +1 -1
  70. package/.bkit/shared/.claude/settings.json +19 -0
  71. package/.bkit/shared/.opencode/opencode.json +21 -1
  72. package/.bkit/shared/docs/deployments.md +14 -0
  73. package/.bkit/templates/.github/workflows/bkit-ci.yml +9 -0
  74. package/.bkit/templates/.husky/pre-push +7 -0
  75. package/.bkit/templates/context/bkit-cloudrun.md +28 -19
  76. package/.bkit/templates/context/bkit-expo.md +30 -13
  77. package/.bkit/templates/context/bkit-inngest.md +54 -17
  78. package/.bkit/templates/context/bkit-resend.md +36 -8
  79. package/.bkit/templates/context/bkit-sentry.md +11 -4
  80. package/.bkit/templates/context/bkit-stripe.md +39 -22
  81. package/.bkit/templates/context/bkit-supabase.md +45 -20
  82. package/.bkit/templates/context/bkit-vercel.md +45 -16
  83. package/.bkit/templates/scripts/ci/accepted-advisories.json +7 -0
  84. package/.bkit/templates/scripts/ci/check-dependency-audit.mjs +200 -0
  85. package/.bkit/templates/scripts/ci/check-dependency-audit.test.mjs +127 -0
  86. package/.bkit/templates/scripts/cleanup/bkit-tmp-prune.mjs +115 -0
  87. package/CHANGELOG.md +56 -0
  88. package/README.md +76 -20
  89. package/dist/checks/tips/catalogue.js +9 -0
  90. package/dist/commands/install/check.js +3 -15
  91. package/dist/commands/install/doctor.js +2 -1
  92. package/dist/commands/install/uninstall.js +52 -45
  93. package/dist/commands/install/upgrade.js +13 -11
  94. package/dist/commands/workflow/branches.js +64 -10
  95. package/dist/commands/workflow/repo.js +14 -2
  96. package/dist/commands/workflow/workflows.js +4 -3
  97. package/dist/install/hosts.js +11 -4
  98. package/dist/shared/bkit-latest.js +150 -0
  99. package/dist/shared/timeouts.js +6 -0
  100. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -71,10 +71,13 @@ Performance numbers only matter beside the prior number, same method; unfixed me
71
71
 
72
72
  **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.
73
73
 
74
+ **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.
75
+
74
76
  #### Core
75
77
 
76
78
  Always verify.
77
79
 
80
+ - [ ] **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.
78
81
  - [ ] **Monitoring:** Steps 2–4, 6, 9, 11–13, 15 — field traces, vitals, spans per environment, e.g. Sentry, Datadog RUM, New Relic. Fallback: lab and static only; field rows `Not Checked`.
79
82
  - [ ] **Build Output:** Steps 8, 10 — production build with per-route size and render mode, e.g. `next build`, `vite build` with bundle analyser. Fallback: source read only; sizes `Not Checked`.
80
83
  - [ ] **Web:** Steps 4, 17 — fetch anchor standards and published thresholds. Fallback: versions and thresholds recorded as unread.
@@ -104,7 +107,7 @@ Verify only when applicable.
104
107
 
105
108
  ### Probe Steps
106
109
 
107
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
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.
108
111
  - [ ] **Step 2 — Measurement Basis:** Record dashboards (IDs, owned vs vendor-prebuilt — prebuilt = not editable), exact query per table; window, percentile, `n` per row; environment split plain, production count even when 0; one linked reference trace. Window or percentile ≠ previous report → new baseline, not comparison. **Done when:** all in `Measurement Basis`.
109
112
  - [ ] **Step 3 — Instrument:** Confirm before trusting; state each result — missing metric reads fine otherwise. Preview deploys (if any) with injected overlays (e.g. toolbars, comment widgets) → off at project level, else pageloads carry their requests. Every vital collected (INP `null` every route = gap). Native screen transactions and frame tracking; warm start slower than cold = untrustworthy dataset. `n` per row large enough (few hundred events on one transaction ≠ baseline). Client-side navigations measured: navigation transactions, LCP / INP after soft navigation. Fallback / degraded-path rate measured, or named blind spot. Field data CI / preview only → shape transfers, absolute times do not; say so. Each failure = finding, outranks app — until instrument honest, no fix provable. **Done when:** `Instrument` line per check.
110
113
  - [ ] **Step 4 — Field Baseline:** One table per surface, p75, ordered by load count. Web per route: LCP, INP, CLS, FCP, TTFB. Native per screen: cold / warm start, time to initial / full display, slow / frozen frames. Uncollected → `not collected`, never blank. Verdict per p75 good / needs improvement / poor vs source thresholds; mobile and desktop split; read thresholds each run, never memory; write in table header. Plus navigation table: navigation transactions per route; LCP / INP after soft navigation where reported. **Done when:** every row has verdict or `not collected` in `Field Baseline`.
@@ -248,6 +251,13 @@ PENDING
248
251
 
249
252
  PENDING
250
253
 
254
+ ### Suggested Issues
255
+
256
+ <!-- prettier-ignore -->
257
+ | # | Title | Findings | Severity | Next Step | Reason |
258
+ | --- | --- | --- | --- | --- | --- |
259
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
260
+
251
261
  ### Process Improvements
252
262
 
253
263
  PENDING
@@ -261,6 +271,7 @@ PENDING
261
271
  - [ ] **Series:** every series beside previous report's numbers, or marked baseline.
262
272
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
263
273
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
274
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
264
275
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
265
276
 
266
277
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -78,10 +78,13 @@ Stores change rules on their own schedule. New target API, higher upload SDK, pr
78
78
 
79
79
  **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.
80
80
 
81
+ **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.
82
+
81
83
  #### Core
82
84
 
83
85
  Always verify.
84
86
 
87
+ - [ ] **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
88
  - [ ] **Build Config:** Steps 2–6, 10 — app config and build profiles in repo, e.g. `app.json`, `eas.json`, `project.pbxproj`. Fallback: none; missing config = finding.
86
89
  - [ ] **Web:** Step 12 — fetch anchor standards and deadline pages. Fallback: versions and dates recorded as unread.
87
90
 
@@ -104,7 +107,7 @@ Verify only when applicable.
104
107
 
105
108
  ### Probe Steps
106
109
 
107
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
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.
108
111
  - [ ] **Step 2 — Store State:** Per platform: version · build from build service when config keeps version remotely, not local app config; store state (not submitted, in review, live); readable accounts. Read Android policy-status and app-content pages, iOS agreements page. Unaccepted updated agreement or pending declaration blocks uploads = finding → account holder, with page. **Done when:** `Store State` table per platform: version · build · target SDK · store state · accounts read · nearest deadline (filled in `Deadlines`).
109
112
  - [ ] **Step 3 — Deadlines:** Confirm each date on current store page; page wins if it differs. (a) Target API level and date vs app target SDK from last built Android bundle, not config only. (b) Memory page size: date and target API the requirement names (e.g. updates targeting that API cannot ship unless native libraries support 16 KB pages). Check `.so` alignment in last built bundle, not config. Any app shipping native code in scope. (c) Upload minimum SDK and toolchain vs build image. (d) Native framework SDK support window. (e) Store policy announced since previous run. (f) Guideline and policy diff since previous report's date, tested against app, not deadline-only. Due within 90 days = finding. Due within 30 days = at least `HIGH`. Upgrade fix → `bkit-audit-dependencies`. **Done when:** `Deadlines` row per item: requirement · date · app value · verdict.
110
113
  - [ ] **Step 4 — Declarations:** Match each declaration to `bkit-audit-privacy`'s inventory and privacy policy. Do not rebuild the inventory. (a) iOS privacy manifest — required-reason APIs for app and every third-party SDK — and store privacy labels. (b) Each SDK on vendor's commonly-used list ships own privacy manifest and signature; tracking-domain list names any tracking domain the app contacts. (c) Android data-safety form. (d) Third-party AI: review guideline requiring disclosure where personal data is shared with third parties, including third-party AI, and explicit permission before sharing (e.g. App Review Guideline 5.1.2(i)). In-app consent screen, stored consent flag gating each call, withdraw path, and privacy label describe same flow. Gap → `bkit-audit-privacy`, and plan item for consent screen. (e) Both stores require account deletion started inside the app, not only on the web. The Android form also requires a working web link, entered on the data-safety form, that names the app or developer and lets someone request deletion without reinstalling. Deleting an account revokes Sign in with Apple tokens through the revoke endpoint, and the server handles the server-to-server notifications for revoked consent and deleted accounts (e.g. Apple technote TN3194), when that provider exists. (f) Advertising-id and tracking answers match what `bkit-audit-analytics` found the app collects. Declaration mismatch = at least `HIGH` → `bkit-audit-privacy`. **Done when:** `Declarations` row per label, manifest entry, and form answer: declared · inventory · verdict.
@@ -232,6 +235,13 @@ PENDING
232
235
 
233
236
  PENDING
234
237
 
238
+ ### Suggested Issues
239
+
240
+ <!-- prettier-ignore -->
241
+ | # | Title | Findings | Severity | Next Step | Reason |
242
+ | --- | --- | --- | --- | --- | --- |
243
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
244
+
235
245
  ### Process Improvements
236
246
 
237
247
  PENDING
@@ -245,6 +255,7 @@ PENDING
245
255
  - [ ] **Series:** ratings and the listing conversion funnel beside previous report's, or marked baseline / not live.
246
256
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
247
257
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
258
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
248
259
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
249
260
 
250
261
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -72,10 +72,13 @@ File reading cannot answer acyclic package graph, hub modules, or copied types.
72
72
 
73
73
  **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.
74
74
 
75
+ **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.
76
+
75
77
  #### Core
76
78
 
77
79
  Always verify.
78
80
 
81
+ - [ ] **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.
79
82
  - [ ] **Code Graph:** Steps 2–4 — local code-only extractor, e.g. graphify via a wrapper that strips API keys. Fallback: dependency linter and text search; graph counts `Not Checked`.
80
83
  - [ ] **Dependency Linter:** Steps 5–6 — resolves through the compiler, e.g. dependency-cruiser, import-linter. Fallback: read import statements; say so per claim.
81
84
  - [ ] **Git History:** Steps 1, 9, 13 — change coupling and the diff since the previous report. Fallback: change coupling `Not Checked`.
@@ -98,7 +101,7 @@ Verify only when applicable.
98
101
 
99
102
  ### Probe Steps
100
103
 
101
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
104
+ - [ ] **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.
102
105
  - [ ] **Step 2 — Graph:** Build locally, code-only, credentials stripped, via project wrapper (never bare extract). Record tool version, `built_at_commit`, node count, edge count, cross-package edge count. Graph commit ≠ reviewed `HEAD` → findings invalid; rebuild. Derived output untracked; clean rebuild deletes only that output. After path-alias change → clean rebuild — force flag that does not clear module-resolution cache keeps stale unresolved edges. Syntax-only graph (e.g. tree-sitter) does not consult language server: path aliases and manifest names are separate inputs; losing either drops edges with no error. Keep manifests in corpus so workspace imports resolve → drop manifest-to-manifest edges before matrix. Skip whole-repo render; use package and module rollups. Dated extractor backups (if the tool keeps them) accumulate; clean rebuild clears them. **Done when:** commit, counts, tool list in `Graph`, or absent tool in `Not Checked`.
103
106
  - [ ] **Step 3 — Report:** Read extractor report. Every finding-like section checked against source before it counts. Import cycles: type-only edges erased at compile time ≠ runtime cycle — check every edge. Cross-package edges: do not dismiss as impossible once aliases resolve; do dismiss manifest-to-manifest. God nodes: high degree = look, not defect. Community dump with numbered labels and near-zero cohesion → clustering found no structure — skip. **Done when:** each section dispositioned in `Graph`.
104
107
  - [ ] **Step 4 — Structure:** Query built graph, then graph file. Filters first: code only (source extensions; drop manifests and config); tests separated with repo's one test-path rule — do not type a shorter list. Test files cross boundaries; counting them as product hides shape. Views with/without test code can both be correct — record which. Dependency-shaped edges only (import, re-export, dynamic import). Nesting ≠ dependency. Name-matching edges (e.g. `indirect_call`) can invent links between unrelated files sharing a function name — exclude. Blast-radius under-reports: missed callers in anonymous callbacks, calls in module-level initialisers. Blast-radius set = starting set, never complete. Checks (each a series): (1) package dependency matrix, code-only, back-edges (library→app, leaf→consumer) — should be DAG; per workspace Ca, Ce, instability I = Ce/(Ca+Ce), abstractness (share of exported types and interfaces); flag package depending on less stable one. (2) File-level cycles (SCC over import edges); component >1 file = candidate → type-only check. (3) Fan-in: files everything imports. (4) Fan-out: most imports — barrels and god modules. (5) Duplicate symbol names: group callables by label across distinct non-test source files; ≥3 definitions = prompt. False positives: per-directory handlers, platform splits (e.g. `.native` / `.web`). Signal = type/component duplicated where canonical exists. Same grouping over test code alone. Copies without shared name → text search. Confirmed hits → `bkit-audit-duplication`. **Done when:** matrix, cycles, rankings, duplicates in `Structure`.
@@ -199,6 +202,13 @@ PENDING
199
202
 
200
203
  PENDING
201
204
 
205
+ ### Suggested Issues
206
+
207
+ <!-- prettier-ignore -->
208
+ | # | Title | Findings | Severity | Next Step | Reason |
209
+ | --- | --- | --- | --- | --- | --- |
210
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
211
+
202
212
  ### Process Improvements
203
213
 
204
214
  PENDING
@@ -212,6 +222,7 @@ PENDING
212
222
  - [ ] **Series:** node, edge, and cross-package counts, and the coupling table, beside previous report's numbers, or marked baseline.
213
223
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
214
224
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
225
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
215
226
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
216
227
 
217
228
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -73,10 +73,13 @@ CI time gets re-argued from impressions. Two mistakes recur:
73
73
 
74
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
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
+
76
78
  #### Core
77
79
 
78
80
  Always verify.
79
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.
80
83
  - [ ] **CI API:** Steps 2–6, 10–11 — read-only run and job metadata, e.g. `gh run view`, `gh api`. Fallback: workflow files only; timings `Not Checked`.
81
84
  - [ ] **Workflow Files:** Steps 3, 7–10 — workflows, task graph, cache config readable. Fallback: none; those steps `Not Checked`.
82
85
  - [ ] **Web:** Step 12 — fetch anchor standards and current runner prices. Fallback: versions and prices unread. never reuse a previous report's prices.
@@ -99,7 +102,7 @@ Verify only when applicable.
99
102
 
100
103
  ### Probe Steps
101
104
 
102
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
105
+ - [ ] **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.
103
106
  - [ ] **Step 2 — Reference:** Name reference run ids, event type, date. Push to integration branch vs pull request = different pipelines (some lanes push-only); never compare as one number without saying so. Record green/red per run — red lanes exit early and under-report duration. Runner classes and external queues drift; date matters. **Done when:** `Reference` holds ids, event types, conclusions, date.
104
107
  - [ ] **Step 3 — Lanes:** Per job: conclusion, duration, start, column for holds-the-run-open (duration alone is not that column). Add queue time — duration start→completion hides runner wait. Queue = run created → job started; with `needs:` subtract upstream finish for runner wait; keep `needs:` wait for Step 5. Cross-check host average queue per job. e.g. GitHub Actions:
105
108
 
@@ -219,6 +222,13 @@ PENDING
219
222
 
220
223
  PENDING
221
224
 
225
+ ### Suggested Issues
226
+
227
+ <!-- prettier-ignore -->
228
+ | # | Title | Findings | Severity | Next Step | Reason |
229
+ | --- | --- | --- | --- | --- | --- |
230
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
231
+
222
232
  ### Process Improvements
223
233
 
224
234
  PENDING
@@ -232,6 +242,7 @@ PENDING
232
242
  - [ ] **Series:** every series beside previous report's numbers, or marked baseline.
233
243
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
234
244
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
245
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
235
246
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
236
247
 
237
248
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -73,10 +73,13 @@ Code is reviewed; dashboards are not. Dashboard changes (hosting, database, paym
73
73
 
74
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
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
+
76
78
  #### Core
77
79
 
78
80
  Always verify.
79
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.
80
83
  - [ ] **Variable Listing:** Steps 2, 3 — names per environment from every host, CI, and secret store (e.g. `vercel env ls`, `gh secret list` / `gh variable list`, `gcloud secrets list`, `eas env:list`). Fallback: repo-declared names only; environments `Not Checked`.
81
84
  - [ ] **Platform Read:** Steps 4–6 — read-only dashboard / CLI / management API per platform (e.g. Vercel API, Supabase Management API, Stripe CLI, Sentry API). Fallback: repo and docs only; platform side `Not Checked`.
82
85
  - [ ] **Audit Logs:** Step 6 — per-platform settings-change history (e.g. Vercel team activity, Supabase org audit log, GitHub org / repo audit log). Fallback: snapshot diff only; set-and-reverted changes `Not Checked`.
@@ -103,7 +106,7 @@ Verify only when applicable.
103
106
 
104
107
  ### Probe Steps
105
108
 
106
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
109
+ - [ ] **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.
107
110
  - [ ] **Step 2 — Variables:** Every variable declared (env schema / loader, if any) or read in code (e.g. `process.env.X`, `os.environ[...]`) → where set: example env files, each hosting environment (e.g. development / preview / production), CI secrets and variables, secret manager, mobile build service (where used). One matrix, names only. Missing from an environment that runs code reading it = finding unless a doc says why. Set where nothing declares it → `bkit-audit-dead-code`. **Done when:** `Variables` matrix: variable × environment, names only.
108
111
  - [ ] **Step 3 — Variable Handling:** Per matrix variable: (a) build-time public prefix (e.g. `NEXT_PUBLIC_*`, `EXPO_PUBLIC_*`, `VITE_*`) inlined into shipped bundle → never a secret; change needs rebuild, not env change. Search preview build's client bundle for server-only names and secret-key prefixes (e.g. `sk_live_`); presence only. (b) Secret held as host's secret type (unreadable back from dashboard / CLI). Preview holding production secret (e.g. DB service-role key, live payments key) = finding. (c) Missing / malformed value rejected at startup (e.g. env schema loader) in every environment, not first use; silent default differing between environments = finding. (d) Feature flags: owner, date added, value per environment; preview ≠ production with no doc saying why = drift; same everywhere → `bkit-audit-dead-code`. (e) Value parity: secret held in ≥2 stores for one environment (env file, hosting, CI, secret manager, mobile build service, function secrets) → same value everywhere; name present everywhere proves nothing (rotated in one store, stale in the rest). Compare SHA-256 fingerprints, never values: readable store → hash live value in-process; write-only store (e.g. GitHub Actions secrets) → fingerprint at last recorded push vs source, and `updated_at` vs that push (later = changed outside the sync). Store holding a name the deployed code no longer reads (renamed, stale) = finding. Unprovable → `Not Checked`, never pass. (f) Source: every secret has one declared source every store is compared against (e.g. sync config with one row per secret naming every store); copy no API reaches (pasted into a provider dashboard, e.g. webhook signing secret) → listed in a copy inventory with how to update it. No declared source, or unlisted hand-set copy = finding; no sync tooling → `Process Improvements` proposes one (e.g. bkit package template `.bkit/templates/scripts/secrets/`). Push path bypassing the sync → `bkit-audit-security`. **Done when:** every matrix variable answers (a)–(f) in `Variables`.
109
112
  - [ ] **Step 4 — Platform Settings:** Per platform in use (e.g. hosting: Vercel, Netlify; DB / auth: Supabase, RDS, Auth0; mobile build: EAS), only settings the platform has; none → `N/A`. Dashboard vs repo / docs — hosting: build command, function regions / durations, deployment protection, deployment checks; DB + auth: config file (if any) vs each hosted project (e.g. auth settings, redirect URLs, email templates, rate limits, extensions, scheduled DB jobs vs docs); background jobs: registered per environment vs code registry; webhooks (payments, email): endpoints, subscribed events, inbound routes vs docs; error tracker: alert rules, monitors vs docs; mobile: build profiles / environments vs build config. Auth (config file, dev, production), where offered: site URL, redirect allow-list (no wildcard preview URLs in production), token / OTP expiry, leaked-password protection, SMTP sender, auth rate limits. Mobile config vs builds: runtime version, OTA-update channel per branch (if OTA updates ship, e.g. EAS Update), bundle ids — mismatch breaks OTA silently. Classify: in code / documented / recorded nowhere; recorded nowhere = finding even when value is right (next environment will not get it). **Done when:** `Platform Settings` row per setting: platform · environment · where recorded · verdict.
@@ -208,6 +211,13 @@ PENDING
208
211
 
209
212
  PENDING
210
213
 
214
+ ### Suggested Issues
215
+
216
+ <!-- prettier-ignore -->
217
+ | # | Title | Findings | Severity | Next Step | Reason |
218
+ | --- | --- | --- | --- | --- | --- |
219
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
220
+
211
221
  ### Process Improvements
212
222
 
213
223
  PENDING
@@ -221,6 +231,7 @@ PENDING
221
231
  - [ ] **Series:** `Snapshot` diffed against previous report's, or marked baseline.
222
232
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
223
233
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
234
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
224
235
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
225
236
 
226
237
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -75,10 +75,13 @@ One per vendor, and one per paid resource inside a vendor that has several.
75
75
 
76
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
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
+
78
80
  #### Core
79
81
 
80
82
  Always verify.
81
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.
82
85
  - [ ] **Bills:** Steps 3–5, 8 — invoices or billing export (e.g. FOCUS), read-only plan/usage/cap pages (e.g. host dashboard, cloud billing console, vendor API). Fallback: unread vendor = `ASK`; tax, foreign exchange, and card fees `Not Checked`.
83
86
  - [ ] **Code Search:** Steps 3, 6, 7 — SDKs, outbound hosts, reference checks (e.g. ripgrep, language-server references). Fallback: docs and invoices only; `REMOVE` proof marked incomplete.
84
87
  - [ ] **Web:** Step 9 — fetch anchor standards. Fallback: versions recorded as unread.
@@ -99,12 +102,12 @@ Verify only when applicable.
99
102
 
100
103
  ### Probe Steps
101
104
 
102
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
105
+ - [ ] **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.
103
106
  - [ ] **Step 2 — Detect:** Find paid vendors, usage-billed APIs, or payment / store fees (manifests, outbound hosts, vendor docs). **Done when:** evidence in `Checked`, or `N/A` and STOP.
104
107
  - [ ] **Step 3 — Inventory:** Build list from code (SDKs, outbound hosts), docs (vendor list, secrets list), and owner-shared invoices; compare. In code, not docs = finding (doc fix → `bkit-audit-documentation`). On invoice, nowhere in code = `REMOVE` candidate. Count non-vendor-plan fees (card-processor, app-store commission): grow with paying accounts; no vendor dashboard. Replaced platform still billing after replacement shipped = `REMOVE` candidate. **Done when:** `Vendors` lists every vendor with its sources.
105
108
  - [ ] **Step 4 — Plans:** Per vendor: plan, billing model (flat, per seat, per use), spend last three months, usage driver, plan limit, proximity to limit. Split by environment; preview/dev billed like production = finding. Per usage-billed vendor: preview/E2E/CI vs production share, by feature where vendor can tell. Log audit environment split → start from `bkit-audit-logs`. E2E-driven usage on usage-billed vendor = `RIGHT-SIZE` candidate. Every free-tier resource production/CI depends on; behavior at limit (e.g. free DB pauses, free monitor stops). Free tier failing hard = finding even at $0 today. Compare monthly vs annual, prepaid credits, startup programmes, committed-use discounts; propose commitment only if usage stable ≥3 months. Record billing currency, card FX fees, sales tax/VAT/GST/reverse-charge correctness (invoice + card statement, not dashboards). **Done when:** `Vendors` row per vendor: verdict · plan · billing model · three-month spend · change since previous report · driver · limit · environment split. Total spend included.
106
109
  - [ ] **Step 5 — Unit Cost:** Total monthly cost ÷ active accounts and active users; split fixed/variable. Per metered feature, cost per action (e.g. per model assist, per inbound message). Series vs previous report: without unit cost, bill health is undecidable as usage grows. vs revenue: price × assumed conversion, less processor fees and store commission, vs cost per account. Account costing more than it pays = finding with assumptions. **Done when:** `Unit Cost` holds figures, trend, assumptions.
107
- - [ ] **Step 6 — Drivers:** Per usage-billed service: code driving the meter and worst case (retry, tenant fan-out, cron frequency). Multiplier with no upper bound = finding. Model-call multiplier also names `bkit-audit-llm` (in-code limits); other unbounded multipliers name `docs/failures.jsonl` row to append (append = next step). Egress/data transfer own line: grow with users, unnamed in code (DB egress, cached egress, host data transfer, origin transfer, storage transforms, log-drain egress); top routes/buckets by bytes. Observability metered: log drains, host observability events, replay, trace sample rates in code. From drivers, forecast monthly cost at 10× and 100× today's active accounts; name first vendor whose tier breaks and month at current growth. CI minutes → `bkit-audit-ci-performance`; do not analyse here. **Done when:** `Drivers` row per meter; `Forecast` holds 10×, 100×, first tier break, month.
110
+ - [ ] **Step 6 — Drivers:** Per usage-billed service: code driving the meter and worst case (retry, tenant fan-out, cron frequency). Multiplier with no upper bound = finding. Model-call multiplier also names `bkit-audit-llm` (in-code limits); other unbounded multipliers → `docs/failures.jsonl` row, which the audit agent writes. Egress/data transfer own line: grow with users, unnamed in code (DB egress, cached egress, host data transfer, origin transfer, storage transforms, log-drain egress); top routes/buckets by bytes. Observability metered: log drains, host observability events, replay, trace sample rates in code. From drivers, forecast monthly cost at 10× and 100× today's active accounts; name first vendor whose tier breaks and month at current growth. CI minutes → `bkit-audit-ci-performance`; do not analyse here. **Done when:** `Drivers` row per meter; `Forecast` holds 10×, 100×, first tier break, month.
108
111
  - [ ] **Step 7 — Leftovers:** Seats for people who no longer need them — cost only here; access → `bkit-audit-security`. Idle resources: projects, DBs, monitors, buckets, domains from experiments. Duplicates: two vendors, one job. **Done when:** `Leftovers` row per hit with monthly amount and verdict.
109
112
  - [ ] **Step 8 — Caps:** Per usage-billed vendor: spend cap or budget alert, amount, recipients. No cap and no alert = finding even when spend is small. When hit:
110
113
  - Notify, stop spend, or pause service; whether hit = outage. Notify-only may leave production serving; pause may take production down (e.g. host spend limit notifies unless production deploys paused). Record check frequency; lag → overshoot.
@@ -196,6 +199,13 @@ PENDING
196
199
 
197
200
  PENDING
198
201
 
202
+ ### Suggested Issues
203
+
204
+ <!-- prettier-ignore -->
205
+ | # | Title | Findings | Severity | Next Step | Reason |
206
+ | --- | --- | --- | --- | --- | --- |
207
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
208
+
199
209
  ### Process Improvements
200
210
 
201
211
  PENDING
@@ -209,6 +219,7 @@ PENDING
209
219
  - [ ] **Series:** `Vendors` spend, `Unit Cost`, and `Forecast` beside previous report's numbers, or marked baseline.
210
220
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
211
221
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
222
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
212
223
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
213
224
 
214
225
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -66,10 +66,13 @@ Static floor: coverage climbs, gate far below, large drop passes green. One-run
66
66
 
67
67
  **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.
68
68
 
69
+ **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.
70
+
69
71
  #### Core
70
72
 
71
73
  Always verify.
72
74
 
75
+ - [ ] **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.
73
76
  - [ ] **CI History:** Steps 4, 5, 7, 10 — branch coverage from full CI runs, e.g. `gh run list` / `gh run download`, GitLab pipelines, Codecov. Fallback: local re-runs fill gap; mark every local observation.
74
77
  - [ ] **Coverage Artifacts:** Steps 6, 7, 11, 12 — summary and per-file coverage, e.g. `coverage-summary.json`, `coverage-final.json`, lcov. Fallback: percentages only; file-level claims `Not Checked`.
75
78
  - [ ] **Git History:** Steps 3, 9, 15 — `git log -L` / `git log -p` on floor values and coverage config. Fallback: current tree only; history `Not Checked`.
@@ -92,7 +95,7 @@ Verify only when applicable.
92
95
 
93
96
  ### Probe Steps
94
97
 
95
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
98
+ - [ ] **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.
96
99
  - [ ] **Step 2 — Detect:** Find coverage floor gate (CI job, script, or threshold failing below committed number) and where number is stored. List hard-gated vs report-only surfaces. Metric = branch coverage unless recorded decision names another; line, statement, function percentages are not floors. None → `N/A` and STOP. **Done when:** gate path, metric, surface list in `Checked`, or `N/A` and STOP.
97
100
  - [ ] **Step 3 — History:** Since previous report's commit: no floor dropped (`git log -L` on each floor value and coverage include / exclude). Floor never moves down; drop is fixed, not accommodated. Diff exclusions. Count ignore hints under each gated glob, then and now (e.g. `v8 ignore`, `istanbul ignore`, `c8 ignore`, `# pragma: no cover`). Each new exclusion and ignore hint, with commit = finding. **Done when:** `History` lists every floor change, new exclusion, and new ignore hint, or `none`.
98
101
  - [ ] **Step 4 — Sample:** Per gated surface, ≥10 full runs: same commit, or most recent full CI runs on default branch. CI history first; local re-run only to fill gap; mark local observations. Record every run id. No partial lane. Never ratchet off single run. **Done when:** `Sample` holds ≥10 observations per gated surface, or named shortfall and that floor not tightened.
@@ -199,6 +202,13 @@ PENDING
199
202
 
200
203
  PENDING
201
204
 
205
+ ### Suggested Issues
206
+
207
+ <!-- prettier-ignore -->
208
+ | # | Title | Findings | Severity | Next Step | Reason |
209
+ | --- | --- | --- | --- | --- | --- |
210
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
211
+
202
212
  ### Process Improvements
203
213
 
204
214
  PENDING
@@ -212,6 +222,7 @@ PENDING
212
222
  - [ ] **Series:** `Sample` spreads and the floor series beside previous report's numbers, or marked baseline.
213
223
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
214
224
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
225
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
215
226
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
216
227
 
217
228
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -65,10 +65,13 @@ Migrations and integration tests exercise queries; neither verifies privileges,
65
65
 
66
66
  **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.
67
67
 
68
+ **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.
69
+
68
70
  #### Core
69
71
 
70
72
  Always verify.
71
73
 
74
+ - [ ] **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.
72
75
  - [ ] **Catalogue Read:** Steps 3–16 — read-only SQL (or store's read-only API) per environment, e.g. platform MCP `execute_sql`, `psql` as read-only role. Fallback: local DB from migrations; remote claims = hypotheses.
73
76
  - [ ] **Local DB:** Steps 2, 10, 14 — replayable from migrations. Fallback: rolled-back transactions and remote re-check.
74
77
  - [ ] **Web:** Step 18 — fetch anchor standards. Fallback: versions recorded as unread.
@@ -92,7 +95,7 @@ Verify only when applicable.
92
95
 
93
96
  ### Probe Steps
94
97
 
95
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
98
+ - [ ] **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.
96
99
  - [ ] **Step 2 — Detect:** Find migrations / schema file / DB client. Confirm local DB matches migrations before trusting local measurements. Schema doc absent, migrations exist → missing doc = finding; still read migrations. **Done when:** evidence in `Checked`, or `N/A` and STOP.
97
100
  - [ ] **Step 3 — Advisors:** Run platform security and performance advisors; each row = candidate, not finding. One line per lint the platform's advisor runs, even when clean (e.g. Supabase: unindexed FKs, duplicate indexes, per-row auth in policy, multiple permissive policies, mutable function `search_path`, extension in public schema, exposed table without row-level security, owner-rights view). No advisor → engine-appropriate subset by catalogue query; rest `N/A`. Cite platform fix pattern per finding. **Done when:** every row dispositioned in `Advisors`.
98
101
  - [ ] **Step 4 — Checklist:** Walk platform production checklist against production, not memory: transport encryption enforced, network restrictions, org MFA, >1 owner, point-in-time recovery where size / RPO needs it, compute sized for `Connections` peak. **Done when:** every item met / not met (finding) / not applicable (why).
@@ -207,6 +210,13 @@ PENDING
207
210
 
208
211
  PENDING
209
212
 
213
+ ### Suggested Issues
214
+
215
+ <!-- prettier-ignore -->
216
+ | # | Title | Findings | Severity | Next Step | Reason |
217
+ | --- | --- | --- | --- | --- | --- |
218
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
219
+
210
220
  ### Process Improvements
211
221
 
212
222
  PENDING
@@ -220,6 +230,7 @@ PENDING
220
230
  - [ ] **Series:** every series beside previous report's numbers, or marked baseline.
221
231
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
222
232
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
233
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
223
234
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
224
235
 
225
236
  > `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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -75,10 +75,13 @@ Dead code = control that looks live, is not: limiter on unset env var; E2E asser
75
75
 
76
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
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
+
78
80
  #### Core
79
81
 
80
82
  Always verify.
81
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.
82
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.
83
86
  - [ ] **Text Search:** Steps 5–14 — repo search (`git grep`, ripgrep). Fallback: none → those steps `Not Checked`.
84
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`.
@@ -104,7 +107,7 @@ Verify only when applicable.
104
107
 
105
108
  ### Probe Steps
106
109
 
107
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
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.
108
111
  - [ ] **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). **Done when:** `Detectors` lists each config and resolved value.
109
112
  - [ ] **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. 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. **Done when:** version, both runs, plugin-load errors in `Reachability`.
110
113
  - [ ] **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.
@@ -229,6 +232,13 @@ PENDING
229
232
 
230
233
  PENDING
231
234
 
235
+ ### Suggested Issues
236
+
237
+ <!-- prettier-ignore -->
238
+ | # | Title | Findings | Severity | Next Step | Reason |
239
+ | --- | --- | --- | --- | --- | --- |
240
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
241
+
232
242
  ### Process Improvements
233
243
 
234
244
  PENDING
@@ -242,6 +252,7 @@ PENDING
242
252
  - [ ] **Series:** `Reachability` counts and `Runtime` zeroes beside previous report's numbers, or marked baseline.
243
253
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
244
254
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
255
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
245
256
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
246
257
 
247
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.
@@ -1,4 +1,4 @@
1
- <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. `@bkit-audit-generate` fills this template. -->
1
+ <!-- Note: Reports live at `docs/audits/{YYYYMM}/{slug}.md`. `{YYYYMM}` = UTC month of this run. `{slug}` = template basename without `bkit-audit-` and `.md`. **If** that month already has `{slug}.md` or `{slug}-{TIMESTAMP}.md` → write `{slug}-{TIMESTAMP}.md` (`{TIMESTAMP}` = `date -u +%Y%m%dT%H%M%SZ`). Never overwrite. The report is stamped with a `bkit:anchor` block recording the audited commit (`baseSha`) and branch (`baseRef`); never hand-author or edit it. `@bkit-audit-generate` fills this template. -->
2
2
 
3
3
  <!-- bkit:start -->
4
4
 
@@ -93,10 +93,13 @@ Never set `unjustified` while repairing a missing or illegal `reason`. That repa
93
93
 
94
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
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
+
96
98
  #### Core
97
99
 
98
100
  Always verify.
99
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.
100
103
  - [ ] **Ledger:** Steps 3–9 — `docs/deferrals.jsonl` and `.bkit/jsonl.md`. Fallback: file absent → one `N/A` row after Step 3 and STOP.
101
104
  - [ ] **Git History:** Steps 2, 7 — commits since the previous report, 90-day churn. Fallback: closures and churn `Not Checked`.
102
105
  - [ ] **Web:** Step 10 — fetch anchor standards. Fallback: versions recorded as unread.
@@ -118,7 +121,7 @@ Verify only when applicable.
118
121
 
119
122
  ### Probe Steps
120
123
 
121
- - [ ] **Step 1 — Previous Run:** Record `git rev-parse HEAD`. Read newest prior report for this slug under `docs/audits/`. 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.
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.
122
125
  - [ ] **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.
123
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.
124
127
  - [ ] **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.
@@ -261,6 +264,13 @@ PENDING
261
264
 
262
265
  PENDING
263
266
 
267
+ ### Suggested Issues
268
+
269
+ <!-- prettier-ignore -->
270
+ | # | Title | Findings | Severity | Next Step | Reason |
271
+ | --- | --- | --- | --- | --- | --- |
272
+ | PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
273
+
264
274
  ### Process Improvements
265
275
 
266
276
  PENDING
@@ -274,6 +284,7 @@ PENDING
274
284
  - [ ] **Series:** `Trend` open count, inflow, and outflow beside previous report's numbers, or marked baseline.
275
285
  - [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
276
286
  - [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
287
+ - [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
277
288
  - [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
278
289
 
279
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.