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

Prompt assembly with injected context.

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

```elixir
@spec assemble_prompt(CommBus.Conversation.t(), [CommBus.Entry.t()], keyword()) ::
  map()
```

Assembles a prompt from the given conversation and context entries, applying
keyword matching, budget fitting, and section allocation.

## Parameters

  - `conversation` — A `%CommBus.Conversation{}` with message history.
  - `entries` — List of `%CommBus.Entry{}` structs to consider for injection.
  - `opts` — Keyword options forwarded to `CommBus.Context.plan/3`, including
    `:budget`, `:scan_depth`, `:recency_decay`, and `:methodologies`.

## Returns

A map with keys `:sections`, `:included_entries`, `:excluded_entries`,
`:token_usage`, `:match_diagnostics`, and `:match_context`.

---

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