@taf0711/splice 0.2.0 → 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.
- package/README.md +164 -169
- 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>
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
|
44
|
+
splice exec "fix the test failure in ./pkg"
|
|
34
45
|
```
|
|
35
46
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
62
|
+
Use `/exec <prompt>` when you do not need a design conversation. The command
|
|
63
|
+
starts the execution pipeline directly.
|
|
41
64
|
|
|
42
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
78
|
+
`splice exec` supports text, JSON, and JSONL output. It also supports session
|
|
79
|
+
resume, isolated worktrees, and explicit autonomy limits.
|
|
50
80
|
|
|
51
|
-
|
|
52
|
-
irm https://raw.githubusercontent.com/Taf0711/splice/main/scripts/install.ps1 | iex
|
|
53
|
-
```
|
|
81
|
+
### Run in CI
|
|
54
82
|
|
|
55
|
-
Use the
|
|
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
|
-
```
|
|
58
|
-
|
|
86
|
+
```bash
|
|
87
|
+
splice exec --output-format stream-json "run the repository checks"
|
|
59
88
|
```
|
|
60
89
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
102
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
112
|
-
|
|
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
|
-
|
|
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
|
-
|
|
127
|
+
Splice keeps the inherited Zero safety controls in every run.
|
|
125
128
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
135
|
-
text or glyph markers.
|
|
136
|
-
|
|
137
|
-
### Headless
|
|
136
|
+
Inspect the active policy before a sensitive run:
|
|
138
137
|
|
|
139
138
|
```bash
|
|
140
|
-
splice
|
|
141
|
-
splice
|
|
142
|
-
splice exec --
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
152
|
-
|
|
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
|
-
|
|
158
|
-
[docs/STREAM_JSON_PROTOCOL.md](docs/STREAM_JSON_PROTOCOL.md).
|
|
151
|
+
## Providers and models
|
|
159
152
|
|
|
160
|
-
|
|
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
|
-
|
|
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
|
|
167
|
+
export OPENAI_API_KEY=...
|
|
177
168
|
export ANTHROPIC_API_KEY=...
|
|
178
169
|
export GEMINI_API_KEY=...
|
|
179
170
|
```
|
|
180
171
|
|
|
181
|
-
Local models
|
|
182
|
-
|
|
183
|
-
|
|
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
|
-
|
|
176
|
+
Read [Configuration](docs/CONFIGURATION.md) and
|
|
177
|
+
[OAuth and provider login](docs/oauth-subscriptions.md) for supported setup
|
|
178
|
+
paths.
|
|
187
179
|
|
|
188
|
-
|
|
189
|
-
mode:
|
|
180
|
+
## Extensions and repository tools
|
|
190
181
|
|
|
191
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
196
|
+
## Command map
|
|
208
197
|
|
|
209
|
-
| Command |
|
|
198
|
+
| Command | Purpose |
|
|
210
199
|
|---|---|
|
|
211
|
-
| `splice` |
|
|
212
|
-
| `splice exec` |
|
|
213
|
-
| `splice setup` |
|
|
214
|
-
| `splice
|
|
215
|
-
| `splice
|
|
216
|
-
| `splice
|
|
217
|
-
| `splice
|
|
218
|
-
| `splice
|
|
219
|
-
| `splice
|
|
220
|
-
| `splice
|
|
221
|
-
| `splice
|
|
222
|
-
| `splice
|
|
223
|
-
| `splice
|
|
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
|
-
- [
|
|
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
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
|
251
|
-
|
|
247
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) before you start work. The project uses
|
|
248
|
+
an issue-first contribution policy.
|
|
252
249
|
|
|
253
|
-
##
|
|
250
|
+
## Zero foundation
|
|
254
251
|
|
|
255
|
-
Splice is
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
263
|
-
|
|
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
|
|
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.
|
|
4
|
-
"description": "
|
|
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": {
|