agentwheel 0.14.8 → 0.14.13

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/install.md CHANGED
@@ -98,6 +98,13 @@ Install a ClawHub plugin into OpenClaw only when the user approves plugin execut
98
98
  agentwheel install clawhub:@openclaw/package-name --adapter openclaw --local --execute-plugins
99
99
  ```
100
100
 
101
+ If a fleet profile declares runtime `reloadCommands`, run reloads or service restarts only when
102
+ explicitly approved:
103
+
104
+ ```bash
105
+ agentwheel install --profile extra-message-policy --execute-plugins --reload-runtimes
106
+ ```
107
+
101
108
  Draft a catalogue submission for a public repository:
102
109
 
103
110
  ```bash
package/openpack.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "NestDevLab/agentwheel",
4
- "version": "0.14.6",
4
+ "version": "0.14.13",
5
5
  "provides": [
6
6
  { "type": "skills", "path": "skills" }
7
7
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentwheel",
3
- "version": "0.14.8",
3
+ "version": "0.14.13",
4
4
  "description": "Weave skills, rules, and instructions across every AI agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup && chmod +x dist/index.js",
45
+ "check-release-version": "node scripts/check-release-version.mjs",
45
46
  "prepack": "pnpm build",
46
47
  "sync-site-version": "node scripts/sync-site-version.mjs",
47
48
  "test": "vitest run",
@@ -60,5 +61,8 @@
60
61
  "tsup": "8.5.1",
61
62
  "vitest": "4.0.15"
62
63
  },
63
- "packageManager": "pnpm@10.23.0"
64
+ "packageManager": "pnpm@10.23.0",
65
+ "optionalDependencies": {
66
+ "mermaid": "^11.16.0"
67
+ }
64
68
  }
@@ -2,6 +2,10 @@
2
2
  name: agentwheel
3
3
  description: Use agentwheel to discover, add, install, update, customize, eject, and uninstall agent skills, rules, instructions, commands, MCP, hooks, settings, and plugin artifacts across runtimes.
4
4
  allowed-tools: [Bash]
5
+ license: MIT
6
+ metadata:
7
+ author: NestDevLab
8
+ version: "0.14.13"
5
9
  ---
6
10
 
7
11
  # agentwheel
@@ -22,7 +26,7 @@ Mental model:
22
26
  - Prefer `agentwheel plan ...` or `agentwheel install --dry-run` before applying changes.
23
27
  - Do not hand-edit generated runtime files such as `skills/`, `.agents/skills`, `.claude/skills`, `.github/skills`, `~/.hermes/skills`, or generated instructions.
24
28
  - If a plan reports `drift` or `conflict`, stop and explain it. Do not use `--force` unless the user explicitly approves that scope.
25
- - Gmail, Drive, registry publishing, git commits, pushes, and runtime restarts are separate external side effects. Get explicit approval for them.
29
+ - Gmail, Drive, registry publishing, git commits, pushes, and runtime reloads/restarts are separate external side effects. Get explicit approval for them.
26
30
  - Programmatic adapters execute local code. Use `--adapter-module` only with `--allow-adapter-code` after the user approves that local code execution.
27
31
  - OpenClaw plugin artifacts are only planned by default. Use `--execute-plugins` only after explicit approval.
28
32
 
@@ -214,6 +218,23 @@ Apply configured packages:
214
218
  agentwheel install
215
219
  ```
216
220
 
221
+ Execute semantic plugin installs only after approval:
222
+
223
+ ```bash
224
+ agentwheel install --execute-plugins
225
+ ```
226
+
227
+ If an agent or profile runtime declares structured `reloadCommands`, run them after executed semantic
228
+ plugin changes only with a separate explicit gate:
229
+
230
+ ```bash
231
+ agentwheel install --execute-plugins --reload-runtimes
232
+ ```
233
+
234
+ ### Hermes plugin rollout checks
235
+
236
+ When delivering a Hermes plugin, do not equate source package presence or `plugins.enabled` config with a working runtime install. Verify the gateway host has `$HERMES_HOME/plugins/<plugin-name>/` with the expected `plugin.yaml`/code files, the Agentwheel install manifest contains the plugin artifact, and a canary exercises the middleware path. Use `--execute-plugins` for plugin artifacts when applying, after dry-run and explicit approval.
237
+
217
238
  Preview or apply one configured package:
218
239
 
219
240
  ```bash
@@ -345,6 +366,20 @@ agentwheel update team-agent-pack --dry-run
345
366
  agentwheel update team-agent-pack
346
367
  ```
347
368
 
369
+ Named package updates preserve artifacts owned by other configured roots, including unrelated drift.
370
+
371
+ Advance one tracking dependency while unrelated graph nodes remain locked:
372
+
373
+ ```bash
374
+ agentwheel update --dependency shared-core --dry-run
375
+ agentwheel update --dependency shared-core
376
+ agentwheel update --dependency github:your-org/shared-core --agent lab-codex
377
+ ```
378
+
379
+ The selector must uniquely match a locked tracking dependency by name, alias, node id, or source.
380
+ Its required tracking closure also advances. Configured selections stay unchanged; this mode
381
+ rejects package arguments, `--select`, `--skill`, `--frozen-lock`, and `--offline`.
382
+
348
383
  `install` uses the graph lock as input when present. `update` re-resolves tracking packages and writes a new lock. Pinned packages stay on the locked graph unless their declaration changes.
349
384
 
350
385
  ## Drift And Customization
@@ -476,3 +511,16 @@ If npm update checks are noisy:
476
511
  agentwheel --no-update-check install --dry-run
477
512
  AGENTWHEEL_NO_UPDATE_CHECK=1 agentwheel install --dry-run
478
513
  ```
514
+
515
+ If install fails with `Locked install cache missing or stale for locked graph node`, or a pinned
516
+ dependency snapshot lacks a selected artifact:
517
+
518
+ ```bash
519
+ agentwheel list <source> --select <artifact>
520
+ ```
521
+
522
+ The native fetch refreshes the source cache. If the refreshed content hash matches the lock, stop —
523
+ nothing else is stale. If it differs, regenerate only the affected graph locks (lock-only) and
524
+ leave them uncommitted: lock commits belong to the approved install. `update --dependency` cannot
525
+ recompute an edge whose root node id changed (e.g. after renaming the root package's artifacts);
526
+ regenerate the locks instead.
@@ -0,0 +1,24 @@
1
+ # CT111 self-hosted instruction activation
2
+
3
+ Use when adding a small always-loaded behavior rule to YehonalBot/Drassil on CT111 without importing unrelated core-private skills.
4
+
5
+ Facts/pitfall:
6
+ - CT111 (`ct111-openclaw`) owns its own AgentWheel plane under `/root/src/nestdevlab/fleet-control/profiles/ct111-selfhost`; do not install to CT111 from CT107.
7
+ - OpenClaw instruction artifacts often target the same runtime file: `/root/.openclaw/workspace/AGENTS.md`.
8
+ - Adding a second selected `instructions/<rule>.md` artifact from `agent-core-toolkit-private` can create duplicate instruction targets with different content. AgentWheel may skip one duplicate or report drift on the managed block.
9
+
10
+ Preferred pattern:
11
+ 1. Keep the broad source package selected narrowly; do not add all of `agent-core-toolkit-private` just to deliver one rule.
12
+ 2. If the target already has a domain/persona `instructions/AGENTS.md` artifact, compose the new small behavior fragment into that existing artifact instead of adding a separate instruction artifact to the same destination.
13
+ 3. Put the behavior text in the domain toolkit, e.g. `agent-drassil-toolkit-private/fragments/self-improve-activation.md`.
14
+ 4. Add one compose include near the top of the domain `AGENTS.md` composition, usually immediately after `core:fragments/core-base.md` and before role overlays:
15
+ ```json
16
+ { "include": "fragments/self-improve-activation.md" }
17
+ ```
18
+ 5. Validate JSON/OpenPack selection, then run CT111 dry-run in place:
19
+ ```bash
20
+ ssh ct111-openclaw 'cd /root/src/nestdevlab/fleet-control/profiles/ct111-selfhost && npx --yes agentwheel@latest install --profile ct111-selfhost --dry-run --yes'
21
+ ```
22
+ 6. Treat `UPDATE instructions/AGENTS.md -> .openclaw/workspace/AGENTS.md` as the expected dry-run signal. Do not apply if unrelated drift/plugin operations are present unless the user approves that exact scope.
23
+
24
+ This pattern preserves narrow delivery: the future runtime receives the behavior inside its existing AGENTS managed block without importing unrelated core-private skills or creating competing instruction blocks.
@@ -0,0 +1,39 @@
1
+ # Fleet control cleanup: CT107 node vs runtime targets, and effective adapters
2
+
3
+ Use this reference when cleaning or explaining an AgentWheel fleet-control `.agentwheel/config.json` that targets multiple runtimes/profiles.
4
+
5
+ ## Durable lessons
6
+
7
+ - Do not model CT107/nestdev as `ct107-openclaw` unless there is an explicitly declared, full OpenClaw runtime home to manage. In Joseph's current CT107/CT110 layout, CT107 is a local node/workspace with Claude/Codex homes; OpenClaw gateway/profile targets live on CT110 or profile-specific users.
8
+ - If a target name implies a real runtime install that does not exist, remove it from `agents` and from every `profiles.*.runtimes[]` entry rather than leaving it as a misleading alias.
9
+ - For profile installs, AgentWheel chooses the effective adapter from each runtime target in the selected profile. The package entry's `adapter` field can be source/default metadata and is not a reliable answer to “which adapters are targeted by this pack under profile all”.
10
+ - When the user asks “per pack, which adapters are targeted?”, compute it as: selected profile runtimes → each runtime's adapter or adapterConfig name → package roots fanned out to that set. Then separately note artifact-type limitations, especially plugin targets.
11
+
12
+ ## Safe cleanup shape
13
+
14
+ 1. Read `.agentwheel/config.json` and list:
15
+ - `agents` entries,
16
+ - each profile's runtime list,
17
+ - any `adapterConfig` paths.
18
+ 2. Identify misleading/nonexistent runtime targets by user/domain knowledge first. Ask or preserve if unsure; do not rename targets silently.
19
+ 3. Remove the bad agent entry and all profile runtime references to it.
20
+ 4. Remove only generated lock directories for the removed target, e.g. `.agentwheel/locks/<removed-agent>/`; do not bulk-delete unrelated locks.
21
+ 5. Update `docs/fleet.md` with:
22
+ - canonical meaning of the fleet,
23
+ - current agents table,
24
+ - profile membership,
25
+ - effective adapter-targeting table per profile and per package.
26
+ 6. Validate with JSON parsing and a grep that the removed target no longer appears in config/docs.
27
+ 7. Run `agentwheel install --profile <profile> --dry-run` when credentials/cache allow. If a private GitHub fetch blocks dry-run, report it as a credential/cache blocker, not as proof the config is bad.
28
+
29
+ ## Reporting style for Joseph
30
+
31
+ Keep it short and operational:
32
+
33
+ - what was removed/changed,
34
+ - exact files touched,
35
+ - current profile membership,
36
+ - validation result,
37
+ - any dry-run blocker.
38
+
39
+ Avoid over-explaining AgentWheel internals unless he asks; he wants the concrete fleet shape and whether it is clean.
@@ -0,0 +1,69 @@
1
+ # Fleet plugin rollouts with AgentWheel
2
+
3
+ Use this when a fleet-control repository manages plugin installation across multiple runtime harnesses.
4
+
5
+ ## Pattern
6
+
7
+ 1. Add the plugin package to `.agentwheel/config.json` as a normal package.
8
+ 2. Select every runtime-specific artifact exposed by the OpenPack package, for example:
9
+ - `plugins/extra-message-policy`
10
+ - `plugins/hermes-extra-message-policy`
11
+ - shared `rules/...`
12
+ - runtime settings such as `settings/hermes-extra-message-policy.json`
13
+ 3. Add a dedicated rollout profile instead of immediately folding it into `all`, for example:
14
+
15
+ ```json
16
+ "extra-message-policy": {
17
+ "runtimes": [
18
+ { "agent": "ct110-openclaw" },
19
+ {
20
+ "agent": "ct110-hermes",
21
+ "adapterConfig": "/absolute/path/to/fleet-control/adapters/hermes-with-plugins.jsonc"
22
+ },
23
+ { "agent": "ct110-tirrenia" }
24
+ ]
25
+ }
26
+ ```
27
+
28
+ 4. Run a dry-run first:
29
+
30
+ ```bash
31
+ npx --yes agentwheel@latest install --profile extra-message-policy --dry-run
32
+ ```
33
+
34
+ 5. Apply only after reviewing drift/conflict/plugin operations. For OpenClaw semantic plugin installs, include:
35
+
36
+ ```bash
37
+ npx --yes agentwheel@latest install --profile extra-message-policy --execute-plugins
38
+ ```
39
+
40
+ 6. Verify the dry-run uses copy/materialized OpenClaw plugin commands, not symlinks:
41
+
42
+ ```bash
43
+ agentwheel install --profile extra-message-policy --dry-run | tee /tmp/plugin-dry-run.txt
44
+ ! grep -q -- '--link' /tmp/plugin-dry-run.txt
45
+ ```
46
+
47
+ Fleet-managed OpenClaw plugins should plan `openclaw plugins install <staged-plugin-path>`. If the plan contains `openclaw plugins install --link ...`, stop and update AgentWheel/OpenClaw plugin command generation before applying.
48
+
49
+ ## Profile scoping pitfall
50
+
51
+ AgentWheel profiles select runtimes, not packages. If a fleet-control repo's root `.agentwheel/config.json` contains many packages and you need a narrow plugin-only rollout, create a separate workspace/profile directory with its own `.agentwheel/config.json` containing only those plugin packages. Then run the dry-run from that profile workspace.
52
+
53
+ ## Important pitfall: custom adapter config placement
54
+
55
+ For profile installs, `adapterConfig` must be on the profile runtime entry, not only on the named agent. The current workspace agent schema may not preserve `adapterConfig` under `agents.*`, while profile runtimes do support it.
56
+
57
+ Use an absolute adapter config path when the runtime is remote/SSH or when relative resolution might happen from the target root rather than the fleet repository.
58
+
59
+ ## Hermes plugin artifacts
60
+
61
+ If the built-in Hermes adapter does not install plugin artifacts, keep a declarative adapter config in the fleet repo, e.g. `adapters/hermes-with-plugins.jsonc`, with a `plugins` target pointing at `.hermes/plugins`.
62
+
63
+ ## Verification checklist
64
+
65
+ - `agentwheel list <source>` shows all expected runtime-specific artifacts.
66
+ - Direct Hermes dry-run with the custom adapter creates `.hermes/plugins/<plugin>`.
67
+ - Fleet profile dry-run creates the Hermes plugin, rule, and settings.
68
+ - OpenClaw profile dry-run shows `PLUGIN ... semantic plugin install planned`.
69
+ - Do not restart runtimes as part of the AgentWheel install unless the user explicitly asks.
@@ -0,0 +1,98 @@
1
+ # Harness path-map rules pattern — 2026-06-13
2
+
3
+ Use this when Joseph asks to make CT107/CT110 workspace/harness topology visible to all agents through AgentWheel.
4
+
5
+ ## Durable pattern
6
+
7
+ - Put detailed machine-readable topology in the shared docs root:
8
+ - `/home/administrator/env/workspace/itermodus/brain-shared/mappings/harnesses.yaml`
9
+ - Put the short, always-installed instruction in the private core toolkit:
10
+ - `/home/administrator/env/workspace/itermodus/nestdevlab/agent-core-toolkit-private/rules/harness-path-map.md`
11
+ - The `agent-core-toolkit-private` package exposes `rules/` via `openpack.json`, so any new file under `rules/` is discoverable by `agentwheel list .` and installable by configured runtimes.
12
+
13
+ ## Content split
14
+
15
+ - Rule file: concise operational policy and pointers. Avoid a huge topology dump.
16
+ - YAML file: detailed host/path/mount map, legacy path status, canonical runtime homes.
17
+
18
+ ## Current canonical layout
19
+
20
+ ```text
21
+ /home/administrator/env/workspace/itermodus/brain-shared # shared docs/memory/maps/runbooks
22
+ /home/administrator/env/workspace/itermodus/nestdevlab # AgentWheel/OpenPack/plugin/source repos
23
+ /home/administrator/.hermes # Hermes harness home
24
+ /home/administrator/.openclaw # OpenClaw harness home
25
+ /home/administrator/.codex # Codex harness home
26
+ /home/administrator/.claude # Claude harness home
27
+ /home/administrator/.agentwheel # AgentWheel home
28
+ ```
29
+
30
+ CT107 `/home/administrator/env/ai-agents` is a technical SSHFS view of `CT110:/home`, not the canonical docs root. Do not propose active CT110 harness state under `/root`; treat `/root` paths as legacy/backup/compatibility until audited.
31
+
32
+ ## Verification
33
+
34
+ From the package root:
35
+
36
+ ```bash
37
+ agentwheel list .
38
+ ```
39
+
40
+ Expected: it lists both existing and newly added `rules/*.md` artifacts.
41
+
42
+ Before applying to runtimes, prefer:
43
+
44
+ ```bash
45
+ agentwheel install --dry-run
46
+ ```
47
+
48
+ Apply only after Joseph approves runtime/generated-file changes.
49
+
50
+ ## Completion pattern for fleet propagation
51
+
52
+ When Joseph approves completing propagation of this rule, do not only run a source-scoped install. Make the package part of durable AgentWheel desired state, then apply both configured remote agents and locally detected runtimes.
53
+
54
+ 1. Add the private core toolkit rule to AgentWheel global config once:
55
+
56
+ ```bash
57
+ sudo -u administrator -H bash -lc 'agentwheel add /home/administrator/env/workspace/itermodus/nestdevlab/agent-core-toolkit-private \
58
+ --name NestDevLab/agent-core-toolkit-private \
59
+ --driver local \
60
+ --adapter openclaw \
61
+ --mode tracking \
62
+ --select rules/harness-path-map.md'
63
+ ```
64
+
65
+ 2. Preview/apply configured named agents, including SSH targets such as CT110 OpenClaw/Hermes/Tirrenia:
66
+
67
+ ```bash
68
+ sudo -u administrator -H bash -lc 'agentwheel install --all --dry-run'
69
+ sudo -u administrator -H bash -lc 'agentwheel install --all'
70
+ ```
71
+
72
+ 3. Separately preview/apply runtimes auto-detected on the current host. `--all` only covers configured agents; it does not cover local auto-detected `.openclaw`, `.claude`, or `.codex` directories unless those are named agents.
73
+
74
+ ```bash
75
+ sudo -u administrator -H bash -lc 'agentwheel install --all-detected --dry-run'
76
+ sudo -u administrator -H bash -lc 'agentwheel install --all-detected'
77
+ ```
78
+
79
+ 4. Verify with checksums against the package source and final dry-runs. A clean completion has identical hashes for source/generated rule files and summaries with `drift 0, conflict 0`.
80
+
81
+ ```bash
82
+ sha256sum /home/administrator/env/workspace/itermodus/nestdevlab/agent-core-toolkit-private/rules/harness-path-map.md \
83
+ /home/administrator/.openclaw/rules/harness-path-map.md \
84
+ /home/administrator/.claude/rules/harness-path-map.md \
85
+ /home/administrator/.codex/rules/harness-path-map.md
86
+
87
+ ssh root@192.168.1.110 'sha256sum \
88
+ /home/administrator/env/workspace/itermodus/nestdevlab/agent-core-toolkit-private/rules/harness-path-map.md \
89
+ /home/administrator/.openclaw/rules/harness-path-map.md \
90
+ /home/administrator/.hermes/rules/harness-path-map.md \
91
+ /home/openclaw-tirrenia/.openclaw/rules/harness-path-map.md'
92
+ ```
93
+
94
+ ## Pitfalls
95
+
96
+ - Use `--only-source` when doing an ad-hoc source-scoped dry-run; otherwise AgentWheel may try to apply the current workspace's configured packages and report irrelevant selected-artifact errors.
97
+ - A failed apply may leave a pending journal that AgentWheel can recover on the next run. Fix the underlying issue and rerun `agentwheel install`; do not hand-edit generated files unless ownership/permissions block AgentWheel itself.
98
+ - If remote Hermes rule directories are owned by `root`, fix ownership of the directory and rerun AgentWheel instead of copying the file manually, e.g. `chown administrator:administrator /home/administrator/.hermes/rules` on CT110.
@@ -0,0 +1,98 @@
1
+ # Hermes background review vs AgentWheel-managed skills
2
+
3
+ Use when Hermes' automatic self-improvement review patches skills or the user asks to redirect those writes through AgentWheel.
4
+
5
+ ## Facts
6
+
7
+ - Hermes' automatic self-improvement is core code, not a `self-improve` skill: `/usr/local/lib/hermes-agent/agent/background_review.py`.
8
+ - It runs a forked agent after eligible turns and can call only memory + skill tools.
9
+ - Skill writes arrive as normal `skill_manage` calls with write origin `background_review` (`tools.skill_provenance.is_background_review()`).
10
+ - The user-visible event is `💾 Self-improvement review: ...`, e.g. `Patched SKILL.md in skill 'agentwheel'`.
11
+ - Existing Hermes guards block background writes to pinned, bundled, hub-installed, or external-dir skills, but may not know AgentWheel runtime ownership.
12
+
13
+ ## Immediate mitigation
14
+
15
+ Enable staged review before runtime mutation:
16
+
17
+ ```bash
18
+ hermes config set skills.write_approval true
19
+ ```
20
+
21
+ Then review with:
22
+
23
+ ```text
24
+ /skills pending
25
+ /skills diff <id>
26
+ /skills approve <id>
27
+ /skills reject <id>
28
+ ```
29
+
30
+ This prevents silent runtime patches, but the standard approval path still applies the pending write to the runtime skill unless another router handles it.
31
+
32
+ ## Preferred router shape
33
+
34
+ Use a Hermes plugin or core patch at `tool_execution`/`skill_manage` level:
35
+
36
+ 1. Intercept `tool_name == "skill_manage"`.
37
+ 2. If `is_background_review()` is false, pass through.
38
+ 3. For background `patch`/`edit`/`write_file`/`remove_file`/`delete`, resolve runtime skill path to AgentWheel provenance.
39
+ 4. If AgentWheel-managed, do not call the original runtime write.
40
+ 5. Stage or apply a source-package patch proposal in the OpenPack repo, then roll out with AgentWheel dry-run/install.
41
+ 6. Return a clear JSON tool result so the review agent reports that the source-first proposal was created, not that runtime was patched.
42
+
43
+ Minimal plugin skeleton:
44
+
45
+ ```python
46
+ def register(ctx):
47
+ ctx.register_middleware("tool_execution", route_skill_manage)
48
+
49
+ def route_skill_manage(tool_name, args, next_call, **kw):
50
+ if tool_name != "skill_manage":
51
+ return next_call(args)
52
+ from tools.skill_provenance import is_background_review
53
+ if not is_background_review():
54
+ return next_call(args)
55
+ if args.get("action") not in {"patch", "edit", "write_file", "remove_file", "delete"}:
56
+ return next_call(args)
57
+ # Resolve AgentWheel provenance; if managed, create source patch/pending and return JSON.
58
+ # Otherwise pass through or stage via skills.write_approval policy.
59
+ ```
60
+
61
+ ## Implemented plugin pattern
62
+
63
+ A working Hermes-only plugin implementation can live as an OpenPack package under fleet-control, e.g.:
64
+
65
+ ```text
66
+ profiles/agentwheel-skill-router/
67
+ openpack.json
68
+ plugins/hermes/agentwheel-skill-router/plugin.yaml
69
+ plugins/hermes/agentwheel-skill-router/__init__.py
70
+ ```
71
+
72
+ Recommended behavior:
73
+
74
+ - register `tool_execution` middleware;
75
+ - intercept only `tool_name == "skill_manage"` with `tools.skill_provenance.is_background_review() == True`;
76
+ - restrict interception to write actions: `patch`, `edit`, `write_file`, `remove_file`, `delete`;
77
+ - resolve target skill ownership from AgentWheel `~/.agentwheel/hermes*.install-manifest.json` entries where `artifactType == "skills"`, `artifactName == <skill>`, `channel == "managed"`, and `path` matches `.hermes/skills/<skill>` for the active Hermes home;
78
+ - if managed, do **not** call `next_call(args)`; stage a proposal JSON under `$HERMES_HOME/pending/agentwheel-skill-router/` containing the original args and AgentWheel provenance;
79
+ - if unmanaged or foreground, pass through unchanged.
80
+
81
+ Validation pattern for this plugin class:
82
+
83
+ 1. Syntax-check the plugin without creating `__pycache__` in managed runtime output: `compile(Path("__init__.py").read_text(), path, "exec")`.
84
+ 2. Dry-run a scoped Hermes install with the custom Hermes+plugins adapter and `--execute-plugins`.
85
+ 3. Apply scoped install only after the plan shows no drift/conflict outside the plugin.
86
+ 4. In a fresh Hermes Python process, call `discover_plugins(force=True)`, set `set_current_write_origin("background_review")`, run `run_tool_execution_middleware("skill_manage", ...)`, and verify:
87
+ - plugin is loaded;
88
+ - `tool_execution` middleware count increases;
89
+ - downstream `next_call` is **not** called for a managed skill;
90
+ - target runtime skill hash is unchanged;
91
+ - a proposal JSON is created;
92
+ - foreground calls still invoke `next_call`.
93
+
94
+ Pitfall: a scoped `agentwheel install <source> --only-source` can rewrite the target graph-lock to contain only that source. For durable fleet registration, add the plugin package to the fleet `.agentwheel/config.json`, but avoid committing a narrowed graph-lock produced by one-source install unless that is intended.
95
+
96
+ ## Durable rule
97
+
98
+ Background review should never be allowed to mutate AgentWheel-generated runtime skill files directly. It must either stage for human approval or route the proposed diff to the AgentWheel/OpenPack source and require a scoped dry-run before install.
@@ -0,0 +1,20 @@
1
+ # Hermes plugin rollout and source-routing canary
2
+
3
+ Session learning: a Hermes plugin can appear in `plugins.enabled` and still not be installed as a runtime plugin. Treat config enablement, source package existence, and runtime plugin installation as separate facts.
4
+
5
+ Use this checklist when validating an Agentwheel-delivered Hermes plugin, especially one meant to intercept skill/self-improvement writes:
6
+
7
+ 1. Identify the owning source package or fleet profile. Do not treat `~/.hermes/plugins/` or `~/.hermes/skills/` as canonical source.
8
+ 2. Dry-run from fleet-control or the approved workspace:
9
+ - `agentwheel install <source-or-profile> --dry-run`
10
+ - include `--execute-plugins` when plugin artifacts must actually materialize.
11
+ 3. Verify runtime materialization on the gateway host, not only the shell host:
12
+ - config mentions the plugin under `plugins.enabled`;
13
+ - runtime directory exists: `$HERMES_HOME/plugins/<plugin-name>/`;
14
+ - expected files exist, usually `plugin.yaml` and `__init__.py`;
15
+ - latest Agentwheel install manifest has the plugin artifact entry.
16
+ 4. Restart/reload the relevant Hermes gateway only after explicit approval when needed for plugin load.
17
+ 5. Run a canary that exercises the middleware path. For self-improvement source routing, a managed runtime skill write should be blocked from direct runtime mutation and should create a pending/source-first proposal with clear logs.
18
+ 6. If proposals are staged but not drained, inspect proposal JSON and reconciler logs. Do not report end-to-end success until the proposal reaches source or the blocker is named.
19
+
20
+ Common false-positive: `plugins.enabled: [plugin-name]` plus old log lines that mention the plugin only proves it was configured or previously loaded. It does not prove the current runtime directory exists or that the auto-delivery path is healthy.
@@ -0,0 +1,43 @@
1
+ # Hermes profile-scoped skill rollout
2
+
3
+ Use when adding one new shared toolkit skill to Hermes default/Karan plus a Hermes profile such as `odino` without reconciling the whole generated skill tree.
4
+
5
+ ## Pattern
6
+
7
+ 1. Put the skill in the class-level toolkit source, e.g. `agent-core-toolkit-private/skills/<skill>/SKILL.md`.
8
+ 2. In that toolkit `openpack.json`, restrict the skill item to Hermes if it must not install to OpenClaw/Codex/Claude:
9
+ ```json
10
+ {
11
+ "type": "skills",
12
+ "path": "skills",
13
+ "items": {
14
+ "<skill>": { "runtimes": ["hermes"] }
15
+ }
16
+ }
17
+ ```
18
+ 3. Add `skills/<skill>` to the relevant fleet selector.
19
+ 4. Dry-run with a scoped source install so AgentWheel does not try to adopt/reconcile every existing runtime skill:
20
+ ```bash
21
+ AGENTWHEEL_NO_UPDATE_CHECK=1 npx --yes agentwheel install \
22
+ /path/to/toolkit --driver local \
23
+ --agent ct110-hermes \
24
+ --select skills/<skill> \
25
+ --only-source --dry-run
26
+ ```
27
+ 5. For a Hermes profile target such as Odino, pass the custom profile adapter config explicitly; otherwise the built-in Hermes adapter may reject `profile-odino` for skills as unsupported:
28
+ ```bash
29
+ AGENTWHEEL_NO_UPDATE_CHECK=1 npx --yes agentwheel install \
30
+ /path/to/toolkit --driver local \
31
+ --agent ct110-hermes-odino \
32
+ --adapter-config adapters/hermes-odino.jsonc \
33
+ --select skills/<skill> \
34
+ --only-source --dry-run
35
+ ```
36
+ 6. Apply the same commands without `--dry-run` after the plan shows only the intended `CREATE`/`UPDATE` and `conflict 0`.
37
+ 7. Verify on the remote host by checking both paths and hashes, then optionally `hermes skills list` and `hermes --profile odino skills list`.
38
+
39
+ ## Pitfalls
40
+
41
+ - A broad `agentwheel install --agent ct110-hermes` can surface many unrelated conflicts for existing unmanaged skills. Use scoped source install for one-skill rollouts.
42
+ - `--agent ct110-hermes-odino` may not automatically apply the profile adapter config in all CLI shapes; pass `--adapter-config adapters/hermes-odino.jsonc` explicitly for profile skill installs.
43
+ - Keep source ownership and deploy ownership separate: toolkit repo owns the skill; fleet-control owns selectors/locks/deploy docs.
@@ -0,0 +1,25 @@
1
+ # Hermes self-improve vs AgentWheel-managed skills
2
+
3
+ Use this reference when diagnosing why Hermes skill edits and AgentWheel installs conflict.
4
+
5
+ ## Pattern
6
+
7
+ Hermes `skill_manage`/`self-improve` edits the installed runtime skill under `~/.hermes/skills/...`. AgentWheel treats runtime skill directories as generated output and tracks ownership/hash in `.agentwheel/*.install-manifest.json` plus graph locks. If a generated runtime skill is patched directly, the source package remains unchanged and later AgentWheel runs can report `drift` or `destination exists but is not managed`.
8
+
9
+ ## Diagnostic checks
10
+
11
+ - Compare runtime skill path with package source, e.g. `~/.hermes/skills/<name>/SKILL.md` vs the OpenPack source `skills/<name>/SKILL.md`.
12
+ - Inspect AgentWheel dry-run output before applying: `agentwheel plan|install ... --dry-run`.
13
+ - Look for plan lines such as:
14
+ - `DRIFT ... managed destination changed outside agentwheel`
15
+ - `CONFLICT ... destination exists but is not managed`
16
+ - `SKIP ... force adopting unmanaged destination with matching hash`
17
+ - Check whether a scoped install is using the same target, installation type, adapter config, and state key/fingerprint as the manifest that originally managed the file.
18
+
19
+ ## Safe remediation shape
20
+
21
+ 1. Treat `~/.hermes/skills`, `.agents/skills`, `.claude/skills`, `.openclaw/skills`, etc. as generated if AgentWheel owns them.
22
+ 2. Move the durable edit into the OpenPack/source repo that provides the skill.
23
+ 3. If the runtime content already matches desired source content but the manifest no longer owns it, use a scoped dry-run with `--force-conflict` to confirm it only adopts matching content; apply only after approval.
24
+ 4. If runtime content differs from source, do not use `--replace-conflict` casually. First port the desired diff to source, then roll out.
25
+ 5. Prefer narrow commands with `--only-source --select skills/<name>` for one-skill rollouts into populated Hermes profiles.
@@ -0,0 +1,83 @@
1
+ # Multi-runtime plugin packs with AgentWheel
2
+
3
+ Use this when converting a runtime-specific plugin into one OpenPack package that targets multiple agent runtimes (for example OpenClaw + Hermes) while keeping runtime-specific adapters separate.
4
+
5
+ ## Recommended shape
6
+
7
+ ```text
8
+ openpack.json
9
+ plugins/
10
+ openclaw/<plugin-name>/
11
+ hermes/<plugin-name>/
12
+ settings/
13
+ <runtime-settings>.json
14
+ rules/
15
+ <shared-policy>.md
16
+ adapters/
17
+ <runtime-with-extra-targets>.jsonc
18
+ ```
19
+
20
+ Manifest pattern:
21
+
22
+ ```json
23
+ {
24
+ "schemaVersion": 2,
25
+ "name": "Owner/agent-plugin-name",
26
+ "version": "0.1.0",
27
+ "provides": [
28
+ { "type": "plugins", "path": "plugins/openclaw", "runtimes": ["openclaw"], "required": true },
29
+ { "type": "plugins", "path": "plugins/hermes", "runtimes": ["hermes"], "required": true },
30
+ { "type": "settings", "path": "settings/hermes.json", "runtimes": ["hermes"] },
31
+ { "type": "rules", "path": "rules", "runtimes": ["openclaw", "hermes"] }
32
+ ]
33
+ }
34
+ ```
35
+
36
+ Keep the plugin directory names distinct across runtimes when both are exposed as `plugins/*` artifacts. Example: `plugins/openclaw/extra-message-policy` and `plugins/hermes/hermes-extra-message-policy`. This avoids ambiguous list/install output where two artifacts share `plugins/<same-name>` but target different runtimes.
37
+
38
+ ## Hermes plugin target caveat
39
+
40
+ AgentWheel/OpenPack supports `type: "plugins"`, but some AgentWheel versions have a built-in Hermes adapter that does not expose a `plugins` target. In that case ship a declarative adapter config in the package, e.g. `adapters/hermes-with-plugins.jsonc`:
41
+
42
+ ```jsonc
43
+ {
44
+ "name": "hermes",
45
+ "displayName": "Hermes + plugins",
46
+ "targets": {
47
+ "instructions": { "enabled": true, "dest": ".hermes/AGENTS.md" },
48
+ "rules": { "enabled": true, "dest": ".hermes/rules" },
49
+ "skills": { "enabled": true, "dest": ".hermes/skills" },
50
+ "commands": { "enabled": true, "dest": ".hermes/commands" },
51
+ "mcp": { "enabled": true, "dest": ".hermes/mcp", "merge": "json-deep" },
52
+ "hooks": { "enabled": true, "dest": ".hermes/hooks", "merge": "json-deep" },
53
+ "settings": { "enabled": true, "dest": ".hermes/settings.json", "merge": "json-deep" },
54
+ "plugins": { "enabled": true, "dest": ".hermes/plugins" }
55
+ }
56
+ }
57
+ ```
58
+
59
+ Install/dry-run with:
60
+
61
+ ```bash
62
+ agentwheel install /abs/path/to/pack --driver local \
63
+ --adapter-config /abs/path/to/pack/adapters/hermes-with-plugins.jsonc \
64
+ --target-root /abs/runtime/root --dry-run
65
+ ```
66
+
67
+ Use absolute paths for local sources and adapter configs when `--target-root` differs from the package directory; relative paths are resolved from the target/workspace context and can fail.
68
+
69
+ ## Validation flow
70
+
71
+ 1. Build/test each runtime implementation directly.
72
+ 2. `agentwheel list /abs/path/to/pack --driver local` and confirm runtime artifacts are named distinctly.
73
+ 3. Dry-run each target runtime separately:
74
+ - OpenClaw plugin dry-run: add `--execute-plugins` so semantic plugin operations are visible.
75
+ - Hermes plugin dry-run: use the custom adapter config if needed.
76
+ 4. Check for `drift` and `conflict` before applying. Do not force drift without explicit approval.
77
+ 5. For plugin installs, remember that runtime restart/reload is a separate side effect.
78
+
79
+ ## Pitfalls
80
+
81
+ - `python3 -m py_compile` inside a managed Hermes plugin directory creates `__pycache__`, which AgentWheel reports as drift. Prefer `compile(Path(...).read_text(), path, "exec")` for syntax checks, or delete `__pycache__` before status/dry-run.
82
+ - Comparing only package versions is insufficient when live runtime copies were hotfixed. Compare important file hashes or `diff -ru --exclude=node_modules` before overwriting existing plugin copies.
83
+ - GitHub publishing is separate from local package authoring. If `gh`/SSH auth is unavailable, leave a clean local commit and report that the repo was not pushed.