Repository navigation
fix(skills): make a user's correction to a skill actually land - #3937
Conversation
The SD Agent Playbook and SD User Guide were removed in v0.24.0 with the standalone `sd` agent, so both URLs 404. The external-link check has no tolerance flag and runs on every PR touching docs/, so this fails CI repo-wide rather than only on the page that carries it. The sentence keeps saying what v0.15.3 shipped — rewriting that would make an archived release note wrong — and says where the capability lives now, which is what a reader following the dead link was after.
Telling the agent how you want a skill's output did nothing. The transcript skill's brief format could not be corrected at all, and the agent said it had been anyway: asked to change it, the model reported "the transcribe-meeting skill has been updated on your machine" having called no tool. Four defects between the request and a stored change, each found by driving the flagship against a local Lemonade: * The section parser split on `#` lines inside fenced code blocks. A skill shows its output by printing it, so `transcribe-meeting` parsed into ten sections where a reader sees seven — `output-shape` covered only the fence opener, and the brief format sat in a phantom section named after the sample transcript. A correction there validated, orphaned the closing fence, and freed the example Speakers list into the instructions: the opposite of what was asked. * `remember_skill_lesson` was unreachable on the turn it exists for. It lives in the `skills` bundle, and someone correcting a skill talks about their meeting brief, not about skills, so semantic selection never picked that bundle — the same ranking blind spot that moved the file-edit tools to CORE (#3752). It now rides the SKILL signal whenever a skill is loaded and learning is on, so an agent with no skills is byte-identical. * The SKILL tier lost a tool the turn after it admitted it. An already-loaded name was skipped, which also left it out of the protected set, making an uncalled row the LRU's first pick — recalled procedures' own tools evicted while the procedure was still being followed. * A quote could not survive the file's line wrap. Bodies wrap near 80 columns; the model reads them as prose and quotes back one line, so `replaces` failed on every paragraph spanning two lines, and the refusal said "quote it exactly" without showing what to quote. Words must still match; line breaks need not, and a genuine miss now prints the section. `transcribe-meeting` gains a `Brief shape` section so the part that is a matter of taste has its own anchor, separate from the transcript example above it.
Skill audit
✅ All audited skills cleared the tier they claim. Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the |
|
Verdict: Request changes — two one-line fixes, then this is ready. This makes "tell GAIA how you want a skill's output" actually stick: the parser stops treating example Markdown inside code fences as real sections, the correction tool becomes visible on the turn someone asks for a change, and a quote no longer has to match the file's line wrapping. The write path is well covered and the failure it fixes is reproduced in tests. Two things to fix before merge:
Real-world evidenceThe bundle exercises the real $ gaia skill deltas transcribe-meeting --scope GaiaAgent --drop-section no-such-section
gaia skill deltas: 'transcribe-meeting' has no section 'no-such-section'. Sections are: transcribe-meeting, procedure, never-build-the-brief-from-a-fragment, when-speaker-identification-did-not-run, speaker-names-are-inferred-not-identified, output-shape, brief-shape, fork-this.Base, same command — three phantom sections from inside the code fence: gaia skill deltas: 'transcribe-meeting' has no section 'no-such-section'. Sections are: …, output-shape, transcript-staff-meeting, speakers, transcript, brief-shape, fork-this.The bundle's own section 4 records the CLI heading-spelling refusal that my finding 2 above traces to a leaked record — worth reading together. The Agent UI screenshot and the 🔍 Technical details
Issues found🟡 The fallback normalizes with an inline body = "# A_B\n\nx\n\n# A B\n\ny\n"
secs = parse_sections(body) # slugs: ['ab', 'a-b']
find_section(secs, "A_B").heading # -> 'A B' ← the other section
🟡 A refused
Nits🟢 The refusal embeds an unbounded section ( 🟢 The comment above 🟢 Reflow tolerance spans paragraph breaks. Strengths
|
# Conflicts: # docs/releases/v0.15.3.mdx
|
Merged The conflict was a one-line release note both sides had edited. Main's wording is the correct one and was kept. 🔍 Technical details
Tests on the merge result: |
amd#4120) Five open PRs (amd#4096, amd#4108, amd#3937, amd#3122, amd#3072) are showing a red agent-eval lane for a scorecard that was never produced. The Anthropic account is over its weekly spend cap, and the rejection text changed to a wording the preflight classifier does not recognise, so instead of "quota exhausted, this says nothing about your PR" the job dies in ~37 seconds with "could not be classified" and looks like a measured quality regression. After this change the same outage is named as a quota outage and points at billing rather than at the PR or the repository secrets. The pattern matches on `weekly limit`, not on the reset date the message quotes — that date moves every reset. ## Test plan - [ ] `python -m pytest tests/unit/test_classify_claude_probe.py -q` — 30 passed - [ ] `test_real_weekly_limit_rejection_is_a_quota_problem` feeds the verbatim text from run 35681533582 (job 106629918099), BOM and U+00B7 included, and asserts `quota`; it fails on `main` - [ ] `test_the_weekly_limit_pattern_does_not_depend_on_the_reset_date` pins that a different reset date still classifies - [ ] `python util/lint.py --black --isort --flake8` passes - [ ] The classifier stays pure ASCII (`test_the_classifier_module_is_pure_ascii`), which the PowerShell eval step depends on Co-authored-by: Kalin Ovtcharov <[email protected]>
find_section's fallback re-derived a slug with its own inline regex instead of calling slugify_heading, so two headings differing only in stripped punctuation (or over 64 chars) could collapse onto the same lookup key -- a model quoting one heading could silently edit its neighbor. `gaia skill deltas --drop-section` anchored on the raw typed spelling rather than the resolved slug for the same reason, so a rejected drop still left a permanently-unresolvable staged row. Also caps an unbounded section dump in a DeltaRefused message and fixes a backwards comment on the heading regex.
Telling GAIA how you want a skill's output did nothing, and it said otherwise. A colleague hit this on the transcription skill: he wanted meeting briefs formatted his way, and the agent replied that the skill "has been updated on your machine" — having called no tool and stored no change. The adaptive-skills write path (#2674) shipped, but four defects sat between a user saying "format it like this" and anything happening. All four were found by driving the flagship against a local Lemonade, and the loop now works end to end: the correction lands as one reviewable delta,
gaia skill deltas --diffshows it, and one command reverts it.Test plan
pytest tests/unit/test_adaptive_skills.py tests/unit/test_tool_loader_selection.py hub/agents/gaia/python/tests/test_skill_learning_reachability.py— 116 pass, incl. 8 new fence cases and a guard that every shipped skill's parsed sections match the headings a reader seesgaia skill audit hub/skills/transcribe-meeting— ALLOW, no findingstranscribe-meetingloaded: say "I always want meeting briefs to start with an Action Items section grouped by owner" → onereplace_snippetdelta onbrief-shape, thengaia skill deltas transcribe-meeting --diffshows only that paragraph changed and the code fence intactgaia eval agent --category tool_selection— 3/5, avg 7.2. No regression: both failures reproduce on a clean tree (smart_discoveryFAIL 3.5 unchanged;multi_step_planis flaky — 5.2 and 8.9 with the change, 9.7 without, 7.35 in the baseline).known_path_readimproved from the baseline's FAIL 6.67 to PASS 9.5.Threads
#lines inside```blocks. A skill shows its output by printing it, sotranscribe-meetingparsed into ten sections where a reader sees seven — and a correction to its output format validated, orphaned the closing fence, and freed the example Speakers list into the live instructions. The user had asked to remove that list.remember_skill_lessonsits in theskillsbundle, and someone correcting a skill talks about their meeting brief, not about skills — the same ranking blind spot that moved the file-edit tools to CORE (The flagship agent usually can't edit files on a coding request: edit tools lose tool selection #3752). It now rides the SKILL signal when a skill is loaded; an agent with no skills is byte-identical.replacesfailed on every paragraph spanning two lines — and the refusal said "quote it exactly" without showing what to quote. Words must still match; line breaks need not.Not in scope
Learning from traces rather than from what the user said. #2866 owns that and deliberately excludes inferring from repeated behaviour; this PR makes the explicit path it does own actually work.
Related: #2674 (umbrella), #2866, #2681.