@cbartens/bkit 5.0.2 → 5.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # bkit — Agent Workflow System
2
2
 
3
- <!-- bkit:managed v5.0.2 — PolyForm Noncommercial 1.0.0 / Small Business 1.0.0 (https://polyformproject.org/licenses/) — do not edit; run `bkit upgrade` to refresh -->
3
+ <!-- bkit:managed v5.0.3 — PolyForm Noncommercial 1.0.0 / Small Business 1.0.0 (https://polyformproject.org/licenses/) — do not edit; run `bkit upgrade` to refresh -->
4
4
 
5
5
  **bkit** wires Claude Code, Cursor, Codex and opencode into five-phase tracker-integrated cycle: `/bkit-design` → `/bkit-plan` → `/bkit-build` → `/bkit-debug` → `/bkit-ship`. Hosts additive, one flag each: `--claude`, `--cursor`, `--codex`, `--opencode=<provider>` — opencode providers: `openrouter`, `ollama`, `opencode-zen` + `opencode-go` (opencode-native gateways; auth via `BKIT_OPENCODE_API_KEY`). Same harness on every host; state lives in the repo, so a feature moves between hosts mid-run (see `.bkit/providers.md` § Hosts + Providers).
6
6
 
@@ -222,7 +222,7 @@ cp .bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs scripts/slop/
222
222
 
223
223
  - The plugin is a template: copy `scripts/slop/bkit-slop-type-suppression.mjs` and point the config's `plugins` entry at it (`boundary/type-suppression`, `boundary/gate-suppression`). No plugin → drop the `plugins` entry and both `boundary/*` rules.
224
224
  - Adapt: `ignores` for generated / vendored trees; per-file `overrides` with a reason, never a rule disabled repo-wide.
225
- - Traps: keep `**/.bkit/templates/**` in `ignores`, or copied `.mjs` / `.py` count as net-new slop on the upgrade commit.
225
+ - Traps: keep `**/.bkit/templates/**` in `ignores`, or copied `.mjs` / `.py` count as net-new slop on the upgrade commit. Nothing imports the copied plugin — a reachability scanner (knip, ts-prune, vulture) reads it as dead: register it as an entry point, and where `scripts/` is its own scanner workspace, register there, not the root workspace.
226
226
 
227
227
  ## direnv — `.envrc`
228
228
 
@@ -100,13 +100,31 @@ function pruneEmptyDirs(root: string): void {
100
100
  export const TEMPLATES_POINTER =
101
101
  "Templates (adopt, do not skip): read .bkit/templates.md; bkit never applies templates, so adopt each copy in .bkit/templates/ unless adoption would break existing functionality — state which you did not adopt and why. (If your own gates scan the repo, ignore .bkit/templates/.)";
102
102
 
103
+ /**
104
+ * Changed templates whose ADOPTED copy also backs a gate: the consequence of leaving it
105
+ * stale, keyed by template rel path. The upgrade line names it so the consequence reaches
106
+ * the same run that changed the copy — a stale adopted copy can redden a gate that a
107
+ * bkit-installed file trips, and the agent at that gate never sees this report.
108
+ */
109
+ export const TEMPLATE_CHANGE_CONSEQUENCES: Readonly<Record<string, string>> = {
110
+ "slop-scan.config.json":
111
+ "your adopted copy's guardrails exemptions are now stale; your slop gate may go red",
112
+ };
113
+
114
+ /** ` changed: <dest>`, plus the consequence when that template's adopted copy backs a gate. */
115
+ function formatChangedLine(rel: string): string {
116
+ const line = ` changed: ${path.join(TEMPLATE_COPIES_DIR, rel)}`;
117
+ const note = TEMPLATE_CHANGE_CONSEQUENCES[rel];
118
+ return note === undefined ? line : `${line} — ${note}`;
119
+ }
120
+
103
121
  /**
104
122
  * The upgrade report for a template sync: one line per changed, added or removed
105
123
  * template, then where to read about adopting them. Empty when nothing changed.
106
124
  */
107
125
  export function formatTemplateChanges(changes: TemplateCopyChanges): string {
108
126
  const lines = [
109
- ...changes.changed.map((p) => ` changed: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
127
+ ...changes.changed.map(formatChangedLine),
110
128
  ...changes.added.map((p) => ` added: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
111
129
  ...changes.removed.map((p) => ` removed: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
112
130
  ];
@@ -27,4 +27,15 @@ Run each host (`claude`, `opencode`, `codex`) in its own terminal window — not
27
27
  - Terminal sessions inherit the direnv-loaded `.bkit/.env`; GUI-launched apps do not (`.bkit/providers.md` § macOS GUI-isolation).
28
28
  - macOS: [Ghostty](https://ghostty.org).
29
29
 
30
+ ## Remote access
31
+
32
+ Mostly relevant to the `opencode` host — `claude` / `cursor` / `codex` ship their own mobile / desktop clients. Reach an OpenCode host terminal from another device over a private mesh VPN. Suggested services: [Tailscale](https://tailscale.com/) (mesh VPN; free Personal plan covers device-to-device access), [OpenLens](https://apps.apple.com/us/app/openlens-opencode-client/id6759910797) (OpenCode iOS client).
33
+
34
+ - Bind: `opencode service set hostname 0.0.0.0` (all interfaces) or the tailnet IP (tailnet only); `opencode service set port <port>`; `opencode service start` to apply. Loopback-only default keeps the service off the LAN; tailnet ACLs still apply.
35
+ - HTTPS proxy: `tailscale serve --bg <port>` → `https://<host>.<tailnet>.ts.net`. Requires tailnet HTTPS certificates enabled (DNS page); publishes machine names to the certificate-transparency log (free).
36
+ - Auth: HTTP Basic, username `opencode`, password in `~/.config/opencode/service.json` (mirror `~/.local/state/opencode/service.json`); persists across restarts; `opencode service set password <value>` to rotate. NEVER commit it.
37
+ - Client CLI: `OPENCODE_PASSWORD=<password> opencode --server https://<host>.<tailnet>.ts.net`.
38
+ - Browser / app pairing: `opencode pair --url https://<host>.<tailnet>.ts.net` → one-time link, 5-minute expiry.
39
+ - Pin the port: the service port is dynamic; `serve` targets a fixed port, so pin it or the proxy breaks on restart.
40
+
30
41
  <!-- bkit:end -->
@@ -282,6 +282,19 @@ jobs:
282
282
  done
283
283
  "$RUNNER_TEMP/actionlint" -color
284
284
 
285
+ # bkit >= 5.0.1 gitignores `.bkit/core` + `.bkit/shared` (browse-only symlinks into
286
+ # node_modules/@cbartens/bkit) yet `bkit check` counts a missing link as drift, so a
287
+ # fresh checkout that never runs `bkit install` can never pass the gate below.
288
+ # Recreate them exactly as install/upgrade does: relative targets, never clobber.
289
+ - name: Materialize bkit Payload View Links
290
+ if: steps.cache.outputs.skip != 'true'
291
+ run: |
292
+ for rel in core shared; do
293
+ if [ ! -L ".bkit/$rel" ] && [ ! -e ".bkit/$rel" ]; then
294
+ ln -s "../node_modules/@cbartens/bkit/.bkit/$rel" ".bkit/$rel"
295
+ fi
296
+ done
297
+
285
298
  - name: Run bkit Check
286
299
  if: steps.cache.outputs.skip != 'true'
287
300
  run: pnpm bkit check
package/CHANGELOG.md CHANGED
@@ -6,6 +6,20 @@ Format: `## [version] — YYYY-MM-DD`
6
6
 
7
7
  ---
8
8
 
9
+ ## [5.0.3] — 2026-10-12
10
+
11
+ ### Fixed
12
+
13
+ - **The static CI gate passes again on a fresh checkout** (#525). bkit >= 5.0.1 gitignores `.bkit/core` and `.bkit/shared` — browse-only symlinks into the installed package — yet `bkit check` still counts a missing link as drift, so a checkout that never ran `bkit install` reported write-drift and `bkit-tests-static` could never go green. The CI template and bkit's own workflow now recreate both links (the same relative targets install / upgrade write, never clobbering a real path) immediately before `Run bkit Check`, and the template-content snapshot is regenerated.
14
+
15
+ ### Changed
16
+
17
+ - **The upgrade report names the consequence of a stale adopted template.** A changed template whose adopted copy also backs a gate now carries that consequence inline on its `changed:` line — first case: a stale `slop-scan.config.json` can redden the slop gate — so the run that sees the template change also sees the risk.
18
+ - **Remote-access docs for the OpenCode host** (#531). `docs/setup.md` gains the OpenCode-over-Tailscale recipe: binding the service to the tailnet, `tailscale serve` HTTPS proxying, HTTP Basic auth with password rotation, and client pairing.
19
+ - **The copied slop plugin carries a reachability note.** `.bkit/templates.md` warns that nothing imports the copied `bkit-slop-type-suppression.mjs`, so a reachability scanner reads it as dead — register it as an entry point.
20
+
21
+ ---
22
+
9
23
  ## [5.0.2] — 2026-10-12
10
24
 
11
25
  ### Added
@@ -86,13 +86,28 @@ function pruneEmptyDirs(root) {
86
86
  }
87
87
  /** One-line pointer to the template docs, shared by the install and upgrade messages. */
88
88
  export const TEMPLATES_POINTER = "Templates (adopt, do not skip): read .bkit/templates.md; bkit never applies templates, so adopt each copy in .bkit/templates/ unless adoption would break existing functionality — state which you did not adopt and why. (If your own gates scan the repo, ignore .bkit/templates/.)";
89
+ /**
90
+ * Changed templates whose ADOPTED copy also backs a gate: the consequence of leaving it
91
+ * stale, keyed by template rel path. The upgrade line names it so the consequence reaches
92
+ * the same run that changed the copy — a stale adopted copy can redden a gate that a
93
+ * bkit-installed file trips, and the agent at that gate never sees this report.
94
+ */
95
+ export const TEMPLATE_CHANGE_CONSEQUENCES = {
96
+ "slop-scan.config.json": "your adopted copy's guardrails exemptions are now stale; your slop gate may go red",
97
+ };
98
+ /** ` changed: <dest>`, plus the consequence when that template's adopted copy backs a gate. */
99
+ function formatChangedLine(rel) {
100
+ const line = ` changed: ${path.join(TEMPLATE_COPIES_DIR, rel)}`;
101
+ const note = TEMPLATE_CHANGE_CONSEQUENCES[rel];
102
+ return note === undefined ? line : `${line} — ${note}`;
103
+ }
89
104
  /**
90
105
  * The upgrade report for a template sync: one line per changed, added or removed
91
106
  * template, then where to read about adopting them. Empty when nothing changed.
92
107
  */
93
108
  export function formatTemplateChanges(changes) {
94
109
  const lines = [
95
- ...changes.changed.map((p) => ` changed: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
110
+ ...changes.changed.map(formatChangedLine),
96
111
  ...changes.added.map((p) => ` added: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
97
112
  ...changes.removed.map((p) => ` removed: ${path.join(TEMPLATE_COPIES_DIR, p)}`),
98
113
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbartens/bkit",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
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 and opencode.",
6
6
  "keywords": [