@cbartens/bkit 6.0.0 → 6.1.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 +154 -151
- package/.bkit/core/.agents/context.md +95 -29
- package/.bkit/core/.agents/docs.md +17 -15
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-gateguard.cjs +1 -0
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +6 -5
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-readguard.cjs +1 -0
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-rules.cjs +65 -0
- package/.bkit/core/.agents/rules.md +108 -107
- package/.bkit/core/.agents/skills.md +63 -15
- package/.bkit/core/.bkit/README.md +154 -151
- package/.bkit/core/.bkit/authoring.md +714 -84
- package/.bkit/core/.bkit/cli.md +407 -0
- package/.bkit/core/.bkit/cloud.md +281 -193
- package/.bkit/core/.bkit/comparison.md +43 -41
- package/.bkit/core/.bkit/install.md +154 -84
- package/.bkit/core/.bkit/jsonl.md +193 -130
- package/.bkit/core/.bkit/pipeline.md +114 -114
- package/.bkit/core/.bkit/prompts.md +272 -165
- package/.bkit/core/.bkit/providers.md +457 -271
- package/.bkit/core/.bkit/router.md +69 -0
- package/.bkit/core/.bkit/templates.md +529 -256
- package/.bkit/core/.bkit/trackers.md +80 -52
- package/.bkit/core/.bkit/workflows.md +589 -504
- package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +2 -2
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +3 -3
- package/.bkit/core/.claude/hooks/bkit-preflight.sh +45 -14
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +3 -3
- package/.bkit/core/.codex/hooks/bkit-rules.cjs +57 -0
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +7 -7
- package/.bkit/core/.cursor/hooks/bkit-preflight.sh +47 -12
- package/.bkit/core/.opencode/plugin/bkit-rules.js +89 -0
- package/.bkit/core/AGENTS.md +5 -73
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +127 -105
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +104 -70
- package/.bkit/core/docs/templates/bkit-audit-agents.md +94 -72
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +99 -78
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +140 -82
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +98 -72
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +121 -96
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +157 -76
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +113 -71
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +75 -72
- package/.bkit/core/docs/templates/bkit-audit-config.md +122 -76
- package/.bkit/core/docs/templates/bkit-audit-cost.md +85 -74
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +75 -68
- package/.bkit/core/docs/templates/bkit-audit-database.md +101 -70
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +164 -83
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +115 -86
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +264 -88
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +118 -93
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +139 -86
- package/.bkit/core/docs/templates/bkit-audit-failures.md +110 -81
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +99 -74
- package/.bkit/core/docs/templates/bkit-audit-gates.md +105 -77
- package/.bkit/core/docs/templates/bkit-audit-issues.md +104 -80
- package/.bkit/core/docs/templates/bkit-audit-llm.md +131 -58
- package/.bkit/core/docs/templates/bkit-audit-logs.md +123 -100
- package/.bkit/core/docs/templates/bkit-audit-models.md +98 -53
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +56 -52
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +63 -54
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +124 -68
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +95 -70
- package/.bkit/core/docs/templates/bkit-audit-repo.md +169 -73
- package/.bkit/core/docs/templates/bkit-audit-security.md +206 -96
- package/.bkit/core/docs/templates/bkit-audit-slop.md +77 -70
- package/.bkit/core/docs/templates/bkit-audit-testing.md +162 -114
- package/.bkit/core/docs/templates/bkit-audit-usability.md +113 -71
- package/.bkit/core/docs/templates/bkit-plan.md +138 -132
- package/.bkit/core/engine/checks/after/auth.ts +40 -37
- package/.bkit/core/engine/checks/after/ci-yml.ts +65 -2
- package/.bkit/core/engine/checks/after/index.ts +12 -2
- package/.bkit/core/engine/checks/after/tools.ts +80 -33
- package/.bkit/core/engine/checks/before/context-fetch.ts +227 -33
- package/.bkit/core/engine/checks/before/env.ts +1 -1
- package/.bkit/core/engine/checks/before/index.ts +7 -0
- package/.bkit/core/engine/checks/before/repo.ts +40 -0
- package/.bkit/core/engine/checks/status-holes.ts +916 -123
- package/.bkit/core/engine/checks/tips/catalogue.ts +68 -17
- package/.bkit/core/engine/checks/tips/detect.ts +32 -0
- package/.bkit/core/engine/checks/tips/index.ts +47 -6
- package/.bkit/core/engine/cli.ts +238 -84
- package/.bkit/core/engine/commands/analysis.ts +128 -76
- package/.bkit/core/engine/commands/ci/ci.ts +363 -29
- package/.bkit/core/engine/commands/ci/pins.ts +172 -0
- package/.bkit/core/engine/commands/ci/push-gate.ts +223 -0
- package/.bkit/core/engine/commands/install/uninstall.ts +21 -27
- package/.bkit/core/engine/commands/install/upgrade.ts +32 -15
- package/.bkit/core/engine/commands/land.ts +126 -11
- package/.bkit/core/engine/commands/lib.ts +303 -6
- package/.bkit/core/engine/commands/registry.ts +6 -2
- package/.bkit/core/engine/commands/setup/setup.ts +1 -0
- package/.bkit/core/engine/commands/stats.ts +91 -35
- package/.bkit/core/engine/commands/workflow/branches.ts +1477 -117
- package/.bkit/core/engine/commands/workflow/challenge.ts +114 -39
- package/.bkit/core/engine/commands/workflow/completeness.ts +109 -0
- package/.bkit/core/engine/commands/workflow/context.ts +433 -55
- package/.bkit/core/engine/commands/workflow/counters.ts +244 -39
- package/.bkit/core/engine/commands/workflow/decisions.ts +61 -17
- package/.bkit/core/engine/commands/workflow/disk.ts +237 -55
- package/.bkit/core/engine/commands/workflow/fids.ts +19 -1
- package/.bkit/core/engine/commands/workflow/issues.ts +6 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +458 -18
- package/.bkit/core/engine/commands/workflow/locks.ts +2 -0
- package/.bkit/core/engine/commands/workflow/plan-blocks.ts +124 -15
- package/.bkit/core/engine/commands/workflow/plans.ts +257 -0
- package/.bkit/core/engine/commands/workflow/prs.ts +12 -3
- package/.bkit/core/engine/commands/workflow/repo.ts +8 -0
- package/.bkit/core/engine/commands/workflow/roadmap.ts +56 -15
- package/.bkit/core/engine/commands/workflow/run-facts.ts +22 -31
- package/.bkit/core/engine/commands/workflow/runs.ts +652 -34
- package/.bkit/core/engine/commands/workflow/runtime.ts +3 -0
- package/.bkit/core/engine/commands/workflow/skills.ts +1 -0
- package/.bkit/core/engine/commands/workflow/status.ts +200 -17
- package/.bkit/core/engine/commands/workflow/step-table.ts +75 -33
- package/.bkit/core/engine/commands/workflow/steps.ts +635 -24
- package/.bkit/core/engine/commands/workflow/summary-findings.ts +177 -0
- package/.bkit/core/engine/commands/workflow/summary.ts +192 -46
- package/.bkit/core/engine/commands/workflow/tasks.ts +409 -0
- package/.bkit/core/engine/commands/workflow/test-blocks.ts +254 -0
- package/.bkit/core/engine/commands/workflow/tests-changed.ts +201 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +1285 -356
- package/.bkit/core/engine/commands/workflow/workflows.ts +228 -43
- package/.bkit/core/engine/commands/workflow/worktrees.ts +389 -47
- package/.bkit/core/engine/install/cloud-env.ts +251 -121
- package/.bkit/core/engine/install/context-ci-workflow.ts +102 -0
- package/.bkit/core/engine/install/manifest.ts +60 -12
- package/.bkit/core/engine/install/modules/antigravity.ts +3 -2
- package/.bkit/core/engine/install/modules/cloud.ts +3 -3
- package/.bkit/core/engine/install/modules/codex.ts +15 -2
- package/.bkit/core/engine/install/modules/core.ts +956 -52
- package/.bkit/core/engine/install/modules/cursor.ts +6 -6
- package/.bkit/core/engine/install/modules/opencode.ts +16 -4
- package/.bkit/core/engine/install/template-notes.ts +130 -0
- package/.bkit/core/engine/install/version-file.ts +3 -2
- package/.bkit/core/engine/install/write.ts +5 -0
- package/.bkit/core/engine/ledgers/compact.ts +124 -0
- package/.bkit/core/engine/ledgers/journal.ts +291 -0
- package/.bkit/core/engine/ledgers/status.ts +160 -9
- package/.bkit/core/engine/ledgers/telemetry.ts +158 -21
- package/.bkit/core/engine/render/hosts.ts +114 -14
- package/.bkit/core/engine/shared/bkit-latest.ts +26 -4
- package/.bkit/core/engine/shared/dep-updater.ts +60 -0
- package/.bkit/core/engine/shared/egress.ts +1 -1
- package/.bkit/core/engine/shared/package-manager.ts +9 -0
- package/.bkit/core/engine/shared/settings.ts +92 -17
- package/.bkit/core/engine/shared/timeouts.ts +2 -0
- package/.bkit/core/engine/tools/cli-doc.ts +111 -0
- package/.bkit/core/engine/tools/grammar-density.ts +1 -1
- package/.bkit/core/engine/tools/instructions-sources.ts +15 -17
- package/.bkit/core/engine/tools/instructions.ts +94 -43
- package/.bkit/core/hooks/antigravity-hook.js +25 -10
- package/.bkit/core/hooks/gateguard-engine.js +53 -29
- package/.bkit/core/hooks/guardrails-shell.js +4 -4
- package/.bkit/core/hooks/guardrails-tiers.js +3 -3
- package/.bkit/core/hooks/preflight-linear.sh +9 -9
- package/.bkit/core/hooks/preflight-rules.sh +8 -0
- package/.bkit/core/hooks/readguard-engine.js +29 -10
- package/.bkit/core/hooks/session-rules-advisory.js +61 -0
- package/.bkit/core/prompts/bkit-audit-generate.md +187 -116
- package/.bkit/core/prompts/bkit-build-challenge-1.md +56 -37
- package/.bkit/core/prompts/bkit-build-challenge-2.md +65 -45
- package/.bkit/core/prompts/bkit-build-install-skills.md +38 -29
- package/.bkit/core/prompts/bkit-build-plan-convert.md +43 -32
- package/.bkit/core/prompts/bkit-build-plan-current.md +49 -39
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +79 -55
- package/.bkit/core/prompts/bkit-build-plan-tasks.md +149 -0
- package/.bkit/core/prompts/bkit-build-plan-tests.md +120 -0
- package/.bkit/core/prompts/bkit-build-plan-verify.md +87 -50
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +36 -35
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +96 -64
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +54 -45
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +42 -33
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +53 -37
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +35 -30
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +34 -29
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +32 -28
- package/.bkit/core/prompts/bkit-design-generate.md +68 -52
- package/.bkit/core/prompts/bkit-design-organise.md +73 -35
- package/.bkit/core/prompts/bkit-design-review-1.md +58 -54
- package/.bkit/core/prompts/bkit-design-review-2.md +54 -50
- package/.bkit/core/prompts/bkit-design-spike.md +54 -47
- package/.bkit/core/prompts/bkit-design-update.md +42 -31
- package/.bkit/core/prompts/bkit-plan-generate.md +76 -58
- package/.bkit/core/prompts/bkit-plan-review-1.md +63 -49
- package/.bkit/core/prompts/bkit-plan-review-2.md +60 -48
- package/.bkit/core/prompts/bkit-plan-scope-check.md +53 -46
- package/.bkit/core/prompts/bkit-plan-update.md +70 -52
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +82 -50
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +80 -45
- package/.bkit/core/prompts/bkit-ship-update-docs.md +35 -29
- package/.bkit/core/prompts/bkit-utility-compress-markdown.md +55 -49
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +76 -49
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +70 -41
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +33 -30
- package/.bkit/core/prompts/bkit-utility-update-failures.md +73 -43
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +77 -50
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +77 -45
- package/.bkit/core/prompts/bkit-utility-update-tracker.md +144 -68
- package/.bkit/core/workflows/bkit-auto.md +53 -30
- package/.bkit/core/workflows/bkit-build.md +635 -304
- package/.bkit/core/workflows/bkit-debug.md +301 -148
- package/.bkit/core/workflows/bkit-design.md +167 -95
- package/.bkit/core/workflows/bkit-plan.md +172 -84
- package/.bkit/core/workflows/bkit-ship.md +299 -152
- package/.bkit/shared/.agents/plugins/bkit/hooks.json +10 -0
- package/.bkit/shared/.claude/bkit-cloud.md +12 -10
- package/.bkit/shared/.claude/settings.json +3 -0
- package/.bkit/shared/.codex/bkit-cloud.md +98 -0
- package/.bkit/shared/.codex/hooks.json +20 -0
- package/.bkit/shared/.cursor/bkit-cloud.md +3 -3
- package/.bkit/shared/.opencode/opencode.json +1 -1
- package/.bkit/shared/CLAUDE.md +5 -1
- package/.bkit/shared/GEMINI.md +4 -1
- package/.bkit/shared/docs/architecture.md +4 -7
- package/.bkit/shared/docs/data-schema.md +4 -7
- package/.bkit/shared/docs/deployments.md +239 -166
- package/.bkit/shared/docs/design.md +11 -12
- package/.bkit/shared/docs/noise.md +8 -7
- package/.bkit/shared/docs/observability.md +5 -8
- package/.bkit/shared/docs/security.md +35 -17
- package/.bkit/shared/docs/setup.md +29 -18
- package/.bkit/shared/docs/technology.md +3 -6
- package/.bkit/shared/docs/testing.md +282 -176
- package/.bkit/shared/gitignore +6 -2
- package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +15 -16
- package/.bkit/templates/.cursor/Dockerfile +12 -8
- package/.bkit/templates/.cursor/environment.json +1 -1
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +10 -8
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +24 -12
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +3 -3
- package/.bkit/templates/.github/renovate.json5 +34 -6
- package/.bkit/templates/.github/workflows/bkit-ci.yml +53 -50
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +13 -14
- package/.bkit/templates/.github/workflows/bkit-health.yml +97 -0
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +5 -4
- package/.bkit/templates/.github/workflows/bkit-trivy.yml +5 -4
- package/.bkit/templates/.husky/pre-commit +2 -2
- package/.bkit/templates/.husky/pre-push +95 -35
- package/.bkit/templates/.prettierignore +6 -7
- package/.bkit/templates/.vale.ini +27 -27
- package/.bkit/templates/context/bkit-cloudrun.md +23 -15
- package/.bkit/templates/context/bkit-expo.md +70 -52
- package/.bkit/templates/context/bkit-github.md +93 -56
- package/.bkit/templates/context/bkit-inngest.md +21 -15
- package/.bkit/templates/context/bkit-maestro.md +22 -16
- package/.bkit/templates/context/bkit-playwright.md +23 -17
- package/.bkit/templates/context/bkit-resend.md +12 -10
- package/.bkit/templates/context/bkit-sentry.md +30 -20
- package/.bkit/templates/context/bkit-serena.md +8 -7
- package/.bkit/templates/context/bkit-stripe.md +14 -13
- package/.bkit/templates/context/bkit-supabase.md +16 -13
- package/.bkit/templates/context/bkit-tavily.md +14 -11
- package/.bkit/templates/context/bkit-vercel.md +27 -18
- package/.bkit/templates/docs/capabilities.md +15 -14
- package/.bkit/templates/scripts/ci/{check-accepted-divergences.mjs → bkit-check-accepted-divergences.mjs} +6 -3
- package/.bkit/templates/scripts/ci/{check-accepted-divergences.test.mjs → bkit-check-accepted-divergences.test.mjs} +3 -3
- package/.bkit/templates/scripts/ci/{check-capstone.mjs → bkit-check-capstone.mjs} +2 -2
- package/.bkit/templates/scripts/ci/{check-capstone.test.mjs → bkit-check-capstone.test.mjs} +4 -4
- package/.bkit/templates/scripts/ci/{check-dependency-audit.mjs → bkit-check-dependency-audit.mjs} +103 -18
- package/.bkit/templates/scripts/ci/{check-dependency-audit.test.mjs → bkit-check-dependency-audit.test.mjs} +31 -3
- package/.bkit/templates/scripts/ci/bkit-machine-lock.sh +387 -0
- package/.bkit/templates/scripts/ci/bkit-test-awake.mjs +75 -0
- package/.bkit/templates/scripts/ci/bkit-test-awake.test.mjs +160 -0
- package/.bkit/templates/scripts/ci/lanes/{resolve-push-base.mjs → bkit-resolve-push-base.mjs} +3 -3
- package/.bkit/templates/scripts/ci/lanes/{resolve-push-base.test.mjs → bkit-resolve-push-base.test.mjs} +4 -4
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +9 -1
- package/.bkit/templates/scripts/graphify/bkit-graph-drift.py +1 -1
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +3 -3
- package/.bkit/templates/scripts/graphify/bkit-graph-embed.py +63 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +2 -2
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +69 -18
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -3
- package/.bkit/templates/scripts/graphify/bkit-graph-surface.py +1 -1
- package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +1 -1
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +197 -126
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +64 -41
- package/.bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs +23 -7
- package/.bkit/templates/slop-scan.config.json +9 -2
- package/CHANGELOG.md +119 -0
- package/README.md +250 -76
- package/dist/checks/after/auth.js +36 -33
- package/dist/checks/after/ci-yml.js +52 -2
- package/dist/checks/after/index.js +12 -4
- package/dist/checks/after/tools.js +73 -33
- package/dist/checks/before/context-fetch.js +218 -33
- package/dist/checks/before/env.js +1 -1
- package/dist/checks/before/index.js +6 -2
- package/dist/checks/before/repo.js +35 -1
- package/dist/checks/status-holes.js +739 -114
- package/dist/checks/tips/catalogue.js +59 -17
- package/dist/checks/tips/detect.js +30 -0
- package/dist/checks/tips/index.js +48 -6
- package/dist/cli.js +222 -84
- package/dist/commands/analysis.js +77 -53
- package/dist/commands/ci/ci.js +302 -25
- package/dist/commands/ci/pins.js +142 -0
- package/dist/commands/ci/push-gate.js +194 -0
- package/dist/commands/install/uninstall.js +23 -27
- package/dist/commands/install/upgrade.js +21 -11
- package/dist/commands/land.js +126 -10
- package/dist/commands/lib.js +244 -5
- package/dist/commands/registry.js +6 -2
- package/dist/commands/setup/setup.js +1 -0
- package/dist/commands/stats.js +69 -30
- package/dist/commands/workflow/branches.js +1232 -111
- package/dist/commands/workflow/challenge.js +90 -37
- package/dist/commands/workflow/completeness.js +97 -0
- package/dist/commands/workflow/context.js +371 -51
- package/dist/commands/workflow/counters.js +206 -40
- package/dist/commands/workflow/decisions.js +60 -17
- package/dist/commands/workflow/disk.js +213 -55
- package/dist/commands/workflow/fids.js +18 -1
- package/dist/commands/workflow/issues.js +6 -0
- package/dist/commands/workflow/ledgers.js +372 -21
- package/dist/commands/workflow/locks.js +2 -0
- package/dist/commands/workflow/plan-blocks.js +78 -14
- package/dist/commands/workflow/plans.js +205 -0
- package/dist/commands/workflow/prs.js +12 -3
- package/dist/commands/workflow/repo.js +6 -0
- package/dist/commands/workflow/roadmap.js +50 -17
- package/dist/commands/workflow/run-facts.js +23 -28
- package/dist/commands/workflow/runs.js +530 -33
- package/dist/commands/workflow/runtime.js +3 -0
- package/dist/commands/workflow/skills.js +1 -0
- package/dist/commands/workflow/status.js +166 -19
- package/dist/commands/workflow/step-table.js +61 -29
- package/dist/commands/workflow/steps.js +542 -26
- package/dist/commands/workflow/summary-findings.js +117 -0
- package/dist/commands/workflow/summary.js +154 -41
- package/dist/commands/workflow/tasks.js +378 -0
- package/dist/commands/workflow/test-blocks.js +231 -0
- package/dist/commands/workflow/tests-changed.js +172 -0
- package/dist/commands/workflow/tests.js +1013 -321
- package/dist/commands/workflow/workflows.js +191 -38
- package/dist/commands/workflow/worktrees.js +310 -42
- package/dist/install/cloud-env.js +233 -99
- package/dist/install/context-ci-workflow.js +85 -0
- package/dist/install/manifest.js +57 -12
- package/dist/install/modules/antigravity.js +3 -2
- package/dist/install/modules/cloud.js +3 -3
- package/dist/install/modules/codex.js +12 -2
- package/dist/install/modules/core.js +851 -53
- package/dist/install/modules/cursor.js +6 -6
- package/dist/install/modules/opencode.js +11 -5
- package/dist/install/template-notes.js +116 -0
- package/dist/install/version-file.js +3 -2
- package/dist/ledgers/compact.js +87 -0
- package/dist/ledgers/journal.js +233 -0
- package/dist/ledgers/status.js +115 -5
- package/dist/ledgers/telemetry.js +121 -17
- package/dist/render/hosts.js +100 -14
- package/dist/shared/bkit-latest.js +26 -4
- package/dist/shared/dep-updater.js +49 -0
- package/dist/shared/egress.js +1 -1
- package/dist/shared/package-manager.js +6 -0
- package/dist/shared/settings.js +59 -10
- package/dist/shared/timeouts.js +2 -0
- package/dist/tools/cli-doc.js +97 -0
- package/dist/tools/grammar-density.js +1 -1
- package/dist/tools/instructions-sources.js +15 -16
- package/dist/tools/instructions.js +83 -39
- package/package.json +58 -42
- package/.bkit/core/.bkit/lite.md +0 -73
- package/.bkit/core/engine/commands/workflow/workstreams.ts +0 -172
- package/.bkit/core/prompts/bkit-build-plan-execute.md +0 -124
- package/.bkit/templates/scripts/ci/bkit-local-stack-lock.sh +0 -194
- package/dist/commands/workflow/workstreams.js +0 -149
- /package/.bkit/templates/.vale/styles/{House → Bkit}/Filler.yml +0 -0
- /package/.bkit/templates/.vale/styles/{House → Bkit}/Hedging.yml +0 -0
- /package/.bkit/templates/.vale/styles/{House → Bkit}/LLMSlop.yml +0 -0
- /package/.bkit/templates/.vale/styles/{House → Bkit}/Verbose.yml +0 -0
- /package/.bkit/templates/scripts/ci/{accepted-advisories.json → bkit-accepted-advisories.json} +0 -0
- /package/.bkit/templates/scripts/ci/{accepted-divergences.json → bkit-accepted-divergences.json} +0 -0
- /package/.bkit/templates/scripts/launchd/{launchd.env.example → bkit-launchd.env.example} +0 -0
- /package/.bkit/templates/scripts/launchd/{ai.bkit.launchd.plist → bkit-launchd.plist} +0 -0
|
@@ -93,7 +93,7 @@ jobs:
|
|
|
93
93
|
# this job is skipped, both runner jobs are skipped with it.
|
|
94
94
|
# ---------------------------------------------------------------------------
|
|
95
95
|
context:
|
|
96
|
-
name: context (${{ github.event_name }})
|
|
96
|
+
name: bkit-cloud-context (${{ github.event_name }})
|
|
97
97
|
if: >-
|
|
98
98
|
github.event_name == 'workflow_dispatch'
|
|
99
99
|
|| (
|
|
@@ -469,7 +469,7 @@ jobs:
|
|
|
469
469
|
# `/install-github-app` in the consumer repo.
|
|
470
470
|
# ---------------------------------------------------------------------------
|
|
471
471
|
run:
|
|
472
|
-
name: claude (${{ github.event_name }})
|
|
472
|
+
name: bkit-cloud-claude (${{ github.event_name }})
|
|
473
473
|
needs: context
|
|
474
474
|
if: needs.context.outputs.claude == 'true' && needs.context.outputs.skip != 'true'
|
|
475
475
|
runs-on: {{CLOUD_RUNNER}}
|
|
@@ -495,13 +495,13 @@ jobs:
|
|
|
495
495
|
token: ${{ github.token }}
|
|
496
496
|
|
|
497
497
|
# Installs the vale binary for bkit-cloud-bootstrap.sh's `vale sync` and the dispatched
|
|
498
|
-
# phase's lint:prose (as the cloud.md web env's setup script does). Pinned tarball +
|
|
498
|
+
# phase's bkit:lint:prose (as the cloud.md web env's setup script does). Pinned tarball +
|
|
499
499
|
# SHA mirror bkit-ci.yml.
|
|
500
500
|
- name: Install vale
|
|
501
501
|
env:
|
|
502
502
|
# renovate: datasource=github-releases depName=errata-ai/vale
|
|
503
|
-
VALE_VERSION: "3.
|
|
504
|
-
VALE_SHA256: "
|
|
503
|
+
VALE_VERSION: "3.24.0"
|
|
504
|
+
VALE_SHA256: "867534ddb678abca7f214bc4706ead0922bd5252ffe8035fc227013f66c8b214"
|
|
505
505
|
run: |
|
|
506
506
|
curl -fsSL --retry 3 --retry-all-errors "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -o "$RUNNER_TEMP/vale.tar.gz"
|
|
507
507
|
echo "${VALE_SHA256} $RUNNER_TEMP/vale.tar.gz" | sha256sum -c -
|
|
@@ -514,7 +514,7 @@ jobs:
|
|
|
514
514
|
git config user.email 'bkit-auto@users.noreply.github.com'
|
|
515
515
|
|
|
516
516
|
- name: Dispatch /bkit-auto on Claude Code runner
|
|
517
|
-
uses: anthropics/claude-code-action@
|
|
517
|
+
uses: anthropics/claude-code-action@aa8a7738e48bf30a40ee499ce818bef081c5ab5e # v1.0.257
|
|
518
518
|
with:
|
|
519
519
|
# Orchestrator contract: `/bkit-auto <phase> <arg>` where <arg> is the open
|
|
520
520
|
# PR number (ship/debug) or the tracker issue number/id (design/plan/build).
|
|
@@ -544,7 +544,7 @@ jobs:
|
|
|
544
544
|
# opencode.json ${VAR} reference resolves regardless of which provider is installed.
|
|
545
545
|
# ---------------------------------------------------------------------------
|
|
546
546
|
opencode:
|
|
547
|
-
name: opencode (${{ github.event_name }})
|
|
547
|
+
name: bkit-cloud-opencode (${{ github.event_name }})
|
|
548
548
|
needs: context
|
|
549
549
|
if: needs.context.outputs.opencode == 'true' && needs.context.outputs.skip != 'true'
|
|
550
550
|
runs-on: {{CLOUD_RUNNER}}
|
|
@@ -567,14 +567,13 @@ jobs:
|
|
|
567
567
|
|
|
568
568
|
- name: Install opencode
|
|
569
569
|
run: |
|
|
570
|
-
# Version-pinned.
|
|
571
|
-
# template when `bkit upgrade` lists
|
|
572
|
-
#
|
|
573
|
-
#
|
|
574
|
-
#
|
|
575
|
-
# platform binary.
|
|
570
|
+
# Version-pinned. Renovate bumps it through the `# renovate:` line below; without
|
|
571
|
+
# Renovate, take the new version from bkit's template when `bkit upgrade` lists
|
|
572
|
+
# this file. Installed from npm (`@opencode/cli`): the curl installer
|
|
573
|
+
# (https://opencode.ai/install) installs OpenCode 1 only and refuses a 2.x version.
|
|
574
|
+
# npm's postinstall selects the runner's platform binary.
|
|
576
575
|
# renovate: datasource=npm depName=@opencode/cli
|
|
577
|
-
npm install -g @opencode/cli@2.
|
|
576
|
+
npm install -g @opencode/cli@2.1.2
|
|
578
577
|
echo "$(npm prefix -g)/bin" >> "$GITHUB_PATH"
|
|
579
578
|
|
|
580
579
|
- name: Dispatch /bkit-auto on opencode runner
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Example health check. Copy it to `.github/workflows/bkit-health.yml` and own it.
|
|
2
|
+
# bkit install does not write this file and does not overwrite a copy.
|
|
3
|
+
#
|
|
4
|
+
# Probes production after every finished bkit-ci run on the default branch, whatever the run's
|
|
5
|
+
# conclusion: bkit-tests-deploy promotes before the E2E and @live lanes run, so a red run can
|
|
6
|
+
# still have put a release live. The probe runs only when production serves the run's commit,
|
|
7
|
+
# and the job fails, rather than skips, when it cannot tell. Not a required check.
|
|
8
|
+
# See `.bkit/templates.md` § Health check.
|
|
9
|
+
#
|
|
10
|
+
# Fits a deploy that bkit-ci promotes. When the host deploys on its own after merge, trigger on
|
|
11
|
+
# `deployment_status` instead (`docs/deployments.md` § Smoke trigger plumbing).
|
|
12
|
+
# `Did This Run Promote?` asks Vercel; swap it for your host's API. The probe is host-agnostic.
|
|
13
|
+
name: bkit-health
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
workflow_run:
|
|
17
|
+
# The `name:` of your CI workflow.
|
|
18
|
+
workflows: [bkit-ci]
|
|
19
|
+
types: [completed]
|
|
20
|
+
branches: [{{DEFAULT_BRANCH}}]
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
concurrency:
|
|
26
|
+
# workflow_run sets github.ref to the default branch, so key by the CI run's branch.
|
|
27
|
+
group: bkit-health-${{ github.event.workflow_run.head_branch }}
|
|
28
|
+
cancel-in-progress: true
|
|
29
|
+
|
|
30
|
+
env:
|
|
31
|
+
PRODUCTION_URL: "{{PRODUCTION_URL}}"
|
|
32
|
+
HEALTH_PATH: /api/health
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
promoted:
|
|
36
|
+
name: bkit-health-promoted
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
timeout-minutes: 2
|
|
39
|
+
outputs:
|
|
40
|
+
live: ${{ steps.live.outputs.live }}
|
|
41
|
+
steps:
|
|
42
|
+
- name: Did This Run Promote?
|
|
43
|
+
id: live
|
|
44
|
+
env:
|
|
45
|
+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
46
|
+
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}
|
|
47
|
+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
48
|
+
run: |
|
|
49
|
+
host="${PRODUCTION_URL#*://}"
|
|
50
|
+
host="${host%%/*}"
|
|
51
|
+
resp=$(curl -sS --max-time 30 -w '\n%{http_code}' -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
52
|
+
"https://api.vercel.com/v13/deployments/${host}?teamId=${VERCEL_TEAM_ID}" || true)
|
|
53
|
+
code=$(printf '%s\n' "$resp" | tail -1)
|
|
54
|
+
body=$(printf '%s\n' "$resp" | sed '$d')
|
|
55
|
+
if [ "$code" != "200" ]; then
|
|
56
|
+
echo "::error::Could not read which deployment production serves (HTTP ${code:-none}). Failing, because a skipped probe would look green."
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
live_sha=$(printf '%s' "$body" | jq -r '.meta.githubCommitSha // empty')
|
|
60
|
+
if [ "$live_sha" = "$HEAD_SHA" ]; then
|
|
61
|
+
echo "live=true" >> "$GITHUB_OUTPUT"
|
|
62
|
+
echo "Production serves ${HEAD_SHA}, this run's commit: probing it."
|
|
63
|
+
else
|
|
64
|
+
echo "live=false" >> "$GITHUB_OUTPUT"
|
|
65
|
+
echo "Production serves '${live_sha:-nothing}', not ${HEAD_SHA}: this run released nothing to probe."
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
health:
|
|
69
|
+
name: bkit-health
|
|
70
|
+
needs: promoted
|
|
71
|
+
if: needs.promoted.outputs.live == 'true'
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
timeout-minutes: 5
|
|
74
|
+
steps:
|
|
75
|
+
# A deployment the host reports as live can still be warming up, so retry until it
|
|
76
|
+
# answers. Check the body your endpoint returns as well as the status, so a 200 from
|
|
77
|
+
# an error page fails.
|
|
78
|
+
- name: Probe Health Endpoint
|
|
79
|
+
run: |
|
|
80
|
+
url="${PRODUCTION_URL%/}${HEALTH_PATH}"
|
|
81
|
+
deadline=$(( $(date +%s) + 240 ))
|
|
82
|
+
while :; do
|
|
83
|
+
code=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 10 "$url" || echo 000)
|
|
84
|
+
if [ "$code" = "200" ]; then
|
|
85
|
+
echo "$url answered 200."
|
|
86
|
+
exit 0
|
|
87
|
+
fi
|
|
88
|
+
if [ "$(date +%s)" -ge "$deadline" ]; then
|
|
89
|
+
echo "::error::$url did not answer 200 within 240s (last HTTP $code)."
|
|
90
|
+
exit 1
|
|
91
|
+
fi
|
|
92
|
+
sleep 10
|
|
93
|
+
done
|
|
94
|
+
|
|
95
|
+
# Add your own probes as further steps: a curl script over key routes, or a small tagged
|
|
96
|
+
# browser suite. A step that runs a repo script needs `actions/checkout` first, with
|
|
97
|
+
# `ref: ${{ github.event.workflow_run.head_sha }}` so it runs the released commit's code.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#
|
|
14
14
|
# SHA-pin the action. This file is yours, so Renovate may bump the pin. Do NOT add
|
|
15
15
|
# this path to renovate.json5 `ignorePaths`.
|
|
16
|
-
name:
|
|
16
|
+
name: bkit-renovate
|
|
17
17
|
|
|
18
18
|
on:
|
|
19
19
|
workflow_dispatch:
|
|
@@ -30,7 +30,7 @@ on:
|
|
|
30
30
|
type: string
|
|
31
31
|
schedule:
|
|
32
32
|
# Wake the bot once a day, at an off-hour minute. Renovate's OWN schedule in
|
|
33
|
-
# renovate.json5 (
|
|
33
|
+
# renovate.json5 (all of Monday, UTC) gates when normal update PRs open;
|
|
34
34
|
# osvVulnerabilityAlerts CVE PRs bypass it and open on the next daily wake.
|
|
35
35
|
# Do NOT narrow this cron to Monday-only.
|
|
36
36
|
- cron: "17 6 * * *"
|
|
@@ -49,6 +49,7 @@ concurrency:
|
|
|
49
49
|
|
|
50
50
|
jobs:
|
|
51
51
|
renovate:
|
|
52
|
+
name: bkit-renovate
|
|
52
53
|
runs-on: ubuntu-latest # ~16 GB. Edit this label in your copy.
|
|
53
54
|
timeout-minutes: 30
|
|
54
55
|
steps:
|
|
@@ -65,7 +66,7 @@ jobs:
|
|
|
65
66
|
# app-id: ${{ secrets.RENOVATE_APP_ID }}
|
|
66
67
|
# private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}
|
|
67
68
|
# then set `token: ${{ steps.app-token.outputs.token }}` below.
|
|
68
|
-
- uses: renovatebot/github-action@
|
|
69
|
+
- uses: renovatebot/github-action@a63d9a7bc606f7336fd20b47f2f32259a35e6213 # v46.3.9
|
|
69
70
|
with:
|
|
70
71
|
# PAT secret (default). FINE-GRAINED repository permissions (this repo):
|
|
71
72
|
# Contents: Read and write · Pull requests: Read and write ·
|
|
@@ -84,7 +85,7 @@ jobs:
|
|
|
84
85
|
# uses GitHub releases (they carry publish dates, so `minimumReleaseAge` applies);
|
|
85
86
|
# the image tags on ghcr.io carry none.
|
|
86
87
|
# renovate: datasource=github-releases depName=renovatebot/renovate
|
|
87
|
-
renovate-version: "44.
|
|
88
|
+
renovate-version: "44.176.2"
|
|
88
89
|
env:
|
|
89
90
|
# Scope to THIS repo only — never org-wide autodiscover.
|
|
90
91
|
RENOVATE_REPOSITORIES: ${{ github.repository }}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# `aquasecurity/trivy-action` or `setup-trivy` by tag: in March 2026 their tags were
|
|
12
12
|
# re-pointed at a credential stealer. This file is yours, so Renovate bumps the tag and
|
|
13
13
|
# digest together. Do NOT add this path to renovate.json5 `ignorePaths`.
|
|
14
|
-
name:
|
|
14
|
+
name: bkit-trivy
|
|
15
15
|
|
|
16
16
|
on:
|
|
17
17
|
workflow_dispatch:
|
|
@@ -33,6 +33,7 @@ concurrency:
|
|
|
33
33
|
|
|
34
34
|
jobs:
|
|
35
35
|
trivy:
|
|
36
|
+
name: bkit-trivy
|
|
36
37
|
runs-on: ubuntu-latest # Edit this label in your copy.
|
|
37
38
|
timeout-minutes: 15
|
|
38
39
|
steps:
|
|
@@ -40,14 +41,14 @@ jobs:
|
|
|
40
41
|
with:
|
|
41
42
|
persist-credentials: false
|
|
42
43
|
|
|
43
|
-
# `scripts/ci/check-dependency-audit.mjs` (bkit-ci.yml `Check Dependency Audit`)
|
|
44
|
-
# already gates pnpm-lock.yaml against `accepted-advisories.json`; scanning it here
|
|
44
|
+
# `scripts/ci/bkit-check-dependency-audit.mjs` (bkit-ci.yml `Check Dependency Audit`)
|
|
45
|
+
# already gates pnpm-lock.yaml against `bkit-accepted-advisories.json`; scanning it here
|
|
45
46
|
# too would need every acceptance twice. Without that gate, Trivy owns the lockfile.
|
|
46
47
|
- name: Plan Scan
|
|
47
48
|
id: plan
|
|
48
49
|
run: |
|
|
49
50
|
args=""
|
|
50
|
-
if [ -f scripts/ci/check-dependency-audit.mjs ]; then
|
|
51
|
+
if [ -f scripts/ci/bkit-check-dependency-audit.mjs ]; then
|
|
51
52
|
args="$args --skip-files pnpm-lock.yaml"
|
|
52
53
|
fi
|
|
53
54
|
if [ -f .trivyignore.yaml ]; then
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
# bkit install does not write this file and does not overwrite a copy.
|
|
4
4
|
#
|
|
5
5
|
# FAST local gate only: format staged files (seconds). Heavier gates
|
|
6
|
-
# (typecheck/unit/format:check/prose), the enforcing slop gate (slop:delta) and the
|
|
6
|
+
# (typecheck/unit/format:check/prose), the enforcing slop gate (bkit:slop:delta) and the
|
|
7
7
|
# integration tier are in pre-push; E2E/@live run ONLY in CI (bkit-tests / bkit-tests-live,
|
|
8
8
|
# enforced by bkit-tests-check) — see bkit-ci.yml § FULL CI SCAFFOLD REFERENCE. Rule: nothing
|
|
9
9
|
# here that pre-push runs again, and nothing that takes more than a few seconds. (lint:slop is `slop-scan scan` — report-only, never
|
|
10
|
-
# fails; the gate that fails on NEW findings is `slop:delta`, which runs in pre-push.)
|
|
10
|
+
# fails; the gate that fails on NEW findings is `bkit:slop:delta`, which runs in pre-push.)
|
|
11
11
|
#
|
|
12
12
|
# WHAT it runs lives in package.json `bkit:gate:format`, not here — the same script
|
|
13
13
|
# the bkit agent workflows dispatch through; change the gate there. Add repo-specific
|
|
@@ -14,34 +14,76 @@
|
|
|
14
14
|
# Revert-branch bypass: on a revert branch the unit and integration tiers are skipped; lint +
|
|
15
15
|
# typecheck still run.
|
|
16
16
|
#
|
|
17
|
-
# Min push: every changed file
|
|
18
|
-
#
|
|
19
|
-
# never `[skip ci]`.
|
|
17
|
+
# Min push: every changed file is one bkit writes or one that `bkit.testing.minPushPaths`
|
|
18
|
+
# adds (package.json; .bkit/templates.md § Git hooks — Husky) → `bkit:gate:min` replaces the
|
|
19
|
+
# full gate; MIN_PUSH=1 for repo extras. Files decide, never `[skip ci]`.
|
|
20
20
|
set -e
|
|
21
21
|
|
|
22
|
+
# Log: the hook runs itself once more with everything it prints copied to tmp/pre-push.log,
|
|
23
|
+
# rewritten each push, so a reader whose output was cut short, or who pushed in the
|
|
24
|
+
# background, still has the whole run. The path is printed first (tail -f it while the push
|
|
25
|
+
# runs) and last, with the exit code. Git's ref list on stdin reaches the inner run unchanged,
|
|
26
|
+
# and the hook exits with the inner run's code. Output goes to stderr, where git sends a
|
|
27
|
+
# hook's output anyway. `git push --no-verify`, and a checkout without husky installed (a
|
|
28
|
+
# linked worktree), run no hook and write no log.
|
|
29
|
+
if [ -z "${BKIT_PRE_PUSH_LOGGED:-}" ]; then
|
|
30
|
+
PRE_PUSH_LOG=tmp/pre-push.log
|
|
31
|
+
PRE_PUSH_RC_FILE=$(mktemp)
|
|
32
|
+
mkdir -p tmp
|
|
33
|
+
{
|
|
34
|
+
echo "[pre-push] log: $PRE_PUSH_LOG"
|
|
35
|
+
pre_push_rc=0
|
|
36
|
+
BKIT_PRE_PUSH_LOGGED=1 FORCE_COLOR=1 sh "$0" "$@" 2>&1 || pre_push_rc=$?
|
|
37
|
+
echo "[pre-push] log: $PRE_PUSH_LOG (exit $pre_push_rc)"
|
|
38
|
+
echo "$pre_push_rc" > "$PRE_PUSH_RC_FILE"
|
|
39
|
+
} | tee "$PRE_PUSH_LOG" >&2
|
|
40
|
+
pre_push_rc=$(cat "$PRE_PUSH_RC_FILE")
|
|
41
|
+
rm -f "$PRE_PUSH_RC_FILE"
|
|
42
|
+
exit "$pre_push_rc"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Git exports GIT_DIR to a hook and everything it starts (from a linked worktree:
|
|
46
|
+
# <main>/.git/worktrees/<name>). It beats a child's cwd and -C, so a test's `git -C "$tmp" init`
|
|
47
|
+
# re-initialises this repo (core.bare=true in the shared .git/config) and a fixture's
|
|
48
|
+
# `git config user.email` lands here too. The hook runs from the work tree root, so git finds
|
|
49
|
+
# the repo without them.
|
|
50
|
+
unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
|
|
51
|
+
|
|
22
52
|
# ── delete-only push: nothing leaves this machine, so there is nothing to gate ──
|
|
23
53
|
# `git push origin --delete <branch>` runs this hook too. Git feeds one line per ref on
|
|
24
54
|
# stdin — "<local-ref> <local-sha> <remote-ref> <remote-sha>" — and a deleted ref has an
|
|
25
55
|
# all-zero local sha. When EVERY line is a delete, the push carries no commits. A push
|
|
26
56
|
# mixing a delete with a real update still gates, and so does an empty ref list. Reading
|
|
27
57
|
# stdin here is safe: every later command redirects from /dev/null. `[ -t 0 ]` keeps a
|
|
28
|
-
# hand-run hook from hanging. The loop also sets PUSH_DEV_SHA (commit pushed to dev)
|
|
29
|
-
#
|
|
30
|
-
#
|
|
58
|
+
# hand-run hook from hanging. The loop also sets PUSH_DEV_SHA (commit pushed to dev) and
|
|
59
|
+
# PUSH_BRANCH_SHA (commit pushed to the current branch, empty when the push does not update
|
|
60
|
+
# it) for repo extras (e.g. scripts/graphify/bkit-graph-pre-push.sh), PUSH_SHAS (every pushed
|
|
61
|
+
# commit), PUSH_SHARED_SHAS (those pushed to dev / main) and PUSH_BRANCH_REMOTE_SHA (the head
|
|
62
|
+
# the remote holds for the current branch, empty when it holds none), which the CI-suppressor
|
|
63
|
+
# guard below hands to `bkit ci bookkeeping-push`.
|
|
64
|
+
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
|
|
31
65
|
PUSH_SAW_REF=0
|
|
32
66
|
PUSH_HAS_COMMITS=0
|
|
33
67
|
PUSH_DEV_SHA=""
|
|
68
|
+
PUSH_BRANCH_SHA=""
|
|
34
69
|
PUSH_SHAS=""
|
|
70
|
+
PUSH_UPDATES=""
|
|
35
71
|
PUSH_SHARED_SHAS=""
|
|
72
|
+
PUSH_BRANCH_REMOTE_SHA=""
|
|
36
73
|
if [ ! -t 0 ]; then
|
|
37
|
-
while read -r _push_local_ref push_local_sha push_remote_ref
|
|
74
|
+
while read -r _push_local_ref push_local_sha push_remote_ref push_remote_sha; do
|
|
38
75
|
[ -n "$push_local_sha" ] || continue
|
|
39
76
|
PUSH_SAW_REF=1
|
|
40
77
|
case "$push_local_sha" in
|
|
41
78
|
*[!0]*)
|
|
42
79
|
PUSH_HAS_COMMITS=1
|
|
43
80
|
PUSH_SHAS="$PUSH_SHAS $push_local_sha"
|
|
81
|
+
PUSH_UPDATES="$PUSH_UPDATES --update=$push_remote_sha:$push_local_sha"
|
|
44
82
|
[ "$push_remote_ref" = "refs/heads/dev" ] && PUSH_DEV_SHA="$push_local_sha"
|
|
83
|
+
if [ "$push_remote_ref" = "refs/heads/$BRANCH" ]; then
|
|
84
|
+
PUSH_BRANCH_SHA="$push_local_sha"
|
|
85
|
+
case "$push_remote_sha" in *[!0]*) PUSH_BRANCH_REMOTE_SHA="$push_remote_sha" ;; esac
|
|
86
|
+
fi
|
|
45
87
|
case "$push_remote_ref" in
|
|
46
88
|
refs/heads/dev|refs/heads/main) PUSH_SHARED_SHAS="$PUSH_SHARED_SHAS $push_local_sha" ;;
|
|
47
89
|
esac
|
|
@@ -55,7 +97,6 @@ if [ "$PUSH_SAW_REF" = "1" ] && [ "$PUSH_HAS_COMMITS" = "0" ]; then
|
|
|
55
97
|
fi
|
|
56
98
|
# ── end delete-only push
|
|
57
99
|
|
|
58
|
-
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
|
|
59
100
|
HEAD_SUBJECT=$(git log -1 --pretty=%s 2>/dev/null || echo "")
|
|
60
101
|
IS_REVERT=0
|
|
61
102
|
case "$BRANCH" in
|
|
@@ -71,6 +112,12 @@ esac
|
|
|
71
112
|
# -> allowed ([skip ci] pushes for mid-loop status, abort handover). dev/main exempt;
|
|
72
113
|
# gh absent -> allow. `bkit ci skip-token` exits 0 when HEAD's message carries one of
|
|
73
114
|
# the tokens GitHub honours; bkit owns that list.
|
|
115
|
+
# Exception, the same one ship's merge gate makes: a push that adds only files on ship's
|
|
116
|
+
# `--scope=pr` allow-list (.bkit/workflows.md § `/bkit-ship` — 14 steps) on top of the
|
|
117
|
+
# head the remote already holds leaves nothing new for CI to test, so the PR's checks at
|
|
118
|
+
# that head still cover the code. `bkit ci bookkeeping-push` exits 0 for exactly that
|
|
119
|
+
# shape. A rewritten head (force-push) or any code file still blocks. The merge gate
|
|
120
|
+
# (`bkit runs gate --validated=`) stays the authority on what merges.
|
|
74
121
|
case "$BRANCH" in
|
|
75
122
|
dev|main) ;;
|
|
76
123
|
*)
|
|
@@ -79,9 +126,14 @@ case "$BRANCH" in
|
|
|
79
126
|
# strip hook-injected GIT_DIR/GIT_WORK_TREE so gh resolves the repo from cwd (worktree-safe)
|
|
80
127
|
OPEN_PR=$(env -u GIT_DIR -u GIT_WORK_TREE gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number' 2>/dev/null || echo "")
|
|
81
128
|
if [ -n "$OPEN_PR" ]; then
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
129
|
+
if [ -n "$PUSH_BRANCH_REMOTE_SHA" ] &&
|
|
130
|
+
pnpm -s bkit ci bookkeeping-push --from="$PUSH_BRANCH_REMOTE_SHA" < /dev/null > /dev/null; then
|
|
131
|
+
echo "[pre-push] HEAD on '$BRANCH' carries a CI-suppressing token and PR #$OPEN_PR is open, but every file changed since the remote head $PUSH_BRANCH_REMOTE_SHA is bookkeeping — the PR's checks at that head still cover the code; allowing." >&2
|
|
132
|
+
else
|
|
133
|
+
echo "[pre-push] BLOCKED: HEAD on '$BRANCH' carries a CI-suppressing token and PR #$OPEN_PR is open — its checks would stay vacuously green." >&2
|
|
134
|
+
echo "[pre-push] Add a clean trigger commit and re-push: git commit --allow-empty -m \"chore: trigger CI\" && git push" >&2
|
|
135
|
+
exit 1
|
|
136
|
+
fi
|
|
85
137
|
fi
|
|
86
138
|
else
|
|
87
139
|
echo "[pre-push] WARN: HEAD on '$BRANCH' carries a CI-suppressing token but gh is unavailable to check for an open PR; allowing. If a PR is open, ensure HEAD triggers CI." >&2
|
|
@@ -90,16 +142,13 @@ case "$BRANCH" in
|
|
|
90
142
|
;;
|
|
91
143
|
esac
|
|
92
144
|
|
|
93
|
-
# Min push:
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
# evidence reads as a pass.
|
|
145
|
+
# Min push: every outgoing ref is either bookkeeping since its integration base,
|
|
146
|
+
# or a bookkeeping increment over a locally checked ancestor of its remote head.
|
|
147
|
+
# Missing evidence, code or rewritten history keeps the full gate.
|
|
97
148
|
MIN_PUSH=0
|
|
98
|
-
if [ -n "$
|
|
99
|
-
MIN_PUSH_REFS=""
|
|
100
|
-
for push_sha in $PUSH_SHAS; do MIN_PUSH_REFS="$MIN_PUSH_REFS --ref=$push_sha"; done
|
|
149
|
+
if [ -n "$PUSH_UPDATES" ]; then
|
|
101
150
|
# shellcheck disable=SC2086 # hex SHAs only: word-splitting is the point
|
|
102
|
-
if pnpm -s bkit ci min-push $
|
|
151
|
+
if pnpm -s bkit ci min-push $PUSH_UPDATES < /dev/null > /dev/null; then
|
|
103
152
|
MIN_PUSH=1
|
|
104
153
|
fi
|
|
105
154
|
fi
|
|
@@ -109,9 +158,8 @@ fi
|
|
|
109
158
|
# the open-PR guard above (workflows push `[skip ci]` code heads mid-run).
|
|
110
159
|
for push_sha in $PUSH_SHARED_SHAS; do
|
|
111
160
|
if pnpm -s bkit ci skip-token --ref="$push_sha" < /dev/null > /dev/null; then
|
|
112
|
-
if
|
|
113
|
-
|
|
114
|
-
echo "[pre-push] BLOCKED: $push_sha carries a CI-suppressing token and changes files outside bkit.testing.minPushPaths — that code would land on dev / main with no CI run." >&2
|
|
161
|
+
if ! pnpm -s bkit ci min-push --ref="$push_sha" < /dev/null > /dev/null; then
|
|
162
|
+
echo "[pre-push] BLOCKED: $push_sha carries a CI-suppressing token and changes files outside the min-push paths (what bkit writes, plus bkit.testing.minPushPaths) — that code would land on dev / main with no CI run." >&2
|
|
115
163
|
echo "[pre-push] Add a clean trigger commit and re-push: git commit --allow-empty -m \"chore: trigger CI\" && git push" >&2
|
|
116
164
|
exit 1
|
|
117
165
|
fi
|
|
@@ -129,14 +177,25 @@ done
|
|
|
129
177
|
# Fix: `pnpm bkit install`, stage the regenerated files, commit, push.
|
|
130
178
|
pnpm bkit check < /dev/null
|
|
131
179
|
|
|
180
|
+
# Dependency audit — the same gate CI's static lane runs. A high or critical advisory
|
|
181
|
+
# stops the push here, so a remote run is not spent on a red this machine could have
|
|
182
|
+
# caught. It reads the advisory registry: the push it precedes needs the network anyway.
|
|
183
|
+
# Fails closed — a blocking advisory, an unusable answer or an unreachable registry stops
|
|
184
|
+
# the push, never a pass on no answer. `--unreachable=warn` relaxes only the last of those.
|
|
185
|
+
# A recommendation: adopt it, and CI stops being the first place an advisory is seen.
|
|
186
|
+
# Skipped until scripts/ci/ holds the script (bkit install never writes it).
|
|
187
|
+
if [ -f scripts/ci/bkit-check-dependency-audit.mjs ]; then
|
|
188
|
+
node scripts/ci/bkit-check-dependency-audit.mjs < /dev/null
|
|
189
|
+
fi
|
|
190
|
+
|
|
132
191
|
# Slop base on a dev push — the commit CI's slop scan compares against: the head of the last
|
|
133
|
-
# green CI push run on dev, else origin/dev (scripts/ci/lanes/resolve-push-base.mjs, the
|
|
192
|
+
# green CI push run on dev, else origin/dev (scripts/ci/lanes/bkit-resolve-push-base.mjs, the
|
|
134
193
|
# script CI's planner runs, in local mode). Exported as SLOP_BASE_REF, which `bkit ci slop`
|
|
135
194
|
# reads, so a finding a red push already landed on dev fails here as it does in CI. Other
|
|
136
195
|
# branches keep the merge-base default. Skipped until scripts/ci/lanes/ holds the script.
|
|
137
|
-
if [ -n "$PUSH_DEV_SHA" ] && [ -f scripts/ci/lanes/resolve-push-base.mjs ]; then
|
|
196
|
+
if [ -n "$PUSH_DEV_SHA" ] && [ -f scripts/ci/lanes/bkit-resolve-push-base.mjs ]; then
|
|
138
197
|
PUSH_BASE_SOURCE_FILE=$(mktemp)
|
|
139
|
-
CI_PUSH_BASE=$(SOURCE_FILE="$PUSH_BASE_SOURCE_FILE" node scripts/ci/lanes/resolve-push-base.mjs \
|
|
198
|
+
CI_PUSH_BASE=$(SOURCE_FILE="$PUSH_BASE_SOURCE_FILE" node scripts/ci/lanes/bkit-resolve-push-base.mjs \
|
|
140
199
|
--local --branch=dev --head="$PUSH_DEV_SHA" < /dev/null || echo "")
|
|
141
200
|
CI_PUSH_BASE_SOURCE=$(cat "$PUSH_BASE_SOURCE_FILE" 2>/dev/null || echo "unknown")
|
|
142
201
|
rm -f "$PUSH_BASE_SOURCE_FILE"
|
|
@@ -155,12 +214,13 @@ if [ -n "$PUSH_DEV_SHA" ] && [ -f scripts/ci/lanes/resolve-push-base.mjs ]; then
|
|
|
155
214
|
fi
|
|
156
215
|
fi
|
|
157
216
|
|
|
158
|
-
# Capability register (graphify, .bkit/templates.md § graphify) — blocks a push to dev
|
|
159
|
-
# docs/capabilities.md is not what the pushed
|
|
160
|
-
# branches. Skipped until scripts/graphify/ holds the
|
|
161
|
-
# no source the register is built from.
|
|
217
|
+
# Capability register (graphify, .bkit/templates.md § graphify) — blocks a push to dev, and a
|
|
218
|
+
# push of a branch with an open PR into dev, when docs/capabilities.md is not what the pushed
|
|
219
|
+
# commit builds (~30s); warn-only on other branches. Skipped until scripts/graphify/ holds the
|
|
220
|
+
# script, and on a min push: it changes no source the register is built from.
|
|
162
221
|
if [ "$MIN_PUSH" != "1" ] && [ -f scripts/graphify/bkit-graph-pre-push.sh ]; then
|
|
163
|
-
PUSH_DEV_SHA="$PUSH_DEV_SHA" IS_REVERT="$IS_REVERT"
|
|
222
|
+
PUSH_DEV_SHA="$PUSH_DEV_SHA" BRANCH="$BRANCH" PUSH_BRANCH_SHA="$PUSH_BRANCH_SHA" IS_REVERT="$IS_REVERT" \
|
|
223
|
+
bash scripts/graphify/bkit-graph-pre-push.sh < /dev/null
|
|
164
224
|
fi
|
|
165
225
|
|
|
166
226
|
# tmp/ prune — deletes files under tmp/ untouched for 7+ days. Not a gate: a failed
|
|
@@ -174,17 +234,17 @@ fi
|
|
|
174
234
|
# the bkit agent workflows and prompts dispatch through. Edit the scripts, not this
|
|
175
235
|
# hook. Fast repo extras go ABOVE, with `bkit check`; slow ones BELOW.
|
|
176
236
|
# Min push: `bkit:gate:min` only. Revert path drops the suite only: prose
|
|
177
|
-
# and slop:delta still run. Otherwise the deepest push gate package.json declares.
|
|
237
|
+
# and bkit:slop:delta still run. Otherwise the deepest push gate package.json declares.
|
|
178
238
|
if [ "$MIN_PUSH" = "1" ]; then
|
|
179
239
|
echo "[pre-push] min push — bkit:gate:min instead of the full gate" >&2
|
|
180
|
-
pnpm bkit:gate:min < /dev/null
|
|
240
|
+
pnpm -s bkit ci push-gate --gate=bkit:gate:min < /dev/null
|
|
181
241
|
elif [ "$IS_REVERT" = "1" ]; then
|
|
182
242
|
echo "[pre-push] revert branch/commit detected — skipping the test suite"
|
|
183
|
-
pnpm bkit:gate:static < /dev/null
|
|
243
|
+
pnpm -s bkit ci push-gate --gate=bkit:gate:static < /dev/null
|
|
184
244
|
elif grep -q '"bkit:gate:static-unit-integration"[[:space:]]*:' package.json 2>/dev/null; then
|
|
185
|
-
pnpm bkit:gate:static-unit-integration < /dev/null
|
|
245
|
+
pnpm -s bkit ci push-gate --gate=bkit:gate:static-unit-integration < /dev/null
|
|
186
246
|
else
|
|
187
|
-
pnpm bkit:gate:static-unit < /dev/null
|
|
247
|
+
pnpm -s bkit ci push-gate --gate=bkit:gate:static-unit < /dev/null
|
|
188
248
|
fi
|
|
189
249
|
|
|
190
250
|
# Slow repo extras go here, above the disk prune. Ones that need Docker, a database or a
|
|
@@ -39,13 +39,12 @@ pnpm-lock.yaml
|
|
|
39
39
|
# never be byte-equal to what the renderer emits and every close would carry a
|
|
40
40
|
# formatting-only diff. The fold's output is the source of truth.
|
|
41
41
|
docs/roadmap.md
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
docs/plans/*/logs
|
|
48
|
-
docs/plans/*/logs/*/context-tests-local-*.md
|
|
42
|
+
# Workflow run logs — gate output (`bkit tests run` / `red` / `green`), the
|
|
43
|
+
# `bkit context diff` / `brief` records, step reports and the run's
|
|
44
|
+
# `status.jsonl`, committed beside a run's artifacts. The text is a run record,
|
|
45
|
+
# not hand-written markdown: prettier would escape and reflow it, and a gate's
|
|
46
|
+
# format check would then fail on another feature's log merged in from the base.
|
|
47
|
+
docs/plans/*/logs/**
|
|
49
48
|
# bkit's reference copies of its templates — refreshed by `bkit upgrade`, never
|
|
50
49
|
# formatted by this repo.
|
|
51
50
|
.bkit/templates/
|
|
@@ -5,38 +5,38 @@ MinAlertLevel = warning
|
|
|
5
5
|
Packages = write-good
|
|
6
6
|
|
|
7
7
|
[.agents/**]
|
|
8
|
-
BasedOnStyles =
|
|
8
|
+
BasedOnStyles = Bkit
|
|
9
9
|
|
|
10
10
|
# Vendored skill content — third-party docs loaded under multiple paths
|
|
11
11
|
# depending on harness. Each path needs its own scope block.
|
|
12
12
|
[**/.agents/skills/**/*.md]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Bkit.LLMSlop = NO
|
|
14
|
+
Bkit.Hedging = NO
|
|
15
|
+
Bkit.Filler = NO
|
|
16
|
+
Bkit.Verbose = NO
|
|
17
17
|
|
|
18
18
|
[**/.claude/skills/**/*.md]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Bkit.LLMSlop = NO
|
|
20
|
+
Bkit.Hedging = NO
|
|
21
|
+
Bkit.Filler = NO
|
|
22
|
+
Bkit.Verbose = NO
|
|
23
23
|
|
|
24
24
|
[**/.cursor/skills/**/*.md]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
Bkit.LLMSlop = NO
|
|
26
|
+
Bkit.Hedging = NO
|
|
27
|
+
Bkit.Filler = NO
|
|
28
|
+
Bkit.Verbose = NO
|
|
29
29
|
|
|
30
30
|
# Meta-prompt about prose compression: enumerates hedging/verbose phrases
|
|
31
|
-
# verbatim as examples of what to strip, so
|
|
31
|
+
# verbatim as examples of what to strip, so Bkit rules self-trigger.
|
|
32
32
|
[**/bkit-utility-compress-markdown.md]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
Bkit.LLMSlop = NO
|
|
34
|
+
Bkit.Hedging = NO
|
|
35
|
+
Bkit.Filler = NO
|
|
36
|
+
Bkit.Verbose = NO
|
|
37
37
|
|
|
38
38
|
[*.md]
|
|
39
|
-
BasedOnStyles = write-good,
|
|
39
|
+
BasedOnStyles = write-good, Bkit
|
|
40
40
|
write-good.ThereIs = warning
|
|
41
41
|
write-good.Passive = NO
|
|
42
42
|
write-good.TooWordy = NO
|
|
@@ -49,19 +49,19 @@ write-good.Weasel = NO
|
|
|
49
49
|
# disabling, so each rule must be turned off explicitly. Leading `**/` so
|
|
50
50
|
# lint-staged's absolute paths also match.
|
|
51
51
|
[**/docs/plans/**/*.md]
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
Bkit.LLMSlop = NO
|
|
53
|
+
Bkit.Hedging = NO
|
|
54
|
+
Bkit.Filler = NO
|
|
55
|
+
Bkit.Verbose = NO
|
|
56
56
|
write-good.ThereIs = NO
|
|
57
57
|
write-good.So = NO
|
|
58
58
|
|
|
59
59
|
# bkit's reference copies of its templates (.bkit/templates/) — refreshed by
|
|
60
60
|
# `bkit upgrade`, not this repo's prose. Every rule off, as for docs/plans above.
|
|
61
61
|
[**/.bkit/templates/**/*.md]
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
Bkit.LLMSlop = NO
|
|
63
|
+
Bkit.Hedging = NO
|
|
64
|
+
Bkit.Filler = NO
|
|
65
|
+
Bkit.Verbose = NO
|
|
66
66
|
write-good.ThereIs = NO
|
|
67
67
|
write-good.So = NO
|