Archon Slash Commands: Complete Reference for the Command Handler
Archon’s deterministic command handler exposes seven top-level slash commands—/help, /status, /commands, /reset, /worktree, /workflow, and /init—that parse messages beginning with a leading slash and route them to specific operations without AI intervention.
Archon is an open-source AI orchestration framework that routes natural language and explicit slash commands to appropriate handlers. While the orchestrator manages AI-driven requests, the deterministic command handler in packages/core/src/handlers/command-handler.ts manages explicit operations for project initialization, Git worktrees, and workflow control.
Available Archon Slash Commands
The command handler recognizes the following top-level slash commands defined in packages/core/src/handlers/command-handler.ts:
/help– Displays an extensive help message listing all available commands and usage tips (implementation at line 897)./status– Returns a comprehensive status summary including the current platform, AI assistant, registered projects, active session, workflow state, and worktree information (implementation at line 937)./commands– Lists markdown-based project commands stored under.archon/commands/for the current codebase (implementation at line 1025)./reset– Deactivates the current conversation session and clears AI context while preserving the selected project (implementation at line 1046)./worktree– Manages Git worktrees through sub-commands (create, list, remove, show orphans, cleanup) implemented inhandleWorktreeCommand(dispatcher at line 1062)./workflow– Controls Archon’s workflow engine via sub-commands (list, reload, status, cancel, resume, abandon, approve, reject, run) handled byhandleWorkflowCommand(dispatcher at line 1065)./init– Bootstraps a new Archon project by creating the.archondirectory, a defaultconfig.yaml, and an example command file (implementation at line 1068).
Note: Commands such as
/register-projectbelong to the AI-driven orchestrator layer inpackages/core/src/orchestrator/orchestrator-agent.ts, not the deterministic command handler.
How the Archon Command Handler Works
The handler operates through a three-stage dispatch pipeline defined in packages/core/src/handlers/command-handler.ts:
- Parsing – The
parseCommandfunction splits the raw message into a command name (stripping the leading/) and an argument array. - Dispatch – A
switchstatement matches the command name to a concrete handler implementation. - Delegation – For composite commands (
/worktreeand/workflow), the handler forwards requests to dedicated helper functions (handleWorktreeCommandandhandleWorkflowCommand), which implement their own sub-command switches (e.g.,create,list,remove).
This architecture keeps the main dispatcher compact while isolating complex logic in specialized modules.
Archon Slash Command Usage Examples
Displaying System Status
Use /status to verify the current working context and active components:
/status
Output includes:
## Orchestrator Status
**Platform**: slack
**AI Assistant**: claude
## Registered Projects (2)
- my-app (user/repo)
- demo (demo/repo)
## Conversation Context
- Project: my-app @ main
- Working Directory: /home/user/my-app
Active Workflow: `add-feature` …
Worktrees: 3 active
...
Managing Git Worktrees
Create an isolated worktree for feature development:
/worktree create feature-xyz
Result:
Worktree created!
Branch: feature-xyz
Path: worktrees/feature-xyz
This conversation now works in isolation.
Running Workflows
Execute a workflow directly with optional flags:
/workflow run lint --fix
Response:
Starting workflow: `lint`
Initializing a New Project
Bootstrap Archon configuration in an existing repository:
/init
This creates the .archon directory structure with default configuration files.
Summary
- Archon’s command handler in
packages/core/src/handlers/command-handler.tsmanages seven deterministic slash commands:/help,/status,/commands,/reset,/init,/worktree, and/workflow. - Sub-command delegation for
/worktreeand/workflowis handled byhandleWorktreeCommandandhandleWorkflowCommand, keeping the main dispatcher clean. - Parsing logic uses the
parseCommandfunction to tokenize slash messages into commands and arguments. - Orchestrator vs. Handler: Only commands in the command handler execute deterministic operations; AI-driven commands like
/register-projectreside in the orchestrator agent.
Frequently Asked Questions
How do I list available project-specific commands in Archon?
Use the /commands slash command. This reads markdown files stored under .archon/commands/ in your current project directory and displays them as a formatted list. According to the source code at line 1025, this command specifically surfaces custom automation scripts defined by your project rather than global system commands.
What is the difference between /reset and starting a new conversation?
The /reset command deactivates the current session and clears AI context while preserving your selected project and working directory, as implemented at line 1046. This allows you to maintain project context while wiping conversation history, whereas starting a new conversation may require re-selecting the project entirely.
Can I create Git worktrees through Archon’s command handler?
Yes. The /worktree command supports sub-commands (create, list, remove, show-orphans, cleanup) implemented in handleWorktreeCommand. When you execute /worktree create <branch-name>, Archon creates a new Git worktree and switches your conversation context to operate within that isolated directory.
Where are slash commands processed in the Archon source code?
All deterministic slash commands are processed in packages/core/src/handlers/command-handler.ts. The parseCommand function handles tokenization, while a primary switch statement routes to specific implementations. Composite commands like /worktree and /workflow delegate to handleWorktreeCommand and handleWorkflowCommand respectively, which manage their own sub-command logic.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →