feat(skills): port Hermes /learn — author skills from sources#5
Open
TheSmokeDev wants to merge 1 commit into
Open
feat(skills): port Hermes /learn — author skills from sources#5TheSmokeDev wants to merge 1 commit into
TheSmokeDev wants to merge 1 commit into
Conversation
Add a user-initiated, source-driven skill authoring command, porting Hermes Agent's /learn. Point it at a URL, a local dir/file, the current conversation, or pasted notes; it gathers the material, distills a standards-compliant SKILL.md, and stages an inert draft under skills/generated/ that graduates through the existing /skills gate. Model-agnostic by construction: the only LLM call is reasoning_step (routed through the runtime lane system, whatever /model selected); source gathering uses framework primitives (httpx+trafilatura, stdlib file reads, the session transcript) — never a model-native tool surface. Reuses every existing rail — write_skill, skill_guard.scan_skill, the usage sidecar, and the operator-gated promotion flow — adding no new storage, security, or promotion path. A /learn draft seeds the reuse counter to the eligibility threshold so explicit operator intent stands in for auto-capture recurrence evidence and the draft surfaces in /skills review. - cognition/skill_learn.py: parse/gather/distill/orchestrate core - cognition/skills.py: optional SkillSpec.body rendered by write_skill (back-compatible; empty body keeps the auto-capture stub) - core_handlers.py + commands.py: wire /learn (router, operator) - tests/test_skill_learn.py: 14 tests, reasoning_step mocked Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PuH3Z3zEyjkMCpywRuaqgj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a user-initiated, source-driven skill authoring command, porting
Hermes Agent's /learn. Point it at a URL, a local dir/file, the current
conversation, or pasted notes; it gathers the material, distills a
standards-compliant SKILL.md, and stages an inert draft under
skills/generated/ that graduates through the existing /skills gate.
Model-agnostic by construction: the only LLM call is reasoning_step
(routed through the runtime lane system, whatever /model selected);
source gathering uses framework primitives (httpx+trafilatura, stdlib
file reads, the session transcript) — never a model-native tool surface.
Reuses every existing rail — write_skill, skill_guard.scan_skill, the
usage sidecar, and the operator-gated promotion flow — adding no new
storage, security, or promotion path. A /learn draft seeds the reuse
counter to the eligibility threshold so explicit operator intent stands
in for auto-capture recurrence evidence and the draft surfaces in
/skills review.
(back-compatible; empty body keeps the auto-capture stub)
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PuH3Z3zEyjkMCpywRuaqgj