# Commands Reference

> All slash commands available in Archon adapters including Web UI, Telegram, Slack, Discord, and GitHub.

All slash commands available in Archon. Type `/help` in any platform adapter (Web UI, Telegram, Slack, Discord, GitHub) to see this list.

---

## Deterministic Commands

These commands are handled deterministically by the orchestrator — they always execute the same way regardless of AI state:

## Project Management

| Command | Description |
|---------|-------------|
| `/register-project <path>` | Register a local directory as a project |
| `/update-project <name> <path>` | Update a project's directory path |
| `/remove-project <name>` | Remove a project registration |
| `/setproject <name>` | Bind this conversation to a registered project. Clears any working-directory/worktree override and starts a fresh AI session on the next message (chat history stays visible) |

## Workflows

| Command | Description |
|---------|-------------|
| `/workflow list` | Show available workflows |
| `/workflow reload` | Reload workflow definitions |
| `/workflow status` | Show active workflows |
| `/workflow cancel` | Cancel running workflow |
| `/workflow resume <id>` | Resume a failed or paused run (re-runs, skipping completed nodes) |
| `/workflow abandon <id>` | Discard a run (running, paused, or failed) |
| `/workflow approve <id> [comment]` | Approve a paused workflow run at an approval gate (interactive-loop gates: no comment on a signal-bearing gate = accept & complete; a comment runs another iteration) |
| `/workflow reject <id> [reason]` | Reject a paused workflow run at an approval gate |
| `/workflow run <name> [args]` | Run a workflow directly |
| `/workflow cleanup [days]` | CLI only -- delete old run records (default: 7 days) |

> **Note:** Workflows are YAML files in `.archon/workflows/`

## Session Management

| Command | Description |
|---------|-------------|
| `/status` | Show conversation state |
| `/reset` | Start fresh: clears the AI session, releases the execution binding (working-directory override + isolation env), and abandons this conversation's **resumable** run trees (`paused`/`failed`) so the next message does not continue one. Runs that are actively executing (`pending`/`running`) are never touched -- they may belong to another process entirely. Each cleanup effect still runs if another fails; an incomplete reset tells you to retry and does not promise a fresh next message. The project attachment (`codebase_id`) is preserved; use `/setproject none` to drop that too |
| `/help` | Show all commands |

---

## AI-Routed Commands

The following commands exist in the command handler but are **not** deterministically routed. Instead, they are routed through the AI orchestrator, which decides whether to invoke them based on context. They work when the AI routes a message to them:

| Command | Description |
|---------|-------------|
| `/clone <repo-url>` | Clone repository |
| `/repos` | List repositories (numbered) |
| `/repo <#\|name> [pull]` | Switch repo (auto-loads commands) |
| `/repo-remove <#\|name>` | Remove repo and codebase record |
| `/getcwd` | Show working directory |
| `/setcwd <path>` | Set working directory |
| `/command-set <name> <path> [text]` | Register a command from file |
| `/load-commands <folder>` | Bulk load commands (recursive) |
| `/commands` | List registered commands |
| `/worktree create <branch>` | Create isolated worktree |
| `/worktree list` | Show worktrees for this repo |
| `/worktree remove [--force]` | Remove current worktree |
| `/worktree cleanup merged\|stale` | Clean up worktrees |
| `/worktree orphans` | Show all worktrees from git |
| `/init` | Create `.archon` structure in current repo |
| `/reset-context` | Reset AI context, keep worktree |

> **Note:** In practice, you rarely need to type these commands directly. Describe what you want in natural language and the AI router will invoke the appropriate command or workflow.

---

## Example Workflow (Telegram)

### Ask Questions Directly

```
You: What's the structure of this repo?

Bot: [Claude analyzes and responds...]
```

### Check Status

```
You: /status

Bot: Platform: telegram
     AI Assistant: claude

     Codebase: my-project
     Repository: https://github.com/user/my-project

     Repository: my-project @ main

     Worktrees: 0/10
```

### Reset Session

```
You: /reset

Bot: Session cleared. Cleared workspace binding (worktree + isolation env).
     Abandoned 1 resumable run(s). Project attachment preserved — next message
     starts fresh.
```

---

## Example Workflow (GitHub)

Create an issue or comment on an existing issue/PR:

```
@your-bot-name can you help me understand the authentication flow?
```

Bot responds with analysis. Continue the conversation:

```
@your-bot-name can you create a sequence diagram for this?
```

Bot maintains context and provides the diagram.