# `Jidoka.Control`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/control.ex#L1)

Minimal reusable policy control contract for Jidoka agents.

Controls are declared by agents as data first. Runtime execution will attach
them at explicit control points, but the current implementation only needs a stable
module contract and published name.

# `decision`

```elixir
@type decision() ::
  :allow
  | :cont
  | :ok
  | {:block, term()}
  | {:interrupt, term()}
  | {:error, term()}
```

# `name`

```elixir
@type name() :: String.t()
```

# `call`

```elixir
@callback call(term()) :: decision()
```

Evaluates a control context and returns whether execution may continue.

# `name`

```elixir
@callback name() :: name()
```

Returns the stable control name used in specs, traces, and inspection output.

# `__using__`
*macro* 

```elixir
@spec __using__(keyword()) :: Macro.t()
```

Defines a reusable Jidoka control module.

# `control_name`

```elixir
@spec control_name(module()) :: {:ok, name()} | {:error, String.t()}
```

Returns the published name for a validated control module.

# `validate_module`

```elixir
@spec validate_module(module()) :: :ok | {:error, String.t()}
```

Validates that a module implements the Jidoka control contract.

---

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