feat: keep the Skill tool resident on the first Agent turn and open the slash menu from 、 - #248
Merged
Merged
Conversation
`Skill` was registered into the deferred catalog, so the first provider
request of an Agent turn had no `Skill` in its tool list. Two decisions ask
the model to call it immediately: the `# Skills` section tells it to load a
matching skill before answering, and the composer answers a typed
`/skill-id` with an instruction to call `Skill { id }` (D393, ADR 0219).
Neither works when the tool is missing from the schema.
Add `SKILL_TOOL_NAME` to `AGENT_CORE_TOOL_NAMES` so the schema ships with the
first request, and drop the now unreachable catalog description. The
registration gate is unchanged: the tool exists only while the skill catalog
is non-empty, Plan and Goal still omit it, and every other on-demand
capability plus `ToolSearch` keep their lazy behavior.
Closes vastsa#204.
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
The composer only opens the command menu on a leading ASCII `/`. A Chinese IME produces `、` (U+3001) for that keystroke, so reaching `/new`, `/compact`, a mode alias, or a Skill meant switching input methods mid-sentence and switching back. Rewrite a `、` committed as the first character of an empty draft to `/` before trigger detection runs, and leave the rest of the grammar alone: a mark anywhere later in the draft stays ordinary punctuation, the `@` file menu never reacts to it, and detection, insertion, filtering, and sending are the existing slash paths. Closes vastsa#65. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Register D404 / ADR 0230 and D405 / ADR 0231 in the ADR index and the decisions log, and add the two E2E scenarios with their traceability rows: E2E-254 covers `Skill` shipping with the first Agent request, the on-demand catalog, Plan mode, and an empty catalog, and E2E-255 covers the ideographic comma alias. Both locales are updated together so the spec pairs keep their structure. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
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
Two focused changes on the skill / slash-command path, plus their specs and E2E scenarios.
1.
Skillships with the Agent core tool set — Closes #204Skillwas registered into the deferred catalog, so the first provider request of an Agent turn carried noSkillschema. Two decisions assume the model can call it straight away:# Skillssystem-prompt section tells the model to load a matching skill before answering (D174);/skill-idis answered with a persisted instruction to callSkill { id }(D393 / ADR 0219).A tool that is absent from the schema cannot be called at all, so both paths paid a
ToolSearchround trip before any skill body could load.SKILL_TOOL_NAMEnow joinsAGENT_CORE_TOOL_NAMES, and the catalog description that became unreachable with it is removed.The registration gate is unchanged: the tool exists only while the skill catalog is non-empty, Plan and Goal still omit it entirely, and every other on-demand capability plus
ToolSearchkeeps its lazy behavior.2. An ideographic comma opens the slash menu — Closes #65
The composer only opens the command menu on a leading ASCII
/. A Chinese IME produces、(U+3001) for that keystroke, so reaching/new,/compact, a mode alias, or a Skill meant switching input methods mid-sentence and switching back.A
、committed as the first character of an empty draft is now rewritten to/before trigger detection runs, so the ordinary menu opens with the same filtering, insertion, and send behavior. Only that position is rewritten: a mark anywhere later in the draft stays ordinary punctuation, and the@file menu is unaffected.Scope
#142 and #236 (skills missing from the
/menu) and #225 (deferred activations) are already fixed onmainby8e838549and PR #231, so this PR does not redo them and keeps the restore path from #231 covered. It takes only what is still missing:Skillbeing callable on the first turn — which is what makes ADR 0219's/skill-idflow actually work — and the IME alias.Validation
pnpm -r --if-present typecheckvitest run— agent-runtimevitest run— sharedvitest run— plugin-sdk / i18n / plugin-devkit / agent-hostnode --test test/*.test.mjs— apps/desktopnode --test test/composer-ime.test.mjspnpm -r --if-present lintpnpm docs:checkFailures that are not from this branch, each reproduced on an unmodified
005c668etree:apps/desktoplint:apps/desktop/src/styles/sidebar-threads.css:100uses a rawborder-radius: 1px; the file is untouched here.pnpm docs:check:docs/scripts/check-locales.mjsbuilds its expected route frompath.relative, so on Windows the notice check compares a backslash path against a forward-slash link and reports every pair as invalid. With the separator normalized, 75 of 77 pairs pass and the 2 remaining failures are pre-existing table drift in04-ux/07-ui-design-system.mdand04-ux/08-component-spec.md. All five pairs this PR touches pass tables, fences, and notices.E2E scenarios were added to the plan (E2E-254, E2E-255) and not run locally, per the repository rules.
Specs and decisions
08-meta/decisions-log.md.03-runtime/02-agent-runtime.md§7.1,03-runtime/03-tools-and-permissions.md§2.1,04-ux/04-builtin-commands.md§9, all with theirzh-CNmirrors.中文摘要
Skill原先属于「按需工具」,第一个 provider 请求的 schema 里没有它,而 D174 的# Skills段落与 ADR 0219 的/skill-id都要求模型立刻调用它。现在Skill常驻 Agent 核心工具集;注册门槛不变(目录非空才注册、Plan/Goal 仍不提供、其它按需工具与ToolSearch保持原状)。/,直接打开普通斜杠菜单;草稿其他位置的「、」仍是普通标点,@文件菜单不受影响。main修复(8e838549、PR fix(agent-runtime): restore on-demand tool activations still in context #231),本 PR 不重复处理。