@cbartens/bkit 5.2.4 → 5.4.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 +27 -11
- package/.bkit/core/.agents/context.md +1 -1
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.agents/rules.md +18 -1
- package/.bkit/core/.bkit/README.md +26 -10
- package/.bkit/core/.bkit/cloud.md +40 -39
- package/.bkit/core/.bkit/comparison.md +68 -345
- package/.bkit/core/.bkit/install.md +16 -9
- package/.bkit/core/.bkit/lite.md +73 -0
- package/.bkit/core/.bkit/pipeline.md +346 -0
- package/.bkit/core/.bkit/prompts.md +90 -74
- package/.bkit/core/.bkit/providers.md +42 -23
- package/.bkit/core/.bkit/templates.md +138 -19
- package/.bkit/core/.bkit/trackers.md +49 -4
- package/.bkit/core/.bkit/workflows.md +144 -123
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +7 -4
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +8 -5
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-agents.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +4 -2
- package/.bkit/core/docs/templates/bkit-audit-config.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-cost.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-database.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +5 -5
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +26 -21
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-failures.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-gates.md +5 -2
- package/.bkit/core/docs/templates/bkit-audit-issues.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-llm.md +22 -15
- package/.bkit/core/docs/templates/bkit-audit-logs.md +10 -6
- package/.bkit/core/docs/templates/bkit-audit-models.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +7 -7
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +12 -9
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-repo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-security.md +14 -12
- package/.bkit/core/docs/templates/bkit-audit-slop.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-testing.md +10 -8
- package/.bkit/core/docs/templates/bkit-audit-usability.md +1 -1
- package/.bkit/core/docs/templates/bkit-plan.md +8 -6
- package/.bkit/core/engine/checks/after/auth.ts +9 -9
- package/.bkit/core/engine/checks/after/ci-yml.ts +14 -12
- package/.bkit/core/engine/checks/after/github.ts +29 -120
- package/.bkit/core/engine/checks/after/index.ts +2 -2
- package/.bkit/core/engine/checks/after/managed.ts +8 -28
- package/.bkit/core/engine/checks/after/tools.ts +3 -15
- package/.bkit/core/engine/checks/before/context-fetch.ts +1 -21
- package/.bkit/core/engine/checks/before/index.ts +7 -43
- package/.bkit/core/engine/checks/before/mcp.ts +17 -8
- package/.bkit/core/engine/checks/before/repo.ts +9 -12
- package/.bkit/core/engine/checks/status-holes.ts +4 -6
- package/.bkit/core/engine/checks/tips/catalogue.ts +76 -24
- package/.bkit/core/engine/checks/tips/detect.ts +45 -2
- package/.bkit/core/engine/checks/tips/index.ts +77 -26
- package/.bkit/core/engine/cli.ts +57 -27
- package/.bkit/core/engine/commands/analysis.ts +36 -26
- package/.bkit/core/engine/commands/comply.ts +42 -32
- package/.bkit/core/engine/commands/harvest.ts +12 -12
- package/.bkit/core/engine/commands/install/doctor.ts +57 -28
- package/.bkit/core/engine/commands/install/install.ts +73 -130
- package/.bkit/core/engine/commands/install/uninstall.ts +191 -33
- package/.bkit/core/engine/commands/install/upgrade.ts +49 -43
- package/.bkit/core/engine/commands/land.ts +156 -0
- package/.bkit/core/engine/commands/lib.ts +45 -18
- package/.bkit/core/engine/commands/registry.ts +2 -0
- package/.bkit/core/engine/commands/tips.ts +12 -5
- package/.bkit/core/engine/commands/workflow/branches.ts +386 -286
- package/.bkit/core/engine/commands/workflow/counters.ts +21 -12
- package/.bkit/core/engine/commands/workflow/disk.ts +556 -0
- package/.bkit/core/engine/commands/workflow/fids.ts +46 -0
- package/.bkit/core/engine/commands/workflow/issues.ts +73 -28
- package/.bkit/core/engine/commands/workflow/ledgers.ts +3 -1
- package/.bkit/core/engine/commands/workflow/locks.ts +38 -152
- package/.bkit/core/engine/commands/workflow/prs.ts +15 -4
- package/.bkit/core/engine/commands/workflow/repo.ts +2 -2
- package/.bkit/core/engine/commands/workflow/roadmap.ts +49 -53
- package/.bkit/core/engine/commands/workflow/runs.ts +8 -7
- package/.bkit/core/engine/commands/workflow/runtime.ts +3 -2
- package/.bkit/core/engine/commands/workflow/status.ts +33 -11
- package/.bkit/core/engine/commands/workflow/steps.ts +25 -15
- package/.bkit/core/engine/commands/workflow/tests.ts +17 -5
- package/.bkit/core/engine/commands/workflow/workflows.ts +436 -267
- package/.bkit/core/engine/commands/workflow/workstreams.ts +4 -2
- package/.bkit/core/engine/commands/workflow/worktrees.ts +24 -6
- package/.bkit/core/engine/install/cloud-env.ts +10 -31
- package/.bkit/core/engine/install/manifest.ts +14 -7
- package/.bkit/core/engine/install/modules/antigravity.ts +15 -26
- package/.bkit/core/engine/install/modules/claude.ts +20 -28
- package/.bkit/core/engine/install/modules/cloud.ts +5 -2
- package/.bkit/core/engine/install/modules/codex.ts +15 -29
- package/.bkit/core/engine/install/modules/core.ts +106 -70
- package/.bkit/core/engine/install/modules/cursor.ts +6 -20
- package/.bkit/core/engine/install/modules/index.ts +7 -1
- package/.bkit/core/engine/install/modules/opencode.ts +48 -70
- package/.bkit/core/engine/install/network-allowlist.ts +73 -0
- package/.bkit/core/engine/install/placeholders.ts +16 -35
- package/.bkit/core/engine/install/write.ts +59 -12
- package/.bkit/core/engine/ledgers/telemetry.ts +6 -4
- package/.bkit/core/engine/render/hosts.ts +47 -67
- package/.bkit/core/engine/render/models.ts +29 -11
- package/.bkit/core/engine/shared/branches.ts +13 -0
- package/.bkit/core/engine/shared/egress.ts +3 -3
- package/.bkit/core/engine/shared/json.ts +18 -1
- package/.bkit/core/engine/shared/package-json.ts +63 -0
- package/.bkit/core/engine/shared/package-roots.ts +0 -10
- package/.bkit/core/engine/shared/protected-paths.ts +5 -130
- package/.bkit/core/engine/shared/settings.ts +44 -0
- package/.bkit/core/engine/shared/timeouts.ts +8 -7
- package/.bkit/core/hooks/antigravity-hook.js +1 -0
- package/.bkit/core/hooks/guardrails-shell.js +186 -40
- package/.bkit/core/hooks/guardrails-tiers.js +5 -78
- package/.bkit/core/prompts/bkit-audit-generate.md +103 -7
- package/.bkit/core/prompts/bkit-build-challenge-1.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-2.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-install-skills.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-current.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +4 -4
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-verify.md +2 -2
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-debug-summary.md +3 -3
- package/.bkit/core/prompts/bkit-design-spike.md +1 -1
- package/.bkit/core/prompts/bkit-design-summary.md +2 -2
- package/.bkit/core/prompts/bkit-design-update.md +1 -1
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +1 -1
- package/.bkit/core/prompts/bkit-plan-generate.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +1 -1
- package/.bkit/core/prompts/bkit-plan-summary.md +1 -1
- package/.bkit/core/prompts/bkit-plan-update.md +1 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +1 -1
- package/.bkit/core/prompts/bkit-ship-update-docs.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-failures.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +11 -4
- package/.bkit/core/workflows/bkit-auto.md +2 -2
- package/.bkit/core/workflows/bkit-build.md +10 -10
- package/.bkit/core/workflows/bkit-debug.md +80 -44
- package/.bkit/core/workflows/bkit-design.md +22 -13
- package/.bkit/core/workflows/bkit-plan.md +33 -16
- package/.bkit/core/workflows/bkit-ship.md +87 -98
- package/.bkit/shared/.claude/bkit-cloud.md +58 -25
- package/.bkit/shared/.claude/settings.json +19 -0
- package/.bkit/shared/.cursor/mcp.json +2 -1
- package/.bkit/shared/.opencode/opencode.json +19 -1
- package/.bkit/shared/docs/deployments.md +49 -29
- package/.bkit/shared/docs/security.md +8 -6
- package/.bkit/shared/docs/testing.md +9 -5
- package/.bkit/shared/gitignore +1 -2
- package/.bkit/templates/.cursor/Dockerfile +30 -16
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +78 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +91 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +56 -0
- package/.bkit/templates/.github/renovate.json5 +91 -12
- package/.bkit/templates/.github/workflows/bkit-ci.yml +73 -55
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +3 -1
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +8 -1
- package/.bkit/templates/.github/workflows/bkit-trivy.yml +67 -0
- package/.bkit/templates/.husky/pre-commit +6 -0
- package/.bkit/templates/.husky/pre-push +15 -3
- package/.bkit/templates/.lintstagedrc.json +5 -1
- package/.bkit/templates/.oxlintrc.json +21 -0
- package/.bkit/templates/docs/capabilities.md +1 -1
- package/.bkit/templates/scripts/ci/check-capstone.mjs +176 -0
- package/.bkit/templates/scripts/ci/check-capstone.test.mjs +311 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.machine.mjs +197 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +164 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +2 -2
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +43 -20
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +33 -11
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -2
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +5 -5
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +79 -19
- package/CHANGELOG.md +98 -3
- package/README.md +252 -122
- package/dist/checks/after/auth.js +10 -11
- package/dist/checks/after/ci-yml.js +11 -14
- package/dist/checks/after/github.js +32 -125
- package/dist/checks/after/index.js +3 -2
- package/dist/checks/after/managed.js +8 -24
- package/dist/checks/after/tools.js +3 -16
- package/dist/checks/before/context-fetch.js +1 -21
- package/dist/checks/before/index.js +6 -42
- package/dist/checks/before/mcp.js +14 -9
- package/dist/checks/before/repo.js +8 -11
- package/dist/checks/status-holes.js +5 -7
- package/dist/checks/tips/catalogue.js +65 -18
- package/dist/checks/tips/detect.js +41 -2
- package/dist/checks/tips/index.js +61 -25
- package/dist/cli.js +52 -26
- package/dist/commands/analysis.js +21 -5
- package/dist/commands/comply.js +40 -31
- package/dist/commands/harvest.js +12 -13
- package/dist/commands/install/doctor.js +55 -23
- package/dist/commands/install/install.js +72 -122
- package/dist/commands/install/uninstall.js +165 -31
- package/dist/commands/install/upgrade.js +46 -39
- package/dist/commands/land.js +129 -0
- package/dist/commands/lib.js +41 -16
- package/dist/commands/registry.js +2 -0
- package/dist/commands/tips.js +10 -3
- package/dist/commands/workflow/branches.js +303 -248
- package/dist/commands/workflow/counters.js +17 -7
- package/dist/commands/workflow/disk.js +452 -0
- package/dist/commands/workflow/fids.js +39 -0
- package/dist/commands/workflow/issues.js +63 -27
- package/dist/commands/workflow/ledgers.js +3 -1
- package/dist/commands/workflow/locks.js +35 -130
- package/dist/commands/workflow/prs.js +8 -5
- package/dist/commands/workflow/repo.js +2 -2
- package/dist/commands/workflow/roadmap.js +50 -57
- package/dist/commands/workflow/runs.js +5 -5
- package/dist/commands/workflow/runtime.js +3 -2
- package/dist/commands/workflow/status.js +32 -12
- package/dist/commands/workflow/steps.js +19 -11
- package/dist/commands/workflow/tests.js +16 -3
- package/dist/commands/workflow/workflows.js +390 -249
- package/dist/commands/workflow/workstreams.js +4 -2
- package/dist/commands/workflow/worktrees.js +15 -6
- package/dist/install/cloud-env.js +10 -23
- package/dist/install/manifest.js +14 -7
- package/dist/install/modules/antigravity.js +15 -26
- package/dist/install/modules/claude.js +17 -21
- package/dist/install/modules/cloud.js +6 -2
- package/dist/install/modules/codex.js +15 -29
- package/dist/install/modules/core.js +95 -63
- package/dist/install/modules/cursor.js +6 -9
- package/dist/install/modules/index.js +6 -1
- package/dist/install/modules/opencode.js +41 -72
- package/dist/install/network-allowlist.js +62 -0
- package/dist/install/placeholders.js +16 -35
- package/dist/install/write.js +55 -15
- package/dist/ledgers/telemetry.js +5 -4
- package/dist/render/hosts.js +30 -55
- package/dist/render/models.js +20 -9
- package/dist/shared/branches.js +11 -0
- package/dist/shared/egress.js +0 -2
- package/dist/shared/json.js +14 -0
- package/dist/shared/package-json.js +61 -0
- package/dist/shared/package-roots.js +0 -8
- package/dist/shared/protected-paths.js +5 -122
- package/dist/shared/settings.js +23 -1
- package/dist/shared/timeouts.js +8 -7
- package/package.json +21 -17
- package/.bkit/core/.agents/shortcuts.md +0 -73
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
// shared/protected-paths.ts —
|
|
2
|
-
// grader (`commands/comply.ts`)
|
|
3
|
-
// (`.claude/hooks/gate-paths.generated.cjs`).
|
|
1
|
+
// shared/protected-paths.ts — the table of bkit-managed IDE mirror directories, used by the
|
|
2
|
+
// compliance grader (`commands/comply.ts`).
|
|
4
3
|
//
|
|
5
4
|
// RULES:
|
|
6
|
-
// - This file is the ONE source of truth for
|
|
7
|
-
// - The
|
|
8
|
-
//
|
|
9
|
-
// - The `.cjs` lives in bkit's own repo only; install never writes it. The
|
|
10
|
-
// generation step is a manual bkit-dev tool (`generateGatePathsCjs()`).
|
|
5
|
+
// - This file is the ONE source of truth for mirror path definitions.
|
|
6
|
+
// - The gate-config list (quality-gate config basenames) lives only in
|
|
7
|
+
// `.bkit/core/hooks/gateguard-engine.js`, which every host's `bkit-gateguard` hook inlines.
|
|
11
8
|
// - Never import install-tier logic from here (keeps grader crash-isolated from
|
|
12
9
|
// the consumer-mutating install path — see DE-34).
|
|
13
|
-
import * as fs from "node:fs";
|
|
14
|
-
import * as path from "node:path";
|
|
15
|
-
import { fileURLToPath } from "node:url";
|
|
16
|
-
import { isDogfood, TEMPLATE_COPIES_DIR } from "./package-roots.js";
|
|
17
10
|
// ---------------------------------------------------------------------------
|
|
18
11
|
// Mirror-path patterns (bkit-managed IDE mirrors)
|
|
19
12
|
// ---------------------------------------------------------------------------
|
|
@@ -41,113 +34,3 @@ export const MIRROR_PATH_PREFIXES = [
|
|
|
41
34
|
export function isMirrorPath(posixPath) {
|
|
42
35
|
return MIRROR_PATH_PREFIXES.some((prefix) => posixPath.startsWith(prefix));
|
|
43
36
|
}
|
|
44
|
-
// ---------------------------------------------------------------------------
|
|
45
|
-
// Gate-config basename patterns (quality-gate configs)
|
|
46
|
-
// ---------------------------------------------------------------------------
|
|
47
|
-
/**
|
|
48
|
-
* Basename patterns for quality-gate configs (lint / format / types / test / slop).
|
|
49
|
-
* Mirrors `GATE_CONFIG_PATTERNS` in `bkit-gateguard.cjs` — kept in sync via the
|
|
50
|
-
* generated `.cjs` drift test. Editing these configs to silence a gate is the
|
|
51
|
-
* "weaken-the-gate" anti-pattern; prefer targeted per-file opt-outs.
|
|
52
|
-
*/
|
|
53
|
-
export const GATE_CONFIG_PATTERNS = [
|
|
54
|
-
/^tsconfig(\..+)?\.json$/,
|
|
55
|
-
/^vitest\.config\.[mc]?[jt]s$/,
|
|
56
|
-
/^vite\.config\.[mc]?[jt]s$/,
|
|
57
|
-
/^eslint\.config\.[mc]?[jt]s$/,
|
|
58
|
-
/^\.eslintrc(\.(json|js|cjs|ya?ml))?$/,
|
|
59
|
-
/^\.prettierrc(\.(json|js|cjs|mjs|ya?ml|toml))?$/,
|
|
60
|
-
/^prettier\.config\.[mc]?js$/,
|
|
61
|
-
/^\.prettierignore$/,
|
|
62
|
-
/^biome\.jsonc?$/,
|
|
63
|
-
/^\.vale\.ini$/,
|
|
64
|
-
/^slop-scan\.config\.json$/,
|
|
65
|
-
/^\.lintstagedrc(\.(json|js|cjs|mjs|ya?ml))?$/,
|
|
66
|
-
/^lint-staged\.config\.[mc]?js$/,
|
|
67
|
-
];
|
|
68
|
-
/**
|
|
69
|
-
* POSIX prefix of the consumer's template copies (`shared/package-roots.ts` TEMPLATE_COPIES_DIR).
|
|
70
|
-
* Those are bkit's reference copies, refreshed on every upgrade, not the repo's gate config.
|
|
71
|
-
*/
|
|
72
|
-
export const TEMPLATE_COPIES_PREFIX = TEMPLATE_COPIES_DIR.split(path.sep).join("/") + "/";
|
|
73
|
-
/**
|
|
74
|
-
* Returns true if the file basename matches any gate-config pattern. In a consumer repo a
|
|
75
|
-
* path under `.bkit/templates/` never is one; in bkit's own repo (`dogfood`) that folder is
|
|
76
|
-
* the template source, so it stays guarded.
|
|
77
|
-
*/
|
|
78
|
-
export function isGateConfig(posixPath, dogfood = isDogfood()) {
|
|
79
|
-
const inTemplateCopies = posixPath.startsWith(TEMPLATE_COPIES_PREFIX) ||
|
|
80
|
-
posixPath.includes("/" + TEMPLATE_COPIES_PREFIX);
|
|
81
|
-
if (inTemplateCopies && !dogfood)
|
|
82
|
-
return false;
|
|
83
|
-
const base = posixPath.split("/").pop() ?? posixPath;
|
|
84
|
-
return GATE_CONFIG_PATTERNS.some((re) => re.test(base));
|
|
85
|
-
}
|
|
86
|
-
// ---------------------------------------------------------------------------
|
|
87
|
-
// Code generator — emits the committed `.cjs` from this table.
|
|
88
|
-
// Run manually by a bkit developer: `ts-node .bkit/core/engine/shared/protected-paths.ts`
|
|
89
|
-
// The output must be committed to `.claude/hooks/gate-paths.generated.cjs`.
|
|
90
|
-
// ---------------------------------------------------------------------------
|
|
91
|
-
/**
|
|
92
|
-
* Generate the content of `.claude/hooks/gate-paths.generated.cjs`.
|
|
93
|
-
* This is the single committed snapshot derived from the tables above.
|
|
94
|
-
*/
|
|
95
|
-
export function generateGatePathsCjs() {
|
|
96
|
-
const mirrorLines = MIRROR_PATH_PREFIXES.map((p) => ` ${JSON.stringify(p)},`).join("\n");
|
|
97
|
-
const gateLines = GATE_CONFIG_PATTERNS.map((re) => ` ${re.toString()},`).join("\n");
|
|
98
|
-
return `// gate-paths.generated.cjs — AUTO-GENERATED from .bkit/core/engine/shared/protected-paths.ts
|
|
99
|
-
// DO NOT EDIT BY HAND — regenerate via \`generateGatePathsCjs()\` then commit.
|
|
100
|
-
// Drift is detected by .bkit/core/engine/shared/protected-paths.test.ts (Vitest).
|
|
101
|
-
"use strict";
|
|
102
|
-
|
|
103
|
-
/** Prefixes for bkit-managed IDE mirror directories. */
|
|
104
|
-
const MIRROR_PATH_PREFIXES = [
|
|
105
|
-
${mirrorLines}
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
/** Returns true if the POSIX path is inside a bkit-managed mirror directory. */
|
|
109
|
-
function isMirrorPath(posixPath) {
|
|
110
|
-
return MIRROR_PATH_PREFIXES.some((prefix) => posixPath.startsWith(prefix));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Basename patterns for quality-gate configs. */
|
|
114
|
-
const GATE_CONFIG_PATTERNS = [
|
|
115
|
-
${gateLines}
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
/** The consumer's template copies — reference copies, not the repo's gate config. */
|
|
119
|
-
const TEMPLATE_COPIES_PREFIX = ${JSON.stringify(TEMPLATE_COPIES_PREFIX)};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Returns true if the file basename matches any gate-config pattern. Pass \`dogfood\` = true
|
|
123
|
-
* in bkit's own repo, where \`.bkit/templates/\` is the template source and stays guarded.
|
|
124
|
-
*/
|
|
125
|
-
function isGateConfig(posixPath, dogfood) {
|
|
126
|
-
const inTemplateCopies =
|
|
127
|
-
posixPath.startsWith(TEMPLATE_COPIES_PREFIX) || posixPath.includes("/" + TEMPLATE_COPIES_PREFIX);
|
|
128
|
-
if (inTemplateCopies && !dogfood) return false;
|
|
129
|
-
const base = posixPath.split("/").pop() || posixPath;
|
|
130
|
-
return GATE_CONFIG_PATTERNS.some((re) => re.test(base));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
module.exports = {
|
|
134
|
-
MIRROR_PATH_PREFIXES,
|
|
135
|
-
isMirrorPath,
|
|
136
|
-
GATE_CONFIG_PATTERNS,
|
|
137
|
-
TEMPLATE_COPIES_PREFIX,
|
|
138
|
-
isGateConfig,
|
|
139
|
-
};
|
|
140
|
-
`;
|
|
141
|
-
}
|
|
142
|
-
// CLI: `node dist/shared/protected-paths.js` prints the generated content to stdout.
|
|
143
|
-
// This file compiles to ESM, so use import.meta.url for main-module detection.
|
|
144
|
-
if (process.argv[1]) {
|
|
145
|
-
try {
|
|
146
|
-
if (fs.realpathSync(fileURLToPath(import.meta.url)) === fs.realpathSync(process.argv[1])) {
|
|
147
|
-
process.stdout.write(generateGatePathsCjs());
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
catch (_e) {
|
|
151
|
-
void _e; // realpathSync can fail on non-existent paths — skip silently
|
|
152
|
-
}
|
|
153
|
-
}
|
package/dist/shared/settings.js
CHANGED
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
//
|
|
3
3
|
// One reader, one set of defaults, so no command hard-codes a CI workflow name,
|
|
4
4
|
// a check name, or an app folder.
|
|
5
|
-
import { DEFAULT_ISSUE_TRACKER, parseIssueTracker, } from "../install/manifest.js";
|
|
5
|
+
import { DEFAULT_CLOUD_AGENTS, DEFAULT_ISSUE_TRACKER, parseCloudAgents, parseIssueTracker, } from "../install/manifest.js";
|
|
6
|
+
import { isOpencodeProvider } from "../render/models.js";
|
|
6
7
|
import { readPackageJson } from "./package-json.js";
|
|
7
8
|
export const CONFIG_DEFAULTS = {
|
|
8
9
|
ciWorkflow: "bkit-ci.yml",
|
|
9
10
|
capstoneJob: "bkit-tests-check",
|
|
10
11
|
worktreeCopy: [".env", ".env.local"],
|
|
11
12
|
worktreeInstall: true,
|
|
13
|
+
diskMinFreeGb: 40,
|
|
12
14
|
issueTracker: DEFAULT_ISSUE_TRACKER,
|
|
13
15
|
githubProject: null,
|
|
14
16
|
shipGateRequiredLanes: [],
|
|
17
|
+
opencodeProvider: null,
|
|
18
|
+
opencodeProviders: [],
|
|
19
|
+
cloudAgents: DEFAULT_CLOUD_AGENTS,
|
|
20
|
+
depUpdaterOptOut: false,
|
|
21
|
+
issueTrackerExplicit: false,
|
|
22
|
+
cloudAgentsExplicit: false,
|
|
15
23
|
};
|
|
16
24
|
const nonEmptyString = (v) => typeof v === "string" && v.trim() !== "";
|
|
17
25
|
/**
|
|
@@ -24,8 +32,11 @@ export function readBkitConfig(root) {
|
|
|
24
32
|
const bkit = ((read.ok ? read.pkg.bkit : undefined) ?? {});
|
|
25
33
|
const worktree = (bkit.worktree ?? {});
|
|
26
34
|
const copy = worktree.copy;
|
|
35
|
+
const minFreeGb = (bkit.disk ?? {}).minFreeGb;
|
|
27
36
|
const project = bkit.githubProject;
|
|
28
37
|
const lanes = bkit.shipGateRequiredLanes;
|
|
38
|
+
const provider = bkit.opencodeProvider;
|
|
39
|
+
const providers = bkit.opencodeProviders;
|
|
29
40
|
return {
|
|
30
41
|
ciWorkflow: nonEmptyString(bkit.ciWorkflow) ? bkit.ciWorkflow : CONFIG_DEFAULTS.ciWorkflow,
|
|
31
42
|
capstoneJob: nonEmptyString(bkit.capstoneJob) ? bkit.capstoneJob : CONFIG_DEFAULTS.capstoneJob,
|
|
@@ -33,6 +44,9 @@ export function readBkitConfig(root) {
|
|
|
33
44
|
? [...copy]
|
|
34
45
|
: [...CONFIG_DEFAULTS.worktreeCopy],
|
|
35
46
|
worktreeInstall: typeof worktree.install === "boolean" ? worktree.install : CONFIG_DEFAULTS.worktreeInstall,
|
|
47
|
+
diskMinFreeGb: typeof minFreeGb === "number" && Number.isFinite(minFreeGb) && minFreeGb >= 0
|
|
48
|
+
? minFreeGb
|
|
49
|
+
: CONFIG_DEFAULTS.diskMinFreeGb,
|
|
36
50
|
issueTracker: parseIssueTracker(bkit.issueTracker) ?? CONFIG_DEFAULTS.issueTracker,
|
|
37
51
|
githubProject: project === false
|
|
38
52
|
? false
|
|
@@ -40,5 +54,13 @@ export function readBkitConfig(root) {
|
|
|
40
54
|
? project
|
|
41
55
|
: null,
|
|
42
56
|
shipGateRequiredLanes: Array.isArray(lanes) ? lanes.filter(nonEmptyString) : [],
|
|
57
|
+
opencodeProvider: typeof provider === "string" && isOpencodeProvider(provider) ? provider : null,
|
|
58
|
+
opencodeProviders: Array.isArray(providers)
|
|
59
|
+
? providers.filter((v) => typeof v === "string" && isOpencodeProvider(v))
|
|
60
|
+
: [],
|
|
61
|
+
cloudAgents: parseCloudAgents(bkit.cloudAgents) ?? CONFIG_DEFAULTS.cloudAgents,
|
|
62
|
+
depUpdaterOptOut: bkit.depUpdater === "none",
|
|
63
|
+
issueTrackerExplicit: bkit.issueTracker !== undefined,
|
|
64
|
+
cloudAgentsExplicit: bkit.cloudAgents !== undefined,
|
|
43
65
|
};
|
|
44
66
|
}
|
package/dist/shared/timeouts.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// shared/timeouts.ts — bkit-owned waits, poll intervals and stale ages.
|
|
2
2
|
//
|
|
3
|
-
// One table so no command hard-codes a wait of its own
|
|
4
|
-
//
|
|
5
|
-
// equal. Units are in the name (`_S` seconds).
|
|
3
|
+
// One table so no command hard-codes a wait of its own. Units are in the name
|
|
4
|
+
// (`_S` seconds).
|
|
6
5
|
export const TIMEOUTS = {
|
|
7
6
|
/** Wall-clock seconds to wait for a CI run to appear and complete after a head move. */
|
|
8
7
|
SHIP_CI_WAIT_TIMEOUT_S: 1800,
|
|
@@ -12,10 +11,12 @@ export const TIMEOUTS = {
|
|
|
12
11
|
SHIP_PROBE_INTERVAL_S: 10,
|
|
13
12
|
/** Re-validate presence probe: how many checks (6 x 10s = the 60s a push-triggered run needs). */
|
|
14
13
|
SHIP_PROBE_ATTEMPTS: 6,
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/** Seconds
|
|
18
|
-
|
|
14
|
+
/** Every dev landing: tries at the dev push (dev moved underneath); design / plan close: at the PR merge too. */
|
|
15
|
+
LAND_ATTEMPTS: 10,
|
|
16
|
+
/** Seconds before the first retry of a landing; doubles each retry up to LAND_BACKOFF_CAP_S. */
|
|
17
|
+
LAND_BACKOFF_START_S: 2,
|
|
18
|
+
/** Longest single wait between landing retries, in seconds. */
|
|
19
|
+
LAND_BACKOFF_CAP_S: 30,
|
|
19
20
|
/** Seconds a registry answer for the newest published bkit is reused before asking again. */
|
|
20
21
|
BKIT_LATEST_CACHE_S: 86400,
|
|
21
22
|
/** Seconds a failed registry lookup is remembered, so an offline run does not wait on every call. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cbartens/bkit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "From vibe coding to production code. A senior engineering team's process, ready-made: AI agents design, plan, build, review, fix and ship your features on Claude Code, Cursor, Codex, Google Antigravity and opencode.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"CHANGELOG.md"
|
|
41
41
|
],
|
|
42
42
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
43
|
+
"node": ">=24"
|
|
44
44
|
},
|
|
45
|
-
"packageManager": "pnpm@10.34.
|
|
45
|
+
"packageManager": "pnpm@10.34.6",
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
|
48
48
|
"url": "https://github.com/cbartens/bkit.git"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"bkit": "node dist/cli.js",
|
|
64
64
|
"typecheck": "tsc --noEmit && pnpm bkit:typecheck:tests",
|
|
65
65
|
"bkit:typecheck:tests": "tsc -p tsconfig.test.json",
|
|
66
|
-
"lint": "
|
|
66
|
+
"lint": "oxlint -c .oxlintrc.json --type-aware --tsconfig tsconfig.test.json --deny-warnings .bkit/core/engine",
|
|
67
67
|
"format": "prettier --write .",
|
|
68
68
|
"format:check": "prettier --check .",
|
|
69
69
|
"format:tables": "node scripts/prettier/bkit-insert-ignore.mjs .agents docs README.md .bkit/shared .bkit/core/.agents .bkit/core/docs",
|
|
@@ -73,14 +73,15 @@
|
|
|
73
73
|
"slop:delta": "bkit ci slop",
|
|
74
74
|
"bkit:lint:workflows": "bash -c 'if command -v actionlint >/dev/null 2>&1; then actionlint; else echo \"[bkit] actionlint missing — skipping workflow lint (install actionlint to enable)\"; fi'",
|
|
75
75
|
"test": "vitest run",
|
|
76
|
-
"test:coverage:unit": "vitest run --coverage --coverage.reportsDirectory=coverage/unit --exclude '**/*.integration.test.ts' --coverage.include='.bkit/core/engine/{cli,commands/analysis,install/cloud-env,commands/comply,commands/harvest,commands/install/install,commands/launch,install/manifest,install/managed-block,shared/package-roots,shared/protected-paths,checks/after/index,checks/after/auth,checks/after/ci-yml,checks/after/github,checks/after/managed,checks/after/tools,checks/after/suppression,checks/before/index,checks/before/context-fetch,checks/before/env,checks/before/files,checks/before/mcp,checks/before/repo,checks/before/version,ledgers/status,ledgers/telemetry,install/write,install/placeholders,install/template-copies,render/trackers,render/hosts,render/models,commands/install/uninstall,commands/install/upgrade,install/version-file,tools/wording}.ts' --coverage.include='.bkit/core/engine/commands/**/*.ts' --coverage.include='.bkit/core/engine/shared/{settings,package-json,package-manager,timeouts}.ts'
|
|
77
|
-
"bkit:test:bats": "
|
|
76
|
+
"test:coverage:unit": "vitest run -c vitest.unit.config.ts --coverage --coverage.reportsDirectory=coverage/unit --exclude '**/*.integration.test.ts' --coverage.include='.bkit/core/engine/{cli,commands/analysis,install/cloud-env,commands/comply,commands/harvest,commands/install/install,commands/launch,install/manifest,install/managed-block,shared/package-roots,shared/protected-paths,checks/after/index,checks/after/auth,checks/after/ci-yml,checks/after/github,checks/after/managed,checks/after/tools,checks/after/suppression,checks/before/index,checks/before/context-fetch,checks/before/env,checks/before/files,checks/before/mcp,checks/before/repo,checks/before/version,ledgers/status,ledgers/telemetry,install/write,install/placeholders,install/template-copies,render/trackers,render/hosts,render/models,commands/install/uninstall,commands/install/upgrade,install/version-file,tools/wording}.ts' --coverage.include='.bkit/core/engine/commands/**/*.ts' --coverage.include='.bkit/core/engine/shared/{settings,package-json,package-manager,timeouts}.ts'",
|
|
77
|
+
"bkit:test:bats": "pnpm exec bats tests/*.bats",
|
|
78
78
|
"build": "tsc && chmod +x dist/cli.js",
|
|
79
79
|
"bkit:check:dist": "rm -rf dist && tsc && chmod +x dist/cli.js && git diff --exit-code dist/ || (echo '[bkit] dist/ is stale — run pnpm build and commit the result' && exit 1)",
|
|
80
80
|
"graph": "bash scripts/graphify/bkit-graphify.sh build",
|
|
81
81
|
"graph:check": "bash scripts/graphify/bkit-graphify.sh check",
|
|
82
82
|
"graph:clean": "bash scripts/graphify/bkit-graphify.sh clean",
|
|
83
83
|
"graph:graphml": "bash scripts/graphify/bkit-graphify.sh graphml",
|
|
84
|
+
"graph:refresh": "bash scripts/graphify/bkit-graphify.sh refresh",
|
|
84
85
|
"graph:rollup": "bash scripts/graphify/bkit-graphify.sh rollup",
|
|
85
86
|
"graph:scoped": "bash scripts/graphify/bkit-graphify.sh scoped",
|
|
86
87
|
"graph:tree": "bash scripts/graphify/bkit-graphify.sh tree",
|
|
@@ -90,18 +91,21 @@
|
|
|
90
91
|
"prepare": "husky"
|
|
91
92
|
},
|
|
92
93
|
"devDependencies": {
|
|
93
|
-
"@types/node": "
|
|
94
|
-
"@vitest/coverage-v8": "
|
|
94
|
+
"@types/node": "24.19.2",
|
|
95
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
96
|
+
"bats": "1.13.0",
|
|
95
97
|
"bkit": "link:.",
|
|
96
|
-
"husky": "
|
|
97
|
-
"lint-staged": "
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
98
|
+
"husky": "9.1.7",
|
|
99
|
+
"lint-staged": "17.6.0",
|
|
100
|
+
"oxlint": "1.87.0",
|
|
101
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
102
|
+
"prettier": "3.9.10",
|
|
103
|
+
"slop-scan": "0.3.0",
|
|
104
|
+
"tsx": "4.23.15",
|
|
105
|
+
"typescript": "7.0.2",
|
|
106
|
+
"vite": "6.4.4",
|
|
107
|
+
"vitest": "5.0.3",
|
|
108
|
+
"yaml": "2.9.1"
|
|
105
109
|
},
|
|
106
110
|
"pnpm": {
|
|
107
111
|
"overrides": {
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<!-- bkit:start -->
|
|
2
|
-
|
|
3
|
-
{{BKIT_MANAGED_MARKER}}
|
|
4
|
-
|
|
5
|
-
# Shortcuts
|
|
6
|
-
|
|
7
|
-
> [!CAUTION]
|
|
8
|
-
> **Purpose:** Opt-in prompts that run a phase's steps and subagents without the full workflow's ceremony. The full workflow is the default.
|
|
9
|
-
>
|
|
10
|
-
> **Rules:**
|
|
11
|
-
>
|
|
12
|
-
> - All `.agents/rules.md` rules still apply. Fewer steps, never fewer rules.
|
|
13
|
-
> - The named reference is **inspiration, not a command file**: read it for its steps and subagents, take what fits, drop the rest.
|
|
14
|
-
> - Assume the right repo and branch are already checked out; do not re-detect them.
|
|
15
|
-
> - Local project shortcuts → `Project Shortcuts` below the bkit-managed block.
|
|
16
|
-
|
|
17
|
-
## When to use
|
|
18
|
-
|
|
19
|
-
Full workflow when in doubt; a lite flow only when it is clearly enough. These are opt-in at your own judgement — they skip the gates, worktree isolation, PR, CI and audit trail, so they suit users who know what they are trading away. Add whichever full-phase step or subagent the work needs; go full when the cost of being wrong is high — irreversible changes (releases, data), blast radius past one small change, security / secrets / PII.
|
|
20
|
-
|
|
21
|
-
NEVER shortcut: schema / migrations, public API, dependencies, secrets / config, auth / security, large multi-file refactors.
|
|
22
|
-
|
|
23
|
-
## Contract
|
|
24
|
-
|
|
25
|
-
Read `.agents/rules.md`. Work on the current branch; commit as you go; push only when shipping or when asked. Tracker-wired: issue → **In progress** at start, **In review** at end, one short comment per step. No tracker: skip the tracker lines.
|
|
26
|
-
|
|
27
|
-
## Paste
|
|
28
|
-
|
|
29
|
-
Copy one block, then insert the issue or instructions at the bracketed line.
|
|
30
|
-
|
|
31
|
-
### design
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
Handle the issue below as a design. Read `.bkit/workflows.md` § Per-Phase Workflows and `.bkit/prompts.md` as inspiration only — use the steps and subagents that fit, skip the rest. Follow `.agents/shortcuts.md` § Contract.
|
|
35
|
-
|
|
36
|
-
[INSERT ISSUE ID / INSTRUCTIONS]
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### plan
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
Handle the issue below as a plan. Read `.bkit/workflows.md` § Per-Phase Workflows and `.bkit/prompts.md` as inspiration only — use the steps and subagents that fit, skip the rest. Follow `.agents/shortcuts.md` § Contract.
|
|
43
|
-
|
|
44
|
-
[INSERT ISSUE ID / INSTRUCTIONS]
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### build
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
Handle the issue below as a build. Read `.bkit/workflows.md` § Per-Phase Workflows and `.bkit/prompts.md` as inspiration only — use the steps and subagents that fit, skip the rest. Follow `.agents/shortcuts.md` § Contract.
|
|
51
|
-
|
|
52
|
-
[INSERT ISSUE ID / INSTRUCTIONS]
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### debug
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
Handle the issue below as a debug. Read `.bkit/workflows.md` § Per-Phase Workflows and `.bkit/prompts.md` as inspiration only — use the steps and subagents that fit, skip the rest. Follow `.agents/shortcuts.md` § Contract.
|
|
59
|
-
|
|
60
|
-
[INSERT ISSUE ID / INSTRUCTIONS]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### ship
|
|
64
|
-
|
|
65
|
-
```text
|
|
66
|
-
Handle the issue below as a ship. Read `.bkit/workflows.md` § Per-Phase Workflows and `.bkit/prompts.md` as inspiration only — use the steps and subagents that fit, skip the rest. Follow `.agents/shortcuts.md` § Contract.
|
|
67
|
-
|
|
68
|
-
[INSERT ISSUE ID / INSTRUCTIONS]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
<!-- bkit:end -->
|
|
72
|
-
|
|
73
|
-
## Project Shortcuts
|