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 in handleWorktreeCommand (dispatcher at line 1062).
  • /workflow – Controls Archon’s workflow engine via sub-commands (list, reload, status, cancel, resume, abandon, approve, reject, run) handled by handleWorkflowCommand (dispatcher at line 1065).
  • /init – Bootstraps a new Archon project by creating the .archon directory, a default config.yaml, and an example command file (implementation at line 1068).

Note: Commands such as /register-project belong to the AI-driven orchestrator layer in packages/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:

  1. Parsing – The parseCommand function splits the raw message into a command name (stripping the leading /) and an argument array.
  2. Dispatch – A switch statement matches the command name to a concrete handler implementation.
  3. Delegation – For composite commands (/worktree and /workflow), the handler forwards requests to dedicated helper functions (handleWorktreeCommand and handleWorkflowCommand), 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.ts manages seven deterministic slash commands: /help, /status, /commands, /reset, /init, /worktree, and /workflow.
  • Sub-command delegation for /worktree and /workflow is handled by handleWorktreeCommand and handleWorkflowCommand, keeping the main dispatcher clean.
  • Parsing logic uses the parseCommand function 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-project reside 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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →