@taf0711/splice 0.1.2 → 0.1.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/README.md CHANGED
@@ -1,156 +1,146 @@
1
1
  <p align="center">
2
- <img src="docs/assets/splice-logo.png" alt="splice" width="560">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/splice-logo-inverted.svg">
4
+ <img src="docs/assets/splice-logo.svg" alt="splice" width="560">
5
+ </picture>
3
6
  </p>
4
7
 
5
- <p align="center"><strong>A terminal coding agent with a deterministic, multi-stage pipeline.</strong></p>
8
+ <p align="center"><strong>The agent that turns a prompt into a checked change.</strong></p>
6
9
 
7
10
  <p align="center">
8
11
  <a href="https://github.com/Taf0711/splice/actions/workflows/ci.yml?branch=main"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Taf0711/splice/ci.yml?branch=main"></a>
9
12
  <a href="https://www.npmjs.com/package/@taf0711/splice"><img alt="npm version" src="https://img.shields.io/npm/v/@taf0711/splice"></a>
10
13
  <a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-blue"></a>
11
14
  <img alt="Go 1.25+" src="https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go&logoColor=white">
12
- <img alt="25+ providers" src="https://img.shields.io/badge/providers-25+-34E2EA">
13
- <br>
14
- <strong>English</strong> | <a href="README_ZH.md">中文</a>
15
15
  </p>
16
16
 
17
- Splice is an AI coding agent for your local terminal. It inspects a repository,
18
- edits files, runs commands, uses browser and terminal helpers, and keeps
19
- durable local sessions while you choose the model and the permission level.
20
- On top of that engine, Splice layers an orchestrator-mediated, schema-as-contract
21
- pipeline: a request is classified, turned into a typed execution plan, and run
22
- through specialized stages (code writer, static analyzer, test generator,
23
- security auditor, test runner) with a deterministic trajectory monitor that
24
- catches death spirals before they waste tokens.
17
+ Splice is a local-first coding agent for people who want more than a model in a
18
+ shell loop. It can inspect a repository, edit files, run checks, and use the
19
+ model and provider you choose. For substantial work, it classifies the request,
20
+ assembles only the context a stage needs, and routes the change through a
21
+ specialized execution plan.
25
22
 
26
- ```bash
27
- splice
28
- splice exec "fix the failing test in ./pkg"
29
- splice exec --output-format stream-json < turns.jsonl
30
- ```
31
-
32
- ## Why Splice
33
-
34
- - **Use the model you want.** Bring OpenAI, Anthropic, Gemini, Groq, OpenRouter,
35
- DeepSeek, Mistral, xAI, Qwen, Kimi, GitHub Models, Ollama, LM Studio, or any
36
- OpenAI- or Anthropic-compatible endpoint.
37
- - **A pipeline, not just a chat.** A request is classified into a tier, turned
38
- into a typed execution plan, and run through specialized stages whose inputs
39
- and outputs are Go structs with `Validate()` methods. The orchestrator is the
40
- foreman: agents never pass data to each other directly, and summaries flow
41
- forward, not raw outputs.
42
- - **Deterministic-first.** Anything answerable with code (ripgrep, AST, Bandit,
43
- pytest, git diff) is answered with code. The LLM is the last resort. The
44
- context builder pulls real file, directory, and grep results from Zero's tool
45
- registry so a stage prompt sees the workspace, not a guess.
46
- - **Trajectory-aware.** A deterministic scorer watches every iteration. Hard
47
- limit, budget exhaustion, state-hash cycles, oscillation, regression, and
48
- confidence collapse each escalate explicitly instead of looping silently.
49
- - **Stay in control.** File writes, shell commands, network access, and
50
- out-of-workspace writes go through Splice's permission and sandbox policy.
51
- - **Works in the terminal.** The TUI has model and provider pickers, image
52
- input, slash commands, live plan and tool rendering, scrollback, themes, and
53
- resume and fork support.
54
- - **Works without the TUI.** `splice exec` is scriptable, supports text, JSON,
55
- and stream-JSON I/O, isolated worktrees, spec-first runs, and meaningful exit
56
- codes for CI.
57
- - **Keeps context local.** Sessions are stored on disk, searchable, resumable,
58
- and never uploaded as telemetry by Splice.
59
- - **Extensible when you need it.** Use MCP servers, skills, plugins, hooks, and
60
- specialist subagents from the same CLI.
61
-
62
- ## Install
63
-
64
- Install via `npm install -g @taf0711/splice` (downloads the matching GitHub Release binary) or download archives directly from [GitHub Releases](https://github.com/Taf0711/splice/releases).
23
+ ## Start in three commands
65
24
 
66
25
  ```bash
67
26
  npm install -g @taf0711/splice
68
27
  splice
69
28
  ```
70
29
 
71
- The npm package will install a small wrapper plus the matching Splice binary for
72
- your platform from GitHub Releases. It will support Linux, macOS, and Windows
73
- on x64 and arm64.
74
-
75
- ### Bun (planned)
76
-
77
- Bun does not run dependency lifecycle scripts by default, so the `postinstall`
78
- that fetches the Splice binary is skipped and the first run fails with
79
- `No native binary found next to the npm wrapper`.
80
-
81
- The simplest fix is to trust the package after installing, which runs the
82
- blocked postinstall. This works for project and global installs:
30
+ Then describe the change. For a direct, scriptable run:
83
31
 
84
32
  ```bash
85
- # project install
86
- bun add @taf0711/splice
87
- bun pm trust @taf0711/splice
33
+ splice exec "fix the failing test in ./pkg"
34
+ ```
35
+
36
+ The first launch opens setup for a provider and model. See
37
+ [Install](docs/INSTALL.md) for source builds, platform notes, and the optional
38
+ memory sidecar.
39
+
40
+ ## Why Splice exists
41
+
42
+ Most coding agents have one long conversation responsible for understanding,
43
+ editing, testing, and deciding whether to continue. Splice separates those
44
+ jobs without turning them into a noisy agent swarm.
45
+
46
+ - **A typed pipeline.** Stages exchange validated Go structures, not loose chat
47
+ transcripts. The orchestrator decides what each stage receives and what runs
48
+ next.
49
+ - **Deterministic first.** Repository reads, search, AST checks, static analysis,
50
+ tests, diffs, and exit codes come from local tools. The model is used where
51
+ judgment is needed, not where a command is more reliable.
52
+ - **Trajectory awareness.** The run monitor detects hard limits, repeated state,
53
+ oscillation, regression, and collapsing confidence. A stuck run surfaces the
54
+ problem instead of spending tokens forever.
55
+ - **Least context by default.** The original request is distilled before it
56
+ reaches later stages. Each stage receives a small summary and the evidence it
57
+ actually needs.
58
+ - **Zero's safety substrate.** File writes, shell commands, network access, and
59
+ additional write roots still pass through Zero's permissions, sandbox, hooks,
60
+ and tool registry.
61
+ - **Local by default.** Sessions and optional memory stay on disk. Splice does
62
+ not add telemetry or require a hosted coordinator.
63
+
64
+ ## The Splice loop
88
65
 
89
- # global install
90
- bun add -g @taf0711/splice
91
- bun pm -g trust @taf0711/splice
66
+ ```text
67
+ request
68
+ │
69
+ ▼
70
+ classify ──► typed execution plan ──► focused context
71
+ │
72
+ ▼
73
+ write ──► analyze ──► test ──► audit
74
+ │
75
+ ▼
76
+ trajectory decision
77
+ continue, escalate, or stop
92
78
  ```
93
79
 
94
- Alternatives: allow the postinstall up front by adding
95
- `"trustedDependencies": ["@taf0711/splice"]` to your project's package.json
96
- before `bun add`, or run the installer manually
97
- (`node node_modules/@taf0711/splice/scripts/postinstall.mjs`) on Bun versions
98
- that do not have `bun pm trust`.
80
+ The pipeline has five request tiers, from trivial to architectural. A normal
81
+ run may use a model-backed code writer and test generator, while static
82
+ analysis, security checks, and test execution stay deterministic and local.
83
+ Every stage has a contract and validation. Malformed output is an error with
84
+ its offending field, not an empty fallback.
99
85
 
100
- ### Install scripts (planned)
86
+ ## Choose your mode
101
87
 
102
- Linux/macOS:
88
+ ### Interactive
103
89
 
104
90
  ```bash
105
- curl -fsSL https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.sh | bash
91
+ splice
106
92
  ```
107
93
 
108
- Windows PowerShell:
94
+ Use the TUI when you want a live conversation, provider and model pickers,
95
+ permission prompts, plan review, themes, image input, session resume, or forked
96
+ exploration.
109
97
 
110
- ```powershell
111
- irm https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.ps1 | iex
112
- ```
98
+ A new session starts in design mode. Describe the work, use `/crystallize` to
99
+ turn the conversation into a typed plan, then `/approve` to execute it. If the
100
+ plan is already in your head, use `/exec <prompt>` and go straight to the
101
+ pipeline.
113
102
 
114
- ### From source (works today)
103
+ These controls set the appearance:
115
104
 
116
- Source builds require Go 1.25+.
105
+ | Control | Effect |
106
+ |---|---|
107
+ | `NO_COLOR=<anything>` | disables color output |
108
+ | `SPLICE_THEME=<name>` | selects the startup theme (`auto`, `dark`, `light`, or a color theme like `dracula`, `nord`, `gruvbox`, `tokyo-night`, `catppuccin`, `one-dark`, `solarized-dark`, `rose-pine`, `everforest`, `solarized-light`) |
109
+ | `--theme <name>` | selects the TUI theme from the CLI (same names) |
110
+ | `/theme` | opens the theme picker inside the TUI (live preview; `/theme <name>` switches directly) |
111
+ | `SPLICE_NO_FADE=1` | disables streaming fade animation |
117
112
 
118
- ```bash
119
- git clone https://github.com/Taf0711/splice.git
120
- cd splice
121
- go run ./cmd/splice
122
- ```
113
+ Meaning does not rely on color alone. Diffs, permissions, and statuses also use
114
+ text or glyph markers.
123
115
 
124
- If you are testing before the first public release, build from source:
116
+ ### Headless
125
117
 
126
118
  ```bash
127
- go build -o splice ./cmd/splice
119
+ splice exec "explain internal/agent/loop.go"
120
+ splice exec --use-spec "add rate limiting to the API client"
121
+ splice exec --worktree "try the migration in isolation"
122
+ splice exec --worktree --merge-back "run isolated, then merge the result back"
123
+ splice exec --plan design-plan.json
128
124
  ```
129
125
 
130
- On Linux, build the sandbox helper too if you want native sandboxing:
126
+ `splice exec` supports text, JSON, and stream-JSON input and output, isolated
127
+ git worktrees, resumable sessions, and meaningful exit codes for automation.
128
+ For a streaming client:
131
129
 
132
130
  ```bash
133
- go build -o splice-linux-sandbox ./cmd/splice-linux-sandbox
134
- go build -o splice-seccomp ./cmd/splice-seccomp # optional compatibility wrapper
131
+ splice exec \
132
+ --input-format stream-json \
133
+ --output-format stream-json < turns.jsonl
135
134
  ```
136
135
 
137
- Put `splice` and `splice-linux-sandbox` in the same directory on `PATH`
138
- (`~/.local/bin` is a good default). macOS does not need an extra helper binary.
139
- Windows source builds can use the main `splice.exe` as their sandbox helper;
140
- release archives will still ship standalone Windows helper executables.
141
-
142
- More install details: [docs/INSTALL.md](docs/INSTALL.md).
143
-
144
- ## First Run
145
-
146
- Start the TUI:
136
+ The event contract lives in
137
+ [docs/STREAM_JSON_PROTOCOL.md](docs/STREAM_JSON_PROTOCOL.md).
147
138
 
148
- ```bash
149
- splice
150
- ```
139
+ ## Providers and local models
151
140
 
152
- The setup wizard helps you pick a provider and model. You can also configure
153
- providers from the command line:
141
+ Bring the provider that fits the job. Splice supports OpenAI, Anthropic,
142
+ Gemini, Groq, OpenRouter, DeepSeek, Mistral, xAI, Qwen, Kimi, GitHub Models,
143
+ Ollama, LM Studio, and OpenAI- or Anthropic-compatible endpoints.
154
144
 
155
145
  ```bash
156
146
  splice setup
@@ -159,341 +149,98 @@ splice models list
159
149
  splice doctor
160
150
  ```
161
151
 
162
- For API providers, set the matching environment variable before setup or enter
163
- the key in the wizard:
152
+ Set a provider key before setup or enter it in the wizard:
164
153
 
165
154
  ```bash
166
155
  export OPENAI_API_KEY=sk-...
167
156
  export ANTHROPIC_API_KEY=...
168
157
  export GEMINI_API_KEY=...
169
- export LONGCAT_API_KEY=...
170
- ```
171
-
172
- To configure Meituan LongCat (LongCat-2.0) directly, run:
173
-
174
- ```bash
175
- splice providers setup longcat --set-active
176
- ```
177
-
178
- For local models, run Ollama or LM Studio and then use `splice setup` or
179
- `splice providers detect`. Model-backed pipeline stages require tool-calling
180
- support. If a model omits the required typed tool call or returns invalid JSON,
181
- Splice gives it up to two corrective retries and then reports an actionable
182
- error. Splice never falls back from a local model to a cloud provider.
183
-
184
- ### Your first prompt: planning vs execution
185
-
186
- A fresh interactive session starts in **planning mode** (design). Describe
187
- what you want to build; Splice runs a design conversation, then `/crystallize`
188
- turns it into a typed plan and `/approve` hands it to the execution pipeline.
189
- This two-phase flow is for work that benefits from a plan first.
190
-
191
- To skip planning and run a prompt straight through the pipeline, use
192
- `/exec <prompt>` in the TUI or `splice exec "<prompt>"` headlessly:
193
-
194
- ```bash
195
- splice exec "fix the failing test in ./pkg"
196
- ```
197
-
198
- `/exec` is the escape hatch when you already know what you want and do not
199
- need a planning step. Type `/design` to re-enter planning mode.
200
-
201
- ## Daily Use
202
-
203
- ### Interactive TUI
204
-
205
- ```bash
206
- splice
207
- ```
208
-
209
- Useful controls:
210
-
211
- | Control | Action |
212
- |---|---|
213
- | `Enter` | send the prompt |
214
- | `/` | open slash-command suggestions |
215
- | `Shift+Tab` | cycle permission mode |
216
- | `Ctrl+B` | show/hide the sidebar |
217
- | `Ctrl+C` | cancel or exit |
218
-
219
- Common slash commands:
220
-
221
- | Command | Purpose |
222
- |---|---|
223
- | `/model`, `/provider` | switch the active model/provider |
224
- | `/stages` | route the model-backed code writer and test generator, plus defaults and escalation |
225
- | `/spec`, `/plan` | draft and review a plan before building |
226
- | `/image` | attach an image for vision-capable models |
227
- | `/resume`, `/rewind` | continue or roll back local sessions |
228
- | `/loop` | repeat a prompt or custom `/command` on an interval (`/loop 5m /babysit-prs`) or self-paced |
229
- | `/compact`, `/context` | manage context usage |
230
- | `/permissions`, `/tools` | inspect available tools and policy |
231
- | `/add-dir` | allow an extra write directory for this session |
232
- | `/theme`, `/doctor`, `/config` | adjust appearance and inspect setup |
233
-
234
- ### Headless `exec`
235
-
236
- ```bash
237
- splice exec "explain internal/agent/loop.go"
238
- splice exec --model claude-sonnet-4.5 "refactor the config loader"
239
- splice exec --use-spec "add rate limiting to the API client"
240
- splice exec --worktree "try the migration in an isolated worktree"
241
- splice exec --worktree --merge-back "run it isolated, then merge the result back"
242
- splice exec --plan design-plan.json
243
- splice exec --resume
244
- splice exec --fork <session-id> "try the other approach"
245
158
  ```
246
159
 
247
- `--plan` executes a design plan JSON file: tasks are ordered topologically by
248
- their dependencies and each task runs as its own pipeline run, failing fast on
249
- the first task that does not complete. `--merge-back` (requires `--worktree`)
250
- commits the worktree's work, pins a `splice/<name>` recovery branch, and merges
251
- into the source repo with `--no-ff`; a dirty source tree or a merge conflict
252
- never forces anything, and the recovery branch survives every non-merged case.
160
+ Local models work through Ollama or LM Studio. Model-backed stages require tool
161
+ calling. If a provider returns an invalid typed payload, Splice retries the
162
+ correction and then reports an actionable error. It does not silently switch a
163
+ local run to a cloud provider.
253
164
 
254
- Programmatic use:
165
+ ## Safety is part of the workflow
255
166
 
256
- ```bash
257
- splice exec --input-format stream-json --output-format stream-json < turns.jsonl
258
- ```
259
-
260
- The stream-JSON contract is documented in
261
- [docs/STREAM_JSON_PROTOCOL.md](docs/STREAM_JSON_PROTOCOL.md).
262
-
263
- ## The Pipeline
264
-
265
- Splice's distinguishing layer is the deterministic pipeline in
266
- `internal/splice/`. It is ported from the Flug paradigm (Flug is the archived
267
- Python predecessor) and built new in Go on top of Zero's engine.
268
-
269
- The flow:
270
-
271
- 1. **Classify.** `ClassifyRequest` inspects the request and assigns one of five
272
- tiers (trivial, light, standard, substantial, architectural) using
273
- keyword and risk-domain detection with rune-count thresholds that match the
274
- Python source.
275
- 2. **Plan.** `BuildExecutionPlan` turns the tier into a typed `ExecutionPlan`
276
- with per-stage `TokenBudget` allocations. Unknown tiers fail loudly with an
277
- error, matching Python's `KeyError`.
278
- 3. **Fulfill context.** Before a stage runs, its `ContextRequest` is fulfilled
279
- deterministically through `FulfillContextRequest`, which calls Zero's real
280
- `tools.Registry` (`read_file`, `list_directory`, `grep`). All six legal query
281
- types are handled; payloads are text, truncation is rune-safe, and a failed
282
- tool becomes an errored `ContextItem` rather than a silent empty payload.
283
- 4. **Run stages.** Each pipeline stage is a typed Go function in
284
- `internal/splice/stages/`. The code writer and test generator call the
285
- configured provider. Static analysis, security audit, and test execution are
286
- model-free and run through deterministic local tools. The `splicerun.Run`
287
- orchestrator drives them under Zero's full callback contract (streaming,
288
- usage, tool call/result pairs, permission events) and is wired into headless
289
- `splice exec`.
290
- 5. **Monitor trajectory.** `ComputeIterationState` builds a state vector from
291
- stage outputs; `EvaluateTrajectory` scores it and decides continue,
292
- escalate, rollback, step back, or surface to user. Repeated state hashes
293
- escalate as a cycle, including empty hashes, so an orchestrator bug surfaces
294
- loudly instead of looping.
295
- 6. **Iterate or abort.** The orchestrator acts on the trajectory decision.
296
- Failures are typed, not swallowed: a malformed stage payload names the data
297
- key and offending index.
298
-
299
- Everything in `internal/splice/` is deterministic Go with full test coverage:
300
- JSON round-trip tests cover every `Validate()`-bearing struct, and the context
301
- builder has an end-to-end test against the real tool registry.
302
-
303
- ## Safety Model
304
-
305
- Splice is designed to make side effects visible.
306
-
307
- - Workspace reads are allowed by default.
308
- - File writes are limited to the workspace unless you grant another directory.
309
- - Shell commands, network access, destructive commands, and elevated actions are
310
- permission-gated.
311
- - `--add-dir <path>` and `/add-dir <path>` grant additional write roots without
312
- giving the agent the whole filesystem.
313
- - Unsafe and autonomous modes are explicit opt-ins.
314
- - Secrets are redacted from tool output and logs where Splice controls the
315
- surface.
316
-
317
- Example:
318
-
319
- ```bash
320
- splice --add-dir ../docs-site
321
- splice exec --add-dir ../shared "update both repos"
322
- ```
167
+ Splice makes side effects visible instead of hiding them behind an autonomous
168
+ mode:
323
169
 
324
- Sandbox behavior can be inspected with:
170
+ - workspace reads are allowed by default;
171
+ - writes stay inside the workspace unless you grant another root;
172
+ - shell commands, network access, destructive actions, and elevated actions are
173
+ permission-gated;
174
+ - `--add-dir <path>` grants a specific additional write root;
175
+ - unsafe and autonomous modes are explicit opt-ins;
176
+ - sandbox policy and grants can be inspected before a run.
325
177
 
326
178
  ```bash
327
179
  splice sandbox policy
328
180
  splice sandbox grants list
181
+ splice exec --add-dir ../shared "update both repositories"
329
182
  ```
330
183
 
331
- ## Web And Local Control
332
-
333
- Splice includes local file, search, edit, and shell tools, `web_fetch` for
334
- public URLs, and MCP support for additional tools.
335
-
336
- For local dev servers, use shell commands such as `curl` through `exec_command`
337
- so the normal sandbox and permission policy applies. Long-running commands stay
338
- attached to a background terminal session and can be listed or stopped from the
339
- TUI.
340
-
341
- The npm package will also include browser and terminal helper packages used by
342
- local browser and terminal tools. Source builds can use the same helpers when
343
- they are on `PATH` or configured in Splice's local-control settings.
344
-
345
- ## Common Commands
346
-
347
- ```text
348
- splice interactive TUI
349
- splice exec one-shot or scripted agent run
350
- splice setup first-run provider setup
351
- splice auth OAuth/login helpers for supported providers
352
- splice login subscription login helpers for supported providers
353
- splice models model registry and capabilities
354
- splice providers provider profiles and detection
355
- splice doctor setup, key, and connectivity checks
356
- splice context context-budget report
357
- splice repo-map deterministic repository map
358
- splice repo-info local repository summary
359
- splice search | find search local session history
360
- splice sessions inspect, resume, fork, and rewind sessions
361
- splice spec manage spec-mode drafts
362
- splice specialist manage specialist subagents
363
- splice skills manage markdown instruction skills
364
- splice plugins manage plugins
365
- splice hooks manage lifecycle hooks
366
- splice mcp manage MCP servers and tools
367
- splice serve --mcp expose Splice tools over MCP stdio
368
- splice sandbox inspect sandbox policy and grants
369
- splice worktrees prepare isolated git worktrees
370
- splice verify detect and run local verification checks
371
- splice changes inspect and commit local git changes
372
- splice usage token usage and estimated cost
373
- splice cron scheduled agent jobs
374
- splice update check for newer releases
375
- splice upgrade apply a newer release
376
- ```
377
-
378
- ## Extending Splice
379
-
380
- ### Project and personal instructions
381
-
382
- Splice appends project-specific guidance to the system prompt from the first
383
- `AGENTS.md`, `SPLICE.md`, or `.splice/AGENTS.md` file found in each directory
384
- from the git root down to your current working directory (checked in that order
385
- per directory). Files are injected general-to-specific, capped at 8 KiB per
386
- file and 32 KiB total.
387
-
388
- A personal `SPLICE.md` under
389
- `config.UserConfigDir()/splice/SPLICE.md`
390
- (`$XDG_CONFIG_HOME/splice/SPLICE.md` or `~/.config/splice/SPLICE.md` on
391
- Linux/macOS, `%AppData%\Roaming\splice\SPLICE.md` on Windows) applies across
392
- every workspace, ahead of any project guidelines.
393
-
394
- ### Plugins
395
-
396
- Plugins are discovered from
397
- `~/.config/splice/plugins/<name>/plugin.json` (user scope, `$XDG_CONFIG_HOME`
398
- or `~/.config` on every OS, independent of the `config.UserConfigDir()` path
399
- used above) and `<cwd>/.splice/plugins/<name>/plugin.json` (project scope,
400
- resolved from the current working directory, not the repo root), and managed
401
- with `splice plugins`. A manifest can declare:
184
+ Read [SECURITY.md](SECURITY.md) for the threat model and reporting process.
402
185
 
403
- - `tools` — custom tools (`command`, `args`, `inputSchema`, and a
404
- `permission` of `prompt` or `deny`; `allow` is honored only when manifest
405
- tool auto-approval is enabled)
406
- - `hooks` — commands run on `beforeTool`, `afterTool`, `sessionStart`, or
407
- `sessionEnd`
408
- - `prompts` and `skills` — additional prompt and skill files
186
+ ## A small CLI surface for big workflows
409
187
 
410
- MCP servers (`splice mcp`) and standalone markdown skills (`splice skills`)
411
- use the same extension points and can also be wired up outside of a plugin
412
- manifest.
413
-
414
- ## Appearance And Accessibility
415
-
416
- | Control | Effect |
188
+ | Command | What it is for |
417
189
  |---|---|
418
- | `NO_COLOR=<anything>` | disables color output |
419
- | `ZERO_THEME=<name>` | selects the startup theme (`auto`, `dark`, `light`, or a color theme like `dracula`, `nord`, `gruvbox`, `tokyo-night`, `catppuccin`, `one-dark`, `solarized-dark`, `rose-pine`, `everforest`, `solarized-light`) |
420
- | `--theme <name>` | selects the TUI theme from the CLI (same names) |
421
- | `/theme` | opens the theme picker inside the TUI (live preview; `/theme <name>` switches directly) |
422
- | `ZERO_NO_FADE=1` | disables streaming fade animation |
423
-
424
- > Note: the theme environment variables still use the `ZERO_` prefix from the
425
- > upstream engine. A rename to `SPLICE_` is planned but not yet applied; both
426
- > names will be accepted during a transition.
427
-
428
- Meaning does not rely on color alone; diffs, permissions, and statuses also use
429
- text or glyph markers.
430
-
431
- ## Development
432
-
433
- ```bash
434
- go test ./...
435
- go run ./cmd/splice-release build
436
- go run ./cmd/splice-release smoke
437
- go run ./cmd/splice-perf-bench
438
- ```
439
-
440
- Cross-compile examples:
441
-
442
- ```bash
443
- go run ./cmd/splice-release build --goos linux --goarch amd64
444
- go run ./cmd/splice-release build --goos windows --goarch amd64 --output dist/splice.exe
445
- ```
446
-
447
- The deterministic pipeline layer lives in `internal/splice/` and is pure Go
448
- with no provider SDK imports. Its packages:
449
-
450
- - `internal/splice/schemas/` — typed stage and pipeline structs with
451
- `Validate()` methods.
452
- - `internal/splice/classifier.go` — request-to-tier classification.
453
- - `internal/splice/planner.go` — tier-to-execution-plan, intent distillation.
454
- - `internal/splice/budget.go` — per-tier token budgets.
455
- - `internal/splice/trajectory.go` — iteration state, scoring, trajectory
456
- decisions.
457
- - `internal/splice/context.go` + `registry_runner.go` — deterministic context
458
- fulfillment through Zero's tool registry.
459
- - `internal/splice/stages/`: the stage agents (code writer, static analyzer,
460
- test generator, security auditor, test runner, design conversation, plan
461
- critic) with embedded prompts.
462
- - `internal/splice/run.go`: the `splicerun.Run` orchestrator loop.
463
- - `internal/splice/design_runner.go`: `RunDesignPlan`, topological task
464
- sequencing for `splice exec --plan`.
465
-
466
- Adjacent Splice-specific pieces: `internal/worktrees/` adds `MergeBack` on top
467
- of Zero's worktree lifecycle, `memd/` is the memory sidecar (its own Go module,
468
- binary `splice-memd`, SQLite/FTS5 over a Unix socket), and `internal/memd/` is
469
- the sidecar's HTTP client (complete).
190
+ | `splice` | Interactive TUI |
191
+ | `splice exec` | One-shot and scripted runs |
192
+ | `splice setup` | First-run provider setup |
193
+ | `splice providers` / `models` | Provider profiles and model capabilities |
194
+ | `splice doctor` | Setup and connectivity checks |
195
+ | `splice spec` | Spec-mode drafts |
196
+ | `splice sessions` | Resume, fork, and inspect sessions |
197
+ | `splice specialist` | Specialist subagents |
198
+ | `splice skills` / `plugins` / `hooks` | Extend the agent locally |
199
+ | `splice mcp` | Configure MCP servers and tools |
200
+ | `splice worktrees` | Prepare isolated git worktrees |
201
+ | `splice verify` | Find and run repository checks |
202
+ | `splice update` / `upgrade` | Keep the binary current |
470
203
 
471
204
  ## Documentation
472
205
 
473
- - [Install](docs/INSTALL.md)
206
+ - [Install Splice](docs/INSTALL.md)
474
207
  - [Update flow](docs/UPDATE.md)
475
208
  - [Stream-JSON protocol](docs/STREAM_JSON_PROTOCOL.md)
476
209
  - [Specialists](docs/SPECIALISTS.md)
477
210
  - [GitHub Action](docs/GITHUB_ACTION.md)
478
211
  - [Benchmarks](docs/BENCHMARK.md)
479
212
  - [Performance](docs/PERFORMANCE.md)
480
- - [Agent evals](docs/AGENT_EVALS.md)
213
+ - [Agent evaluations](docs/AGENT_EVALS.md)
214
+ - [OAuth logins and subscriptions](docs/oauth-subscriptions.md)
215
+
216
+ ## For contributors
217
+
218
+ Splice-specific pipeline code lives in `internal/splice/`. It is pure Go and
219
+ keeps provider SDKs out of the pipeline layer. The optional memory sidecar is a
220
+ separate module in `memd/` and communicates over a Unix socket.
481
221
 
482
- ## Contributing
222
+ ```bash
223
+ go test ./...
224
+ go vet ./...
225
+ gofmt -l .
226
+ cd memd && go test ./...
227
+ ```
483
228
 
484
- Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md), run the
485
- relevant tests, and open a focused pull request.
229
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a change. The project is
230
+ currently using an issue-first contribution policy.
486
231
 
487
- Security reports should follow [SECURITY.md](SECURITY.md).
232
+ ## Built on Zero's Engine
488
233
 
489
- ## License
234
+ Splice is built on top of [Gitlawb's Zero Engine](https://github.com/gitlawb/zero),
235
+ an open-source MIT-licensed terminal coding agent. Zero provides the TUI,
236
+ provider adapters, sessions, tools, sandbox, permissions, worktrees, MCP,
237
+ skills, plugins, and hooks. Splice keeps that foundation and adds the
238
+ orchestrator-mediated pipeline, typed stage contracts, deterministic checks,
239
+ trajectory monitoring, and the optional memory sidecar.
490
240
 
491
- Splice is released under the [MIT License](LICENSE).
241
+ Upstream Zero code retains its original copyright and license. See
242
+ [LICENSE](LICENSE) and [SECURITY.md](SECURITY.md).
492
243
 
493
- ## Attribution
244
+ ## License
494
245
 
495
- Splice is built on top of [Gitlawb's Zero CLI](https://github.com/gitlawb/zero),
496
- an open-source MIT-licensed terminal coding agent. Splice extends Zero's engine
497
- with a deterministic, orchestrator-mediated multi-stage pipeline paradigm ported
498
- from the archived Flug prototype. All upstream Zero code retains its original
499
- copyright and license.
246
+ Splice is released under the [MIT License](LICENSE).
package/bin/splice.js CHANGED
@@ -82,9 +82,9 @@ if (!existsSync(nativePath)) {
82
82
 
83
83
  const env = { ...process.env };
84
84
  if (localControlHelpers) {
85
- env.ZERO_LOCAL_CONTROL_HELPERS = localControlHelpers;
85
+ env.SPLICE_LOCAL_CONTROL_HELPERS = localControlHelpers;
86
86
  } else {
87
- delete env.ZERO_LOCAL_CONTROL_HELPERS;
87
+ delete env.SPLICE_LOCAL_CONTROL_HELPERS;
88
88
  }
89
89
 
90
90
  const child = spawnSync(nativePath, process.argv.slice(2), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taf0711/splice",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Splice — a fast, multi-provider terminal coding agent.",
5
5
  "type": "module",
6
6
  "module": "bin/splice.js",
@@ -12,12 +12,12 @@
12
12
  // crafted archive cannot write outside the package (no zip-slip).
13
13
  //
14
14
  // Env overrides (testing / mirrors / locked-down installs):
15
- // ZERO_SKIP_DOWNLOAD=1 skip entirely, exit 0 (wrapper will guide if run)
15
+ // SPLICE_SKIP_DOWNLOAD=1 skip entirely, exit 0 (wrapper will guide if run)
16
16
  // SPLICE_INSTALL_DRY_RUN=1 print the resolved plan as JSON, no network, exit 0
17
17
  // SPLICE_INSTALL_PLATFORM=… override process.platform (linux|darwin|win32|android)
18
18
  // SPLICE_INSTALL_ARCH=… override process.arch (x64|arm64)
19
19
  // SPLICE_REPO=owner/name override the GitHub repo (default Taf0711/splice)
20
- // ZERO_GITHUB_BASE_URL=… override the download host (default https://github.com)
20
+ // SPLICE_GITHUB_BASE_URL=… override the download host (default https://github.com)
21
21
 
22
22
  import {
23
23
  chmodSync,
@@ -42,11 +42,11 @@ const pkg = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8'));
42
42
  const VERSION = pkg.version;
43
43
 
44
44
  const REPO = process.env.SPLICE_REPO || 'Taf0711/splice';
45
- const BASE = (process.env.ZERO_GITHUB_BASE_URL || 'https://github.com').replace(/\/+$/, '');
45
+ const BASE = (process.env.SPLICE_GITHUB_BASE_URL || 'https://github.com').replace(/\/+$/, '');
46
46
  // The .sha256 is fetched from the same origin as the archive, so TLS authenticity
47
47
  // is the only real integrity control — require https unless explicitly overridden
48
48
  // for local testing (e.g. a localhost mirror in tests).
49
- const ALLOW_INSECURE = process.env.ZERO_ALLOW_INSECURE_DOWNLOAD === '1';
49
+ const ALLOW_INSECURE = process.env.SPLICE_ALLOW_INSECURE_DOWNLOAD === '1';
50
50
  const MAX_DOWNLOAD_BYTES = 512 * 1024 * 1024;
51
51
 
52
52
  function fail(message) {
@@ -86,8 +86,8 @@ function resolveArch(a) {
86
86
  }
87
87
  }
88
88
 
89
- if (process.env.ZERO_SKIP_DOWNLOAD === '1') {
90
- warnSkip('ZERO_SKIP_DOWNLOAD=1 set — skipping native binary download.');
89
+ if (process.env.SPLICE_SKIP_DOWNLOAD === '1') {
90
+ warnSkip('SPLICE_SKIP_DOWNLOAD=1 set — skipping native binary download.');
91
91
  }
92
92
 
93
93
  const rawPlatform = process.env.SPLICE_INSTALL_PLATFORM || process.platform;
@@ -174,7 +174,7 @@ async function download(url) {
174
174
  if (!ALLOW_INSECURE && !url.startsWith('https://')) {
175
175
  fail(
176
176
  `refusing insecure download origin for ${url}: only https:// is allowed ` +
177
- `(set ZERO_ALLOW_INSECURE_DOWNLOAD=1 to override for local testing).`,
177
+ `(set SPLICE_ALLOW_INSECURE_DOWNLOAD=1 to override for local testing).`,
178
178
  );
179
179
  }
180
180
  let response;