@cbartens/bkit 0.0.0-stage → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bkit/README.md +421 -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 +421 -0
- package/.bkit/core/.bkit/cloud.md +502 -0
- package/.bkit/core/.bkit/comparison.md +318 -0
- package/.bkit/core/.bkit/install.md +496 -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 +471 -0
- package/.bkit/core/.bkit/trackers.md +95 -0
- package/.bkit/core/.bkit/workflows.md +1546 -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 +247 -0
- package/.bkit/core/engine/checks/after/ci-yml.ts +739 -0
- package/.bkit/core/engine/checks/after/github.ts +424 -0
- package/.bkit/core/engine/checks/after/index.ts +556 -0
- package/.bkit/core/engine/checks/after/managed.ts +217 -0
- package/.bkit/core/engine/checks/after/tools.ts +427 -0
- package/.bkit/core/engine/checks/after/vercel.ts +101 -0
- package/.bkit/core/engine/checks/before/context-fetch.ts +429 -0
- package/.bkit/core/engine/checks/before/env.ts +201 -0
- package/.bkit/core/engine/checks/before/files.ts +202 -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 +871 -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 +247 -0
- package/.bkit/core/engine/commands/install/install.ts +528 -0
- package/.bkit/core/engine/commands/install/uninstall.ts +972 -0
- package/.bkit/core/engine/commands/install/upgrade.ts +1026 -0
- package/.bkit/core/engine/commands/launch.ts +139 -0
- package/.bkit/core/engine/commands/lib.ts +494 -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 +925 -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 +174 -0
- package/.bkit/core/engine/install/modules/codex.ts +219 -0
- package/.bkit/core/engine/install/modules/core.ts +600 -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/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 +642 -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 +108 -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 +438 -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 +92 -0
- package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +192 -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 +239 -0
- package/.bkit/templates/.github/workflows/bkit-ci.yml +1082 -0
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +566 -0
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +107 -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 +1486 -0
- package/LICENSE.md +161 -0
- package/README.md +185 -2
- package/dist/checks/after/auth.js +232 -0
- package/dist/checks/after/ci-yml.js +718 -0
- package/dist/checks/after/github.js +400 -0
- package/dist/checks/after/index.js +447 -0
- package/dist/checks/after/managed.js +187 -0
- package/dist/checks/after/tools.js +351 -0
- package/dist/checks/after/vercel.js +102 -0
- package/dist/checks/before/context-fetch.js +426 -0
- package/dist/checks/before/env.js +173 -0
- package/dist/checks/before/files.js +185 -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 +692 -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 +207 -0
- package/dist/commands/install/install.js +461 -0
- package/dist/commands/install/uninstall.js +815 -0
- package/dist/commands/install/upgrade.js +771 -0
- package/dist/commands/launch.js +118 -0
- package/dist/commands/lib.js +362 -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 +819 -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 +152 -0
- package/dist/install/modules/codex.js +193 -0
- package/dist/install/modules/core.js +511 -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/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,280 @@
|
|
|
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
|
+
# Documentation Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Docs still true — each claim matches code, each pointer lands, each agent-relevant fact written down.
|
|
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 paste a secret or credential value into the report.
|
|
23
|
+
> - Historical records (`docs/plans/**`, `docs/archive/**`, `docs/completed.md`) and existing ledger rows are citers only; never edit them.
|
|
24
|
+
|
|
25
|
+
## Universal Instructions
|
|
26
|
+
|
|
27
|
+
### Context & Goals
|
|
28
|
+
|
|
29
|
+
Docs are the record agents work from: memory points at them, plans cite them, code comments cite them. Wrong doc > missing doc — agents follow it. Prose lint = style; formatter = shape; managed-block check = managed blocks only. None reads docs against code. Per-ship doc update sees only files that ship changed → drift across ships belongs to nobody.
|
|
30
|
+
|
|
31
|
+
**Target failure:** **a claim the code has left behind** — default doc states but deployed env does not; script phase doc omits (look hardest for anything that deletes); pointer leads nowhere; fact running code relies on exists only in memory or was dropped from a ledger.
|
|
32
|
+
|
|
33
|
+
**Applies when:** project has live docs (prose under `docs/` or `.agents/`, or root `README.md` agents treat as entry). None → one `N/A` row with evidence, never "clean".
|
|
34
|
+
|
|
35
|
+
**Cadence:** monthly. Extra pass after ledger migration, `bkit upgrade`, or toolchain change (runtime, package manager, SDK, new required tool or hook).
|
|
36
|
+
|
|
37
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
38
|
+
|
|
39
|
+
- Diátaxis (unversioned; record the date read).
|
|
40
|
+
- Docs-as-code prose linter and link checker (e.g. Vale, lychee); record versions.
|
|
41
|
+
- Architecture decision records (e.g. ADR form).
|
|
42
|
+
- Runbook practice (e.g. Google SRE Workbook, "On-Call").
|
|
43
|
+
- Source-host community health files (e.g. GitHub `README`, `CONTRIBUTING`, `SECURITY.md`).
|
|
44
|
+
- API-doc validation for the language (e.g. TypeDoc validation, TSDoc); record version.
|
|
45
|
+
- HTTP API specification when the project serves HTTP (e.g. OpenAPI); record version.
|
|
46
|
+
|
|
47
|
+
### Scope
|
|
48
|
+
|
|
49
|
+
- Every live doc, every run.
|
|
50
|
+
- Catalogue: `.agents/docs.md` rows vs files on disk, and the root entry point.
|
|
51
|
+
- Mechanical: prose, format, managed-block drift, backticked paths, links, and anchors, commands, diagrams.
|
|
52
|
+
- Ledger citations resolve to one winning row; significant choices have a `docs/decisions.jsonl` row.
|
|
53
|
+
- Claims in every live doc vs the code.
|
|
54
|
+
- Setup doc enough to start. Runbooks exist and each is walked.
|
|
55
|
+
- Generated reference for HTTP APIs, background events, and shared packages.
|
|
56
|
+
- Auto-memory vs docs. Instruction files vs each other. One topic, one doc. Diátaxis quadrant per live doc.
|
|
57
|
+
|
|
58
|
+
### Out of Scope
|
|
59
|
+
|
|
60
|
+
<!-- prettier-ignore -->
|
|
61
|
+
| Excluded item | Why | Where it belongs |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| Whether a doc is in the right place | Placement | `bkit-audit-repo` |
|
|
64
|
+
| Stale pointers found only from the code side (route or file moved, no doc cites the old path) | Code-side sweep | `bkit-audit-dead-code` |
|
|
65
|
+
| Capability-register status (`one` / `bypassed` / `split` / `gap`) | Duplication sweep | `bkit-audit-duplication` |
|
|
66
|
+
| Architecture graph diagram correctness | Architecture sweep | `bkit-audit-architecture` |
|
|
67
|
+
| Turning a check into a CI gate | Gate design | `bkit-audit-gates` |
|
|
68
|
+
| A stale fact inside a historical record | History, not a defect | Citers only; fix a dead pointer at the target |
|
|
69
|
+
| Instruction files each agent host loads; agent permissions, hooks, tool servers | Agent config sweep | `bkit-audit-agents` |
|
|
70
|
+
| Applying doc edits, appending ledger rows, editing memory | Audit reports only | Plan from this report |
|
|
71
|
+
|
|
72
|
+
### Pre-Flight / Dependencies
|
|
73
|
+
|
|
74
|
+
**Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available → tool and version; missing → fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
|
|
75
|
+
|
|
76
|
+
#### Core
|
|
77
|
+
|
|
78
|
+
Always verify.
|
|
79
|
+
|
|
80
|
+
- [ ] **Repo Read:** Steps 2–13 — live docs, instruction files, manifests, CI workflow. Fallback: none; unreadable tree = finding.
|
|
81
|
+
- [ ] **Web:** Step 14 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
82
|
+
|
|
83
|
+
#### Conditional
|
|
84
|
+
|
|
85
|
+
Verify only when applicable.
|
|
86
|
+
|
|
87
|
+
- [ ] **Prose and Format:** Step 4 — e.g. Vale, Prettier. Fallback: skip that check; name it in `Not Checked`.
|
|
88
|
+
- [ ] **Managed-Block Check:** bkit project → Step 4 — e.g. `bkit check`. Fallback: read managed blocks; drift `Not Checked`.
|
|
89
|
+
- [ ] **Link Checker:** Step 4 — offline fragments plus cached external URLs, e.g. lychee. Fallback: open relative links by hand; external URLs `Not Checked`.
|
|
90
|
+
- [ ] **Diagram Renderer:** Fenced diagrams → Step 4 — e.g. mermaid-cli, headless browser. Fallback: skip render; `Not Checked`. A cloud session may lack the browser.
|
|
91
|
+
- [ ] **API Doc Validator:** Shared packages or an HTTP API → Step 9 — e.g. TypeDoc `--validation`, `eslint-plugin-jsdoc`. Fallback: read exports; broken links `Not Checked`.
|
|
92
|
+
- [ ] **Local Memory:** Maintainer machine → Step 10 — IDE auto-memory directory. Fallback: cloud session skips; record in `Not Checked`.
|
|
93
|
+
|
|
94
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
95
|
+
|
|
96
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
97
|
+
|
|
98
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
99
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
100
|
+
|
|
101
|
+
### Probe Steps
|
|
102
|
+
|
|
103
|
+
- [ ] **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 2 — Scope:** No live docs → one `N/A` row with evidence and STOP. Else every live doc. Rank by drift: per live doc, commits since that doc last changed to repo paths it cites. Record ranking. Start from up-to-date default branch with clean `git status`. Historical records are citers: pointer leads nowhere = finding, fix at target. Stale fact inside them = history, not defect. **Done when:** every live doc and drift ranking in `Scope`.
|
|
105
|
+
- [ ] **Step 3 — Catalogue:** `.agents/docs.md`: every file on disk under `docs/` outside `plans/`, `archive/`, and `audits/` has a row, and every row's file exists; no doc listed twice (two docs on one topic = bug, including one doc in both tables with different reading columns); each row's one-line scope still matches the doc. Root `README.md` = working entry point: what the project is, links setup doc, architecture doc, and `.agents/docs.md`, and how to report a security issue. Missing community-health file with no README substitute = finding. **Done when:** `Catalogue` names every mismatch, and every clean check.
|
|
106
|
+
- [ ] **Step 4 — Mechanical:** Run prose lint, format check, and managed-block check. Then:
|
|
107
|
+
- Every backticked repo path in a live doc exists. Output = candidates. Path named on purpose as removed = not finding. Path moved = finding. Section anchors and `file:line` wait for `Claims`.
|
|
108
|
+
- Relative links and heading anchors offline across every doc, plans, and archive included (citers). Then external URLs in live docs, with cache. Anchor builder must match host (e.g. GitHub); open failed fragment before calling broken. Markdown link invisible to path check.
|
|
109
|
+
- Every package-manager script a live doc names is defined by some manifest. Every script path a doc runs exists. Both lists = candidates: doc may name removed script on purpose.
|
|
110
|
+
- Diagrams still parse (e.g. Mermaid). Syntax break renders as raw text with no CI signal. Render each live doc that has one.
|
|
111
|
+
- Markdown tables in live docs: each carries `<!-- prettier-ignore -->` directly above its head, and each renders — no row with more cells than the separator (GFM drops the overflow), no header / separator count mismatch (GFM renders raw text). Run read-only, e.g. `node scripts/prettier/bkit-insert-ignore.mjs --check` (bkit package template `.bkit/templates/scripts/prettier/`; skips `docs/audits/`, `docs/plans/`). No such check → `Process Improvements` proposes the template.
|
|
112
|
+
|
|
113
|
+
Path or link fix → doc edit for `@bkit-utility-update-documentation`, sync pass only (no reorganise, compress, or cross-reference), after intentional hits struck. Pointer broken because route or file moved → also `bkit-audit-dead-code`. Broken diagram that is architecture graph → also `bkit-audit-architecture`. Check that could be CI gate → `bkit-audit-gates`. **Done when:** `Mechanical` lists broken paths, links, scripts, diagrams, and tables, each dispositioned, including checks that came back clean.
|
|
114
|
+
|
|
115
|
+
- [ ] **Step 5 — Ledgers:** Rows cited by `key` (`.bkit/jsonl.md` § Key & References). Resolve winning row: fold by `key`, highest `ts` (§ Updating a Row). Legacy counter ids (e.g. `KN-<n>`, `DE-<n>`) = leftovers, not unique, survive in `references`; new citations keep appearing → runs every time. `references` may be string or list — accept both; reader assuming list silently skips string rows. Three candidate lists: cited legacy id resolves to nothing; cited legacy id resolves to >1 row; `key` cited next to ledger name no row has (also picks up job names — open each). Rows sharing `key` = updates, not duplicates. Only different keys claiming same legacy id = clash. For each real hit:
|
|
116
|
+
- Live doc or code comment → report names citation change to row's `key`. This run does not edit.
|
|
117
|
+
- `docs/completed.md` or plan → do not edit. Report names new version of owning row to append, with old id in `references`.
|
|
118
|
+
- Fact in no row → `git log -S` the old id. Report quotes historical text to restore, or ask maintainer. never reconstruct rationale nobody wrote. Restoring = same-`key` append, next step. never edit a line in place.
|
|
119
|
+
|
|
120
|
+
Then choices recorded at all. List each external service, major library, and data-model choice visible in code; find its `docs/decisions.jsonl` row. No row = question for maintainer, not rationale to write. Choice code reversed needs newer row, same `key`; report names row to append. **Done when:** `Ledgers` lists every unresolved citation and every choice without a row.
|
|
121
|
+
|
|
122
|
+
- [ ] **Step 6 — Claims:** For each live doc, list claims something depends on; check each against code. No tool does this.
|
|
123
|
+
|
|
124
|
+
<!-- prettier-ignore -->
|
|
125
|
+
| Claim type | Check against |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| Defaults and flags | Schema default and the env files that are actually deployed. A schema default (e.g. zod `.default()`) applies only when the variable is unset |
|
|
128
|
+
| What a script does | The script, end to end. Look hardest for anything that deletes |
|
|
129
|
+
| Which parts exist, on which platform | The code, on every platform the doc claims |
|
|
130
|
+
| `file:line` | Open the line. It must still say what the doc claims |
|
|
131
|
+
| Section links (`§ Heading`) | The heading exists, word for word |
|
|
132
|
+
| Counts and lists | Count them again |
|
|
133
|
+
|
|
134
|
+
Destinations: doc wrong, code right → doc edit; doc right, code wrong → `docs/failures.jsonl` row (`@bkit-utility-update-failures` applies it), do not "fix" doc to match bug; no recorded intent → question for maintainer; product-shape statement → proposed wording for owner before it lands; drift inside `bkit:start` / `bkit:end` → upstream bkit fix, do not edit there (`bkit install` overwrites it). Handoff for `@bkit-utility-update-documentation` (this run does not invoke): findings from this report only; known drift first (`file:line` and code that disproves it); no managed-block interiors; no historical records or `*.jsonl`. Unscoped, it walks every indexed doc in several passes and stops partway. It cannot run commands → script behaviour and deployed values from this list. Compress pass can delete a warning — next reader checks every removed "never", "always", or trap. Docs other code reads: hand-fix, then tests `Handoff` finds. Do not trust "synced"; re-grep every changed claim. **Done when:** `Claims` row per hit: `file:line` · what the doc said · what the code does · severity · destination.
|
|
135
|
+
|
|
136
|
+
- [ ] **Step 7 — Setup:** Setup doc enough: new developer or agent in fresh session/worktree gets clean clone → running app and passing local suite using only that doc. Cheap checks every run. Full walk every run.
|
|
137
|
+
|
|
138
|
+
Cheap checks: tool versions in doc vs manifest and version files (e.g. `engines`, `packageManager`, `.nvmrc`, `.python-version`, `rust-toolchain.toml`); every binary a package script, git hook, or local CI runner calls is listed (hook dying on missing binary = usual first-day stop); required vs optional still right (nothing calls it, or platform retired → not required); every command and path in doc exists; every variable code reads is in example env or doc says where to get it, every example variable still read, doc names right example file and how loaded; doc says what agent needs that person already has (env trust in new worktree, language-server provisioning, which steps cloud session cannot run).
|
|
139
|
+
|
|
140
|
+
Full walk → fresh clone into temp directory, not worktree of this checkout (hides missing steps). Follow doc literally, in order. Every time you need something the doc did not say = finding. Goal states, in order, with time each takes: install succeeds; local app serves on doc's port and sign-in works; local static, unit, and integration gate passes; local end-to-end passes; mobile section, when doc has one, through simulator and emulator. Then new worktree of existing checkout through first test passing (agent path). Then which goal states cloud session can reach, and whether doc says which it cannot. Secrets: doc says where each comes from, and whether that works without asking a person. never paste a value. **Done when:** `Setup` row per cheap check; when walk ran, time per goal state and every point doc was not enough.
|
|
141
|
+
|
|
142
|
+
- [ ] **Step 8 — Runbooks:** Procedure exists for each, named by doc and section: production rollback, per host (web deploy, native update plus store build when those exist); database restore and point-in-time recovery; migration fails partway through push; secret rotation, per provider; failing or poisoned background-job queue; outage at primary dependency; user data export and deletion request. Walk every procedure with `Claims` checks: every command exists, every path real, every dashboard step still matches. Missing procedure = finding. Says who to tell but not what to run = finding. Destination: doc and section to add, also `bkit-audit-reliability`. **Done when:** `Runbooks` lists each procedure and its walk.
|
|
143
|
+
- [ ] **Step 9 — Reference:** HTTP routes external or native client calls → generated, current reference (e.g. OpenAPI), not prose. Each background-event name and payload schema → generated or code-adjacent reference matching what is sent. Shared packages → API-doc validation over each entry point (e.g. TSDoc: broken `{@link}` references, exported symbols with no docs). Gap = finding; fix = generated reference, next step. **Done when:** `Reference` row per surface: present or gap.
|
|
144
|
+
- [ ] **Step 10 — Memory:** Local session → auto-memory must point at docs, never copy them. Cloud session → skip and say so.
|
|
145
|
+
- Fact only in memory → doc or ledger row it should move to, and pointer to leave behind.
|
|
146
|
+
- Memory copying doc → cut to pointer (path, section, one-line hook).
|
|
147
|
+
- Pointer at section moved or gone → pointer fix, and whether `Mechanical` missed same move in docs.
|
|
148
|
+
- Memory and doc disagree → code decides. Report says which next step should fix.
|
|
149
|
+
|
|
150
|
+
**Done when:** `Memory` holds each hit, or the skip recorded.
|
|
151
|
+
|
|
152
|
+
- [ ] **Step 11 — Rules:** Read instruction files IDE loads side by side (`AGENTS.md`, `CLAUDE.md`, IDE rule files, `.agents/rules.md`, any other). Directive one forbids, or two commands for same task = finding. Inside `bkit:start` / `bkit:end` → upstream bkit fix. Destination: proposed wording, for owner to pick rule that stands. Load size: byte size of always-applied files, and about a quarter of that in tokens, as a series. Growth with no new rule = copying. **Done when:** `Rules` lists contradictions and load size.
|
|
153
|
+
- [ ] **Step 12 — Topics:** Two docs on one topic = bug (`.agents/docs.md`): pick home, delete copy, link to home. Look in order: same table or list in two docs; section in domain doc repeating ledger row; audit report still giving advice doc replaced. Label each live doc by Diátaxis quadrant (tutorial, how-to, reference, explanation). Doc mixing quadrants = finding for split. Topic agents need with no doc in right quadrant = finding for new one. Record labels so next run diffs them. `@bkit-utility-compress-markdown` overwrites one file per call; this run does not invoke it. Long prose doc may be named as candidate. Never a doc tests parse, never a ledger. **Done when:** `Topics` holds duplicates, quadrant labels, and any compress candidate.
|
|
154
|
+
- [ ] **Step 13 — Handoff:** This run does not edit docs. Read CI workflow for what docs-only push actually runs. Record recheck next step owes after edits this report names: prose lint, format check, managed-block check, `Mechanical` and `Ledgers` again (both should list nothing new), and every test that reads a doc the report says to touch. Find those tests (`git grep -l`), do not list from memory. Change to code comment, script, or migration = code change → normal lanes. **Done when:** `Handoff` names recheck commands and tests.
|
|
155
|
+
- [ ] **Step 14 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per Diátaxis quadrant, link, and anchor checking, decision records, runbooks, each community health file, and API or package reference → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
156
|
+
- [ ] **Step 15 — Anything Else:** (a) Everything changed since previous report's commit touching docs (new or renamed docs, `.agents/*.md` and other rule files, package scripts, env vars, routes, background events, new ledger rows, new external services) → one-line verdict each. (b) Bounded ~30 min pass: what senior technical writer flags that no step asks; read what happened since previous run (incidents, `bkit-audit-logs` reports, new `docs/failures.jsonl` rows, vendor status incidents) — 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`.
|
|
157
|
+
|
|
158
|
+
### 🔒 Gate 2: Probes Check
|
|
159
|
+
|
|
160
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
161
|
+
|
|
162
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
163
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
164
|
+
- [ ] **No secrets:** no secret or credential value anywhere in the report.
|
|
165
|
+
- [ ] **Tree clean:** no doc, ledger, memory, or instruction file changed; scratch only under repo-root `tmp/`.
|
|
166
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
167
|
+
|
|
168
|
+
## Findings
|
|
169
|
+
|
|
170
|
+
<!-- prettier-ignore -->
|
|
171
|
+
| Severity | Use |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| `CRITICAL` | Following the doc destroys data, skips a safety check, or blocks a fresh start with no workaround written; instruction files contradict on a safety rule |
|
|
174
|
+
| `HIGH` | Doc states the opposite of the code on a flag, default, or platform shape; pointer an agent follows that leads nowhere; fact running code depends on, and no ledger row holds it; setup gap with a known workaround |
|
|
175
|
+
| `MEDIUM` | Drifted `file:line`, count, or list; table that renders as raw text or drops cells; setup command wrong but recoverable; missing runbook; missing generated reference; same topic in two docs; mixed Diátaxis quadrant; choice with no decision row |
|
|
176
|
+
| `LOW` | Catalogue one-line scope slightly off; wording drift that changes no instruction; quadrant label with no split needed |
|
|
177
|
+
|
|
178
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: destructive steps and contradictions first.
|
|
179
|
+
|
|
180
|
+
<!-- prettier-ignore -->
|
|
181
|
+
| ID | Severity | Location | Evidence | Expected |
|
|
182
|
+
| --- | --- | --- | --- | --- |
|
|
183
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
184
|
+
|
|
185
|
+
Empty and clean → one row `None`.
|
|
186
|
+
|
|
187
|
+
## Report
|
|
188
|
+
|
|
189
|
+
### Summary
|
|
190
|
+
|
|
191
|
+
PENDING
|
|
192
|
+
|
|
193
|
+
### Previous Run
|
|
194
|
+
|
|
195
|
+
PENDING
|
|
196
|
+
|
|
197
|
+
### Scope
|
|
198
|
+
|
|
199
|
+
PENDING
|
|
200
|
+
|
|
201
|
+
### Catalogue
|
|
202
|
+
|
|
203
|
+
PENDING
|
|
204
|
+
|
|
205
|
+
### Mechanical
|
|
206
|
+
|
|
207
|
+
PENDING
|
|
208
|
+
|
|
209
|
+
### Ledgers
|
|
210
|
+
|
|
211
|
+
PENDING
|
|
212
|
+
|
|
213
|
+
### Claims
|
|
214
|
+
|
|
215
|
+
PENDING
|
|
216
|
+
|
|
217
|
+
### Setup
|
|
218
|
+
|
|
219
|
+
PENDING
|
|
220
|
+
|
|
221
|
+
### Runbooks
|
|
222
|
+
|
|
223
|
+
PENDING
|
|
224
|
+
|
|
225
|
+
### Reference
|
|
226
|
+
|
|
227
|
+
PENDING
|
|
228
|
+
|
|
229
|
+
### Memory
|
|
230
|
+
|
|
231
|
+
PENDING
|
|
232
|
+
|
|
233
|
+
### Rules
|
|
234
|
+
|
|
235
|
+
PENDING
|
|
236
|
+
|
|
237
|
+
### Topics
|
|
238
|
+
|
|
239
|
+
PENDING
|
|
240
|
+
|
|
241
|
+
### Handoff
|
|
242
|
+
|
|
243
|
+
PENDING
|
|
244
|
+
|
|
245
|
+
### Checked
|
|
246
|
+
|
|
247
|
+
PENDING
|
|
248
|
+
|
|
249
|
+
### Not Checked
|
|
250
|
+
|
|
251
|
+
PENDING
|
|
252
|
+
|
|
253
|
+
### Standards Coverage
|
|
254
|
+
|
|
255
|
+
PENDING
|
|
256
|
+
|
|
257
|
+
### Beyond the Steps
|
|
258
|
+
|
|
259
|
+
PENDING
|
|
260
|
+
|
|
261
|
+
### Process Improvements
|
|
262
|
+
|
|
263
|
+
PENDING
|
|
264
|
+
|
|
265
|
+
### 🔒 Gate 3: Report Check
|
|
266
|
+
|
|
267
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
268
|
+
|
|
269
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
270
|
+
- [ ] **Summary:** names count per severity.
|
|
271
|
+
- [ ] **Series:** load size, and setup-walk times when the walk ran, beside previous report's numbers, or marked baseline.
|
|
272
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
273
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
274
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
275
|
+
|
|
276
|
+
> `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.
|
|
277
|
+
|
|
278
|
+
<!-- bkit:end -->
|
|
279
|
+
|
|
280
|
+
## Project Instructions
|
|
@@ -0,0 +1,253 @@
|
|
|
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
|
+
# Duplication Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Verdict on every behaviour with more than one implementation — inline rules, competing capability mechanisms, restated types, paired decisions, and merges that should not have happened.
|
|
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
|
+
> - Generated registers / graphs → verify-only mode or throwaway copy; never regenerate a tracked file.
|
|
23
|
+
|
|
24
|
+
## Universal Instructions
|
|
25
|
+
|
|
26
|
+
### Context & Goals
|
|
27
|
+
|
|
28
|
+
Identical-signature gates catch identical copies; divergent duplication hurts — one behaviour, N implementations drifted apart, each locally correct, review and tests pass. Three shapes, invisible to others' detectors: **rule** (one expression inlined at N sites then edited — expression is not a symbol → text / structural search, not language server), **capability** (one operation, N modules or mechanisms — register, reference search, literal-mechanism search), **paired decision** (two files must change together, each owning its half, nothing tying them — co-change history). Shared home existing ≠ every site calls it; documented convention does not stop drift. Until guard covers both altitudes, this sweep = prevention. Target failure: **copies of one piece of knowledge that silently disagree** — e.g. security control left `null` at call site remediation missed.
|
|
29
|
+
|
|
30
|
+
**Applies when:** source code spanning more than one module, package, or platform. None → one `N/A` row with evidence, never "clean".
|
|
31
|
+
|
|
32
|
+
**Cadence:** monthly. Extra pass when consolidation lands (re-check register row and call sites), new owner module or shared package lands, or production failure traces to divergent copies.
|
|
33
|
+
|
|
34
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
35
|
+
|
|
36
|
+
- Clone taxonomy Type-1 to Type-4 and clone detector at version run (e.g. jscpd clone-types guide, PMD CPD).
|
|
37
|
+
- Structural search at version run (e.g. ast-grep, Semgrep).
|
|
38
|
+
- DRY as knowledge, not text (_The Pragmatic Programmer_, edition read).
|
|
39
|
+
- Rule of three and "The Wrong Abstraction" (Sandi Metz).
|
|
40
|
+
- Change coupling (e.g. code-maat).
|
|
41
|
+
- Package-manager dedupe at version run (e.g. `pnpm dedupe --check`, `npm dedupe`).
|
|
42
|
+
- AI-assisted code-quality research, latest year (e.g. GitClear duplicated-block prevalence).
|
|
43
|
+
|
|
44
|
+
### Scope
|
|
45
|
+
|
|
46
|
+
- Rule altitude: one business rule inlined at N sites — fallback chains, null vs falsy, formatting, predicates, defaults.
|
|
47
|
+
- Capability altitude: one operation with N implementations or mechanisms; capability register.
|
|
48
|
+
- Paired decisions: files that must change together with nothing tying them.
|
|
49
|
+
- Token and syntax-tree clones (Type-1 to Type-3), incl. cross-platform counterparts.
|
|
50
|
+
- Types and schemas restated by hand vs generated / source schema.
|
|
51
|
+
- Two libraries for one job; one package resolved at several versions.
|
|
52
|
+
- Non-code copies: SQL, shared config, i18n strings.
|
|
53
|
+
- Wrong abstractions: landed merges serving different knowledge.
|
|
54
|
+
- Prevention: next step = guard or sweep.
|
|
55
|
+
|
|
56
|
+
### Out of Scope
|
|
57
|
+
|
|
58
|
+
<!-- prettier-ignore -->
|
|
59
|
+
| Excluded item | Why | Where it belongs |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| Single-call-site helpers | Not duplication | — |
|
|
62
|
+
| Capability with one implementation that is wrong | Gap, not duplication | Plan / `docs/failures.jsonl` |
|
|
63
|
+
| Unreachable modules beyond reference check | Dead-code sweep | `bkit-audit-dead-code` |
|
|
64
|
+
| One-off structural problems; module-graph shape | Architecture sweep | `bkit-audit-architecture` |
|
|
65
|
+
| Upgrading / removing dependencies | Dependency sweep | `bkit-audit-dependencies` |
|
|
66
|
+
| Mobile OS divergence (e.g. iOS vs Android) | Test-lane blind spot | `bkit-audit-testing` |
|
|
67
|
+
| Building the guard; CI wiring | Gate change | `bkit-audit-gates` |
|
|
68
|
+
| Consolidating copies | Audit reports only | Plan from this report |
|
|
69
|
+
|
|
70
|
+
### Verdicts
|
|
71
|
+
|
|
72
|
+
- **DUPLICATE:** one piece of knowledge; copies change for the same reason. Name the consolidation and its home.
|
|
73
|
+
- **COINCIDENTAL:** looks alike; changes for different reasons. Leave; record why.
|
|
74
|
+
- **RULE-OF-THREE-PENDING:** two copies of one piece of knowledge. Record and watch; consolidate at the third.
|
|
75
|
+
- **OTHER:** fits none; say why. Same `OTHER` on 2 runs → propose new verdict in `Process Improvements`.
|
|
76
|
+
|
|
77
|
+
**Test:** same knowledge, same reason to change. A paired decision = one decision in two places → `DUPLICATE`; home = paired-owner check or gate.
|
|
78
|
+
|
|
79
|
+
**Confirm before `DUPLICATE`:**
|
|
80
|
+
|
|
81
|
+
- Duplicated name ≠ deliberate platform split (e.g. `.native.tsx` / `.web.tsx`) or local UI handler.
|
|
82
|
+
- Bypass is gratuitous, not a surface the owner cannot serve (e.g. framework-specific request context).
|
|
83
|
+
- Similar defaults are one decision — a least-privilege read default and a signup write default are not; forcing one value breaks a flow.
|
|
84
|
+
- "Dead" / "unwired" copy has no config-only or deployed consumer (explicit worker registries, deployed functions).
|
|
85
|
+
- Co-change history (`Coupling`) says one decision, or already diverged.
|
|
86
|
+
|
|
87
|
+
Carry `COINCIDENTAL` and `RULE-OF-THREE-PENDING` forward in `Carried Forward` — a two-site finding is neither consolidated early nor rediscovered every run.
|
|
88
|
+
|
|
89
|
+
### Pre-Flight / Dependencies
|
|
90
|
+
|
|
91
|
+
**Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available → tool and version; missing → fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
|
|
92
|
+
|
|
93
|
+
#### Core
|
|
94
|
+
|
|
95
|
+
Always verify.
|
|
96
|
+
|
|
97
|
+
- [ ] **Clean Tree:** Steps 2–13 — clean `git status` at recorded commit; findings only mean something against a known tree. Fallback: detached worktree off default branch.
|
|
98
|
+
- [ ] **Text Search:** Steps 3, 5, 7–10 — inline expressions, literals, env names, non-code files, e.g. ripgrep, `git grep`. Fallback: `grep -rn`.
|
|
99
|
+
- [ ] **Structural Search:** Steps 3, 12 — syntax patterns that skip comments / strings and catch reordered copies, e.g. ast-grep, Semgrep; ad hoc run, record resolved version. Fallback: text search; reformatted copies `Not Checked`.
|
|
100
|
+
- [ ] **Clone Detector:** Steps 4, 8 — Type-1 to Type-3 clones, e.g. jscpd, PMD CPD; ad hoc run, record resolved version. Fallback: `Clones` `Not Checked`.
|
|
101
|
+
- [ ] **Git History:** Steps 4, 10 — full history for clone baseline, blame, and co-change. Fallback: growth and coupling `Not Checked`.
|
|
102
|
+
- [ ] **Web:** Step 14 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
103
|
+
|
|
104
|
+
#### Conditional
|
|
105
|
+
|
|
106
|
+
Verify only when applicable.
|
|
107
|
+
|
|
108
|
+
- [ ] **Language Server:** Typed language → Steps 3, 5, 13 — references on helpers and owners, e.g. Serena, `tsserver`, pyright. Fallback: text search only; caller sets = hypotheses; `one` vs `bypassed` unproven.
|
|
109
|
+
- [ ] **Module Graph:** Steps 5, 10 — duplicate symbol names, god nodes, import edges, e.g. graphify, dependency-cruiser, madge. Fallback: module-graph cross-check `Not Checked`.
|
|
110
|
+
- [ ] **Capability Register:** Register exists → Step 5 — capability → owner → status, verify-only mode. Fallback: rows derived in `Capabilities` only; no register = finding.
|
|
111
|
+
- [ ] **Cross-Platform Compare:** 2+ platforms / apps sharing behaviour → Step 4 — counterpart listing, e.g. jscpd `--compare`. Fallback: text search for counterparts.
|
|
112
|
+
- [ ] **Package Manager:** Lockfile → Step 7 — dedupe check and resolution reason, e.g. `pnpm dedupe --check` / `pnpm why`, `npm ls --all`. Fallback: read lockfile.
|
|
113
|
+
|
|
114
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
115
|
+
|
|
116
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
117
|
+
|
|
118
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
119
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
120
|
+
|
|
121
|
+
### Probe Steps
|
|
122
|
+
|
|
123
|
+
- [ ] **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 2 — Detect:** List apps, packages, platforms; shared homes (utility / owner modules); capability register; duplication gates enforced and what each catches (e.g. identical-signature gate → identical copies only). **Done when:** surface map and existing gates in `Checked`, or `N/A` and STOP.
|
|
125
|
+
- [ ] **Step 3 — Rule Altitude:** Hunt one conceptual operation inlined at N sites instead of called from one function, copies differing on load-bearing details: fallback chains (e.g. JS `a ?? b ?? c`, divergent terminal fallback or order); null vs falsy (e.g. JS `??` vs `||`, with / without trim, optional-chain guards); formatting (date / time / timezone, currency, name / initials, address); predicates ("is active / deleted / owner?" filters); defaults (same enum / config default hardcoded in several readers). Structural rules where possible, text search where not; keep rules under `tmp/`, paste each into report for next run. Subtraction per shared helper: references on helper (routed set) minus sites matching inline pattern (inline set) → inline-not-routed = unmigrated site. Counts before reference-graph change (e.g. project references added) = stale → re-take, never carry forward. **Done when:** `Inline Rules` row per rule: helper · routed · inline · unmigrated · verdict, with its search rule.
|
|
126
|
+
- [ ] **Step 4 — Clones:** Clone detector over source roots, machine-readable output, three passes: Type-1 exact; Type-2 renamed (ignore identifiers / literals); Type-3 near-miss (e.g. similarity 0.85, syntax-tree mode). Duplication % per package as series vs previous report. Every hit = candidate for `Verify`, not finding. Multiple platforms → counterpart listing (functions with / without counterpart per side). Growth: exact pass baselined at previous report's commit → clones new since vs consolidated since, blame naming introducer; arrival faster than consolidation = finding. **Done when:** per-package %, growth, counterpart list in `Clones`.
|
|
127
|
+
- [ ] **Step 5 — Capability Altitude:** Above file graph: capabilities, not files. Per capability: owner, callers, status, note. Status: `one` = one implementation, every caller routes through it; `bypassed` = owner exists, some callers skip it; `split` = 2+ competing implementations, no owner; `gap` = designed, not built. Three detectors — different findings: (a) literal-mechanism search for second mechanism (e.g. second SDK client constructor, rate limiter, email-send call, duplicated validation regex) — primary; symbol graph cannot see duplicated regex; (b) language-server references on each owner → caller set, `one` vs `bypassed`; (c) module-graph duplicate-symbol-name check — group callable nodes by name across distinct non-test source files, 3+ definitions = candidate; god-node list flags owner gone load-bearing. Register status ≠ measured status = finding; register is not edited. **Done when:** `Capabilities` row per capability: owner · callers · measured status · register status · verdict.
|
|
128
|
+
- [ ] **Step 6 — Restated Types:** Typed language with schema source (generated DB types, migrations, IDL) → per core table: hand-written types, validation schemas, route validators restating columns, enums, constraints. Not derived from source = finding. Diff vs source: column added, renamed, or nullable on one side only = live defect. **Done when:** `Types` row per restated type: source · derived? · drift · verdict, or skip with evidence.
|
|
129
|
+
- [ ] **Step 7 — Libraries:** Literal search finds second client, not second library. List dependencies across every manifest doing one job: two date libraries, two validation libraries or two majors side by side, two HTTP clients, two markdown parsers. Dedupe check and resolution reason for every package at more than one version. Each = capability row with library as mechanism. **Done when:** `Libraries` lists every same-job pair and multi-version package with reason.
|
|
130
|
+
- [ ] **Step 8 — Outside Code:** SQL: access-policy bodies and helper functions redefined across migrations vs one function. Shared config: type-checker, linter, styling presets copied between apps vs extending shared package. i18n: same string under several keys. List formats clone detector supports; run over migrations and config; text search the rest. **Done when:** every hit = candidate for `Verify`; absent surface in `Checked`.
|
|
131
|
+
- [ ] **Step 9 — Wrong Abstractions:** Opposite failure: merge that landed and should not have. Shared helpers with boolean / mode parameters or per-caller branches (e.g. `if (caller === …)`, >2 option flags) and <3 callers. Callers serve different knowledge → recommend inlining back. `Verify` guards new merges; this reviews old ones. **Done when:** `Wrong Abstractions` row per helper: params · callers · knowledge · verdict.
|
|
132
|
+
- [ ] **Step 10 — Coupling:** Per candidate set: co-change history (e.g. `git log --name-only`, code-maat). Always changed together → true duplicate, consolidate; changed separately → already diverged, decide which behaviour is right first. Reverse detector: file pairs in different packages, or one per platform, co-changing in >50% of commits with no import edge → paired-decision candidate. Comments tying two files by prose (e.g. `keep in sync`, `must match`, `mirrors`). Pair → straight to `Prevention`. **Done when:** `Coupling` row per candidate and pair: co-change share · import edge · verdict.
|
|
133
|
+
- [ ] **Step 11 — Confidence:** Name tool behind every count. Grade claim types: second implementation exists = high (every site read, not matched); exact call-site counts = medium; "no production consumer" = medium, needs in-code corroboration; "does not exist" = high only when absent from schema and all source. Language server under-reports → false `one`: pace queries; re-run surprising low / empty count before recording; empty = inconclusive, corroborate with text search; mocked-module factory keys and packages outside project graph invisible. Module graph: confirms presence, never absence; misses callers in anonymous callbacks and module-level initialisers; manifest-driven or type-only edges can fake cross-package edges and cycles; stale resolution cache after path-alias change. Language server and text search agreeing on count = strongest evidence; disagreement names file to open. Count corrected mid-run → record which, from what, by what tool. **Done when:** `Method` grades every claim type and names tool per count, incl. corrections.
|
|
134
|
+
- [ ] **Step 12 — Prevention:** Does a guard fail on re-implementation at both altitudes — inline rule expression outside its helper, and mechanism (constructor, send call, env name) outside its owner? Per-rule bespoke guard = one guard per consolidated field, forever; structural rule per pattern (owner-file ignores, rules checked in, seeded from Step 3 rules) plus literal search with owner allowlist (env names) covers both altitudes without language server. Record whether recorded decisions favour guard or sweep, and whether evidence since contradicts them. Do not build. **Done when:** `Prevention` states next step = guard or sweep, with evidence and the rules it would start from.
|
|
135
|
+
- [ ] **Step 13 — Verify:** Open every candidate file; cite `file:line` for every survivor. Apply `Verdicts` checks; re-check previous `Carried Forward` rows (third copy → `DUPLICATE`). Rank survivors by blast radius × divergence × user-visibility. Per survivor name consolidation and home: rule → one function in correct shared package, inline copies removed; capability → one owner module with call contract, register row updated; wrong abstraction → inlined back; paired decision → paired-owner check or gate; drifted type or live defect → `docs/failures.jsonl` row, fix ahead of refactor; second library / version → `bkit-audit-dependencies`; deliberate bypass blocked on other work → register row naming blocker (unrecorded bypass reads `one` next run = false clean); one-off structural problem or missing module-graph evidence → `bkit-audit-architecture`. Consolidation changing shared signature → `Expected` names reference check first. **Done when:** every candidate has verdict, evidence, rank, and home.
|
|
136
|
+
- [ ] **Step 14 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per standard, per clone type (Type-1 to Type-4), and per shape (rule, capability, paired decision) → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
137
|
+
- [ ] **Step 15 — Anything Else:** (a) Everything changed since previous report's commit touching duplication (new shared helpers / owner modules, shared packages, cross-platform counterparts of screen or hook, validation schemas and route validators, migrations adding tables / enums / policies, new dependencies, config presets, i18n keys) → one-line verdict each. (b) Bounded ~30 min pass: what senior engineer owning shared packages flags that no step asks; read since previous run (incidents, new `docs/failures.jsonl` rows) — 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`.
|
|
138
|
+
|
|
139
|
+
### 🔒 Gate 2: Probes Check
|
|
140
|
+
|
|
141
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
142
|
+
|
|
143
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
144
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
145
|
+
- [ ] **Sites read:** every `DUPLICATE` cites `file:line` from an opened file, not a match.
|
|
146
|
+
- [ ] **Tree clean:** `git status` clean; tracked registers / graphs unchanged.
|
|
147
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
148
|
+
|
|
149
|
+
## Findings
|
|
150
|
+
|
|
151
|
+
<!-- prettier-ignore -->
|
|
152
|
+
| Severity | Use |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| `CRITICAL` | Divergent copy disables a security / access control (e.g. rate limiter, auth, or tenancy check) or loses data; broken workflow with no workaround |
|
|
155
|
+
| `HIGH` | User-visible divergence between copies of one rule; hand-written type drifted from schema; paired decision out of step; `split` capability on a request path |
|
|
156
|
+
| `MEDIUM` | Copies consistent today (drift risk, no live bug); `bypassed` owner; register status ≠ measured; wrong abstraction; two libraries / versions for one job; SQL / config / i18n copies; clone growth outpacing consolidation |
|
|
157
|
+
| `LOW` | Cosmetic copies; test-only clones; stale register note changing no status |
|
|
158
|
+
|
|
159
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: higher blast radius × divergence × user-visibility first.
|
|
160
|
+
|
|
161
|
+
<!-- prettier-ignore -->
|
|
162
|
+
| ID | Severity | Verdict | Location | Evidence | Expected |
|
|
163
|
+
| --- | --- | --- | --- | --- | --- |
|
|
164
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
165
|
+
|
|
166
|
+
Empty and clean → one row `None`.
|
|
167
|
+
|
|
168
|
+
## Report
|
|
169
|
+
|
|
170
|
+
### Summary
|
|
171
|
+
|
|
172
|
+
PENDING
|
|
173
|
+
|
|
174
|
+
### Previous Run
|
|
175
|
+
|
|
176
|
+
PENDING
|
|
177
|
+
|
|
178
|
+
### Inline Rules
|
|
179
|
+
|
|
180
|
+
PENDING
|
|
181
|
+
|
|
182
|
+
### Clones
|
|
183
|
+
|
|
184
|
+
PENDING
|
|
185
|
+
|
|
186
|
+
### Capabilities
|
|
187
|
+
|
|
188
|
+
PENDING
|
|
189
|
+
|
|
190
|
+
### Types
|
|
191
|
+
|
|
192
|
+
PENDING
|
|
193
|
+
|
|
194
|
+
### Libraries
|
|
195
|
+
|
|
196
|
+
PENDING
|
|
197
|
+
|
|
198
|
+
### Wrong Abstractions
|
|
199
|
+
|
|
200
|
+
PENDING
|
|
201
|
+
|
|
202
|
+
### Coupling
|
|
203
|
+
|
|
204
|
+
PENDING
|
|
205
|
+
|
|
206
|
+
### Method
|
|
207
|
+
|
|
208
|
+
PENDING
|
|
209
|
+
|
|
210
|
+
### Prevention
|
|
211
|
+
|
|
212
|
+
PENDING
|
|
213
|
+
|
|
214
|
+
### Carried Forward
|
|
215
|
+
|
|
216
|
+
PENDING
|
|
217
|
+
|
|
218
|
+
### Checked
|
|
219
|
+
|
|
220
|
+
PENDING
|
|
221
|
+
|
|
222
|
+
### Not Checked
|
|
223
|
+
|
|
224
|
+
PENDING
|
|
225
|
+
|
|
226
|
+
### Standards Coverage
|
|
227
|
+
|
|
228
|
+
PENDING
|
|
229
|
+
|
|
230
|
+
### Beyond the Steps
|
|
231
|
+
|
|
232
|
+
PENDING
|
|
233
|
+
|
|
234
|
+
### Process Improvements
|
|
235
|
+
|
|
236
|
+
PENDING
|
|
237
|
+
|
|
238
|
+
### 🔒 Gate 3: Report Check
|
|
239
|
+
|
|
240
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
241
|
+
|
|
242
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
243
|
+
- [ ] **Summary:** names count per severity, count per verdict, and the guard-or-sweep call.
|
|
244
|
+
- [ ] **Series:** per-package duplication % and clone growth beside previous report's numbers, or marked baseline.
|
|
245
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
246
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
247
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
248
|
+
|
|
249
|
+
> `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.
|
|
250
|
+
|
|
251
|
+
<!-- bkit:end -->
|
|
252
|
+
|
|
253
|
+
## Project Instructions
|