Skip to content

feat(skills): bundle Skill Workshop as a plugin that owns learned skill folders - #189388

Merged
obviyus merged 10 commits into
mainfrom
feat/plugin-agent-skill-root
Nov 1, 2026
Merged

obviyus merged 10 commits into
mainfrom
feat/plugin-agent-skill-root

Conversation

@obviyus

@obviyus obviyus commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

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

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations size: M labels Oct 31, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Core loads cell-procedure independently of plugin policy.
  • After: Doctor removes the obsolete entry, the plugin continues loading cell-procedure, and a newly authored disable hides it.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The scoped stage has shipped-entry-point upgrade evidence, coherent ownership, and no open finding; pending CI remains a separate landing gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Supplied real CLI results exercise published 2026.10.9 updating to the candidate, legacy-policy migration, unchanged learned-skill files and eligibility, subsequent disablement, and pre-Doctor write refusal.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Learned-skill discovery remains hard-coded in core and cannot follow normal plugin enablement.
Reason: The maintainer-authored PR establishes direction and completes its bounded folder-discovery stage; the broader extraction remains separately tracked.

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
Reviewed head: 2897bdf60d531e2ad0fd0aa16d6b38f12457b7b8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Plugin 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
Loading

Technical review

Best 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

  • Restored skill-workshop plugin identity changes intended behavior with a stated reason (feat: add Skill Workshop and skill research #88328: Workshop moved into core as core skills functionality; the later retired-id warning prevented stale configuration from breaking startup.)
  • Per-agent folder and source precedence keeps the original intent (a4514a0: Agent-owned Workshop collections keep ownership and recovery independent of session workspaces.)
  • Learned-skill visibility changes intended behavior with a stated reason (cfee851: Learned skills remain visible to their agent despite ordinary skill allowlists; this PR preserves that classification but intentionally adds plugin-level enablement.)
  • Discovery worker and prompt projection keeps the original intent (877301a: Passive discovery runs off the Gateway thread and projection consumes already selected entries; plugin folder names now travel through the same prepared worker input.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +332, Tests +151, Docs +51, Config +18, Generated 0, Other +2. Total +554 across 65 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 30 454 122 +332
Tests 20 225 74 +151
Docs 7 54 3 +51
Config 2 18 0 +18
Generated 2 5 5 0
Other 4 7 5 +2
Total 65 763 209 +554

Review metrics

Metric Value Why it matters
New manifest capability 1 optional field: agentSkillsDir Adds a metadata-only per-agent skill-folder contract without loading plugin runtime.

Root-cause cluster

Relationship: partial_overlap
Canonical: #173605
Summary: This PR implements the learned-folder discovery stage of the broader Workshop extraction program.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A useful, bounded plugin extraction with configuration migration and no demonstrated urgent runtime failure.
  • merge-risk: 🚨 compatibility: Restoring plugin-policy enforcement changes learned-skill visibility for existing global-disable and allowlist configurations; the maintainer-authored PR explicitly accepts and documents this tradeoff.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-31T13:04:39.826Z sha 48b775727e24b3fd128c7de1ee50203a43dd0a6c :: blocked before merge. :: [P1] Migrate stale Workshop settings before config-write validation | [P2] Update the validation test that still treats Workshop as retired
  • reviewed 2026-10-31T15:11:55.751Z sha 3c88769 :: blocked before merge. :: [P1] Preserve newly authored policy when another legacy repair remains
  • reviewed 2026-10-31T15:56:58.135Z sha 90a93f97f3c8773b0310bc9a157e984628461f58 :: blocked before merge. :: none
  • reviewed 2026-10-31T17:25:10.033Z sha 078fdb8a5701c235785a0dbce57d488a8f1e0470 :: needs changes before merge. :: [P1] [P1] Preserve Workshop intent in parent-path assignments | [P1] [P1] Limit list intent to the element actually written | [P1] [P1] Carry Workshop migration through Gateway-routed writes
  • reviewed 2026-10-31T19:15:46.666Z sha ae4b05202e684e7588f6aeb72ce43f971a0b0a7e :: needs maintainer review before merge. :: none
  • reviewed 2026-10-31T19:44:35.758Z sha 09f137826fb04968703a63cf5cbb6a3a020829fb :: needs maintainer review before merge. :: none
  • reviewed 2026-10-31T20:10:40.195Z sha 5e12dd6188042e90ff22c395b19642f3d772621f :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 4:41 PM ET / 20:41 UTC (Revision 8).

@obviyus
obviyus marked this pull request as ready for review October 31, 2026 13:16
@obviyus
obviyus force-pushed the feat/plugin-agent-skill-root branch from 48b7757 to a426d07 Compare October 31, 2026 13:16
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 2897bdf60d531e2ad0fd0aa16d6b38f12457b7b8
  • Maintainer: @obviyus
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • extensions/skill-workshop/package.json

Carefully review these changes before merging.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 2897bdf60d531e2ad0fd0aa16d6b38f12457b7b8
  • Maintainer: @obviyus
  • Repository role: admin

These security sensitive changes were made:

  • src/security/audit.deep.runtime.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts agents Agent runtime and tooling labels Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Both findings from the review of 48b775727e24 are addressed:

  • [P1] Config writes rejected proposal-era settings: runtime materialization and config validation now share one projection (projectSkillWorkshopPluginPolicy). For an unmarked config, it ignores the old plugins.entries.skill-workshop entry and its settings, plus the plugins.deny id, and validation warns that Doctor removes them. Old settings no longer block a write or startup. Once the marker is recorded, skill-workshop settings are validated like any other plugin's. An ordinary write stamps the marker only when no older policy needs repair, so it never rewrites policy arrays. Adding the plugin to an existing allowlist is left to Doctor.
  • [P2] Retired-plugin test: the skill-workshop row is removed. The new case uses the real bundled plugin: an unmarked config with maxSkillBytes validates with a Doctor warning, and the same setting fails once the marker is recorded.

CI is green on 3c88769.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Both items from the review of 3c88769 are addressed:

  • [P1] Preserve newly authored policy when another legacy repair remains: a config write that changes skill-workshop policy now runs the full migration and records the marker. Old policy (for example a deny from the built-in era) is removed, and the newly written policy is kept. Writes that don't touch Workshop policy still leave repair to Doctor. The new test keeps a newly written disable through reload and Doctor while older policy awaits repair covers write, reload projection and a later Doctor pass for your exact case. Doctor also gained a matching legacy rule, so doctor --fix reports and repairs the old policy.
  • Data-model compatibility proof: see Upgrade proof in the PR body. It runs the real CLI on isolated state with a 2026.10-shaped config: the learned skill loads before Doctor, Doctor migrates the config and records the marker, the skill still loads after, and a later config set …enabled false hides it.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Since the ready review of 09f137826fb0: pruned the now-stale src/flows/doctor-core-checks.ts entry from config/max-lines-baseline.txt (CI baseline ratchet; shrink-only). No code change.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@obviyus
obviyus force-pushed the feat/plugin-agent-skill-root branch from 5e12dd6 to 2897bdf Compare October 31, 2026 20:35
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Rebased onto current main (no conflicts, no code change since the ready review of 5e12dd618804). The rebase picks up main's update to ui/src/e2e/chat-details-changes.e2e.test.ts, which failed against the older base.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override: the only failing CI job on head 2897bdf60d531e2ad0fd0aa16d6b38f12457b7b8 is checks-ui-e2e (5/7) (run 41239629743, failed again after one rerun of failed jobs). openclaw/ci-gate fails only because of that job.

Failing tests:

  • ui/src/e2e/chat-pull-requests.e2e.test.ts:387 > keeps every PR visible and actionable at 1440 in light
  • ui/src/e2e/chat-pull-requests.e2e.test.ts:501 > offers a compact publication row while rate limited on desktop

Both tests fail the same way on a clean origin/main checkout at 9e3b867, without this PR. This PR changes no UI code. All other required jobs pass, and the hosted ClawSweeper review is ready on this exact head.

@obviyus
obviyus merged commit b17b673 into main Nov 1, 2026
261 of 266 checks passed
@obviyus
obviyus deleted the feat/plugin-agent-skill-root branch November 1, 2026 00:55
@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as b17b673.

  • Change: Skill Workshop's learned-skill folder is now owned by the bundled skill-workshop plugin through the manifest field agentSkillsDir. The skill-workshop plugin id is no longer retired.
  • Upgrade: Doctor removes skill-workshop policy that older releases ignored and records meta.migrations.skillWorkshopPlugin. Until then, plugins writes are refused with "Run openclaw doctor --fix, then retry".
  • Proof: the published 2026.10.9 updater updated to this candidate; learned skills still loaded, and a later disable was honored. Real config set cases before and after Doctor are in the PR body.
  • The two checks-ui-e2e (5/7) PR-chip failures also fail on main; see the override comment.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts security-sensitive-changed size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant