Repository navigation
feat(platform): tell agents what each equipped skill is for - #3775
Merged
Merged
Conversation
A project agent on a task and an automation's agent step were handed only the paths of their equipped skills' SKILL.md files. With nothing but a slug to go on, an agent could not tell which skill fits a plain-language task, so skills were used only when the task named them, while the skill library docs promise that the description tells the model when a skill applies. Each equipped skill is now listed with its own description beside the path, read from the SKILL.md the staging step already loads. The description is flattened to one line and capped at 300 characters, so a member-authored description cannot add list items or restructure the instructions; a SKILL.md that does not parse lists the skill without one. A skill marked disable-model-invocation is listed for explicit requests only.
…ll-descriptions-3775
…riptions # Conflicts: # services/platform/tests/manual/readme.md
sanitizeUntrustedField sliced UTF-16 code units, so a clamp could split a surrogate pair or an emoji made of several code points, and it returned one character past the limit. The equipped-skill line worked around that with a second clamp of its own. The shared helper now counts grapheme clusters and bounds the result, ellipsis included, so every caller gets a whole-character cut and the skill line reuses it instead of re-clamping.
The French agent page mixed two constructions in one clause and the English workspace page asked readers to "put when the skill applies first", which reads awkwardly. Both now say plainly that the excerpt is a choice aid and should open with when the skill applies.
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.
Summary
Equipped skills previously reached task agents and automation agent steps as file paths alone. Their lists now include the skill author's description from the same
SKILL.mdbytes staged for the run, so an agent has a selection cue before opening the full procedure. This answers customer feedback that agents only used a skill when the task named it.Descriptions go through the shared
sanitizeUntrustedFieldhelper: flattened, stripped of control and directional marks, and limited to 300 characters (grapheme clusters, ellipsis included), so a cut never leaves half an emoji, flag or skin-tone sequence. The shared helper itself now clamps by grapheme instead of by UTF-16 unit and never returns more than its limit; that also fixes surrogate-splitting for its other callers (assistant-tool titles, video-link metadata), whose results can now be one character shorter than before. Descriptions are delimited as selection metadata, with matching tag delimiters escaped and explicit instructions to preserve the task, other instructions, and tool permissions. The full skill body remains an authored procedure to read.disable-model-invocationasks the agent to wait for the skill to be named explicitly; it is guidance, not an access control.The existing organization/project/team visibility checks and bundle staging remain in force. Real missing or malformed bundles fail before staging. EN/DE/FR docs explain the bounded excerpt and explicit-naming fallback. Manual check
SKILL-F15requires a file read and a result marker found only in the skill body, rather than accepting ordinary invoice checks as proof of invocation.Known limit, unchanged by this PR: the sanitizer strips U+200C/U+200D (ZWNJ/ZWJ) as invisible marks, so ZWJ emoji sequences fall apart into their parts and ZWNJ-dependent scripts lose the joiner control. That is a deliberate trade-off of the shared helper and is out of scope here.
Checklist
bun run checkpasses: all 55 root check tasks passed on435899311. The head has since merged currentmainand changed the shared sanitizer and two docs sentences; for those, targeted tests, platform typecheck, type-aware lint, docs tests and the manual guard were re-run locally (below). Exact-head CI remains required before merge.bun run lint:sastpasses (467 rules, 0 findings) on the current head.docs/{en,de,fr}/platform/agents/skills.mdanddocs/{en,de,fr}/platform/workspace/skills.md.Test plan
lib/chat/untrusted-content.test.ts: limit including the ellipsis, skin-tone emoji, flag, emoji, and a short string of multi-code-point characters) and for the skill line (agent_host.skill_lines.test.ts: a flag at the 300-character cap) failed against the previous code (4 failures) and pass now. 21 description/untrusted-field cases pass.backend/core/automations/agent_host*,backend/core/chat/assistant_tools.test.ts,backend/core/video_links,backend/core/tasks/agent_run_host*,lib/chat. (647 passed, 5 skipped by the suite.)bun run --filter @tale/platform typecheckand type-aware oxlint on the changed sources pass.services/docstests pass (35 files, 171 tests).bun run lint:manualpasses.main: the manual readme counts were recounted from the suite files instead of taken from either side. The total is 925, with tasks 84 (frommain) and data-residency 26 / knowledge 54 / skills 21 (from this PR). No duplicate box IDs, andgit merge-treeagainstorigin/mainis clean.435899311, twelve native Chromium docs checks covered both changed pages in EN/DE/FR at 390px and 1280px, with correct localized links and no overflow or page errors. The two docs sentences reworded since then were not re-rendered in a browser; only the docs tests covered them.Not verified: no live-model selection or compliance claim. The automated checks prove which files and selection guidance reach the harness. The manual case
SKILL-F15judges whether a model actually selects and follows the skill.