Function: traceDerivation()
August 8, 2026 · View on GitHub
@plures/praxis / index / traceDerivation
Function: traceDerivation()
traceDerivation<
TContext>(factTag,_engine,registry):DerivationChain
Defined in: packages/praxis-core/src/decision-ledger/derivation.ts:26
Trace how a fact was derived through the rule chain.
Starting from the fact tag, walks backward through the dependency graph to find the full derivation chain: event → rule A → fact X → rule B → fact Y
Uses the engine's current state to identify which rules actually fired.
Type Parameters
TContext
TContext = unknown
Parameters
factTag
string
The fact type tag to trace backwards from
_engine
LogicEngine<TContext>
The logic engine (used for current state introspection)
registry
PraxisRegistry<TContext>
The Praxis registry containing all rules
Returns
A DerivationChain showing the complete derivation path to the fact