Make bundled skill descriptions router-precise (stop false-positive skill loading) - #48780
Conversation
|
Related: #32361 (tightens skill descriptions for prompt budget). Different goal/mechanism — that PR trims descriptions for token economy; this one rewrites 15 bundled descriptions as routing predicates (precise trigger + negative "Not for ..." boundaries) to stop false-positive skill loading. Docs/content-only, no code or behavior changes. |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Clean targeted fix. The router description update is well-scoped (single file, 23 additions) and directly addresses false-positive skill loading by making bundled skill descriptions more precise. No security, performance, or code quality concerns.
Reviewed by Hermes Agent
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating a real routing-quality concern. The current skill index does use descriptions (agent/prompt_builder.py:1392), but this patch needs a re-scope before it can deliver the claimed boundary behavior.
Problems
- Every replacement description exceeds the hard 60-character skill standard (
AGENTS.md:882-900). The actual system-prompt path truncates descriptions to 57 characters plus...(agent/skill_utils.py:771-779), so the proposed "Not for" clauses do not reach the Level-0 index. - Two changed files no longer exist on main:
skills/devops/kanban-orchestrator/SKILL.mdandskills/devops/kanban-worker/SKILL.md. They were removed when their guidance was folded into injectedKANBAN_GUIDANCEby84e1d31e5.
Suggested changes
- Recast the remaining descriptions as router-focused, single-sentence descriptions of 60 characters or fewer; keep the strongest trigger in that budget.
- Remove the obsolete Kanban file edits and reassess any desired change against current
KANBAN_GUIDANCE.
This is an automated hermes-sweeper review.
| @@ -1,6 +1,6 @@ | |||
| --- | |||
| name: test-driven-development | |||
| description: "TDD: enforce RED-GREEN-REFACTOR, tests before code." | |||
| description: "Use ONLY when writing or changing application/library source code that has (or should have) a unit/integration test suite: enforce RED-GREEN-REFACTOR, write a failing test before the code. Do NOT load for research/optimization loops, performance/benchmark tuning, data/ML experiments, prototypes, or config — and do NOT match on the words test/tests/gate/verify/verified/PASS/prove/correctness when they refer to external checkers, submission modes, or acceptance gates rather than a code-level test suite." | |||
There was a problem hiding this comment.
This description exceeds the hard 60-character skill limit (AGENTS.md:882-900). More importantly, the system-prompt index truncates descriptions after 57 characters (agent/skill_utils.py:771-779), so the negative routing boundary later in this sentence will not be visible there. Please reduce this to one router-focused sentence within 60 characters.
Rewrite the 13 bundled skill descriptions to fit the hard 60-character project standard (AGENTS.md). Keep the strongest trigger in the first ~57 characters so the Level-0 index sees the router predicate, not the negative boundary. Remove the obsolete Kanban-orchestrator and Kanban-worker edits; those files no longer exist on main and their guidance lives in injected KANBAN_GUIDANCE. Also tighten TDD's When to Use block so it explicitly lists the external-checker false-positive class that caused the original misfire.
d122881 to
b8ae879
Compare
|
Rebased onto current main and addressed the review feedback in
|
… budget Every SKILL.md description over 60 chars was silently truncated to 57 chars + '...' in the system-prompt skill index (extract_skill_description, agent/skill_utils.py), destroying the routing signal for 69 of 179 skills — some descriptions ran to 1,005 chars. Rewrites follow the authoring standard: <=60 chars, one sentence, ends with a period, trigger front-loaded, no marketing words, no skill-name repetition. Excess detail already lives in each skill's body. Includes the touchdesigner-mcp trim from PR #32361 (credit: @JeliTron) and aligns with the router-precision direction of PR #48780 (@John-Lussier). Docs catalogs + per-skill pages regenerated via website/scripts/generate-skill-docs.py. Co-authored-by: JeliTron <287797501+JeliTron@users.noreply.github.com>
… budget Every SKILL.md description over 60 chars was silently truncated to 57 chars + '...' in the system-prompt skill index (extract_skill_description, agent/skill_utils.py), destroying the routing signal for 69 of 179 skills — some descriptions ran to 1,005 chars. Rewrites follow the authoring standard: <=60 chars, one sentence, ends with a period, trigger front-loaded, no marketing words, no skill-name repetition. Excess detail already lives in each skill's body. Includes the touchdesigner-mcp trim from PR NousResearch#32361 (credit: @JeliTron) and aligns with the router-precision direction of PR NousResearch#48780 (@John-Lussier). Docs catalogs + per-skill pages regenerated via website/scripts/generate-skill-docs.py. Co-authored-by: JeliTron <287797501+JeliTron@users.noreply.github.com>
Make bundled skill
descriptions router-precise (stop false‑positive skill loading)TL;DR
A skill's
descriptionis the only signal the router sees at Level 0 (skills_list()returns{name, description, category}). Today many bundled descriptions are written as human taglines ("TDD: tests before code", "Delegate coding to OpenAI Codex CLI") optimized for a catalog listing — not as routing predicates. The result is false‑positive loading: the model pulls a skill because the words matched, not because the task did.This PR rewrites 15 bundled descriptions (and one
When to Useblock) to behave as routing logic: state the precise trigger, then exclude the look‑alikes. No behavior, code, or skill body logic changes beyond TDD's "When to Use" wording.The bug, concretely
A kernel/optimization goal prompt — dense with the words
test,gate,verify,PASS,prove,correctness(those are an external benchmark harness and acceptance gates, with zero unit‑testing intent) — caused thetest-driven-developmentskill to load. The prompt contained no literal TDD trigger ("red‑green", "tests before code" — zero occurrences). The skill loaded purely on keyword density against a greedy description plus aWhen to Use: **Always**block.That is not a one‑off. It is the predictable behavior of a description that advertises itself as universally applicable.
Root cause: descriptions are routing predicates, not marketing copy
The progressive‑disclosure design is good — but it puts 100% of the routing burden on one sentence. A description therefore has two jobs, and most only do the first:
Job 2 is the one that prevents misfires, and it is exactly what catalog‑style taglines omit.
Three anti‑patterns this PR fixes
1. Greedy / "Always" triggers. Descriptions that claim broad applicability ("tests before code", "validate an idea", "find bugs") match generic task vocabulary (
test / gate / verify / prove / experiment / validate / optimize / debug / build) that appears in countless unrelated prompts.2. Bare‑proper‑noun collisions. "Delegate coding to Codex CLI" fires whenever the token "Codex" appears — including when Codex is named as a collaborator or workspace owner, not as a tool you want to invoke. Same for Claude, OpenCode, "Hermes Agent" (the runtime), MCP, etc. Any multi‑agent workspace mentions these names constantly.
3. Umbrella/index magnets. (Mostly in user‑space skills, but called out here for the authoring guide.) Descriptions that enumerate many tools out‑compete the specific sibling skill that should actually win.
The fix pattern, applied uniformly:
<precise trigger> + "Not for … / Do NOT load when …" <named look‑alikes>.The 15 changes, documented
Pattern 1 — greedy / generic‑vocabulary triggers
test-driven-development— the skill that triggered the investigation."TDD: enforce RED-GREEN-REFACTOR, tests before code."+When to Use → **Always**: New features, Bug fixes, Refactoring, Behavior changesWhen to Useblock drops the unconditional Always and adds a "Do NOT load for …" section (research/optimization loops; prompts where 'test'/'gate' mean an external checker).spike"Throwaway experiments to validate an idea before build.""Time-boxed throwaway CODE spike to answer one specific technical feasibility question before building a feature. Not for research/optimization loops, benchmark or kernel tuning, or any context where experiment/validate/prove refers to offline gates or external checkers rather than throwaway exploratory code."systematic-debugging"4-phase root cause debugging: understand bugs before fixing."requesting-code-review"Pre-commit review: security scan, quality gates, auto-fix.""Review a concrete code diff you are about to commit … Load only to review changed source files, not when gate/verify/quality refer to CI, benchmark, or acceptance gates or a research loop's offline checker."simplify-code"Parallel 3-agent cleanup of recent code changes.""Load only when the user explicitly asks to simplify or clean up their own recent code diff (says simplify, /simplify, clean up my changes) … Not for general code review, bug hunting, or any prompt that merely mentions agents or code."research-paper-writing"Write ML papers for NeurIPS/ICML/ICLR: design→submit.""End-to-end authoring of a formal academic ML paper for a venue (NeurIPS/ICML/ICLR/ACL): experiment design, LaTeX, figures, citations, submission. Not for internal research notes, deep-read write-ups, digests, or leaderboard/benchmark submissions."dogfood"Exploratory QA of web apps: find bugs, evidence, reports.""Use to manually exercise a running web app in a real browser to hunt UI/UX and functional bugs, capturing console errors and screenshots into a QA report. Not for unit/integration test writing or code review."Pattern 2 — bare‑proper‑noun collisions
codex,claude-code,opencode(the coding‑agent delegators)"Delegate coding to <X> CLI (features, PRs).""Use when you want to actively hand a coding task to the <X> CLI tool … Do NOT load merely because <X> is mentioned as a collaborator, agent, or workspace owner."hermes-agent"Configure, extend, or contribute to Hermes Agent.""Load when working on the Hermes Agent framework itself: editing its config (hermes.toml, profiles, providers), extending its source, or contributing code to the repo. Not when Hermes Agent is merely mentioned as the runtime executing some other task."Pattern 3 — under‑specified, sibling‑overlapping, or malformed
claude-designDesign one-off HTML artifacts (landing, deck, prototype).(also: unquoted scalar)"Hand-code a from-scratch single-file HTML/CSS design artifact … when no brand or token system is dictated. Not for known-brand looks (use popular-web-designs) or design-token spec files (use design-md)."popular-web-designs/design-md.obsidianRead, search, create, and edit notes in the Obsidian vault.(unquoted)"Obsidian vault file operations … Not for generic note-taking or to-do apps that do not name Obsidian."kanban-orchestrator,kanban-worker"double‑quotes inside an unquoted YAML scalar (a latent parser hazard) and led with generic "orchestrator / routing work / decomposition" / "pitfalls, examples, edge cases".Not for generic task planning / multi-agent design / general troubleshooting.What this PR deliberately does NOT do
When to Useblock, which reinforced the misfire.descriptionfield and current router.apple-reminders,himalaya,arxiv,openhue). Tightening good descriptions would only add noise.Opinionated recommendations beyond this PR
descriptionis a routing predicate. Require (a) a concrete trigger and (b) at least one negative boundary for any skill whose domain words overlap generic task vocabulary or a proper noun. I'd add a short "writing router‑safe descriptions" section with the three anti‑patterns above.do_not_load_when/not_forfield surfaced at Level 0 alongsidedescription. Negative scoping is doing the heavy lifting here; making it a structured field (instead of a sentence convention) would make it consistent and lintable.Always/any, bare‑proper‑noun‑only descriptions, embedded"in unquoted scalars, and descriptions with no negative boundary in collision‑prone categories.Validation
".SKILL.mdfiles reports no malformed frontmatter and no broken description scalars after the change.🤖 Generated with Claude Code