Workspace Strategy Memory
Workspace strategy memory makes BMO adaptive across time. After several sessions in a workspace, BMO converges to effective orchestration faster because it uses prior workspace evidence — remembering which genome presets, expression profiles, and patterns worked in past sessions.
Maturity: Advanced context-memory surface. It influences orchestration context from prior runs; it is not a hidden instruction channel and does not override current mode, tools, permissions, or operator steering.
What it improves
Section titled “What it improves”- Faster convergence — BMO uses the orchestration strategy that worked before, instead of re-discovering it every session.
- Loop avoidance — Past loop detection patterns are surfaced so BMO can deprioritize tools that caused loops.
- Informed classification — The adaptive orchestration classifier receives a soft prior from past sessions, biased by efficacy evidence rather than raw repetition alone.
How it fits with other features
Section titled “How it fits with other features”Strategy memory builds on Adaptive Orchestration (the genome preset and classifier it biases), expression profiles from plasticity, and Persistent Memory (the storage backend). It complements the Prompt Enhancer by adding workspace-specific orchestration history to the system prompt context.
When to use it
Section titled “When to use it”Workspace strategy memory is on by default for regular BMO runs. Keep it on when you work in the same workspace regularly and want BMO to learn from past sessions:
[options.workspace_strategy_memory]# enabled = false # opt out when every session should start strategy-coldretention_cap = 20 # entries to keep (default: 20, range: 1-100)When disabled, BMO behaves without cross-session strategy context: each session starts strategy-cold.
Do not use it when
Section titled “Do not use it when”- You need a one-off session to ignore prior workspace strategy evidence.
- You are debugging orchestration classification and want a strategy-cold run.
- You need durable task handoff notes; use workstreams, markers, or explicit documentation instead.
If a higher-precedence config sets retention_cap = 0, BMO resets to the
normal default retention behavior instead of inheriting a lower-precedence
nonzero cap. See the Configuration reference for
merge semantics.
Inspecting strategy memories
Section titled “Inspecting strategy memories”Use the /strategy slash command to open the workspace strategy inspector. It shows all strategy entries for the current workspace with their confidence scores, dominant presets, and key signals.
Strategy entries are also accessible via memory tools (memory_list, memory_search) with scope = "workspace_strategy".
The current session’s adaptive orchestration inspector and
get_adaptive_orchestration parity payload also include a compact efficacy
verdict (helped, hurt, neutral, or insufficient) when there is enough
session evidence to say anything useful. This is observability only; it does not
auto-promote a genome.
Operator surfaces
Section titled “Operator surfaces”Workspace Strategy Memory emits process-scoped slog records under
workspace_strategy.fired and workspace_strategy.action via
workspaceStrategyEmitter (internal/agent/workspace_strategy_emit.go). A
16-cap metadata-only ring backs four parity surfaces driven from one
app.BuildWorkspaceStrategyStatusSnapshot aggregator (REQ-MAT-005,
REQ-MAT-008) — the same JSON shape is reachable from CLI, TUI, HTTP, and an
agent session.
Bounded actions
Section titled “Bounded actions”| Action | Severity | Lane | Meaning |
|---|---|---|---|
distill_started | info | distill | Episode entered; signals being scored |
distill_below_min | info | distill | Confidence below the persistence threshold; no entry written |
persist_attempt / persist_ok | info | persist | Entry queued / written to the memory store |
persist_failed | warn | persist | Memory-store write failed; failure streak incremented |
persist_degraded | warn | persist | Three consecutive persist_failed arms — sticky-degraded state set |
prune_ran | info | persist | FIFO pruning advanced past the retention cap |
load_failed | warn | load | Strategy entries could not be loaded for system-prompt injection |
genome_prior_applied | info | composition | Soft prior applied to the adaptive-orchestration classifier |
prompt_injected | info | composition | Strategy summary added to the system prompt |
Field discipline (KTD-5)
Section titled “Field discipline (KTD-5)”workspace_strategy.fired and the ring carry metadata only: hashed FNV32
prefixes (8 hex chars) for session_id and namespace, plus
invocation_id, bounded confidence, turns, entries, pruned, and
failure_streak scalars. Raw session IDs, workspace namespaces (filesystem
paths), prompt text, and persisted entry JSON are never emitted on
either record or stored in the ring.
bmo config show-workspace-strategy (CLI)
Section titled “bmo config show-workspace-strategy (CLI)”Renders the merged workspace-strategy config plus the recent-events ring tail and sticky-degraded persistence flag.
/workspace-strategy (TUI)
Section titled “/workspace-strategy (TUI)”Aliases: /strategy. Read-only. Renders enablement, retention cap, last
persist outcome, sticky-degraded flag, and the recent-events ring tail.
GET /v1/workspace-strategy (HTTP)
Section titled “GET /v1/workspace-strategy (HTTP)”Returns the same WorkspaceStrategyStatusSnapshot JSON as the CLI/TUI,
protected by the existing requireAuth middleware (KTD-7).
list_recent_workspace_strategy_events (agent tool)
Section titled “list_recent_workspace_strategy_events (agent tool)”Returns JSON { "ring_capacity", "returned", "events" } with snake_case
event fields. Optional session_id_hash filter (FNV32 hex prefix from a
prior event) and limit (default: full ring; capped at ring capacity,
currently 16).
See tracing recipes
for jq lanes against bmo logs, including a dedicated
“Diagnosing degraded persistence” recipe for the sticky-degraded path.
- Does this change how BMO responds to my messages? Only indirectly. Strategy memories add context to the system prompt (“Based on N previous sessions, genome preset X has been effective”) and provide a soft prior to the classifier. The agent and classifier can still choose different strategies based on your current message.
- What if the workspace changes significantly? Old entries are naturally pushed out by FIFO pruning as new sessions create new entries. The confidence scoring and recency sorting in the system prompt further deprioritize stale entries.
- Is there an LLM call for distillation? No. Strategy signals are extracted deterministically from existing run data (regulatory history, expression profiles, loop detection, run outcomes). Distillation is fast (<10ms).
- Can I clear strategy memories? Yes. Use
/strategyto inspect entries and clear them for the current workspace.
Related
Section titled “Related”- Adaptive Orchestration
- Persistent Memory
- Configuration reference
- Implementation notes: workspace-strategy-memory.md