Sypha AI Docs
Features

Slash Commands

Overview of slash commands, including default, advanced, and workflow commands.

Slash Commands

Overview of the chat slash-commands capability: what exists, its operation, and usage methodology.

What are Slash Commands?

  • Type / at the beginning of the chat input to display command suggestions.
  • Utilize Arrow keys or Tab/Enter to select; add optional arguments following the command.

Command Categories

  • Default Commands: perpetually available
  • Advanced Commands (Sypha): powered by Sypha command orchestrator
  • Workflow Commands: project-specific workflows sourced from enabled files

Default Commands

  • /newtask: Generate a new task with current context
  • /smol (alias: /compact): Compress context window
  • /newrule: Generate a new Sypha rule (may activate a rules file check)
  • /reportbug: Generate a GitHub issue
  • /deep-planning: Insert a comprehensive implementation plan

Advanced Commands (Sypha)

Available when utilizing the Sypha build. Supported by src/commands/sypha-commands/* and orchestrated via command-orchestrator.

  • /analyze: Code analysis (quality/security/performance/architecture)
  • /implement: Guided implementation with personas/tools
  • /workflow: Generate implementation workflows
  • /task: Task management with persistence
  • /design: Architecture and component design
  • /improve: Refactors and improvements
  • /test: Testing flows
  • /document: Documentation generation
  • /estimate: Estimation
  • /troubleshoot: Troubleshooting flows

Workflow Commands

  • Any enabled workflow filename becomes a slash command.
  • Local workflows take precedence over global; collisions are managed deterministically.

UI Behavior

  • Component: webview-ui/src/components/chat/SlashCommandMenu-sypha.tsx (Sypha) or SlashCommandMenu.tsx (base)
  • Util: webview-ui/src/utils/slash-commands-sypha.ts (Sypha) or slash-commands.ts (base)
  • Sections displayed: Default, Advanced (Sypha), Workflow
  • Mentions and commands support deletion and highlighting during typing

Parser Flow (server-side)

  • Sypha build: src/core/slash-commands/index-sypha.ts
    1. Advanced: isSyphaCommandprocessSyphaCommand
    2. Default: insert canned instructions
    3. Workflow: inject <explicit_instructions> with file content
    4. Telemetry: command usage captured
  • Base build: src/core/slash-commands/index.ts (no advanced step)

Renaming/Branding (Sypha)

  • Advanced command APIs exposed as isSyphaCommand/processSyphaCommand
  • Advanced commands reside under src/commands/sypha-commands/*
  • Terminal label: "Sypha"; task file: .sypha-tasks.json

Usage Tips

  • Begin with / to browse commands; continue typing to filter
  • Provide explicit arguments following the command (e.g., /analyze src/components)
  • Combine with mentions @file, @folder, etc., for additional context

Testing Pointers

  • UI: verify menu displays, keyboard navigation, insertion/deletion
  • Parser: precedence order (Advanced → Default → Workflow)
  • Workflows: local vs global precedence and content injection

Key Files

  • UI menus: webview-ui/src/components/chat/SlashCommandMenu-sypha.tsx
  • UI utils: webview-ui/src/utils/slash-commands-sypha.ts
  • Parser: src/core/slash-commands/index-sypha.ts
  • Advanced orchestrator: src/commands/sypha-commands/command-orchestrator.ts

Getting Started Workflow (New Users)

  1. Open Sypha chat (Command Palette: "Sypha: Focus Chat Input").
  2. Type / to open the command menu; utilize Arrow keys to browse.
  3. Select a default command (e.g., /newtask) or an advanced one (e.g., /analyze).
  4. Add arguments following the command (e.g., /analyze src/components).
  5. Press Enter to submit. Review the plan/response and iterate.
  6. Optional: enable workflow files to expose project-specific commands.

On this page