docks-kit 0.15.1 → 0.15.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.
Files changed (49) hide show
  1. package/AGENTS.md +57 -17
  2. package/README.md +33 -31
  3. package/cli/docs/flags.md +0 -1
  4. package/cli/docs/install.md +28 -13
  5. package/cli/docs/overview.md +2 -2
  6. package/cli/docs/platforms.md +5 -2
  7. package/cli/docs/sync-layers.md +3 -4
  8. package/cli/docs/toolchain.md +26 -34
  9. package/cli/src/commands/docs.ts +3 -3
  10. package/cli/src/commands/model.ts +3 -0
  11. package/cli/src/commands/models.ts +5 -3
  12. package/cli/src/commands/status.ts +145 -32
  13. package/cli/src/commands/sync.ts +4 -5
  14. package/cli/src/commands/toolchain.ts +4 -7
  15. package/cli/src/commands/update.ts +177 -32
  16. package/cli/src/efforts.ts +5 -5
  17. package/cli/src/engine-native/DESIGN.md +31 -22
  18. package/cli/src/engine-native/bun.ts +42 -14
  19. package/cli/src/engine-native/claudeRuntime.ts +17 -9
  20. package/cli/src/engine-native/claudeSettingsModifiers.ts +29 -11
  21. package/cli/src/engine-native/claudeSync.ts +91 -55
  22. package/cli/src/engine-native/codexSync.ts +173 -49
  23. package/cli/src/engine-native/codexToml.ts +12 -7
  24. package/cli/src/engine-native/deps.ts +36 -95
  25. package/cli/src/engine-native/exec.ts +42 -24
  26. package/cli/src/engine-native/index.ts +17 -6
  27. package/cli/src/engine-native/models.ts +2 -9
  28. package/cli/src/engine-native/modes.ts +54 -35
  29. package/cli/src/engine-native/os/darwin.ts +62 -0
  30. package/cli/src/engine-native/os/index.ts +42 -0
  31. package/cli/src/engine-native/os/linux.ts +62 -0
  32. package/cli/src/engine-native/os/targets.ts +73 -0
  33. package/cli/src/engine-native/os/types.ts +75 -0
  34. package/cli/src/engine-native/os/windows.ts +176 -0
  35. package/cli/src/engine-native/parseArgs.ts +147 -48
  36. package/cli/src/engine-native/services.ts +1 -11
  37. package/cli/src/engine-native/settings.ts +3 -2
  38. package/cli/src/engine-native/skillsSync.ts +141 -89
  39. package/cli/src/engine-native/toolchain.ts +5 -147
  40. package/cli/src/engine.ts +41 -11
  41. package/cli/src/generated/sotPayload.ts +7 -7
  42. package/cli/src/kitHome.ts +42 -5
  43. package/cli/src/main.ts +12 -2
  44. package/cli/src/manifests.ts +28 -11
  45. package/cli/src/payload.ts +2 -5
  46. package/docks-kit +4 -4
  47. package/docks-kit.ps1 +123 -0
  48. package/package.json +9 -5
  49. package/cli/src/engine-native/os.ts +0 -24
package/AGENTS.md CHANGED
@@ -4,29 +4,35 @@ Canonical instructions for coding agents working on this project. Compatible wit
4
4
 
5
5
  ## Repository purpose
6
6
 
7
- Portable configuration kit for AI coding agents. Per-tool Single Source of Truth (SoT) directories get deployed to each tool's user-config location via `./docks-kit sync` — clone once and get a consistent AI-assisted dev environment across supported Linux and macOS hosts. The kit focuses on **token efficiency without sacrificing quality**: every setting and hook is tuned to minimize token consumption while preserving rigorous output. When adding or editing anything, ask: *does this change reduce tokens without weakening correctness?*
7
+ Portable configuration kit for AI coding agents. Per-tool Single Source of Truth
8
+ (SoT) directories deploy to each tool's user-config location through
9
+ `./docks-kit sync`. Clone once to get a consistent AI-assisted environment on
10
+ supported Linux, macOS, and Windows hosts. The kit focuses on **token efficiency
11
+ without sacrificing quality**. Every setting and hook minimizes token use while
12
+ preserving rigorous output. When you add or edit anything, ask: *does this
13
+ change reduce tokens without weakening correctness?*
8
14
 
9
15
  Tool-specific instructions live alongside this file:
10
16
  - **`CLAUDE.md`** — Claude Code SoT (`SoT/.claude/`), env vars, hooks, plugins, status line, session management, permission mode, open concerns.
11
17
  - Codex uses this `AGENTS.md` file plus the Codex SoT under `SoT/.codex/`; no separate root `CODEX.md` is needed.
12
18
 
13
19
 
14
- docks-kit runtime and standalone binary support is exactly Linux x64/arm64 and
15
- macOS x64/arm64. Unsupported hosts fail before the launcher can fall back to
16
- Bun source.
20
+ docks-kit runtime and standalone binary support covers Linux x64/arm64, macOS
21
+ x64/arm64, and Windows x64/arm64. Hosts outside this matrix fail before either
22
+ launcher can fall back to Bun source.
17
23
 
18
24
  ## Repository layout (cross-cutting)
19
25
 
20
26
  | Path | Purpose |
21
27
  |------|---------|
22
- | `docks-kit` | CLI launcher: on supported hosts, runs the platform binary in `cli/dist/` only when its `--version` matches `package.json`, otherwise Bun-from-source (auto-installs Bun + `node_modules`). Unsupported hosts fail before source fallback. No-Bun recovery is the standalone platform release binary |
28
+ | `docks-kit` / `docks-kit.ps1` | POSIX and Windows CLI launchers. On supported hosts, each runs the matching binary in `cli/dist/` only when its `--version` matches `package.json`. Otherwise it runs Bun-from-source and auto-installs Bun plus `node_modules`. Hosts outside the support matrix fail before source fallback. The standalone platform release binary provides no-Bun recovery. |
23
29
  | `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
24
- | `cli/` | Effect 4 beta CLI + bundled docs topics |
30
+ | `cli/` | Effect 4 RC CLI + bundled docs topics |
25
31
  | `SoT/models.json` | Kit-verified Claude and Codex model catalog |
26
32
  | `SoT/toolchain.json` | Toolchain floors manifest (verified pins consumed by EngineNative) |
27
33
  | `SoT/.claude/bin/` | Dependency-free Bun runtime programs for Claude's statusline, SessionStart, and Notification |
28
- | `install.sh` | Global installer |
29
- | `.github/workflows/release-cli.yml` | `cli-v*` release: four Linux/macOS x64/arm64 binaries, `SHA256SUMS`, and npm publish |
34
+ | `install.sh` / `install.ps1` | POSIX and Windows global installers |
35
+ | `.github/workflows/release-cli.yml` | `cli-v*` release: six binaries for Linux, macOS, and Windows on x64 and arm64, plus `SHA256SUMS` and npm publish |
30
36
  | `README.md` | Front door |
31
37
  | `package.json` / `bun.lock` | npm package: `bin` = `cli/src/main.ts`; bundles `cli/` with the generated in-memory SoT payload |
32
38
  | `SoT/.agents/skills.txt` | Universal-skill manifest, intentionally empty by default. Adding an [agentskills.io](https://agentskills.io/specification) slug opts it into EngineNative's shared `~/.agents/skills/` bootstrap and Claude symlink. |
@@ -37,7 +43,7 @@ Bun source.
37
43
 
38
44
  Codex SoT notes:
39
45
  - `SoT/.codex/AGENTS.md` deploys to `~/.codex/AGENTS.md` as global Codex instructions.
40
- - `SoT/.codex/config.toml` pins Codex to `model = "gpt-5.6-sol"`, sets normal and plan reasoning to `high` with concise summaries, and sets `model_verbosity = "low"`, `personality`, live top-level `web_search`, workspace-write sandboxing with sandboxed command network access, cross-session `memories` (+ dedicated note tools), `[agents]` subagent limits (`max_threads = 12`, `max_depth = 2` — intentionally above Codex defaults for broad parallel kit work; deeper recursion increases cost and predictability risk), a 128 KiB `project_doc_max_bytes` budget for the repo-side AGENTS.md chain (the global `~/.codex/AGENTS.md` is uncapped and not counted), and enables the three Docks plugins `docks@docks`, `plan-lifecycle@docks` (the shared plan lifecycle and an `effect-kit@docks` dependency), and `effect-kit@docks`.
46
+ - `SoT/.codex/config.toml` pins Codex to `model = "gpt-5.6-sol"`, sets normal and plan reasoning to `high` with concise summaries, and sets `model_verbosity = "low"`, `personality`, live top-level `web_search`, workspace-write sandboxing with sandboxed command network access, cross-session `memories` (+ dedicated note tools), `[agents]` subagent limits (`max_threads = 12`, `max_depth = 2` — intentionally above Codex defaults for broad parallel kit work; deeper recursion increases cost and predictability risk), a 128 KiB `project_doc_max_bytes` budget for the repo-side AGENTS.md chain (the global `~/.codex/AGENTS.md` is uncapped and not counted), and enables the two Docks plugins `docks@docks` and `plan-lifecycle@docks` (the shared plan lifecycle).
41
47
  - `SoT/.codex/rules/*.rules` deploys to `~/.codex/rules/` as kit-managed Codex command policy. This is Codex's equivalent of permission allow/prompt/block rules; user-learned approvals in `~/.codex/rules/default.rules` are preserved.
42
48
  - `SoT/.codex/plugins/marketplace.json` deploys to Codex's personal marketplace path at `~/.agents/plugins/marketplace.json`; when the `codex` CLI is available, sync reruns `codex plugin add <plugin@marketplace>` for enabled SoT plugins so stale cached installs are refreshed.
43
49
  - The global prompt SoTs carry the owner's standing authorization for Docks cross-company plan review, which never overrides host or platform denial.
@@ -51,12 +57,12 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`), see the matching SoT d
51
57
 
52
58
  - **Idempotent operations.** Every EngineNative sync step must be safe to re-run. Settings merges, plugin installs, and marketplace adds are all idempotent — re-running with no SoT changes is a no-op.
53
59
  - **Removed bash engine.** The bash engine was removed after the `bash-engine-final` tag. `DOCKS_KIT_ENGINE=bash` must fail with the removed-engine message; engine bugs are fixed forward in EngineNative.
54
- - **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-beta.107` (including `effect/unstable/cli`), `@effect/platform-bun@4.0.0-beta.107` (`BunServices.layer`, `BunRuntime.runMain`), `@effect/vitest@4.0.0-beta.107`, and `vitest@4.1.10` (required by the `@effect/vitest` peer range). `@effect/cli` and `@effect/platform` are removed and must not be reintroduced.
55
- - **Effect skill routing.** Effect work in this checkout must use the `effect-v4` skill from the already-enabled `effect-kit@docks` plugin; `effect-ts-setup`, `effect-ts-port`, and `effect-ts-specialist` target Effect 3.x and do not apply. Verify migration and API call shapes against the installed declarations under `node_modules/effect/dist/unstable/cli/`, never from memory or a mutable dist-tag.
56
- - **Targeted syncs.** `./docks-kit sync` accepts positional targets: `claude`, `codex`, and `agents`. Use the narrowest target that matches the SoT change (for example, `./docks-kit sync codex` for Codex-only config edits); targets can be combined with `--dry-run`, `--skip-bubblewrap` (skip optional bubblewrap bootstrap for the Codex Linux sandbox), `--skip-plugin-refresh` (install missing plugins without refreshing existing caches; used by `docks-kit update`), `--reconcile`, `--prune`, `--yes` (auto-accept toolchain prompts), and the deploy-time modifiers `--claude-compact-window=<tokens>` / `--claude-permissive` / `--claude-model=<m>` / `--claude-effort=<level>` / `--claude-advisor=<on|off|default>` / `--codex-model=<m>` / `--codex-effort=<level>` (see `CLAUDE.md` § Deploy-time modifiers).
60
+ - **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-rc.109` (including `effect/unstable/cli`), `@effect/platform-bun@4.0.0-rc.109` (`BunServices.layer`, `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.109`, and `vitest@4.1.10` (required by the `@effect/vitest` peer range). `@effect/cli` and `@effect/platform` are removed and must not be reintroduced.
61
+ - **Effect skill routing.** Effect work in this checkout must verify migration and API call shapes against the installed declarations under `node_modules/effect/dist/unstable/cli/`, never from memory or a mutable dist-tag. The `effect-ts-setup`, `effect-ts-port`, and `effect-ts-specialist` skills target Effect 3.x and do not apply.
62
+ - **Targeted syncs.** `./docks-kit sync` accepts positional targets: `claude`, `codex`, and `agents`. Use the narrowest target that matches the SoT change (for example, `./docks-kit sync codex` for Codex-only config edits); targets can be combined with `--dry-run`, `--skip-bubblewrap` (skip optional bubblewrap bootstrap for the Codex Linux sandbox), `--skip-plugin-refresh` (install missing plugins without refreshing existing caches; used by `docks-kit update`), `--reconcile`, `--prune`, and the deploy-time modifiers `--claude-compact-window=<tokens>` / `--claude-permissive` / `--claude-model=<m>` / `--claude-effort=<level>` / `--claude-advisor=<on|off|default>` / `--codex-model=<m>` / `--codex-effort=<level>` (see `CLAUDE.md` § Deploy-time modifiers).
57
63
  - **Additive by default.** Keys present in deployed config but absent from SoT are preserved on default sync. This protects user-only additions, but means drift accumulates — neither flag-less reset can clean it up. The one exception is the Claude `removed` manifest (`claude::_removed_manifest`), a curated list of unambiguous kit-owned artifacts that `claude::sync_removals` force-prunes on every sync, including the home-relative `~/.local/bin/session-relay` artifact installed outside `~/.claude`; see `CLAUDE.md` § Pruning stale artifacts.
58
64
  - **`--reconcile` / `--prune` are the kit-owned reconcile flags.** Orthogonal — `--reconcile` reconciles the settings layer (SoT-declared keys/tables/arrays win; user-only keys and nested objects are preserved; permissions arrays are replaced wholesale by SoT). `--prune` uninstalls kit-managed installations not in the SoT (plugins, marketplaces, and `~/.agents/skills/*` entries tracked in `~/.agents/.kit-managed-skills`). Combine for a full reset to SoT's kit-managed scope. User-only additions outside the kit's scope (custom env vars, mcpServers, manually-installed skills, third-party plugins not declared in SoT) are always preserved. Each tool's per-tool file documents the specific paths and diff recipes.
59
- - **SOLID-aligned modules.** `cli/src/engine-native/parseArgs.ts` owns flag parsing/validation. `toolchain.ts` owns the verified-version gate over `SoT/toolchain.json`; `bun.ts` owns the shared, memoized Bun bootstrap; `claudeRuntime.ts` owns Claude settings materialization. `claudeSync.ts`, `codexSync.ts`, and `skillsSync.ts` own tool-specific sync logic. `index.ts` is the thin orchestrator. The public CLI seam is `cli/src/engine.ts`.
65
+ - **SOLID-aligned modules.** `cli/src/engine-native/parseArgs.ts` owns flag parsing/validation. `toolchain.ts` owns verified-version floor reporting over `SoT/toolchain.json`; `bun.ts` owns the shared, memoized Bun bootstrap; `claudeRuntime.ts` owns Claude settings materialization. `claudeSync.ts`, `codexSync.ts`, and `skillsSync.ts` own tool-specific sync logic. `index.ts` is the thin orchestrator. The public CLI seam is `cli/src/engine.ts`.
60
66
  - **Small, reviewable changes.** Bundled multi-concern PRs are harder to review and revert. Split an engine/CLI change and a per-tool config change unless the change requires atomicity.
61
67
  - **Dry-run before destructive flags.** Always preview with `./docks-kit sync --dry-run` (or the relevant `diff <(jq -S …)` recipe in the per-tool file) before invoking `--reconcile` or `--prune`. User-added permissions / env vars / plugins absent from SoT will be discarded.
62
68
  - **SoT prompt files are rules, not explanation.** `SoT/.claude/CLAUDE.md` and `SoT/.codex/AGENTS.md` are loaded into every agent session's prompt context — every line costs prompt tokens on every turn for every user. Restrict their content to rules, heuristics, and `<constraint>` blocks the agent must *act on* during a turn. Do NOT add inline source citations (`Source: …`, attributed quotes), "why this rule exists" preface text, version-watermarking trivia (e.g. "Distilled from X v2.0, captured 2025-11-07"), per-bug workarounds, or installation instructions. Provenance, motivation, and historical context belong in `CLAUDE.md` / `AGENTS.md` at the repo root (humans read once) or in commit messages — never in the SoT. For every line, apply the official test: would removing it cause the agent to make mistakes? If not, cut it — over-instruction degrades adherence on current frontier models.
@@ -71,8 +77,8 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`), see the matching SoT d
71
77
 
72
78
  - No secrets in SoT. The kit's SoT directories are committed; treat them as declarative config only.
73
79
  - Treat external plugin marketplaces and installer downloads as untrusted input. Prefer download-then-run over `curl … | bash` so a truncated stream cannot execute a partial script.
74
- - **Pin, never float.** Every kit-driven install is pinned to a `SoT/toolchain.json` `verified` version or gated by one — no `@latest` npm/bun installs (Shai-Hulud-class worm surface), no mutable action tags in workflows (commit SHAs only), installer scripts fetched from version tags where upstream supports it. New install surface ⇒ manifest pin first. Details: the `toolchain-context` skill and `cli/docs/toolchain.md`.
75
-
80
+ - **Pin, never float.** Every kit-driven install of third-party software is pinned to a `SoT/toolchain.json` `verified` version — no `@latest` npm/bun installs (Shai-Hulud-class worm surface), no mutable action tags in workflows (commit SHAs only), installer scripts fetched from version tags where upstream supports it. New third-party install surface ⇒ manifest pin first. Details: the `toolchain-context` skill and `cli/docs/toolchain.md`.
81
+ - **One exemption: the kit's own package.** `install.sh` and `install.ps1` end with `bun add -g docks-kit@latest`, because a global installer that pinned itself would install a fixed old kit forever, and pinning it to `package.json` would request an unpublished version between the release-prep commit and the npm publish. The exemption covers `docks-kit` alone. Both installers still pin the Bun installer they download to the manifest's verified version, and `cli/test/unit/install.test.ts` asserts that pin in all four launcher and installer scripts.
76
82
  ## Testing
77
83
 
78
84
  Automated coverage includes `bun run test:unit`, `bun run golden:dryrun`, and `bun run golden:mutation`; prove-red modes must exit non-zero after detecting planted mismatches. Also verify user-facing changes via `./docks-kit sync --dry-run`, per-tool sanity (`/doctor`, `/plugin`, etc.), and `diff <(jq -S . <SoT>) <(jq -S . <deployed>)` recipes from the per-tool file.
@@ -91,9 +97,43 @@ When a kit-mechanic skill, its `references/`, or a wrapper agent (`.claude/agent
91
97
 
92
98
  ## Plans
93
99
 
94
- Use direct implementation for one clear reversible low-risk local diff with one bounded acceptance path; it creates no plan, reviewer, or automatic commit. Canonical plans live in `docs/plans/active/`; lifecycle is frontmatter, and `docs/plans/finished/` is terminal. Exactly three skills own the workflow: `plan-workspace` maintains the workspace, main-context `plan-manager` owns classify → draft/review/one repair → start → implement/delegate → observed acceptance → finish/archive, and internal `plan-reviewer` returns read-only `PlanReviewV1` evidence from one immutable bundle. Only the reviewer has wrappers.
100
+ Use direct implementation for one clear, reversible, low-risk local diff with one
101
+ bounded acceptance path; it creates no tracked plan, reviewer, or automatic
102
+ commit. Use a canonical plan for explicit planning, multi-commit or
103
+ cross-repository work, cold handoff, an unresolved decision, a cross-subsystem or
104
+ public-contract change, security-sensitive or destructive work, or any
105
+ non-`local` effect.
106
+
107
+ <constraint>
108
+ Canonical plans live in `docs/plans/active/`; status is frontmatter and
109
+ `docs/plans/finished/` is terminal. Exactly three skills own the workflow:
110
+ `plan-workspace` maintains the workspace; main-context `plan-manager` runs six
111
+ phases — decide, draft, research, one plan review, implement, code review — and
112
+ archives; internal `plan-reviewer` returns a readable pre-implementation verdict.
113
+ Two read-only reviewer wrappers ship, `plan-reviewer` and `code-reviewer`, and
114
+ nothing else in the lifecycle has a wrapper.
115
+ </constraint>
95
116
 
96
- The current record is one compact-JCS `Plan-run: PlanRunV1` line. Schemas 1–6 are historical validation/quarantine only. Every Steps row has `Effect: local|probe|production_access|publish|push|release|deploy`; a persisted requested effect is never live authority. The complete transaction, review-budget, checkpoint, legacy-quarantine, and external-authority contract lives in `docs/plans/AGENTS.md`; `docs/plans/CLAUDE.md` contains only `@AGENTS.md`.
117
+ The record is markdown only: `plan_contract: v2` frontmatter plus eight `##`
118
+ sections — `## Goal`, `## Research`, `## Steps`, `## Acceptance`,
119
+ `## Do not touch`, `## Open questions`, `## Review`, `## Verification Results`.
120
+ There are no hashes, permits, run identities, locks, bundles, or `v2`/`vN` plan
121
+ files, and the `plan.mjs` shipped inside the installed `plan-lifecycle` plugin
122
+ is the only lifecycle tool. This lifecycle creates zero commits and never
123
+ pushes; commit when the user asks, under `docks:commit-discipline`.
124
+
125
+ Every Steps row carries an `Effect` of exactly
126
+ `local|probe|production_access|publish|push|release|deploy`. A step whose
127
+ `Effect` is not `local` requires an in-session `ask` confirmation immediately
128
+ before it runs; when `ask` is unavailable the step is set `blocked` with
129
+ `blocked_reason` naming the unconfirmed effect. Persisted effects record intent
130
+ only.
131
+
132
+ A plan carrying a `Plan-run:` line is a v1 plan: render it, never parse or
133
+ migrate it, and finish it by hand by moving the file byte-unchanged to
134
+ `docs/plans/finished/<YYYY-MM-DD>-<slug>.md` with a `## Retirement` section
135
+ appended. The complete contract lives in `docs/plans/AGENTS.md`;
136
+ `docs/plans/CLAUDE.md` contains only `@AGENTS.md`.
97
137
 
98
138
  Distinct from per-tool **Open Concerns** sections (wait-on-upstream
99
139
  blockers tied to a vendor shipping a fix — these live inside the per-tool
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # docks-kit
2
2
 
3
3
  Portable configuration kit for AI coding agents. Per-tool **Single Source of
4
- Truth (SoT)** directories are deployed to each tool's user-config location
5
- clone once and get a consistent AI-assisted dev environment across supported
6
- Linux and macOS machines. Tuned for **token efficiency without sacrificing quality**.
4
+ Truth (SoT)** directories deploy to each tool's user-config location. Clone
5
+ once to get a consistent AI-assisted environment on supported Linux, macOS,
6
+ and Windows machines. Tuned for **token efficiency without sacrificing quality**.
7
7
 
8
8
  Supported tools: **Claude Code**, **Codex**, and any agent consuming
9
9
  [agentskills.io](https://agentskills.io) universal skills.
@@ -17,15 +17,15 @@ cd ~/projects/public
17
17
  ./docks-kit status # doctor view: drift, toolchain, plugins, skills
18
18
  ```
19
19
 
20
- The `./docks-kit` launcher supports Linux x64/arm64 and macOS x64/arm64.
21
- On those hosts it prefers a compiled binary (`cli/dist/`) only when its version
22
- matches the checkout, then runs from source via Bun—auto-installing Bun and
23
- dependencies when missing. Unsupported hosts fail immediately and never fall
24
- back to Bun source. Stale ignored build artifacts cannot mask newer checkout
25
- code.
20
+ POSIX hosts use the `./docks-kit` launcher on x64 and arm64. Windows uses
21
+ `.\docks-kit.ps1` on x64 and arm64. Each launcher prefers the matching compiled
22
+ binary in `cli/dist/` only when its version matches the checkout. Otherwise it
23
+ runs from source via Bun and auto-installs Bun plus dependencies when needed.
24
+ Hosts outside this matrix fail immediately and never fall back to Bun source.
25
+ Stale ignored build artifacts cannot mask newer checkout code.
26
26
 
27
- Other install paths (global `bun add -g docks-kit`, curl installer)
28
- see `./docks-kit docs install`.
27
+ Other install paths include global `bun add -g docks-kit`, the POSIX curl
28
+ installer, and the Windows PowerShell installer. See `./docks-kit docs install`.
29
29
 
30
30
  **No-Bun recovery path**:
31
31
 
@@ -33,9 +33,10 @@ Download the platform release binary from GitHub Releases and run it directly.
33
33
  The executable carries the generated sync payload; no checkout or adjacent
34
34
  `SoT/` directory is required.
35
35
 
36
- Prerequisites for source/global installs: Bun; Node/npm for npm-global tools.
37
- `jq` is optional doctor/test tooling. `curl` is used only when a requested
38
- Linux/macOS Bun bootstrap must download an installer.
36
+ Source and global installs require Bun. npm-global tools require Node/npm.
37
+ `jq` is optional doctor/test tooling. `curl` downloads Bun only when a source
38
+ launcher needs it. POSIX runs `install.sh`; Windows runs `install.ps1` through
39
+ PowerShell.
39
40
 
40
41
  ## CLI
41
42
 
@@ -52,12 +53,12 @@ docks-kit docs [topic] self-documentation (9 topics)
52
53
  --help --version --wizard --completions built-in
53
54
  ```
54
55
 
55
- The CLI is a typed Effect 4 beta front-end on Bun; all mutation runs through
56
+ The CLI is a typed Effect 4 RC front-end on Bun; all mutation runs through
56
57
  EngineNative in `cli/src/engine-native/`, with golden-regression coverage for
57
58
  dry-run output, mutation snapshots, and argv logs. Its dependency graph is
58
- `effect@4.0.0-beta.107` (including `effect/unstable/cli`),
59
- `@effect/platform-bun@4.0.0-beta.107` (`BunServices.layer` and
60
- `BunRuntime.runMain`), `@effect/vitest@4.0.0-beta.107`, and `vitest@4.1.10`
59
+ `effect@4.0.0-rc.109` (including `effect/unstable/cli`),
60
+ `@effect/platform-bun@4.0.0-rc.109` (`BunServices.layer` and
61
+ `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.109`, and `vitest@4.1.10`
61
62
  (required by the `@effect/vitest` peer range). `@effect/cli` and
62
63
  `@effect/platform` are removed: neither has a 4.x release, the CLI API moved
63
64
  into core, and the standalone platform package was unused here.
@@ -76,7 +77,6 @@ into core, and the standalone platform package was unused here.
76
77
  | `--codex-model=<m>` | Deploy-time modifier: deployed Codex model |
77
78
  | `--skip-bubblewrap` | Skip optional bubblewrap bootstrap (Codex Linux sandbox) |
78
79
  | `--skip-plugin-refresh` | Install missing plugins but skip refresh-only updates (used automatically by `docks-kit update`) |
79
- | `--yes` | Auto-accept toolchain prompts (CI/containers) |
80
80
 
81
81
  **Deploy-time modifiers** change deployed config only — the SoT is untouched
82
82
  and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
@@ -88,11 +88,10 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
88
88
  survive a plain sync. Reconciliation toward the SoT is explicit
89
89
  (`--reconcile` / `--prune`).
90
90
  - **Idempotent** — every step is safe to re-run; no-change syncs are no-ops.
91
- - **Toolchain floors** — external tools (bun, bwrap,
92
- effect-solutions, …) install/upgrade against `SoT/toolchain.json`:
93
- versions above the kit-verified pin prompt before installing
94
- (`--yes` accepts; non-TTY falls back to the pinned verified version
95
- when possible). `docks-kit toolchain check` shows the full table.
91
+ - **Toolchain floors** — `SoT/toolchain.json` records the kit-verified version
92
+ floors for external tools (bun, bwrap, …). `docks-kit toolchain check` prints
93
+ the full doctor table. Bun is the one managed install and is pinned to its
94
+ verified version.
96
95
  - **Model catalog** — `SoT/models.json` is the research-verified source for
97
96
  model validation, listings, and pickers.
98
97
  - **Claude runtime** — sync materializes three dependency-free Bun `.mjs`
@@ -112,9 +111,9 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
112
111
  | `SoT/toolchain.json` | Verified-version floors |
113
112
  | `cli/src/engine-native/` | EngineNative sync/model/toolchain implementation |
114
113
  | `cli/src/generated/sotPayload.ts` | Generated in-memory payload used by standalone and npm installs |
115
- | `cli/` | docks-kit CLI (Effect 4 beta on Bun) + bundled docs topics |
116
- | `docks-kit` | Launcher (binary → bun-from-source) |
117
- | `install.sh` | Global installer (Bun bootstrap + `bun add -g`) |
114
+ | `cli/` | docks-kit CLI (Effect 4 RC on Bun) + bundled docs topics |
115
+ | `docks-kit` / `docks-kit.ps1` | POSIX and Windows launchers (binary → Bun-from-source) |
116
+ | `install.sh` / `install.ps1` | POSIX and Windows global installers |
118
117
  | `docs/plans/` | Multi-commit work-item plans |
119
118
  | `AGENTS.md` / `CLAUDE.md` | Agent-facing engineering rules / Claude Code specifics |
120
119
 
@@ -126,15 +125,18 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
126
125
  | Linux | arm64 | ✅ | ✅ native |
127
126
  | macOS | x64 | ✅ | ✅ native |
128
127
  | macOS | arm64 | ✅ | ✅ native |
128
+ | Windows | x64 | ✅ | ✅ native |
129
+ | Windows | arm64 | ✅ | ✅ native |
129
130
 
130
131
  Details: `docks-kit docs platforms`.
131
132
 
132
133
  ## Releases
133
134
 
134
- Tagging `cli-v*` builds four standalone binaries (Linux x64/arm64 and macOS
135
- x64/arm64) plus `SHA256SUMS` and attaches them to the GitHub release; npm
136
- publishes the exact package tarball through trusted publishing with OIDC provenance.
137
- Package `docks-kit` 0.15.1 bundles the CLI + generated payload, so npm releases
135
+ Tagging `cli-v*` builds six standalone binaries for Linux, macOS, and Windows
136
+ on x64 and arm64. The workflow attaches them plus `SHA256SUMS` to the GitHub
137
+ release. npm publishes the exact package tarball through trusted publishing
138
+ with OIDC provenance.
139
+ Package `docks-kit` 0.15.3 bundles the CLI + generated payload, so npm releases
138
140
  are versioned config snapshots without shipping the authoring `SoT/` tree.
139
141
 
140
142
  ## Deeper docs
package/cli/docs/flags.md CHANGED
@@ -20,7 +20,6 @@ docks-kit sync claude agents # two
20
20
  | `--prune` | Uninstall kit-managed installs not in SoT: plugins, marketplaces, universal skills |
21
21
  | `--skip-bubblewrap` | Skip optional bubblewrap bootstrap (Codex Linux sandbox) |
22
22
  | `--skip-plugin-refresh` | Install missing Claude/Codex plugins but skip refresh-only updates; `docks-kit update` uses this automatically |
23
- | `--yes` | Auto-accept toolchain above-verified prompts (containers/CI) |
24
23
  | `--verbose` / `-v` | Also print no-op confirmations (already in sync, up to date, left as-is); accepted on `sync`, `model`, and `toolchain` |
25
24
 
26
25
  ## Environment overrides
@@ -1,7 +1,7 @@
1
1
  # Installing docks-kit
2
2
 
3
- Supported hosts are Linux x64/arm64 and macOS x64/arm64. Unsupported hosts
4
- fail before the launcher can fall back to Bun source.
3
+ Supported hosts are Linux x64/arm64, macOS x64/arm64, and Windows x64/arm64.
4
+ Hosts outside this matrix fail before a launcher can fall back to Bun source.
5
5
 
6
6
  ## 1. Repo checkout (development / current users)
7
7
 
@@ -11,13 +11,13 @@ cd ~/projects/public
11
11
  ./docks-kit sync
12
12
  ```
13
13
 
14
- On a supported host, the `./docks-kit` launcher prefers a compiled binary in
15
- `cli/dist/` only when its reported version matches `package.json`, then falls
16
- back to Bun-from-source (auto-installing Bun via download-then-run and
17
- `bun install --frozen-lockfile` when needed). An ignored stale build is reported
18
- and bypassed.
14
+ POSIX hosts use `./docks-kit`. Windows uses `.\docks-kit.ps1`. Each
15
+ launcher prefers a compiled binary in `cli/dist/` only when its reported
16
+ version matches `package.json`. It then falls back to Bun-from-source and
17
+ auto-installs Bun plus `node_modules` when needed. Each launcher reports and
18
+ bypasses an ignored stale build.
19
19
 
20
- ## 2. Global via Bun (effect-solutions-style)
20
+ ## 2. Global via Bun
21
21
 
22
22
  ```
23
23
  bun add -g docks-kit@latest
@@ -55,7 +55,7 @@ install; `docks-kit --version`, model catalogs, toolchain checks, and real sync
55
55
  remain functional with the script blocked. CI pins the one-package/one-command
56
56
  identity above and will fail if the script-bearing set changes.
57
57
 
58
- ## 3. curl installer (Linux/macOS)
58
+ ## 3. curl installer (POSIX)
59
59
 
60
60
  ```
61
61
  curl -fsSL https://raw.githubusercontent.com/DocksDocks/public/main/install.sh -o /tmp/docks-kit-install.sh
@@ -64,8 +64,22 @@ bash /tmp/docks-kit-install.sh && rm /tmp/docks-kit-install.sh
64
64
 
65
65
  Download-then-run, never `curl | bash` — stream truncation has bitten this
66
66
  kit before. The installer bootstraps Bun when absent, runs
67
- `bun add -g docks-kit`, and links the binary into `~/.local/bin`.
68
- This installer supports Linux and macOS only.
67
+ `bun add -g docks-kit@latest`, and links the binary into `~/.local/bin`.
68
+ This installer serves the two POSIX platforms. Windows uses the PowerShell
69
+ installer below.
70
+
71
+ ## 4. PowerShell installer (Windows)
72
+
73
+ ```powershell
74
+ Invoke-WebRequest https://raw.githubusercontent.com/DocksDocks/public/main/install.ps1 -OutFile "$env:TEMP\docks-kit-install.ps1"
75
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\docks-kit-install.ps1"
76
+ Remove-Item "$env:TEMP\docks-kit-install.ps1"
77
+ ```
78
+
79
+ Download the script before execution. Never stream it into PowerShell. The
80
+ installer bootstraps Bun when absent. It then runs
81
+ `bun add -g docks-kit@latest` and copies the CLI plus Bun into
82
+ `%USERPROFILE%\.local\bin`.
69
83
 
70
84
  ## Keeping the kit up to date
71
85
 
@@ -114,6 +128,7 @@ sync/config reads.
114
128
  - Bun for source/global installs; release binaries embed the runtime
115
129
  - Node/npm for npm-global LSP servers
116
130
  - jq is optional doctor/test tooling; sync has no jq runtime dependency
117
- - curl is required only when a requested Linux/macOS Bun bootstrap must download
118
- an installer; an already-present Bun does not require it
131
+ - curl is required only when a source launcher must download Bun. The POSIX
132
+ launchers run `install.sh`; Windows runs `install.ps1` through PowerShell.
133
+ An already-present Bun does not require curl.
119
134
  - See `docks-kit toolchain check` for the full picture on this machine
@@ -16,8 +16,8 @@ AI-assisted dev environment on every machine.
16
16
  | `SoT/toolchain.json` | Verified-version floors for external tools (see `docks-kit docs toolchain`) |
17
17
  | `cli/src/generated/sotPayload.ts` | Deterministic generated payload embedded in standalone/npm execution |
18
18
  | `cli/src/engine-native/` | EngineNative mutation logic for sync/model/toolchain |
19
- | `cli/` | This CLI (Effect 4 beta on Bun) plus bundled docs |
20
- | `docks-kit` | Launcher: version-matching compiled binary → bun-from-source, with Bun auto-install |
19
+ | `cli/` | This CLI (Effect 4 RC on Bun) plus bundled docs |
20
+ | `docks-kit` / `docks-kit.ps1` | POSIX and Windows launchers: version-matching compiled binary → Bun-from-source, with Bun auto-install |
21
21
 
22
22
  ## Design rules
23
23
 
@@ -8,9 +8,12 @@ The supported host matrix is exact:
8
8
  | Linux | arm64 | `docks-kit-linux-arm64` | EngineNative (TS) |
9
9
  | macOS | x64 | `docks-kit-darwin-x64` | EngineNative (TS) |
10
10
  | macOS | arm64 | `docks-kit-darwin-arm64` | EngineNative (TS) |
11
+ | Windows | x64 | `docks-kit-windows-x64.exe` | EngineNative (TS) |
12
+ | Windows | arm64 | `docks-kit-windows-arm64.exe` | EngineNative (TS) |
11
13
 
12
- Windows and every other host are unsupported. The launcher fails before any
13
- Bun-from-source fallback.
14
+ POSIX hosts use the `docks-kit` launcher. Windows uses `docks-kit.ps1`.
15
+ Hosts outside this table fail before either launcher can fall back to Bun
16
+ source.
14
17
 
15
18
  EngineNative is the only supported engine on supported hosts.
16
19
  `DOCKS_KIT_ENGINE=bash` exits with the removed-engine message and points at the
@@ -17,8 +17,8 @@ Order matters — runtime readiness and settings form one transaction:
17
17
  unioned, user-only keys survive. `--reconcile` replaces permissions arrays
18
18
  wholesale instead.
19
19
  4. **Removed-artifact pruning** — prune old shell assets, the Stop hook, stale
20
- kit-owned settings, retired kit-owned plugin enablement, and the stale
21
- `~/.local/bin/session-relay` command. A flag-less sync removes
20
+ kit-owned settings, retired kit-owned plugin enablement, and every
21
+ manifest-listed kit-owned `~/.local/bin` command. A flag-less sync removes
22
22
  `advisorModel`; an explicit advisor state excludes only that key so the
23
23
  modifier owns it.
24
24
  5. **Deploy-time modifiers** (`--claude-compact-window`, `--claude-permissive`,
@@ -43,8 +43,7 @@ and `codex plugin add` refresh.
43
43
 
44
44
  ## agents (→ ~/.agents/skills, ~/.claude/skills symlinks)
45
45
 
46
- `npx skills add` per missing manifest slug, Claude symlink healing,
47
- the effect-solutions CLI (toolchain-gated), and the
46
+ `npx skills add` per missing manifest slug, Claude symlink healing, and the
48
47
  kit-managed snapshot that `--prune` reconciles against.
49
48
 
50
49
  ## Reconcile flags
@@ -4,53 +4,45 @@
4
4
 
5
5
  | Field | Meaning |
6
6
  |-------|---------|
7
- | `kind` | `check` (doctor visibility) / `managed` (kit installs + upgrades) / `pin` (no binary — a version pin for npx-invoked tools, e.g. `skills-cli`) |
8
- | `policy` | `track` (upgrade toward latest, gated by `verified`) / `present` (install when missing, never upgrade) |
9
- | `floor` | Minimum acceptable version (below upgrade automatically) |
10
- | `verified` | Last kit-tested version the gate line |
7
+ | `kind` | `check` (doctor visibility) / `managed` (kit-managed install) / `pin` (no binary — a version pin for npx-invoked tools, e.g. `skills-cli`) |
8
+ | `policy` | Installation policy; `present` installs when missing and never upgrades |
9
+ | `floor` | Minimum acceptable version shown in the doctor table |
10
+ | `verified` | Last kit-tested version and the exact pin for kit-driven installs |
11
11
  | `pinnable` | Whether an exact version can be installed |
12
12
 
13
- ## The gate
14
-
15
- When an install/upgrade candidate is **above `verified`**:
16
-
17
- - **TTY**: prompt — "X <latest> is not kit-verified (verified: <v>). Install anyway? [y/N]"
18
- - **`--yes`**: proceed with a warning (containers/CI)
19
- - **non-TTY, declined**:
20
- - install mode (tool missing) + pinnable → install the pinned `verified` version
21
- - upgrade mode → stay on the installed version, warn
22
-
23
- At or below `verified`, installs/upgrades run silently. After testing a new
24
- release, bump `verified` in SoT/toolchain.json — that is the "this version is
25
- now kit-approved" act.
13
+ `docks-kit toolchain check` reports each installed version against the
14
+ manifest's `floor` and `verified` columns.
26
15
 
27
16
  ## Managed tools
28
17
 
29
- - **bun** — policy `present`: bootstrap only (pinned to `verified` via the
30
- installer's version argument), never auto-upgraded. `bun.ts` owns one
31
- per-engine-run memo shared by Claude runtime, effect-solutions, and direct
32
- toolchain ensure on supported Linux/macOS hosts.
33
- - **effect-solutions** policy `track`: self-upgrades toward npm latest,
34
- gated by its `verified` pin.
18
+ - **bun** — policy `present`: installed from the pinned `verified` release and
19
+ never auto-upgraded. `bun.ts` `bunBootstrap` owns one per-engine-run memo
20
+ shared by the Claude runtime and direct `toolchain ensure bun` on every
21
+ supported host. The POSIX modules download `install.sh` with curl and run it
22
+ with Bash. The Windows module downloads `install.ps1` with curl and runs it
23
+ through `powershell.exe`.
35
24
 
36
25
  jq and curl are `check` rows, not global prerequisites. jq is not consumed by
37
- normal sync. curl is checked only when a requested Linux/macOS Bun bootstrap
38
- must download an installer.
26
+ normal sync. curl is checked only when a requested Bun bootstrap must download
27
+ an installer. An already-present Bun skips that download on every host.
39
28
 
40
29
  ## Supply-chain stance
41
30
 
42
- Every kit-driven install is pinned to a `verified` version or gated by one —
43
- never floating `@latest` (the npm-worm / Shai-Hulud attack surface). That
44
- includes the `npx skills@<verified>` invocations on agents sync and the release
45
- workflow (actions pinned to commit SHAs, exact bun/npm versions).
46
- Callbacks receive the exact gate-approved version; an offline "latest unknown"
47
- probe falls back to the pinned `verified`, never to an ungated latest.
31
+ Every kit-driven install of third-party software is pinned to a
32
+ `SoT/toolchain.json` `verified` version — never floating `@latest` (the
33
+ npm-worm / Shai-Hulud attack surface). That includes the
34
+ `npx skills@<verified>` invocations on agents sync and the release workflow
35
+ (actions pinned to commit SHAs, exact bun/npm versions).
36
+
37
+ The kit's own package is the single exemption. `install.sh` and `install.ps1`
38
+ end with `bun add -g docks-kit@latest` because a global installer that pinned
39
+ itself would install a fixed old kit forever. The exemption covers `docks-kit`
40
+ alone; both installers still pin the Bun installer they download to the
41
+ manifest's `verified` version.
48
42
 
49
43
  ## Commands
50
44
 
51
45
  ```text
52
46
  docks-kit toolchain check # doctor table (also inside docks-kit status)
53
- docks-kit toolchain ensure bun # ensure one supported managed tool
54
- docks-kit toolchain ensure effect-solutions # ensure the other supported managed tool
55
- docks-kit sync --yes # unattended: auto-accept gates
47
+ docks-kit toolchain ensure bun # ensure the only managed tool
56
48
  ```
@@ -17,10 +17,10 @@ const TOPICS: Record<string, { summary: string; body: string }> = {
17
17
  "flags": { summary: "Full flag reference incl. the old→new rename table", body: flags },
18
18
  "modifiers": { summary: "Deploy-time modifiers and the flag-less-sync-reverts contract", body: modifiers },
19
19
  "models": { summary: "Model catalog, validation rules, model get/set", body: models },
20
- "toolchain": { summary: "Verified-version floors, gate policy, --yes semantics", body: toolchain },
20
+ "toolchain": { summary: "Verified-version floors and the doctor table", body: toolchain },
21
21
  "plugins": { summary: "enabledPlugins tri-state + optional plugin opt-ins", body: plugins },
22
- "install": { summary: "Install paths: repo checkout, bun add -g, curl installer", body: install },
23
- "platforms": { summary: "Platform support: Linux/macOS x64 and arm64", body: platforms }
22
+ "install": { summary: "Install paths: repo checkout, bun add -g, POSIX/Windows installers", body: install },
23
+ "platforms": { summary: "Platform support: Linux, macOS, and Windows on x64 and arm64", body: platforms }
24
24
  }
25
25
 
26
26
  const topic = Argument.string("topic").pipe(
@@ -32,6 +32,9 @@ export const modelCommand = Command.make(
32
32
  const dry = [...(config.dryRun ? ["--dry-run"] : []), ...(config.verbose ? ["--verbose"] : [])]
33
33
 
34
34
  if (Option.isSome(config.value)) {
35
+ if (config.value.value.trim() === "") {
36
+ return yield* bail("Model value must not be empty or blank")
37
+ }
35
38
  return yield* engine(["model", t, config.value.value, ...dry])
36
39
  }
37
40
 
@@ -18,6 +18,11 @@ const renderTool = (t: Tool) =>
18
18
  for (const m of catalog.models) {
19
19
  yield* Console.log(` ${m.id.padEnd(28)} ${m.kind.padEnd(6)} ${m.note ?? ""}`)
20
20
  }
21
+ yield* Console.log(
22
+ t === "claude"
23
+ ? " (full claude-* model IDs outside the catalog are accepted with a warning)"
24
+ : " (well-formed IDs outside the catalog are accepted with a warning)"
25
+ )
21
26
  yield* Console.log("")
22
27
  })
23
28
 
@@ -37,9 +42,6 @@ export const modelsCommand = Command.make("models", { tool, json }, (config) =>
37
42
  for (const t of tools) {
38
43
  yield* renderTool(t)
39
44
  }
40
- yield* Console.log(
41
- "Catalog: SoT/models.json (research-verified). Well-formed IDs outside it apply with a warning."
42
- )
43
45
  })
44
46
  ).pipe(
45
47
  Command.withDescription("List kit-verified Claude and Codex models (SoT/models.json).")