Home/Docs/Architecture Decision Records/ADR-0018: Execution Evidence and Cognitive Memory Formation Are Separate Pipelines

ADR-0018: Execution Evidence and Cognitive Memory Formation Are Separate PipelinesπŸ”—

StatusπŸ”—

Accepted β€” 2026-07-18.

ContextπŸ”—

ADR-0004 establishes memory as a native medium. Durable cognitive memory forms through the explicit admission and promotion path described here.

The platform has several superficially similar but semantically different data classes:

  • Execution Trace records the completed graph journey;
  • ExecutionTraceArtifact/v1 may preserve protected model-I/O evidence for one trace attempt;
  • Conversation History preserves selected user/assistant/system/tool records;
  • BrainCells are admitted atomic knowledge units;
  • BrainSynapses are attributable action/outcome learning;
  • BrainEngrams are governed compiled memory products.

Conflating these classes would turn Brain into an unbounded transcript/event store, leak sensitive observability content into retrieval or training, and make trace capture itself a memory-authoring decision.

DecisionπŸ”—

Execution evidence and cognitive-memory formation are separate typed pipelines with explicit bridges and provenance.

1. Memory formation requires admissionπŸ”—

BrainCell persistence requires the explicit memory formation path. A secured run records bounded node/model/tool/control evidence in its Router-owned RunRecorder; terminal finalization writes one Brain-owned Execution Trace under ADR-0014.

Execution Trace owns journey, correlation, and accounting evidence. BrainCell formation and dataset promotion have separate authorized producers.

2. Protected trace content remains execution evidenceπŸ”—

ExecutionTraceArtifact/v1 is a protected Brain-owned child resource logically attached to one Trace attempt but physically outside immutable Trace JSON. The initial closed artifact_kind is model_io, whose payload schema preserves an admitted bounded provider-bound request and visible response/tool-call envelope.

A trace step carries artifact ref, keyed digest, capture/storage state, and safe sizes. Conversation History, knowledge, evaluation, and training records require their own governed production paths.

Artifact identity is deterministic and unique by tenant, project, graph run, provider attempt and artifact kind. Same identity plus the same canonical keyed digest is idempotent; same identity plus a different digest conflicts. Different attempts are never content-deduplicated, even when their prompts match, and no cross-tenant/project equality index is permitted.

3. Conversation History is a separate ownerπŸ”—

Conversation History stores selected bounded conversational records through its own append/query/retention contracts. Writes are path-dependent: for example, user-turn auto-extract may first append a durable user record, while an assistant record requires an explicit memory-write, reflection or equivalent admitted caller.

Conversation History receives writes through its append contract. Trace stores bounded execution evidence. A conversation record can serve as source evidence for a later BrainCell extraction decision.

4. BrainCell formation requires an admitted producerπŸ”—

A BrainCell is created only by an explicit typed writer such as manual/domain ingestion, documentation ingestion, or the Router auto-extract pipeline. The conversation auto-extract path is:

eligible conversation trigger
  -> resolve C0/project/graph auto-extract policy
  -> durable Conversation History source ref
  -> bounded separate extraction-model invocation
  -> strict candidate schema
  -> cost, confidence, PII, tenant and source-provenance policy
  -> Brain UpsertCell(content_hash, source refs)
  -> asynchronous embedding enrichment

The product defaults are fail-quiet and explicit:

  • memory.auto_extract.enabled = false;
  • graph-completion trigger configuration cannot override a disabled master gate;
  • user-message extraction defaults disabled;
  • short/duplicate/cooldown/budget/policy-rejected conversations create no Cell;
  • extraction or Brain failure does not block the user response and emits bounded fault/DLQ evidence where configured.

When enabled, auto-extract consumes admitted conversation messages, not arbitrary node state or every intermediate result. Candidate confidence and policy decide whether a Cell is written. UpsertCell content-hash idempotency and extraction coordination prevent duplicate writes; deduplication is not proof that content is trustworthy and does not bypass governance eligibility.

5. Promotion from evidence to memory is governedπŸ”—

Using Trace/Artifact content for memory, evaluation or training requires a new explicit authorized derivation:

ExecutionTraceArtifact or ConversationRecord
  -> selected source refs
  -> redaction/classification
  -> quality and policy evaluation
  -> new domain-owned derived record
  -> optional BrainCell/Synapse/Engram/dataset promotion

The derived record carries source artifact/conversation refs, policy version and content digest. It never mutates the source into a BrainCell in place. Hidden reasoning, credentials, unrestricted provider payloads and content lacking the required consent/policy classification are ineligible.

Artifact correlation cannot silently ingest model I/O into BrainCells, Synapses or Engrams. Evaluation or training derivation requires its own producer, consumer, consent, retention and promotion gates.

6. Artifact lifecycle is storage policy, not memory promotionπŸ”—

C0 allowlisted lifecycle profiles govern protected Trace artifacts:

hot Brain payload
  -> optional archiving
  -> authorized restore/read
  -> optional purge/tombstone

Worker's S3TraceArtifactArchive implements the protected trace-artifact archive. General-purpose external object placement remains design-only under ADR-0015.

There is no universal 24–168 hour deletion rule. A profile may retain content long-term (purge_after_days: null) or purge it under explicit tenant/compliance policy. Archiving changes storage state, not cognitive-memory classification.

Authority and idempotency summaryπŸ”—

RecordAuthorityIdentity/idempotencyAutomatic next layer?
Execution TraceBrain trace ownertenant + graph run + canonical digestno
ExecutionTraceArtifactBrain trace-artifact ownertenant/project/run/attempt/kind + keyed digestno
ConversationRecordBrain Conversation Historydeterministic record/idempotency key + content hashno
BrainCellBrain knowledge ownertenant-scoped cell/content-hash upsert semanticsno automatic Engram
BrainSynapseBrain learning ownertyped action/outcome evidencegoverned consolidation only
BrainEngramBrain compilation ownerversioned compiled evidence setderived view/index only

ConsequencesπŸ”—

  • Enabling traces or model-I/O capture cannot silently grow semantic memory.
  • Disabling auto-extract does not disable Trace or Conversation History callers.
  • Auto-extract remains optional, asynchronous, cost/confidence/policy bounded and source-provenance preserving.
  • Forge must label Trace, protected artifact, Conversation History and BrainCell surfaces distinctly; an artifact detail view is not a memory view.
  • Memory retrieval and prompt injection query Brain memory owners, not raw Trace artifacts, unless a future explicit governed projection is accepted.
  • Storage deduplication, archive state and retention do not grant epistemic trust or promotion authority.

Alternatives consideredπŸ”—

  • Persist every node input/output as BrainCells. Rejected: unbounded noise, sensitive-content leakage, duplicated state and no knowledge-governance policy.
  • Treat the complete transcript as the Execution Trace. Rejected: trace and conversation content have different access, size, retention and portability.
  • Automatically promote protected model-I/O artifacts after retention. Rejected: storage age is not quality, consent or governance evidence.
  • Use Conversation History as the model-I/O artifact store. Rejected: it is a user/session history owner, not a provider-attempt observability lifecycle.
  • Deduplicate identical prompts globally. Rejected: loses attempt lineage and creates cross-tenant/project equality side channels.

Non-goalsπŸ”—

  • Defining a general training-data promotion workflow.
  • Making auto-extract mandatory.
  • Treating all Brain writes as BrainCells.
  • Replacing ADR-0010 Wiki-First compilation or ADR-0011 Graph-First retrieval.
  • Redefining ADR-0015 crypto/offload ownership.