Skip to content

feat: keep the Skill tool resident on the first Agent turn and open the slash menu from 、 - #248

Merged
vastsa merged 3 commits into
vastsa:mainfrom
Tioit-Wang:feat/skills-slash-and-residency
Sep 11, 2026
Merged

feat: keep the Skill tool resident on the first Agent turn and open the slash menu from 、#248
vastsa merged 3 commits into
vastsa:mainfrom
Tioit-Wang:feat/skills-slash-and-residency

Conversation

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

What

Two focused changes on the skill / slash-command path, plus their specs and E2E scenarios.

1. Skill ships with the Agent core tool set — Closes #204

Skill was registered into the deferred catalog, so the first provider request of an Agent turn carried no Skill schema. Two decisions assume the model can call it straight away:

  • the # Skills system-prompt section tells the model to load a matching skill before answering (D174);
  • a typed /skill-id is answered with a persisted instruction to call Skill { id } (D393 / ADR 0219).

A tool that is absent from the schema cannot be called at all, so both paths paid a ToolSearch round trip before any skill body could load. SKILL_TOOL_NAME now joins AGENT_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 ToolSearch keeps 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 on main by 8e838549 and PR #231, so this PR does not redo them and keeps the restore path from #231 covered. It takes only what is still missing: Skill being callable on the first turn — which is what makes ADR 0219's /skill-id flow actually work — and the IME alias.

Validation

Check Result
pnpm -r --if-present typecheck clean
vitest run — agent-runtime 356 passed
vitest run — shared 498 passed
vitest run — plugin-sdk / i18n / plugin-devkit / agent-host 224 / 23 / 46 / 34 passed
node --test test/*.test.mjs — apps/desktop 1389 passed, 7 failed
node --test test/composer-ime.test.mjs 4 passed
pnpm -r --if-present lint all packages clean except apps/desktop
pnpm docs:check all five touched pairs pass (see below)

Failures that are not from this branch, each reproduced on an unmodified 005c668e tree:

  • 7 desktop tests: 4 macOS packaging / notarization, 1 plugin write ledger, 2 sidebar drag and ordering. None of them touch the composer, the runtime tool set, or these specs.
  • apps/desktop lint: apps/desktop/src/styles/sidebar-threads.css:100 uses a raw border-radius: 1px; the file is untouched here.
  • pnpm docs:check: docs/scripts/check-locales.mjs builds its expected route from path.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 in 04-ux/07-ui-design-system.md and 04-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

  • ADR 0230 (Skill residency; amends D174 / ADR 0048 / ADR 0219) and ADR 0231 (IME alias; amends D123 / D139 / ADR 0024), with their index rows.
  • Decisions D404 / D405 in 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 their zh-CN mirrors.
  • E2E-254 / E2E-255 plus traceability rows.

中文摘要

Tioit-Wang and others added 3 commits September 12, 2026 01:37
`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>
@vastsa
vastsa merged commit da1fa62 into vastsa:main Sep 11, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants