@cbartens/bkit 0.0.0-stage → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bkit/README.md +417 -0
- package/.bkit/core/.agents/context.md +95 -0
- package/.bkit/core/.agents/docs.md +62 -0
- package/.bkit/core/.agents/rules.md +147 -0
- package/.bkit/core/.agents/skills.md +43 -0
- package/.bkit/core/.bkit/LICENSE.md +151 -0
- package/.bkit/core/.bkit/README.md +417 -0
- package/.bkit/core/.bkit/cloud.md +493 -0
- package/.bkit/core/.bkit/comparison.md +321 -0
- package/.bkit/core/.bkit/install.md +401 -0
- package/.bkit/core/.bkit/jsonl.md +497 -0
- package/.bkit/core/.bkit/prompts.md +474 -0
- package/.bkit/core/.bkit/providers.md +598 -0
- package/.bkit/core/.bkit/templates.md +470 -0
- package/.bkit/core/.bkit/trackers.md +95 -0
- package/.bkit/core/.bkit/workflows.md +1550 -0
- package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +82 -0
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +93 -0
- package/.bkit/core/.claude/hooks/bkit-preflight.sh +74 -0
- package/.bkit/core/.codex/hooks/bkit-gateguard.cjs +115 -0
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +135 -0
- package/.bkit/core/.cursor/hooks/bkit-gateguard.cjs +111 -0
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +169 -0
- package/.bkit/core/.cursor/hooks/bkit-preflight.sh +63 -0
- package/.bkit/core/.opencode/plugin/bkit-gateguard.js +225 -0
- package/.bkit/core/AGENTS.md +77 -0
- package/.bkit/core/LICENSE.md +149 -0
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +272 -0
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +223 -0
- package/.bkit/core/docs/templates/bkit-audit-agents.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +227 -0
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +266 -0
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +270 -0
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +254 -0
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +221 -0
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +241 -0
- package/.bkit/core/docs/templates/bkit-audit-config.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-cost.md +218 -0
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +221 -0
- package/.bkit/core/docs/templates/bkit-audit-database.md +229 -0
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +251 -0
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +283 -0
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +268 -0
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +280 -0
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +253 -0
- package/.bkit/core/docs/templates/bkit-audit-failures.md +259 -0
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +237 -0
- package/.bkit/core/docs/templates/bkit-audit-gates.md +250 -0
- package/.bkit/core/docs/templates/bkit-audit-issues.md +273 -0
- package/.bkit/core/docs/templates/bkit-audit-llm.md +239 -0
- package/.bkit/core/docs/templates/bkit-audit-logs.md +266 -0
- package/.bkit/core/docs/templates/bkit-audit-models.md +210 -0
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +211 -0
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +216 -0
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +220 -0
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +222 -0
- package/.bkit/core/docs/templates/bkit-audit-repo.md +224 -0
- package/.bkit/core/docs/templates/bkit-audit-security.md +274 -0
- package/.bkit/core/docs/templates/bkit-audit-slop.md +200 -0
- package/.bkit/core/docs/templates/bkit-audit-testing.md +270 -0
- package/.bkit/core/docs/templates/bkit-audit-usability.md +237 -0
- package/.bkit/core/docs/templates/bkit-plan.md +476 -0
- package/.bkit/core/engine/checks/after/auth.ts +149 -0
- package/.bkit/core/engine/checks/after/ci-yml.ts +701 -0
- package/.bkit/core/engine/checks/after/github.ts +424 -0
- package/.bkit/core/engine/checks/after/index.ts +530 -0
- package/.bkit/core/engine/checks/after/managed.ts +217 -0
- package/.bkit/core/engine/checks/after/suppression.ts +53 -0
- package/.bkit/core/engine/checks/after/tools.ts +427 -0
- package/.bkit/core/engine/checks/before/context-fetch.ts +429 -0
- package/.bkit/core/engine/checks/before/env.ts +187 -0
- package/.bkit/core/engine/checks/before/files.ts +204 -0
- package/.bkit/core/engine/checks/before/index.ts +206 -0
- package/.bkit/core/engine/checks/before/mcp.ts +127 -0
- package/.bkit/core/engine/checks/before/repo.ts +77 -0
- package/.bkit/core/engine/checks/before/version.ts +67 -0
- package/.bkit/core/engine/checks/status-holes.ts +479 -0
- package/.bkit/core/engine/cli.ts +867 -0
- package/.bkit/core/engine/commands/analysis.ts +550 -0
- package/.bkit/core/engine/commands/ci/ci.ts +483 -0
- package/.bkit/core/engine/commands/comply.ts +415 -0
- package/.bkit/core/engine/commands/harvest.ts +459 -0
- package/.bkit/core/engine/commands/install/check.ts +70 -0
- package/.bkit/core/engine/commands/install/doctor.ts +254 -0
- package/.bkit/core/engine/commands/install/install.ts +550 -0
- package/.bkit/core/engine/commands/install/uninstall.ts +995 -0
- package/.bkit/core/engine/commands/install/upgrade.ts +1037 -0
- package/.bkit/core/engine/commands/launch.ts +139 -0
- package/.bkit/core/engine/commands/lib.ts +495 -0
- package/.bkit/core/engine/commands/registry.ts +53 -0
- package/.bkit/core/engine/commands/setup/setup.ts +184 -0
- package/.bkit/core/engine/commands/telemetry.ts +32 -0
- package/.bkit/core/engine/commands/workflow/branches.ts +1514 -0
- package/.bkit/core/engine/commands/workflow/context.ts +961 -0
- package/.bkit/core/engine/commands/workflow/counters.ts +268 -0
- package/.bkit/core/engine/commands/workflow/fids.ts +243 -0
- package/.bkit/core/engine/commands/workflow/issues.ts +675 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +575 -0
- package/.bkit/core/engine/commands/workflow/locks.ts +478 -0
- package/.bkit/core/engine/commands/workflow/prs.ts +1087 -0
- package/.bkit/core/engine/commands/workflow/repo.ts +220 -0
- package/.bkit/core/engine/commands/workflow/roadmap.ts +576 -0
- package/.bkit/core/engine/commands/workflow/runs.ts +2140 -0
- package/.bkit/core/engine/commands/workflow/runtime.ts +300 -0
- package/.bkit/core/engine/commands/workflow/skills.ts +118 -0
- package/.bkit/core/engine/commands/workflow/status.ts +455 -0
- package/.bkit/core/engine/commands/workflow/steps.ts +1300 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +161 -0
- package/.bkit/core/engine/commands/workflow/workflows.ts +1573 -0
- package/.bkit/core/engine/commands/workflow/workstreams.ts +164 -0
- package/.bkit/core/engine/commands/workflow/worktrees.ts +534 -0
- package/.bkit/core/engine/install/cloud-env.ts +924 -0
- package/.bkit/core/engine/install/managed-block.ts +212 -0
- package/.bkit/core/engine/install/manifest.ts +448 -0
- package/.bkit/core/engine/install/modules/claude.ts +362 -0
- package/.bkit/core/engine/install/modules/cloud.ts +173 -0
- package/.bkit/core/engine/install/modules/codex.ts +219 -0
- package/.bkit/core/engine/install/modules/core.ts +620 -0
- package/.bkit/core/engine/install/modules/cursor.ts +231 -0
- package/.bkit/core/engine/install/modules/index.ts +242 -0
- package/.bkit/core/engine/install/modules/opencode.ts +573 -0
- package/.bkit/core/engine/install/payload-links.ts +150 -0
- package/.bkit/core/engine/install/placeholders.ts +108 -0
- package/.bkit/core/engine/install/template-copies.ts +119 -0
- package/.bkit/core/engine/install/version-file.ts +284 -0
- package/.bkit/core/engine/install/write.ts +467 -0
- package/.bkit/core/engine/ledgers/clamp-log.ts +32 -0
- package/.bkit/core/engine/ledgers/status.ts +213 -0
- package/.bkit/core/engine/ledgers/telemetry.ts +1143 -0
- package/.bkit/core/engine/render/hosts.ts +372 -0
- package/.bkit/core/engine/render/models.ts +323 -0
- package/.bkit/core/engine/render/parts.ts +38 -0
- package/.bkit/core/engine/render/trackers.ts +170 -0
- package/.bkit/core/engine/shared/egress.ts +345 -0
- package/.bkit/core/engine/shared/json.ts +16 -0
- package/.bkit/core/engine/shared/log-prefix.ts +9 -0
- package/.bkit/core/engine/shared/package-json.ts +29 -0
- package/.bkit/core/engine/shared/package-manager.ts +38 -0
- package/.bkit/core/engine/shared/package-roots.ts +163 -0
- package/.bkit/core/engine/shared/protected-paths.ts +164 -0
- package/.bkit/core/engine/shared/settings.ts +72 -0
- package/.bkit/core/engine/shared/timeouts.ts +20 -0
- package/.bkit/core/engine/tools/wording.ts +748 -0
- package/.bkit/core/hooks/gateguard-edit-payload.js +18 -0
- package/.bkit/core/hooks/gateguard-engine.js +193 -0
- package/.bkit/core/hooks/guardrails-shell.js +154 -0
- package/.bkit/core/hooks/guardrails-tiers.js +68 -0
- package/.bkit/core/hooks/preflight-linear.sh +73 -0
- package/.bkit/core/prompts/bkit-audit-generate.md +66 -0
- package/.bkit/core/prompts/bkit-build-challenge-1.md +79 -0
- package/.bkit/core/prompts/bkit-build-challenge-2.md +81 -0
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +68 -0
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +70 -0
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +73 -0
- package/.bkit/core/prompts/bkit-build-install-skills.md +67 -0
- package/.bkit/core/prompts/bkit-build-plan-current.md +75 -0
- package/.bkit/core/prompts/bkit-build-plan-execute.md +72 -0
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +73 -0
- package/.bkit/core/prompts/bkit-build-plan-verify.md +88 -0
- package/.bkit/core/prompts/bkit-build-summary.md +93 -0
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +90 -0
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +151 -0
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +73 -0
- package/.bkit/core/prompts/bkit-debug-summary.md +95 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +72 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +72 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +75 -0
- package/.bkit/core/prompts/bkit-design-generate.md +110 -0
- package/.bkit/core/prompts/bkit-design-organise.md +85 -0
- package/.bkit/core/prompts/bkit-design-review-1.md +121 -0
- package/.bkit/core/prompts/bkit-design-review-2.md +111 -0
- package/.bkit/core/prompts/bkit-design-spike.md +97 -0
- package/.bkit/core/prompts/bkit-design-summary.md +106 -0
- package/.bkit/core/prompts/bkit-design-update.md +66 -0
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +66 -0
- package/.bkit/core/prompts/bkit-plan-complexity-split.md +87 -0
- package/.bkit/core/prompts/bkit-plan-generate.md +74 -0
- package/.bkit/core/prompts/bkit-plan-review-1.md +90 -0
- package/.bkit/core/prompts/bkit-plan-review-2.md +80 -0
- package/.bkit/core/prompts/bkit-plan-review-3.md +92 -0
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +84 -0
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +84 -0
- package/.bkit/core/prompts/bkit-plan-summary.md +106 -0
- package/.bkit/core/prompts/bkit-plan-update.md +68 -0
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +90 -0
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +94 -0
- package/.bkit/core/prompts/bkit-ship-summary.md +77 -0
- package/.bkit/core/prompts/bkit-ship-update-docs.md +71 -0
- package/.bkit/core/prompts/bkit-utility-compress-markdown.md +91 -0
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +75 -0
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +76 -0
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +61 -0
- package/.bkit/core/prompts/bkit-utility-update-failures.md +76 -0
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +75 -0
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +82 -0
- package/.bkit/core/workflows/bkit-auto.md +121 -0
- package/.bkit/core/workflows/bkit-build.md +802 -0
- package/.bkit/core/workflows/bkit-debug.md +649 -0
- package/.bkit/core/workflows/bkit-design.md +495 -0
- package/.bkit/core/workflows/bkit-plan.md +510 -0
- package/.bkit/core/workflows/bkit-ship.md +650 -0
- package/.bkit/shared/.bkit/.env.example +86 -0
- package/.bkit/shared/.claude/bkit-cloud.md +117 -0
- package/.bkit/shared/.claude/settings.json +88 -0
- package/.bkit/shared/.codex/hooks.json +26 -0
- package/.bkit/shared/.cursor/bkit-cloud.md +84 -0
- package/.bkit/shared/.cursor/hooks.json +26 -0
- package/.bkit/shared/.cursor/mcp.json +15 -0
- package/.bkit/shared/.cursor/rules/bkit-rules.mdc +12 -0
- package/.bkit/shared/.gitattributes +37 -0
- package/.bkit/shared/.mcp.json +16 -0
- package/.bkit/shared/.opencode/opencode.json +62 -0
- package/.bkit/shared/CLAUDE.md +11 -0
- package/.bkit/shared/LICENSE.md +22 -0
- package/.bkit/shared/docs/architecture.md +19 -0
- package/.bkit/shared/docs/data-schema.md +19 -0
- package/.bkit/shared/docs/deployments.md +433 -0
- package/.bkit/shared/docs/design.md +39 -0
- package/.bkit/shared/docs/noise.md +19 -0
- package/.bkit/shared/docs/observability.md +25 -0
- package/.bkit/shared/docs/security.md +42 -0
- package/.bkit/shared/docs/setup.md +30 -0
- package/.bkit/shared/docs/technology.md +18 -0
- package/.bkit/shared/docs/testing.md +413 -0
- package/.bkit/shared/gitignore +97 -0
- package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +187 -0
- package/.bkit/templates/.cursor/Dockerfile +68 -0
- package/.bkit/templates/.cursor/environment.json +6 -0
- package/.bkit/templates/.cursor/settings.json +11 -0
- package/.bkit/templates/.envrc +7 -0
- package/.bkit/templates/.github/dependabot.yml +52 -0
- package/.bkit/templates/.github/renovate.json5 +224 -0
- package/.bkit/templates/.github/workflows/bkit-ci.yml +1062 -0
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +564 -0
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +102 -0
- package/.bkit/templates/.graphifyignore +108 -0
- package/.bkit/templates/.husky/pre-commit +16 -0
- package/.bkit/templates/.husky/pre-push +91 -0
- package/.bkit/templates/.lintstagedrc.json +3 -0
- package/.bkit/templates/.prettierignore +41 -0
- package/.bkit/templates/.serena/project.yml +243 -0
- package/.bkit/templates/.vale/styles/House/Filler.yml +11 -0
- package/.bkit/templates/.vale/styles/House/Hedging.yml +12 -0
- package/.bkit/templates/.vale/styles/House/LLMSlop.yml +13 -0
- package/.bkit/templates/.vale/styles/House/Verbose.yml +12 -0
- package/.bkit/templates/.vale.ini +67 -0
- package/.bkit/templates/LICENSE.md +22 -0
- package/.bkit/templates/context/bkit-cloudrun.md +84 -0
- package/.bkit/templates/context/bkit-expo.md +186 -0
- package/.bkit/templates/context/bkit-github.md +79 -0
- package/.bkit/templates/context/bkit-inngest.md +45 -0
- package/.bkit/templates/context/bkit-maestro.md +76 -0
- package/.bkit/templates/context/bkit-playwright.md +62 -0
- package/.bkit/templates/context/bkit-resend.md +36 -0
- package/.bkit/templates/context/bkit-sentry.md +65 -0
- package/.bkit/templates/context/bkit-serena.md +33 -0
- package/.bkit/templates/context/bkit-stripe.md +36 -0
- package/.bkit/templates/context/bkit-supabase.md +59 -0
- package/.bkit/templates/context/bkit-tavily.md +49 -0
- package/.bkit/templates/context/bkit-vercel.md +64 -0
- package/.bkit/templates/docs/capabilities.md +72 -0
- package/.bkit/templates/scripts/ci/accepted-divergences.json +21 -0
- package/.bkit/templates/scripts/ci/check-accepted-divergences.mjs +152 -0
- package/.bkit/templates/scripts/ci/check-accepted-divergences.test.mjs +130 -0
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.mjs +98 -0
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.test.mjs +86 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-drift-rules.json +23 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-drift.py +208 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager-rules.json +35 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +236 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-external-rules.json +17 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +290 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +19 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +120 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-surface.py +232 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +36 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +927 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +351 -0
- package/.bkit/templates/scripts/launchd/ai.bkit.launchd.plist +26 -0
- package/.bkit/templates/scripts/launchd/bkit-launchd-env.sh +53 -0
- package/.bkit/templates/scripts/launchd/launchd.env.example +13 -0
- package/.bkit/templates/scripts/prettier/bkit-insert-ignore.mjs +275 -0
- package/.bkit/templates/scripts/secrets/bkit-secrets.config.mjs +66 -0
- package/.bkit/templates/scripts/secrets/bkit-secrets.mjs +785 -0
- package/.bkit/templates/scripts/serena/bkit-serena-mcp.sh +30 -0
- package/.bkit/templates/scripts/serena/bkit-serena.mcp.json +9 -0
- package/.bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs +286 -0
- package/.bkit/templates/slop-scan.config.json +120 -0
- package/CHANGELOG.md +1503 -0
- package/LICENSE.md +161 -0
- package/README.md +184 -2
- package/dist/checks/after/auth.js +140 -0
- package/dist/checks/after/ci-yml.js +681 -0
- package/dist/checks/after/github.js +400 -0
- package/dist/checks/after/index.js +431 -0
- package/dist/checks/after/managed.js +187 -0
- package/dist/checks/after/suppression.js +39 -0
- package/dist/checks/after/tools.js +351 -0
- package/dist/checks/before/context-fetch.js +426 -0
- package/dist/checks/before/env.js +163 -0
- package/dist/checks/before/files.js +187 -0
- package/dist/checks/before/index.js +162 -0
- package/dist/checks/before/mcp.js +111 -0
- package/dist/checks/before/repo.js +71 -0
- package/dist/checks/before/version.js +60 -0
- package/dist/checks/status-holes.js +393 -0
- package/dist/cli.js +688 -0
- package/dist/commands/analysis.js +325 -0
- package/dist/commands/ci/ci.js +438 -0
- package/dist/commands/comply.js +310 -0
- package/dist/commands/harvest.js +354 -0
- package/dist/commands/install/check.js +61 -0
- package/dist/commands/install/doctor.js +209 -0
- package/dist/commands/install/install.js +475 -0
- package/dist/commands/install/uninstall.js +839 -0
- package/dist/commands/install/upgrade.js +782 -0
- package/dist/commands/launch.js +118 -0
- package/dist/commands/lib.js +363 -0
- package/dist/commands/registry.js +50 -0
- package/dist/commands/setup/setup.js +158 -0
- package/dist/commands/telemetry.js +29 -0
- package/dist/commands/workflow/branches.js +1265 -0
- package/dist/commands/workflow/context.js +846 -0
- package/dist/commands/workflow/counters.js +227 -0
- package/dist/commands/workflow/fids.js +224 -0
- package/dist/commands/workflow/issues.js +585 -0
- package/dist/commands/workflow/ledgers.js +472 -0
- package/dist/commands/workflow/locks.js +364 -0
- package/dist/commands/workflow/prs.js +904 -0
- package/dist/commands/workflow/repo.js +199 -0
- package/dist/commands/workflow/roadmap.js +495 -0
- package/dist/commands/workflow/runs.js +1717 -0
- package/dist/commands/workflow/runtime.js +257 -0
- package/dist/commands/workflow/skills.js +110 -0
- package/dist/commands/workflow/status.js +392 -0
- package/dist/commands/workflow/steps.js +1093 -0
- package/dist/commands/workflow/tests.js +144 -0
- package/dist/commands/workflow/workflows.js +1342 -0
- package/dist/commands/workflow/workstreams.js +141 -0
- package/dist/commands/workflow/worktrees.js +473 -0
- package/dist/install/cloud-env.js +818 -0
- package/dist/install/managed-block.js +182 -0
- package/dist/install/manifest.js +376 -0
- package/dist/install/modules/claude.js +288 -0
- package/dist/install/modules/cloud.js +151 -0
- package/dist/install/modules/codex.js +193 -0
- package/dist/install/modules/core.js +531 -0
- package/dist/install/modules/cursor.js +186 -0
- package/dist/install/modules/index.js +152 -0
- package/dist/install/modules/opencode.js +504 -0
- package/dist/install/payload-links.js +119 -0
- package/dist/install/placeholders.js +87 -0
- package/dist/install/template-copies.js +106 -0
- package/dist/install/version-file.js +204 -0
- package/dist/install/write.js +342 -0
- package/dist/ledgers/clamp-log.js +27 -0
- package/dist/ledgers/status.js +156 -0
- package/dist/ledgers/telemetry.js +637 -0
- package/dist/render/hosts.js +339 -0
- package/dist/render/models.js +288 -0
- package/dist/render/parts.js +33 -0
- package/dist/render/trackers.js +135 -0
- package/dist/shared/egress.js +299 -0
- package/dist/shared/json.js +16 -0
- package/dist/shared/log-prefix.js +7 -0
- package/dist/shared/package-json.js +22 -0
- package/dist/shared/package-manager.js +32 -0
- package/dist/shared/package-roots.js +145 -0
- package/dist/shared/protected-paths.js +153 -0
- package/dist/shared/settings.js +44 -0
- package/dist/shared/timeouts.js +19 -0
- package/dist/tools/wording.js +680 -0
- package/package.json +101 -4
|
@@ -0,0 +1,229 @@
|
|
|
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. -->
|
|
2
|
+
|
|
3
|
+
<!-- bkit:start -->
|
|
4
|
+
|
|
5
|
+
{{BKIT_MANAGED_MARKER}}
|
|
6
|
+
|
|
7
|
+
# Database Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Catalogue-backed check of privileges, access coverage, migrations, integrity, capacity, and restore.
|
|
11
|
+
>
|
|
12
|
+
> **Rules:**
|
|
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 evidence (`file:line`, or command / query and its output) and tool behind it.
|
|
21
|
+
> - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
|
|
22
|
+
> - Remote catalogue queries ONLY use `SELECT` (non-relational: read-only reads); writes run locally, or in explicitly rolled-back transactions; ALWAYS check remote unchanged.
|
|
23
|
+
> - NEVER push schema to remote by hand; NEVER hard-delete; restore target = throwaway, deleted before report finishes.
|
|
24
|
+
> - Every claim names the environment it ran against.
|
|
25
|
+
|
|
26
|
+
## Universal Instructions
|
|
27
|
+
|
|
28
|
+
### Context & Goals
|
|
29
|
+
|
|
30
|
+
Migrations and integration tests exercise queries; neither verifies privileges, policies, or constraints match code assumptions. Target failure: **a control that reads as enforced in migration text and is not enforced in the live catalogue** — e.g. `REVOKE` undone by platform default privileges, tenant table with no row-level policy, `CHECK` evaluating `NULL` (not `FALSE`) for the shape it should reject. Only the catalogue knows → query it.
|
|
31
|
+
|
|
32
|
+
**Applies when:** migrations, schema file, or DB client in a manifest. None → one `N/A` row with evidence, never "clean". Relational DB → all steps. Non-relational store (e.g. Firestore, DynamoDB, MongoDB) → Steps 1–4, 6–9, 12–13, 17–19 against its own mechanism (e.g. Firestore security rules, IAM policies, admin SDK vs client SDK); Steps 5, 10–11, 14–16 only where it has an equivalent, else `N/A` with evidence.
|
|
33
|
+
|
|
34
|
+
**Cadence:** monthly. Extra pass when a migration adds a privileged function, changes access policy, or adds a tenancy-scoped table.
|
|
35
|
+
|
|
36
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
37
|
+
|
|
38
|
+
- Platform production checklist and security guide (e.g. Supabase).
|
|
39
|
+
- Platform advisors and inspection CLI (e.g. Supabase Advisors, `supabase inspect db`); record CLI version.
|
|
40
|
+
- Platform backup / restore docs.
|
|
41
|
+
- Platform serverless connection guidance.
|
|
42
|
+
- DB routine-maintenance docs, edition = hosted major (e.g. PostgreSQL Routine Database Maintenance Tasks).
|
|
43
|
+
- Safe-migration rule set (e.g. Squawk); record version.
|
|
44
|
+
|
|
45
|
+
### Scope
|
|
46
|
+
|
|
47
|
+
- Catalogue privileges: functions, tables, sequences.
|
|
48
|
+
- Role each code write actually runs as.
|
|
49
|
+
- Row-level access coverage; exposure outside main schema (file storage, change feeds, views, exposed schemas).
|
|
50
|
+
- Migration hygiene, data integrity, derived data, data removal.
|
|
51
|
+
- Capacity, vacuum, connections, timeouts.
|
|
52
|
+
- Restore against recovery targets.
|
|
53
|
+
|
|
54
|
+
### Out of Scope
|
|
55
|
+
|
|
56
|
+
<!-- prettier-ignore -->
|
|
57
|
+
| Excluded item | Why | Where it belongs |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| Policy predicate correctness; route reachability | Correctness, not coverage | `bkit-audit-security` |
|
|
60
|
+
| Lawful basis / retention periods for personal data | Data lifecycle | `bkit-audit-privacy` |
|
|
61
|
+
| Request latency outside the DB | Hot paths | `bkit-audit-app-performance` |
|
|
62
|
+
| Applying fixes | Audit reports only | Plan from this report |
|
|
63
|
+
|
|
64
|
+
### Pre-Flight / Dependencies
|
|
65
|
+
|
|
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
|
+
|
|
68
|
+
#### Core
|
|
69
|
+
|
|
70
|
+
Always verify.
|
|
71
|
+
|
|
72
|
+
- [ ] **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
|
+
- [ ] **Local DB:** Steps 2, 10, 14 — replayable from migrations. Fallback: rolled-back transactions and remote re-check.
|
|
74
|
+
- [ ] **Web:** Step 18 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
75
|
+
|
|
76
|
+
#### Conditional
|
|
77
|
+
|
|
78
|
+
Verify only when applicable.
|
|
79
|
+
|
|
80
|
+
- [ ] **Platform Advisors:** Managed platform → Step 3 — e.g. Supabase MCP `get_advisors`. Fallback: equivalent catalogue queries.
|
|
81
|
+
- [ ] **Platform Settings:** Managed platform → Steps 4, 17 — network, MFA, owners, backups, point-in-time recovery, e.g. dashboard, management API. Fallback: none; items `Not Checked`.
|
|
82
|
+
- [ ] **Inspection CLI:** Platforms with one → Steps 14–16 — e.g. `supabase inspect db`. Fallback: engine statistics views, e.g. `pg_stat_*`.
|
|
83
|
+
- [ ] **Migration Linter:** SQL migrations → Step 10 — e.g. Squawk. Fallback: apply its rules by reading.
|
|
84
|
+
- [ ] **Restore Target:** Hosted DB → Step 17 — permission and tier to create throwaway project. Fallback: none; absence = finding.
|
|
85
|
+
|
|
86
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
87
|
+
|
|
88
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
89
|
+
|
|
90
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
91
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
92
|
+
|
|
93
|
+
### Probe Steps
|
|
94
|
+
|
|
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.
|
|
96
|
+
- [ ] **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
|
+
- [ ] **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
|
+
- [ ] **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).
|
|
99
|
+
- [ ] **Step 5 — Inventory:** Count tables, migrations, extensions. Applied vs directory, both directions — drift invalidates downstream. Hosted major vs platform support window; extensions blocking next major. **Done when:** counts, drift, version in `Environment`.
|
|
100
|
+
- [ ] **Step 6 — Grants:** Catalogue, never migration text. Every function: definer-rights? executable by which client roles (e.g. `pg_proc` and ACL)? Definer-rights + anonymous-executable = finding unless body checks caller identity — read body. Every privileged function since previous report = candidate. Same for table / sequence grants to anonymous role. **Done when:** `Grants` lists every privileged function and anonymous grant with verdict.
|
|
101
|
+
- [ ] **Step 7 — Write Roles:** `Grants` = who may write; this = who code writes as. Per table whose writes need a role the request path lacks: every write site incl. SQL functions (search table name — language servers miss string literals) → client used (user-scoped = user role; admin = privileged role, e.g. Supabase service role) → compare with grant. Ungranted = finding; ungranted with error never read / dropped = `CRITICAL` (silent fail every call). **Done when:** `Write Roles` row per site: table · `file:line` · role at site · role granted · error checked · verdict.
|
|
102
|
+
- [ ] **Step 8 — Coverage:** Every tenancy-scoped table: tenancy enforced at one recorded layer — DB row policy (e.g. Postgres RLS: control on, >=1 policy, deny default) or one app-layer scope every query goes through (e.g. Rails default scope, Django manager). Scope column, neither layer = finding. Control on, 0 policies = deny-all (safe, usually mistake). Coverage only; correctness → `bkit-audit-security`. Policy / scope test must fail when removed — denials can surface as silent zero rows. **Done when:** `Coverage` row per table: layer · policy count or scope · scope column · verdict.
|
|
103
|
+
- [ ] **Step 9 — Exposure:** `Coverage` keys on scope columns; check other paths (coverage only): file-storage policies and public buckets; change-feed publications and row-level control per published table; owner-rights views bypassing caller policies (e.g. no `security_invoker`); API-served schemas with internal tables. **Done when:** `Exposure` row per surface with verdict.
|
|
104
|
+
- [ ] **Step 10 — Migrations:** Since previous report: shared timestamps (directory and open branches); guarded DDL (`IF [NOT] EXISTS`) without trailing catalogue re-query assertion (typo → silent no-op, still applied); schema change without regenerated DB types (where generated); constraints that cannot fire (`NULL` not `FALSE`) → probe with rolled-back `INSERT`; lock-unsafe DDL (e.g. Postgres: non-`CONCURRENTLY` index, constraint without `NOT VALID` + later `VALIDATE`, type change, `NOT NULL` on existing column, no `lock_timeout`) via safe-migration linter or its rules — say which; drop / rename still read by previous deployed build or oldest supported client. **Done when:** every hit = finding with file.
|
|
105
|
+
- [ ] **Step 11 — Integrity:** FK `ON DELETE` writing to immutability-guarded table (referenced delete fails); hard-delete beside soft-delete convention, or cascades bypassing it; audit / CDC triggers present where meant and stream receiving rows (env flags can disable); orphans in deliberately FK-less tables; every timestamp without time zone → intended zone and all writers agree. **Done when:** every hit = finding with query.
|
|
106
|
+
- [ ] **Step 12 — Derived Data:** List stores computed from others (caches, denormalised columns, counters, materialised views, scheduled rebuilds). Each: one shared writer (writes elsewhere = finding); every source write path calls it (source paths minus writer's callers = finding); something checks copy vs source. Only safety net = next rebuild → state how long users see wrong data. **Done when:** row per store with those three answers.
|
|
107
|
+
- [ ] **Step 13 — Removal:** Per personal-data table: retention period and purge job; soft-deleted rows ever hard-deleted, when; account deletion reaches every copy (caches, audit stream, embeddings, file storage, backups). No period, or period without job = finding. **Done when:** `Retention` row per table: data · retention · purge job · erasure covers · verdict.
|
|
108
|
+
- [ ] **Step 14 — Capacity:** Series vs previous report: table sizes and rows, largest / unused indexes, seq scans on large tables, inspection-suite outputs (e.g. outliers, calls, index stats, bloat, vacuum stats, table stats, locks, blocking, long-running, replication slots, cache hit). Top 10 by total and mean time → query plan (e.g. `EXPLAIN (ANALYZE, BUFFERS)`) locally or rolled back; plan changes; stats reset time. Housekeeping tables (job history, HTTP logs, audit, auth audit) size, growth, purge. 32-bit key / sequence >50% of max. Disk vs limit, IO vs tier caps, cache hit ratios. Measure query time in DB, not app traces (network dominates). **Done when:** series in `Capacity`; each threshold breach = finding.
|
|
109
|
+
- [ ] **Step 15 — Vacuum:** Vacuuming engine (e.g. Postgres) → transaction-ID age per DB and largest tables; dead-tuple ratio, last autovacuum / autoanalyze per hot table. Not vacuumed since previous report, or ID age climbing = finding. Other engine → its routine maintenance (e.g. SQLite `VACUUM`, InnoDB purge lag), or skip with evidence. **Done when:** numbers in `Capacity`, or skip recorded.
|
|
110
|
+
- [ ] **Step 16 — Connections:** Connection limit and pooler size vs peak by application and role. Serverless direct connections → transaction-mode pooler, pool of 1, prepared statements off (or platform equivalent). Idle-in-transaction count and age. Statement and idle-in-transaction timeouts per client / admin role; neither = finding. **Done when:** numbers and each client constructor read in `Capacity`.
|
|
111
|
+
- [ ] **Step 17 — Restore:** (a) From source, list every outbound side effect a clone fires (scheduled jobs, HTTP-calling triggers / functions, DB webhooks, foreign-data wrappers) and how each stops: logical restore stripping them first / fails closed in clone / unscheduled right after restore (harmless first run only). Reaches real users or payments without failing closed → no binary restore. No plan → finding, do not restore. (b) Restore latest backup to throwaway target; schema matches migrations; time taken and data lost; delete target. (c) Record backup type, retention, point-in-time recovery, RTO, RPO. No written targets = finding. Retention < time to notice silent corruption = finding. (d) Logical backup outside platform account: age; restore notes cover key material backups never contain. None = finding. **Done when:** `Restore` holds side-effect plan and result, or the replacing finding.
|
|
112
|
+
- [ ] **Step 18 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per checklist item, advisor lint, inspection report → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
113
|
+
- [ ] **Step 19 — Anything Else:** (a) Everything changed since previous report's commit touching DB (migrations, tables / columns, functions and grants, policies, extensions, scheduled jobs, buckets, publications, new DB clients) → one-line verdict each. (b) Bounded ~30 min pass: what a senior DBA flags that no step asks; read since previous run (incidents, new `docs/failures.jsonl` rows) — what would no step catch? Include anything catalogue / logs / advisors surfaced unchecked, with query for next run. **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`.
|
|
114
|
+
|
|
115
|
+
### 🔒 Gate 2: Probes Check
|
|
116
|
+
|
|
117
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
118
|
+
|
|
119
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
120
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
121
|
+
- [ ] **Environments:** every finding names the environment it ran against.
|
|
122
|
+
- [ ] **Remote untouched:** no remote database changed; throwaway restore target deleted.
|
|
123
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
124
|
+
|
|
125
|
+
## Findings
|
|
126
|
+
|
|
127
|
+
<!-- prettier-ignore -->
|
|
128
|
+
| Severity | Use |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| `CRITICAL` | Tenant data readable / writable across tenants or by anonymous role; anonymous-executable privileged function without identity check; write failing silently every call; migration dropping data without backfill |
|
|
131
|
+
| `HIGH` | Tenancy table with no enforcing layer (no row policy, no app-layer scope); public bucket / owner-rights view exposing tenant data; constraint that cannot fire; lock-unsafe migration on live table; no proven restore, no recovery targets, or no off-platform backup; applied migrations ≠ directory |
|
|
132
|
+
| `MEDIUM` | Missing index the query shape needs; housekeeping table without purge; vacuum lag; sequence >50%; role without timeouts; derived data without agreement check; schema doc ≠ migrations |
|
|
133
|
+
| `LOW` | Deny-all table without policies; naming drift changing neither access nor results |
|
|
134
|
+
|
|
135
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: security / data first.
|
|
136
|
+
|
|
137
|
+
<!-- prettier-ignore -->
|
|
138
|
+
| ID | Severity | Location | Evidence | Expected |
|
|
139
|
+
| --- | --- | --- | --- | --- |
|
|
140
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
141
|
+
|
|
142
|
+
Empty and clean → one row `None`.
|
|
143
|
+
|
|
144
|
+
## Report
|
|
145
|
+
|
|
146
|
+
### Summary
|
|
147
|
+
|
|
148
|
+
PENDING
|
|
149
|
+
|
|
150
|
+
### Previous Run
|
|
151
|
+
|
|
152
|
+
PENDING
|
|
153
|
+
|
|
154
|
+
### Environment
|
|
155
|
+
|
|
156
|
+
PENDING
|
|
157
|
+
|
|
158
|
+
### Advisors
|
|
159
|
+
|
|
160
|
+
PENDING
|
|
161
|
+
|
|
162
|
+
### Checklist
|
|
163
|
+
|
|
164
|
+
PENDING
|
|
165
|
+
|
|
166
|
+
### Grants
|
|
167
|
+
|
|
168
|
+
PENDING
|
|
169
|
+
|
|
170
|
+
### Write Roles
|
|
171
|
+
|
|
172
|
+
PENDING
|
|
173
|
+
|
|
174
|
+
### Coverage
|
|
175
|
+
|
|
176
|
+
PENDING
|
|
177
|
+
|
|
178
|
+
### Exposure
|
|
179
|
+
|
|
180
|
+
PENDING
|
|
181
|
+
|
|
182
|
+
### Retention
|
|
183
|
+
|
|
184
|
+
PENDING
|
|
185
|
+
|
|
186
|
+
### Capacity
|
|
187
|
+
|
|
188
|
+
PENDING
|
|
189
|
+
|
|
190
|
+
### Restore
|
|
191
|
+
|
|
192
|
+
PENDING
|
|
193
|
+
|
|
194
|
+
### Checked
|
|
195
|
+
|
|
196
|
+
PENDING
|
|
197
|
+
|
|
198
|
+
### Not Checked
|
|
199
|
+
|
|
200
|
+
PENDING
|
|
201
|
+
|
|
202
|
+
### Standards Coverage
|
|
203
|
+
|
|
204
|
+
PENDING
|
|
205
|
+
|
|
206
|
+
### Beyond the Steps
|
|
207
|
+
|
|
208
|
+
PENDING
|
|
209
|
+
|
|
210
|
+
### Process Improvements
|
|
211
|
+
|
|
212
|
+
PENDING
|
|
213
|
+
|
|
214
|
+
### 🔒 Gate 3: Report Check
|
|
215
|
+
|
|
216
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
217
|
+
|
|
218
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
219
|
+
- [ ] **Summary:** names count per severity and environments measured.
|
|
220
|
+
- [ ] **Series:** every series beside previous report's numbers, or marked baseline.
|
|
221
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
222
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
223
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
224
|
+
|
|
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.
|
|
226
|
+
|
|
227
|
+
<!-- bkit:end -->
|
|
228
|
+
|
|
229
|
+
## Project Instructions
|
|
@@ -0,0 +1,251 @@
|
|
|
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. -->
|
|
2
|
+
|
|
3
|
+
<!-- bkit:start -->
|
|
4
|
+
|
|
5
|
+
{{BKIT_MANAGED_MARKER}}
|
|
6
|
+
|
|
7
|
+
# Dead Code Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Reachability of code, config, routes, events, schema, and assets — what looks live and never runs.
|
|
11
|
+
>
|
|
12
|
+
> **Rules:**
|
|
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 evidence (`file:line`, or command / query and its output) and tool behind it.
|
|
21
|
+
> - Read this document once at session start; do not trust session memory; do not re-read on every loop iteration.
|
|
22
|
+
> - NEVER delete code, files, routes, schema objects, or dependencies. The report names the destination; applying it is the next step.
|
|
23
|
+
> - 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
|
+
|
|
25
|
+
## Universal Instructions
|
|
26
|
+
|
|
27
|
+
### Context & Goals
|
|
28
|
+
|
|
29
|
+
Dead code = control that looks live, is not: limiter on unset env var; E2E assertion on test id no component renders; config key calling API removed from pinned dependency. Target failure: **a control that reads as live in review and never executes**.
|
|
30
|
+
|
|
31
|
+
**Applies when:** application source, config, or package manifest. None → one `N/A` row with evidence, never "clean".
|
|
32
|
+
|
|
33
|
+
**Cadence:** quarterly; extra pass when a cycle deletes a feature or moves a package.
|
|
34
|
+
|
|
35
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
36
|
+
|
|
37
|
+
- Reachability scanner, version run, including production mode, workspaces, and issue types (e.g. knip, ts-prune, vulture).
|
|
38
|
+
- Compiler unused and unreachable options (e.g. TypeScript `noUnusedLocals`, `noUnusedParameters`, `allowUnreachableCode`; Ruff `F401`, `F841`).
|
|
39
|
+
- Always-true / always-false condition lint (e.g. typescript-eslint `no-unnecessary-condition`).
|
|
40
|
+
- Unused-index advisor (e.g. Supabase Splinter `0005_unused_index`, engine index stats).
|
|
41
|
+
- Database inspection CLI (e.g. `supabase inspect db`); record CLI version.
|
|
42
|
+
- Feature-flag cleanup (e.g. Uber Piranha).
|
|
43
|
+
- Runtime-usage dead-code removal (e.g. Meta SCARF).
|
|
44
|
+
- i18n key checkers (e.g. `i18n-check`).
|
|
45
|
+
|
|
46
|
+
### Scope
|
|
47
|
+
|
|
48
|
+
- In-function unused locals, parameters, unreachable code, always-true/false conditions.
|
|
49
|
+
- Module reachability: files, exports, types, duplicates; default run beside production mode.
|
|
50
|
+
- Dependency reachability (own pass): unused, unlisted, unresolved, binaries, version-catalog entries.
|
|
51
|
+
- Env-var reachability: referenced vs declared; gates.
|
|
52
|
+
- Feature flags; config keys nothing reads; values always overridden.
|
|
53
|
+
- Assertion surface (test ids), route surface (forwarders, stale pointers), client fetches with no route.
|
|
54
|
+
- Schema objects nothing reaches.
|
|
55
|
+
- Events, background functions, crons — both ends.
|
|
56
|
+
- i18n keys, static assets, scripts.
|
|
57
|
+
- Runtime executions — separate from static references.
|
|
58
|
+
|
|
59
|
+
### Out of Scope
|
|
60
|
+
|
|
61
|
+
<!-- prettier-ignore -->
|
|
62
|
+
| Excluded item | Why | Where it belongs |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Module-graph shape | Architecture sweep | `bkit-audit-architecture` |
|
|
65
|
+
| Git state, working-tree leftovers, layout | Repo sweep | `bkit-audit-repo` |
|
|
66
|
+
| Config that is read but disagrees across environments or with its dashboard | Config sweep | `bkit-audit-config` |
|
|
67
|
+
| Unused indexes as capacity | Database sweep | `bkit-audit-database` |
|
|
68
|
+
| An unlisted dependency, or one with an advisory, beyond naming it | Dependency sweep | `bkit-audit-dependencies` |
|
|
69
|
+
| An i18n key read but missing from the catalogue, as copy | Usability sweep | `bkit-audit-usability` |
|
|
70
|
+
| A detector switched off, as a gate change | Gates sweep | `bkit-audit-gates` |
|
|
71
|
+
| Wiring a reachability scanner into CI | Gate change | `bkit-audit-gates` |
|
|
72
|
+
| Deleting code, files, routes, schema, or dependencies | Audit reports only | Plan from this report |
|
|
73
|
+
|
|
74
|
+
### Pre-Flight / Dependencies
|
|
75
|
+
|
|
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
|
+
#### Core
|
|
79
|
+
|
|
80
|
+
Always verify.
|
|
81
|
+
|
|
82
|
+
- [ ] **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
|
+
- [ ] **Text Search:** Steps 5–14 — repo search (`git grep`, ripgrep). Fallback: none → those steps `Not Checked`.
|
|
84
|
+
- [ ] **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`.
|
|
85
|
+
- [ ] **Web:** Step 16 — fetch anchor standards. Fallback: versions unread.
|
|
86
|
+
|
|
87
|
+
#### Conditional
|
|
88
|
+
|
|
89
|
+
Verify only when applicable.
|
|
90
|
+
|
|
91
|
+
- [ ] **Compiler Unused Checks:** Compiled language → Step 2 — resolved compiler/linter config, not base file. Fallback: `Detectors` `Not Checked`.
|
|
92
|
+
- [ ] **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.
|
|
93
|
+
- [ ] **Git History:** Flags or introduction dates → Step 6 — `git log -S`. Fallback: flag ages `Not Checked`.
|
|
94
|
+
- [ ] **E2E Locators:** E2E asserts test ids → Step 7. Fallback: skip with evidence; `Assertions` = `N/A`.
|
|
95
|
+
- [ ] **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`.
|
|
96
|
+
- [ ] **Runtime Counts:** Production request/job/query stats → Step 15 — e.g. host per-route counts, job-runner runs, `pg_stat_statements`. Fallback: static only; "zero executions" `Not Checked`.
|
|
97
|
+
|
|
98
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
99
|
+
|
|
100
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
101
|
+
|
|
102
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
103
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
104
|
+
|
|
105
|
+
### Probe Steps
|
|
106
|
+
|
|
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.
|
|
108
|
+
- [ ] **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
|
+
- [ ] **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
|
+
- [ ] **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.
|
|
111
|
+
- [ ] **Step 5 — Env Vars:** Text search only — env names are string literals; language server cannot see them. Every referenced env vs declared (examples, task runner, typed env schema — sources in `Project Instructions`). Referenced, never declared → control cannot switch on. Triage: platform-injected = fine; optional + safe default = fine (read default); gates control (absence disables limiter, auth, feature) = finding. Third group → path never executed in any environment. Omitted declaration source → `Process Improvements` gap. Gating var → `docs/failures.jsonl` via `@bkit-utility-update-failures`, and `bkit-audit-duplication`. **Done when:** `Env Vars` row per referenced-undeclared: group · absence effect · verdict.
|
|
112
|
+
- [ ] **Step 6 — Config:** Deadness no scanner reports. (a) Feature flags stuck on/off; hardcoded or same every environment → branch never runs. Per flag: every read + value per environment; all same → other branch dead = finding. Age flags (`git log -S`); >90 days, rollout complete = finding even if environments differ. (b) Config keys no reader, or name removed object — search key; language server reads typed source only. (c) Default replaced in every environment by later layer = lying docs. Dead control → `docs/failures.jsonl` like `Env Vars`, not tidiness. **Done when:** `Config` row per flag/unread key: value per environment · age · verdict.
|
|
113
|
+
- [ ] **Step 7 — Assertions:** E2E asserts test ids → unmatched locator passes; test id no component renders = vacuous spec, green CI. Extract asserted E2E ids vs component-rendered ids (both string literals). **Done when:** `Assertions` lists asserted-but-unrendered ids, or `none`.
|
|
114
|
+
- [ ] **Step 8 — Routes:** Two checks; the second is where the defects are. (a) Forwarders. A route whose page only redirects renders nothing: no content, an extra round trip, and it reads in every route list as a page. Use the project's derived list, do not eyeball the tree. The usual justification is that old bookmarked or emailed links must keep working — check that claim against the deployment doc before accepting it. (b) What still points at a forwarder, or at a path that moved. Grep the old path, not the new one. Stale cache-invalidation call (e.g. Next.js `revalidatePath` / `revalidateTag`) refreshes the stub; the page a user reads is never invalidated. Stale end-to-end helpers drive every spec through the redirect. A middleware allowlist arm that can no longer match reads as a live carve-out. A deep-link or email builder whose redirect drops a query param loses the token or id silently. A doc comment naming the old directory is free to fix, and it makes the next reader mistrust every other comment in the file. Relative imports hide the dependency: a repo-wide grep for the path string misses `./old/page`. After a route delete, run the typecheck before believing a grep was complete. Stale generated route types are build output: remove them and re-run, do not read them as source errors. A test that pins the call argument (`toHaveBeenCalledWith` the path) cannot tell a live pointer from a dead one. "A test covers it" is no evidence in this step. **Done when:** `Routes` row per forwarder and per stale pointer: kind · `file:line` · verdict.
|
|
115
|
+
- [ ] **Step 9 — Fetches:** Clients call API paths with raw fetch → the mirror of `Routes`. Route-side asks whether a route has a caller. This asks whether a call has a route. Neither finds the other's class. Compiler-checked RPC clients are out of scope (a missing route fails typecheck). Raw fetch is the whole exposure: a URL inside a template literal, so lint, typecheck, and the reachability scanner all pass on a path that 404s. Two routing layers (where the stack has them) → model both. The outer framework decides whether a handler runs (static directory vs catch-all that forwards a subtree). The inner router then routes within what was forwarded. A route correctly mounted on the inner router and unreachable from the outer layer is its own class (`stranded`). Checking either layer alone says the route is fine. Read a finding as two questions: the path has no handler, and why nobody noticed. The answer is at the call site — `if (res.ok)` skips the block, `if (!res.ok) return success` fails open. A 404 is a successful HTTP response, so nothing throws. The report names the guard and the route. Confirm against the deployment (status code of the path beside a known-live path) before writing it up. Two false positives, do not reintroduce them: a path in a doc comment is not a call; a prefix test (`startsWith`) is not a request. The dangerous failure is silent: an extractor that stops at `?` never reports the URL, so it is not seen. When changing extraction, the fetched-path count must go up, not merely the findings list get shorter. No project script → extract literals and match routes by hand; record the gap in `Process Improvements`. **Done when:** `Fetches` row per unreachable call and per stranded route: path · call-site guard · deployment status · verdict.
|
|
116
|
+
- [ ] **Step 10 — Schema:** SQL migrations or hosted DB — only step here. Unused column/orphan SQL function still costs migrations + access review. From the schema source (migrations, schema file, or generated types): per table, column, view, SQL function, access policy (e.g. RLS) → search code (table calls, columns, RPC), other SQL (triggers, policies, functions), deployed serverless functions (e.g. edge functions). Zero refs all three = candidate. Runtime on deployed DB: table no scans/writes since stats reset (record reset time); inspection-CLI table/index stats; unused-index advisor. Unused indexes → also `bkit-audit-database` — name, do not duplicate capacity finding. Thin/pre-launch traffic → zero-use = static candidate, never proof alone. **Done when:** `Schema` row per candidate: object · static refs · runtime counts · reset time · verdict.
|
|
117
|
+
- [ ] **Step 11 — Events:** Jobs, crons, event bus — mirror of `Fetches` for background work. Event names = string literals; scanner + language server blind. List every send, registered function + trigger/cron, every cron + target. Sent event → registered function; registered trigger → sender or cron; cron → existing target. No trigger = dead function; no function = unfireable control → route like `Env Vars`. **Done when:** `Events` row per name: sender · function · cron target · verdict.
|
|
118
|
+
- [ ] **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; no invoker = candidate; doc-only = candidate + reader to update. **Done when:** `Strings` row per unused key, missing key, unread asset, uninvoked script.
|
|
119
|
+
- [ ] **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 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.
|
|
120
|
+
- [ ] **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.
|
|
121
|
+
- [ ] **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.
|
|
122
|
+
- [ ] **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.
|
|
123
|
+
- [ ] **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`.
|
|
124
|
+
|
|
125
|
+
### 🔒 Gate 2: Probes Check
|
|
126
|
+
|
|
127
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
128
|
+
|
|
129
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
130
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
131
|
+
- [ ] **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.
|
|
132
|
+
- [ ] **Tree untouched:** no code, config, schema, or dependency change.
|
|
133
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
134
|
+
|
|
135
|
+
## Findings
|
|
136
|
+
|
|
137
|
+
<!-- prettier-ignore -->
|
|
138
|
+
| Severity | Use |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `CRITICAL` | Dead control on auth, a limiter, or validation (the path never executes); client fetch whose error path treats failure as success, so the missing route never surfaces |
|
|
141
|
+
| `HIGH` | User-facing or background path with no handler, or a handler nothing can reach; end-to-end assertion that passes because the target does not exist; event or cron with one end missing |
|
|
142
|
+
| `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 |
|
|
143
|
+
| `LOW` | Doc comment naming a moved path; test-only export (own class, never a delete); preview-only default export |
|
|
144
|
+
|
|
145
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: dead controls first.
|
|
146
|
+
|
|
147
|
+
<!-- prettier-ignore -->
|
|
148
|
+
| ID | Severity | Location | Evidence | Expected |
|
|
149
|
+
| --- | --- | --- | --- | --- |
|
|
150
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
151
|
+
|
|
152
|
+
Empty and clean → one row `None`.
|
|
153
|
+
|
|
154
|
+
## Report
|
|
155
|
+
|
|
156
|
+
### Summary
|
|
157
|
+
|
|
158
|
+
PENDING
|
|
159
|
+
|
|
160
|
+
### Previous Run
|
|
161
|
+
|
|
162
|
+
PENDING
|
|
163
|
+
|
|
164
|
+
### Detectors
|
|
165
|
+
|
|
166
|
+
PENDING
|
|
167
|
+
|
|
168
|
+
### Reachability
|
|
169
|
+
|
|
170
|
+
PENDING
|
|
171
|
+
|
|
172
|
+
### Dependencies
|
|
173
|
+
|
|
174
|
+
PENDING
|
|
175
|
+
|
|
176
|
+
### Env Vars
|
|
177
|
+
|
|
178
|
+
PENDING
|
|
179
|
+
|
|
180
|
+
### Config
|
|
181
|
+
|
|
182
|
+
PENDING
|
|
183
|
+
|
|
184
|
+
### Assertions
|
|
185
|
+
|
|
186
|
+
PENDING
|
|
187
|
+
|
|
188
|
+
### Routes
|
|
189
|
+
|
|
190
|
+
PENDING
|
|
191
|
+
|
|
192
|
+
### Fetches
|
|
193
|
+
|
|
194
|
+
PENDING
|
|
195
|
+
|
|
196
|
+
### Schema
|
|
197
|
+
|
|
198
|
+
PENDING
|
|
199
|
+
|
|
200
|
+
### Events
|
|
201
|
+
|
|
202
|
+
PENDING
|
|
203
|
+
|
|
204
|
+
### Strings
|
|
205
|
+
|
|
206
|
+
PENDING
|
|
207
|
+
|
|
208
|
+
### Candidates
|
|
209
|
+
|
|
210
|
+
PENDING
|
|
211
|
+
|
|
212
|
+
### Runtime
|
|
213
|
+
|
|
214
|
+
PENDING
|
|
215
|
+
|
|
216
|
+
### Checked
|
|
217
|
+
|
|
218
|
+
PENDING
|
|
219
|
+
|
|
220
|
+
### Not Checked
|
|
221
|
+
|
|
222
|
+
PENDING
|
|
223
|
+
|
|
224
|
+
### Standards Coverage
|
|
225
|
+
|
|
226
|
+
PENDING
|
|
227
|
+
|
|
228
|
+
### Beyond the Steps
|
|
229
|
+
|
|
230
|
+
PENDING
|
|
231
|
+
|
|
232
|
+
### Process Improvements
|
|
233
|
+
|
|
234
|
+
PENDING
|
|
235
|
+
|
|
236
|
+
### 🔒 Gate 3: Report Check
|
|
237
|
+
|
|
238
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
239
|
+
|
|
240
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
241
|
+
- [ ] **Summary:** names count per severity and candidate / surviving counts.
|
|
242
|
+
- [ ] **Series:** `Reachability` counts and `Runtime` zeroes beside previous report's numbers, or marked baseline.
|
|
243
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
244
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
245
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
246
|
+
|
|
247
|
+
> `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.
|
|
248
|
+
|
|
249
|
+
<!-- bkit:end -->
|
|
250
|
+
|
|
251
|
+
## Project Instructions
|