semantic-memory

A provenanced fact store with a declarative conflict-resolution layer.

Every fact records who asserted it and where from. When two sources disagree, a defined precedence order decides which value is served — and surfaces the disagreement rather than hiding it.

Source on GitHub →

The problem

Most knowledge stores treat every fact as equal and anonymous. When two sources assert different values for the same thing, the store either overwrites silently (last write wins) or requires reconciliation upstream. Neither records why one value was chosen, and neither tells you a conflict occurred.

What this does

One primitive — the provenanced assertion:

Assertion { subject · predicate · object
            layer   authored | derived
            source  where it came from
            asserted · confidence · active }

Two ways in, one graph:

prose  ──/remember──▶  extract ─┐
                                ├──▶  assertion  ──▶  reconcile
files  ──/sync─────▶  parse ────┘

Structured reads out:

GET /fact            the served value for a subject + predicate, with provenance
GET /disagreements   where a lower-precedence source disagrees with the served value
GET /conflicts       ties the system will not resolve on its own

How conflicts resolve

A fixed precedence order, tried in sequence until one produces a winner:

layer-precedence  →  source-priority  →  confidence  →  recency

Resolved

A winner is served. Cross-layer losers are recorded and flagged for review.

Contested

No winner — for example two authored values of equal priority. Both are kept, the served value is frozen, and a human decides.

Authored facts (curated) outrank derived facts (mined). Recency may break a tie between two mined facts; it is never used to overrule a human assertion. On an unresolvable tie the system flags rather than guesses.

Properties

Architecture

Two kinds of input. Facts you state in curated files are kept exactly as written, with no AI — authored and fully trusted. Documents are read by AI, which extracts facts from them — derived and lower trust. Both become labeled facts in one store, and when they disagree, stated facts win over extracted ones. Reading facts back is exact and rule-based, with no AI.

Architecture diagram of two input lanes: curated files are
  kept as stated with no AI (authored, fully trusted); documents (typed text or files) are read by AI
  to extract facts (derived, lower trust). Both become labeled facts in one store. GET /fact,
  /disagreements, and /conflicts read them back with no AI, and stated facts win over extracted ones
  when they disagree.

How it was built

Built with Akka Specify and Fluree, using loop-driven engineering and spec-driven development. Requirements were captured as an executable specification and driven to completion in a loop: each requirement is a checkable condition, and the build advances by running the checks, resolving failures, and repeating until every condition holds.