Skip to content

refactor(learn): /learn stops naming Skill Workshop in core prompts and replies - #192622

Merged
obviyus merged 4 commits into
mainfrom
refactor/learn-contribution-text
Nov 4, 2026
Merged

obviyus merged 4 commits into
mainfrom
refactor/learn-contribution-text

Conversation

@obviyus

@obviyus obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Core's /learn dispatcher still named the Skill Workshop plugin's tool and CLI in its routing prompt and its "unavailable" replies, after #192471 moved Workshop into a plugin.

User Impact

  • With Workshop available, /learn behaves as before and keeps its Workshop-specific "not available" remedy.
  • With no plugin contributing to /learn (for example, Workshop disabled), the reply no longer blames Skill Workshop. It says no learning tools are available, plus the existing remedy.
  • When neither skills nor memory can learn, the reply drops the tool names: "/learn can't save anything on this agent: no learning tools are available here. …"
  • The routing line in the combined skills-and-memory prompt says a procedure "goes to a skill" instead of naming skill_workshop. Workshop's own guidance line right after it still names the tool.

Why This Change Was Made

  • LearnContribution gains optional unavailableText. It is the reply when /learn cannot learn and that contribution's medium is the only one registered, or its subcommand was asked for. This is an additive, optional SDK field, documented in docs/plugins/sdk-overview/infrastructure.md.
  • The Workshop plugin supplies its existing remedy text through that field.
  • Core keeps the prompt frame and the routing rule between media, but no longer names a plugin's tool.

I also checked the other suspected special case, the openclaw-workshop skill source. It isn't a Workshop leak: core assigns it to every plugin's manifest agentSkillsDir root, and the Control UI groups "learned" skills by that wire value. Renaming it would be a protocol change, so this PR leaves it.

Evidence

  • src/auto-reply/reply/commands-learn.test.ts passes 14/14, including a new case for no contributors (generic reply, previously the Workshop text).
  • The behavior pins in src/auto-reply/reply/commands.workshop-contract.test.ts pass 34/34. The only pin changed is the combined both-media reply text.
  • tsgo:core, tsgo:extensions and tsgo:core:test pass; oxfmt and oxlint are clean on the changed files.
  • Not run locally: plugin-sdk:api:diff, since it creates its own worktrees. CI covers the SDK surface checks.

@clawsweeper

clawsweeper Bot commented Nov 4, 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.

@obviyus
obviyus marked this pull request as ready for review November 4, 2026 06:51
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation plugin: skill-workshop size: S labels Nov 4, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves Workshop-specific unavailable replies into the plugin contribution and removes Workshop tool names from core learning instructions.

Example: Run /learn with no learning contributions registered.

  • Before: The reply says Skill Workshop is unavailable and recommends its CLI.
  • After: The reply says no learning tools are available and gives the generic tool-availability remedy.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused cleanup with the prior findings resolved and relevant in-process coverage; confidence remains bounded by the supplied validation.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; its supplied evidence exercises the changed /learn handler and registry dispatch through in-process tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Agents without learning contributions receive Workshop-specific recovery advice, and alternative skills contributors inherit Workshop tool names in core instructions.
Reason: The collaborator-authored direction completes the established plugin boundary without adding configuration or changing tool authority.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it completes useful plugin ownership cleanup, resolves the prior findings, and introduces no identified correctness defect; current-head CI is still pending.

Priority: P3
Reviewed head: 9fbd6049e41e721569f8ac8360b9c7588d5e3ba7

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supplied evidence covers handler and command-registry tests, without a running-Gateway demonstration or recorded base-red/head-green regression result.
Agent review details

How this fits together

The core /learn dispatcher combines plugin contributions with the current turn's tool availability, then returns a reply or prepares a learning prompt for the agent.

flowchart TD
  A[User learn command] --> B[Core dispatcher]
  C[Plugin contributions] --> B
  B --> D[Tool availability]
  D --> E[Unavailable reply]
  D --> F[Learning prompt]
  F --> G[Agent turn]
Loading

Technical review

Best possible solution:

Keep the existing dispatcher and contribution owner, with plugin-owned remedies and unavailable subcommands selecting their actual contributor.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically returns the Workshop remedy for an empty contribution list and names its tool in generic routing instructions; no target code was executed.

Is this the best way to solve the issue?

The patch is the smallest complete ownership change: it extends the existing contribution contract, preserves Workshop's remedy in its plugin, and keeps generic routing in core.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5bba84b9327e.

Provenance checked

  • Generic learning contribution ownership changes intended behavior with a stated reason (a5eb424: Enable generic plugin learning contributions while preserving existing prompts, replies, and authorization during extraction.)
  • Skills-versus-memory routing instruction keeps the original intent (f8d9d25: Route repeatable procedures to skills and facts or preferences to the selected memory provider.)
  • Workshop unavailable remedy keeps the original intent (62ecc23: Explain why the Workshop learning command cannot run and provide a recovery path.)
  • Workshop command characterization changes intended behavior with a stated reason (60bee20: Pin operator-visible behavior at core entry points before Workshop extraction.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit a5eb424 adds src/auto-reply/reply/commands-learn.ts:42 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a5eb424e6347; files: src/auto-reply/reply/commands-learn.ts)
  • Peter Steinberger: Raw commit 9e0064b adds src/auto-reply/reply/commands-learn.ts:46 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9e0064bd7d90; files: src/auto-reply/reply/commands-learn.ts)

PR surface

Source +14, Tests +30, Docs +4, Other +1. Total +49 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 29 15 +14
Tests 2 35 5 +30
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 7 69 20 +49

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is focused plugin ownership and diagnostic cleanup without an urgent runtime failure.
  • merge-risk: 🚨 compatibility: The public learning contribution contract gains an optional field; the collaborator-authored direction accepts this documented, source-compatible extension.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 (2 earlier review cycles)
  • reviewed 2026-11-04T07:08:46.650Z sha 7f5a91051e6f40e83b00ca7f01085e72e4704ddf :: needs changes before merge. :: [P2] Honor the selected subcommand's unavailable reply | [P2] Account for the added regression in the test-line budget
  • reviewed 2026-11-04T07:42:27.708Z sha ea035c9 :: needs changes before merge. :: [P2] Select the unavailable reply from the subcommand's actual contributor

Reviewed November 4, 2026, 3:26 AM ET / 08:26 UTC (Revision 3).

@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

obviyus and others added 3 commits November 4, 2026 13:06
…e reply

Core's /learn frame no longer names the Skill Workshop tool or CLI; the plugin supplies its remedy through LearnContribution.unavailableText.

Co-authored-by: obviyus <[email protected]>
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@obviyus
obviyus force-pushed the refactor/learn-contribution-text branch from 052f3e5 to ea035c9 Compare November 4, 2026 07:37
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@obviyus
obviyus merged commit 1ba543b into main Nov 4, 2026
124 checks passed
@obviyus
obviyus deleted the refactor/learn-contribution-text branch November 4, 2026 08:37
@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…nd replies (openclaw#192622)

* refactor(learn): let /learn contributions supply their own unavailable reply

Core's /learn frame no longer names the Skill Workshop tool or CLI; the plugin supplies its remedy through LearnContribution.unavailableText.

Co-authored-by: obviyus <[email protected]>

* fix(learn): honor a selected subcommand's unavailable reply when no tools are available

Co-authored-by: obviyus <[email protected]>

* chore(test): allocate test lines for the /learn unavailable-reply coverage

Co-authored-by: obviyus <[email protected]>

* fix(learn): take a subcommand's unavailable reply from its own contributor

Co-authored-by: obviyus <[email protected]>
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

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: skill-workshop rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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