@taf0711/splice 0.1.4 → 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.
Files changed (2) hide show
  1. package/README.md +164 -169
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </picture>
6
6
  </p>
7
7
 
8
- <p align="center"><strong>The agent that turns a prompt into a checked change.</strong></p>
8
+ <p align="center"><strong>A terminal code agent that turns a request into a checked change.</strong></p>
9
9
 
10
10
  <p align="center">
11
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>
@@ -14,154 +14,144 @@
14
14
  <img alt="Go 1.25+" src="https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go&logoColor=white">
15
15
  </p>
16
16
 
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.
17
+ <p align="center">
18
+ <img src="docs/assets/repair-loop.gif" alt="Splice implements a change, the test suite fails, the test runner returns typed failure evidence, and the rerun passes" width="900">
19
+ </p>
20
+
21
+ <p align="center"><em>One unedited run. The code writer implements the change, the test runner
22
+ fails on a trap test, it returns the failure evidence to the code writer, and
23
+ the rerun passes. Six stages, one repair re-entry.</em></p>
24
+
25
+ Splice is a local-first terminal agent for repository work. It can inspect code,
26
+ edit files, run checks, and use your selected model provider.
27
+
28
+ Splice combines a chat-first TUI with a typed execution pipeline. The TUI helps
29
+ you shape the work. The pipeline turns the approved request into checked stages.
22
30
 
23
- ## Start in three commands
31
+ ## Quick start
32
+
33
+ The npm package requires Node.js 24 or newer.
24
34
 
25
35
  ```bash
26
36
  npm install -g @taf0711/splice
27
37
  splice
28
38
  ```
29
39
 
30
- Then describe the change. For a direct, scriptable run:
40
+ The first launch opens provider setup. Enter a request in the TUI, or start a
41
+ headless run:
31
42
 
32
43
  ```bash
33
- splice exec "fix the failing test in ./pkg"
44
+ splice exec "fix the test failure in ./pkg"
34
45
  ```
35
46
 
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.
47
+ See [Install Splice](docs/INSTALL.md) for release archives, source builds, and
48
+ platform notes.
49
+
50
+ ## Choose a workflow
51
+
52
+ ### Shape a change in the TUI
53
+
54
+ Run `splice` to open the interactive interface. A new session starts in design
55
+ mode.
56
+
57
+ 1. Describe the change.
58
+ 2. Use `/crystallize` to create a typed design plan.
59
+ 3. Review the critique and revise the plan if necessary.
60
+ 4. Use `/approve` to start execution.
39
61
 
40
- ## One-line install
62
+ Use `/exec <prompt>` when you do not need a design conversation. The command
63
+ starts the execution pipeline directly.
41
64
 
42
- Use the Bash installer on Linux or macOS:
65
+ The TUI also provides provider and model selection, permission prompts, session
66
+ resume, image input, themes, and transcript review.
67
+
68
+ ### Run one request from a script
43
69
 
44
70
  ```bash
45
- curl -fsSL https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.sh | bash
46
- wget -qO- https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.sh | bash
71
+ splice exec "explain internal/agent/loop.go"
72
+ splice exec --use-spec "add rate limits to the API client"
73
+ splice exec --worktree "try the migration in isolation"
74
+ splice exec --worktree --merge-back "update the parser and merge the result"
75
+ splice exec --plan design-plan.json
47
76
  ```
48
77
 
49
- Use the plain PowerShell form on Windows:
78
+ `splice exec` supports text, JSON, and JSONL output. It also supports session
79
+ resume, isolated worktrees, and explicit autonomy limits.
50
80
 
51
- ```powershell
52
- irm https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.ps1 | iex
53
- ```
81
+ ### Run in CI
54
82
 
55
- Use the PowerShell argument form to set a version:
83
+ Use the [Splice GitHub Action](docs/GITHUB_ACTION.md), or call `splice exec`
84
+ from any job. Use stream JSON when another process must consume live events.
56
85
 
57
- ```powershell
58
- & ([scriptblock]::Create((irm https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.ps1))) -Version 0.1.4
86
+ ```bash
87
+ splice exec --output-format stream-json "run the repository checks"
59
88
  ```
60
89
 
61
- ## Why Splice exists
62
-
63
- Most coding agents have one long conversation responsible for understanding,
64
- editing, testing, and deciding whether to continue. Splice separates those
65
- jobs without turning them into a noisy agent swarm.
66
-
67
- - **A typed pipeline.** Stages exchange validated Go structures, not loose chat
68
- transcripts. The orchestrator decides what each stage receives and what runs
69
- next.
70
- - **Deterministic first.** Repository reads, search, AST checks, static analysis,
71
- tests, diffs, and exit codes come from local tools. The model is used where
72
- judgment is needed, not where a command is more reliable.
73
- - **Trajectory awareness.** The run monitor detects hard limits, repeated state,
74
- oscillation, regression, and collapsing confidence. A stuck run surfaces the
75
- problem instead of spending tokens forever.
76
- - **Least context by default.** The original request is distilled before it
77
- reaches later stages. Each stage receives a small summary and the evidence it
78
- actually needs.
79
- - **Zero's safety substrate.** File writes, shell commands, network access, and
80
- additional write roots still pass through Zero's permissions, sandbox, hooks,
81
- and tool registry.
82
- - **Local by default.** Sessions and optional memory stay on disk. Splice does
83
- not add telemetry or require a hosted coordinator.
84
-
85
- ## The Splice loop
90
+ ## How the pipeline works
91
+
92
+ Splice does not give one model turn every responsibility. The orchestrator owns
93
+ the run and gives each stage only the data it needs.
86
94
 
87
95
  ```text
88
96
  request
89
- │
90
- ▼
91
- classify ──► typed execution plan ──► focused context
92
- │
93
- ▼
94
- write ──► analyze ──► test ──► audit
95
- │
96
- ▼
97
- trajectory decision
98
- continue, escalate, or stop
97
+ |
98
+ v
99
+ classify -> typed plan -> focused context
100
+ |
101
+ v
102
+ write -> analyze -> test -> verify
103
+ |
104
+ v
105
+ trajectory decision
106
+ |
107
+ continue, recover, ask, or stop
99
108
  ```
100
109
 
101
- The pipeline has five request tiers, from trivial to architectural. A normal
102
- run may use a model-backed code writer and test generator, while static
103
- analysis, security checks, and test execution stay deterministic and local.
104
- Every stage has a contract and validation. Malformed output is an error with
105
- its offending field, not an empty fallback.
110
+ The current classifier selects `trivial`, `light`, `substantial`, or
111
+ `architectural`. The schema also retains `standard` for compatible saved plans.
106
112
 
107
- ## Choose your mode
113
+ Model-backed stages write code or tests. Local stages perform static checks,
114
+ security checks, test execution, and acceptance verification. Each boundary uses
115
+ validated Go data instead of an unstructured chat transcript.
108
116
 
109
- ### Interactive
117
+ The trajectory monitor compares completed passes. It detects repeated code
118
+ state, oscillation, score regression, token limits, and confidence decline.
119
+ The orchestrator can revise context, select an escalation model, restore a
120
+ worktree snapshot, request a fresh analysis, ask the user, or stop.
110
121
 
111
- ```bash
112
- splice
113
- ```
114
-
115
- Use the TUI when you want a live conversation, provider and model pickers,
116
- permission prompts, plan review, themes, image input, session resume, or forked
117
- exploration.
122
+ Read [Pipeline behavior](docs/PIPELINE.md) for stage sets, success rules,
123
+ recovery behavior, and current limits.
118
124
 
119
- A new session starts in design mode. Describe the work, use `/crystallize` to
120
- turn the conversation into a typed plan, then `/approve` to execute it. If the
121
- plan is already in your head, use `/exec <prompt>` and go straight to the
122
- pipeline.
125
+ ## Safety and local data
123
126
 
124
- These controls set the appearance:
127
+ Splice keeps the inherited Zero safety controls in every run.
125
128
 
126
- | Control | Effect |
127
- |---|---|
128
- | `NO_COLOR=<anything>` | disables color output |
129
- | `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`) |
130
- | `--theme <name>` | selects the TUI theme from the CLI (same names) |
131
- | `/theme` | opens the theme picker inside the TUI (live preview; `/theme <name>` switches directly) |
132
- | `SPLICE_NO_FADE=1` | disables streaming fade animation |
129
+ - Workspace reads are available by default.
130
+ - Writes stay inside approved roots.
131
+ - Shell, network, destructive, and elevated actions pass through policy checks.
132
+ - Unsafe modes require an explicit flag.
133
+ - Worktrees reduce the effect of a failed change, but they are not sandboxes.
134
+ - Output surfaces redact known secret values.
133
135
 
134
- Meaning does not rely on color alone. Diffs, permissions, and statuses also use
135
- text or glyph markers.
136
-
137
- ### Headless
136
+ Inspect the active policy before a sensitive run:
138
137
 
139
138
  ```bash
140
- splice exec "explain internal/agent/loop.go"
141
- splice exec --use-spec "add rate limiting to the API client"
142
- splice exec --worktree "try the migration in isolation"
143
- splice exec --worktree --merge-back "run isolated, then merge the result back"
144
- splice exec --plan design-plan.json
139
+ splice sandbox policy
140
+ splice sandbox grants list
141
+ splice exec --add-dir ../shared "update both repositories"
145
142
  ```
146
143
 
147
- `splice exec` supports text, JSON, and stream-JSON input and output, isolated
148
- git worktrees, resumable sessions, and meaningful exit codes for automation.
149
- For a streaming client:
144
+ Sessions stay on the local machine. The optional `splice-memd` sidecar stores
145
+ bounded project observations in a local SQLite database. Splice adds no required
146
+ hosted coordinator and no product telemetry.
150
147
 
151
- ```bash
152
- splice exec \
153
- --input-format stream-json \
154
- --output-format stream-json < turns.jsonl
155
- ```
148
+ Read [Security in Splice](SECURITY.md) before you use external tools on a
149
+ sensitive repository.
156
150
 
157
- The event contract lives in
158
- [docs/STREAM_JSON_PROTOCOL.md](docs/STREAM_JSON_PROTOCOL.md).
151
+ ## Providers and models
159
152
 
160
- ## Providers and local models
161
-
162
- Bring the provider that fits the job. Splice supports OpenAI, Anthropic,
163
- Gemini, Groq, OpenRouter, DeepSeek, Mistral, xAI, Qwen, Kimi, GitHub Models,
164
- Ollama, LM Studio, and OpenAI- or Anthropic-compatible endpoints.
153
+ Splice supports hosted providers, local model servers, and compatible custom
154
+ endpoints. Run setup to select a profile and model.
165
155
 
166
156
  ```bash
167
157
  splice setup
@@ -170,98 +160,103 @@ splice models list
170
160
  splice doctor
171
161
  ```
172
162
 
173
- Set a provider key before setup or enter it in the wizard:
163
+ Provider keys can come from environment variables, the setup flow, or the local
164
+ credential store. Splice also supports selected OAuth flows.
174
165
 
175
166
  ```bash
176
- export OPENAI_API_KEY=sk-...
167
+ export OPENAI_API_KEY=...
177
168
  export ANTHROPIC_API_KEY=...
178
169
  export GEMINI_API_KEY=...
179
170
  ```
180
171
 
181
- Local models work through Ollama or LM Studio. Model-backed stages require tool
182
- calling. If a provider returns an invalid typed payload, Splice retries the
183
- correction and then reports an actionable error. It does not silently switch a
184
- local run to a cloud provider.
172
+ Local models can use Ollama or LM Studio. Pipeline stages that return typed data
173
+ need a model with tool-call support. Splice reports invalid responses. It does not select another provider without
174
+ your request.
185
175
 
186
- ## Safety is part of the workflow
176
+ Read [Configuration](docs/CONFIGURATION.md) and
177
+ [OAuth and provider login](docs/oauth-subscriptions.md) for supported setup
178
+ paths.
187
179
 
188
- Splice makes side effects visible instead of hiding them behind an autonomous
189
- mode:
180
+ ## Extensions and repository tools
190
181
 
191
- - workspace reads are allowed by default;
192
- - writes stay inside the workspace unless you grant another root;
193
- - shell commands, network access, destructive actions, and elevated actions are
194
- permission-gated;
195
- - `--add-dir <path>` grants a specific additional write root;
196
- - unsafe and autonomous modes are explicit opt-ins;
197
- - sandbox policy and grants can be inspected before a run.
182
+ Splice includes the Zero extension surfaces for interactive agent runs:
198
183
 
199
- ```bash
200
- splice sandbox policy
201
- splice sandbox grants list
202
- splice exec --add-dir ../shared "update both repositories"
203
- ```
184
+ - MCP servers and tools
185
+ - local skills and plugins
186
+ - hooks and plugin tools
187
+ - named specialists
188
+ - session search and lineage
189
+ - repository maps and verification commands
190
+ - background jobs and editor protocols
204
191
 
205
- Read [SECURITY.md](SECURITY.md) for the threat model and reporting process.
192
+ The deterministic pipeline uses a smaller fixed tool set. It does not load every
193
+ interactive extension into each stage. See [Pipeline behavior](docs/PIPELINE.md)
194
+ for the boundary.
206
195
 
207
- ## A small CLI surface for big workflows
196
+ ## Command map
208
197
 
209
- | Command | What it is for |
198
+ | Command | Purpose |
210
199
  |---|---|
211
- | `splice` | Interactive TUI |
212
- | `splice exec` | One-shot and scripted runs |
213
- | `splice setup` | First-run provider setup |
214
- | `splice providers` / `models` | Provider profiles and model capabilities |
215
- | `splice doctor` | Setup and connectivity checks |
216
- | `splice spec` | Spec-mode drafts |
217
- | `splice sessions` | Resume, fork, and inspect sessions |
218
- | `splice specialist` | Specialist subagents |
219
- | `splice skills` / `plugins` / `hooks` | Extend the agent locally |
220
- | `splice mcp` | Configure MCP servers and tools |
221
- | `splice worktrees` | Prepare isolated git worktrees |
222
- | `splice verify` | Find and run repository checks |
223
- | `splice update` / `upgrade` | Keep the binary current |
200
+ | `splice` | Open the interactive TUI. |
201
+ | `splice exec` | Run one request or a saved plan. |
202
+ | `splice setup` | Configure the first provider and model. |
203
+ | `splice config` | Inspect resolved configuration without secret values. |
204
+ | `splice flags` | List feature flags and where each value comes from. |
205
+ | `splice pipeline` | List, show, use, export, import, or edit pipeline topologies. |
206
+ | `splice providers` / `models` | Manage provider profiles and inspect models. |
207
+ | `splice doctor` | Check configuration and provider health. |
208
+ | `splice sessions` / `search` | Inspect local session history. |
209
+ | `splice spec` | Review saved specification drafts. |
210
+ | `splice specialist` | Manage named specialists. |
211
+ | `splice skills` / `plugins` / `hooks` / `mcp` | Manage local extensions. |
212
+ | `splice sandbox` | Inspect policy and persistent grants. |
213
+ | `splice worktrees` / `changes` | Isolate and manage repository changes. |
214
+ | `splice verify` | Detect and run repository checks. |
215
+ | `splice usage` | Report token use and available cost estimates. |
216
+ | `splice update` / `upgrade` | Check for or install a release. |
217
+
218
+ For agent nodes and the browser view (`/web`), see
219
+ [Custom topologies](docs/PIPELINE.md#custom-topologies).
220
+
221
+ Read [Command guide](docs/COMMANDS.md) for the complete command groups. The live
222
+ `splice --help` output remains the exact flag reference.
224
223
 
225
224
  ## Documentation
226
225
 
226
+ - [Documentation index](docs/README.md)
227
227
  - [Install Splice](docs/INSTALL.md)
228
- - [Update flow](docs/UPDATE.md)
228
+ - [Configuration](docs/CONFIGURATION.md)
229
+ - [Command guide](docs/COMMANDS.md)
230
+ - [Pipeline behavior](docs/PIPELINE.md)
229
231
  - [Stream-JSON protocol](docs/STREAM_JSON_PROTOCOL.md)
232
+ - [Update Splice](docs/UPDATE.md)
230
233
  - [Specialists](docs/SPECIALISTS.md)
231
234
  - [GitHub Action](docs/GITHUB_ACTION.md)
232
- - [Benchmarks](docs/BENCHMARK.md)
233
- - [Performance](docs/PERFORMANCE.md)
234
- - [Agent evaluations](docs/AGENT_EVALS.md)
235
- - [OAuth logins and subscriptions](docs/oauth-subscriptions.md)
235
+ - [Benchmarks and evaluations](docs/BENCHMARK.md)
236
236
 
237
237
  ## For contributors
238
238
 
239
- Splice-specific pipeline code lives in `internal/splice/`. It is pure Go and
240
- keeps provider SDKs out of the pipeline layer. The optional memory sidecar is a
241
- separate module in `memd/` and communicates over a Unix socket.
239
+ Splice is a Go project. The optional memory sidecar is a separate Go module.
242
240
 
243
241
  ```bash
244
- go test ./...
245
- go vet ./...
246
- gofmt -l .
247
- cd memd && go test ./...
242
+ make check
243
+ make test-memd
244
+ make test-cli-tui
248
245
  ```
249
246
 
250
- Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a change. The project is
251
- currently using an issue-first contribution policy.
247
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) before you start work. The project uses
248
+ an issue-first contribution policy.
252
249
 
253
- ## Built on Zero's Engine
250
+ ## Zero foundation
254
251
 
255
- Splice is built on top of [Gitlawb's Zero Engine](https://github.com/gitlawb/zero),
256
- an open-source MIT-licensed terminal coding agent. Zero provides the TUI,
257
- provider adapters, sessions, tools, sandbox, permissions, worktrees, MCP,
258
- skills, plugins, and hooks. Splice keeps that foundation and adds the
259
- orchestrator-mediated pipeline, typed stage contracts, deterministic checks,
260
- trajectory monitoring, and the optional memory sidecar.
252
+ Splice is a fork of [Zero](https://github.com/gitlawb/zero), an MIT-licensed
253
+ terminal code agent. Zero supplies the TUI, provider adapters, tool registry,
254
+ sandbox, sessions, worktrees, and extension systems.
261
255
 
262
- Upstream Zero code retains its original copyright and license. See
263
- [LICENSE](LICENSE) and [SECURITY.md](SECURITY.md).
256
+ Splice adds the typed pipeline, design workflow, deterministic verification,
257
+ trajectory control, and optional local memory. Upstream code retains its
258
+ original copyright and license.
264
259
 
265
260
  ## License
266
261
 
267
- Splice is released under the [MIT License](LICENSE).
262
+ Splice is available under the [MIT License](LICENSE).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@taf0711/splice",
3
- "version": "0.1.4",
4
- "description": "Splice — a fast, multi-provider terminal coding agent.",
3
+ "version": "0.3.0",
4
+ "description": "A local-first terminal code agent with a typed execution pipeline.",
5
5
  "type": "module",
6
6
  "module": "bin/splice.js",
7
7
  "bin": {