Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0005

ADR-0005: Prolog is a stateless reasoning view; the graph is the sole fact store

field value
Status Accepted
Date 2026-07-23
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0005-prolog-is-a-stateless-reasoning-view.md — permalink at bdafa201a (unchanged on master since that commit)
Wiki register entry ADR-0005 (wiki status: Accepted)

← ADR-0004 · ADR-0006 →

The record

Context

The system needs two different capabilities over the same information:

The naive options are to duplicate the facts into both, or to force one tool to do the other's job.

Decision

The knowledge graph is the single system of record for facts. Prolog owns no durable facts.

Per check, the relevant subgraph is projected into Prolog terms; the layered rulebase runs; the result is returned. Prolog is ephemeral and stateless. Rules — not facts — are Prolog's durable content, and they live in version control (.pl + ADRs), with the graph recording only their provenance.

Alternatives rejected

Consequences

Provenance

Original design decision (v0.1), articulated when choosing between unifying facts+rules in one engine versus separating storage from inference. Round-2 confirmed the factoring as correct in principle; Round-3 Fable confirmed it remains consistent with the red-first ledger living in the KG.

This ADR back-fills an earlier human ruling. plans/prolog-utilization-plan.md records it as a standing constraint from session 165: "Variable-bearing rules live in .pl files (consult); only GROUND facts are assertz'd — user ruling" (with the accompanying instruction never to reintroduce pyswip). The 2026-07-24 rulebase survey found the ruling already honoured across all 16 rulebases, documented in-code — e.g. routing.pl:7, kg_relevance.pl:14. So the decision recorded here was made by the human and implemented before this register existed; ADR-0027 and ADR-0025 both depend on it.

Rulings cited

None.

Specs cited