Skip to main content

Module engine

Module engine 

Source
Expand description

The engine: the analyze → DISCOVER → ENRICH → validate/dedup → store pipeline, the run-outcome contract, and the review/apply/rollback lifecycle with the governance gates. The DETERMINISTIC output is a pure function of (store state, params, now); the optional LLM stages (§9) only add cited drafts (origin=llm, never auto-apply) and whitelisted guidance — with no backend they are the identity, so the deterministic path is unchanged. Auto-apply execution is gated behind a conservative shape check and stays off by default.

Structs§

AnalyzerSkip
One analyzer that did not contribute drafts, with why.
Engine
The engine holds the registered analyzers, the host policy, and an optional LLM enrichment backend (§9).
Health
A health snapshot for the backend’s self-improvement loop.
LlmFunnel
The DISCOVER pipeline’s attrition, counted.
LlmMetrics
Approval-rate metric for origin = llm recommendations (reflection §6b).
RunOptions
Gating and scoping options for a run.
RunResult
The run-outcome contract (proposal §13): one shape across CLI/API/MCP/bindings.
ScopeSet
A set of granted scopes.

Enums§

Decision
A review decision.
RunOutcome
Whether a run executed or was skipped.
Scope
Host-granted authority, per connection. admin implies all.
SkipReason
Why a run was a no-op. LockHeld is produced by the host adapter (a concurrent writer), surfaced here for a single contract.

Constants§

LOOP_NS
The namespace the loop’s own grains (recommendations, audit) live in.
PREMISE_DRIFT_METRIC
The metric name under which the Verify gate records a premise that moved.