agentwheel 0.8.0 → 0.9.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 CHANGED
@@ -7,56 +7,63 @@
7
7
  <p align="center"><strong>One source. Every agent.</strong></p>
8
8
 
9
9
  <p align="center">
10
- Weave your skills, rules, and instructions across every AI agent you use
11
- from any source, kept in sync, with your private tweaks intact.
10
+ Weave your skills, rules, and instructions across every AI agent you use,
11
+ from any source, reconciled into each runtime with your private tweaks intact.
12
12
  </p>
13
13
 
14
14
  ---
15
15
 
16
16
  ## Why agentwheel?
17
17
 
18
- Your AI agents are multiplying. Claude here, Codex there, a couple of custom runtimes in the corner — and every one of them wants its skills, its rules, its own little `AGENTS.md`, in its own folder, in its own format.
18
+ Your AI agents are multiplying. Claude here, Codex there, custom runtimes elsewhere, and each one
19
+ wants skills, rules, instructions, commands, MCP, hooks, and settings in its own native shape.
19
20
 
20
- So you copy-paste. You forget which agent has the latest version. You tweak a rule for one and it drifts out of sync with the rest. Multiply that by a team, and "keep the agents aligned" quietly becomes a part-time job.
21
-
22
- **agentwheel makes it one job, done once.** Point it at your skills and instructions, tell it which agents you run, and it installs everything where each one expects it — then keeps it that way. Update upstream and your agents update. Make a local tweak and it survives the next update. Add a brand-new runtime nobody's ever heard of? Drop in a small config and it's a first-class target too.
21
+ **agentwheel makes that one declared state.** Add packages to `.agentwheel/config.json`, preview the
22
+ runtime changes, then install the declared state into each target. Updates move tracking sources
23
+ forward explicitly; installs make the current declaration true.
23
24
 
24
25
  ```bash
25
26
  npm i -g agentwheel
26
- agentwheel add github:your-org/agent-pack
27
- cd ~/.openclaw
28
- agentwheel sync --dry-run # show me what would change
29
- agentwheel sync # install into the detected runtime
27
+ agentwheel init
28
+ agentwheel add github:your-org/agent-pack --adapter codex --mode tracking
29
+ agentwheel plan
30
+ agentwheel install
30
31
  ```
31
32
 
32
- No lock-in. No central gatekeeper. Your packages live in plain git repos, your customizations live in your own repo, and anything reachable by a URL just works.
33
-
34
- ---
33
+ No lock-in. No central gatekeeper. Packages live in plain git repos or local folders, customizations
34
+ live in your workspace, and runtimes stay generated output.
35
35
 
36
- > **Status: early (v0.7).** The lifecycle core is real and tested local/git/skillkit/vercel
37
- > sources, optional registry discovery, plan/sync/update/drift/uninstall, overlays, eject/remember,
38
- > profiles, runtime auto-detection, fleet targeting, asset-includes, selective installs,
39
- > update notifications, full Claude/Codex adapters, rich JSON/TOML merge, and pluggable adapters.
40
- > Expect sharp edges.
36
+ > **Status: early (v0.9).** v0.9 switches the public CLI vocabulary to package-manager verbs:
37
+ > `add`, `install`, `update`, and `uninstall`. A hidden `sync` shim remains for one release only
38
+ > so old bootstrapped skills can self-update; use `install` in all new docs and scripts.
41
39
 
42
- ## What it does
40
+ ## Core Commands
43
41
 
44
- - **Installs** skills, rules, and instructions into each runtime's native location.
45
- - **Keeps them in sync** — re-runnable, idempotent, with a manifest and drift detection so nothing silently clobbers your work.
46
- - **Pluggable adapters** each runtime is described by a small config; add your own without forking.
47
- - **Pluggable sources** pull packages from local paths, git, or skill ecosystems.
48
- - **Your customizations are first-class** layer, extend, override, or take full ownership, and survive updates.
49
-
50
- ## Quick start
42
+ | Command | Meaning |
43
+ |---|---|
44
+ | `agentwheel add <source>` | Validate and save a package entry in `.agentwheel/config.json`; does not touch runtimes. |
45
+ | `agentwheel plan [name-or-source]` | Preview what `install` would reconcile without writing. |
46
+ | `agentwheel install` | Reconcile configured packages into the current target or selected fleet. Uses the graph lock as input by default. |
47
+ | `agentwheel install <name-or-source>` | Ensure semantics: configured name/source scopes the install; a new source is added and installed. |
48
+ | `agentwheel update [name]` | Re-resolve tracking packages, then apply. Pinned packages stay locked. |
49
+ | `agentwheel uninstall <name-or-source>` | Remove a configured package from runtimes and config. |
50
+ | `agentwheel uninstall <name> --keep-files` | Remove from config/manifest while leaving runtime files unmanaged. |
51
+ | `agentwheel status` | Show configured packages, manifest/lock presence, and install state. |
52
+
53
+ Mental model: **`install` = make what is declared true. `update` = move tracking declarations forward,
54
+ then make them true.**
55
+ Scoped installs do not remove files owned only by other configured packages; run a full `agentwheel install`
56
+ to reconcile those removals.
57
+
58
+ ## Quick Start
51
59
 
52
60
  ```bash
53
61
  npm i -g agentwheel
54
62
 
55
63
  agentwheel init
56
64
  agentwheel add github:your-org/agent-pack --adapter openclaw --mode tracking
57
- cd ~/.openclaw
58
- agentwheel sync --dry-run
59
- agentwheel sync
65
+ agentwheel plan
66
+ agentwheel install
60
67
  ```
61
68
 
62
69
  Prefer pnpm? `pnpm add -g agentwheel` works too.
@@ -71,23 +78,22 @@ pnpm build
71
78
  pnpm link --global
72
79
  ```
73
80
 
74
- `plan`, `sync --dry-run`, and `update --dry-run` show exactly what would change before anything is written. They're the commands to trust.
75
-
76
- `uninstall` removes clean managed files by default and keeps drifted files in place with a warning.
77
- Use `agentwheel uninstall --force` only when you also want to remove drifted managed files.
81
+ `plan`, `install --dry-run`, and `update --dry-run` show what would change before runtime files are
82
+ written. `uninstall` removes clean managed files and keeps drifted files by default; use
83
+ `agentwheel uninstall --force` only when you also want to remove drifted managed files.
78
84
 
79
85
  agentwheel checks npm for newer versions at most once every 24 hours and prints a non-blocking
80
86
  stderr warning when an update is available. Disable it with `--no-update-check` or
81
87
  `AGENTWHEEL_NO_UPDATE_CHECK=1`.
82
88
 
83
- ## Runtime targeting
89
+ ## Runtime Targeting
84
90
 
85
- Normal use no longer needs `--target-root`. Run agentwheel inside a runtime folder and it detects
86
- the target:
91
+ Normal use does not need `--target-root`. Run agentwheel inside a runtime folder and it detects the
92
+ target:
87
93
 
88
94
  ```bash
89
95
  cd ~/.openclaw
90
- agentwheel sync github:your-org/agent-pack
96
+ agentwheel install
91
97
  ```
92
98
 
93
99
  If the current directory is already the runtime directory (`~/.openclaw`), agentwheel uses its
@@ -124,14 +130,14 @@ For a control-plane setup, define named agents in config. Global config lives at
124
130
  ```
125
131
 
126
132
  ```bash
127
- agentwheel sync --agent lab-openclaw
128
- agentwheel sync --all
129
- agentwheel sync --profile daily
133
+ agentwheel install --agent lab-openclaw
134
+ agentwheel install --all
135
+ agentwheel install --profile daily
130
136
  ```
131
137
 
132
- SSH targets use the same manifest and drift model as local targets. `plan --dry-run` reads the
133
- remote install manifest and hashes remote files before deciding whether a file is up to date,
134
- drifted, or conflicting. SSH hosts need `ssh`, `tar`, and `node` available on `PATH`.
138
+ SSH targets use the same manifest and drift model as local targets. Planning reads the remote
139
+ install manifest and hashes remote files before deciding whether a file is up to date, drifted, or
140
+ conflicting. SSH hosts need `ssh`, `tar`, and `node` available on `PATH`.
135
141
 
136
142
  To scaffold a control-plane example:
137
143
 
@@ -142,49 +148,48 @@ agentwheel init --fleet-example
142
148
  Target resolution order is exact: `--target-root` wins, then `--agent`, then auto-detect from the
143
149
  current directory, then fallback to the current directory.
144
150
 
145
- ## Core ideas
151
+ ## Core Ideas
146
152
 
147
153
  **Three places, one direction:**
148
154
 
149
155
  | | Where | What |
150
156
  |---|---|---|
151
- | **Author** | the package's git repo | upstream content never edited in place |
152
- | **Workspace** | your repo, under `.agentwheel/` | your config, locks, and customizations |
153
- | **Runtime** | `.openclaw/`, `~/.claude/`, | generated output — never hand-edited |
157
+ | **Author** | the package's git repo | upstream content, never edited in place |
158
+ | **Workspace** | your repo, under `.agentwheel/` | config, locks, trust decisions, and customizations |
159
+ | **Runtime** | `.openclaw/`, `~/.claude/`, `.codex/`, ... | generated output |
154
160
 
155
- Flow: **author + your workspace → `sync` → runtime**.
161
+ Flow: **author + workspace → `install` → runtime**.
156
162
 
157
163
  ## Packages
158
164
 
159
- A package is a git repo (or folder) with a JSON manifest and a canonical layout:
165
+ A package is a git repo or folder with an OpenPack manifest and a canonical layout:
160
166
 
161
167
  ```jsonc
162
- // openpack.json (plain JSON or JSONC — both work; agentwheel.json remains a legacy alias)
168
+ // openpack.json
163
169
  {
164
170
  "schemaVersion": 2,
165
171
  "name": "your-org/agent-pack",
166
172
  "version": "0.1.0",
167
173
  "provides": [
168
174
  { "type": "instructions", "path": "instructions/AGENTS.md" },
169
- { "type": "rules", "path": "rules" },
170
- { "type": "skills", "path": "skills" }
175
+ { "type": "rules", "path": "rules" },
176
+ { "type": "skills", "path": "skills" }
171
177
  ]
172
178
  }
173
179
  ```
174
180
 
175
181
  Install only part of a package with `--select <type>/<name>`. `--skill <name>` is a shortcut for
176
- `--select skills/<name>`, and selections saved during `add` are reused by later `sync` and `update`
177
- runs.
182
+ `--select skills/<name>`, and selections saved during `add` are reused by later `install` and
183
+ `update` runs.
178
184
 
179
185
  ```bash
180
- agentwheel add github:NestDevLab/agent-mesh --skill codex-tmux --adapter openclaw
181
- agentwheel sync --dry-run
182
-
183
- agentwheel sync github:your-org/agent-pack --select rules/safe-actions.md --select commands/build.md
186
+ agentwheel add github:NestDevLab/agent-mesh --skill codex-tmux --adapter codex
187
+ agentwheel plan
188
+ agentwheel install
184
189
  ```
185
190
 
186
- Package authors can mark dependencies as required. Required artifacts are always installed and
187
- cannot be deselected:
191
+ Package authors can mark artifacts as required. Required artifacts are always installed and cannot
192
+ be deselected:
188
193
 
189
194
  ```jsonc
190
195
  {
@@ -194,92 +199,97 @@ cannot be deselected:
194
199
  }
195
200
  ```
196
201
 
197
- Packages can compose shared files into each directory artifact at staging time. This keeps one
198
- canonical copy in the package repo while installing self-contained skills:
202
+ ## Dependencies And Composition
203
+
204
+ OpenPack packages can depend on other packages and compose shared markdown fragments:
199
205
 
200
206
  ```jsonc
201
207
  {
202
- "type": "skills",
203
- "path": "skills",
204
- "assets": [
205
- {
206
- "from": "packages/tmux-bridge/bin",
207
- "into": "bin",
208
- "include": ["*.sh"],
209
- "mode": "preserve"
208
+ "schemaVersion": 2,
209
+ "name": "your-org/agent-pack",
210
+ "version": "1.0.0",
211
+ "requires": {
212
+ "core": {
213
+ "source": "github:your-org/core-pack",
214
+ "version": "^1.2.0",
215
+ "select": ["rules/safe-actions.md", "fragments/risk.md"]
210
216
  }
217
+ },
218
+ "provides": [
219
+ { "type": "fragments", "path": "fragments" },
220
+ { "type": "skills", "path": "skills" }
211
221
  ]
212
222
  }
213
223
  ```
214
224
 
215
- `mode: "preserve"` keeps executable bits on copied scripts. The composed files are included in
216
- the skill directory hash, so idempotency and drift detection work as if the assets had always
217
- belonged to the skill.
218
-
219
- Publish by pushing to any git host. A registry exists only for short names and discovery — it's
220
- optional, and `agentwheel add <url|path>` always works without it.
221
-
222
- ## How to add a package
223
-
224
- The public package registry lives at
225
- [`NestDevLab/agentwheel-registry`](https://github.com/NestDevLab/agentwheel-registry).
226
-
227
- 1. Create a public repo with `openpack.json` and a standard layout such as `instructions/`, `rules/`, `skills/`, `commands/`, `mcp/`, or `hooks/`.
228
- 2. Open a pull request to `agentwheel-registry` that adds an entry to `index.json`.
229
- 3. Users install by short name:
230
-
231
- ```bash
232
- agentwheel registry update
233
- agentwheel add your-package-name --adapter openclaw
234
- agentwheel update --dry-run
235
- agentwheel update
236
- ```
237
-
238
- Example registry entry:
225
+ - **Recursive resolution, locked.** `install` reads the existing graph lock when present; newly
226
+ added packages resolve fresh and then write a deterministic lock.
227
+ - **Explicit updates.** `update` re-resolves tracking sources and applies the new graph. Pinned
228
+ packages stay on the locked graph unless their declaration changes.
229
+ - **Fragment composition.** Markdown files can transclude shared fragments with
230
+ `<!-- openpack:include fragments/review-style.md -->` or cross-package aliases such as
231
+ `core:fragments/risk.md`.
232
+ - **Trust.** New transitive sources prompt before install. Pre-approve with `--trust <glob>` or
233
+ `--yes`, set a workspace trust policy, and manage persisted decisions with `agentwheel trust`.
234
+ - **Offline & frozen installs.** `--offline` guarantees zero network; `--frozen-lock` hard-fails if
235
+ resolution would differ from the lock.
236
+ - **Introspection.** `agentwheel deps tree` prints the resolved graph; `agentwheel deps why
237
+ <selector>` explains why an artifact is installed.
238
+
239
+ ### Meta-packages (packs)
240
+
241
+ OpenPack v2 packages can omit `provides` when they declare at least one dependency. These
242
+ meta-packages install nothing of their own; they aggregate curated selections from other packages.
243
+ Uninstalling a meta-package removes the dependencies it pulled in unless those dependencies are
244
+ still owned by another configured package.
239
245
 
240
246
  ```json
241
247
  {
242
- "name": "your-package-name",
243
- "source": "github:your-org/your-agent-package",
244
- "type": "package",
245
- "description": "Reusable skills, rules, and instructions for agentwheel.",
246
- "tags": ["skills", "rules", "instructions"]
248
+ "schemaVersion": 2,
249
+ "name": "test/meta-pack",
250
+ "version": "0.1.0",
251
+ "requires": {
252
+ "dep": { "source": "../dep-a", "select": ["rules/a.md"] }
253
+ }
247
254
  }
248
255
  ```
249
256
 
250
- ## Customizing without getting overwritten
257
+ Migrating an existing legacy package takes one command:
251
258
 
252
- Drift detection blocks *accidental* edits to generated files. *Intentional* changes have four channels,
253
- all stored in your `.agentwheel/` (never in the runtime dir, never in the author's repo):
259
+ ```bash
260
+ agentwheel package migrate
261
+ ```
262
+
263
+ ## Customizing Without Getting Overwritten
254
264
 
255
- - **Layer** an editable region in your instructions that updates never touch. (This is how an agent can "remember X durably" without fighting drift.)
256
- - **Add** — extra rule files composed alongside upstream.
257
- - **Override** — replace a specific upstream item, visibly, in the plan.
258
- - **Eject** — take an item into local ownership; updates leave it alone.
265
+ Drift detection blocks accidental edits to generated runtime files. Intentional changes live under
266
+ `.agentwheel/`:
259
267
 
260
- ## Custom & private runtimes
268
+ - **Layer** local instructions with `agentwheel remember`.
269
+ - **Add** separate local artifacts under `.agentwheel/additions`.
270
+ - **Override** an upstream item under `.agentwheel/overrides`.
271
+ - **Eject** an item into `.agentwheel/ejected` when you want local ownership.
261
272
 
262
- A runtime adapter is just a config (capabilities + paths). Have an internal runtime you can't publish?
263
- Write a `.jsonc` adapter and point at it — it's a first-class target, and nothing leaves your machine:
273
+ ## Custom And Private Runtimes
274
+
275
+ A runtime adapter is a config with capabilities and paths. Internal runtimes do not need to be
276
+ published:
264
277
 
265
278
  ```jsonc
266
279
  {
267
280
  "name": "myco-internal",
268
281
  "targets": {
269
282
  "instructions": { "dest": ".myco/context/AGENTS.md" },
270
- "rules": { "dest": ".myco/policy/rules" },
271
- "skills": { "dest": ".myco/lib/skills" }
283
+ "rules": { "dest": ".myco/policy/rules" },
284
+ "skills": { "dest": ".myco/lib/skills" }
272
285
  }
273
286
  }
274
287
  ```
275
288
 
276
289
  ```bash
277
- agentwheel sync ./my-pack --adapter-config ./myco-internal.jsonc
290
+ agentwheel install ./my-pack --adapter-config ./myco-internal.jsonc
278
291
  ```
279
292
 
280
- Built-in adapters ship for common runtimes; declarative adapters need no code and stay private.
281
- Programmatic adapters, for private runtime logic beyond file placement, require explicit `--allow-adapter-code`.
282
-
283
293
  Built-in runtime targets:
284
294
 
285
295
  | Runtime | Main targets |
@@ -290,28 +300,13 @@ Built-in runtime targets:
290
300
  | **Hermes** | `.hermes/AGENTS.md`, `.hermes/skills`, `.hermes/rules`, `.hermes/commands`, MCP/hooks/settings |
291
301
  | **GitHub Copilot** | `.github/copilot-instructions.md`, `.github/instructions`, `.github/prompts` |
292
302
 
293
- Claude MCP and hooks/settings are merged as JSON. Codex MCP entries are merged into
294
- `[mcp_servers]` in `.codex/config.toml` without deleting unrelated user config; hooks use
295
- `.codex/hooks.json`.
296
-
297
- Copilot support is intentionally file-drop only: instructions, rules, and prompt/command files are
298
- placed in GitHub-native locations, while raw `SKILL.md` directories stay disabled until there is a
299
- clear conversion format.
300
-
301
- ## Roadmap
302
-
303
- - [x] **v0.1** — install spine: local sources; openclaw/claude/codex adapters; skills/rules/instructions; `plan` · `sync` · `--dry-run` · `uninstall`; manifest + drift + idempotency.
304
- - [x] **v0.2** — git source driver; `update` (pinned & tracking); overlays/additive/override/eject; `init`; hermes + copilot adapters; commands/mcp/hooks artifacts; OpenClaw semantic plugin planning.
305
- - [x] **v0.3** — skillkit/vercel source drivers; optional registry & federation; programmatic adapters behind `--allow-adapter-code`; rich JSON merge for mcp/hooks/settings; profiles.
306
- - [x] **v0.4** — runtime auto-detection; no `--target-root` needed for normal use; fleet config with named agents; global + project config merge; `--agent` and `--all`.
307
- - [x] **v0.5** — asset-includes compose shared files into skills at install time; executable bits preserved; hashes include composed assets.
308
- - [x] **v0.6** — selective installs with `--select`/`--skill`; required artifacts; cached npm update notifier.
309
- - [x] **v0.7** — full Claude/Codex adapters; Codex TOML MCP merge; subagent enumeration; `--skill` selector fix.
310
-
311
- ## Design docs
303
+ ## Docs
312
304
 
313
- - [`DESIGN.md`](DESIGN.md) — architecture & module layout.
314
- - [`LIFECYCLE.md`](LIFECYCLE.md) — publish / install / update / customize model.
305
+ - [`docs/spec/openpack.md`](docs/spec/openpack.md) — OpenPack package spec.
306
+ - [`docs/fleet-config.md`](docs/fleet-config.md) — named agents, SSH targets, and profiles.
307
+ - Resource catalogue: https://nestdevlab.github.io/agentwheel/catalogue.html.
308
+ - [`DESIGN.md`](DESIGN.md) — architecture and module layout.
309
+ - [`LIFECYCLE.md`](LIFECYCLE.md) — publish, install, update, and customization model.
315
310
 
316
311
  ## License
317
312