V3.0.0
Cogmem 3.0.0 — Belief Graph v1
Cogmem 3.0.0 introduces the first evidence-backed Belief Graph layer.
This release moves Cogmem beyond raw event organization and entity governance. Important memory can now be represented as governed beliefs with ownership, source roles, evidence links, versions, supersession chains, and conflict records.
The core rule of this release is:
Raw events remain authoritative.
Beliefs must be evidence-backed.
User-owned beliefs require explicit user evidence.
Assistant/tool-only evidence cannot create user-owned memory.
Highlights
- Added
BeliefGovernanceService. - Added governed belief records with ownership, type, status, confidence, versions, and evidence links.
- Added explicit source-role tracking for belief evidence.
- Added user-evidence enforcement for user-owned beliefs.
- Added project-boundary checks for belief evidence.
- Added deterministic belief reinforcement.
- Added correction-based supersession.
- Added pending conflict records for contradictions.
- Added schema migration
0017_belief_graph. - Exported Belief Graph APIs through the public and internal surfaces.
- Added Belief Graph v1 regression tests.
Belief Governance Service
Cogmem now includes:
BeliefGovernanceService
The service creates and manages governed belief records.
A governed belief includes:
beliefId
projectId
ownership
beliefType
canonicalKey
statement
status
confidence
version
validFrom
validTo
supersedesBeliefId
supersededByBeliefId
evidenceEventIds
sourceRoles
createdAt
updatedAt
Supported ownership types:
user
project
system
Supported belief types:
preference
goal
boundary
decision
fact
observation
Supported belief statuses:
active
weak
needs_confirmation
possible_conflict
superseded
rejected
Supported relation modes:
assert
reinforce
correct
contradict
Evidence-Backed Beliefs
Every belief operation must include raw evidence event IDs.
Cogmem rejects belief creation when:
evidenceEventIds is empty
an evidence event does not exist
evidence crosses the project boundary
a user-owned belief has no explicit user-role evidence
This prevents assistant summaries, tool outputs, or volatile context from silently becoming durable user memory.
User-owned belief safety
User-owned beliefs require at least one explicit user-role raw event.
This applies to user-owned:
preferences
goals
boundaries
decisions
facts
Assistant-only or tool-only evidence cannot create user-owned memory.
Project observations
Assistant and tool evidence may still create project-owned observations.
For example, a tool result can support a project observation such as:
The build completed in the observed tool run.
But it cannot become:
The user prefers this build strategy.
unless explicit user evidence exists.
Belief Reinforcement
When a new event supports the same canonical belief and the statement is equivalent, Cogmem reinforces the existing active belief instead of creating a duplicate.
Reinforcement:
keeps the same beliefId
adds new evidence
increments the belief version
updates the version history
slightly increases confidence
preserves a single active current belief
This prevents repeated user statements from becoming many separate memory facts.
Belief Correction and Supersession
Cogmem now supports correction-based supersession.
When a new user-backed belief corrects an existing active belief with the same canonical key:
the old belief becomes superseded
validTo is set on the old belief
the new belief becomes active
the new belief references supersedesBeliefId
the old belief references supersededByBeliefId
a resolved belief conflict record is written
This gives Cogmem a clean path for memory evolution.
Example:
Old belief:
Use vector recall as the primary route.
Corrected belief:
Use graph recall before vector fallback.
The old belief remains auditable, but it is no longer the current active belief.
Pending Contradictions
Contradictions that do not explicitly correct the current belief are recorded as pending conflicts.
In this case:
the existing active belief remains active
the new conflicting belief is marked possible_conflict
a pending conflict record is written
history remains inspectable
This avoids unsafe replacement when the system sees conflicting evidence but lacks enough authority to supersede the current belief.
Belief Graph Schema
A new migration was added:
0017_belief_graph
It creates:
belief_graph_nodes
belief_graph_evidence
belief_graph_versions
belief_graph_conflicts
belief_graph_nodes
Stores current and historical belief nodes.
Important columns include:
belief_id
project_id
ownership
belief_type
canonical_key
statement
status
confidence
version
valid_from
valid_to
supersedes_belief_id
superseded_by_belief_id
created_at
updated_at
belief_graph_evidence
Stores source-role evidence links.
Important columns include:
belief_id
event_id
source_role
evidence_type
weight
created_at
belief_graph_versions
Stores belief snapshots over time.
Important columns include:
belief_id
version
snapshot_json
reason
evidence_event_id
created_at
belief_graph_conflicts
Stores correction and contradiction records.
Important columns include:
conflict_id
project_id
prior_belief_id
proposed_belief_id
relation
status
reason
evidence_event_ids_json
created_at
Schema Version 17
The migration chain now includes:
0015_memory_governance
0016_entity_governance
0017_belief_graph
Upgrading a schema 14 database now plans and applies all three pending migrations and sets the final schema version to:
17
The migration CLI remains dry-run friendly and backup-aware.
Public API Updates
Belief Graph APIs are now exported through the public surface.
New exports include:
BeliefGovernanceService
ApplyBeliefInput
BeliefEvidenceLookup
BeliefEvidenceRecord
BeliefOwnership
BeliefRelation
GovernedBeliefRecord
GovernedBeliefStatus
GovernedBeliefType
This allows host integrations and advanced agent runtimes to create and inspect governed beliefs using Raw Ledger evidence.
Kernel Integration
MemoryKernel now initializes BeliefGovernanceService with Raw Ledger evidence lookup.
The service checks evidence through EventStore, so belief operations are grounded in existing raw events.
This keeps the belief layer tied to the original chronological source ledger.
Memory Map Update
The memory self-map now includes a new anatomy section:
belief_cases
It describes:
active beliefs plus support, supersession, and contradiction history
This makes Belief Graph visible as part of Cogmem’s self-inspection model.
Tests Added
New Belief Graph v1 tests cover:
- user-owned beliefs require explicit user evidence;
- assistant/tool evidence can create project observations but not user facts;
- reinforcement updates the same belief instead of duplicating the current belief;
- user correction supersedes the old belief and preserves history;
- unsupported contradiction remains pending and does not replace the active belief;
- project-boundary violations are rejected;
- kernel-level belief governance works against Raw Ledger evidence.
Migration tests were also updated to verify that schema 14 databases plan and apply:
0015
0016
0017
and reach schema version:
17