feat(tool-skills): token-budget skills catalog — every skill visible, priority tiers, tightened descriptions - #63
Merged
Conversation
…token budget Replace the alphabetical max_skills_visible cap (which silently dropped every skill sorting past position 50) with deterministic tier assembly under a configurable visibility_token_budget (default 5000, estimate = len//4): 1. Reserve a name-only index line for EVERY regular skill (full coverage). 2. Upgrade index -> one-line summary in rank order, while budget allows. 3. Upgrade summary -> full description in rank order, while budget allows. Rank = (-priority, name). priority/summary come from an optional skill 'visibility:' frontmatter mapping, read by the hook (cached per path) so no metadata field is added to discovery. Summary falls back to the description's first sentence, truncated to 140 chars. Back-compat: max_skills_visible without a budget keeps the legacy count cap; budget wins when both are set. behaviors/skills*.yaml switch to visibility_token_budget: 5000. User-invoked section unchanged. Also: monitor SKILL.md points at the ten-lane-highway skill.
…en suite Neither test exercises the visibility budget; both fail on base 11f97bc and were asserting against contracts that already changed: - test_fork_skill_model_resolver_called_with_metadata_fields registered its resolver mock under the old 'routing_matrix' capability with a sync resolve(). Production _execute_fork looks up 'model_role_resolver' and awaits resolve(). Align the mock: register under 'model_role_resolver', make resolve() async. - test_skills_visible_in_session matched the CLI's unknown-option error as 'No such option: --dry-run'; current CLI phrases it "No such option '--dry-run'.". Match the stable 'No such option' prefix instead. Full suite from modules/tool-skills now: 304 passed.
…rage, priority tiers, legacy back-compat
…talog The skills index now renders in tiers (name -> one-line summary -> full description) under a token budget, so every wasted word in a `description:` costs another skill its detail. This is an editorial pass over all 38 skills/*/SKILL.md descriptions. - First sentence of every description now stands alone as a <=140-char one-liner, which is exactly what the catalog's summary tier renders (hooks._first_sentence truncates at 140). - Load-bearing routing preserved verbatim or moved earlier: "Use when" triggers, quoted trigger strings, slash-command names, MUST/ALWAYS language, and cross-skill pointers (/council, /design-council, personafy, crusty-old-engineer, ten-lane-highway, /verify). - Cut repetition, process narration, and over-long persona flavor. The eleven persona lenses keep one load-bearing question, one voice clause, and their triggers; each drops ~40-55%. - Literal block scalars (`|`) folded to `>-` so descriptions render as a single line in the catalog instead of ragged multi-line list items. - visibility.priority: 5 added to councilify and tester-breaker, plus a curated visibility.summary for councilify (its first sentence is a long compound clause that would truncate badly). - code-review, mass-change, and session-debug left untouched: already clean, standalone one-liners with no flab. Total: 17,479 -> 13,389 chars (-4,090, -23%; ~4,369 -> ~3,347 est. tokens). No name/version/shortcut/user-invocable/disable-model-invocation/license or below-frontmatter content changed; verified per-file against HEAD.
…e, curated summary suffices
Collaborator
Author
|
Paired with: microsoft/amplifier-app-cli#289 (ten-lane-highway v2) |
This was referenced Aug 30, 2026
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.
What
Replaces the visibility hook's
sorted(...)[:max_skills_visible]alphabetical cap (which silently hid every skill past ~50 — 't' names like ten-lane-highway were never advertised) with a token-budget tier renderer: every regular skill always appears (name-index → one-line summary → full description), upgraded in (-priority, name) rank order withinvisibility_token_budget(default 5000); optional per-skillvisibility: {priority, summary}frontmatter; legacy count mode preserved when onlymax_skills_visibleis set; behaviors/skills.yaml + skills-tool.yaml switched to the budget key.Additional improvements:
tester-breakergets priority 5Coverage & Validation
context-intelligence-graph-query,context-tester,councilify,digital-twin-universe,tester-breaker,workflow-pattern-analysisPaired With
Related to: amplifier-app-cli PR (cross-link after both exist)