> ## Documentation Index
> Fetch the complete documentation index at: https://auto-sop.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring & Observability

> Check project health, inspect activity, and track directive metrics

# Monitoring & Observability

## status

Show the install status of auto-sop for a project — hooks, scheduler, managed section, and pause state.

```bash theme={null}
auto-sop status [options]
```

### Options

| Option             | Description                               |
| ------------------ | ----------------------------------------- |
| `--project <path>` | Project root (default: current directory) |

### Example

```bash theme={null}
auto-sop status
```

```
auto-sop v0.0.66
Project: /Users/you/projects/my-app
Hooks:          ok
Scheduler:      ok
Managed section: ok
Paused:         no
Directives:     12 active
```

***

## doctor

Run deep health checks on the auto-sop installation. Validates hooks configuration, scheduler registration, file permissions, and managed section integrity.

```bash theme={null}
auto-sop doctor [options]
```

### Options

| Option             | Description                               |
| ------------------ | ----------------------------------------- |
| `--project <path>` | Project root (default: current directory) |

### Example

```bash theme={null}
auto-sop doctor
```

```
[ok] hooks registered in .claude/settings.local.json
[ok] hook shim executable and accessible
[ok] scheduler plist loaded and running
[ok] capture directory exists and writable
[ok] CLAUDE.md managed section present and hash-valid
[ok] no stale lockfiles detected
```

<Tip>
  Run `doctor` after OS upgrades or if `status` reports issues. It performs deeper checks than `status` including file permissions and process state.
</Tip>

***

## recent

Show recent Claude Code activity captured for the current project.

```bash theme={null}
auto-sop recent [options]
```

### Options

| Option               | Description                                                       |
| -------------------- | ----------------------------------------------------------------- |
| `--since <duration>` | Time window — e.g., `30m`, `1h`, `2h`, `1d`, `1w` (default: `1h`) |
| `--project <path>`   | Project directory (default: current directory)                    |

### Examples

<CodeGroup>
  ```bash Last Hour (Default) theme={null}
  auto-sop recent
  ```

  ```bash Last 30 Minutes theme={null}
  auto-sop recent --since 30m
  ```

  ```bash Last Week theme={null}
  auto-sop recent --since 1w
  ```
</CodeGroup>

***

## show

Show full details of a specific turn or session by ID.

```bash theme={null}
auto-sop show [options] <id>
```

### Options

| Option             | Description                                    |
| ------------------ | ---------------------------------------------- |
| `--raw`            | No formatting, raw file dump                   |
| `--files`          | Only list files changed                        |
| `--tools`          | Only show tool-calls summary                   |
| `--project <path>` | Project directory (default: current directory) |

### Examples

<CodeGroup>
  ```bash Full Turn Details theme={null}
  auto-sop show abc123
  ```

  ```bash Files Changed Only theme={null}
  auto-sop show abc123 --files
  ```

  ```bash Tool Calls Only theme={null}
  auto-sop show abc123 --tools
  ```

  ```bash Raw Output theme={null}
  auto-sop show abc123 --raw
  ```
</CodeGroup>

<Note>
  Get turn/session IDs from `auto-sop recent` output. Each captured interaction has a unique short ID.
</Note>

***

## errors

Show recent errors from the `errors.jsonl` log. Useful for debugging hooks, scheduler failures, or learner issues.

```bash theme={null}
auto-sop errors [options]
```

### Options

| Option               | Description                                                               |
| -------------------- | ------------------------------------------------------------------------- |
| `--project <path>`   | Project root (default: current directory)                                 |
| `--tail <n>`         | Show last N entries (default: 20)                                         |
| `--since <duration>` | Only show entries since duration ago — e.g., `1h`, `24h`, `7d`            |
| `--global`           | Read from global per-project mirror (`~/.claude/sop/<hash>/errors.jsonl`) |

### Examples

<CodeGroup>
  ```bash Recent Errors (Default) theme={null}
  auto-sop errors
  ```

  ```bash Last 5 Errors theme={null}
  auto-sop errors --tail 5
  ```

  ```bash Errors in Last 24 Hours theme={null}
  auto-sop errors --since 24h
  ```

  ```bash Global Error Log theme={null}
  auto-sop errors --global
  ```
</CodeGroup>

<Tip>
  Start with `auto-sop errors --since 1h` when troubleshooting. If no local errors appear, try `--global` to check the global mirror.
</Tip>

***

## stats

Show directive-fire metrics — how often each directive triggered, time saved estimates, and effectiveness rankings.

```bash theme={null}
auto-sop stats [options]
```

### Options

| Option                    | Description                                      |
| ------------------------- | ------------------------------------------------ |
| `--project <path>`        | Project root (default: current directory)        |
| `--since <date>`          | Filter fires after this date (ISO or YYYY-MM-DD) |
| `--minutes-per-error <n>` | Minutes saved per error prevented (default: 15)  |

### Examples

<CodeGroup>
  ```bash All-Time Stats theme={null}
  auto-sop stats
  ```

  ```bash Since a Specific Date theme={null}
  auto-sop stats --since 2025-01-01
  ```

  ```bash Custom Time Estimate theme={null}
  auto-sop stats --minutes-per-error 30
  ```
</CodeGroup>

<Tip>
  Use `--minutes-per-error` to calibrate time-saved estimates for your workflow. If your bugs typically take 30 minutes to fix, set it to 30 for more accurate ROI numbers.
</Tip>
