@skein-code/cli 0.3.5 → 0.3.7
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 +46 -64
- package/dist/cli.js +1240 -1860
- package/dist/cli.js.map +1 -1
- package/docs/ARCHITECTURE.md +49 -18
- package/docs/NEXT_STEPS.md +26 -46
- package/docs/PRODUCT.md +3 -16
- package/docs/PRODUCT_BENCHMARK.md +2 -2
- package/examples/config.yaml +0 -2
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
Skein understands the change surface before it edits, exposes every tool call,
|
|
6
6
|
and keeps sessions and pre-write checkpoints on your machine. It supports
|
|
7
|
-
OpenAI, Anthropic, Gemini, and OpenAI-compatible endpoints, with
|
|
8
|
-
|
|
9
|
-
an optional high-quality retrieval layer and a built-in local index as the
|
|
10
|
-
zero-service fallback.
|
|
7
|
+
OpenAI, Anthropic, Gemini, and OpenAI-compatible endpoints, with a local,
|
|
8
|
+
inspectable index for code retrieval and no retrieval service dependency.
|
|
11
9
|
|
|
12
10
|
```text
|
|
13
11
|
◆ SKEIN · ~/work/api ● BUILD
|
|
14
|
-
anthropic/claude-sonnet-4-5 · context
|
|
12
|
+
anthropic/claude-sonnet-4-5 · context local · memory on · agents 3
|
|
15
13
|
|
|
16
14
|
› Find the webhook retry bug and add a regression test.
|
|
17
|
-
◇ context
|
|
18
|
-
· prompt/debug intent:debug · working-memory · code:
|
|
15
|
+
◇ context local · 12 spans · ~8.4k
|
|
16
|
+
· prompt/debug intent:debug · working-memory · code:local
|
|
19
17
|
✓ read_file src/billing/webhook.ts 31ms
|
|
20
18
|
✓ apply_patch src/billing/webhook.ts 18ms
|
|
21
19
|
|
|
@@ -36,8 +34,8 @@ zero-service fallback.
|
|
|
36
34
|
features, suitable for local scripts and CI.
|
|
37
35
|
- **Model ownership:** use four provider families without changing the agent or
|
|
38
36
|
session format.
|
|
39
|
-
- **Retrieval you control:**
|
|
40
|
-
|
|
37
|
+
- **Retrieval you control:** run the local BM25/path/symbol index, inspect its
|
|
38
|
+
source spans, and rebuild it explicitly when needed.
|
|
41
39
|
- **Visible trust:** per-category permissions, deny rules, hooks, workspace path
|
|
42
40
|
enforcement, changed-file telemetry, and persisted tool results.
|
|
43
41
|
- **Reversible work:** Skein snapshots affected files before mutation without
|
|
@@ -60,7 +58,6 @@ The product rationale and competitor research are in
|
|
|
60
58
|
- Node.js 22.16 or newer
|
|
61
59
|
- A model API key, or an OpenAI-compatible local endpoint
|
|
62
60
|
- Optional: Git and ripgrep
|
|
63
|
-
- Optional: ContextEngine-plugin plus PostgreSQL/pgvector
|
|
64
61
|
|
|
65
62
|
## Install
|
|
66
63
|
|
|
@@ -96,10 +93,11 @@ environment variables remain compatible with this release.
|
|
|
96
93
|
## Quick start
|
|
97
94
|
|
|
98
95
|
On the first interactive `skein` run, an incomplete model configuration opens
|
|
99
|
-
a keyboard-driven setup before any session is created.
|
|
100
|
-
|
|
101
|
-
Anthropic, and Gemini subscription logins are
|
|
102
|
-
|
|
96
|
+
a keyboard-driven setup before any session is created. Choose a provider API
|
|
97
|
+
key or an explicitly configured compatible endpoint; Skein never guesses the
|
|
98
|
+
protocol or destination. OpenAI, Anthropic, and Gemini subscription logins are
|
|
99
|
+
not API credentials. Signed-in coding CLIs remain delegated tools rather than
|
|
100
|
+
primary model connections.
|
|
103
101
|
|
|
104
102
|
For non-interactive setup, set credentials for one provider:
|
|
105
103
|
|
|
@@ -151,14 +149,15 @@ Explain the race in @src/queue/worker.ts and fix it with the smallest change.
|
|
|
151
149
|
The transcript stays on the terminal's native background. A thin rule marks the
|
|
152
150
|
composer; consequential permission requests become an inline warning band with
|
|
153
151
|
the exact tool target and working directory. Enter sends a request, or steers the current run when it is busy;
|
|
154
|
-
`Alt+Enter` queues a follow-up, while `
|
|
155
|
-
|
|
156
|
-
latest tool result, and Escape
|
|
152
|
+
`Alt+Enter` queues a follow-up, while `/queue` lists, removes, or clears pending
|
|
153
|
+
follow-ups. `Ctrl+J` or `Shift+Enter` inserts a newline. `Ctrl+R` searches prompt
|
|
154
|
+
history, `Ctrl+O` expands or collapses the latest tool result, and Escape first
|
|
155
|
+
dismisses an active completion palette, then interrupts the current run. The composer supports
|
|
157
156
|
multiline cursor movement, word movement/deletion, `Ctrl+U`/`Ctrl+K`, and
|
|
158
157
|
bounded undo/redo. Type `/` for a keyboard-navigable command palette, or run
|
|
159
158
|
`/hotkeys` inside Skein.
|
|
160
159
|
|
|
161
|
-
Useful interactive commands include `/workflow`, `/context`, `/mode`, `/memory`,
|
|
160
|
+
Useful interactive commands include `/workflow`, `/context`, `/mode`, `/queue`, `/memory`,
|
|
162
161
|
`/remember`, `/skills`, `/agents`, `/mcp`, `/tools`, `/permissions`, and
|
|
163
162
|
`/theme`. `/transcript` reveals bounded full tool results, `/changes` lists
|
|
164
163
|
session writes, `/diff` opens the current Git diff through the normal permission
|
|
@@ -181,7 +180,9 @@ as `accent`, `text`, `muted`, `success`, and `error`. Set
|
|
|
181
180
|
`SKEIN_GLYPHS=ascii` when a terminal or multiplexer renders Unicode symbols
|
|
182
181
|
inconsistently. `NO_COLOR=1` or `ui.color: false` removes palette colors while
|
|
183
182
|
keeping status symbols and semantic labels intact. `/density compact` and
|
|
184
|
-
`/density comfortable` control vertical rhythm.
|
|
183
|
+
`/density comfortable` control vertical rhythm. Skein enables Kitty keyboard
|
|
184
|
+
enhancements without probing when Kitty, WezTerm, Ghostty, or foot declares
|
|
185
|
+
support; set `SKEIN_KITTY_KEYBOARD=on|off` to override detection.
|
|
185
186
|
|
|
186
187
|
Run `skein doctor --visual` to inspect terminal width, color mode, glyph
|
|
187
188
|
fallback, keyboard protocol support, and a CJK/emoji/box-drawing calibration
|
|
@@ -248,7 +249,7 @@ Run `skein <command> --help` for complete flags.
|
|
|
248
249
|
|
|
249
250
|
A cloned repository must not be able to execute commands merely by committing
|
|
250
251
|
`.mosaic/config.*`. Skein therefore ignores project-defined hooks, custom
|
|
251
|
-
|
|
252
|
+
verification commands, checkpoint overrides, and
|
|
252
253
|
permission policy by default. It also ignores remote model provider/endpoint
|
|
253
254
|
overrides and their project-stored API keys; loopback compatible endpoints and
|
|
254
255
|
local credentials remain available for local models. Review the file first,
|
|
@@ -288,10 +289,8 @@ model:
|
|
|
288
289
|
maxTokens: 8192
|
|
289
290
|
|
|
290
291
|
context:
|
|
291
|
-
engine: auto
|
|
292
292
|
maxTokens: 12000
|
|
293
293
|
topK: 12
|
|
294
|
-
contextEngineCommand: contextengine
|
|
295
294
|
|
|
296
295
|
permissions:
|
|
297
296
|
read: allow
|
|
@@ -350,52 +349,35 @@ trust and lifecycle contract.
|
|
|
350
349
|
to the project directory; use `--add-workspace` for an intentionally external
|
|
351
350
|
root.
|
|
352
351
|
|
|
353
|
-
##
|
|
352
|
+
## Local retrieval
|
|
354
353
|
|
|
355
|
-
Skein
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
structured degradation metadata. `contextengine` makes those conditions hard
|
|
361
|
-
errors, while `local` never starts an external process.
|
|
354
|
+
Skein indexes supported source files into the project-local `.skein/index.json`
|
|
355
|
+
namespace. The index combines BM25 term scoring with path, symbol, phrase, and
|
|
356
|
+
CJK token signals, then repacks verified spans under the configured token cap.
|
|
357
|
+
`skein index` is explicit and repeatable; `search`, `context`, and the agent
|
|
358
|
+
automatically load the local index and never start an external process.
|
|
362
359
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
export CONTEXTENGINE_DATABASE_URL=postgresql://contextengine:contextengine@127.0.0.1:54329/contextengine
|
|
369
|
-
# Optional semantic channel, using an embedding-specific credential:
|
|
370
|
-
# export CONTEXTENGINE_EMBEDDING_API_KEY=...
|
|
371
|
-
# export CONTEXTENGINE_EMBEDDING_BASE_URL=https://embedding.example/v1
|
|
372
|
-
# export CONTEXTENGINE_EMBEDDING_MODEL=your-embedding-model
|
|
360
|
+
Index entries are constrained to configured workspace roots. Before a result is
|
|
361
|
+
packed into a prompt, Skein rechecks the current file and rejects entries that
|
|
362
|
+
are stale, moved, symlinked, binary, or outside the workspace. Retrieval is
|
|
363
|
+
evidence only: the model must still confirm factual claims with read or other
|
|
364
|
+
workspace tools.
|
|
373
365
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
366
|
+
To measure a local index change, run the reproducible benchmark with an explicit
|
|
367
|
+
query-to-relevant-file manifest:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
npm run benchmark:context -- \
|
|
371
|
+
--workspace test/fixtures/context-benchmark \
|
|
372
|
+
--cases test/fixtures/context-benchmark.json \
|
|
373
|
+
--fresh-index
|
|
377
374
|
```
|
|
378
375
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
ContextEngine status cannot prove that every indexed line still matches the
|
|
386
|
-
filesystem. Skein realpath-checks each result, verifies its hash and current line
|
|
387
|
-
content, and reruns the entire query locally if any hit is stale or invalid.
|
|
388
|
-
Empty external results in `auto` mode are cross-checked against the current
|
|
389
|
-
local index so newly added files are not silently missed. ContextEngine's
|
|
390
|
-
synthetic commit-lineage hits are reconstructed from the current repository
|
|
391
|
-
with a constrained read-only Git invocation before use. The external
|
|
392
|
-
`packedText` is never passed directly to a model; Skein repacks only verified
|
|
393
|
-
current-file or commit-summary spans under its own token cap.
|
|
394
|
-
|
|
395
|
-
ContextEngine remains an optional adapter, not a hidden hard dependency. The
|
|
396
|
-
local fallback keeps Skein useful offline, and fallback reason/remediation is
|
|
397
|
-
visible in TUI context telemetry, headless output, direct JSON commands, and
|
|
398
|
-
`skein doctor`.
|
|
376
|
+
It reports Recall@5/10/20, MRR, useful-token ratio, stale-hit rate, and cold,
|
|
377
|
+
incremental, and warm-query latency. The included fixture only validates the
|
|
378
|
+
metric pipeline; it is not evidence for performance on a production repository.
|
|
379
|
+
`--fresh-index` deletes and rebuilds that workspace's local index, so use it only
|
|
380
|
+
where rebuilding the index is intended.
|
|
399
381
|
|
|
400
382
|
## Safety model
|
|
401
383
|
|
|
@@ -417,7 +399,7 @@ visible in TUI context telemetry, headless output, direct JSON commands, and
|
|
|
417
399
|
command when a repository workflow genuinely needs them.
|
|
418
400
|
- Git operations that may invoke transport, signing, merge, or checkout helpers
|
|
419
401
|
require the `shell` category in addition to Git/write/network as applicable.
|
|
420
|
-
Git
|
|
402
|
+
Git executables are resolved outside workspace-controlled
|
|
421
403
|
`PATH` entries.
|
|
422
404
|
- Git checkpoints include dirty and explicitly named paths before a mutation.
|
|
423
405
|
Branch switches can change clean tracked files that cannot be predicted
|