Skip to content

feat(platform): tell agents what each equipped skill is for - #3775

Merged
yannickmonney merged 8 commits into
mainfrom
feat/agent-skill-descriptions
Sep 29, 2026
Merged

yannickmonney merged 8 commits into
mainfrom
feat/agent-skill-descriptions

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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.md bytes 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 sanitizeUntrustedField helper: 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-invocation asks 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-F15 requires 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 check passes: all 55 root check tasks passed on 435899311. The head has since merged current main and 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:sast passes (467 rules, 0 findings) on the current head.
  • Translations: N/A. No UI message changed; the change is prompt text and docs.
  • Docs updated in docs/{en,de,fr}/platform/agents/skills.md and docs/{en,de,fr}/platform/workspace/skills.md.
  • README: N/A. The README does not describe how skills are presented to agents.

Test plan

  • Regression tests for the shared clamp (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.
  • 652 tests in 42 files covering every caller of the sanitizer 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.)
  • Eight staging cases exercise the real parser, file reader, visibility gate and signed HTTP client with controlled organization lookup and sandbox transport: ordered files, cross-org isolation, team overlap, inaccessible/malformed/missing skills, stage refusal, and empty equipment.
  • bun run --filter @tale/platform typecheck and type-aware oxlint on the changed sources pass. services/docs tests pass (35 files, 171 tests). bun run lint:manual passes.
  • Merge with current main: the manual readme counts were recounted from the suite files instead of taken from either side. The total is 925, with tasks 84 (from main) and data-residency 26 / knowledge 54 / skills 21 (from this PR). No duplicate box IDs, and git merge-tree against origin/main is clean.
  • Earlier on 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-F15 judges whether a model actually selects and follows the skill.

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.
…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.
@yannickmonney
yannickmonney merged commit 3406481 into main Sep 29, 2026
57 checks passed
@yannickmonney
yannickmonney deleted the feat/agent-skill-descriptions branch September 29, 2026 01:23
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