# `DocShell.Generate.Cohort`
[🔗](https://github.com/futhr/doc_shell/blob/v2.0.0/lib/doc_shell/generate/cohort.ex#L1)

Binds an ordered set of loaded collections to one site profile.

The digest covers portable collection descriptors, their content digests and
the profile. Local artifact directories, generation identifiers and build
time never enter it, so rebuilding the same source cohort produces the same
identity. Collection loading and source authenticity remain separate caller
responsibilities; a cohort only identifies admitted portable content.

# `t`

```elixir
@type t() :: %DocShell.Generate.Cohort{
  collections: [DocShell.Generate.Collection.loaded()],
  digest: String.t(),
  profile: String.t()
}
```

A validated source cohort and its canonical SHA-256 identity.

# `new`

```elixir
@spec new([DocShell.Generate.Collection.loaded()], String.t()) ::
  {:ok, t()} | {:error, term()}
```

Validates loaded collections and computes their portable cohort digest.

# `payload`

```elixir
@spec payload([DocShell.Generate.Collection.loaded()], String.t()) :: map()
```

Returns the canonical, path-free payload used to identify a cohort.

---

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