# `SnakeBridge.Docs.ManifestBuilder`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.16.0/lib/snakebridge/docs/manifest_builder.ex#L1)

Builds docs surface manifests from published documentation artifacts.

Primary input is a Sphinx `objects.inv` inventory (Intersphinx format).
Optionally, an HTML page can be used to derive a curated "summary" profile
by extracting fully-qualified object references and intersecting them with
the inventory.

# `kind`

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

# `manifest`

```elixir
@type manifest() :: map()
```

# `object_entry`

```elixir
@type object_entry() :: map()
```

# `profile`

```elixir
@type profile() :: map()
```

# `profile_name`

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

# `extract_modules_from_html_nav`

```elixir
@spec extract_modules_from_html_nav(String.t(), String.t()) :: MapSet.t(String.t())
```

Extracts candidate module names from Sphinx/MkDocs-style nav links.

Many documentation sites render module pages as paths like:

- `examplelib/beam_search/` → `examplelib.beam_search`
- `examplelib/v1/worker/gpu/` → `examplelib.v1.worker.gpu`

# `extract_references_from_html`

```elixir
@spec extract_references_from_html(String.t(), String.t()) :: MapSet.t(String.t())
```

Returns a set of fully-qualified references found in HTML.

# `filter_modules_by_depth`

```elixir
@spec filter_modules_by_depth(Enumerable.t(), String.t(), pos_integer()) ::
  MapSet.t(String.t())
```

Filters a set/list of Python module names to a maximum depth relative to `library_root`.

Depth is measured in dot-separated segments *after* the root:

- `examplelib.config` → depth 1
- `examplelib.multimodal.inputs` → depth 2

# `from_inventory`

```elixir
@spec from_inventory(SnakeBridge.Docs.SphinxInventory.t(), String.t(), keyword()) ::
  profile()
```

Builds a manifest from a parsed Sphinx inventory.

# `merge_profiles`

```elixir
@spec merge_profiles(profile(), profile()) :: profile()
```

Merges two profiles by unioning modules and objects.

Objects are deduplicated by `{name, kind}`.

# `summary_from_html`

```elixir
@spec summary_from_html(profile(), String.t(), String.t()) :: profile()
```

Builds a summary profile by extracting object references from HTML and
intersecting with a full profile built from inventory.

---

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