Skip to content

feat(skills): surface system-prompt description truncation to skill authors (salvage #24294) - #70519

Merged
teknium1 merged 4 commits into
mainfrom
salvage/24294-truncation-visibility
Jul 24, 2026
Merged

feat(skills): surface system-prompt description truncation to skill authors (salvage #24294)#70519
teknium1 merged 4 commits into
mainfrom
salvage/24294-truncation-visibility

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Skill authors now see exactly what the system-prompt skill index will display when their description exceeds the 60-char budget — instead of silently losing routing signal to truncation.

Salvages PR #24294 by @AlanBurningsuit (May 12) onto current main. This is the maintainer-approved direction from #13944: keep the 60-char prompt-index cap (raising it was rejected for prompt bloat), make the constraint visible at authoring time.

Changes

  • agent/skill_utils.py: extract hardcoded 60 as SKILL_PROMPT_DESC_LIMIT + shared _normalize_skill_description() helper + is_skill_description_truncated_for_prompt() predicate
  • tools/skill_manager_tool.py: skill_manage create/edit responses include system_prompt_preview showing the truncated form when the description is over budget
  • agent/curator.py, agent/skill_commands.py: use the shared constant/helper
  • skills/software-development/hermes-agent-skill-authoring/SKILL.md: document the truncation
  • tests/tools/test_skill_manager_tool.py: preview + boundary coverage
  • contributors/emails/: mapping for @AlanBurningsuit

Validation

Result
scripts/run_tests.sh tests/tools/test_skill_manager_tool.py tests/agent/test_skill_utils.py 149/149 passed
E2E (temp HERMES_HOME, real skill_manage calls) over-budget create → preview returned; short edit → no preview; truncation behavior unchanged
Conflicts resolved 2 (both in favor of current main + PR intent)

Credit: @AlanBurningsuit, commit authorship preserved via cherry-pick + rebase merge. Independent +1 from @technicalpickles on the original PR.

Infographic

truncation-visibility

Alan Harman-Box and others added 4 commits July 23, 2026 20:23
…ription helpers

The system prompt skill index truncates long descriptions to 57 chars,
but this limit was a hardcoded magic number. Extract it as a named
constant and factor the normalization logic into a shared private
helper so the extraction function and the new truncation predicate
cannot drift.

No behaviour change — pure refactor.
…t limit

When a skill is created or edited with a description longer than
SKILL_PROMPT_DESC_LIMIT (60 chars), the tool response now includes a
system_prompt_preview field showing exactly what the system prompt
skill index will display. This gives the agent immediate feedback to
self-correct truncated trigger phrases.

Also adds tool schema guidance about the 57-char window and fixes a
stale docstring in skill_commands.py that incorrectly claimed the
system prompt renders the full description.
…d curator

The skill-authoring guide and curator prompt both reference
descriptions as the primary discovery mechanism but never mentioned
the 57-char system prompt truncation. Add explicit guidance:

- Authoring guide: frontmatter docs, template comment, size limits,
  pitfall #3 with good/bad examples, verification checklist
- Curator prompt: parenthetical noting the 57-char window when
  writing umbrella skill descriptions
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 826a48e

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence upload failed.

Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant