@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,223 @@
|
|
|
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
|
+
# bkit Adoption Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Every file bkit ships — written and kept current (`core/`, `shared/`) or copy-and-own (`templates/`) — used, and used correctly; nothing missed.
|
|
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 print or copy a token, key, or secret value; names and presence only.
|
|
23
|
+
> - never run `bkit install` / `bkit upgrade`; bkit commands = `bkit check`, `bkit doctor` only.
|
|
24
|
+
> - NEVER run a hook, script, or tool that writes, commits, pushes, or calls a remote write API; syntax checks and read-only modes only.
|
|
25
|
+
> - No skip record exists: every unadopted template is re-listed each run, with the previous verdict and its age.
|
|
26
|
+
|
|
27
|
+
## Universal Instructions
|
|
28
|
+
|
|
29
|
+
### Context & Goals
|
|
30
|
+
|
|
31
|
+
bkit ships three folders. Path inside a folder = path it lands at in the repo.
|
|
32
|
+
|
|
33
|
+
<!-- prettier-ignore -->
|
|
34
|
+
| Package folder | Install does | Repo gets |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `.bkit/core/` | Writes, keeps current; `engine/`, `workflows/`, `prompts/`, `LICENSE.md` never written as-is (workflows + prompts render to host agent and command copies) | Whole files, managed blocks, hooks, reference docs in `.bkit/`, audit and plan templates |
|
|
37
|
+
| `.bkit/shared/` | Writes, keeps current | bkit blocks and keys inside files you also edit (`docs/*.md`, `.gitignore`, settings, tool-server config) |
|
|
38
|
+
| `.bkit/templates/` | Never writes into the repo; raw copy at `.bkit/templates/`, `bkit upgrade` lists changed paths | Nothing until you copy one and own it |
|
|
39
|
+
|
|
40
|
+
`bkit check` proves written files match the package. Nothing proves the rest: a template never copied, a copy whose tool never runs, a written doc holding only bkit's block, a shipped audit never run. Target failure: **a shipped piece that would have caught something sits unused or half-wired, and every check stays green** — e.g. `.husky/pre-push` never copied, tests run only in CI; `.lintstagedrc.json` copied but `pre-commit` never calls lint-staged; `{{NODE_VERSION}}` left raw in `bkit-ci.yml`; `bkit-cloud.yml` waits on a workflow name that no longer exists; `docs/security.md` holds bkit's block and nothing else; `bkit-audit-security` never run; three releases behind with hand edits inside managed blocks.
|
|
41
|
+
|
|
42
|
+
**Applies when:** `.bkit/version` present. Absent → one `N/A` row with evidence, never "clean".
|
|
43
|
+
|
|
44
|
+
**Cadence:** monthly. Extra pass after `bkit upgrade`, after adopting or dropping a template, and after adding an agent host.
|
|
45
|
+
|
|
46
|
+
**Anchor Standards:** record bkit version and date read. Newer version → `Standards` step reads what changed.
|
|
47
|
+
|
|
48
|
+
- bkit, at the installed version: `.bkit/templates.md` (Contract, placeholders, Context-fetch blocks), `.bkit/README.md` § File ownership and § Ongoing CLI, `.bkit/install.md`; release notes since pinned version.
|
|
49
|
+
- Config reference of each tool behind an adopted template (e.g. Husky, lint-staged, Vale, Prettier, Renovate, Dependabot, GitHub Actions workflow syntax, direnv); record version read.
|
|
50
|
+
|
|
51
|
+
### Scope
|
|
52
|
+
|
|
53
|
+
- Inventory: every file in the package's `core/`, `shared/`, `templates/` vs `.bkit/version` `canonicalHashes` vs the repo's `.bkit/templates/` copy.
|
|
54
|
+
- Version: pinned vs installed vs registry latest.
|
|
55
|
+
- `bkit check` drift; `bkit doctor` advisories.
|
|
56
|
+
- Hosts: agent hosts in use vs bkit hosts installed; host agent, command, and hook copies per host.
|
|
57
|
+
- Written files: managed blocks and owned keys untouched; files bkit shares with you carry your part.
|
|
58
|
+
- Audit templates: each run within its cadence.
|
|
59
|
+
- Templates: each adopted, or not and why; adopted copies filled, reconciled, merged after upgrade, wired, running.
|
|
60
|
+
- Context-fetch blocks: one per context with a lane; each matches the lane it names.
|
|
61
|
+
|
|
62
|
+
### Out of Scope
|
|
63
|
+
|
|
64
|
+
<!-- prettier-ignore -->
|
|
65
|
+
| Excluded item | Why | Where it belongs |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| Agent permissions, hooks firing, tool servers, parity across hosts — bkit-shipped gates included | Agent config sweep | `bkit-audit-agents` |
|
|
68
|
+
| Whether a doc's content is true | Documentation sweep | `bkit-audit-documentation` |
|
|
69
|
+
| Branch protection, required checks, hosted variables | Config sweep | `bkit-audit-config` |
|
|
70
|
+
| CI token permissions, action pinning, secret rotation | Security sweep | `bkit-audit-security` |
|
|
71
|
+
| Lint and scanner suppressions inside adopted configs | Slop sweep | `bkit-audit-slop` |
|
|
72
|
+
| Whether a sweep here should become a gate | Gate sweep | `bkit-audit-gates` |
|
|
73
|
+
| Copying, editing, or merging a template; running `bkit install` / `bkit upgrade` | Audit reports only | Plan from this report |
|
|
74
|
+
|
|
75
|
+
### Pre-Flight / Dependencies
|
|
76
|
+
|
|
77
|
+
**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.
|
|
78
|
+
|
|
79
|
+
#### Core
|
|
80
|
+
|
|
81
|
+
Always verify.
|
|
82
|
+
|
|
83
|
+
- [ ] **Checkout:** Steps 2–11 — repo with `.bkit/version`. Fallback: none; absent → `N/A` and STOP.
|
|
84
|
+
- [ ] **Package:** Step 2 — installed package root (e.g. `node_modules/@cbartens/bkit/.bkit/`, resolved via the package manager). Fallback: unpack the pinned version (e.g. `npm pack @cbartens/bkit@<pinnedVersion>` into a throwaway dir); else inventory from `.bkit/templates/` + `canonicalHashes` only, `core/` + `shared/` unwritten files `Not Checked`.
|
|
85
|
+
- [ ] **bkit CLI:** Steps 4, 5 — `bkit check`, `bkit doctor` (or `pnpm bkit …`). Fallback: hash written files against `canonicalHashes` by hand; advisories `Not Checked`.
|
|
86
|
+
- [ ] **Registry:** Step 3 — latest version and release notes (e.g. `npm view @cbartens/bkit version`, release page). Fallback: pinned vs installed only; currency `Not Checked`.
|
|
87
|
+
|
|
88
|
+
#### Conditional
|
|
89
|
+
|
|
90
|
+
Verify only when applicable.
|
|
91
|
+
|
|
92
|
+
- [ ] **CI Host Read:** Repo has CI → Steps 8, 9 — workflow list, job names, recent runs, artifact names (e.g. `gh workflow list`, `gh run list`, `gh run view --json jobs`). Fallback: workflow files only; lane matching `Not Checked`.
|
|
93
|
+
- [ ] **Template Tools:** ≥1 adopted template → Step 9 — each tool behind one, installed version (e.g. `npx husky --version`, `vale --version`, `npx lint-staged --version`). Fallback: version from lockfile; runs `Not Checked`.
|
|
94
|
+
- [ ] **Machine Config:** Audit runs on a developer machine → Step 9 — local git config (e.g. `git config core.hooksPath`), direnv allow state. Fallback: repo-level only; machine wiring `Not Checked`.
|
|
95
|
+
|
|
96
|
+
### 🔒 Gate 1: Prerequisites Check
|
|
97
|
+
|
|
98
|
+
**Checkpoint.** Verify and check `[x]` all applicable boxes above, then continue to `Probe Steps` without asking.
|
|
99
|
+
|
|
100
|
+
- [ ] **Gaps named:** every missing item names its fallback and `Not Checked` entry.
|
|
101
|
+
- [ ] **Gate 1 - Verified:** All Core items checked. All applicable Conditional items checked.
|
|
102
|
+
|
|
103
|
+
### Probe Steps
|
|
104
|
+
|
|
105
|
+
- [ ] **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. Carry each `Adoption` verdict forward with its age. **Done when:** closure rate in `Previous Run`, or run marked baseline.
|
|
106
|
+
- [ ] **Step 2 — Inventory:** List every file in the package's `core/`, `shared/`, `templates/`. Landing path = path inside the folder; `core/engine/`, `core/workflows/`, `core/prompts/`, each `LICENSE.md` → no landing (workflows + prompts → Step 5 host copies). Join: package file · landing path present · in `canonicalHashes` · repo `.bkit/templates/` copy matches package `templates/`. Kind per file: whole file / managed block / owned keys / template. Findings: `core/` or `shared/` file with landing path absent; `canonicalHashes` entry the package no longer ships; repo `.bkit/templates/` differing from package. Group a folder into one row only when every file shares one verdict. **Done when:** `Inventory` row per shipped file or uniform folder: folder · landing path · kind · present · recorded.
|
|
107
|
+
- [ ] **Step 3 — Version:** `pinnedVersion` vs installed package vs registry latest; pinned ≠ installed = package bumped without `bkit upgrade`. Behind → release count; release-note changes touching this repo; template paths changed since pinned version. **Done when:** `Version` names all three versions and every relevant release-note change.
|
|
108
|
+
- [ ] **Step 4 — Check and Doctor:** `bkit check`: exit code, each drift line → cause. `bkit doctor`: each advisory → adopt / reject (why) / not applicable; previous report's reject carried forward, re-raised only when the advisory text changed. **Done when:** `Check and Doctor` row per drift line and advisory.
|
|
109
|
+
- [ ] **Step 5 — Hosts:** Agent hosts in use (repo config dirs, team use; newest `bkit-audit-agents` `Hosts` as cross-check, not source) vs bkit hosts installed. Per installed host: one agent copy per `core/prompts/` source, one command copy per `core/workflows/` source, every `core/` hook file present, executable, and wired in that host's settings. Findings: host in use with no bkit install (agents there run without bkit gates); missing or extra copy; hook file present but unwired, or wired but absent. Whether hooks fire and agree across hosts → `bkit-audit-agents`. **Done when:** `Hosts` row per host: in use · installed · agent copies · command copies · hooks wired.
|
|
110
|
+
- [ ] **Step 6 — Written Files:** (a) Every `bkit:start` / `bkit:end` block and owned key: untouched (Step 4 drift). Hand edit → move below `bkit:end` / to `Project Instructions`; bkit-shipped defect → upstream bkit fix. (b) Files bkit shares with you (`shared/docs/*.md`, `AGENTS.md`, `CLAUDE.md`, `.agents/*.md`, `.gitignore`, `.gitattributes`, settings, tool-server config): your part present for every block that expects one — a doc holding only bkit's block is unadopted. `.bkit/.env.example` → `.bkit/.env` present, git-ignored, every listed key set (names only). Tracker or tool-server entry bkit wrote → credential env var it names is set. Whether your part is true → `bkit-audit-documentation`. **Done when:** `Written Files` row per shared file: block untouched · your part present · verdict.
|
|
111
|
+
- [ ] **Step 7 — Audits:** Per `docs/templates/bkit-audit-*.md`: `**Applies when:**` met yes / no (evidence); `**Cadence:**`; newest report under `docs/audits/` by commit date (never run = due; same rule as `bkit-utility-update-roadmap`). `N/A` report with evidence = run. Findings: applies and never run; overdue past one cadence; `Process Improvements` `Project` edits proposed in a report and absent from that template's `Project Instructions`. **Done when:** `Audits` row per template: applies · cadence · last run · overdue by · verdict.
|
|
112
|
+
- [ ] **Step 8 — Adoption:** Per file in package `templates/`, joined to `.bkit/templates.md` § Contract (file missing from Contract → upstream bkit doc fix): adopted (copy at landing path, or at the destination the Contract names) / not adopted. Not adopted → `gap` (fits this stack, nothing else does the job) / `covered` (name the tool that does) / `not applicable` (evidence, e.g. no GitHub Actions, no markdown docs). Two templates for one job (e.g. Renovate and Dependabot) → one adopted, or `bkit.depUpdater` recorded. Context-fetch: per context (`ci`, `diff`, `e2e`, `runtime`, `web`) the repo has a lane or provider for → block below `bkit:end` in `.agents/context.md`, or `<!-- context-fetch:none … -->` naming it; provider in use (dependency, config, CI step) with a shipped `templates/context/` file and no block → `gap`. Re-list every row each run; diff vs previous report: newly adopted, newly dropped, unchanged with age. **Done when:** `Adoption` row per template file and per context: adopted · verdict · evidence · age.
|
|
113
|
+
- [ ] **Step 9 — Templates:** Per adopted template: (a) Filled: no raw `{{…}}` placeholder; default branch and runner real; no stub sentinel left. (b) Reconciled: `diff .bkit/templates/<path> <path>` → each difference adopt / reject (why); placeholder lines differ by design. (c) Merged: package changed the template after the copy's last change (Step 3, `git log` on `.bkit/templates/<path>`) → merged / rejected (why) / pending. (d) Wired: tool behind it installed, and invoked where the template expects — e.g. hook manager installed by a `prepare` script, hooks executable, `core.hooksPath` set; `pre-commit` calls lint-staged; prose linter styles synced and its config loads them; scanner plugin path resolves; tool-server snippet merged into the host's server config; secrets config names real stores; cloud workflow waits on a workflow `name:` that exists; CI template's job names are the ones the repo requires. (e) Runs: one read-only invocation where one exists (e.g. `sh -n` on a hook, `prettier --check`, `vale` on one doc, `actionlint` on a workflow). (f) Ignored: every repo-wide gate (formatter, prose linter, scanner, linter, type checker) skips `.bkit/templates/`. Context-fetch block → job regex and artifact name match exactly the lane it names (CI Host Read); widened regex catching another lane = finding. **Done when:** `Templates` row per adopted template: (a)–(f) verdict each.
|
|
114
|
+
- [ ] **Step 10 — Standards:** Confirm anchor versions; read changes since previous report's version. `Standards Coverage`: one row per Contract row, per context-fetch file, and per tool reference read → checked (name step) / not applicable (why) / finding. Deprecated key or option in an adopted config per its tool reference → finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
115
|
+
- [ ] **Step 11 — Anything Else:** (a) Everything changed since previous report's commit touching bkit-written files, `.bkit/templates/`, adopted copies, `.agents/context.md`, or `package.json` `bkit.*` → one-line verdict each. (b) Bounded ~30 min pass: what a senior engineer adopting bkit flags that no step asks; read what happened since previous run (`bkit upgrade` output, new `docs/failures.jsonl` rows, `.bkit/friction.jsonl`) — 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`.
|
|
116
|
+
|
|
117
|
+
### 🔒 Gate 2: Probes Check
|
|
118
|
+
|
|
119
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
120
|
+
|
|
121
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
122
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
123
|
+
- [ ] **No secrets:** no token, key, or secret value anywhere in the report.
|
|
124
|
+
- [ ] **Repo untouched:** no template copied or edited, no bkit-written file changed, no `bkit install` / `bkit upgrade` run, no writing hook or script run.
|
|
125
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
126
|
+
|
|
127
|
+
## Findings
|
|
128
|
+
|
|
129
|
+
<!-- prettier-ignore -->
|
|
130
|
+
| Severity | Use |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `CRITICAL` | Secret value in a tracked adopted copy or a tracked `.bkit/.env` (rotation → `bkit-audit-security`) |
|
|
133
|
+
| `HIGH` | `bkit check` failing; pinned ≠ installed; host in use with no bkit install; adopted template whose tool is not installed or never invoked; raw placeholder in an executed file (workflow, hook); cloud workflow waiting on a workflow name that does not exist; context-fetch block matching the wrong lane |
|
|
134
|
+
| `MEDIUM` | Template `gap`; edits inside a bkit managed block; unaddressed `bkit doctor` advisory; package change to an adopted template unmerged; unreviewed difference from the template; written doc holding only bkit's block; `.bkit/.env` key unset; audit that applies never run or overdue; repo-wide gate scanning `.bkit/templates/`; context with a lane and no block or opt-out; bkit behind with relevant fix |
|
|
135
|
+
| `LOW` | bkit behind, no relevant fix; shipped file missing from the Contract; two updaters adopted with one idle; naming drift, no behaviour change |
|
|
136
|
+
|
|
137
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: missing gates, then unwired copies, then drift.
|
|
138
|
+
|
|
139
|
+
<!-- prettier-ignore -->
|
|
140
|
+
| ID | Severity | Folder | Location | Evidence | Expected |
|
|
141
|
+
| --- | --- | --- | --- | --- | --- |
|
|
142
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
143
|
+
|
|
144
|
+
Empty and clean → one row `None`.
|
|
145
|
+
|
|
146
|
+
## Report
|
|
147
|
+
|
|
148
|
+
### Summary
|
|
149
|
+
|
|
150
|
+
PENDING
|
|
151
|
+
|
|
152
|
+
### Previous Run
|
|
153
|
+
|
|
154
|
+
PENDING
|
|
155
|
+
|
|
156
|
+
### Inventory
|
|
157
|
+
|
|
158
|
+
PENDING
|
|
159
|
+
|
|
160
|
+
### Version
|
|
161
|
+
|
|
162
|
+
PENDING
|
|
163
|
+
|
|
164
|
+
### Check and Doctor
|
|
165
|
+
|
|
166
|
+
PENDING
|
|
167
|
+
|
|
168
|
+
### Hosts
|
|
169
|
+
|
|
170
|
+
PENDING
|
|
171
|
+
|
|
172
|
+
### Written Files
|
|
173
|
+
|
|
174
|
+
PENDING
|
|
175
|
+
|
|
176
|
+
### Audits
|
|
177
|
+
|
|
178
|
+
PENDING
|
|
179
|
+
|
|
180
|
+
### Adoption
|
|
181
|
+
|
|
182
|
+
PENDING
|
|
183
|
+
|
|
184
|
+
### Templates
|
|
185
|
+
|
|
186
|
+
PENDING
|
|
187
|
+
|
|
188
|
+
### Checked
|
|
189
|
+
|
|
190
|
+
PENDING
|
|
191
|
+
|
|
192
|
+
### Not Checked
|
|
193
|
+
|
|
194
|
+
PENDING
|
|
195
|
+
|
|
196
|
+
### Standards Coverage
|
|
197
|
+
|
|
198
|
+
PENDING
|
|
199
|
+
|
|
200
|
+
### Beyond the Steps
|
|
201
|
+
|
|
202
|
+
PENDING
|
|
203
|
+
|
|
204
|
+
### Process Improvements
|
|
205
|
+
|
|
206
|
+
PENDING
|
|
207
|
+
|
|
208
|
+
### 🔒 Gate 3: Report Check
|
|
209
|
+
|
|
210
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
211
|
+
|
|
212
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
213
|
+
- [ ] **Summary:** names count per severity, bkit version, hosts, and templates adopted / `gap` / `covered` / `not applicable`.
|
|
214
|
+
- [ ] **Series:** `Adoption` diffed against previous report's, or marked baseline.
|
|
215
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway package unpack removed.
|
|
216
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
217
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
218
|
+
|
|
219
|
+
> `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.
|
|
220
|
+
|
|
221
|
+
<!-- bkit:end -->
|
|
222
|
+
|
|
223
|
+
## Project Instructions
|
|
@@ -0,0 +1,230 @@
|
|
|
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
|
+
# Agent Config Audit
|
|
8
|
+
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> **Purpose:** Per coding-agent host: instruction loading, permissions, hooks, tool servers, agent definitions, model pins — hosts agree, bkit-shipped gates included.
|
|
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 print or copy a token, key, or secret value; names, scopes, and presence only.
|
|
23
|
+
> - never run `bkit install` / `bkit upgrade`.
|
|
24
|
+
> - never call a tool-server tool; listing its tools only.
|
|
25
|
+
> - Name the machine. User-level / local-override config absent on a fresh checkout → `Not Checked`.
|
|
26
|
+
|
|
27
|
+
## Universal Instructions
|
|
28
|
+
|
|
29
|
+
### Context & Goals
|
|
30
|
+
|
|
31
|
+
Each agent host reads its own permissions, hooks, tool servers, model picks; nobody reviews them as config. Broad allow rule lands in a one-line diff; local override lives on one laptop; tool server holds a write token nobody scoped. Target failure: **an agent does something one host's config would have blocked, because the host it ran in was configured differently** — e.g. force-push denied in one host, allowed in another; tool server with admin token where read suffices; hook wired but script not executable, never fires; issue body tells an agent with push rights to push, and nothing but prompt text stops it.
|
|
32
|
+
|
|
33
|
+
**Applies when:** repo carries config for ≥1 coding agent (e.g. `AGENTS.md`, `.claude/`, `.cursor/`, `.codex/`, `.opencode/`, `.mcp.json`), or anyone works on it with one. None → one `N/A` row with evidence, never "clean".
|
|
34
|
+
|
|
35
|
+
**Cadence:** monthly. Extra pass after new agent host or tool server, bkit upgrade, or permission / hook / tool-server file change.
|
|
36
|
+
|
|
37
|
+
**Anchor Standards:** record version and date read. Newer version → `Standards` step reads what changed.
|
|
38
|
+
|
|
39
|
+
- OWASP Top 10 for Agentic Applications, 2026 (ASI01–ASI10).
|
|
40
|
+
- Tool-server specification authorization and security best practices (e.g. Model Context Protocol); record the specification date read.
|
|
41
|
+
- OpenSSF Security-Focused Guide for AI Code Assistant Instructions.
|
|
42
|
+
- Each host's settings, permission, sandbox, and hook reference (e.g. Claude Code, Cursor, Codex, opencode); record date read.
|
|
43
|
+
- bkit, when installed: `.bkit/README.md` § File ownership — permissions and hooks bkit writes per host.
|
|
44
|
+
|
|
45
|
+
### Scope
|
|
46
|
+
|
|
47
|
+
- Hosts in use; config files each loads per layer (managed policy, user, repo, local override); precedence.
|
|
48
|
+
- Instruction files each host loads.
|
|
49
|
+
- Permissions: allow / ask / deny, default approval mode, sandbox, fetch allowlist; parity across hosts.
|
|
50
|
+
- Hooks and guard scripts: wired, runnable, fire, fail mode.
|
|
51
|
+
- Tool servers: inventory per host, transport, pinning, credential source and scope, pre-approved writes, unused servers, tool-description changes.
|
|
52
|
+
- Agent definitions, commands, skills: tool allowlists, model pins, sources.
|
|
53
|
+
- Secrets in agent config and env files agents load.
|
|
54
|
+
- Untrusted input: text outsiders can write that each agent reads, what that agent can do in the same session, what stops a planted instruction.
|
|
55
|
+
- bkit, when installed: shipped permissions and hooks agree across hosts.
|
|
56
|
+
|
|
57
|
+
### Out of Scope
|
|
58
|
+
|
|
59
|
+
<!-- prettier-ignore -->
|
|
60
|
+
| Excluded item | Why | Where it belongs |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Instruction files contradicting each other; always-loaded size | Documentation sweep | `bkit-audit-documentation` |
|
|
63
|
+
| Model calls the product makes; tool servers the product exposes | LLM sweep | `bkit-audit-llm` |
|
|
64
|
+
| Whether product prompts are clear, well structured, and fit their model | Prompt sweep | `bkit-audit-prompts` |
|
|
65
|
+
| Product model registry, deprecation, fallback chains | Model sweep | `bkit-audit-models` |
|
|
66
|
+
| CI workflow token permissions, pinned actions; rotating a leaked secret | Security sweep | `bkit-audit-security` |
|
|
67
|
+
| Worktrees, branches, stashes agents leave behind; version-control hooks | Repo sweep | `bkit-audit-repo` |
|
|
68
|
+
| Hosted environment variables, dashboards, repository rulesets | Config sweep | `bkit-audit-config` |
|
|
69
|
+
| Agent and model spend | Cost sweep | `bkit-audit-cost` |
|
|
70
|
+
| Whether a sweep here should become a gate | Gate sweep | `bkit-audit-gates` |
|
|
71
|
+
| bkit install state: version, `bkit check`, `bkit doctor`, hosts installed, managed blocks, templates adopted and wired | bkit adoption sweep | `bkit-audit-adoption` |
|
|
72
|
+
| Changing config, or running `bkit install` / `bkit upgrade` | Audit reports only | Plan from this report |
|
|
73
|
+
|
|
74
|
+
### Pre-Flight / Dependencies
|
|
75
|
+
|
|
76
|
+
**Checkpoint:** Check off all core items. Check conditional items only when applicable. Each item: available → tool and version; missing → fallback, gap in `Not Checked`, fix in `Process Improvements`. Unnamed gap reads as passed. never abort for a missing capability.
|
|
77
|
+
|
|
78
|
+
#### Core
|
|
79
|
+
|
|
80
|
+
Always verify.
|
|
81
|
+
|
|
82
|
+
- [ ] **Checkout:** Steps 2–10 — repo-level agent config. Fallback: none; no checkout → `N/A` and STOP.
|
|
83
|
+
- [ ] **Effective Config:** Steps 2, 4, 6 — host's merged-config view where offered (e.g. `claude mcp list`, a host's permissions or MCP panel). Fallback: files + documented precedence by hand; effective state = hypothesis.
|
|
84
|
+
- [ ] **Web:** Steps 7, 11 — anchor standards, host references, live model catalogues. Fallback: versions recorded as unread; model pins `Not Checked`.
|
|
85
|
+
|
|
86
|
+
#### Conditional
|
|
87
|
+
|
|
88
|
+
Verify only when applicable.
|
|
89
|
+
|
|
90
|
+
- [ ] **Machine Config:** Audit runs on a developer machine → Steps 2, 4, 6, 8 — user-level and local-override files (e.g. `~/.claude/settings.json`, `.claude/settings.local.json`, `~/.cursor/mcp.json`, `~/.codex/config.toml`). Fallback: repo-level only; machine layers `Not Checked`.
|
|
91
|
+
- [ ] **Managed Policy:** Org-managed agent policy → Step 2 — policy file or admin console, read-only. Fallback: `Not Checked`; name who holds it.
|
|
92
|
+
- [ ] **Token Scopes:** Tool servers or hooks use credentials → Step 6 — scopes, value never printed (e.g. `gh auth status`, the `X-OAuth-Scopes` response header, provider token introspection). Fallback: scopes `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 — Hosts and Layers:** Name machine and checkout. Hosts with repo config or in team use (e.g. Claude Code, Cursor, Codex, opencode). Per host: config file per layer (managed policy, user, repo shared, repo local override, flags / env); documented precedence. Findings: config for unused host; host in use with no repo config; local-override file tracked or not ignored. Fresh cloud checkout: no user / local layer → say so, not clean. **Done when:** `Hosts` row per host × layer: file, present, tracked / ignored, precedence.
|
|
105
|
+
- [ ] **Step 3 — Instructions:** Per host: instruction files loaded at session start (e.g. `AGENTS.md`, `CLAUDE.md`, always-applied IDE rule files, per-directory files, imports). Findings: host reaching no shared rules; rule file / import → missing path. Contradictions, size → `bkit-audit-documentation`. **Done when:** `Instructions` row per host: files loaded, shared rules reached yes / no.
|
|
106
|
+
- [ ] **Step 4 — Permissions:** Per host × layer: allow / ask / deny, default approval mode, sandbox mode, fetch / network allowlist. Findings: wildcard shell allow; arbitrary-text interpreter allow (e.g. `bash -c`, `node -e`, `python -c`); deny overridden by broader higher-precedence allow; approval-bypass mode in shared config outside a sandbox; fetch allowlist wider than needed per host matching rules (e.g. apex vs subdomain). `Parity` matrix: action × host → blocker: deny rule / hook / sandbox / prompt prose only / nothing. Minimum actions: force push, history rewrite, branch delete, hook skip (e.g. `--no-verify`), merge or push to protected branch, publish / release, delete outside the working tree, credential-file read (e.g. `.env*`), fetch to unlisted host, tool-server write to a shared or production system. Findings: blocked in one host, open in another; blocked by prompt prose only. **Done when:** `Permissions` row per host × layer; `Parity` matrix with no empty cell.
|
|
107
|
+
- [ ] **Step 5 — Hooks:** Per host, each wired hook: event, matcher, command. Script exists, executable, interpreter present. Fire test: synthetic tool-call payload on stdin → record exit code / decision. Hook writing anything (telemetry, logs, state) → read, do not run. Findings: sole blocker for a `Parity` row fails open on crash / timeout / missing dependency; matcher misses a tool doing the same action (e.g. a tool server's shell tool). **Done when:** `Hooks` row per hook: wired, runnable, fires on fixture, fail mode.
|
|
108
|
+
- [ ] **Step 6 — Tool Servers:** Per host, each tool server (e.g. MCP): layer, transport (local command / remote URL), package pinned or floating (e.g. `npx -y pkg@latest`), publisher, credential source (env var name vs literal), credential scope vs need, toolsets enabled vs used, write tools pre-approved. List tools → hash names + descriptions. Findings: floating package; same server differing across hosts (token, toolsets, URL); server no workflow uses; hash changed since previous run with no version change. **Done when:** `Tool Servers` row per server × host, hashes recorded.
|
|
109
|
+
- [ ] **Step 7 — Agents and Models:** Per host: agent definitions, commands, skills / plugins. Per agent: tool allowlist vs role; model pin vs provider's live catalogue (never inferred from version digits). Per skill / plugin: source, pinned version, ships scripts. Findings: write tools on read-only role; dead pin; floating alias; same agent on different model classes across hosts, undocumented; unknown-source skill with scripts. **Done when:** `Agents` row per agent × host; skills listed.
|
|
110
|
+
- [ ] **Step 8 — Secrets:** Agent config + env files agents load (e.g. `.envrc`, tool-server env files, agent-tooling env file). Findings: literal token in tracked file (file and line, never value); env file not ignored; app credential in agent-tooling env. Agent read of credential files → Step 4 `Parity`. **Done when:** `Secrets` row per file.
|
|
111
|
+
- [ ] **Step 9 — Untrusted Input:** Per agent, command, skill, and automated agent run (CI job, scheduled or comment-triggered session) from Step 7: (a) text it reads that someone outside the team can write (e.g. issue / PR body and comments, fork commit messages, PR checkout files, CI logs, fetched pages, dependency READMEs and changelogs, tool-server results, inbound mail); (b) what it can do in the same session (shell, file write, push, merge, publish, tracker or tool-server write, outbound fetch), from Steps 4, 6, 7; (c) what stops a planted instruction: deny rule / hook / sandbox / human approval / read-only agent handing a summary to a separate writer / prompt prose only / nothing; (d) who can start the run (e.g. issue label, `@`-mention, comment command, `pull_request_target`). Read how prompts fence and label untrusted text as data; prose is defence-in-depth, never the stop. Exfiltration: same session holds a secret or private data and reaches a host or surface an outsider reads (fetch allowlist, tracker comment, PR body, public commit). Findings: (a) + write / push / shell with stop = prompt prose only or nothing (ASI01, LLM01); (a) + secret or private data + outsider-readable outbound; outsider can start a run that holds write credentials. Product model calls → `bkit-audit-llm`. **Done when:** `Untrusted Input` row per agent: untrusted sources · capabilities · who starts it · stop · verdict.
|
|
112
|
+
- [ ] **Step 10 — bkit Gates:** `.bkit/version` absent → explicit skip with evidence. Else per installed bkit host: every permission and hook bkit writes (`.bkit/README.md` § File ownership) appears in Steps 4–5 and in `Parity`; same bkit gate enforced in one host, open in another → upstream bkit fix. Version, drift, hosts with no bkit install, managed blocks, templates → `bkit-audit-adoption`. **Done when:** `bkit` section lists bkit gates per host with verdict, or skip with evidence.
|
|
113
|
+
- [ ] **Step 11 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per agentic risk (ASI01–ASI10), per tool-server security best practice, and per assistant-instructions guide recommendation this audit touches → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
114
|
+
- [ ] **Step 12 — Anything Else:** (a) Everything changed since previous report's commit touching agent config (settings, hooks, tool-server files, agent definitions, skills, instruction load paths, bkit version) → one-line verdict each. (b) Bounded ~30 min pass: what a senior platform engineer flags that no step asks; read what happened since previous run (agent incidents, new `docs/failures.jsonl` rows, friction logs) — 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`.
|
|
115
|
+
|
|
116
|
+
### 🔒 Gate 2: Probes Check
|
|
117
|
+
|
|
118
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then continue to `Findings` without asking.
|
|
119
|
+
|
|
120
|
+
- [ ] **Steps complete:** every step `[x]`, or explicit skip with evidence the surface is absent.
|
|
121
|
+
- [ ] **Evidence:** every finding cites re-checkable evidence and the tool behind it.
|
|
122
|
+
- [ ] **No secrets:** no token, key, or secret value anywhere in the report.
|
|
123
|
+
- [ ] **Config untouched:** no agent config, hook, tool-server file, agent definition, or bkit-managed file changed; no `bkit install` / `bkit upgrade` run; no tool-server tool called.
|
|
124
|
+
- [ ] **Gate 2 - Verified:** Every checkbox above independently verified and checked off.
|
|
125
|
+
|
|
126
|
+
## Findings
|
|
127
|
+
|
|
128
|
+
<!-- prettier-ignore -->
|
|
129
|
+
| Severity | Use |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| `CRITICAL` | Live credential in tracked agent config; outsider can start an agent run that reads their text and holds write / push credentials with no structural stop; unprompted production write via tool server in shared config; approval-bypass mode in shared config outside a sandbox |
|
|
132
|
+
| `HIGH` | Action blocked in one host, open in another; blocked by prompt prose only; agent reads untrusted text and can write, push, or run shell with no structural stop; agent reads untrusted text, holds a secret or private data, and reaches an outsider-readable host; sole blocking hook never fires or fails open; tool-server credential write / admin where read suffices; arbitrary-interpreter allow; floating tool-server package |
|
|
133
|
+
| `MEDIUM` | Unused host config or tool server; tool description changed, no version change; dead or cross-host-inconsistent model pin; tracked local override; agent tools beyond role |
|
|
134
|
+
| `LOW` | Naming drift, no behaviour change; doc wrong about agent config while config right |
|
|
135
|
+
|
|
136
|
+
Scale per `.bkit/jsonl.md` § Severity. Within a severity: production writes, credentials, then parity gaps.
|
|
137
|
+
|
|
138
|
+
<!-- prettier-ignore -->
|
|
139
|
+
| ID | Severity | Host | Location | Evidence | Expected |
|
|
140
|
+
| --- | --- | --- | --- | --- | --- |
|
|
141
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
142
|
+
|
|
143
|
+
Empty and clean → one row `None`.
|
|
144
|
+
|
|
145
|
+
## Report
|
|
146
|
+
|
|
147
|
+
### Summary
|
|
148
|
+
|
|
149
|
+
PENDING
|
|
150
|
+
|
|
151
|
+
### Previous Run
|
|
152
|
+
|
|
153
|
+
PENDING
|
|
154
|
+
|
|
155
|
+
### Hosts
|
|
156
|
+
|
|
157
|
+
PENDING
|
|
158
|
+
|
|
159
|
+
### Instructions
|
|
160
|
+
|
|
161
|
+
PENDING
|
|
162
|
+
|
|
163
|
+
### Permissions
|
|
164
|
+
|
|
165
|
+
PENDING
|
|
166
|
+
|
|
167
|
+
### Parity
|
|
168
|
+
|
|
169
|
+
PENDING
|
|
170
|
+
|
|
171
|
+
### Hooks
|
|
172
|
+
|
|
173
|
+
PENDING
|
|
174
|
+
|
|
175
|
+
### Tool Servers
|
|
176
|
+
|
|
177
|
+
PENDING
|
|
178
|
+
|
|
179
|
+
### Agents
|
|
180
|
+
|
|
181
|
+
PENDING
|
|
182
|
+
|
|
183
|
+
### Secrets
|
|
184
|
+
|
|
185
|
+
PENDING
|
|
186
|
+
|
|
187
|
+
### Untrusted Input
|
|
188
|
+
|
|
189
|
+
PENDING
|
|
190
|
+
|
|
191
|
+
### bkit
|
|
192
|
+
|
|
193
|
+
PENDING
|
|
194
|
+
|
|
195
|
+
### Checked
|
|
196
|
+
|
|
197
|
+
PENDING
|
|
198
|
+
|
|
199
|
+
### Not Checked
|
|
200
|
+
|
|
201
|
+
PENDING
|
|
202
|
+
|
|
203
|
+
### Standards Coverage
|
|
204
|
+
|
|
205
|
+
PENDING
|
|
206
|
+
|
|
207
|
+
### Beyond the Steps
|
|
208
|
+
|
|
209
|
+
PENDING
|
|
210
|
+
|
|
211
|
+
### Process Improvements
|
|
212
|
+
|
|
213
|
+
PENDING
|
|
214
|
+
|
|
215
|
+
### 🔒 Gate 3: Report Check
|
|
216
|
+
|
|
217
|
+
**Checkpoint.** Verify and check `[x]` all boxes below, then stop.
|
|
218
|
+
|
|
219
|
+
- [ ] **No placeholders:** Findings table and every `Report` section have no `PENDING`.
|
|
220
|
+
- [ ] **Summary:** names count per severity, machine, and hosts read.
|
|
221
|
+
- [ ] **Series:** `Parity` and tool-server hashes diffed against previous report's, or marked baseline.
|
|
222
|
+
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
223
|
+
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
224
|
+
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
225
|
+
|
|
226
|
+
> `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.
|
|
227
|
+
|
|
228
|
+
<!-- bkit:end -->
|
|
229
|
+
|
|
230
|
+
## Project Instructions
|