API Overview¶
Core Class¶
from decisiongraph import DecisionGraph
DecisionGraph¶
start_trace(...): start a decision traceappend_event(...): append any supported event typeobserve_input(...),observe_entity(...),evaluate_policy(...): typed helpers for common event writesrequest_exception(...),record_approval(...),cite_precedent(...): typed helpers for policy and approval flowspropose_action(...),commit_action(...): typed helpers for action lifecycle eventsfinish_trace(...): end a trace with an outcomeget_trace_events(trace_id): list eventsget_context_subgraph(node_type, node_id, max_depth=1): graph queryget_projection_health(include_digests=False): inspect cursor lag and current projection statefind_precedents(...): precedent searchsync_projections(batch_size=None): apply pending projection updatesreplay_projections(batch_size=None): rebuild projections from scratch
CLI¶
python -m decisiongraph replay <db>
python -m decisiongraph projection-status <db>
python -m decisiongraph projection-status <db> --include-digests
python -m decisiongraph dump-trace <db> <trace_id>
python -m decisiongraph dump-trace <db> <trace_id> --include-payload
replay computes digests from isolated temporary replay state and does not mutate the source database.
Contract Reference¶
For v1 compatibility guarantees and change rules, see V1.0 Scope and Contracts.