# `CommBus.Methodologies`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

Curated methodology catalog for reusable prompt packs.

Loads YAML definitions from `config/comm_bus/methodologies` by default, validates schema,
and exposes helpers to retrieve methodology metadata or resolve entries for injection.

# `clear_cache!`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec clear_cache!() :: :ok
```

Erases the methodology cache from `:persistent_term`, forcing a reload on
the next access.

## Returns

`:ok`

# `default_root`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec default_root() :: String.t()
```

Returns the configured methodology root directory, falling back to
`config/comm_bus/methodologies` relative to the project root.

## Returns

A string path to the methodology directory.

# `entries_for`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec entries_for(String.t() | [String.t()]) :: [CommBus.Entry.t()]
```

Resolves methodology references into a flat list of entries.

Accepts a single reference string or a list of references. Each reference
is either a bare slug (returns all entries) or a `"slug#entry_id"` fragment
(returns only the matching entry).

## Parameters

  - `refs` — A string like `"bug_triage"` or `"bug_triage#severity-check"`,
    or a list of such strings.

## Returns

A list of `%CommBus.Entry{}` structs from the referenced methodologies.

# `get!`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec get!(String.t()) :: CommBus.Methodology.t()
```

Fetches a cached methodology by slug, raising if not found.

## Parameters

  - `slug` — The methodology slug string.

## Returns

A `%CommBus.Methodology{}` struct.

## Raises

Raises `ArgumentError` if no methodology matches the given slug.

# `list`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec list() :: [CommBus.Methodology.t()]
```

Returns all cached methodologies as a list sorted by slug, loading from disk
if not yet cached.

## Returns

A list of `%CommBus.Methodology{}` structs.

# `load_from_disk!`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec load_from_disk!(keyword()) :: %{required(String.t()) =&gt; CommBus.Methodology.t()}
```

Loads all methodology YAML files from the configured root directory, validates
their schema, builds entry structs, and caches the catalog in `:persistent_term`.

## Parameters

  - `opts` — Keyword options: `:root` (directory path override).

## Returns

A map of methodology slugs to `%CommBus.Methodology{}` structs.

## Raises

Raises on invalid YAML or missing required fields.

# `reload!`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec reload!() :: %{required(String.t()) =&gt; CommBus.Methodology.t()}
```

Reloads all methodologies from disk, refreshing the `:persistent_term` cache.

## Returns

A map of methodology slugs to `%CommBus.Methodology{}` structs.

---

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