@shadowclone/cli 0.0.9 → 0.0.12
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 +50 -76
- package/bin/shadowclone.mjs +5 -0
- package/dist/_.._/web/client/index.html +150 -0
- package/dist/shadowclone.js +922 -254
- package/dist/web/index-174jt7gq.css +1 -0
- package/dist/web/index-1ezbn24z.js +133 -0
- package/dist/web/shadowclone-mark-w6a76wqy.svg +42 -0
- package/evals.md +230 -57
- package/package.json +2 -2
- package/skills/design-deep-modules/SKILL.md +10 -20
- package/skills/diagnose-before-editing/SKILL.md +12 -23
- package/skills/prove-regression-tests/SKILL.md +9 -18
- package/skills/research-primary-sources/SKILL.md +9 -18
- package/skills/resolve-conflicts-by-intent/SKILL.md +10 -19
- package/skills/scope-confirmed-changes/SKILL.md +9 -19
- package/skills/testing-first/SKILL.md +10 -21
- package/skills/testing-risk-based/SKILL.md +9 -16
- package/skills/typescript-type-safety/SKILL.md +12 -18
- package/skills/verify-and-review/SKILL.md +10 -19
package/README.md
CHANGED
|
@@ -1,104 +1,78 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
Shadowclone
|
|
3
|
+
# Shadowclone
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Shadowclone maintains the skills, instructions, and checks that help **Claude Code, Codex, Cursor, and Antigravity** follow your engineering preferences. It works with the coding agents you already use and keeps you in control of what it reads and changes.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
Every source has its own setting, defaults off, and appears by name before consent. The default setup asks one grouped question for detected session sources, Git remote names, and existing agent context. It asks separately about skills and background learning. `init --advanced` offers individual source choices. The paths that may be read are:
|
|
10
|
-
|
|
11
|
-
| Source | Path |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| Claude Code sessions | `~/.claude/projects/` |
|
|
14
|
-
| Claude prompt history | `~/.claude/history.jsonl` |
|
|
15
|
-
| Codex sessions | `~/.codex/sessions/` or `$CODEX_HOME/sessions/` when set |
|
|
16
|
-
| Cursor chats | `~/.cursor/chats/` |
|
|
17
|
-
| Antigravity logs | `~/.gemini/antigravity-cli/brain/` |
|
|
18
|
-
| Shell history | `~/.zsh_history`, `~/.bash_history` |
|
|
19
|
-
| Repository guidance | root `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, and direct `SKILL.md` files under `.claude/skills/` and `.agents/skills/` |
|
|
20
|
-
| Agent context | `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.codex/AGENTS.override.md`, supported personal and repository skill roots, and `~/.claude/projects/<repo>/memory/` or `~/.codex/memories/`, only for consented evaluation |
|
|
21
|
-
| Skill library | `~/.claude/skills/`, `~/.agents/skills/`, `~/.codex/skills/`, `~/.cursor/skills/`, `~/.gemini/config/skills/`, configured repository roots, and selected provider plugin caches |
|
|
22
|
-
| Git metadata | repository Git remote names |
|
|
7
|
+
## Get started
|
|
23
8
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Learning sends eligible redacted excerpts through your own authenticated agent CLI. Evaluation also gives that CLI access to a disposable repository snapshot and sends generated code to judges without redaction. Use only repositories you are authorized to send to that provider. A remote action from `shadowclone run` needs separate approval for that run. There is no Shadowclone service, API key, account, or telemetry. The profile is Markdown under `~/.shadowclone/profile/`; you can read, edit, or delete it. `shadowclone forget --all` removes Shadowclone's local state and recorded integrations, preserving unrelated content and stopping on conflicting edits. Your original transcripts remain where your agents wrote them. [Privacy design](docs/architecture/05-privacy.md).
|
|
27
|
-
|
|
28
|
-
## Install
|
|
9
|
+
Install the CLI:
|
|
29
10
|
|
|
30
11
|
```bash
|
|
31
12
|
npm install -g @shadowclone/cli
|
|
32
|
-
shadowclone init
|
|
33
13
|
```
|
|
34
14
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`init`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
2. Keep your skills in sync across the detected agents?
|
|
41
|
-
3. Keep improving in the background as you work?
|
|
15
|
+
| Step | Command | What happens | Time |
|
|
16
|
+
| --- | --- | --- | ---: |
|
|
17
|
+
| 1 | `shadowclone init` | Answer three questions about learning and skill maintenance | About 1 minute |
|
|
18
|
+
| 2 | `shadowclone learn --deep` | Learn from enabled past sessions; repeat if more history remains | Up to 5 minutes per run |
|
|
19
|
+
| 3 | `shadowclone wizard` | Choose skills in the browser and review the files before applying them | About 1 minute |
|
|
42
20
|
|
|
43
|
-
|
|
21
|
+
Setup takes about two to three minutes, excluding learning. Deep learning needs an installed and authenticated `claude`, `codex`, or `cursor-agent` CLI.
|
|
44
22
|
|
|
45
|
-
|
|
23
|
+
**Skip learning.** Run `shadowclone wizard` by itself if you do not want Shadowclone to read sessions or call a model. It starts from an empty active environment and lets you choose a build locally.
|
|
46
24
|
|
|
47
|
-
|
|
25
|
+
**For coding agents.** Install the CLI, run `shadowclone wizard --no-open`, and give the user the printed local URL. Keep the command running while they edit their build. `shadowclone init` asks consent questions and needs the user.
|
|
48
26
|
|
|
49
|
-
|
|
50
|
-
enabled transcripts -> local index -> steering episodes -> redacted reconciliation
|
|
51
|
-
-> editable profile
|
|
52
|
-
profile + personal skills -> native agents and clones -> new transcripts
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Plain `shadowclone learn` updates the local index and prints a structural report without model calls or profile writes. `shadowclone learn --deep` works through the oldest unprocessed episodes in bounded batches, proposes changes, and asks before applying them. `--deep --apply` accepts that local write without a prompt. Explicit reusable guidance can become active from one session; inferred behavior needs three independent sessions. The processed ledger lets later runs continue through older history. `shadowclone remember --repo "Use complete variable names."` records a direct preference immediately.
|
|
27
|
+
## Evaluations
|
|
56
28
|
|
|
57
|
-
The
|
|
29
|
+
The preference study tested ordinary coding tasks on GPT-6 Sol, GPT-6 Luna, Sonnet 5.5, and Opus 5.5. Each agent ran with no personal help, with existing skills, with Shadowclone skills, and with Shadowclone skills plus deep learning.
|
|
58
30
|
|
|
59
|
-
|
|
31
|
+
| Share of preferences followed | GPT-6 Sol | GPT-6 Luna | Sonnet 5.5 | Opus 5.5 |
|
|
32
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
33
|
+
| Agent alone | 72% | 73% | 55% | 57% |
|
|
34
|
+
| With Shadowclone skills | 84% | 83% | 68% | 68% |
|
|
35
|
+
| With Shadowclone skills and deep learning | 97% | 88% | 76% | 82% |
|
|
36
|
+
| Improvement with skills and deep learning | **+25** | **+15** | **+22** | **+25** |
|
|
60
37
|
|
|
61
|
-
|
|
38
|
+
Here is what changed in practice. Each cell compares the agent alone with Shadowclone skills and deep learning.
|
|
62
39
|
|
|
63
|
-
|
|
40
|
+
| Preference | GPT-6 Sol | GPT-6 Luna | Sonnet 5.5 | Opus 5.5 |
|
|
41
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
42
|
+
| Review reply preferences | 2 of 6 → 6 of 6 | 2 of 6 → 6 of 6 | 0 of 6 → 6 of 6 | 0 of 6 → 6 of 6 |
|
|
43
|
+
| Failing test first | 0 of 3 → 3 of 3 | 0 of 3 → 2 of 3 | 0 of 3 → 0 of 3 | 0 of 3 → 2 of 3 |
|
|
44
|
+
| Pull request checklist | 0 of 3 → 3 of 3 | 3 of 3 → 3 of 3 | 0 of 3 → 1 of 3 | 2 of 3 → 3 of 3 |
|
|
64
45
|
|
|
65
|
-
|
|
46
|
+
Skills with deep learning beat the agent alone on all four agents by 15 to 25 points. The gain is statistically clear on GPT-6 Sol and Opus 5.5, and directional on the other two. The participant's existing skills scored in the same range and slightly higher on GPT-6 Luna. [Read the tasks, intervals, and limitations](evals.md).
|
|
66
47
|
|
|
67
|
-
|
|
48
|
+
## Privacy comes first
|
|
68
49
|
|
|
69
|
-
|
|
50
|
+
**There is no Shadowclone collection service or telemetry.** Learning records, revisions, and original-library snapshots stay on your machine. Model work goes through the authenticated agent CLI you select and is subject to that provider's terms.
|
|
70
51
|
|
|
71
|
-
|
|
72
|
-
shadowclone eval --repo /path/to/repository --engine codex --model gpt-5.6-sol --reasoning-effort medium --tasks 3 --repeat 2
|
|
73
|
-
```
|
|
52
|
+
**You choose what it reads.** Every capture source is off by default and has its own consent setting. Reading sessions does not silently enable memory, repository metadata, or skill editing.
|
|
74
53
|
|
|
75
|
-
|
|
54
|
+
| Operation | What the selected provider can receive |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| Learning and skill maintenance | Selected redacted instructions, steering, and supporting context |
|
|
57
|
+
| Browser editor | Nothing merely from opening it; optional AI drafting sends reviewed form fields |
|
|
58
|
+
| Delegated `run` | The authorized task worktree and guidance |
|
|
59
|
+
| Evaluation | Synthetic prompts, the tested setup's guidance, and generated code |
|
|
76
60
|
|
|
77
|
-
|
|
61
|
+
**Redaction is a boundary, not an anonymity guarantee.** Tool results, tool-returned file contents, thinking blocks, and data-access results are excluded from learning. Use only sources and repositories you are authorized to send to the selected provider.
|
|
78
62
|
|
|
79
|
-
|
|
63
|
+
**Removal stays in your control.** Disable background learning with `shadowclone learning disable`, stop automatic skill edits with `shadowclone skills automatic off`, or remove recorded state with `shadowclone forget --all`. See [data handling](docs/data-handling.md) and [enterprise controls](docs/architecture/07-enterprise.md) for sources, storage, managed policy, and removal details.
|
|
80
64
|
|
|
81
|
-
|
|
82
|
-
| ---: | ---: | ---: |
|
|
83
|
-
| 55/68 (80.9%) | 59/68 (86.8%) | 62/68 (91.2%) |
|
|
65
|
+
## Guides
|
|
84
66
|
|
|
85
|
-
|
|
67
|
+
| Guide | Use it to |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| [Agent builds](docs/guides/agent-builds.md) | Choose, create, and equip skills |
|
|
70
|
+
| [Learning](docs/guides/learning.md) | Run deep learning, background learning, or record a preference |
|
|
71
|
+
| [Skill maintenance](docs/guides/skills.md) | Review updates, conflicts, history, and undo |
|
|
72
|
+
| [Repository setup](docs/guides/repositories.md) | Share checks and skills with a repository |
|
|
73
|
+
| [How it works](docs/guides/how-it-works.md) | Follow guidance from consented evidence to coding agents |
|
|
74
|
+
| [Command reference](docs/guides/commands.md) | Find everyday and advanced commands |
|
|
86
75
|
|
|
87
|
-
|
|
76
|
+
**Further reading:** [Documentation index](docs/README.md) · [Architecture](docs/architecture/README.md) · [Design history](docs/design/README.md) · [Migration](docs/migration.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
|
88
77
|
|
|
89
|
-
|
|
90
|
-
| --- | --- |
|
|
91
|
-
| `shadowclone init [--advanced]` | Set consent and install detected integrations |
|
|
92
|
-
| `shadowclone import`, `shadowclone wizard` | Refresh repository guidance or seed choices |
|
|
93
|
-
| `shadowclone learn [--deep] [--dry-run] [--apply]` | Inspect history or reconcile guidance |
|
|
94
|
-
| `shadowclone skills`, `shadowclone skills update` | List starter guidance or maintain consented skills |
|
|
95
|
-
| `shadowclone skills pending`, `show`, `apply`, `reject` | Review skill proposals |
|
|
96
|
-
| `shadowclone learning enable|disable|status` | Control session learning |
|
|
97
|
-
| `shadowclone doctor`, `shadowclone context`, `shadowclone sync` | Inspect or refresh delivery |
|
|
98
|
-
| `shadowclone install [--agent <agent>|all] [--global|--repo]` | Install native guidance manually |
|
|
99
|
-
| `shadowclone uninstall [--global]` | Remove owned integrations |
|
|
100
|
-
| `shadowclone remember`, `history`, `undo` | Manage direct rules and revisions |
|
|
101
|
-
| `shadowclone eval`, `shadowclone run <task>` | Measure transfer or run a local clone |
|
|
102
|
-
| `shadowclone forget --all` | Remove all recorded Shadowclone state |
|
|
103
|
-
|
|
104
|
-
Contributors can run `bun install` and `bun run check`. See [the architecture](docs/architecture/README.md), [design records](docs/design/README.md), [contribution guide](CONTRIBUTING.md), and [security policy](SECURITY.md). Shadowclone is MIT licensed.
|
|
78
|
+
Shadowclone is MIT licensed.
|
package/bin/shadowclone.mjs
CHANGED
|
@@ -17,10 +17,13 @@ function bundledBunPath() {
|
|
|
17
17
|
const manifest = require(manifestPath);
|
|
18
18
|
const relative =
|
|
19
19
|
typeof manifest.bin === "string" ? manifest.bin : manifest.bin?.bun;
|
|
20
|
+
|
|
20
21
|
if (typeof relative !== "string") {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
24
|
+
|
|
23
25
|
const candidate = path.join(path.dirname(manifestPath), relative);
|
|
26
|
+
|
|
24
27
|
return existsSync(candidate) ? candidate : null;
|
|
25
28
|
} catch {
|
|
26
29
|
return null;
|
|
@@ -45,8 +48,10 @@ if (runtime === null) {
|
|
|
45
48
|
const result = spawnSync(runtime, [bundle, ...process.argv.slice(2)], {
|
|
46
49
|
stdio: "inherit",
|
|
47
50
|
});
|
|
51
|
+
|
|
48
52
|
if (result.error) {
|
|
49
53
|
console.error("shadowclone: could not start bun");
|
|
50
54
|
process.exit(1);
|
|
51
55
|
}
|
|
56
|
+
|
|
52
57
|
process.exit(result.status ?? 1);
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="referrer" content="no-referrer" />
|
|
7
|
+
<meta
|
|
8
|
+
http-equiv="Content-Security-Policy"
|
|
9
|
+
content="default-src 'self'; connect-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'none'; form-action 'none'"
|
|
10
|
+
/>
|
|
11
|
+
<title>Your agent build · Shadowclone</title>
|
|
12
|
+
<link rel="icon" type="image/svg+xml" href="../../../web/shadowclone-mark-w6a76wqy.svg" />
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<link rel="stylesheet" crossorigin href="../../../web/index-174jt7gq.css"><script type="module" crossorigin src="../../../web/index-1ezbn24z.js"></script></head>
|
|
26
|
+
<body>
|
|
27
|
+
<div class="frame">
|
|
28
|
+
<header class="masthead">
|
|
29
|
+
<a class="brand" href="/" aria-label="Shadowclone agent builder">
|
|
30
|
+
<img class="brand-mark" src="../../../web/shadowclone-mark-w6a76wqy.svg" alt="" />
|
|
31
|
+
shadowclone
|
|
32
|
+
</a>
|
|
33
|
+
<span class="local-badge"><span></span> LOCAL WORKSPACE</span>
|
|
34
|
+
</header>
|
|
35
|
+
|
|
36
|
+
<main>
|
|
37
|
+
<section class="intro" aria-labelledby="page-title">
|
|
38
|
+
<p class="eyebrow">YOUR AGENT. YOUR INSTINCTS.</p>
|
|
39
|
+
<h1 id="page-title">Build the way you think.</h1>
|
|
40
|
+
<p class="subtitle">
|
|
41
|
+
Equip a way of working. Every skill shapes how your agent approaches
|
|
42
|
+
a task.
|
|
43
|
+
</p>
|
|
44
|
+
</section>
|
|
45
|
+
|
|
46
|
+
<div class="toolbar">
|
|
47
|
+
<label class="scope-field">
|
|
48
|
+
Build scope
|
|
49
|
+
<select id="scope">
|
|
50
|
+
<option value="global">Personal · everywhere</option>
|
|
51
|
+
<option value="private">Personal · this repository</option>
|
|
52
|
+
<option value="shared">Shared · this repository</option>
|
|
53
|
+
</select>
|
|
54
|
+
</label>
|
|
55
|
+
<label class="search-field">
|
|
56
|
+
<span class="visually-hidden">Find a skill</span>
|
|
57
|
+
<input id="search" type="search" placeholder="Find a skill…" />
|
|
58
|
+
</label>
|
|
59
|
+
<button id="new-skill" class="quiet-button">+ Create a skill</button>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="scope-meta">
|
|
63
|
+
<p id="scope-note" class="scope-note"></p>
|
|
64
|
+
<details id="library-note" class="library-note" hidden>
|
|
65
|
+
<summary>Built-in library · add your own</summary>
|
|
66
|
+
<p>
|
|
67
|
+
Include your installed skills by choosing the folders Shadowclone
|
|
68
|
+
can read.
|
|
69
|
+
</p>
|
|
70
|
+
<code>shadowclone skills configure</code>
|
|
71
|
+
</details>
|
|
72
|
+
</div>
|
|
73
|
+
<div id="notice" role="status" class="notice" hidden></div>
|
|
74
|
+
|
|
75
|
+
<div class="workspace">
|
|
76
|
+
<section
|
|
77
|
+
id="constellation"
|
|
78
|
+
class="constellation"
|
|
79
|
+
aria-label="Skill tree"
|
|
80
|
+
>
|
|
81
|
+
<svg
|
|
82
|
+
id="starfield"
|
|
83
|
+
class="starfield"
|
|
84
|
+
viewBox="0 0 600 900"
|
|
85
|
+
preserveAspectRatio="none"
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
></svg>
|
|
88
|
+
<svg
|
|
89
|
+
id="tree-connections"
|
|
90
|
+
class="tree-connections"
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
></svg>
|
|
93
|
+
<div id="tree" class="tree"></div>
|
|
94
|
+
<div class="tree-root" aria-hidden="true">
|
|
95
|
+
<span id="tree-origin"
|
|
96
|
+
><img src="../../../web/shadowclone-mark-w6a76wqy.svg" alt="" /></span>
|
|
97
|
+
</div>
|
|
98
|
+
<p class="tree-hint">Select a star to inspect its skill.</p>
|
|
99
|
+
</section>
|
|
100
|
+
|
|
101
|
+
<aside class="build-panel" aria-label="Your character build">
|
|
102
|
+
<section class="identity" aria-labelledby="identity-title">
|
|
103
|
+
<div>
|
|
104
|
+
<p class="eyebrow">YOUR BUILD</p>
|
|
105
|
+
<h2 id="identity-title">An open canvas</h2>
|
|
106
|
+
<p id="identity-description">
|
|
107
|
+
Choose the instincts you want your agent to bring to work.
|
|
108
|
+
</p>
|
|
109
|
+
</div>
|
|
110
|
+
<div id="traits" class="traits"></div>
|
|
111
|
+
<button id="describe" class="quiet-button">
|
|
112
|
+
Describe my agent with my model
|
|
113
|
+
</button>
|
|
114
|
+
<div
|
|
115
|
+
id="model-description"
|
|
116
|
+
class="requirements"
|
|
117
|
+
aria-live="polite"
|
|
118
|
+
></div>
|
|
119
|
+
</section>
|
|
120
|
+
<section
|
|
121
|
+
id="detail"
|
|
122
|
+
class="detail"
|
|
123
|
+
aria-label="Selected skill"
|
|
124
|
+
></section>
|
|
125
|
+
</aside>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<section
|
|
129
|
+
id="requirements"
|
|
130
|
+
class="requirements"
|
|
131
|
+
hidden
|
|
132
|
+
aria-label="Repository requirements"
|
|
133
|
+
></section>
|
|
134
|
+
</main>
|
|
135
|
+
|
|
136
|
+
<footer class="footer">
|
|
137
|
+
<div>
|
|
138
|
+
<strong id="equipped-count">0 skills equipped</strong>
|
|
139
|
+
<p>Your build is editable at any time.</p>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="footer-actions">
|
|
142
|
+
<button id="undo" class="quiet-button" hidden>Undo last apply</button>
|
|
143
|
+
<button id="review" class="primary-button">
|
|
144
|
+
Review your build <span aria-hidden="true">↗</span>
|
|
145
|
+
</button>
|
|
146
|
+
</div>
|
|
147
|
+
</footer>
|
|
148
|
+
</div>
|
|
149
|
+
</body>
|
|
150
|
+
</html>
|