| name | implementation-commands-input |
| description | Implement user-invoked command discovery and execution together with prompt normalization, slash parsing, skill argument expansion, attachments, pasted content, hooks, and queued input priorities. Use when porting slash commands, input submission, command palettes, plugin or skill commands, remote-safe routing, or mid-turn user messages. |
Implementation Commands and Input
Purpose
Implement boundary that turns terminal, headless, SDK, bridge, channel, and scheduled input into either local control, UI flow, prompt expansion, shell input, or normalized model-visible messages. Keep command routing distinct from model-callable tools: commands originate with a user or external event and may expand into a prompt, whereas tools cross the capability boundary at the model's request.
Use the architecture diagram to review discovery, parsing, expansion, queueing, and transcript projection. Use the command-effect workflow diagram when implementing a command that owns a dialog, performs multiple mutations, hands authority to another runtime, or can finish partially applied. Use the specialized workflow diagram for plugin bootstrap, detached remote work, metered delegation, immediate coupled state, fault injection, and transcript metadata.
Implementation workflow
- Implement the command descriptor and result contracts.
- Assemble and filter registries using discovery, precedence, visibility, and surface rules.
- Route leading-slash input and substitute arguments using slash parsing and prompt expansion.
- Normalize ordinary input, references, images, paste placeholders, hooks, and priorities using input, attachment, and queue contracts.
- Reconcile actual built-in/internal registry symbols through , then match observable built-ins and gated surfaces against .