Skip to content

improve: skill-workshop prompt banks reactive corrections without a save command#100578

Closed
vincentkoc wants to merge 1 commit into
mainfrom
improve-skill-workshop-prompt-corrections
Closed

improve: skill-workshop prompt banks reactive corrections without a save command#100578
vincentkoc wants to merge 1 commit into
mainfrom
improve-skill-workshop-prompt-corrections

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The Skill Workshop prompt section frames the tool as something to reach for "when the user wants to create, update, revise… a skill". Users don't talk like that: they correct reactively ("that's not what I asked", "you're still using X", "I don't want to repeat myself"). Field evidence from a live two-day agent deployment: a session's corrections only reached skills when the user happened to say "update all the skills and memory now please" / "save everything to skills" — and on the day nobody said the magic phrase, the corrections (including the session's most important one) were lost to the context window.

Why This Change Was Made

Three lines added to buildSkillWorkshopPromptSection(): reactively-phrased corrections and standing preferences are durable signals; a correction about how an existing skill's work should be done becomes an action=update proposal in the same turn without waiting for a save request; and the agent reports which proposal the correction landed in so capture is verifiable rather than a promise. Lifecycle safety is untouched — proposals stay pending behind scan + explicit human approval.

Companion to #100576 (autonomous auto-capture for the same signals at the harness level); this covers the interactive path where the agent itself should act on the correction.

User Impact

Users stop needing a magic phrase for feedback to stick: correcting the agent in plain reactive language now produces a pending skill-update proposal the same turn, with an explicit pointer to where it landed.

Evidence

  • node scripts/run-vitest.mjs src/agents/system-prompt.test.ts → 91 passed, including two new assertions locking the added guidance into the prompt when skill_workshop is available.
  • autoreview --mode branch --base origin/main (codex/gpt-5.5): clean — overall: patch is correct (0.9).

…ave command

The prompt section only invoked the workshop when the user asked to
create/update a skill, so reactive corrections ("that's not what I
asked", "you're still doing X") never became proposals unless the user
remembered a magic "save that to the skill" follow-up. Field evidence
from a live deployment: a session's corrections sat in chat until the
user happened to say "update all the skills" - and the ones where nobody
said it were lost.

- treat reactively-phrased corrections and standing preferences as
  durable signals
- propose the fix into the relevant skill via action=update in the same
  turn, without waiting for a save request
- report which proposal the correction landed in so capture is
  verifiable
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jul 6, 2026
@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 11:32 PM ET / 03:32 UTC.

Summary
The PR adds Skill Workshop system-prompt guidance and prompt assertions so reactive corrections can be treated as same-turn skill-update proposal signals.

PR surface: Source +2, Tests +6. Total +8 across 2 files.

Reproducibility: not applicable. This PR is a prompt-behavior improvement rather than a reproducible bug report. Source inspection confirms current main lacks the reactive-correction trigger and the PR adds it in the injected Skill Workshop prompt section.

Review metrics: 1 noteworthy metric.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

Risk before merge

Maintainer options:

  1. Decide the mitigation before merge
    Keep a pre-tool reactive-correction trigger if maintainers accept the behavior, but fold it into the smallest prompt wording that still makes the model call Skill Workshop while leaving lifecycle mechanics in the tool/schema.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] The PR is maintainer-labeled and intersects a concurrent maintainer prompt-budget PR, so the next action is human review/coordination rather than cleanup closure or automated repair.

Maintainer decision needed

  • Question: Should reactive correction capture live in the always-rendered Skill Workshop prompt, and if so should this PR land as written or be folded into the concurrent prompt-slimming work?
  • Rationale: The PR is technically consistent with the current Skill Workshop boundary, but it adds recurring prompt text while another open maintainer PR is reducing that same prompt surface for token and tone reasons.
  • Likely owner: steipete — They own the concurrent prompt-slimming PR that determines the prompt-budget direction for this exact section.
  • Options:

Security
Cleared: The diff only changes prompt text and prompt assertions; it does not touch dependencies, workflows, secrets, install scripts, publishing, or code-execution boundaries.

Review details

Best possible solution:

Keep a pre-tool reactive-correction trigger if maintainers accept the behavior, but fold it into the smallest prompt wording that still makes the model call Skill Workshop while leaving lifecycle mechanics in the tool/schema.

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

Not applicable: this PR is a prompt-behavior improvement rather than a reproducible bug report. Source inspection confirms current main lacks the reactive-correction trigger and the PR adds it in the injected Skill Workshop prompt section.

Is this the best way to solve the issue?

Yes, the prompt section is the right layer for the trigger because the model needs to decide to call skill_workshop before action-schema guidance can help. The best final form should be reconciled with the concurrent prompt-slimming PR so the behavior does not create avoidable recurring prompt cost.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c9219c7f80f4.

Label changes

Label changes:

  • add P3: This is a small maintainer-authored prompt behavior improvement with limited blast radius and no urgent runtime break.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor real-behavior proof gate does not apply because this is a maintainer-labeled MEMBER PR; the PR body reports focused prompt-test validation.

Label justifications:

  • P3: This is a small maintainer-authored prompt behavior improvement with limited blast radius and no urgent runtime break.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor real-behavior proof gate does not apply because this is a maintainer-labeled MEMBER PR; the PR body reports focused prompt-test validation.
Evidence reviewed

PR surface:

Source +2, Tests +6. Total +8 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 1 6 0 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 8 0 +8

What I checked:

  • Repository policy read: Root AGENTS.md and src/agents/AGENTS.md were read fully; root review policy requires whole-surface PR review and keeps protected maintainer-labeled items open for human handling. (AGENTS.md:19)
  • Current prompt gap: Current main only marks explicitly saved/repeated/proposed standing workflows as durable before the PR, with no reactive-correction trigger in the Skill Workshop section. (src/agents/skill-workshop-prompt.ts:11, c9219c7f80f4)
  • PR prompt change: The PR head adds the reactive-correction durability rule and a user-visible verification instruction in the same Skill Workshop prompt section. (src/agents/skill-workshop-prompt.ts:13, cfd2efdfc805)
  • Prompt injection boundary: The Skill Workshop prompt section is injected only when the skill_workshop tool is available, so the new text is scoped to sessions that can actually create/update proposals. (src/agents/system-prompt.ts:969, c9219c7f80f4)
  • Tool contract supports update proposals: The tool schema includes update, and the execution path dispatches action=update to proposeUpdateSkill with required skill_name and proposal_content. (src/agents/tools/skill-workshop-tool.ts:36, c9219c7f80f4)
  • Lifecycle safety remains in current docs/service: Current docs state generated content is stored as pending proposals, apply is the only live write, updates are hash-bound, and apply reruns scanner checks. Public docs: docs/tools/skill-workshop.md. (docs/tools/skill-workshop.md:11, c9219c7f80f4)

Likely related people:

  • shakkernerd: Authored the merged Skill Workshop/Skill Research feature PR that introduced the governed proposal path, tool, docs, system prompt guidance, and current service surface. (role: introduced behavior; confidence: high; commits: d45fb6438e6f, 007291912bff, 3e7d869ef606; files: src/agents/tools/skill-workshop-tool.ts, src/skills/workshop/service.ts, src/agents/system-prompt.ts)
  • vincentkoc: Authored this maintainer-labeled PR, the companion reactive auto-capture PR, and an earlier Skill Workshop prompt-extension PR, so they are directly connected to the requested prompt behavior. (role: adjacent prompt contributor; confidence: medium; commits: cfd2efdfc805, 4f6374fe11d2, dbbe33d89cf5; files: src/agents/skill-workshop-prompt.ts, src/agents/system-prompt.test.ts, src/skills/research/autocapture.ts)
  • steipete: Authored the open prompt-slimming PR that changes the same Skill Workshop prompt section and frames the prompt-budget/product tradeoff this PR intersects. (role: recent adjacent owner; confidence: medium; commits: 47ce4522b6ed; files: src/agents/skill-workshop-prompt.ts, src/agents/system-prompt.test.ts, src/agents/tools/skill-workshop-tool.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 6, 2026
@vincentkoc vincentkoc self-assigned this Jul 6, 2026
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Closing this one in favor of the coordinated design on #100576 — decision and reasoning:

Why not this PR:

What survives: the core insight — reactive phrasing ("that's not what I asked", "stop doing X") is durable-signal-bearing and dominates real corrections — is right, and lives on in #100576's REACTIVE_PATTERNS. The per-turn capture goal is superseded by the incoming default-on suggest tier, which injects one context line only when a signal was actually detected, so it does this PR's job conditionally instead of paying permanent prompt bytes.

What would change the decision: evidence that signal-gated suggestion misses corrections that only an always-on prompt instruction catches — that would justify revisiting a (conditional, autonomy-gated) prompt line on top of the tool-schema guidance.

Thanks for pushing on this, @vincentkoc — the reactive-patterns idea shaped where the coordinated design landed.

@steipete steipete closed this Jul 6, 2026
@vincentkoc
vincentkoc deleted the improve-skill-workshop-prompt-corrections branch July 6, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants