Skip to content

ADR-141: Knowledge graph as evidential memory backend#198

Merged
aaronsb merged 3 commits into
mainfrom
adr-141-kg-evidential-memory-backend
Jun 30, 2026
Merged

ADR-141: Knowledge graph as evidential memory backend#198
aaronsb merged 3 commits into
mainfrom
adr-141-kg-evidential-memory-backend

Conversation

@aaronsb

@aaronsb aaronsb commented Jun 29, 2026

Copy link
Copy Markdown
Owner

What

Adds ADR-141 (Draft) — an architecture proposal for integrating an external evidential knowledge graph (a kg-compatible system) as an optional, presence-gated cross-session memory backend. Architecture-first: this PR is the decision record; no code.

Why

Both existing memory homes are editorial — they keep one current view and discard what they supersede:

  • Native auto-memory (ADR-128) overwrites on contradiction and exposes no programmatic hooks (only /memory).
  • The session ledger (ADR-112) preserves prose but not the relationships between assertions across sessions.

ADR-112 anticipated a KG tier but left two things unspecified, which this ADR settles:

  1. Activation & detection — the project's KG ontology presence is the combined capability + opt-in gate (zero-config); a ways.json flag is a veto only. Detection is fail-safe and never blocks a turn (fire-and-forget).
  2. The return path — projecting the KG back into the native memory surface as read-only files, so contradiction-preserving (CONTESTED/CONTRADICTORY) signal reaches the session through the slot it already reads. Staged behind the outbound bridge; the three blockers (Auto-Dream, write-redirect, populated-mountpoint overlay) are documented rather than assumed away.

Generalizes to: artifact-presence-gated, evidentially-curated memory — the framework routes, the backend curates, backends are substitutable.

Type

  • Documentation (ADR / architecture proposal)

Testing

  • `docs/scripts/adr lint` — 0 errors on ADR-141 (the one warning is pre-existing, on ADR-127's `Rejected` status)
  • `docs/scripts/adr index -y` — INDEX.md regenerated (+1)
  • New file tracked via existing `.gitignore` exception (`!docs/architecture/**/*.md`) — no gitignore change needed

Related: ADR-112 (session ledger), ADR-128 (memory-as-repo redirect).

Architecture proposal (Draft) for integrating an external evidential
knowledge graph as an optional, presence-gated memory backend.

- Activation contract: ontology presence is the combined capability +
  opt-in gate (zero-config); ways.json flag is a veto only.
- Detection is fail-safe and never blocks the session (fire-and-forget).
- Outbound: copy ledger entries + auto-memory writes to the ontology
  ingest target (refines ADR-112 Tier 2 with an activation contract).
- Inbound (staged): project the KG into the native memory surface as
  read-only files; documents the three blockers (Auto-Dream, write
  redirect, populated-mountpoint overlay).
- Generalizes to: artifact-presence-gated, evidentially-curated memory;
  the framework routes, the backend curates; backends are substitutable.

Related: ADR-112 (session ledger), ADR-128 (memory-as-repo redirect).
aaronsb added 2 commits June 30, 2026 07:01
Reviewed; outbound ingest path empirically validated via the live
kg-fuse demo. Inbound projection remains staged behind its three
documented blockers (Auto-Dream disable, write-redirect, populated-
mountpoint overlay) — accepting the decision, not the unbuilt path.
…-memory-backend

# Conflicts:
#	docs/architecture/INDEX.md
@aaronsb aaronsb merged commit 6246ed8 into main Jun 30, 2026
@aaronsb aaronsb deleted the adr-141-kg-evidential-memory-backend branch June 30, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant