Skip to content
InvariantEngine

Architecture

The model can reason. The surrounding system controls context, validation, decisions, execution, and memory.

SOURCE / DATA INPUTS Repository evidence and approved project state
CONTEXT / EVIDENCE Scoped snapshots, provenance, Roslyn inventory, and Context Packs
MODEL GATEWAY / AI REASONING FOUNDATION EXISTS
Ollama-backed streaming gateway and reasoning-session infrastructure Guided Mode currently uses a manual Codex handoff, not live model review.
VALIDATION / POLICY CURRENT
Deterministic diagnosis, risk signals, reference checks, and workflow gates
MODEL OUTPUT REMAINS A PROPOSAL
HUMAN DECISION Scope confirmation, planning acceptance, result review, and memory approval
EXECUTION INTEGRATION Paste-driven Codex Partner Mode with no autonomous source or PR action
FEEDBACK / LEARNING Reviewed outcome, validation evidence, and pending learning
MEMORY / PERSISTENCE Approved project memory and saved workflow state
This shows separation of responsibilities, not end-to-end automation. Deterministic checks can reject or block a handoff, but they do not prove the model or source is correct.

Eight separate responsibilities

These are architectural boundaries, not a claim that IE is deployed as eight services or that every transition is automated.

1. SOURCE / DATA INPUTS

Repository paths, scoped source snapshots, hashes, project records, and operator-supplied state enter through explicit boundaries.

2. CONTEXT / EVIDENCE

Provenance, approved-memory references, read-only Roslyn inventory, onboarding reports, and Context Packs prepare bounded material for review or reasoning.

3. MODEL GATEWAY / REASONING

An IChatModelGateway abstraction, Ollama-backed streaming implementation, local routing, reasoning sessions, and basic SignalR notifications exist as foundations. Guided Mode does not yet expose live LLM review.

4. VALIDATION / POLICY

The server-authoritative deterministic diagnosis, quality and drift checks, Contradiction Queue, Hallucination Gauge v0, reference checks, and closure/restart verifiers run outside model judgment.

5. WORKFLOW / APPLICATION APIS

Application handlers and APIs manage onboarding, planning, task packets, pasted-result analysis, feedback, Context Packs, contradiction review, and memory proposals.

6. HUMAN REVIEW

The operator confirms scope, selects the work, accepts planning, reviews execution results, and separately approves or rejects memory suggestions.

7. EXECUTION INTEGRATION

The current Codex Partner Mode is a manual packet-and-report exchange. IE does not call Codex, edit source, create pull requests, or claim autonomous agents.

8. MEMORY / PERSISTENCE

EF-backed stores retain core workflow state when persistence is configured. Suggested learning remains pending until separate human approval; only active approved memory is available as project truth.

Why the deterministic layer is intentional

Probabilistic reasoning is useful for work that needs synthesis, explanation, or generation. It is a poor substitute for facts the system can establish directly. IE uses deterministic components to identify known source state, bound context, validate references and structure, enforce policy gates, and keep a model's answer separate from approved truth. The rules do not replace the model; they define the conditions under which its proposal can be considered.

The same separation in IE Learn

IE Learn is the first applied AI product in the repository. Its knowledge pipeline prepares and embeds source material, retrieval supplies bounded evidence to a question-generation model, and deterministic application code controls quality checks, question state, scoring, weak areas, readiness, and persistence. It is a concrete example of probabilistic model work surrounded by testable controls.

The implementation is modular, but this is not a microservices claim. The Learning API, application/domain layers, knowledge projects, model integrations, EF repositories, typed client, and Blazor UI live in one solution.

See the IE Learn system architecture ->

References instead of copied payloads

Each step carries scoped identifiers and sanitized evidence references forward. IE does not copy the entire diagnosis or Codex result into every later record, and it does not reconstruct workflow history by parsing text written for display.

Trust boundary

Source evidence, diagnosis findings, Gauge results, model output, Codex output, and suggested learning are evidence or proposal material. A memory suggestion stays pending until a human separately approves or rejects it. Even approved project memory is not proof that the source code is correct.

The same pattern in higher-stakes systems

The architecture is domain-neutral: trusted data feeds a model recommendation, deterministic risk or policy checks evaluate it, an authorized person decides, execution happens through a controlled integration, and feedback returns through review. A financial platform could use that separation, but IE is not a finance product and does not perform live financial analysis.

What the restart test verifies

The full demonstrated workflow has survived a real API/client process restart against durable state. IE reconstructs and checks record identity, history, memory decisions, approved memory, and scoped source references. Source warnings remain visible. This test does not establish code correctness, make AI output true, or make the private alpha generally production ready.