Skip to content

fix(learn): teach /learn the full CONTRIBUTING.md skill standards - #52372

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5f8c20c4
Jun 25, 2026
Merged

fix(learn): teach /learn the full CONTRIBUTING.md skill standards#52372
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5f8c20c4

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

/learn now teaches the full set of CONTRIBUTING.md skill-authoring rules — and makes the model actually enforce the ≤60-char description instead of just stating it.

Root cause (#52367): the /learn prompt taught a subset of the HARDLINE standards and mentioned "description ≤60" without any enforcement, so the model wrote full sentences (up to 202 chars across 4 reported runs). The 60-char system-prompt skill index then silently truncates those, dropping the routing signal past char 60.

Changes

  • agent/learn_prompt.py — broadened _AUTHORING_STANDARDS:
    • description: added the index-truncation rationale, a count-and-trim self-check ("after you write it, COUNT the chars; if over 60, cut it before saving"), and a good/bad length example. This is the lever for the reported overshoot.
    • platforms gating — declare platforms: for OS-bound primitives (osascript/apt → OS; /proc, os.setsid, SIGKILL → linux; fcntl/termios → POSIX), prefer cross-platform first.
    • author credits the human first, "Hermes Agent" second.
    • rounded out the Hermes-tool framing with the full wrapped-tool mapping (read_file/search_files/patch/write_file/web_extract…) and references//templates/ layout.
  • tests/agent/test_learn_prompt.py — new contract test locking in coverage of the full standard set (description self-check, platforms, author, tool framing, scripts layout).

Validation

Before After
Rules taught description (no enforcement), section order, partial tool framing + count-and-trim self-check, good/bad example, index rationale, platforms gating, author-first, full tool mapping
Tests 11 12 — tests/agent/test_learn_prompt.py all pass

Prompt-only fix, in keeping with the /learn design (no engine, no model-tool footprint — the agent authors via skill_manage).

Closes #52367.

Infographic

learn-skill-standards-enforced

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes #52367.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-5f8c20c4 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11268 on HEAD, 11268 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5942 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) P3 Low — cosmetic, nice to have labels Jun 25, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Prompt-only fix that broadens the /learn authoring standards to cover the full CONTRIBUTING.md ruleset. Well-structured and thoroughly tested.

Looks Good

  • Description enforcement: The count-and-trim self-check and good/bad examples directly address the reported overshoot (descriptions up to 202 chars)
  • Platform gating: New guidance on declaring platforms: for OS-bound primitives with clear examples (osascript/apt, /proc, fcntl/termios)
  • Author credits: Clarifies human-first attribution
  • Tool framing: Expanded the wrapped-tool mapping to cover all Hermes tools, not just the basics
  • Test coverage: New test_teaches_the_full_hardline_standards locks in coverage of all key rules
  • Prompt-only change with no engine or model-tool footprint — aligns with the /learn design

Reviewed by Hermes Agent

@teknium1
teknium1 merged commit e62afac into main Jun 25, 2026
27 checks passed
@teknium1
teknium1 deleted the hermes/hermes-5f8c20c4 branch June 25, 2026 07:17
ivanvanes18 pushed a commit to ivanvanes18/hermes-agent that referenced this pull request Jun 27, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
pai-scaffolde pushed a commit to pai-scaffolde/hermes-agent that referenced this pull request Jun 28, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…usResearch#52372)

The /learn authoring prompt taught a subset of the HARDLINE skill rules,
and stated the <=60-char description rule without making the model enforce
it — so generated descriptions overshot (up to 202 chars), which the
60-char system-prompt skill index then silently truncates.

- description: add the index-truncation rationale, a count-and-trim
  self-check, and a good/bad length example so the model actually hits <=60.
- add platforms-gating rule (OS-bound primitives -> declare platforms:).
- add author-credits-human-first rule.
- round out the Hermes-tool framing with the full wrapped-tool mapping and
  references/templates layout.

Closes NousResearch#52367.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: /learn writes skill descriptions that exceed its own documented ≤60-char standard

3 participants