<!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->

# pai topic

> Topic shift detection: check whether context has drifted to a different project

## Synopsis

```
pai topic <subcommand> [options]
```

## Subcommands

| Command | Description |
|---------|-------------|
| [`pai topic check <context>`](#pai-topic-check-context) | Check whether context text has drifted to a different project. |

### pai topic check <context>

Check whether context text has drifted to a different project.

Example: pai topic check "working on JWT authentication"
Exit code 1 if a shift is detected (useful for hooks).

**Arguments**

| Argument | Kind |
|----------|------|
| `<context>` | required |

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--current <slug>` | The project this session is currently routed to |  |
| `--threshold <n>` | Confidence threshold [0-1] to declare a shift (default: 0.6) |  |
| `--json` | Output raw JSON result |  |


## See also

[`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai identity`](identity.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)

Run `pai help <area>` to read any of these in the terminal.

