ucm-observe
Decision traces and a replay debugger for Unified Context Management (UCM).
ucm-observe is what makes UCM's reasoning auditable. Every analysis run is
recorded as a structured DecisionTrace, and because the underlying state lives
in an append-only event log, any past decision can be replayed and checked for
determinism. When someone asks "why did the system recommend testing X?", the
trace contains the full derivation.
What it does
DecisionTrace— captures a single reasoning run: trigger event, graph state hash, analyzed entities, orderedTraceSteps (operation, input, output, confidence), output summary, and duration.TraceStore— in-memory, UUID-indexed storage of traces.compare_traces/ReplayResult— re-run a past analysis and surface anyDivergences field-by-field, so non-determinism is caught immediately.
Quick example
use ;
let mut traces = new;
// `original` and `replayed` are DecisionTraces from two runs of the same input.
let result = compare_traces;
if !result.is_deterministic
Where it fits
ucm-reason produces analyses; ucm-observe wraps them in traces and verifies
that replaying the same event-sourced state (from ucm-events)
yields the same result. This closes the loop between what the engine decided and
why — a prerequisite for compliance-grade use cases.
Research foundations
- Replay & determinism — deterministic record/replay debugging (e.g. rr).
- Auditability — event-sourced derivation chains (Datomic).
License
MIT — see LICENSE.