compile_brief
Compiles a brief from source documents by resolving an LLM via a capability ladder, enforces wikilink emission, and writes to a sink with automatic superseding.
Instructions
Compile a brief from caller-supplied source documents and write it to the briefs sink. Resolves the LLM via the D-10 capability-first ladder (MCP Sampling → local Ollama → caller prepared_text → structured error). Enforces D-11 wikilink emission per source (appends a ## Sources footer when the LLM omits them) and writes through DeliveryAdapter. On target collision, auto-supersedes the prior brief via the Phase 2 supersede chain (D-12).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Vault name (registered in [vaults] config block) | |
| target | Yes | Stable cross-version handle for the brief (e.g. 'atlas-q3') | |
| source_doc_ids | Yes | DocIds the brief is compiled from; deduped, capped at 50 (D-03) | |
| purpose | Yes | Free-form purpose; bounded so list_briefs stays scannable | |
| max_tokens | No | Hint for the LLM ladder; default 2000 | |
| prepared_text | No | D-10 tier 3 fallback when no LLM is reachable — verbatim body to stitch in | |
| sink | No | Override the default `_memory/_briefs` sink |