Prompt assembly with injected context.
Summary
Functions
Assembles a prompt from the given conversation and context entries, applying keyword matching, budget fitting, and section allocation.
Functions
@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 toCommBus.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.