@skein-code/cli 0.3.4 → 0.3.6
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 +43 -63
- package/dist/cli.js +1195 -1836
- 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
|
|
@@ -248,7 +247,7 @@ Run `skein <command> --help` for complete flags.
|
|
|
248
247
|
|
|
249
248
|
A cloned repository must not be able to execute commands merely by committing
|
|
250
249
|
`.mosaic/config.*`. Skein therefore ignores project-defined hooks, custom
|
|
251
|
-
|
|
250
|
+
verification commands, checkpoint overrides, and
|
|
252
251
|
permission policy by default. It also ignores remote model provider/endpoint
|
|
253
252
|
overrides and their project-stored API keys; loopback compatible endpoints and
|
|
254
253
|
local credentials remain available for local models. Review the file first,
|
|
@@ -288,10 +287,8 @@ model:
|
|
|
288
287
|
maxTokens: 8192
|
|
289
288
|
|
|
290
289
|
context:
|
|
291
|
-
engine: auto
|
|
292
290
|
maxTokens: 12000
|
|
293
291
|
topK: 12
|
|
294
|
-
contextEngineCommand: contextengine
|
|
295
292
|
|
|
296
293
|
permissions:
|
|
297
294
|
read: allow
|
|
@@ -350,52 +347,35 @@ trust and lifecycle contract.
|
|
|
350
347
|
to the project directory; use `--add-workspace` for an intentionally external
|
|
351
348
|
root.
|
|
352
349
|
|
|
353
|
-
##
|
|
350
|
+
## Local retrieval
|
|
354
351
|
|
|
355
|
-
Skein
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
structured degradation metadata. `contextengine` makes those conditions hard
|
|
361
|
-
errors, while `local` never starts an external process.
|
|
352
|
+
Skein indexes supported source files into the project-local `.skein/index.json`
|
|
353
|
+
namespace. The index combines BM25 term scoring with path, symbol, phrase, and
|
|
354
|
+
CJK token signals, then repacks verified spans under the configured token cap.
|
|
355
|
+
`skein index` is explicit and repeatable; `search`, `context`, and the agent
|
|
356
|
+
automatically load the local index and never start an external process.
|
|
362
357
|
|
|
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
|
|
358
|
+
Index entries are constrained to configured workspace roots. Before a result is
|
|
359
|
+
packed into a prompt, Skein rechecks the current file and rejects entries that
|
|
360
|
+
are stale, moved, symlinked, binary, or outside the workspace. Retrieval is
|
|
361
|
+
evidence only: the model must still confirm factual claims with read or other
|
|
362
|
+
workspace tools.
|
|
373
363
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
364
|
+
To measure a local index change, run the reproducible benchmark with an explicit
|
|
365
|
+
query-to-relevant-file manifest:
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
npm run benchmark:context -- \
|
|
369
|
+
--workspace test/fixtures/context-benchmark \
|
|
370
|
+
--cases test/fixtures/context-benchmark.json \
|
|
371
|
+
--fresh-index
|
|
377
372
|
```
|
|
378
373
|
|
|
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`.
|
|
374
|
+
It reports Recall@5/10/20, MRR, useful-token ratio, stale-hit rate, and cold,
|
|
375
|
+
incremental, and warm-query latency. The included fixture only validates the
|
|
376
|
+
metric pipeline; it is not evidence for performance on a production repository.
|
|
377
|
+
`--fresh-index` deletes and rebuilds that workspace's local index, so use it only
|
|
378
|
+
where rebuilding the index is intended.
|
|
399
379
|
|
|
400
380
|
## Safety model
|
|
401
381
|
|
|
@@ -417,7 +397,7 @@ visible in TUI context telemetry, headless output, direct JSON commands, and
|
|
|
417
397
|
command when a repository workflow genuinely needs them.
|
|
418
398
|
- Git operations that may invoke transport, signing, merge, or checkout helpers
|
|
419
399
|
require the `shell` category in addition to Git/write/network as applicable.
|
|
420
|
-
Git
|
|
400
|
+
Git executables are resolved outside workspace-controlled
|
|
421
401
|
`PATH` entries.
|
|
422
402
|
- Git checkpoints include dirty and explicitly named paths before a mutation.
|
|
423
403
|
Branch switches can change clean tracked files that cannot be predicted
|