Prompt Stack
Where this fits
Section titled “Where this fits”Prompt Stack is the before-model observability surface in the conversation quality lifecycle. Use it when you need to see what BMO assembled before the model ran — not after a draft exists.
Changes live output?
Section titled “Changes live output?”No. The ring and status JSON are read-only metadata. They never change what the model receives on a future turn.
Reach for it when
Section titled “Reach for it when”A response surprises you and you want to confirm what context the agent was given — for example checking whether a mode, tool, or memory segment was actually included before blaming the model.
Inspect
Section titled “Inspect”| Job | Route | What it shows |
|---|---|---|
| Live TUI state | /prompt-stack or sidebar Prompt stack | Current process ring, last-build actions, recent build rows, and the next route to Context Lineage. |
| Full trace inspection | TUI Context Lineage | Source classes, included/shed/empty groups, boundary details, compaction, and segment text for the current or last turn. |
| CLI process view | bmo config show-prompt-stack | The same human-readable status for the current process. |
| Agent JSON status | get_prompt_stack_status | Bounded posture/status JSON for automation. |
| MCP JSON status | bmo_get_prompt_stack_status | Same bounded JSON shape as the agent status tool. |
| HTTP JSON status | GET /v1/prompt-stack/status | App-owned status snapshot for live runtimes. |
| Recent-build export | list_recent_prompt_stack_builds | Strict recent-build metadata for agent workflows. |
The trust boundary is intentional: the ring, slog events, HTTP status, MCP tools, and agent-tool JSON carry metadata only. Use Context Lineage for richer trace inspection; do not expect those status surfaces to export full prompt bodies or durable cross-process history.
Prompt-stack segment actions are a finite reviewed taxonomy: included,
shed, empty, disabled, denied, mode_conflict, context_escape, and
phase_error. Segment reasons are bounded to reviewed families such as
shed:token_budget, disabled:policy, denied:policy, and unreviewed;
status surfaces do not copy raw provider errors, user text, tool output, home
paths, or prompt bodies into reason fields.
Related quality surfaces
Section titled “Related quality surfaces”- Conversation quality — lifecycle map and pick-your-job tree
- Quality Gates — jump here after a draft exists when you need a rubric verdict
- Shadow Evals — jump here when prompt or routing changes need
bmo eval comparebefore/after evidence; semantic-ready prompt-stack scenarios live undereval/scenarios/prompt-stack/
Deep dive
Section titled “Deep dive”Every turn records prompt-stack builds through the system prompt assembler.
Telemetry uses prompt_stack.fired and prompt_stack.action slog events plus a
process-scoped ring (capacity 12). Implementation detail:
prompts topic.
See also: Prompt Enhancer (user-message context injection).
