@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,210 @@
|
|
|
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
|
+
# Model Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Each call site: latest capable model for the job; model and fallbacks live; choice in one registry.
|
|
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 edit the model registry, call wrappers, routing config, or call sites; the report proposes the replacement.
|
|
23
|
+
> - Fallback probes use a synthetic fixture; NEVER send production user content, and NEVER write the spend ledger.
|
|
24
|
+
> - never publish a number with no recorded source.
|
|
25
|
+
|
|
26
|
+
## Universal Instructions
|
|
27
|
+
|
|
28
|
+
### Context & Goals
|
|
29
|
+
|
|
30
|
+
Config ids look identical delisted vs choice day. Target failure: **a stale entry indistinguishable from a working one until a fallback fires, which is the moment it has to work** — e.g. text-only model in a file chain, two chains sharing one fallback that then disappears, a floating alias that now names a different model. Pull live catalogue; do not remember or infer ids from version numbers.
|
|
31
|
+
|
|
32
|
+
**Applies when:** code calls hosted model (chat, tools, vision, embeddings, any modality). None → one `N/A` row with evidence, never "clean".
|
|
33
|
+
|
|
34
|
+
**Cadence:** monthly. Extra pass when listed id delisted, call-sends capability lost, expiration or deprecation added, alias resolves to different canonical id, or new task/call site routes through fallback wrapper.
|
|
35
|
+
|
|
36
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
37
|
+
|
|
38
|
+
- Provider model-list APIs, including lifecycle and per-endpoint fields (e.g. OpenRouter models and endpoints APIs: `expiration_date`, `canonical_slug`, `knowledge_cutoff`; Anthropic, OpenAI, and Google model lists).
|
|
39
|
+
- Provider routing controls (e.g. OpenRouter `require_parameters`, `quantizations`, `max_price`, `allow_fallbacks`, zero-retention).
|
|
40
|
+
- Maker deprecation pages (e.g. Anthropic, OpenAI, Google), plus the equivalent for every other maker in a chain.
|
|
41
|
+
- Model cards published by each model's maker.
|
|
42
|
+
- NIST AI 600-1, Generative AI Profile, MEASURE, and MANAGE for third-party models.
|
|
43
|
+
- OWASP Top 10 for LLM Applications, LLM03 Supply Chain; record the edition (e.g. 2025).
|
|
44
|
+
|
|
45
|
+
### Scope
|
|
46
|
+
|
|
47
|
+
- Live provider catalogue = standard for every listed and proposed id.
|
|
48
|
+
- Call-site fitness: capability, cost (catalogue price, not spend), latency, context, modality.
|
|
49
|
+
- Deprecation, retirement, supersession, expiration.
|
|
50
|
+
- Endpoints and fallbacks live, not model-summary claim.
|
|
51
|
+
- One registry vs scattered ids.
|
|
52
|
+
- Proposed registry and per-task routing; not applied this run.
|
|
53
|
+
|
|
54
|
+
### Out of Scope
|
|
55
|
+
|
|
56
|
+
<!-- prettier-ignore -->
|
|
57
|
+
| Excluded item | Why | Where it belongs |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| What a model can do with hostile input, call limits, evals / golden sets | LLM sweep | `bkit-audit-llm` |
|
|
60
|
+
| Prompt text: clarity, structure, fit to the model that runs it | Prompt sweep | `bkit-audit-prompts` |
|
|
61
|
+
| Spend, budgets, blended cost of a switch, fallback-rate dollars | Cost sweep | `bkit-audit-cost` |
|
|
62
|
+
| User-facing latency outside model choice | Performance sweep | `bkit-audit-app-performance` |
|
|
63
|
+
| Personal-data transfer, retention, children's-data borders | Privacy sweep | `bkit-audit-privacy` |
|
|
64
|
+
| Coding-agent model pins | Agent config sweep | `bkit-audit-agents` |
|
|
65
|
+
| Editing the registry, wrappers, or routing | Audit reports only | Plan from this report |
|
|
66
|
+
|
|
67
|
+
### Pre-Flight / Dependencies
|
|
68
|
+
|
|
69
|
+
**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.
|
|
70
|
+
|
|
71
|
+
#### Core
|
|
72
|
+
|
|
73
|
+
Always verify.
|
|
74
|
+
|
|
75
|
+
- [ ] **Catalogue Read:** Steps 3, 5, 6 — live model list per provider call sites use, e.g. OpenRouter `/api/v1/models`, Anthropic models API, OpenAI models API, Google models API. Fallback: maker docs only; live-endpoint claims = hypotheses.
|
|
76
|
+
- [ ] **Web:** Steps 5, 10 — maker deprecation pages, model cards, anchor standards. Fallback: versions recorded as unread.
|
|
77
|
+
|
|
78
|
+
#### Conditional
|
|
79
|
+
|
|
80
|
+
Verify only when applicable.
|
|
81
|
+
|
|
82
|
+
- [ ] **Language Server:** Typed call sites → Step 4 — references, e.g. Serena, `tsserver`. Fallback: text search; name it per claim.
|
|
83
|
+
- [ ] **Endpoint API:** Provider exposes per-model endpoints → Step 6 — e.g. OpenRouter endpoints API. Fallback: model-summary fields only; say so.
|
|
84
|
+
- [ ] **Usage Ledger:** A usage ledger exists → Step 6 — largest measured input per task. Fallback: catalogue context only; measured input `Not Checked`.
|
|
85
|
+
- [ ] **Live Call:** Credential for a fixture call → Step 7. Fallback: endpoint metadata only; liveness `Not Checked`.
|
|
86
|
+
|
|
87
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
88
|
+
|
|
89
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
90
|
+
|
|
91
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
92
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
93
|
+
|
|
94
|
+
### Probe Steps
|
|
95
|
+
|
|
96
|
+
- [ ] **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.
|
|
97
|
+
- [ ] **Step 2 — Detect:** Find every model call site (SDK calls, HTTP to a model API, config lists) and whether choice lives in one registry or literals at sites. Embeddings and other modalities count. Registry absent and ids inline = scatter is the finding; still audit ids. **Done when:** evidence in `Checked`, or `N/A` and STOP.
|
|
98
|
+
- [ ] **Step 3 — Catalogue:** Pull live catalogue for each provider Step 2 found. Record date, URL, counts (full list, any constrained subset calls require, e.g. zero-retention). Every id proposed later must exist in this pull. **Done when:** date, source, and counts in `Catalogue`.
|
|
99
|
+
- [ ] **Step 4 — Call Sites:** Derive each call site's requirements from code this run: modality, tools, and tool choice, structured output, reasoning, output cap, timeout. Do not copy a requirements table forward. Language-server references on each wrapper and each exported chain → every task routing through it; re-run empty results, corroborate with text search. Empty is inconclusive. Task added since previous report appears here only. **Done when:** `Call Sites` row per site: task · wrapper · requirements · chain · `file:line` · how derived.
|
|
100
|
+
- [ ] **Step 5 — Lifecycle:** Hard filters on every listed id and candidate vs Step 3 pull + maker page. (a) Retention call sends (e.g. zero-retention): no matching endpoint → reject (id does not route). (b) `expiration_date` + maker deprecation page; reject id expiring before next refresh; reject preview, experimental, free-tier variants. (c) Tool-calling candidate whose reasoning cannot be switched off → reject (reasoning tokens exhaust the output budget, the model returns no tool call, and the wrapper surfaces a truncation error). (d) Alias or dated snapshot, and which canonical id it resolved to on the pull date. Prefer dated snapshots. An alias whose canonical id differs from the previous report = a model change: name `bkit-audit-llm`; do not run the eval here. (e) Model card URL, knowledge cutoff, open-weight licence, training-on-data policy, maker terms for products serving minors, hosting region for retention-satisfying endpoints. Children's data crossing borders → `bkit-audit-privacy`. **Done when:** `Lifecycle` row per id: filters · canonical id · card · verdict.
|
|
101
|
+
- [ ] **Step 6 — Endpoints:** Model-level summary can pass Step 5 while no single endpoint does. Query endpoints, not summary. Require ≥1, ideally 2, satisfying retention constraint and every parameter call site sends (tools, tool choice including required value, file, structured output — as Step 4's table requires). Record whether call sets flag stopping router sending a parameter to provider that ignores it (e.g. `require_parameters`). Absent → propose in `Proposal`. Open weights: quantization per endpoint; propose pin or order where quality differs. Compare each endpoint's context length and max completion with largest measured input for that task (ledger when it has task; say when not). No output cap on tool-calling path = defect in current list; propose value per task. Latency and throughput per endpoint vs call timeout. Catalogue price = fitness comment on proposed row. Blended spend and fallback-rate dollars → `bkit-audit-cost`. Propose per-task price ceiling as routing config, not spend figure. **Done when:** `Endpoints` row per id: qualifying endpoints · parameters · context vs input · latency vs timeout · verdict.
|
|
102
|
+
- [ ] **Step 7 — Fallbacks:** (a) Chain positions = different makers → one delisting or outage cannot collapse retry. Record router as single point of failure; whether any call constructs direct maker client. Diagram naming maker SDKs is not that client. (b) One synthetic fixture per chain position, under routing parameters production sends. Pass = position accepted call shape. Fail = finding. Proves fallback answers; does not score quality. Extraction accuracy, tool-call validity rate, hostile fixture → `bkit-audit-llm`. (c) Record whether anything counts how often a position fires. Nothing = finding; counter = `Process Improvements` proposal; spend consequence → `bkit-audit-cost`. **Done when:** `Fallbacks` row per position: maker · fixture result or skip · fire-rate measured · verdict.
|
|
103
|
+
- [ ] **Step 8 — Registry:** Re-check current list, not only candidates. (1) Modality: every model in chain accepts input call site sends (image support does not satisfy file part). (2) Reasoning that cannot be switched off on tool-calling path. (3) Task group or list with no call site. References on export plus text search, including docs — search sees planning docs language server does not. Recommend delete unless plan in progress. Carrying lists for unbuilt feature = how registry goes stale. (4) Model ids outside registry. **Done when:** every hit = finding with `file:line`, or clean stated in `Registry`.
|
|
104
|
+
- [ ] **Step 9 — Proposal:** Proposed list + per-task config (retention, required-parameters, quantization pin, price ceiling, output cap); catalogue price and context window as row comments. Chain order = judgement unless `bkit-audit-llm` scorecard cited — label which. Never an invented score. Apply order (report only, does not apply): (1) wrappers must pass per-task settings or nothing else applies; (2) retention routing pinned at the shared boundary before the model switch, so new models are validated under the routing they will run; (3) import registry, delete hardcoded lists, apply list + per-task config; (4) the eval audit's check before the list is treated as mergeable — do not change model, sampling, and fallback behaviour in one unmeasured step; (5) watch with named revert (current lists, by commit) + per-signal thresholds (format-error rate, fallback-fire count, task success). Cost per job → `bkit-audit-cost`. Open decision → one `Proposal` question + recommendation + what would settle it. Route: defect / filter-fail id → proposed list; missing routing param → per-task config; wrapper cannot pass settings → apply-order (1); model change (incl. alias move) → `bkit-audit-llm`; children's-data borders → `bkit-audit-privacy`; unwired group → delete recommendation. **Done when:** `Proposal` holds list, apply order, watch plan, any open question.
|
|
105
|
+
- [ ] **Step 10 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per catalogue field, routing parameter, maker lifecycle rule, and third-party-model control this procedure relies on → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
106
|
+
- [ ] **Step 11 — Anything Else:** (a) Everything changed since previous report's commit touching model choice (registry, wrappers, call sites, routing parameters, embedding model id) → one-line verdict each. Read provider and maker changelogs since previous report for changed meaning of retention routing, reasoning, tool choice, or pricing. Flag catalogue anomalies on current ids: price jump, context cut, endpoint count fallen to one. (b) Bounded ~30 min pass: what senior ML platform engineer flags that no step asks; read since previous run (incidents, `bkit-audit-logs` reports, new `docs/failures.jsonl` rows, vendor status incidents) — what would no step catch? Include catalogue/changelog items 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`.
|
|
107
|
+
|
|
108
|
+
### 🔒 Gate 2: Probes Check
|
|
109
|
+
|
|
110
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
111
|
+
|
|
112
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
113
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
114
|
+
- [ ] **IDs sourced:** every proposed id exists in this run's catalogue pull; no number without a recorded source.
|
|
115
|
+
- [ ] **Registry untouched:** no edit to the registry, wrappers, routing config, or call sites.
|
|
116
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
117
|
+
|
|
118
|
+
## Findings
|
|
119
|
+
|
|
120
|
+
<!-- prettier-ignore -->
|
|
121
|
+
| Severity | Use |
|
|
122
|
+
| --- | --- |
|
|
123
|
+
| `CRITICAL` | No listed model has a live endpoint that accepts the call's modality and required parameters; fallback chain has no working position |
|
|
124
|
+
| `HIGH` | A fallback position would fail the call shape; listed id deprecated, retiring, or expiring before the next refresh; model id outside the registry; tool-calling model whose reasoning cannot be switched off; chain whose positions share one maker; router may drop a parameter the call sends |
|
|
125
|
+
| `MEDIUM` | Floating alias, or alias whose canonical id moved; context or output cap below measured input; only one qualifying endpoint; unwired model list still maintained; open-weight quantization not pinned; nothing records fallback fires |
|
|
126
|
+
| `LOW` | Proposed row missing an inline lifecycle or price comment; doc names a model the registry does not, with no call site |
|
|
127
|
+
|
|
128
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: a call that cannot be served first.
|
|
129
|
+
|
|
130
|
+
<!-- prettier-ignore -->
|
|
131
|
+
| ID | Severity | Location | Evidence | Expected |
|
|
132
|
+
| --- | --- | --- | --- | --- |
|
|
133
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
134
|
+
|
|
135
|
+
Empty and clean → one row `None`.
|
|
136
|
+
|
|
137
|
+
## Report
|
|
138
|
+
|
|
139
|
+
### Summary
|
|
140
|
+
|
|
141
|
+
PENDING
|
|
142
|
+
|
|
143
|
+
### Previous Run
|
|
144
|
+
|
|
145
|
+
PENDING
|
|
146
|
+
|
|
147
|
+
### Catalogue
|
|
148
|
+
|
|
149
|
+
PENDING
|
|
150
|
+
|
|
151
|
+
### Call Sites
|
|
152
|
+
|
|
153
|
+
PENDING
|
|
154
|
+
|
|
155
|
+
### Lifecycle
|
|
156
|
+
|
|
157
|
+
PENDING
|
|
158
|
+
|
|
159
|
+
### Endpoints
|
|
160
|
+
|
|
161
|
+
PENDING
|
|
162
|
+
|
|
163
|
+
### Fallbacks
|
|
164
|
+
|
|
165
|
+
PENDING
|
|
166
|
+
|
|
167
|
+
### Registry
|
|
168
|
+
|
|
169
|
+
PENDING
|
|
170
|
+
|
|
171
|
+
### Proposal
|
|
172
|
+
|
|
173
|
+
PENDING
|
|
174
|
+
|
|
175
|
+
### Checked
|
|
176
|
+
|
|
177
|
+
PENDING
|
|
178
|
+
|
|
179
|
+
### Not Checked
|
|
180
|
+
|
|
181
|
+
PENDING
|
|
182
|
+
|
|
183
|
+
### Standards Coverage
|
|
184
|
+
|
|
185
|
+
PENDING
|
|
186
|
+
|
|
187
|
+
### Beyond the Steps
|
|
188
|
+
|
|
189
|
+
PENDING
|
|
190
|
+
|
|
191
|
+
### Process Improvements
|
|
192
|
+
|
|
193
|
+
PENDING
|
|
194
|
+
|
|
195
|
+
### 🔒 Gate 3: Report Check
|
|
196
|
+
|
|
197
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
198
|
+
|
|
199
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
200
|
+
- [ ] **Summary:** names count per severity, the catalogue date, and the counts.
|
|
201
|
+
- [ ] **Series:** every series beside previous report's numbers, or marked baseline.
|
|
202
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
203
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
204
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
205
|
+
|
|
206
|
+
> `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.
|
|
207
|
+
|
|
208
|
+
<!-- bkit:end -->
|
|
209
|
+
|
|
210
|
+
## Project Instructions
|
|
@@ -0,0 +1,211 @@
|
|
|
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
|
+
# Privacy Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Lifecycle of personal data — what is held, where it goes, how long it stays, whether deletion removes the person, whether what people are told matches the code.
|
|
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
|
+
> - Name each field and where it lives; never copy a personal-data value into the report.
|
|
23
|
+
|
|
24
|
+
## Universal Instructions
|
|
25
|
+
|
|
26
|
+
### Context & Goals
|
|
27
|
+
|
|
28
|
+
Privacy rules land with features; nothing re-reads them together. Drift: new table without retention; processor missing from list; deletion cascades only through tables that existed when written; privacy policy describes older app. None fail a test. Most findings = owner decisions (keep / prune / anonymise), not code changes.
|
|
29
|
+
|
|
30
|
+
**Applies when:** system holds personal data (accounts, contact details, content about people). None → one `N/A` row with evidence, never "clean".
|
|
31
|
+
|
|
32
|
+
**Cadence:** once before launch, then ≥ yearly (run can serve as annual privacy review). Extra pass when migration adds personal-data tables / columns, or a new processor lands.
|
|
33
|
+
|
|
34
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed. Covers regimes `Regimes` finds apply and guidance they rely on; statutes also record compilation.
|
|
35
|
+
|
|
36
|
+
- GDPR and UK GDPR.
|
|
37
|
+
- ePrivacy Art 5(3) and EDPB Guidelines 2/2023.
|
|
38
|
+
- EDPB DPIA criteria (WP248 rev.01).
|
|
39
|
+
- Children's rules (e.g. COPPA, ICO Age Appropriate Design Code).
|
|
40
|
+
- National / state laws (e.g. Australian Privacy Act, CCPA).
|
|
41
|
+
|
|
42
|
+
### Scope
|
|
43
|
+
|
|
44
|
+
- Applicable regimes and changes.
|
|
45
|
+
- Every personal-data store: DB rows, file storage, derived data (embeddings), logs, device storage.
|
|
46
|
+
- Children's data: age knowledge, consent, defaults.
|
|
47
|
+
- Impact assessments.
|
|
48
|
+
- Every recipient system and contract / transfer basis.
|
|
49
|
+
- Retention, deletion, other rights.
|
|
50
|
+
- Privacy policy, in-app copy, store declarations vs code.
|
|
51
|
+
- Breach readiness.
|
|
52
|
+
|
|
53
|
+
### Out of Scope
|
|
54
|
+
|
|
55
|
+
<!-- prettier-ignore -->
|
|
56
|
+
| Excluded item | Why | Where it belongs |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| Auth holes, secrets, PII in logs as attack surface | Security sweep | `bkit-audit-security` |
|
|
59
|
+
| Row-level access and purge-job mechanics | Database sweep | `bkit-audit-database` |
|
|
60
|
+
| Analytics payloads, consent mode | Tracking sweep | `bkit-audit-analytics`, against this audit's rules |
|
|
61
|
+
| Store declarations in depth | Store sweep | `bkit-audit-app-store`, against this audit's inventory |
|
|
62
|
+
| Changing retention / data / policy | 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
|
+
- [ ] **Published Policy:** Step 10 — privacy policy and in-app privacy copy readable (repo file or live URL). Fallback: unreadable → `Not Checked`; no policy = finding.
|
|
73
|
+
- [ ] **Web:** Steps 2, 6, 12 — regulator and law sources, vendor sub-processor pages, anchor standards. Fallback: regime changes and versions recorded as unread.
|
|
74
|
+
|
|
75
|
+
#### Conditional
|
|
76
|
+
|
|
77
|
+
Verify only when applicable.
|
|
78
|
+
|
|
79
|
+
- [ ] **Live Catalogue:** Hosted DB → Steps 3, 7 — read-only listing of non-row stores and purge jobs, e.g. platform MCP `execute_sql`. Fallback: migrations only; live state = hypothesis.
|
|
80
|
+
- [ ] **Vendor Settings:** Third-party processors → Steps 6, 7 — retention, scrubbing, region, e.g. vendor dashboard, API, MCP. Fallback: code and docs only; vendor settings `Not Checked`.
|
|
81
|
+
- [ ] **Agreements:** Processors → Steps 6, 11 — signed processing agreements and breach-notice terms, e.g. repo copies, contract store. Fallback: public vendor terms; signed status `Not Checked`.
|
|
82
|
+
|
|
83
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
84
|
+
|
|
85
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
86
|
+
|
|
87
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
88
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
89
|
+
|
|
90
|
+
### Probe Steps
|
|
91
|
+
|
|
92
|
+
- [ ] **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.
|
|
93
|
+
- [ ] **Step 2 — Regimes:** Per candidate regime: applies? why (user locations, turnover / volume thresholds, exemptions and their exceptions, child-directed or actual knowledge). Non-binding regime → mark which checks run as good practice. List law / regulator / code changes since previous report's date, with source links. **Done when:** `Regimes` row per regime: applies · why · changes.
|
|
94
|
+
- [ ] **Step 3 — Inventory:** Schema and code. Per table / column / payload: what, whose (user / non-user member / third party named in content), why held, where documented; strictly necessary? default? Optional on by default or model-prompt data beyond task need = finding. Group by purpose → record-of-processing: lawful basis, subjects, recipients, transfer destination and mechanism, security measure. Consent purposes → consent record and withdrawal path. Third parties in content → legitimate-interests assessment and notify decision. Non-row stores: file storage, device caches, derived data (embeddings as personal as source text). Device storage (cookies, local storage, native caches, SDK identifiers) → strictly necessary vs needs consent. **Done when:** `Inventory` lists every store; store no doc mentions = finding.
|
|
95
|
+
- [ ] **Step 4 — Children:** When product can hold children's data, state every run: how child is known (field / role / parent statement / not at all) and where; consent path per age band and rule setting it; child defaults (visibility, location, sharing, automated processing); age-threshold crossing (re-consent / role change / nothing); parent monitoring of a child (most children's rules require telling the child). **Done when:** answers in `Inventory`, or evidence product cannot hold children's data in `Checked`.
|
|
96
|
+
- [ ] **Step 5 — Assessments:** Current impact assessment (DPIA / PIA) per inventory purpose; list uncovered. Children, new tech (language models), third-party data in content usually meet threshold. Features since previous report's commit vs assessment register; unassessed feature = finding. **Done when:** every purpose has assessment or finding.
|
|
97
|
+
- [ ] **Step 6 — Recipients:** Find in code (SDK imports, outbound hosts), not docs: hosting, DB, error tracking, background jobs, email, payments, maps, model providers, anything new. Per recipient: what, why, how long kept. Verify every vendor-side control docs claim (e.g. zero-retention model calls, error-tracker scrub list) in code and tests. Per processor: processing agreement signed (children's-data assurance if required); sub-processor list URL, last checked, change notice; region and transfer mechanism; processor chain (routers fan out); exit plan (export, deletion on exit, replacement). **Done when:** `Recipients` row per system; undocumented one = finding.
|
|
98
|
+
- [ ] **Step 7 — Retention:** Per inventory row: what deletes / anonymises it (scheduled job / worker / cascade / nothing); stated period vs enforcing mechanism. Good answer = period, enforcing job, and lawful basis. "Nothing removes it" = finding only without a recorded decision in `docs/decisions.jsonl`. Exception: children's data needs a deletion timeframe regardless — most children's rules forbid indefinite keeping. Published retention policy required → check inventory against published text. **Done when:** `Retention` row per store: period · mechanism, or "no decision".
|
|
99
|
+
- [ ] **Step 8 — Deletion:** Read account and tenant deletion code against inventory. Stores reached vs missed: email- / name-keyed rows, file objects, rows in other tenants naming the person. External systems from `Recipients`: does deleting our row delete theirs (payment customers, error-tracker user context, job payloads, backups)? Every run: after deleting a user, what still maps their id back to a person? Deletion test must go red on a missed store — "user can no longer sign in" is not a deletion test. **Done when:** `Deletion` lists every store reached / missed.
|
|
100
|
+
- [ ] **Step 9 — Rights:** Per right, how it works today or that it doesn't: access and export (machine-readable where required); correction; partial erasure keeping the account (incl. parent for child); request from a third party named in content; objection and restriction; requester verification (incl. parent for child); response deadline per applicable regime; request log and complaints route. Automated actions with real effect (e.g. a model creating / changing / deleting user data) → "significant effect: yes / no" and reasoning. Right with no exercise path = owner decision, not defect. **Done when:** `Rights` line per right.
|
|
101
|
+
- [ ] **Step 10 — Claims:** Read the privacy policy linked from sign-up and in-app privacy copy; compare each claim with `Inventory`, `Recipients`, `Retention`, `Deletion`, `Rights`. Unnamed processor, wrong retention period, unkept promise, unmentioned significant automated decision = finding. Store privacy declarations likewise once listings exist. Child members possible → child-readable policy and collection notices; notice to child when a parent can monitor. Terms, refund wording, accessibility statement likewise. **Done when:** `Claims` row per claim: matches / finding.
|
|
102
|
+
- [ ] **Step 11 — Breaches:** Written breach plan per applicable regime: regulator clock and when affected people are told; internal log of every breach (notifiable or not); each processor's notice duty and speed from its agreement. Children's regime requires a written security programme → named coordinator, ≥ yearly risk assessment, tested safeguards. **Done when:** every requirement met or finding.
|
|
103
|
+
- [ ] **Step 12 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per standard and each obligation this procedure relies on → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
104
|
+
- [ ] **Step 13 — Anything Else:** (a) Everything changed since previous report's commit touching personal data (migrations, tables / columns, routes and server actions, SDKs and outbound hosts, buckets, consent screens, privacy copy) → one-line verdict each. (b) Bounded ~30 min pass: what senior privacy counsel flags that no step asks; read what happened since previous run (incidents, new `docs/failures.jsonl` rows) — what would no step catch? End with what a regulator would ask that this run cannot answer and legal questions for owner / counsel. **Done when:** `Beyond the Steps` holds both passes and regulator questions, or `none`. Class seen on 2 runs → propose step in `Process Improvements`.
|
|
105
|
+
|
|
106
|
+
### 🔒 Gate 2: Probes Check
|
|
107
|
+
|
|
108
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
109
|
+
|
|
110
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
111
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
112
|
+
- [ ] **No values:** no personal-data value anywhere in the report.
|
|
113
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
114
|
+
|
|
115
|
+
## Findings
|
|
116
|
+
|
|
117
|
+
<!-- prettier-ignore -->
|
|
118
|
+
| Severity | Use |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `CRITICAL` | Personal data exposed to someone who should not see it, or sent to an unnamed processor; deletion leaves a direct identifier; children's data collected without required consent |
|
|
121
|
+
| `HIGH` | Personal-data store without retention rule or recorded decision; privacy-policy promise the code breaks; processor without agreement / transfer basis; deletion test blind to a missed store; child row without deletion timeframe |
|
|
122
|
+
| `MEDIUM` | Doc describes a store / processor wrongly; purpose without impact assessment; right without exercise path; missing breach-plan element |
|
|
123
|
+
| `LOW` | Undocumented field already covered by deletion, retention, and processor list; wording drift changing no obligation |
|
|
124
|
+
|
|
125
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: children's data first. No users yet → do not lower severity for empty production tables.
|
|
126
|
+
|
|
127
|
+
<!-- prettier-ignore -->
|
|
128
|
+
| ID | Severity | Location | Evidence | Expected |
|
|
129
|
+
| --- | --- | --- | --- | --- |
|
|
130
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
131
|
+
|
|
132
|
+
Empty and clean → one row `None`.
|
|
133
|
+
|
|
134
|
+
## Report
|
|
135
|
+
|
|
136
|
+
### Summary
|
|
137
|
+
|
|
138
|
+
PENDING
|
|
139
|
+
|
|
140
|
+
### Previous Run
|
|
141
|
+
|
|
142
|
+
PENDING
|
|
143
|
+
|
|
144
|
+
### Regimes
|
|
145
|
+
|
|
146
|
+
PENDING
|
|
147
|
+
|
|
148
|
+
### Inventory
|
|
149
|
+
|
|
150
|
+
PENDING
|
|
151
|
+
|
|
152
|
+
### Recipients
|
|
153
|
+
|
|
154
|
+
PENDING
|
|
155
|
+
|
|
156
|
+
### Retention
|
|
157
|
+
|
|
158
|
+
PENDING
|
|
159
|
+
|
|
160
|
+
### Deletion
|
|
161
|
+
|
|
162
|
+
PENDING
|
|
163
|
+
|
|
164
|
+
### Rights
|
|
165
|
+
|
|
166
|
+
PENDING
|
|
167
|
+
|
|
168
|
+
### Claims
|
|
169
|
+
|
|
170
|
+
PENDING
|
|
171
|
+
|
|
172
|
+
### Annual Review
|
|
173
|
+
|
|
174
|
+
PENDING
|
|
175
|
+
|
|
176
|
+
### Checked
|
|
177
|
+
|
|
178
|
+
PENDING
|
|
179
|
+
|
|
180
|
+
### Not Checked
|
|
181
|
+
|
|
182
|
+
PENDING
|
|
183
|
+
|
|
184
|
+
### Standards Coverage
|
|
185
|
+
|
|
186
|
+
PENDING
|
|
187
|
+
|
|
188
|
+
### Beyond the Steps
|
|
189
|
+
|
|
190
|
+
PENDING
|
|
191
|
+
|
|
192
|
+
### Process Improvements
|
|
193
|
+
|
|
194
|
+
PENDING
|
|
195
|
+
|
|
196
|
+
### 🔒 Gate 3: Report Check
|
|
197
|
+
|
|
198
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
199
|
+
|
|
200
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
201
|
+
- [ ] **Summary:** names count per severity.
|
|
202
|
+
- [ ] **Annual Review:** states whether this run serves as the annual privacy review and whether everyone with children's-data access completed privacy training.
|
|
203
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
204
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
205
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
206
|
+
|
|
207
|
+
> `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.
|
|
208
|
+
|
|
209
|
+
<!-- bkit:end -->
|
|
210
|
+
|
|
211
|
+
## Project Instructions
|