@cbartens/bkit 5.5.1 → 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 +167 -154
- package/.bkit/core/.agents/context.md +95 -29
- package/.bkit/core/.agents/docs.md +18 -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 +112 -102
- package/.bkit/core/.agents/skills.md +63 -15
- package/.bkit/core/.bkit/README.md +167 -154
- package/.bkit/core/.bkit/authoring.md +747 -0
- package/.bkit/core/.bkit/cli.md +407 -0
- package/.bkit/core/.bkit/cloud.md +283 -195
- package/.bkit/core/.bkit/comparison.md +45 -43
- package/.bkit/core/.bkit/install.md +166 -95
- package/.bkit/core/.bkit/jsonl.md +339 -196
- package/.bkit/core/.bkit/pipeline.md +142 -145
- package/.bkit/core/.bkit/prompts.md +295 -264
- package/.bkit/core/.bkit/providers.md +460 -277
- package/.bkit/core/.bkit/router.md +69 -0
- package/.bkit/core/.bkit/templates.md +530 -256
- package/.bkit/core/.bkit/trackers.md +116 -65
- package/.bkit/core/.bkit/workflows.md +742 -618
- 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 +6 -80
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +128 -130
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +104 -94
- package/.bkit/core/docs/templates/bkit-audit-agents.md +96 -98
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +100 -103
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +141 -107
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +99 -97
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +122 -121
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +158 -101
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +114 -96
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +76 -97
- package/.bkit/core/docs/templates/bkit-audit-config.md +123 -101
- package/.bkit/core/docs/templates/bkit-audit-cost.md +86 -99
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +76 -93
- package/.bkit/core/docs/templates/bkit-audit-database.md +102 -95
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +165 -108
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +115 -109
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +265 -113
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +119 -118
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +140 -111
- package/.bkit/core/docs/templates/bkit-audit-failures.md +111 -106
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +100 -99
- package/.bkit/core/docs/templates/bkit-audit-gates.md +107 -103
- package/.bkit/core/docs/templates/bkit-audit-issues.md +105 -105
- package/.bkit/core/docs/templates/bkit-audit-llm.md +134 -85
- package/.bkit/core/docs/templates/bkit-audit-logs.md +124 -125
- package/.bkit/core/docs/templates/bkit-audit-models.md +99 -78
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +56 -76
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +63 -78
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +125 -93
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +97 -96
- package/.bkit/core/docs/templates/bkit-audit-repo.md +170 -98
- package/.bkit/core/docs/templates/bkit-audit-security.md +207 -121
- package/.bkit/core/docs/templates/bkit-audit-slop.md +78 -95
- package/.bkit/core/docs/templates/bkit-audit-testing.md +163 -139
- package/.bkit/core/docs/templates/bkit-audit-usability.md +114 -96
- package/.bkit/core/docs/templates/bkit-plan.md +158 -281
- package/.bkit/core/engine/checks/after/auth.ts +40 -37
- package/.bkit/core/engine/checks/after/ci-yml.ts +104 -31
- package/.bkit/core/engine/checks/after/github.ts +95 -17
- package/.bkit/core/engine/checks/after/index.ts +21 -8
- package/.bkit/core/engine/checks/after/suppression.ts +8 -5
- package/.bkit/core/engine/checks/after/tools.ts +125 -123
- package/.bkit/core/engine/checks/before/context-fetch.ts +227 -33
- package/.bkit/core/engine/checks/before/env.ts +3 -3
- package/.bkit/core/engine/checks/before/files.ts +5 -4
- package/.bkit/core/engine/checks/before/index.ts +25 -1
- package/.bkit/core/engine/checks/before/repo.ts +208 -2
- package/.bkit/core/engine/checks/status-holes.ts +916 -123
- package/.bkit/core/engine/checks/tips/catalogue.ts +82 -20
- package/.bkit/core/engine/checks/tips/detect.ts +66 -0
- package/.bkit/core/engine/checks/tips/index.ts +52 -11
- package/.bkit/core/engine/cli.ts +251 -130
- package/.bkit/core/engine/commands/analysis.ts +282 -199
- 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/comply.ts +77 -103
- package/.bkit/core/engine/commands/install/doctor.ts +2 -2
- package/.bkit/core/engine/commands/install/install.ts +57 -18
- package/.bkit/core/engine/commands/install/uninstall.ts +86 -55
- package/.bkit/core/engine/commands/install/upgrade.ts +32 -15
- package/.bkit/core/engine/commands/land.ts +139 -18
- package/.bkit/core/engine/commands/lib.ts +381 -22
- package/.bkit/core/engine/commands/registry.ts +10 -2
- package/.bkit/core/engine/commands/setup/setup.ts +8 -7
- package/.bkit/core/engine/commands/stats.ts +260 -0
- package/.bkit/core/engine/commands/tips.ts +10 -5
- package/.bkit/core/engine/commands/workflow/branches.ts +2215 -176
- package/.bkit/core/engine/commands/workflow/challenge.ts +748 -0
- package/.bkit/core/engine/commands/workflow/completeness.ts +109 -0
- package/.bkit/core/engine/commands/workflow/context.ts +1249 -47
- package/.bkit/core/engine/commands/workflow/counters.ts +483 -95
- package/.bkit/core/engine/commands/workflow/decisions.ts +585 -0
- package/.bkit/core/engine/commands/workflow/disk.ts +238 -56
- package/.bkit/core/engine/commands/workflow/fids.ts +811 -33
- package/.bkit/core/engine/commands/workflow/issues.ts +413 -64
- package/.bkit/core/engine/commands/workflow/ledgers.ts +1333 -36
- package/.bkit/core/engine/commands/workflow/locks.ts +28 -2
- package/.bkit/core/engine/commands/workflow/plan-blocks.ts +691 -0
- package/.bkit/core/engine/commands/workflow/plan-versions.ts +21 -0
- package/.bkit/core/engine/commands/workflow/plans.ts +257 -0
- package/.bkit/core/engine/commands/workflow/prs.ts +178 -33
- package/.bkit/core/engine/commands/workflow/repo.ts +66 -8
- package/.bkit/core/engine/commands/workflow/roadmap.ts +72 -22
- package/.bkit/core/engine/commands/workflow/run-facts.ts +492 -0
- package/.bkit/core/engine/commands/workflow/runs.ts +827 -79
- package/.bkit/core/engine/commands/workflow/runtime.ts +25 -1
- package/.bkit/core/engine/commands/workflow/skills.ts +1 -0
- package/.bkit/core/engine/commands/workflow/status.ts +329 -33
- package/.bkit/core/engine/commands/workflow/step-table.ts +381 -0
- package/.bkit/core/engine/commands/workflow/steps.ts +841 -105
- package/.bkit/core/engine/commands/workflow/summary-findings.ts +177 -0
- package/.bkit/core/engine/commands/workflow/summary.ts +544 -0
- 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 +2124 -330
- package/.bkit/core/engine/commands/workflow/tracker.ts +1195 -0
- package/.bkit/core/engine/commands/workflow/workflows.ts +1197 -235
- package/.bkit/core/engine/commands/workflow/worktrees.ts +543 -24
- 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 +67 -17
- package/.bkit/core/engine/install/modules/antigravity.ts +3 -2
- package/.bkit/core/engine/install/modules/cloud.ts +24 -16
- package/.bkit/core/engine/install/modules/codex.ts +15 -2
- package/.bkit/core/engine/install/modules/core.ts +1196 -45
- package/.bkit/core/engine/install/modules/cursor.ts +6 -6
- package/.bkit/core/engine/install/modules/opencode.ts +18 -6
- package/.bkit/core/engine/install/template-notes.ts +130 -0
- package/.bkit/core/engine/install/version-file.ts +9 -4
- 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/migrate.ts +92 -0
- package/.bkit/core/engine/ledgers/status.ts +249 -21
- package/.bkit/core/engine/ledgers/telemetry.ts +1397 -253
- package/.bkit/core/engine/render/hosts.ts +118 -14
- package/.bkit/core/engine/render/models.ts +12 -0
- package/.bkit/core/engine/shared/bkit-latest.ts +26 -4
- package/.bkit/core/engine/shared/branches.ts +4 -1
- package/.bkit/core/engine/shared/dep-updater.ts +60 -0
- package/.bkit/core/engine/shared/egress.ts +8 -1
- package/.bkit/core/engine/shared/json.ts +25 -7
- package/.bkit/core/engine/shared/package-manager.ts +9 -0
- package/.bkit/core/engine/shared/settings.ts +243 -31
- package/.bkit/core/engine/shared/text.ts +361 -0
- 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 +215 -0
- package/.bkit/core/engine/tools/instructions-sources.ts +832 -0
- package/.bkit/core/engine/tools/instructions.ts +1802 -0
- package/.bkit/core/hooks/antigravity-hook.js +25 -10
- package/.bkit/core/hooks/gateguard-engine.js +54 -29
- package/.bkit/core/hooks/guardrails-shell.js +4 -5
- package/.bkit/core/hooks/guardrails-tiers.js +10 -4
- 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 +202 -94
- package/.bkit/core/prompts/bkit-build-challenge-1.md +76 -34
- package/.bkit/core/prompts/bkit-build-challenge-2.md +85 -38
- package/.bkit/core/prompts/bkit-build-install-skills.md +50 -28
- package/.bkit/core/prompts/bkit-build-plan-convert.md +85 -0
- package/.bkit/core/prompts/bkit-build-plan-current.md +59 -36
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +101 -36
- 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 +104 -43
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +47 -32
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +109 -57
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +65 -39
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +53 -31
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +65 -34
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +46 -31
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +45 -31
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +43 -30
- package/.bkit/core/prompts/bkit-design-generate.md +80 -46
- package/.bkit/core/prompts/bkit-design-organise.md +83 -32
- package/.bkit/core/prompts/bkit-design-review-1.md +70 -50
- package/.bkit/core/prompts/bkit-design-review-2.md +65 -46
- package/.bkit/core/prompts/bkit-design-spike.md +64 -40
- package/.bkit/core/prompts/bkit-design-update.md +53 -28
- package/.bkit/core/prompts/bkit-plan-generate.md +101 -29
- package/.bkit/core/prompts/bkit-plan-review-1.md +78 -41
- package/.bkit/core/prompts/bkit-plan-review-2.md +78 -35
- package/.bkit/core/prompts/bkit-plan-scope-check.md +116 -0
- package/.bkit/core/prompts/bkit-plan-update.md +86 -31
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +94 -50
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +91 -41
- package/.bkit/core/prompts/bkit-ship-update-docs.md +45 -24
- package/.bkit/core/prompts/bkit-utility-compress-markdown.md +65 -49
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +87 -42
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +81 -37
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +43 -25
- package/.bkit/core/prompts/bkit-utility-update-failures.md +84 -37
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +88 -42
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +92 -39
- package/.bkit/core/prompts/bkit-utility-update-tracker.md +159 -60
- package/.bkit/core/workflows/bkit-auto.md +89 -58
- package/.bkit/core/workflows/bkit-build.md +967 -517
- package/.bkit/core/workflows/bkit-debug.md +555 -387
- package/.bkit/core/workflows/bkit-design.md +319 -283
- package/.bkit/core/workflows/bkit-plan.md +319 -342
- package/.bkit/core/workflows/bkit-ship.md +525 -328
- package/.bkit/shared/.agents/plugins/bkit/hooks.json +10 -0
- package/.bkit/shared/.bkit/.env.example +2 -2
- package/.bkit/shared/.claude/bkit-cloud.md +12 -10
- package/.bkit/shared/.claude/settings.json +14 -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/.cursor/mcp.json +1 -1
- package/.bkit/shared/.cursor/rules/bkit-rules.mdc +1 -1
- package/.bkit/shared/.gitattributes +1 -1
- package/.bkit/shared/.mcp.json +1 -1
- package/.bkit/shared/.opencode/opencode.json +12 -1
- package/.bkit/shared/CLAUDE.md +6 -2
- package/.bkit/shared/GEMINI.md +5 -2
- package/.bkit/shared/docs/architecture.md +4 -7
- package/.bkit/shared/docs/data-schema.md +4 -7
- package/.bkit/shared/docs/deployments.md +241 -168
- 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 +289 -174
- 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 +45 -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 +54 -51
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +34 -33
- 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 +96 -36
- package/.bkit/templates/.prettierignore +6 -0
- 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 +10 -2
- 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 +231 -0
- package/README.md +278 -89
- package/dist/checks/after/auth.js +36 -33
- package/dist/checks/after/ci-yml.js +91 -30
- package/dist/checks/after/github.js +91 -17
- package/dist/checks/after/index.js +22 -11
- package/dist/checks/after/suppression.js +8 -5
- package/dist/checks/after/tools.js +111 -114
- package/dist/checks/before/context-fetch.js +218 -33
- package/dist/checks/before/env.js +3 -3
- package/dist/checks/before/files.js +5 -3
- package/dist/checks/before/index.js +20 -3
- package/dist/checks/before/repo.js +197 -2
- package/dist/checks/status-holes.js +739 -114
- package/dist/checks/tips/catalogue.js +70 -19
- package/dist/checks/tips/detect.js +62 -0
- package/dist/checks/tips/index.js +51 -9
- package/dist/cli.js +234 -124
- package/dist/commands/analysis.js +174 -141
- 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/comply.js +54 -91
- package/dist/commands/install/doctor.js +2 -2
- package/dist/commands/install/install.js +50 -19
- package/dist/commands/install/uninstall.js +82 -55
- package/dist/commands/install/upgrade.js +21 -11
- package/dist/commands/land.js +137 -17
- package/dist/commands/lib.js +295 -21
- package/dist/commands/registry.js +10 -2
- package/dist/commands/setup/setup.js +8 -7
- package/dist/commands/stats.js +175 -0
- package/dist/commands/tips.js +7 -3
- package/dist/commands/workflow/branches.js +1873 -152
- package/dist/commands/workflow/challenge.js +609 -0
- package/dist/commands/workflow/completeness.js +97 -0
- package/dist/commands/workflow/context.js +1045 -46
- package/dist/commands/workflow/counters.js +385 -86
- package/dist/commands/workflow/decisions.js +484 -0
- package/dist/commands/workflow/disk.js +214 -56
- package/dist/commands/workflow/fids.js +706 -33
- package/dist/commands/workflow/issues.js +349 -59
- package/dist/commands/workflow/ledgers.js +1123 -37
- package/dist/commands/workflow/locks.js +26 -2
- package/dist/commands/workflow/plan-blocks.js +501 -0
- package/dist/commands/workflow/plan-versions.js +22 -0
- package/dist/commands/workflow/plans.js +205 -0
- package/dist/commands/workflow/prs.js +154 -35
- package/dist/commands/workflow/repo.js +58 -8
- package/dist/commands/workflow/roadmap.js +58 -23
- package/dist/commands/workflow/run-facts.js +421 -0
- package/dist/commands/workflow/runs.js +670 -72
- package/dist/commands/workflow/runtime.js +15 -1
- package/dist/commands/workflow/skills.js +1 -0
- package/dist/commands/workflow/status.js +282 -34
- package/dist/commands/workflow/step-table.js +308 -0
- package/dist/commands/workflow/steps.js +703 -96
- package/dist/commands/workflow/summary-findings.js +117 -0
- package/dist/commands/workflow/summary.js +388 -0
- 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 +1695 -305
- package/dist/commands/workflow/tracker.js +983 -0
- package/dist/commands/workflow/workflows.js +1014 -222
- package/dist/commands/workflow/worktrees.js +432 -26
- package/dist/install/cloud-env.js +233 -99
- package/dist/install/context-ci-workflow.js +85 -0
- package/dist/install/manifest.js +64 -17
- package/dist/install/modules/antigravity.js +3 -2
- package/dist/install/modules/cloud.js +25 -16
- package/dist/install/modules/codex.js +12 -2
- package/dist/install/modules/core.js +1090 -48
- package/dist/install/modules/cursor.js +6 -6
- package/dist/install/modules/opencode.js +13 -7
- package/dist/install/template-notes.js +116 -0
- package/dist/install/version-file.js +9 -4
- package/dist/ledgers/compact.js +87 -0
- package/dist/ledgers/journal.js +233 -0
- package/dist/ledgers/migrate.js +81 -0
- package/dist/ledgers/status.js +176 -13
- package/dist/ledgers/telemetry.js +1010 -125
- package/dist/render/hosts.js +104 -14
- package/dist/render/models.js +12 -0
- package/dist/shared/bkit-latest.js +26 -4
- package/dist/shared/branches.js +3 -1
- package/dist/shared/dep-updater.js +49 -0
- package/dist/shared/egress.js +8 -1
- package/dist/shared/json.js +20 -7
- package/dist/shared/package-manager.js +6 -0
- package/dist/shared/settings.js +181 -24
- package/dist/shared/text.js +333 -0
- package/dist/shared/timeouts.js +2 -0
- package/dist/tools/cli-doc.js +97 -0
- package/dist/tools/grammar-density.js +183 -0
- package/dist/tools/instructions-sources.js +720 -0
- package/dist/tools/instructions.js +1623 -0
- package/package.json +156 -51
- package/.bkit/core/.bkit/lite.md +0 -73
- package/.bkit/core/engine/commands/harvest.ts +0 -459
- package/.bkit/core/engine/commands/workflow/workstreams.ts +0 -166
- package/.bkit/core/engine/tools/wording.ts +0 -748
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +0 -69
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +0 -71
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +0 -74
- package/.bkit/core/prompts/bkit-build-plan-execute.md +0 -76
- package/.bkit/core/prompts/bkit-build-summary.md +0 -94
- package/.bkit/core/prompts/bkit-debug-summary.md +0 -96
- package/.bkit/core/prompts/bkit-design-summary.md +0 -107
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +0 -67
- package/.bkit/core/prompts/bkit-plan-complexity-split.md +0 -88
- package/.bkit/core/prompts/bkit-plan-review-3.md +0 -93
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +0 -85
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +0 -85
- package/.bkit/core/prompts/bkit-plan-summary.md +0 -107
- package/.bkit/core/prompts/bkit-ship-summary.md +0 -78
- package/.bkit/templates/scripts/ci/bkit-local-stack-lock.sh +0 -194
- package/dist/commands/harvest.js +0 -353
- package/dist/commands/workflow/workstreams.js +0 -143
- package/dist/tools/wording.js +0 -680
- /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
|
@@ -35,7 +35,7 @@ REPORTS="$OUT/reports"
|
|
|
35
35
|
# Report filenames — RENAME HERE AND NOWHERE ELSE. Each is referenced once
|
|
36
36
|
# below, so a new name takes effect on the next run with no other edit. These
|
|
37
37
|
# are all derived artifacts: renaming one never invalidates the graph, and the
|
|
38
|
-
# old file is not cleaned up automatically — delete it or run `pnpm graph:clean`.
|
|
38
|
+
# old file is not cleaned up automatically — delete it or run `pnpm bkit:graph:clean`.
|
|
39
39
|
R_REPORT="graph-report.md" # cluster-only's own report, moved here
|
|
40
40
|
R_TREE="graph-tree.html" # collapsible folder tree
|
|
41
41
|
R_FULL_GRAPHML="graph.graphml" # whole graph for Gephi
|
|
@@ -82,39 +82,48 @@ R_EAGER="graph-eager.json"
|
|
|
82
82
|
# register carries its findings.
|
|
83
83
|
REACH_MJS="scripts/ci/guards/assert-routes-reachable.mjs"
|
|
84
84
|
R_REACH="graph-reachability.json"
|
|
85
|
+
# Docs that carry a copy of the register's packages diagram between the
|
|
86
|
+
# graph:packages markers, space-separated; empty = none. rollup, register and
|
|
87
|
+
# refresh rewrite each copy, and check fails on a stale one. Runs on system python.
|
|
88
|
+
EMBED_PY="scripts/graphify/bkit-graph-embed.py"
|
|
89
|
+
GRAPH_EMBED_DOCS=""
|
|
85
90
|
|
|
86
91
|
usage() {
|
|
87
92
|
cat <<'EOF'
|
|
88
|
-
Usage: pnpm graph[:clean|:update|:rollup|:refresh|:check|:graphml|:tree|:scoped]
|
|
93
|
+
Usage: pnpm bkit:graph[:clean|:update|:rollup|:refresh|:check|:graphml|:tree|:scoped]
|
|
89
94
|
|
|
90
|
-
graph
|
|
91
|
-
graph:clean
|
|
95
|
+
bkit:graph Full repo: extract + cluster. ~2 min, 0 tokens.
|
|
96
|
+
bkit:graph:clean Same, but deletes the output dir first. REQUIRED after any
|
|
92
97
|
tsconfig `paths` change — `--force` re-reads source files but
|
|
93
98
|
NOT the module-resolution cache, so a graph built after an
|
|
94
99
|
alias edit will silently keep the old, unresolved edges.
|
|
95
|
-
graph:update
|
|
96
|
-
graph:check
|
|
97
|
-
docs/capabilities.md differs from the rebuild
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
bkit:graph:update Re-extract changed files only, then recluster.
|
|
101
|
+
bkit:graph:check Rebuild from THIS tree; fail if the tracked register
|
|
102
|
+
docs/capabilities.md differs from the rebuild, or a
|
|
103
|
+
GRAPH_EMBED_DOCS copy of its packages diagram differs from
|
|
104
|
+
the register. Writes nothing tracked. Reads uncommitted
|
|
105
|
+
edits — `check-at` does not.
|
|
106
|
+
bkit:graph:refresh Rebuild the register in a clean checkout of the STAGED
|
|
107
|
+
files (the index), copy it over docs/capabilities.md, and
|
|
108
|
+
rewrite the GRAPH_EMBED_DOCS copies. Stage your change
|
|
109
|
+
first. Fixes a red gate; commit it.
|
|
101
110
|
check-at <rev> `check` in a throwaway checkout of <rev>. Pre-push runs it
|
|
102
|
-
for every push to dev; CI runs
|
|
111
|
+
for every push to dev; CI runs it for every push and pull request.
|
|
103
112
|
spec Print the pinned graphify release (pip spec).
|
|
104
|
-
graph:rollup
|
|
113
|
+
bkit:graph:rollup Collapse the symbol graph into a package view (~24 nodes, the
|
|
105
114
|
architecture) and a module view (~133 nodes, the subsystems),
|
|
106
115
|
as interactive HTML. Edge weight is the number of underlying
|
|
107
116
|
symbol edges. Open these INSTEAD of the full graph; 9.8K nodes
|
|
108
117
|
is a database, not a picture.
|
|
109
|
-
graph:graphml
|
|
118
|
+
bkit:graph:graphml OPT-IN, for Gephi / yEd only — nothing else produces GraphML.
|
|
110
119
|
Writes all three views: the whole graph plus the two rollups.
|
|
111
120
|
The CLI has no --graphml flag (it exists only on the /graphify
|
|
112
121
|
skill, which this repo does not install), so the whole-graph
|
|
113
122
|
export calls graphify's own to_graphml() through its bundled
|
|
114
123
|
interpreter.
|
|
115
|
-
graph:tree
|
|
124
|
+
bkit:graph:tree Collapsible folder tree with search and an outbound-edge
|
|
116
125
|
inspector.
|
|
117
|
-
graph:scoped
|
|
126
|
+
bkit:graph:scoped One subtree with a browsable graph.html.
|
|
118
127
|
Path defaults to apps/web/src; pass another as $2.
|
|
119
128
|
|
|
120
129
|
Two directories, both gitignored and both rebuilt from source:
|
|
@@ -122,7 +131,7 @@ Two directories, both gitignored and both rebuilt from source:
|
|
|
122
131
|
<out>/ RAW graph data — graph.json, manifest.json, cache/. graphify
|
|
123
132
|
owns this layout; the read commands (affected, god-nodes,
|
|
124
133
|
explain, path, query) all resolve <out>/graph.json.
|
|
125
|
-
<out>/reports/ Every DERIVED view. Safe to delete wholesale; `pnpm graph`
|
|
134
|
+
<out>/reports/ Every DERIVED view. Safe to delete wholesale; `pnpm bkit:graph`
|
|
126
135
|
plus the view command that made it rebuilds any of it.
|
|
127
136
|
|
|
128
137
|
A whole-repo graph.html is never kept — 8.3 MB rendering ~9.8k nodes as a
|
|
@@ -164,14 +173,14 @@ graphify_python() {
|
|
|
164
173
|
}
|
|
165
174
|
|
|
166
175
|
require_graph() {
|
|
167
|
-
[ -f "$OUT/graph.json" ] || { echo "[graph] no $OUT/graph.json — run 'pnpm graph' first" >&2; exit 1; }
|
|
176
|
+
[ -f "$OUT/graph.json" ] || { echo "[graph] no $OUT/graph.json — run 'pnpm bkit:graph' first" >&2; exit 1; }
|
|
168
177
|
}
|
|
169
178
|
|
|
170
179
|
# The ONE graphify release that builds and judges the register — here, in the pre-push gate
|
|
171
180
|
# and in CI (installs `$(bash scripts/graphify/bkit-graphify.sh spec)`). Another release draws
|
|
172
181
|
# different edges → drift no one else can reproduce. PyPI `graphifyy`, CLI `graphify`.
|
|
173
182
|
# renovate: datasource=pypi depName=graphifyy
|
|
174
|
-
GRAPHIFY_SPEC="graphifyy[sql]==0.9.
|
|
183
|
+
GRAPHIFY_SPEC="graphifyy[sql]==0.9.93"
|
|
175
184
|
if [ "${1:-}" = "spec" ]; then
|
|
176
185
|
printf '%s\n' "$GRAPHIFY_SPEC"
|
|
177
186
|
exit 0
|
|
@@ -199,7 +208,7 @@ esac
|
|
|
199
208
|
# The whole-repo graph.html is DELETED, never kept. --no-viz below stops
|
|
200
209
|
# cluster-only writing one, but `graphify update` regenerates it on its own
|
|
201
210
|
# ("regenerated missing or stale graph.html") before this function reclusters, so
|
|
202
|
-
# the rm removes it. Use graph:rollup for something clickable, or Gephi on the
|
|
211
|
+
# the rm removes it. Use bkit:graph:rollup for something clickable, or Gephi on the
|
|
203
212
|
# GraphML for metrics.
|
|
204
213
|
cluster() {
|
|
205
214
|
run_local cluster-only . --no-label --no-viz
|
|
@@ -267,28 +276,31 @@ capabilities() {
|
|
|
267
276
|
--min-weight "$MMD_MIN_WEIGHT" --overlay "$REPORTS/$R_OVERLAY"
|
|
268
277
|
}
|
|
269
278
|
|
|
270
|
-
#
|
|
271
|
-
#
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
# Rewrite every GRAPH_EMBED_DOCS copy of the packages diagram from the tracked
|
|
280
|
+
# register; pass --check to fail on a stale copy instead.
|
|
281
|
+
embed() {
|
|
282
|
+
[ -n "$GRAPH_EMBED_DOCS" ] || return 0
|
|
283
|
+
local docs
|
|
284
|
+
read -r -a docs <<< "$GRAPH_EMBED_DOCS"
|
|
285
|
+
python3 "$EMBED_PY" "$CAPABILITIES_DOC" "${docs[@]}" "$@"
|
|
277
286
|
}
|
|
278
287
|
|
|
279
288
|
# Run this script's subcommands in a throwaway checkout of ONE commit: graphify reads the
|
|
280
289
|
# working tree, so the build belongs to that commit, not to uncommitted edits here. Root
|
|
281
|
-
# node_modules is linked in for the route scan. $1 = commit;
|
|
282
|
-
#
|
|
290
|
+
# node_modules is linked in for the route scan. $1 = commit; an optional `--tree=<tree>`
|
|
291
|
+
# next replaces the checkout's files with that tree, deletions included, while HEAD stays
|
|
292
|
+
# the commit; rest = subcommands, in order. $AT_DIR = the checkout.
|
|
283
293
|
at_commit() {
|
|
284
|
-
local rev="$1" sha tmp sub
|
|
294
|
+
local rev="$1" tree="" sha tmp sub
|
|
285
295
|
shift
|
|
296
|
+
case "${1:-}" in --tree=*) tree="${1#--tree=}"; shift ;; esac
|
|
286
297
|
sha=$(git rev-parse --verify --quiet "$rev^{commit}") || { echo "[graph] not a commit: $rev" >&2; exit 2; }
|
|
287
298
|
tmp=$(mktemp -d "${TMPDIR:-/tmp}/graph-at-XXXXXX")
|
|
288
299
|
AT_DIR="$tmp/checkout"
|
|
289
300
|
# shellcheck disable=SC2064 # expand now: $tmp is local and gone by the time EXIT fires
|
|
290
301
|
trap "git worktree remove --force '$AT_DIR' >/dev/null 2>&1; rm -rf '$tmp'" EXIT
|
|
291
302
|
git -c core.hooksPath=/dev/null worktree add --detach --quiet "$AT_DIR" "$sha"
|
|
303
|
+
if [ -n "$tree" ]; then git -C "$AT_DIR" read-tree -u --reset "$tree"; fi
|
|
292
304
|
ln -s "$(git rev-parse --show-toplevel)/node_modules" "$AT_DIR/node_modules"
|
|
293
305
|
for sub in "$@"; do
|
|
294
306
|
(cd "$AT_DIR" && env -u GIT_DIR -u GIT_WORK_TREE -u GIT_INDEX_FILE \
|
|
@@ -301,6 +313,7 @@ case "${1:-build}" in
|
|
|
301
313
|
clean) rm -rf "$OUT" && run_local extract . --code-only && repair && cluster ;;
|
|
302
314
|
rollup)
|
|
303
315
|
capabilities "$CAPABILITIES_DOC"
|
|
316
|
+
embed
|
|
304
317
|
for lvl in packages modules; do
|
|
305
318
|
run_scratch cluster-only "$REPORTS/.build/$lvl" --no-label >/dev/null 2>&1 || true
|
|
306
319
|
done
|
|
@@ -319,7 +332,7 @@ case "${1:-build}" in
|
|
|
319
332
|
echo "[graph] mermaid (paste into mermaid.live, or render per docs/setup.md):"
|
|
320
333
|
echo " $REPORTS/$R_PACKAGES_MMD"
|
|
321
334
|
echo " $REPORTS/$R_MODULES_MMD"
|
|
322
|
-
echo "[graph] GraphML for Gephi is opt-in: pnpm graph:graphml"
|
|
335
|
+
echo "[graph] GraphML for Gephi is opt-in: pnpm bkit:graph:graphml"
|
|
323
336
|
;;
|
|
324
337
|
tree)
|
|
325
338
|
require_graph
|
|
@@ -340,15 +353,17 @@ case "${1:-build}" in
|
|
|
340
353
|
;;
|
|
341
354
|
update) run_local update . && repair && cluster ;;
|
|
342
355
|
check)
|
|
343
|
-
# Gate on every push to dev: pre-push runs it via
|
|
344
|
-
# checkout of the pushed commit; CI runs
|
|
356
|
+
# Gate on every push to dev and every pull request: pre-push runs it via
|
|
357
|
+
# `check-at` in a clean checkout of the pushed commit; CI runs `check-at HEAD` on
|
|
358
|
+
# the checked-out commit: the pushed commit (push) or GitHub's test merge of the PR
|
|
359
|
+
# into its base (pull_request), the tree a squash merge lands.
|
|
345
360
|
# Rebuild graph from this tree → regenerate register into a throwaway copy
|
|
346
361
|
# → fail if it differs from the tracked file. Writes nothing tracked; fix a
|
|
347
|
-
# red with `pnpm graph:refresh` plus a commit.
|
|
362
|
+
# red with `pnpm bkit:graph:refresh` plus a commit.
|
|
348
363
|
#
|
|
349
364
|
# By hand it reads the working tree, not the commit: uncommitted edits show
|
|
350
365
|
# as drift nobody else can reproduce. After a tsconfig `paths` change run
|
|
351
|
-
# `pnpm graph:clean` first: `update` keeps the stale module-resolution
|
|
366
|
+
# `pnpm bkit:graph:clean` first: `update` keeps the stale module-resolution
|
|
352
367
|
# cache, and the drift reported would be the cache, not the register.
|
|
353
368
|
if [ -n "$(git status --porcelain -- '*.ts' '*.tsx' 2>/dev/null)" ]; then
|
|
354
369
|
echo "[graph] WARNING: uncommitted .ts/.tsx edits — graphify reads the WORKING TREE," >&2
|
|
@@ -363,12 +378,16 @@ case "${1:-build}" in
|
|
|
363
378
|
cp "$CAPABILITIES_DOC" "$fresh"
|
|
364
379
|
capabilities "$fresh" >/dev/null
|
|
365
380
|
rm -rf "$REPORTS/.build"
|
|
366
|
-
if diff -u
|
|
381
|
+
if diff -u "$CAPABILITIES_DOC" "$fresh" \
|
|
367
382
|
--label "$CAPABILITIES_DOC (committed)" --label "rebuilt from $(git rev-parse --short HEAD)"; then
|
|
368
383
|
echo "[graph] $CAPABILITIES_DOC matches a rebuild at $(git rev-parse --short HEAD)."
|
|
369
384
|
else
|
|
370
385
|
echo "[graph] DRIFT: $CAPABILITIES_DOC is not what this tree produces (diff above)." >&2
|
|
371
|
-
echo "[graph] Fix: pnpm graph:refresh && git add $CAPABILITIES_DOC && git commit" >&2
|
|
386
|
+
echo "[graph] Fix: pnpm bkit:graph:refresh && git add $CAPABILITIES_DOC $GRAPH_EMBED_DOCS && git commit" >&2
|
|
387
|
+
exit 1
|
|
388
|
+
fi
|
|
389
|
+
if ! embed --check; then
|
|
390
|
+
echo "[graph] Fix: pnpm bkit:graph:refresh && git add $GRAPH_EMBED_DOCS && git commit" >&2
|
|
372
391
|
exit 1
|
|
373
392
|
fi
|
|
374
393
|
;;
|
|
@@ -376,6 +395,7 @@ case "${1:-build}" in
|
|
|
376
395
|
# Tracked register only: `rollup` minus its HTML views (minutes of rendering `refresh`
|
|
377
396
|
# does not need). Needs a built graph.
|
|
378
397
|
capabilities "$CAPABILITIES_DOC"
|
|
398
|
+
embed
|
|
379
399
|
;;
|
|
380
400
|
check-at)
|
|
381
401
|
# `check` in a clean checkout of one commit (default HEAD); pre-push runs it for every
|
|
@@ -383,12 +403,15 @@ case "${1:-build}" in
|
|
|
383
403
|
at_commit "${2:-HEAD}" check
|
|
384
404
|
;;
|
|
385
405
|
refresh)
|
|
386
|
-
# Rebuild the register in a clean checkout of
|
|
387
|
-
#
|
|
388
|
-
# `graph:update && graph:rollup`
|
|
389
|
-
|
|
406
|
+
# Rebuild the register in a clean checkout of the staged files → copy over the tracked
|
|
407
|
+
# file here. Staged = the commit about to be made, so running it before that commit
|
|
408
|
+
# rebuilds the new state; unstaged edits stay out, as `bkit:graph:update && bkit:graph:rollup`
|
|
409
|
+
# would not. Fixes a `check` / `check-at` red. Commit the result.
|
|
410
|
+
staged=$(git write-tree) || { echo "[graph] the index has unmerged paths — resolve them first" >&2; exit 1; }
|
|
411
|
+
at_commit HEAD --tree="$staged" build register
|
|
390
412
|
cp "$AT_DIR/$CAPABILITIES_DOC" "$CAPABILITIES_DOC"
|
|
391
|
-
|
|
413
|
+
embed
|
|
414
|
+
echo "[graph] $CAPABILITIES_DOC rebuilt from the staged files on $(git rev-parse --short HEAD) — commit it"
|
|
392
415
|
;;
|
|
393
416
|
scoped)
|
|
394
417
|
target="${2:-apps/web/src}"
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
// Enforces docs/testing.md § "Validated means executed".
|
|
12
12
|
//
|
|
13
13
|
// Design notes:
|
|
14
|
-
// - Zero imports.
|
|
15
|
-
// meta.apiVersion
|
|
16
|
-
//
|
|
14
|
+
// - Zero imports. Uses slop-scan's file.text / file.ast facts and finding shape.
|
|
15
|
+
// meta.apiVersion is hard-pinned (not imported); an engine API bump fails at load.
|
|
16
|
+
// - Test markers must start on an AST identifier, so literal fixtures are inert.
|
|
17
|
+
// Missing or invalid ASTs retain the conservative text/comment scan.
|
|
17
18
|
// - `delta` is omitted: slop-scan then matches per location, so a pure line-shift
|
|
18
19
|
// of a pre-existing hit nets to zero and only new hits register as added.
|
|
19
20
|
// - Cast patterns use `\s+` (never a literal single space), and the directive
|
|
@@ -113,6 +114,18 @@ function collectMatches(text, regex, classify) {
|
|
|
113
114
|
return out;
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
/** Identifier locations exclude literal text while retaining executable template interpolations. */
|
|
118
|
+
function identifierStarts(sourceFile) {
|
|
119
|
+
if (!sourceFile || sourceFile.parseDiagnostics?.length) return null;
|
|
120
|
+
const starts = new Set();
|
|
121
|
+
const visit = (node) => {
|
|
122
|
+
if (typeof node.escapedText === "string") starts.add(node.getStart(sourceFile));
|
|
123
|
+
node.forEachChild(visit);
|
|
124
|
+
};
|
|
125
|
+
visit(sourceFile);
|
|
126
|
+
return starts;
|
|
127
|
+
}
|
|
128
|
+
|
|
116
129
|
export default {
|
|
117
130
|
meta: {
|
|
118
131
|
name: "slop-scan-plugin-boundary",
|
|
@@ -209,7 +222,7 @@ export default {
|
|
|
209
222
|
family: "boundary",
|
|
210
223
|
severity: "medium",
|
|
211
224
|
scope: "file",
|
|
212
|
-
requires: ["file.text"],
|
|
225
|
+
requires: ["file.text", "file.ast"],
|
|
213
226
|
supports(context) {
|
|
214
227
|
return context.scope === "file" && Boolean(context.file);
|
|
215
228
|
},
|
|
@@ -220,13 +233,16 @@ export default {
|
|
|
220
233
|
return [];
|
|
221
234
|
}
|
|
222
235
|
|
|
223
|
-
//
|
|
236
|
+
// Match executable identifiers; missing or invalid ASTs retain the conservative text scan.
|
|
237
|
+
const identifiers = identifierStarts(
|
|
238
|
+
context.runtime.store.getFileFact(file.path, "file.ast"),
|
|
239
|
+
);
|
|
224
240
|
const testMatches = [
|
|
225
241
|
...collectMatches(text, TEST_SUFFIX, (_t, _end, m) => `test-${m[1]}`),
|
|
226
242
|
...collectMatches(text, TEST_GLOBAL, (_t, _end, m) =>
|
|
227
243
|
m[1] === "f" ? "test-only" : "test-skip",
|
|
228
244
|
),
|
|
229
|
-
];
|
|
245
|
+
].filter((match) => identifiers === null || identifiers.has(match.index));
|
|
230
246
|
// Blanket linter disables — NOT comment-skipped (they ARE comments).
|
|
231
247
|
const lintMatches = collectMatches(text, BLANKET_LINT, () => "lint-blanket");
|
|
232
248
|
|
|
@@ -246,7 +262,7 @@ export default {
|
|
|
246
262
|
};
|
|
247
263
|
|
|
248
264
|
const hits = [
|
|
249
|
-
...testMatches.map((m) => toHit(m,
|
|
265
|
+
...testMatches.map((m) => toHit(m, identifiers === null)),
|
|
250
266
|
...lintMatches.map((m) => toHit(m, false)),
|
|
251
267
|
].filter(Boolean);
|
|
252
268
|
if (hits.length === 0) {
|
|
@@ -81,7 +81,11 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
"files": [
|
|
84
|
+
"files": [
|
|
85
|
+
".opencode/plugin/bkit-gateguard.js",
|
|
86
|
+
".opencode/plugin/bkit-readguard.js",
|
|
87
|
+
".opencode/plugin/bkit-rules.js"
|
|
88
|
+
],
|
|
85
89
|
"rules": {
|
|
86
90
|
"defensive.empty-catch": {
|
|
87
91
|
"enabled": false
|
|
@@ -99,7 +103,10 @@
|
|
|
99
103
|
"**/.cursor/hooks/bkit-readguard.cjs",
|
|
100
104
|
"**/.codex/hooks/bkit-readguard.cjs",
|
|
101
105
|
"**/.agents/plugins/bkit/hooks/bkit-readguard.cjs",
|
|
102
|
-
"**/.opencode/plugin/bkit-readguard.js"
|
|
106
|
+
"**/.opencode/plugin/bkit-readguard.js",
|
|
107
|
+
"**/.opencode/plugin/bkit-rules.js",
|
|
108
|
+
"**/.codex/hooks/bkit-rules.cjs",
|
|
109
|
+
"**/.agents/plugins/bkit/hooks/bkit-rules.cjs"
|
|
103
110
|
],
|
|
104
111
|
"rules": {
|
|
105
112
|
"structure.duplicate-function-signatures": {
|