@cbartens/bkit 5.4.0 → 5.5.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.
Files changed (111) hide show
  1. package/.bkit/README.md +18 -6
  2. package/.bkit/core/.agents/rules.md +7 -8
  3. package/.bkit/core/.bkit/README.md +17 -5
  4. package/.bkit/core/.bkit/cloud.md +44 -13
  5. package/.bkit/core/.bkit/comparison.md +2 -2
  6. package/.bkit/core/.bkit/install.md +16 -14
  7. package/.bkit/core/.bkit/pipeline.md +3 -1
  8. package/.bkit/core/.bkit/prompts.md +12 -9
  9. package/.bkit/core/.bkit/providers.md +6 -6
  10. package/.bkit/core/.bkit/templates.md +12 -6
  11. package/.bkit/core/.bkit/trackers.md +89 -34
  12. package/.bkit/core/.bkit/workflows.md +42 -38
  13. package/.bkit/core/AGENTS.md +2 -2
  14. package/.bkit/core/docs/templates/bkit-audit-app-performance.md +1 -1
  15. package/.bkit/core/docs/templates/bkit-audit-issues.md +22 -6
  16. package/.bkit/core/engine/checks/after/auth.ts +88 -45
  17. package/.bkit/core/engine/checks/after/github.ts +18 -5
  18. package/.bkit/core/engine/checks/after/index.ts +1 -1
  19. package/.bkit/core/engine/checks/after/tools.ts +1 -1
  20. package/.bkit/core/engine/checks/before/env.ts +28 -18
  21. package/.bkit/core/engine/checks/before/mcp.ts +4 -2
  22. package/.bkit/core/engine/checks/tips/catalogue.ts +15 -2
  23. package/.bkit/core/engine/cli.ts +7 -5
  24. package/.bkit/core/engine/commands/ci/ci.ts +107 -0
  25. package/.bkit/core/engine/commands/install/uninstall.ts +46 -0
  26. package/.bkit/core/engine/commands/workflow/fids.ts +23 -15
  27. package/.bkit/core/engine/commands/workflow/issues.ts +35 -16
  28. package/.bkit/core/engine/commands/workflow/ledgers.ts +28 -11
  29. package/.bkit/core/engine/commands/workflow/prs.ts +3 -1
  30. package/.bkit/core/engine/commands/workflow/repo.ts +6 -0
  31. package/.bkit/core/engine/commands/workflow/roadmap.ts +5 -1
  32. package/.bkit/core/engine/commands/workflow/steps.ts +2 -2
  33. package/.bkit/core/engine/commands/workflow/workflows.ts +9 -4
  34. package/.bkit/core/engine/install/manifest.ts +31 -10
  35. package/.bkit/core/engine/install/modules/cloud.ts +3 -1
  36. package/.bkit/core/engine/install/modules/core.ts +82 -4
  37. package/.bkit/core/engine/install/modules/opencode.ts +5 -0
  38. package/.bkit/core/engine/install/write.ts +37 -1
  39. package/.bkit/core/engine/render/trackers.ts +35 -23
  40. package/.bkit/core/engine/shared/egress.ts +6 -0
  41. package/.bkit/core/engine/shared/settings.ts +88 -1
  42. package/.bkit/core/hooks/guardrails-tiers.js +1 -1
  43. package/.bkit/core/prompts/bkit-audit-generate.md +42 -12
  44. package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
  45. package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
  46. package/.bkit/core/prompts/bkit-build-plan-execute.md +1 -1
  47. package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
  48. package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
  49. package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +1 -1
  50. package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
  51. package/.bkit/core/prompts/bkit-design-generate.md +2 -1
  52. package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
  53. package/.bkit/core/prompts/bkit-utility-update-decisions.md +3 -1
  54. package/.bkit/core/prompts/bkit-utility-update-deferrals.md +3 -1
  55. package/.bkit/core/prompts/bkit-utility-update-documentation.md +11 -1
  56. package/.bkit/core/prompts/bkit-utility-update-failures.md +3 -1
  57. package/.bkit/core/prompts/bkit-utility-update-knowledge.md +3 -1
  58. package/.bkit/core/prompts/bkit-utility-update-roadmap.md +9 -2
  59. package/.bkit/core/prompts/bkit-utility-update-tracker.md +159 -0
  60. package/.bkit/core/workflows/bkit-auto.md +19 -6
  61. package/.bkit/core/workflows/bkit-build.md +59 -17
  62. package/.bkit/core/workflows/bkit-debug.md +64 -20
  63. package/.bkit/core/workflows/bkit-design.md +83 -28
  64. package/.bkit/core/workflows/bkit-plan.md +61 -20
  65. package/.bkit/core/workflows/bkit-ship.md +48 -18
  66. package/.bkit/shared/.bkit/.env.example +8 -0
  67. package/.bkit/shared/.claude/settings.json +3 -1
  68. package/.bkit/shared/.cursor/bkit-cloud.md +2 -2
  69. package/.bkit/shared/.cursor/mcp.json +11 -4
  70. package/.bkit/shared/.mcp.json +11 -4
  71. package/.bkit/shared/.opencode/opencode.json +2 -0
  72. package/.bkit/shared/docs/deployments.md +15 -4
  73. package/.bkit/shared/docs/security.md +1 -1
  74. package/.bkit/shared/docs/testing.md +3 -3
  75. package/.bkit/templates/.github/renovate.json5 +1 -1
  76. package/.bkit/templates/.github/workflows/bkit-ci.yml +22 -54
  77. package/.bkit/templates/.github/workflows/bkit-cloud.yml +40 -12
  78. package/.bkit/templates/.husky/pre-commit +4 -4
  79. package/.bkit/templates/.husky/pre-push +62 -12
  80. package/.bkit/templates/scripts/ci/lanes/check-tree-cache.mjs +138 -0
  81. package/.bkit/templates/scripts/ci/lanes/check-tree-cache.test.mjs +181 -0
  82. package/.bkit/templates/scripts/graphify/bkit-graphify.sh +1 -1
  83. package/CHANGELOG.md +37 -1
  84. package/README.md +7 -6
  85. package/dist/checks/after/auth.js +81 -45
  86. package/dist/checks/after/github.js +17 -5
  87. package/dist/checks/after/index.js +1 -1
  88. package/dist/checks/after/tools.js +1 -1
  89. package/dist/checks/before/env.js +24 -17
  90. package/dist/checks/before/mcp.js +4 -2
  91. package/dist/checks/tips/catalogue.js +14 -2
  92. package/dist/cli.js +7 -5
  93. package/dist/commands/ci/ci.js +100 -0
  94. package/dist/commands/install/uninstall.js +42 -0
  95. package/dist/commands/workflow/fids.js +22 -15
  96. package/dist/commands/workflow/issues.js +28 -15
  97. package/dist/commands/workflow/ledgers.js +26 -11
  98. package/dist/commands/workflow/prs.js +3 -1
  99. package/dist/commands/workflow/repo.js +5 -0
  100. package/dist/commands/workflow/roadmap.js +3 -1
  101. package/dist/commands/workflow/steps.js +2 -2
  102. package/dist/commands/workflow/workflows.js +9 -4
  103. package/dist/install/manifest.js +30 -10
  104. package/dist/install/modules/cloud.js +3 -1
  105. package/dist/install/modules/core.js +82 -5
  106. package/dist/install/modules/opencode.js +6 -0
  107. package/dist/install/write.js +26 -2
  108. package/dist/render/trackers.js +34 -20
  109. package/dist/shared/egress.js +6 -0
  110. package/dist/shared/settings.js +39 -0
  111. package/package.json +11 -2
@@ -7,10 +7,11 @@ name: bkit-cloud
7
7
  # (via the opencode CLI `run` subcommand) — run the same `/bkit-auto <phase> <arg>`
8
8
  # orchestrator against the committed `.claude/` / `.opencode/` config respectively.
9
9
  #
10
- # RUNTIME GATING — secret-presence auto-detect (in the context job):
11
- # - ANTHROPIC_API_KEY set → claude job runs.
10
+ # RUNTIME GATING — credential-presence auto-detect (in the context job):
11
+ # - ANTHROPIC_API_KEY secret set, OR both ANTHROPIC_FEDERATION_RULE_ID and
12
+ # ANTHROPIC_ORGANIZATION_ID repo variables set → claude job runs.
12
13
  # - OPENCODE_PROVIDER_KEY set → opencode job runs.
13
- # Both can run on one event (additive); a missing secret skips that job (zero
14
+ # Both can run on one event (additive); a missing credential skips that job (zero
14
15
  # billable runner minutes).
15
16
  #
16
17
  # Trigger surfaces:
@@ -21,8 +22,13 @@ name: bkit-cloud
21
22
  # - workflow_dispatch: pick ANY phase (ship|debug|design|plan|build) for an issue.
22
23
  # design/plan/build have no tracker-event trigger; they run only via dispatch.
23
24
  #
24
- # Required secrets (claude job): ANTHROPIC_API_KEY + Claude GitHub App (one-time
25
- # `/install-github-app` — grants `id-token: write` OIDC for claude-code-action@v1).
25
+ # Required credentials (claude job): Claude GitHub App (one-time `/install-github-app`;
26
+ # claude-code-action@v1 authenticates as the App via `id-token: write` OIDC) + ONE of:
27
+ # - ANTHROPIC_API_KEY repo secret, or
28
+ # - workload identity federation (keyless): ANTHROPIC_FEDERATION_RULE_ID +
29
+ # ANTHROPIC_ORGANIZATION_ID repo variables (+ optional ANTHROPIC_SERVICE_ACCOUNT_ID /
30
+ # ANTHROPIC_WORKSPACE_ID) from a Claude Console federation rule. A set
31
+ # ANTHROPIC_API_KEY secret wins over federation — delete it when switching.
26
32
  # Required secrets (opencode job): OPENCODE_PROVIDER_KEY (any provider key the
27
33
  # committed .opencode/opencode.json references; fan-out maps it to known env var names).
28
34
  # Required tracker label on the issue: `bkit:auto` (opt-in) for the CI-driven path.
@@ -115,20 +121,28 @@ jobs:
115
121
  phase: ${{ steps.ctx.outputs.phase }}
116
122
  arg: ${{ steps.ctx.outputs.arg }}
117
123
  steps:
118
- # A runner job whose secret is missing is a no-op; with neither secret set, nothing
119
- # below runs (no counter row, no checkout).
120
- - name: Check runner secrets
124
+ # A runner job whose credential is missing is a no-op; with neither job enabled,
125
+ # nothing below runs (no counter row, no checkout).
126
+ - name: Check runner credentials
121
127
  id: gate
122
128
  env:
123
129
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
130
+ ANTHROPIC_FEDERATION_RULE_ID: ${{ vars.ANTHROPIC_FEDERATION_RULE_ID }}
131
+ ANTHROPIC_ORGANIZATION_ID: ${{ vars.ANTHROPIC_ORGANIZATION_ID }}
124
132
  OPENCODE_PROVIDER_KEY: ${{ secrets.OPENCODE_PROVIDER_KEY }}
125
133
  run: |
126
134
  claude=false
127
135
  opencode=false
128
136
  if [ -n "$ANTHROPIC_API_KEY" ]; then
129
137
  claude=true
138
+ elif [ -n "$ANTHROPIC_FEDERATION_RULE_ID" ] && [ -n "$ANTHROPIC_ORGANIZATION_ID" ]; then
139
+ claude=true
140
+ elif [ -n "$ANTHROPIC_FEDERATION_RULE_ID" ]; then
141
+ echo "::notice::ANTHROPIC_ORGANIZATION_ID repo variable not set — federation needs it alongside ANTHROPIC_FEDERATION_RULE_ID; claude job no-op."
142
+ elif [ -n "$ANTHROPIC_ORGANIZATION_ID" ]; then
143
+ echo "::notice::ANTHROPIC_FEDERATION_RULE_ID repo variable not set — federation needs it alongside ANTHROPIC_ORGANIZATION_ID; claude job no-op."
130
144
  else
131
- echo "::notice::ANTHROPIC_API_KEY not set — claude job no-op."
145
+ echo "::notice::Neither the ANTHROPIC_API_KEY secret nor the ANTHROPIC_FEDERATION_RULE_ID + ANTHROPIC_ORGANIZATION_ID repo variables are set — claude job no-op."
132
146
  fi
133
147
  if [ -n "$OPENCODE_PROVIDER_KEY" ]; then
134
148
  opencode=true
@@ -176,6 +190,13 @@ jobs:
176
190
  HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
177
191
  run: |
178
192
  set -euo pipefail
193
+ # Cloud runs serve the GitHub tracker only: Linear cloud runs start from Cursor's
194
+ # Linear integration, and Jira runs locally only. Unset tracker → continue.
195
+ TRACKER=$(sed -n 's/.*"issueTracker"[[:space:]]*:[[:space:]]*"\([a-z]*\)".*/\1/p' package.json 2>/dev/null | head -1 || true)
196
+ if [ -n "$TRACKER" ] && [ "$TRACKER" != "github" ]; then
197
+ echo "::notice::bkit.issueTracker is '$TRACKER' — bkit-cloud.yml serves the GitHub tracker only; no-op exit."
198
+ echo "skip=true" >> "$GITHUB_OUTPUT"; exit 0
199
+ fi
179
200
  if [ "$EVENT" = "workflow_dispatch" ]; then
180
201
  # Dispatched: phase + issue come straight from inputs.
181
202
  PHASE="$IN_PHASE"
@@ -440,8 +461,8 @@ jobs:
440
461
  } >> "$GITHUB_OUTPUT"
441
462
 
442
463
  # ---------------------------------------------------------------------------
443
- # claude job — dispatch via claude-code-action@v1 (ANTHROPIC_API_KEY required).
444
- # Runs only when the context job found ANTHROPIC_API_KEY set and resolved a phase.
464
+ # claude job — dispatch via claude-code-action@v1 (ANTHROPIC_API_KEY or federation).
465
+ # Runs only when the context job found a claude credential and resolved a phase.
445
466
  # OIDC auth via Claude GitHub App (id-token: write); requires one-time
446
467
  # `/install-github-app` in the consumer repo.
447
468
  # ---------------------------------------------------------------------------
@@ -456,7 +477,7 @@ jobs:
456
477
  issues: write
457
478
  actions: read
458
479
  # id-token: write — required for claude-code-action@v1 to authenticate as the
459
- # Claude GitHub App via OIDC (getOidcToken).
480
+ # Claude GitHub App via OIDC (getOidcToken), and for the federation token exchange.
460
481
  id-token: write
461
482
  steps:
462
483
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -501,6 +522,13 @@ jobs:
501
522
  # orchestrator. GitHub MCP surface is always available; this workflow is
502
523
  # GitHub-tracker only (cloud=claude requires tracker=github).
503
524
  claude_args: "--allowed-tools=Bash,Edit,Write,Read,Grep,Glob,WebFetch,Skill,mcp__github__*"
525
+ # Workload identity federation: the action exchanges this job's GitHub OIDC token
526
+ # for a short-lived Claude API token. Unset variables pass empty; a set
527
+ # ANTHROPIC_API_KEY secret takes precedence.
528
+ anthropic_federation_rule_id: ${{ vars.ANTHROPIC_FEDERATION_RULE_ID }}
529
+ anthropic_organization_id: ${{ vars.ANTHROPIC_ORGANIZATION_ID }}
530
+ anthropic_service_account_id: ${{ vars.ANTHROPIC_SERVICE_ACCOUNT_ID }}
531
+ anthropic_workspace_id: ${{ vars.ANTHROPIC_WORKSPACE_ID }}
504
532
  env:
505
533
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
506
534
  GH_TOKEN: ${{ github.token }}
@@ -3,10 +3,10 @@
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) and the enforcing slop gate (slop:delta) are in
7
- # pre-push; integration/E2E/@live run ONLY in CI (bkit-tests / bkit-tests-live, enforced
8
- # by bkit-tests-check) — see bkit-ci.yml § FULL CI SCAFFOLD REFERENCE. Rule: anything needing
9
- # a deployed URL, a DB, or >a few seconds belongs in a CI tier, not a hook. (lint:slop is `slop-scan scan` — report-only, never
6
+ # (typecheck/unit/format:check/prose), the enforcing slop gate (slop:delta) and the
7
+ # integration tier are in pre-push; E2E/@live run ONLY in CI (bkit-tests / bkit-tests-live,
8
+ # enforced by bkit-tests-check) — see bkit-ci.yml § FULL CI SCAFFOLD REFERENCE. Rule: nothing
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
10
  # fails; the gate that fails on NEW findings is `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
@@ -2,16 +2,21 @@
2
2
  # bkit pre-push. Example. Copy into the repo and own it.
3
3
  # bkit install does not write this file and does not overwrite a copy.
4
4
  #
5
- # FAST deterministic gates only: the `bkit:gate` script (typecheck + unit tests +
6
- # format:check + prose + the enforcing slop gate) plus the bkit drift gate (no
7
- # Docker/network) — the full deterministic mirror of CI. Heavier tiers run in CI, NOT
8
- # here: integration + E2E -> bkit-tests (gated on web_affected / run_e2e); @live ->
9
- # bkit-tests-live; "did the planned tiers run?" -> bkit-tests-check. See bkit-ci.yml § FULL
10
- # CI SCAFFOLD REFERENCE — keep slow/network/deploy checks OUT. Turbo monorepos: scope
11
- # tests inside the `bkit:gate*` scripts with
12
- # `--filter="...[origin/<default>]"`; never add integration/E2E/@live.
5
+ # Deterministic gates: `bkit:gate:static-unit-integration` when package.json declares it,
6
+ # else `bkit:gate:static-unit` (typecheck + lint + format:check + prose + the enforcing slop
7
+ # gate + unit tests, then the integration tier), plus the bkit drift gate. Integration runs
8
+ # here, never on commit: it may start local services (a database in Docker), never reach a
9
+ # deployed one. E2E -> bkit-tests (gated on web_affected / run_e2e); @live -> bkit-tests-live;
10
+ # "did the planned tiers run?" -> bkit-tests-check. See bkit-ci.yml § FULL CI SCAFFOLD
11
+ # REFERENCE — keep deployed-URL/network/deploy checks OUT. Turbo monorepos: scope tests inside
12
+ # the `bkit:gate*` scripts with `--filter="...[origin/<default>]"`; never add E2E/@live.
13
13
  #
14
- # Revert-branch bypass: on a revert branch the suite is skipped; lint + typecheck still run.
14
+ # Revert-branch bypass: on a revert branch the unit and integration tiers are skipped; lint +
15
+ # typecheck still run.
16
+ #
17
+ # Min push: every changed file matches `bkit.minPushPaths` (package.json; default plan logs,
18
+ # ledgers) → `bkit:gate:min` replaces the full gate; MIN_PUSH=1 for repo extras. Files decide,
19
+ # never `[skip ci]`.
15
20
  set -e
16
21
 
17
22
  # ── delete-only push: nothing leaves this machine, so there is nothing to gate ──
@@ -21,10 +26,13 @@ set -e
21
26
  # mixing a delete with a real update still gates, and so does an empty ref list. Reading
22
27
  # stdin here is safe: every later command redirects from /dev/null. `[ -t 0 ]` keeps a
23
28
  # hand-run hook from hanging. The loop also sets PUSH_DEV_SHA (commit pushed to dev) for
24
- # repo extras that gate only dev pushes (e.g. scripts/graphify/bkit-graph-pre-push.sh).
29
+ # repo extras that gate only dev pushes (e.g. scripts/graphify/bkit-graph-pre-push.sh),
30
+ # PUSH_SHAS (every pushed commit) and PUSH_SHARED_SHAS (those pushed to dev / main).
25
31
  PUSH_SAW_REF=0
26
32
  PUSH_HAS_COMMITS=0
27
33
  PUSH_DEV_SHA=""
34
+ PUSH_SHAS=""
35
+ PUSH_SHARED_SHAS=""
28
36
  if [ ! -t 0 ]; then
29
37
  while read -r _push_local_ref push_local_sha push_remote_ref _push_remote_sha; do
30
38
  [ -n "$push_local_sha" ] || continue
@@ -32,7 +40,11 @@ if [ ! -t 0 ]; then
32
40
  case "$push_local_sha" in
33
41
  *[!0]*)
34
42
  PUSH_HAS_COMMITS=1
43
+ PUSH_SHAS="$PUSH_SHAS $push_local_sha"
35
44
  [ "$push_remote_ref" = "refs/heads/dev" ] && PUSH_DEV_SHA="$push_local_sha"
45
+ case "$push_remote_ref" in
46
+ refs/heads/dev|refs/heads/main) PUSH_SHARED_SHAS="$PUSH_SHARED_SHAS $push_local_sha" ;;
47
+ esac
36
48
  ;;
37
49
  esac
38
50
  done
@@ -78,6 +90,34 @@ case "$BRANCH" in
78
90
  ;;
79
91
  esac
80
92
 
93
+ # Min push: `bkit ci min-push` exits 0 only when every file changed since each pushed
94
+ # commit left origin/dev (else origin/main) matches `bkit.minPushPaths`. Anything else
95
+ # (code, no files, unreadable range, no refs) → MIN_PUSH=0, full gate: a skip on no
96
+ # evidence reads as a pass.
97
+ MIN_PUSH=0
98
+ if [ -n "$PUSH_SHAS" ]; then
99
+ MIN_PUSH_REFS=""
100
+ for push_sha in $PUSH_SHAS; do MIN_PUSH_REFS="$MIN_PUSH_REFS --ref=$push_sha"; done
101
+ # shellcheck disable=SC2086 # hex SHAs only: word-splitting is the point
102
+ if pnpm -s bkit ci min-push $MIN_PUSH_REFS < /dev/null > /dev/null; then
103
+ MIN_PUSH=1
104
+ fi
105
+ fi
106
+
107
+ # CI-suppressor guard on dev / main: a skip-CI token on a push's LAST commit skips CI for the
108
+ # whole push, so code would land untested. Blocked unless a min push. Feature branches keep
109
+ # the open-PR guard above (workflows push `[skip ci]` code heads mid-run).
110
+ for push_sha in $PUSH_SHARED_SHAS; do
111
+ if pnpm -s bkit ci skip-token --ref="$push_sha" < /dev/null > /dev/null; then
112
+ if [ "$MIN_PUSH" != "1" ] &&
113
+ ! pnpm -s bkit ci min-push --ref="$push_sha" < /dev/null > /dev/null; then
114
+ echo "[pre-push] BLOCKED: $push_sha carries a CI-suppressing token and changes files outside bkit.minPushPaths — that code would land on dev / main with no CI run." >&2
115
+ echo "[pre-push] Add a clean trigger commit and re-push: git commit --allow-empty -m \"chore: trigger CI\" && git push" >&2
116
+ exit 1
117
+ fi
118
+ fi
119
+ done
120
+
81
121
  # tmp/ prune — deletes files under tmp/ untouched for 7+ days. Not a gate: a failed
82
122
  # prune warns and the push goes on. Skipped until scripts/cleanup/ holds the script.
83
123
  if [ -f scripts/cleanup/bkit-tmp-prune.mjs ]; then
@@ -88,10 +128,16 @@ fi
88
128
  # WHAT each gate runs lives in package.json, not here — the same `bkit:gate*` scripts
89
129
  # the bkit agent workflows and prompts dispatch through. Edit the scripts, not this
90
130
  # hook. Repo-specific extras go BELOW this block.
91
- # Revert path drops the suite only: prose and slop:delta still run.
92
- if [ "$IS_REVERT" = "1" ]; then
131
+ # Min push: `bkit:gate:min` only. Revert path drops the suite only: prose
132
+ # and slop:delta still run. Otherwise the deepest push gate package.json declares.
133
+ if [ "$MIN_PUSH" = "1" ]; then
134
+ echo "[pre-push] min push — bkit:gate:min instead of the full gate" >&2
135
+ pnpm bkit:gate:min < /dev/null
136
+ elif [ "$IS_REVERT" = "1" ]; then
93
137
  echo "[pre-push] revert branch/commit detected — skipping the test suite"
94
138
  pnpm bkit:gate:static < /dev/null
139
+ elif grep -q '"bkit:gate:static-unit-integration"[[:space:]]*:' package.json 2>/dev/null; then
140
+ pnpm bkit:gate:static-unit-integration < /dev/null
95
141
  else
96
142
  pnpm bkit:gate:static-unit < /dev/null
97
143
  fi
@@ -102,6 +148,10 @@ fi
102
148
  # Fix: `pnpm bkit install`, stage the regenerated files, commit, push.
103
149
  pnpm bkit check < /dev/null
104
150
 
151
+ # Repo extras go here, above the disk prune. Slow ones (Docker, database, build) skip a
152
+ # min push:
153
+ # if [ "$MIN_PUSH" != "1" ]; then pnpm <slow-script> < /dev/null; fi
154
+
105
155
  # disk prune — keep this block last, so it runs only once every gate above passed. Starts
106
156
  # your max cleanup steps (`bkit disk prune`, .bkit/templates.md § Disk prune) in the
107
157
  # background, at most once a day, or hourly while free disk is under bkit.disk.minFreeGb;
@@ -0,0 +1,138 @@
1
+ #!/usr/bin/env node
2
+ // Example. Copy into scripts/ci/lanes/ and own it. bkit install does not write this file
3
+ // and does not overwrite a copy.
4
+ /**
5
+ * check-tree-cache.mjs — whether a pull request lane may skip its suite.
6
+ *
7
+ * A pull request lane skips when the files it would test are exactly the files a push run
8
+ * already tested green. "The files" is the git tree of the checked-out commit (for a pull
9
+ * request, GitHub's merge preview). A push run tests its head commit's tree, so a green push
10
+ * run whose head has the same tree proved this lane — provided that run's job of the same name
11
+ * concluded `success` (a `[skip ci]` or `run_level=none` push concludes green with every lane
12
+ * skipped, which proves nothing).
13
+ *
14
+ * Push and dispatch runs never skip: the run on a push to dev or the default branch is the
15
+ * record of what that branch holds, so it always runs the suite. `[force build]` /
16
+ * `[force cache]` in the pull request title skip nothing either.
17
+ *
18
+ * Usage: node scripts/ci/lanes/check-tree-cache.mjs >> "$GITHUB_OUTPUT"
19
+ * (env: GH_TOKEN, REPO, EVENT_NAME, JOB, PR_TITLE; optional WORKFLOW_FILE)
20
+ * Output: `skip=true` or `skip=false` on stdout; the reason on stderr. Exit 0 always — every
21
+ * failure (gh, git, unparseable output) resolves to `skip=false`, which runs the suite.
22
+ */
23
+
24
+ import { spawnSync } from "node:child_process";
25
+ import { pathToFileURL } from "node:url";
26
+
27
+ /** The workflow whose runs count. Set WORKFLOW_FILE if your CI file has another name. */
28
+ export const WORKFLOW_FILE = process.env.WORKFLOW_FILE || "bkit-ci.yml";
29
+
30
+ /** How far back the run lookup reaches. */
31
+ export const LOOKBACK_DAYS = 7;
32
+
33
+ /** At most this many tree-matching runs have their jobs read before giving up. */
34
+ export const MAX_JOB_LOOKUPS = 3;
35
+
36
+ const FORCE_MARKERS = ["[force build]", "[force cache]"];
37
+
38
+ /**
39
+ * Pure decision. `runs` are green push runs (`{ id, run_number, tree }`); `jobConclusion(id)`
40
+ * returns the conclusion of this lane's job in run `id` ("" when unknown).
41
+ */
42
+ export function decideTreeSkip({ eventName, title, headTree, runs, jobConclusion }) {
43
+ if (eventName !== "pull_request") {
44
+ return { skip: false, reason: `${eventName || "unknown"} event — only a pull request skips` };
45
+ }
46
+ const marker = FORCE_MARKERS.find((m) => (title ?? "").includes(m));
47
+ if (marker) return { skip: false, reason: `${marker} in the title` };
48
+ if (!headTree) return { skip: false, reason: "no tree for HEAD" };
49
+ const matches = (runs ?? [])
50
+ .filter((r) => r?.tree === headTree && Number.isFinite(r?.id))
51
+ .sort((a, b) => (b.run_number ?? 0) - (a.run_number ?? 0))
52
+ .slice(0, MAX_JOB_LOOKUPS);
53
+ for (const run of matches) {
54
+ const conclusion = jobConclusion(run.id);
55
+ if (conclusion === "success") {
56
+ return { skip: true, reason: `tree ${headTree} passed in push run ${run.id}` };
57
+ }
58
+ }
59
+ return {
60
+ skip: false,
61
+ reason: matches.length
62
+ ? `tree ${headTree} matched ${matches.length} push run(s), none with this job green`
63
+ : `no green push run in ${LOOKBACK_DAYS} days has tree ${headTree}`,
64
+ };
65
+ }
66
+
67
+ /** Runs `gh`; never throws. `ok` false carries the reason (spawn error or first stderr line). */
68
+ function gh(args) {
69
+ const { status, stdout, stderr, error } = spawnSync("gh", args, {
70
+ encoding: "utf8",
71
+ stdio: ["ignore", "pipe", "pipe"],
72
+ });
73
+ if (error || status !== 0) {
74
+ return { ok: false, out: "", reason: error ? error.message : String(stderr).split("\n")[0] };
75
+ }
76
+ return { ok: true, out: stdout, reason: "" };
77
+ }
78
+
79
+ function greenPushRuns(repo, now = new Date()) {
80
+ const since = new Date(now.getTime() - LOOKBACK_DAYS * 86_400_000).toISOString().slice(0, 10);
81
+ const path =
82
+ `repos/${repo}/actions/workflows/${WORKFLOW_FILE}/runs` +
83
+ `?event=push&status=success&created=${encodeURIComponent(`>=${since}`)}&per_page=100`;
84
+ const res = gh([
85
+ "api",
86
+ path,
87
+ "--jq",
88
+ "[.workflow_runs[] | {id, run_number, tree: .head_commit.tree_id}]",
89
+ ]);
90
+ // No run list is not fatal: main() turns this into skip=false, which runs the suite.
91
+ if (!res.ok) throw new Error(`could not list ${WORKFLOW_FILE} runs (${res.reason})`);
92
+ return JSON.parse(res.out || "[]");
93
+ }
94
+
95
+ function jobConclusionIn(repo, job) {
96
+ return (runId) => {
97
+ const res = gh([
98
+ "api",
99
+ `repos/${repo}/actions/runs/${runId}/jobs?per_page=100`,
100
+ "--jq",
101
+ `[.jobs[] | select(.name == ${JSON.stringify(job)}) | .conclusion] | first // ""`,
102
+ ]);
103
+ // An unreadable job list proves nothing about this lane, so the run does not count.
104
+ if (!res.ok) {
105
+ console.error(`[check-tree-cache] could not read jobs of run ${runId} (${res.reason})`);
106
+ return "";
107
+ }
108
+ return res.out.trim();
109
+ };
110
+ }
111
+
112
+ function headTree() {
113
+ const { status, stdout } = spawnSync("git", ["rev-parse", "HEAD^{tree}"], {
114
+ encoding: "utf8",
115
+ stdio: ["ignore", "pipe", "ignore"],
116
+ });
117
+ return status === 0 ? stdout.trim() : "";
118
+ }
119
+
120
+ export function main(env) {
121
+ let result;
122
+ try {
123
+ const isPr = env.EVENT_NAME === "pull_request";
124
+ result = decideTreeSkip({
125
+ eventName: env.EVENT_NAME,
126
+ title: env.PR_TITLE,
127
+ headTree: isPr ? headTree() : "",
128
+ runs: isPr ? greenPushRuns(env.REPO) : [],
129
+ jobConclusion: jobConclusionIn(env.REPO, env.JOB),
130
+ });
131
+ } catch (err) {
132
+ result = { skip: false, reason: `lookup failed (${err.message}) — running the suite` };
133
+ }
134
+ console.error(`[check-tree-cache] skip=${result.skip} — ${result.reason}`);
135
+ process.stdout.write(`skip=${result.skip}\n`);
136
+ }
137
+
138
+ if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) main(process.env);
@@ -0,0 +1,181 @@
1
+ #!/usr/bin/env node
2
+ // Example. Copy into scripts/ci/lanes/ and own it. bkit install does not write this file
3
+ // and does not overwrite a copy.
4
+ /**
5
+ * check-tree-cache.test.mjs — unit tests for the pull request tree cache.
6
+ *
7
+ * Pure Node, no runner: `node scripts/ci/lanes/check-tree-cache.test.mjs`.
8
+ * Exit: 0 = all tests passed, 1 = at least one test failed.
9
+ */
10
+
11
+ import { spawnSync } from "node:child_process";
12
+ import fs from "node:fs";
13
+ import os from "node:os";
14
+ import path from "node:path";
15
+ import { fileURLToPath } from "node:url";
16
+ import { decideTreeSkip } from "./check-tree-cache.mjs";
17
+
18
+ const SCRIPT = fileURLToPath(new URL("./check-tree-cache.mjs", import.meta.url));
19
+
20
+ /** Run the script with fake `gh` / `git` binaries first on PATH. */
21
+ function runWithFakes({ gh, git, eventName = "pull_request", title = "feat: x" }) {
22
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), "tree-cache-"));
23
+ try {
24
+ fs.writeFileSync(path.join(dir, "gh"), `#!/bin/sh\n${gh}\n`, { mode: 0o755 });
25
+ fs.writeFileSync(path.join(dir, "git"), `#!/bin/sh\n${git}\n`, { mode: 0o755 });
26
+ const r = spawnSync(process.execPath, [SCRIPT], {
27
+ encoding: "utf8",
28
+ env: {
29
+ ...process.env,
30
+ PATH: `${dir}${path.delimiter}${process.env.PATH}`,
31
+ REPO: "o/r",
32
+ EVENT_NAME: eventName,
33
+ JOB: "bkit-tests-unit",
34
+ PR_TITLE: title,
35
+ },
36
+ });
37
+ return { status: r.status, stdout: r.stdout.trim(), stderr: r.stderr };
38
+ } finally {
39
+ fs.rmSync(dir, { recursive: true, force: true });
40
+ }
41
+ }
42
+
43
+ let passed = 0;
44
+ let failed = 0;
45
+
46
+ function test(name, fn) {
47
+ try {
48
+ fn();
49
+ passed++;
50
+ console.log(` ok ${name}`);
51
+ } catch (err) {
52
+ failed++;
53
+ console.log(` FAIL ${name} — ${err.message}`);
54
+ }
55
+ }
56
+
57
+ function assert(cond, message) {
58
+ if (!cond) throw new Error(message);
59
+ }
60
+
61
+ const TREE = "t".repeat(40);
62
+ const OTHER = "o".repeat(40);
63
+ const green = () => "success";
64
+ const base = { eventName: "pull_request", title: "feat: x", headTree: TREE };
65
+
66
+ test("a pull request whose files a green push run tested skips", () => {
67
+ const r = decideTreeSkip({
68
+ ...base,
69
+ runs: [{ id: 7, run_number: 3, tree: TREE }],
70
+ jobConclusion: green,
71
+ });
72
+ assert(r.skip === true, r.reason);
73
+ });
74
+
75
+ test("a push run never skips, even with the same files green", () => {
76
+ for (const eventName of ["push", "workflow_dispatch"]) {
77
+ const r = decideTreeSkip({
78
+ ...base,
79
+ eventName,
80
+ runs: [{ id: 7, run_number: 3, tree: TREE }],
81
+ jobConclusion: green,
82
+ });
83
+ assert(r.skip === false, `${eventName}: ${r.reason}`);
84
+ }
85
+ });
86
+
87
+ test("[force build] / [force cache] in the title run the suite", () => {
88
+ for (const title of ["feat: x [force build]", "[force cache] feat: x"]) {
89
+ const r = decideTreeSkip({
90
+ ...base,
91
+ title,
92
+ runs: [{ id: 7, run_number: 3, tree: TREE }],
93
+ jobConclusion: green,
94
+ });
95
+ assert(r.skip === false, `${title}: ${r.reason}`);
96
+ }
97
+ });
98
+
99
+ test("other files → no skip", () => {
100
+ const r = decideTreeSkip({
101
+ ...base,
102
+ runs: [{ id: 7, run_number: 3, tree: OTHER }],
103
+ jobConclusion: green,
104
+ });
105
+ assert(r.skip === false, r.reason);
106
+ });
107
+
108
+ test("same files, but that run skipped this lane ([skip ci] / run_level=none) → no skip", () => {
109
+ const r = decideTreeSkip({
110
+ ...base,
111
+ runs: [{ id: 7, run_number: 3, tree: TREE }],
112
+ jobConclusion: () => "skipped",
113
+ });
114
+ assert(r.skip === false, r.reason);
115
+ });
116
+
117
+ test("a later matching run with the lane green is found past one that skipped it", () => {
118
+ const seen = [];
119
+ const r = decideTreeSkip({
120
+ ...base,
121
+ runs: [
122
+ { id: 1, run_number: 1, tree: TREE },
123
+ { id: 2, run_number: 2, tree: TREE },
124
+ ],
125
+ jobConclusion: (id) => {
126
+ seen.push(id);
127
+ return id === 1 ? "success" : "skipped";
128
+ },
129
+ });
130
+ assert(r.skip === true, r.reason);
131
+ assert(seen.join(",") === "2,1", `newest first, got ${seen}`);
132
+ });
133
+
134
+ test("no tree for HEAD → no skip", () => {
135
+ const r = decideTreeSkip({
136
+ ...base,
137
+ headTree: "",
138
+ runs: [{ id: 7, run_number: 3, tree: "" }],
139
+ jobConclusion: green,
140
+ });
141
+ assert(r.skip === false, r.reason);
142
+ });
143
+
144
+ const RUNS = `echo '[{"id":7,"run_number":3,"tree":"${TREE}"}]'`;
145
+ const GH_OK = `case "$2" in *jobs*) echo success ;; *) ${RUNS} ;; esac`;
146
+
147
+ test("end to end: matching green push run prints skip=true", () => {
148
+ const r = runWithFakes({ gh: GH_OK, git: `echo ${TREE}` });
149
+ assert(r.status === 0 && r.stdout === "skip=true", JSON.stringify(r));
150
+ });
151
+
152
+ test("end to end: a push event prints skip=false without calling gh", () => {
153
+ const r = runWithFakes({ gh: "exit 9", git: `echo ${TREE}`, eventName: "push" });
154
+ assert(r.status === 0 && r.stdout === "skip=false", JSON.stringify(r));
155
+ });
156
+
157
+ test("a gh failure exits 0 with skip=false", () => {
158
+ const r = runWithFakes({ gh: "exit 4", git: `echo ${TREE}` });
159
+ assert(r.status === 0 && r.stdout === "skip=false", JSON.stringify(r));
160
+ });
161
+
162
+ test("unparseable gh output exits 0 with skip=false", () => {
163
+ const r = runWithFakes({ gh: "echo 'not json'", git: `echo ${TREE}` });
164
+ assert(r.status === 0 && r.stdout === "skip=false", JSON.stringify(r));
165
+ });
166
+
167
+ test("a failed job lookup does not count the run: skip=false", () => {
168
+ const r = runWithFakes({
169
+ gh: `case "$2" in *jobs*) echo boom >&2; exit 1 ;; *) ${RUNS} ;; esac`,
170
+ git: `echo ${TREE}`,
171
+ });
172
+ assert(r.status === 0 && r.stdout === "skip=false", JSON.stringify(r));
173
+ });
174
+
175
+ test("a git failure exits 0 with skip=false", () => {
176
+ const r = runWithFakes({ gh: GH_OK, git: "exit 128" });
177
+ assert(r.status === 0 && r.stdout === "skip=false", JSON.stringify(r));
178
+ });
179
+
180
+ console.log(`\n${passed} passed, ${failed} failed`);
181
+ process.exit(failed > 0 ? 1 : 0);
@@ -171,7 +171,7 @@ require_graph() {
171
171
  # and in CI (installs `$(bash scripts/graphify/bkit-graphify.sh spec)`). Another release draws
172
172
  # different edges → drift no one else can reproduce. PyPI `graphifyy`, CLI `graphify`.
173
173
  # renovate: datasource=pypi depName=graphifyy
174
- GRAPHIFY_SPEC="graphifyy[sql]==0.9.50"
174
+ GRAPHIFY_SPEC="graphifyy[sql]==0.9.70"
175
175
  if [ "${1:-}" = "spec" ]; then
176
176
  printf '%s\n' "$GRAPHIFY_SPEC"
177
177
  exit 0
package/CHANGELOG.md CHANGED
@@ -6,7 +6,43 @@ Format: `## [version] — YYYY-MM-DD`
6
6
 
7
7
  ---
8
8
 
9
- ## [Unreleased]
9
+ ## [5.5.0] — 2026-10-21
10
+
11
+ ### Breaking Changes
12
+
13
+ - **BREAKING — `bkit issues labels` and `bkit workflows fail` print `trackerState`, not `linearState`.** The field holds the state the issue moves to on Linear or Jira, and is `null` on GitHub and `none`. A script or custom workflow reading `linearState` gets nothing until it reads `trackerState`. (#60)
14
+
15
+ ### Added
16
+
17
+ - **`@bkit-utility-update-tracker` keeps open issues in line with the tracker rules.** Run it on demand. It shortens titles over 70 characters, sets type and `next:*` labels, board status, priority, size, milestone, parent and blocked-by links. Priority and size come from the newest issue prioritisation audit report, then from that audit's ranking and size rules. It never creates, closes or comments on issues, never touches `bkit:*` labels and never removes a link; new milestones and parent issues are suggestions only. (#647)
18
+ - **The roadmap and audits point at the related utilities.** `docs/roadmap.md`'s generated header lists the `@bkit-utility-update-*` utilities with one line each, refreshed on every fold. `@bkit-audit-generate` ends every run with the same line, word for word. (#647)
19
+ - **`bkit-cloud.yml`'s claude job runs without a stored API key.** Set the `ANTHROPIC_FEDERATION_RULE_ID` and `ANTHROPIC_ORGANIZATION_ID` repo variables from a Claude Console federation rule and leave the `ANTHROPIC_API_KEY` secret unset: `claude-code-action` trades the job's GitHub OIDC token for a Claude API token that lasts minutes. A set key still wins over federation. The template's gate step is now `Check runner credentials` and the claude step passes the federation inputs; re-copy your adopted `.github/workflows/bkit-cloud.yml` to use them. `bkit check` stops asking for the key once federation is set up, and flags a key that shadows federation (`anthropic-api-key-shadows-federation`) and an adopted copy too old to pass the inputs (`anthropic-federation-template-stale`). Setup: `.bkit/cloud.md` § Claude — workload identity federation. (#644)
20
+
21
+ - **A push that changes only plan logs and ledgers runs `bkit:gate:min`.** The `.husky/pre-push` template asks `bkit ci min-push --ref=<sha>…` whether every changed file matches `bkit.minPushPaths` (`package.json`; default `docs/plans/**`, `docs/*.jsonl`, `.bkit/*.jsonl`; `[]` = off). If so, the new seeded `bkit:gate:min` (format, prose, slop delta) replaces the full gate, and `MIN_PUSH=1` lets slow repo extras skip. Files decide, never `[skip ci]`; any doubt runs the full gate. A push to `dev` / `main` whose skip-CI-token commit changes any other file is blocked: GitHub would skip CI for the whole push. Setup tip `min-push`; steps in `.bkit/templates.md` § Git hooks. (#645)
22
+ - **Jira is a tracker.** `bkit install --tracker=jira` wires the Atlassian MCP server under the key `jira` for Claude, Cursor and opencode, authenticating with `BKIT_JIRA_API_TOKEN` as a Bearer token. Every workflow and prompt drives a Jira issue as it does a GitHub or Linear one: it finds the key (also from a `/browse/KEY` link), reads it, writes labels then status, posts step comments (split above 32,767 characters), checks open blockers and searches related issues. Jira moves status by transition, so each workflow's Tracker header lists the issue's transitions and takes the one whose target status matches, else logs it as Unapplied. Issue keys mint FIDs like Linear ones (`MBA-7` → `mba-7-slug`). `bkit check` knows the token and the server, and the `tracker-setup-jira` advisory names the admin setting and the `package.json` keys to set. Jira repos run locally only: `bkit-cloud.yml` stops before any work unless `bkit.issueTracker` is `github` or unset. Setup: `.bkit/trackers.md` § jira — setup and notes. (#60)
23
+ - **Audits report to one standing parent issue per template.** Run without an issue and with a tracker wired, `@bkit-audit-generate` searches for that template's audit parent and posts its summary there; with none, it suggests one (title, body, run line) and keeps the summary for the new parent's first comment. Issues filed from an audit's suggestions are always sub-issues of that parent. The agent still never creates, closes or relabels issues; it gains one read-only search tool per tracker. Shape: `.bkit/trackers.md`. (#627)
24
+
25
+ ### Changed
26
+
27
+ - **The pre-push hook runs the integration tier once you declare its gate.** The `.husky/pre-push` template runs `bkit:gate:static-unit-integration` when package.json declares it, else `bkit:gate:static-unit` as before. Integration runs on push, never on commit; it may start local services such as a database in Docker, while E2E, `@live` and anything that reaches a deployed service stay in CI. A copied hook is yours: to pick this up, replace the `pnpm bkit:gate:static-unit` line in your `.husky/pre-push` with the template's `elif grep …` block, or call your integration gate there directly.
28
+ - **`bkit install`, `bkit check` and `bkit upgrade` flag a check that runs twice.** The new `gate-commit-repeats-push` advisory names any script `bkit:gate:format` (pre-commit) runs that the push gate runs again, such as a whole-repo prose lint. `.bkit/templates.md` and `docs/testing.md` now also say that `pnpm test` is the unit tier only: a unit config that matches `*.integration.test.*` files, or a unit gate that calls both `pnpm test` and a coverage run, runs the same tests twice on every push.
29
+ - **The `/bkit-design` interview ends by confirming a draft acceptance scenario.** The last round shows a draft Narrative, Success Criteria, Key Edge Cases and Process Sketch, built from the prompt, the issue and its comments, and every answer so far. It asks you to confirm or refine the parts it had to guess, and counts toward the 10-round cap. The draft is saved under a `DRAFT only` label. The design starts its Acceptance Scenario from it and records each change as a Decisions row. Headless runs save the draft marked as not reviewed by a human; `grill=false` writes no draft.
30
+ - **Tracker rules cover status, links, priority and size.** `.agents/rules.md` `Tracker issue settings` now also requires project status, parent and blocked-by links. Priority and size follow the issues audit's `Ranking Rules` and new `Size Scale` section, and blocked-by uses the machine-read form. The tracker rules are reordered: issue creation and settings first, then labels, comments, and tool use. (#647)
31
+ - **Agents comment on the issue at the end of every major turn.** `.agents/rules.md` `Tracker work comments` now asks for one comment per related issue whenever a turn changes files, commits, opens a PR, finds something or stops blocked, not only when a commit or PR lands. Turns that only answer a question or ask one post nothing. `/bkit-*` workflows still post their own comments.
32
+ - **The closing offers sit under a `## Suggested Replies` heading.** Phase workflow, audit and ledger-update summaries now put the plain-English offer, and in `/bkit-design` and `/bkit-plan` the one-by-one questions offer, under their own heading after the summary and above `## bkit Tips`, so they no longer read as the summary's last lines. In `.bkit/wording.md` a heading the agent shows you is its own clause, separate from the text under it: `suggested-replies-heading`, and `workflow-setup-tips-heading` split from `workflow-setup-tips-append`. `@bkit-utility-update-documentation` now has shell access and shows `## bkit Tips` too, like the other utilities.
33
+ - **The state a workflow moves an issue to comes from config, and Linear settings live in one object.** `bkit.linear` and `bkit.jira` each name a `progress` and a `review` state (Linear defaults `started` / `In Review`, Jira `In Progress` / `In Review`). `bkit.linear` holds `team`, `project`, `progress` and `review`; `install` and `upgrade` move an old `bkit.linearTeam` to `bkit.linear.team`, and an existing `bkit.linear.team` wins (`docs/migrations.md`). `bkit repo info` prints `trackerTeam`, `trackerProject` and `trackerSite`, and Linear's related-issue search narrows to `bkit.linear.project` when set. (#60)
34
+ - **The shipped Claude settings no longer allow `mcp__claude_ai_Linear__*`.** No workflow calls the claude.ai Linear connector; they all use the project `linear` server. Existing installs keep the row until you delete it. (#60)
35
+ - **The graphify template pins 0.9.70.** `.bkit/templates/scripts/graphify/bkit-graphify.sh` and the Renovate comment that tracks it now name `graphifyy[sql]==0.9.70`. If you adopted the script, update your copy's `GRAPHIFY_SPEC`, install that release, and run `pnpm graph:refresh`: another release draws different edges, so the register drifts.
36
+ - **`git stash clear` and `git -C <dir> reset --hard` ask first on every host.** `git stash clear` deletes every stash and joins `git stash drop` in the ask tier and in the agents' destructive-git list. Claude and opencode now also match `reset --hard` after git global options, as the parsed hosts already did.
37
+ - **The `bkit-ci.yml` template's cache skips pull requests only, and matches files instead of commit IDs.** `Check SHA Cache` is now `Check Tree Cache`, backed by the new template `scripts/ci/lanes/check-tree-cache.mjs` (copy it with its `.test.mjs`). A pull request lane skips when the PR's files are exactly the files of a push run whose same lane passed in the last 7 days. The old step compared commit IDs, and a pull request run tests a merge commit no earlier run ever had, so it never skipped a pull request. It could skip a push run, though; a push run now always runs the suite. `[force build]` / `[force cache]` in the PR title still run it. Re-copy the step into each lane of your adopted `.github/workflows/bkit-ci.yml`; without the script the step runs the suite. Details: `docs/deployments.md` § Pull request tree cache.
38
+
39
+ ### Fixed
40
+
41
+ - **Linear workflow updates work on a default Linear team.** Linear rejects an entire `save_issue` call when one state or label name doesn't exist on the team, valid fields included, and a default team has no `In Review` state and no `bkit:*` labels. As a result, every phase change failed until someone created them by hand, and a Failure Path never added `bkit:failed`. Now the workflows create each label they add with `save_issue_label` before using it, then write labels and state in separate calls. A phase start sets the state type `started`, which every team has. A team without `In Review` keeps the issue in its started state and logs the skipped state as `Unapplied`, while `bkit:merged` / `bkit:failed` carry the hand-off. `bkit workflows fail` now prints `add`, like `bkit issues labels`. `/bkit-ship` takes its Linear states from those commands instead of naming them itself. (#646)
42
+ - **The cloud secrets checklist asks for the Linear key only on Linear repos.** A GitHub or Jira repo with only `.cursor/` was told to set it. (#60)
43
+ - **Targeted uninstalls remove the settings their module wrote.** `bkit uninstall --auto` removes `bkit.cloudAgents` and a bare `bkit uninstall --opencode` removes `bkit.opencodeProvider` / `bkit.opencodeProviders`, so `bkit check` stops printing that module's advisories.
44
+ - **`bkit check` catches a hook that lost its executable bit, and `install` / `upgrade` restore it.** Cursor runs `.cursor/hooks/bkit-preflight.sh` directly, so a lost bit broke its session-start hook while the drift gate stayed green.
45
+ - **Docs say what Cursor's guardrail hook does on a payload it cannot read.** It allows, like every other bkit hook; `failClosed` blocks only when the hook process crashes. `.bkit/providers.md` called it fail-closed.
10
46
 
11
47
  ## [5.4.0] — 2026-10-20
12
48