Skip to content

feat(skills): quality gate prompt + wire up dead bump_use counter#17598

Closed
ZenoWangzy wants to merge 3 commits into
NousResearch:mainfrom
ZenoWangzy:feat/skills-quality-gate-usage-tracking
Closed

feat(skills): quality gate prompt + wire up dead bump_use counter#17598
ZenoWangzy wants to merge 3 commits into
NousResearch:mainfrom
ZenoWangzy:feat/skills-quality-gate-usage-tracking

Conversation

@ZenoWangzy

Copy link
Copy Markdown

Summary

  • Wire up dead bump_use countertools/skill_usage.py:277 defines bump_use but it had zero production call sites. Added agent/outcome_tracker.py that scans session messages for skill_view tool calls (OpenAI-format) and calls bump_use for each unique skill at session end. Hooked into AIAgent.shutdown_memory_provider (called at CLI exit, gateway session expiry, /reset). The Curator now gets real use_count / last_used_at data for lifecycle decisions.

  • Configurable skill review quality gate — The background skill review prompt (_SKILL_REVIEW_PROMPT) previously had no filter criteria. Added skills.extra_review_prompt config key (read from ~/.hermes/config.yaml) that appends a user-defined quality gate to the review prompt whenever review_skills=True. Default is empty (no change in behavior). When set, the reviewer must pass all three checks before writing a skill.

Files changed

File Change
agent/outcome_tracker.py New — record_session_outcome() + _extract_skill_views()
run_agent.py +8 lines across 3 stable regions (init, _spawn_background_review, shutdown_memory_provider)
tests/agent/test_outcome_tracker.py New — 13 tests
tests/agent/test_skill_review_extra.py New — 5 tests

Test plan

  • python -m pytest tests/agent/test_outcome_tracker.py -v → 13 passed
  • python -m pytest tests/agent/test_skill_review_extra.py -v → 5 passed
  • python -m pytest tests/gateway/test_unknown_command.py -q → 6 passed
  • End-to-end: use a skill in a session, exit, check ~/.hermes/skills/.usage.jsonuse_count increments and last_used_at is set
  • Set skills.extra_review_prompt in ~/.hermes/config.yaml, trigger a skill review, verify the quality gate criteria appear in the review prompt

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder tool/skills Skills system (list, view, manage) labels Apr 29, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks @ZenoWangzy — closing this one. The bump_use wiring concern is now covered by #17932 (merged), which calls bump_use() directly from the three canonical activation paths (slash command, --skill preload, skill_view tool call) rather than the session-end scan approach here. The direct approach has simpler failure modes and immediate signal.

The skills.extra_review_prompt piece is unrelated scope and doesn't have a concrete driver right now — if you have a specific quality gate you want the background reviewer to enforce, happy to look at a focused PR for just that piece with a motivating use case in the description.

@teknium1 teknium1 closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants