@skein-code/cli 0.2.2 → 0.3.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.
@@ -3,8 +3,10 @@
3
3
  Skein's team mode treats models as replaceable specialists, not fixed brand
4
4
  stereotypes. A project can route `frontend`, `backend`, `architect`, `research`,
5
5
  `security`, `tester`, and `reviewer` profiles to different providers. The main
6
- agent remains the only writer; specialists inspect independently, exchange
7
- bounded reports, and a reviewer accepts or requests one revision round.
6
+ agent remains the only writer of the active workspace; specialists inspect
7
+ independently, exchange bounded reports, and a reviewer accepts or requests one
8
+ revision round. An opt-in writer lane may prepare a patch in a disposable Git
9
+ worktree, but it cannot integrate that patch itself.
8
10
 
9
11
  ## Why This Shape
10
12
 
@@ -94,6 +96,49 @@ reports. The normal default is local persistence because it makes interrupted
94
96
  runs, reviewer disagreements, and delivery audits recoverable without sending
95
97
  the blackboard to a hosted service.
96
98
 
99
+ Writer runs always persist their audit record even when ordinary council
100
+ persistence is disabled. Integration depends on the recorded patch hash,
101
+ review verdict, base commit, file list, cleanup result, and checkpoint.
102
+
103
+ ## Isolated Writer Lane
104
+
105
+ The first writer lane is deliberately opt-in and single-lane:
106
+
107
+ ```json
108
+ {
109
+ "agents": {
110
+ "writerEnabled": true,
111
+ "writerProfile": "implementer",
112
+ "writerReviewerProfile": "reviewer",
113
+ "maxWriterPatchBytes": 60000
114
+ }
115
+ }
116
+ ```
117
+
118
+ `writer_run` asks for write, Git, and shell permission, creates a detached
119
+ worktree at the current `HEAD`, and gives the writer only `read_file`,
120
+ `list_files`, `search_code`, `write_file`, and `apply_patch`. Shell, Git,
121
+ network, hooks, MCP, memory, external CLI runtimes, workspace-authored writer
122
+ profiles, and recursive agents remain unavailable. The reviewer must also use
123
+ an API route so it receives the complete patch. The patch is rejected rather
124
+ than truncated above `maxWriterPatchBytes` (60,000 by default; 120,000 maximum).
125
+
126
+ The worktree is removed and pruned before the tool returns. Team Run v2 stores
127
+ the Git `--binary` text patch, SHA-256, base commit, file list, writer and
128
+ reviewer reports, cleanup result, and integration state. `skein agents show
129
+ <run-id>` displays that evidence.
130
+
131
+ `writer_integrate` is a separate main-agent action. It requires the accepted
132
+ Team Run ID and patch SHA, reparses and bounds every path, requires the same
133
+ `HEAD`, refuses dirty target files, runs `git apply --check`, and captures every
134
+ target in a checkpoint. A failed apply restores that checkpoint; conflicts are
135
+ reported without overwriting the active workspace. A successful result prints
136
+ the exact `skein checkpoint restore <session> <checkpoint>` rollback command.
137
+
138
+ Dirty main-workspace state is not mirrored into the writer worktree. Parallel
139
+ writers, automatic merge or rebase, submodule mutation, and external CLI writer
140
+ mode remain future increments.
141
+
97
142
  ## Configuration
98
143
 
99
144
  Credentials are referenced by environment-variable name. They are never stored
@@ -321,7 +366,12 @@ activity, and reviewer decisions are the explainable artifacts.
321
366
  ## Current Safety Boundary
322
367
 
323
368
  - Specialist agents are read-only and cannot recursively delegate.
324
- - Only the main agent may mutate the active workspace.
369
+ - Only the main agent may mutate the active workspace. An enabled writer can
370
+ mutate only its disposable worktree and returns a reviewed patch.
371
+ - Writer and integration operations share a repo-scoped exclusive lease, while
372
+ Team Run and checkpoint storage retain their separate namespace leases.
373
+ - Workspace-authored profiles cannot receive writer authority, and repository
374
+ config cannot enable or retarget the writer lane without explicit trust.
325
375
  - Peer messages are summaries capped before entering another context.
326
376
  - Review rounds are capped at three by schema and default to one.
327
377
  - Cancellation uses the parent abort signal.
@@ -334,7 +384,8 @@ activity, and reviewer decisions are the explainable artifacts.
334
384
  search without granting arbitrary shell/network authority.
335
385
  2. Persist a content-addressed team blackboard and compact provenance bundle.
336
386
  3. Add per-route cost accounting and user-confirmed spend controls.
337
- 4. Add worktree-isolated writer agents with explicit merge/review gates.
387
+ 4. Add dependency-aware parallel writer worktrees after conflict-rate and
388
+ rollback evidence justify relaxing the single-lane gate.
338
389
  5. Score routes from project-local eval outcomes instead of relying on model
339
390
  brand assumptions.
340
391
  6. Add Gemini CLI and optional tmux/iTerm visible-pane hosts. Codex, Claude,
@@ -9,7 +9,7 @@ one of the milestones below.
9
9
 
10
10
  - Product name: `Skein`; primary executable: `skein`.
11
11
  - Compatibility executables: `mosaic` and `mosaic-code`.
12
- - Current release: `0.2.1`.
12
+ - Current release: `0.3.0`.
13
13
  - Runtime requirement: Node.js `>=22.16.0` (the runtime uses unflagged
14
14
  `node:sqlite` with FTS5, and current CLI/build dependencies require this
15
15
  Node 22 baseline).
@@ -35,11 +35,11 @@ npm ci
35
35
  npm run check
36
36
  npm run test:pty
37
37
  npm audit --omit=dev
38
- npm pack
38
+ npm run release:verify -- --output-dir artifacts/package
39
39
  ```
40
40
 
41
- The latest verified package was `skein-code-cli-0.2.1.tgz`. The verifier writes
42
- its SHA-256 to `artifacts/package/skein-code-cli-0.2.1.tgz.sha256`, and CI
41
+ The latest verified package was `skein-code-cli-0.3.0.tgz`. The verifier writes
42
+ its SHA-256 to `artifacts/package/skein-code-cli-0.3.0.tgz.sha256`, and CI
43
43
  retains the checksum beside the package metadata. The checksum is deliberately
44
44
  not copied into this packaged document because doing so would change the
45
45
  archive it describes.
@@ -47,11 +47,11 @@ archive it describes.
47
47
  The final verification included a fresh install and real PTY interaction for
48
48
  all three executable aliases, `/about`, a permission prompt, denial, and clean
49
49
  Ctrl+C exit. PTY coverage included 20, 24 ASCII, 40, 80, 120 columns and a
50
- 40x10 short-height case. The current suite contains 31 test files and 253 tests.
50
+ 40x10 short-height case. The current suite contains 34 test files and 317 tests.
51
51
 
52
52
  ## Recommended Order
53
53
 
54
- ### P0: Continuous Integration And Release Reproducibility (Branch Rule Pending)
54
+ ### P0: Continuous Integration And Release Reproducibility
55
55
 
56
56
  `.github/workflows/ci.yml` now covers Node 22 on macOS and Linux. It runs
57
57
  typecheck, unit tests, build, smoke, the PTY suite when `expect` is available,
@@ -75,8 +75,11 @@ Implementation notes:
75
75
  - `npm run release:verify` reproduces the package from source, installs it into
76
76
  an isolated prefix, rejects packaged local state, and exercises `skein`,
77
77
  `mosaic`, and `mosaic-code`.
78
- - Configure the `main` branch rule to require the `check` status after the
79
- workflow is present on GitHub.
78
+ - The `main` branch rule requires the strict `check` status. The v0.2.3 CI and
79
+ release workflows completed successfully and npm published
80
+ `@skein-code/cli@0.2.3` under the `latest` tag. The v0.3.0 package was
81
+ reproduced and verified locally (34 test files, 317 tests, all three bin
82
+ aliases); its tag, CI run, and `npm publish` to `latest` follow this commit.
80
83
 
81
84
  ### P1: Skein Storage Namespace And Migration
82
85
 
@@ -261,9 +264,19 @@ Implementation progress:
261
264
  that is parsed into a structured conflict report and surfaced in the returned
262
265
  team summary. The TUI Team Cockpit and Workbench render the queued and
263
266
  cancelled states with distinct glyphs, colors, and the cancellation reason.
264
- - See `docs/MULTI_MODEL_TEAMS.md`. Writer worktrees, persistent blackboard
265
- artifacts, cost controls, Gemini CLI, and optional tmux/iTerm pane hosts remain
266
- next.
267
+ - The first writer lane is implemented behind `agents.writerEnabled=false` by
268
+ default. `writer_run` creates one repo-leased disposable worktree, confines an
269
+ API writer to five path-safe read/write tools, requires an API Reviewer, and
270
+ persists a bounded patch plus lifecycle evidence in Team Run v2.
271
+ - `writer_integrate` is the only main-workspace integration path. It gates on
272
+ patch SHA, accepted review, base `HEAD`, clean target paths, patch parsing,
273
+ `git apply --check`, and a mandatory checkpoint; failed applies restore the
274
+ checkpoint and conflicts never overwrite user work.
275
+ - Writer regression coverage proves success and rollback, concurrent-lane
276
+ rejection, cancellation cleanup, oversize rejection, SHA and dirty-target
277
+ gates, simulated partial-apply recovery, workspace-profile rejection, and v1
278
+ Team Run compatibility. Parallel writers, external CLI writer mode, cost
279
+ controls, Gemini CLI, and optional tmux/iTerm pane hosts remain next.
267
280
 
268
281
  ### P2: MCP, Skills, And Workflow Trust UX
269
282
 
@@ -322,9 +335,7 @@ deprecation window is complete.
322
335
 
323
336
  ## Suggested Next Conversation Opening
324
337
 
325
- Start with: “Implement the first worktree-isolated writer lane from the P1
326
- multi-agent scheduler milestone. Preserve the current read-only council and
327
- review gate, serialize integration into the main workspace, and prove cancel,
328
- conflict, checkpoint, and rollback behavior before enabling parallel
329
- mutation.” Then inspect the scheduler, team-run persistence, permissions, and
330
- namespace lease boundaries before changing runtime behavior.
338
+ Start with: “Audit the opt-in P1 writer lane against its Team Run v2 evidence,
339
+ then decide whether the next increment should add external CLI writers or
340
+ dependency-aware parallel worktrees. Keep active-workspace integration explicit
341
+ and preserve SHA, review, clean-target, checkpoint, and rollback gates.”
@@ -42,6 +42,14 @@ agent:
42
42
  - npm test
43
43
  checkpointBeforeWrite: true
44
44
 
45
+ agents:
46
+ enabled: true
47
+ # Enable only in user-owned or explicitly trusted project configuration.
48
+ writerEnabled: false
49
+ writerProfile: implementer
50
+ writerReviewerProfile: reviewer
51
+ maxWriterPatchBytes: 60000
52
+
45
53
  hooks:
46
54
  beforeTool: []
47
55
  afterTool: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skein-code/cli",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,6 +14,13 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
+ "skein": {
18
+ "releaseNotes": [
19
+ "Guided first-run setup for official APIs and third-party relays",
20
+ "Protocol-aware OpenAI-compatible and Anthropic-compatible routing",
21
+ "Update notices now include a bounded summary of what changed"
22
+ ]
23
+ },
17
24
  "bin": {
18
25
  "skein": "dist/cli.js",
19
26
  "mosaic": "dist/cli.js",