Repository navigation
feat(skills): bundle Skill Workshop as a plugin that owns learned skill folders - #189388
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves learned-skill folder discovery into bundled plugin metadata and migrates obsolete Skill Workshop plugin policy. Example: An upgraded installation contains cell-procedure and an ignored legacy skill-workshop disable entry.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the scoped plugin extraction is useful, prior findings are addressed, and no new actionable defect was found; current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPlugin manifests and config policy select per-agent learned-skill folders; discovery feeds those skills into agent snapshots, while deep audit scans installed folders independently of plugin activation. flowchart TD
A[Plugin manifest] --> B[Plugin activation policy]
C[Config and Doctor migration] --> B
B --> D[Per-agent skill folders]
D --> E[Discovery worker]
E --> F[Agent skill snapshot]
A --> G[Installed skill security audit]
D --> G
Technical reviewBest possible solution: Land this bounded metadata and migration stage after required current-head gates pass, leaving the remaining extraction with its existing tracking issue. Do we have a high-confidence way to reproduce the issue? This is a staged extraction rather than a bug report; available main source confirms the hard-coded Workshop folder and retired plugin id that it replaces. Is this the best way to solve the issue? The smallest complete stage extends existing manifest, activation, discovery, audit, and Doctor owners while retaining stable skill source identities and the existing on-disk folder. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e1836d6dafb0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +332, Tests +151, Docs +51, Config +18, Generated 0, Other +2. Total +554 across 65 files. Added test files: 3. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed October 31, 2026, 4:41 PM ET / 20:41 UTC (Revision 8). |
48b7757 to
a426d07
Compare
|
|
|
@clawsweeper re-review Both findings from the review of 48b775727e24 are addressed:
CI is green on 3c88769. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Both items from the review of 3c88769 are addressed:
|
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Since the |
|
🦞👀 Re-review progress:
|
…l runtime fixtures
… policy awaits repair
5e12dd6 to
2897bdf
Compare
|
@clawsweeper re-review Rebased onto current main (no conflicts, no code change since the |
|
🦞👀 Re-review progress:
|
|
Maintainer override: the only failing CI job on head Failing tests:
Both tests fail the same way on a clean |
|
Landed as b17b673.
|
…ll folders (openclaw#189388) ## Problem Skill Workshop is moving from core into a bundled plugin, one piece at a time. Skill loading, prompt path compaction and the security audit hard-coded Workshop's per-agent skill folder. The `skill-workshop` plugin id was still retired: releases since 2026.10.1 ignore any `skill-workshop` plugin policy and warn that the plugin was removed. ## Fix - **New bundled plugin:** `extensions/skill-workshop`, enabled by default. It has no runtime registrations yet. - **New manifest field `agentSkillsDir`:** one folder name under each agent's state folder. Skill discovery reads it from plugin metadata, without loading the plugin. The discovery worker gets it with the other plugin skill roots. - Learned skills keep the `workshop` tier and the `openclaw-workshop` source id. Stored snapshots and the UI "Learned" group depend on them. - **Prompt path compaction:** keeps full paths for learned skills based on each skill's source, not a Workshop path lookup. - **Security audit:** scans every plugin-declared learned folder, including folders of disabled plugins. - **Plugin id restored:** `skill-workshop` is no longer a retired id. The "plugin removed" warning and the `plugins inspect` fallback are deleted. - **Config migration**, with the new marker `meta.migrations.skillWorkshopPlugin` (approved by Ayaan; same pattern as `modelPolicyAllowlist`): - Unmarked configs: runtime config materialization and config validation both ignore an older `plugins.entries.skill-workshop` entry (including proposal-era settings such as `maxSkillBytes`) and its `plugins.deny` id. Validation warns that Doctor removes them, so old settings never block a config write or startup. - Doctor, which runs during `openclaw update`, removes that policy and stamps the marker. It never rewrites `plugins.allow` or `plugins.enabled`. - A config write records the marker only when nothing older needs repair. While older `skill-workshop` entries or deny ids are ignored, any write that touches `plugins`, including an equal value, a parent-path assignment or a list-index edit, is refused with "Run `openclaw doctor --fix`, then retry". The refusal lives in the shared write preparation (`prepareConfigWriteTopology`), which offline writes, Gateway `config.patch` writes and Doctor repair all use; Doctor passes because its candidate records the marker. `config set` checks the same rule before it reports "No change" or routes a patch to a running Gateway. No writer infers which part of a write is new. - Marked configs validate `skill-workshop` settings like any other plugin's. - **Temporary second owner:** core Workshop code still writes learned skills until its writers move into the plugin. A test keeps the manifest folder equal to core's folder. ## Impact - **Update behavior:** the installed updater runs first and is unchanged. Candidate-side runtime materialization and validation keep unmarked configs working. Candidate Doctor removes the old policy and records the marker. - **Behavior change:** learned skills now load through the plugin, so an exclusive `plugins.allow` without `skill-workshop`, or `plugins.enabled: false`, stops loading them. Doctor does not rewrite those switches. Its existing "Skill Workshop tool policy" health check now warns when either switch keeps the plugin off while Workshop is on, and names the fix. - **Config surface:** `docs/.generated/config-baseline.counts.json` rises (core +1 for the marker, plugin +21 for the new plugin's standard entry fields). Ayaan approved the raise. ## Upgrade proof ### Published driver × candidate cell - **Setup:** published `[email protected]` installed in an isolated npm prefix. Isolated `OPENCLAW_STATE_DIR`, `OPENCLAW_CONFIG_PATH`, `OPENCLAW_HOME` and `HOME`. - **Candidate:** built from this branch with `scripts/package-openclaw-for-docker.mjs`; the tarball integrity check passed. 1. **Seed with the published CLI.** It writes `plugins.deny: ["skill-workshop"]` and `plugins.entries.skill-workshop: { enabled: false, config: { maxSkillBytes: 20000 } }`, printing its own "plugin removed: skill-workshop … ignored" warning. A learned skill `cell-procedure` sits at `agents/main/agent/workshop-skills/`. 2. **Published `skills list`:** `cell-procedure`, source `openclaw-workshop`, eligible. 3. **Update with the published updater:** `openclaw update --tag <candidate.tgz> --yes --no-restart` exits 0. The candidate owns admission, and the installed package contains `dist/extensions/skill-workshop` with `agentSkillsDir`. The candidate Doctor step reports "Removed plugins.entries.skill-workshop" and "Removed skill-workshop from plugins.deny". 4. **Config after update:** the deny list is empty, the `skill-workshop` entry is gone, and `meta.migrations.skillWorkshopPlugin` is `true`. 5. **`skills list` after update:** `cell-procedure` is still listed and eligible, and its file is unchanged. 6. **New policy is honored:** `config set plugins.entries.skill-workshop.enabled false`, then `skills list`: the learned skill is gone. ### Pre-Doctor policy writes through the real writer (source CLI, fresh isolated state per case) | Starting config (unmarked) | Command | Result | | --- | --- | --- | | 2026.10 entry `{enabled:false, config:{maxSkillBytes:20000}}` + deny | `config set plugins.entries.skill-workshop.enabled false` | refused: "must be migrated first. Run openclaw doctor --fix, then retry."; config unchanged | | same, after `doctor --fix` | same command | entry `{enabled:false}`, marker `true`; the learned skill is hidden | | `plugins.deny: ["skill-workshop", "diffs"]` | `config set 'plugins.deny[1]' telegram` | refused; config unchanged | | `plugins.allow: ["diffs"]` (no Workshop policy) | `config set plugins.entries.diffs.enabled true` | written; the allowlist is never rewritten | ## Tests - New tests for the migration, plugin enablement of learned folders, and the folder-equality guard. - Changed fixtures: - Skill-loading fixtures that set `plugins.enabled: false` only to skip plugin loading now use `plugins.allow: ["skill-workshop"]`. This covers 2 Workshop contract fixtures and 7 other skill suites. - Three `plugin-skills` mocks now spread the real module, which shrinks the mock-export baseline by 3. The synthetic registry in `workspace-skill-loader.test.ts` gains the bundled `skill-workshop` record. - The retired-plugin validation row for `skill-workshop` is replaced. The new case uses the real bundled plugin: an unmarked config with proposal-era settings validates with a Doctor warning, and the same settings fail once the marker is recorded. - Migration tests cover the write refusal for older entries and deny ids, Doctor's exemption, and the unaffected allowlist case. Health check tests cover the plugin-off warning for an exclusive allowlist and for `plugins.enabled: false`. A shared write-preparation test covers refusing an equal-value write and accepting it once migrated. - The `plugins inspect skill-workshop` fallback test is removed with the fallback. ## Evidence | Check | Result | | --- | --- | | All `src/skills` tests, all Workshop contract files, plugin manifest, root contributions, security audit, config meta and validation, inspect CLI, Doctor migration suites (174 files) | pass after the fixture updates above | | New migration (4) and enablement (1) tests | pass | | `check:changed`: typecheck all, boundaries, cycles, guards | pass | | `check:changed`: lint | changed files pass oxlint; the full lint run reports `max-lines` in files this PR does not touch | Co-authored-by: Ayaan Zaidi <[email protected]>
Problem
Skill Workshop is moving from core into a bundled plugin, one piece at a time. Skill loading, prompt path compaction and the security audit hard-coded Workshop's per-agent skill folder. The
skill-workshopplugin id was still retired: releases since 2026.10.1 ignore anyskill-workshopplugin policy and warn that the plugin was removed.Fix
extensions/skill-workshop, enabled by default. It has no runtime registrations yet.agentSkillsDir: one folder name under each agent's state folder. Skill discovery reads it from plugin metadata, without loading the plugin. The discovery worker gets it with the other plugin skill roots.workshoptier and theopenclaw-workshopsource id. Stored snapshots and the UI "Learned" group depend on them.skill-workshopis no longer a retired id. The "plugin removed" warning and theplugins inspectfallback are deleted.meta.migrations.skillWorkshopPlugin(approved by Ayaan; same pattern asmodelPolicyAllowlist):plugins.entries.skill-workshopentry (including proposal-era settings such asmaxSkillBytes) and itsplugins.denyid. Validation warns that Doctor removes them, so old settings never block a config write or startup.openclaw update, removes that policy and stamps the marker. It never rewritesplugins.alloworplugins.enabled.skill-workshopentries or deny ids are ignored, any write that touchesplugins, including an equal value, a parent-path assignment or a list-index edit, is refused with "Runopenclaw doctor --fix, then retry". The refusal lives in the shared write preparation (prepareConfigWriteTopology), which offline writes, Gatewayconfig.patchwrites and Doctor repair all use; Doctor passes because its candidate records the marker.config setchecks the same rule before it reports "No change" or routes a patch to a running Gateway. No writer infers which part of a write is new.skill-workshopsettings like any other plugin's.Impact
plugins.allowwithoutskill-workshop, orplugins.enabled: false, stops loading them. Doctor does not rewrite those switches. Its existing "Skill Workshop tool policy" health check now warns when either switch keeps the plugin off while Workshop is on, and names the fix.docs/.generated/config-baseline.counts.jsonrises (core +1 for the marker, plugin +21 for the new plugin's standard entry fields). Ayaan approved the raise.Upgrade proof
Published driver × candidate cell
[email protected]installed in an isolated npm prefix. IsolatedOPENCLAW_STATE_DIR,OPENCLAW_CONFIG_PATH,OPENCLAW_HOMEandHOME.scripts/package-openclaw-for-docker.mjs; the tarball integrity check passed.plugins.deny: ["skill-workshop"]andplugins.entries.skill-workshop: { enabled: false, config: { maxSkillBytes: 20000 } }, printing its own "plugin removed: skill-workshop … ignored" warning. A learned skillcell-proceduresits atagents/main/agent/workshop-skills/.skills list:cell-procedure, sourceopenclaw-workshop, eligible.openclaw update --tag <candidate.tgz> --yes --no-restartexits 0. The candidate owns admission, and the installed package containsdist/extensions/skill-workshopwithagentSkillsDir. The candidate Doctor step reports "Removed plugins.entries.skill-workshop" and "Removed skill-workshop from plugins.deny".skill-workshopentry is gone, andmeta.migrations.skillWorkshopPluginistrue.skills listafter update:cell-procedureis still listed and eligible, and its file is unchanged.config set plugins.entries.skill-workshop.enabled false, thenskills list: the learned skill is gone.Pre-Doctor policy writes through the real writer (source CLI, fresh isolated state per case)
{enabled:false, config:{maxSkillBytes:20000}}+ denyconfig set plugins.entries.skill-workshop.enabled falsedoctor --fix{enabled:false}, markertrue; the learned skill is hiddenplugins.deny: ["skill-workshop", "diffs"]config set 'plugins.deny[1]' telegramplugins.allow: ["diffs"](no Workshop policy)config set plugins.entries.diffs.enabled trueTests
plugins.enabled: falseonly to skip plugin loading now useplugins.allow: ["skill-workshop"]. This covers 2 Workshop contract fixtures and 7 other skill suites.plugin-skillsmocks now spread the real module, which shrinks the mock-export baseline by 3. The synthetic registry inworkspace-skill-loader.test.tsgains the bundledskill-workshoprecord.skill-workshopis replaced. The new case uses the real bundled plugin: an unmarked config with proposal-era settings validates with a Doctor warning, and the same settings fail once the marker is recorded.plugins.enabled: false. A shared write-preparation test covers refusing an equal-value write and accepting it once migrated.plugins inspect skill-workshopfallback test is removed with the fallback.Evidence
src/skillstests, all Workshop contract files, plugin manifest, root contributions, security audit, config meta and validation, inspect CLI, Doctor migration suites (174 files)check:changed: typecheck all, boundaries, cycles, guardscheck:changed: lintmax-linesin files this PR does not touch