# `ClaudeWrapper.Commands.AutoMode`
[🔗](https://github.com/genagent/claude_wrapper_ex/blob/main/lib/claude_wrapper/commands/auto_mode.ex#L1)

Auto-mode classifier inspection commands.

Wraps `claude auto-mode config|defaults|critique`, which expose the
auto-mode classifier configuration the CLI uses to decide which actions
it can take without prompting.

## Usage

    config = ClaudeWrapper.Config.new()

    # Print the effective config (your settings merged over defaults), as JSON
    {:ok, json} = ClaudeWrapper.Commands.AutoMode.config(config)

    # Print the default environment/allow/soft_deny/hard_deny rules, as JSON
    {:ok, json} = ClaudeWrapper.Commands.AutoMode.defaults(config)

    # Get AI feedback on your custom auto-mode rules (free-form text)
    {:ok, feedback} = ClaudeWrapper.Commands.AutoMode.critique(config)

    # Override the model used for the critique
    {:ok, feedback} = ClaudeWrapper.Commands.AutoMode.critique(config, model: "opus")

# `config`

```elixir
@spec config(ClaudeWrapper.Config.t()) :: {:ok, String.t()} | {:error, term()}
```

Print the effective auto-mode config as JSON.

Emits your settings where set and defaults otherwise, merged. The string
is returned verbatim (trimmed); decode it with `Jason.decode/1` if you
need the structured form.

# `critique`

```elixir
@spec critique(
  ClaudeWrapper.Config.t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}
```

Get AI feedback on your custom auto-mode rules.

Output is free-form text.

## Options

  * `:model` - Override which model is used for the critique (`--model`).
    Without one the CLI picks its default.

# `defaults`

```elixir
@spec defaults(ClaudeWrapper.Config.t()) :: {:ok, String.t()} | {:error, term()}
```

Print the default auto-mode environment, allow, soft_deny, and hard_deny
rules as JSON.

Useful as a reference when writing custom rules. The soft/hard deny split
distinguishes "warn but allow when explicitly overridden" from "always
block."

---

*Consult [api-reference.md](api-reference.md) for complete listing*
