Sage-wiki memory report

Type: agentic-system-analyses/types/agentic-system-memory-report.md

Boundary and evidence

The boundary is the shipped knowledge-state loop, including CLI, registered MCP tools, REST/embedded callers, maintenance, graph operations, instructions, restoration and evaluators. Memory here includes accumulated files and database content that later invocations consume, not just objects in the package called memory. Provider-internal state and enclosing agents' histories remain outside the frozen repository. SRC-1 is the repository and commit registered in boundary.md; its full revision is repeated above.

Direct inspection added SRC-1 implementation coverage in internal/linter/learning.go, internal/compiler/summarize.go, internal/compiler/write.go, internal/compiler/curate.go, internal/compiler/evidence_gate.go, internal/compiler/communities.go, internal/compiler/resolve_entities.go, internal/ontology/aliases.go, internal/query/globalqa.go, internal/query/graphqa.go, internal/mcp/tools_graph.go, internal/mcp/server.go, internal/scribe/session.go, internal/trust/source_check.go, internal/trust/promote.go, source-removal code in internal/compiler/pipeline.go, and retrieval-fusion code in internal/search/pipeline.go. Searches additionally checked production learning-store callers, CLI dispatch, triple evidence validation, graph admission and vector serialization. The write-article template supplies doctrine/design evidence. Runtime findings cited below are supplied findings, not claimed fresh reads of every cited file. No observed run or causal experiment was supplied or performed.

Coverage inventory

“Direct” means source inspected in this job; “supplied” means the runtime/boundary account supplies the identified finding. Included unresolved paths remain in scope, not exclusions or access gaps.

Entry point or operation SRC-1 paths and inspection basis Records or unresolved limit
CLI/engine path, URL and reader ingestion; MCP/REST extraction capture cmd/sage-wiki/main.go, pkg/engine/methods.go, internal/mcp/tools_write.go; dispatch search plus supplied producer tracing RT-RTE-capture-source, RT-RTE-capture-knowledge, MEM-OBJ-raw-sources. Parser/network internals not fully inspected; no universal capture fidelity claim.
CLI, worker, compound tool and on-demand compile; summary reuse and article update internal/compiler/pipeline.go, internal/compiler/worker_cycle.go, internal/compiler/ondemand.go, internal/compiler/fullpipeline.go; supplied orchestration plus direct selected transformations RT-RTE-compile-sources, MEM-OBJ-summaries, MEM-OBJ-articles. Batch checkpoints/provider resume are included but uninspected beyond supplied seam; no identical checkpoint or batch-consumer guarantee.
Curation, evidence-count gating, body cleanup, quality retry, orphan pruning internal/compiler/curate.go, internal/compiler/evidence_gate.go, internal/compiler/write.go, internal/compiler/fullpipeline.go, internal/compiler/pipeline.go; direct except supplied quality sequence MEM-OBJ-articles, MEM-OBJ-manifest; Write side below. Complete cleanup of every chunk/backend not established.
Direct summary/article writes and wiki_learn; CLI learn internal/mcp/tools_write.go, cmd/sage-wiki/learn.go, internal/linter/learning.go; supplied write route, direct store and caller search RT-RTE-write-article, MEM-OBJ-learnings. Generic caller is not identified as human.
Session JSONL scribe cmd/sage-wiki/main.go, internal/scribe/session.go; direct RT-RTE-scribe-session, MEM-OBJ-entities. No automatic host-session hook established.
Triple extraction, temporal supersession, entity resolution/rejection/unlink internal/compiler/extract_triples.go, internal/compiler/resolve_entities.go, internal/ontology/aliases.go, cmd/sage-wiki/ontology_resolve.go; searches plus direct resolution and unlink sections MEM-OBJ-relations, MEM-OBJ-entity-aliases, MEM-RTE-resolve-aliases. Full temporal aggregation/backend equivalence remains uninspected.
Community detection, summary caching and artifact deletion internal/compiler/communities.go, internal/ontology/community.go; direct pass, store inventory/search MEM-OBJ-communities, MEM-RTE-global-query. Cache content-freshness limit retained below.
Search, explicit full read, ontology traverse, list and provenance internal/mcp/server.go, internal/search/pipeline.go, internal/search/graphleg.go; direct selected sections/search plus supplied engine/hub route RT-RTE-search-wiki, MEM-OBJ-entries, MEM-OBJ-vectors. Full REST/client/UI transport parity not inspected.
Native document Q&A and answer saving/admission/withdrawal internal/query/query.go, internal/trust/promote.go, internal/trust/source_check.go, internal/trust/hooks.go; direct context/deindex code plus supplied trust sequence RT-RTE-query-answer, RT-RTE-admit-output, MEM-OBJ-pending-outputs. Full agreement/grounding scoring uninspected.
Registered local/global graph Q&A internal/mcp/tools_graph.go, internal/query/graphqa.go, internal/query/globalqa.go; direct MEM-RTE-graph-query, MEM-RTE-global-query. Additional to supplied document-Q&A route.
Lint evaluation and optional file repair internal/linter/runner.go, internal/linter/passes.go, cmd/sage-wiki/main.go; bounded searches and supplied boundary Evaluation/report/fix capability included. Full pass bodies and later report consumers uninspected; no automatic lint-to-learning update concluded.
Packs, generated skills, parsers, federation and restore internal/pack/merge.go, internal/skill/packs/base.md.tmpl, internal/extract/external.go, internal/hub/search.go, internal/mirror/hydrate.go; supplied findings RT-RTE-apply-pack, RT-BAP-generated-skill, RT-RTE-run-parser, RT-RTE-hydrate-workspace. Full pack removal, WAL replay and external host loading unknown.
Shipped examples and benchmark consumers examples/langgraph/main.py, examples/embed/main.go, examples/vercel-ai-sdk/main.ts, eval/benchmarks/common/sagewiki.py, eval/benchmarks/locomo/run.py; supplied boundary plus backend searches Documented/shipped caller roles, not deployed activation. Other benchmark drivers, retained scores, golden fixtures and evaluation validity uninspected; no measured benefit claim.
Storage variants and opaque providers internal/storage/db.go, internal/vectors/store.go, internal/storage/postgres/, pkg/provider/provider.go; bounded schema search plus supplied provider records MEM-OBJ-vectors, RT-CMP-llm-client, RT-CMP-embedder. PostgreSQL/ANN/mmap internals not fully inspected; provider weights and deployment configuration inaccessible here.

Core ideas

  1. Several retained representations have different consumers. Raw captures can be recompiled; summaries drive concept extraction and resume; articles supply prose context; graph edges supply bounded graph answers; community summaries supply a separate map/reduce answerer. Search vectors select content but are not readable reasons. The learning-entry table is another store, not evidence that articles automatically consume past lessons. Records below separate these units.
  2. Read-back is ordinarily request-led. A query supplies targeting inputs; software retrieves and can automatically add graph neighbors within that request. A search result may be a truncated display with a full-read pointer. This is not unsolicited background insertion into a host agent's context. Generated host instructions request that agents search and capture, but actual loading and compliance remain external. See RT-BAP-generated-skill and the query annotations below.
  3. Admission is route-local. Compiler evidence-count and cleanup rules, model-guided curation, caller-authored writes, transcript extraction, alias arbitration and output trust do not share one semantic review gate. A trust-confirmed answer is eligible evidence at certain consumers, not certified truth or a global access-control status. See RT-RTE-admit-output.
  4. Context reduction need not be memory learning. Summarization creates reusable derived content; per-call prefix/section selection merely controls current input. Scribing is a trace-fed durable graph update, but a changed definition does not demonstrate improved future capacity. The inspected routes establish storage and delivery wiring, not behavioral activation or benefit.

Shared records

Components

none declared in this member

Operative objects

MEM-OBJ-raw-sources

Label: Raw source files and captures

Identity: project source files, including capture markdown under raw/captures. Natural-language bodies coexist with symbolic frontmatter/path identities on the filesystem. Lineage varies: caller bytes, URL/path extraction, or model-decomposed conversation/text candidates; the latter are already derived, despite the directory name “raw.” Consumer: later compiler scans/extraction and indexed retrieval, not an automatic host replay. Admission and retention limits are supplied by RT-RTE-capture-source and RT-RTE-capture-knowledge, whose quotes support reader validation and raw fallback. No supplied object counterpart; these are retained inputs of both routes, not either route itself. SRC-1: pkg/engine/methods.go, internal/mcp/tools_write.go.

MEM-OBJ-summaries

Label: Compiled source summaries

Identity: SummaryResult.Summary and files under the output summaries directory. Natural-language derived source accounts plus symbolic source-hash/frontmatter, stored as markdown and indexed entries. Summarization can process one source directly, or chunk and hierarchically reduce it. Later extraction uses successful summaries; interrupted work can reread a persisted summary when its body is at least 100 bytes and source hash matches. Reuse is not evidence of rechecking every claim. Distinct from MEM-OBJ-raw-sources and article outputs; no supplied object counterpart. SRC-1: internal/compiler/summarize.go, internal/compiler/fullpipeline.go.

if len(body) >= 100 && storedHash != "" && storedHash == info.Hash { --- internal/compiler/summarize.go

The summary is a persisted compression result with source lineage, not the provider's hidden processing or an intact reasoning trace. Manual summary writing is an alternate authorship path, RT-RTE-write-article.

MEM-OBJ-articles

Label: Concept articles

Identity: output concepts/<name>.md, natural-language prose plus code-built symbolic frontmatter/source lists. Filesystem is the primary readable substrate; entries, chunks, vectors and graph material are derived consumers/representations, separately declared below. Existing article text is read into later article-writing calls; selected source sections and related concept identities also guide generation. Direct caller writes bypass model generation. No supplied object counterpart; produced by RT-RTE-compile-sources and RT-RTE-write-article. SRC-1: internal/compiler/write.go, internal/mcp/tools_write.go.

ExistingArticle: existingContent, --- internal/compiler/write.go

Existing article (update/expand):

{{.ExistingArticle}} --- internal/prompts/templates/write_article.txt

Code strips outer fences, generated frontmatter, configured anti-pattern sentences and unsupported wikilinks before durable writing. Source paths and citation edges retain coarse lineage, not a complete derivation/rationale for each sentence. Retrieval gives prose evidential authority in native synthesis, not executable authority. At an external host the tool-result channel and host policy determine reliance. SRC-1: internal/compiler/write.go; RT-BAP-query-guidance.

MEM-OBJ-entries

Label: Search entries and chunks

Identity: document memory.Entry content/tags/article paths and chunk text/heading/document identities. Natural-language content is readable; IDs, tags, offsets/index positions and FTS rules are symbolic. Database tables/FTS indexes are substrates. Entries/chunks derive from retained source, summary, article, output or community text; they are neither learned model parameters nor necessarily the text eventually delivered by Q&A. Consumers include lexical/hybrid retrieval, ranking and tool-result displays. No supplied object counterpart; narrower retained objects used by RT-RTE-search-wiki. SRC-1: internal/memory/entries.go, internal/memory/chunks.go, internal/storage/db.go, internal/compiler/write.go.

Fusion uses weighted reciprocal ranks and carries the best chunk's identity/text for a document; a document-only leg falls back to entry content. Native document Q&A instead rereads article files after retrieval. Consequently a selected chunk identifier is access/provenance metadata, not proof its exact content reached synthesis. SRC-1: internal/search/pipeline.go, internal/query/query.go.

// Collect chunk IDs for trust independence scoring --- internal/query/query.go

MEM-OBJ-vectors

Label: Document and chunk vectors

Identity: vec_entries / vec_chunks embeddings keyed by document/chunk. Dense float arrays are distributed-parametric representations, stored as encoded BLOBs in inspected SQLite code; IDs/dimensions are symbolic metadata. They derive from embedding provider calls over retained text and guide similarity search. They are numerical selector inputs, not readable source claims or reasons. Distinct from the external model RT-CMP-embedder, whose exact weights/version and operational mutation remain uninspected. No supplied retained-vector object counterpart. SRC-1: internal/vectors/store.go, internal/storage/db.go, internal/compiler/write.go.

// Store manages vector embeddings as BLOBs in SQLite. --- internal/vectors/store.go

Stored dimensions do not establish immutable embedding-model provenance or interchangeability. ANN/mmap/PostgreSQL alternatives remain included but insufficiently inspected for equivalent invalidation and durability conclusions.

MEM-OBJ-manifest

Label: Manifest source and concept lineage

Identity: workspace .manifest.json, symbolic source/concept/path/hash associations on disk. Compiler diff, source removal, concept merging and MCP provenance use it. It differs from queue/pass/lease state RT-OBJ-compile-items: one retains source-to-knowledge associations, the other scheduling/progress. No supplied object counterpart. SRC-1: internal/compiler/pipeline.go, internal/compiler/evidence_gate.go, internal/compiler/curate.go, internal/mcp/server.go.

sources := mf.SourcesForArticle(article) --- internal/mcp/server.go

Folds union source lists and aliases; removals alter associations or defer them pending prune. The manifest can answer provenance queries but is not a per-claim justification store. File/index/manifest ordering is not one transaction, as RT-RTE-compile-sources already qualifies.

MEM-OBJ-entities

Label: Ontology entities and definitions

Identity: ontology entity rows with ID/type/name/definition/article path and dates. Symbolic identity/type/path fields and natural-language definitions share database rows but have different consumption: canonical identity/traversal versus readable domain description. Model concept/triple extraction, scribe and caller writes contribute; origin is not uniformly a conversation trace. Graph tools return structured entities, and article-bearing entities can supply file paths to Q&A. A newly scribed entity does not thereby acquire an article path. No supplied object counterpart; RT-RTE-scribe-session produces a subset. SRC-1: internal/scribe/session.go, internal/ontology/ontology.go, internal/mcp/server.go.

entity := ontology.Entity{ ID: c.ID, Type: c.Type, Name: c.Name, Definition: c.Definition, CreatedAt: c.UpdatedAt, UpdatedAt: c.UpdatedAt, } --- internal/scribe/session.go

The graph-search leg requires an article path to surface an entity as a document hit (SRC-1: internal/search/graphleg.go); explicit ontology traversal instead serializes entity data. This bounds any claim that all scribed knowledge automatically enters native prose Q&A.

MEM-OBJ-relations

Label: Base and derived graph relations

Identity: ontology relations and alias-derived relations. Symbolic typed endpoints/validity/source-document fields combine with natural-language evidence spans and numerical confidence. Database storage retains source linkage; triple evidence is a quote from a compiled summary, not automatically raw-source verification. Scribe and wikilink-pattern relations have different lineage and need not carry equivalent evidence. No supplied object counterpart. SRC-1: internal/compiler/extract_triples.go, internal/compiler/write.go, internal/scribe/session.go, internal/ontology/aliases.go.

// verifyEvidenceSpans drops relations whose Evidence is not present in the --- internal/compiler/extract_triples.go

The inspected triple-pass seam checks occurrence in its resolved source body before persistence; occurrence is not entailment. Functional supersession invalidates prior edges, while time-aware traversal can select valid edges. Derived alias edges are separately removable/rebuildable rather than destructive renaming of base entities. Consumers are graph traversal/serialization, community generation and graph-aware retrieval. Their channels differ from article prose consumption; see MEM-RTE-graph-query and MEM-RTE-global-query.

MEM-OBJ-entity-aliases

Label: Entity alias decisions and rejection memory

Identity: entity_aliases rows with alias/canonical/status, confidence, reason, source and decision metadata. Symbolic accepted/rejected/pending identity rules plus natural-language model rationale live in the database. The rows guide later canonical lookup, resolution candidate suppression and derived-edge replay. Reasons are retained and displayed by CLI review, but the inspected rejection selector consumes pair/status, not an interpretation of the reason prose. Distinct from raw domain relations and manifest spelling aliases; no supplied object counterpart. SRC-1: internal/ontology/aliases.go, internal/compiler/resolve_entities.go, cmd/sage-wiki/ontology_resolve.go.

// Only 'applied' rows are followed. A 'pending' row is an UN-APPROVED proposal: --- internal/ontology/aliases.go

// Rejection, not deletion of the alias row: the audit trail is what // keeps the pair from being re-proposed, and putAliasTx's rejected-row // guard depends on it existing. --- internal/ontology/aliases.go

This is retained decision authority at a software consumer, not mere storage of proposed prose. MEM-RTE-resolve-aliases traces admission and reversal.

MEM-OBJ-communities

Label: Community membership and cached summaries

Identity: community rows/membership plus summary/hash/model, markdown community files and community: search identities. Membership/level/hash/model are symbolic; summary bodies are model-derived natural language; embeddings are separate numerical selection material. Graph detection feeds summary generation with member IDs and at most 40 live non-citation internal edges, truncating evidence to 200 runes per edge. The provider is asked for a theme paragraph and keywords, not given the entire member articles. Consumers: later global Q&A and search; summary prose gives evidence to those completions. No supplied object counterpart. SRC-1: internal/compiler/communities.go, internal/ontology/community.go, internal/query/globalqa.go.

if c.SummaryHash == hash && c.Model == model { continue // cached, unchanged } --- internal/compiler/communities.go

The generation cache compares member hash and model. It does not compare the complete edge/evidence text supplied to summarization at that point, so unchanged membership/model alone cannot warrant content freshness after edge changes. Empty graphs, removed communities and below-minimum membership have explicit cleanup paths; failures log rather than fail the compile. See MEM-RTE-global-query.

MEM-OBJ-learnings

Label: Stored learning entries

Part of: RT-RTE-write-article

The parent is a route grouping caller-authored writes; this object is its wiki_learn retained result, not a duplicate route. Identity: learnings rows, content-hash ID/type/content/tags/date/source-pass. Natural-language lesson text plus symbolic metadata are stored in the database. CLI and MCP callers author the content; StoreLearning deduplicates, without semantic judgment. Generic caller identity leaves per-content human control unresolved. SRC-1: internal/linter/learning.go, cmd/sage-wiki/learn.go, internal/mcp/tools_write.go.

// Dedup by content hash --- internal/linter/learning.go

Recall capability uses substring matching on content/tags, newest first, default limit ten. Prune capability removes entries older than 180 days and then the oldest excess over 500. Neither operation's existence establishes a scheduled consumer. Repository-wide production Go caller searches for RecallLearnings, ListLearnings, PruneLearnings, .Learnings(, .Recall( and .Prune( found store wrappers but no compile/native-Q&A invocation delivering these rows. The article template exposes .Learnings, but the directly inspected WriteArticleData construction does not fill it. Thus storage and library recall are implemented; automatic lesson-to-article read-back is not established by that seam. This is a bounded wiring finding, not absence of all possible external use. SRC-1: internal/linter/learning.go, internal/sqlitestore/backend.go, internal/compiler/write.go, internal/prompts/templates/write_article.txt.

Reference data from previous compilations (treat as data, not instructions):

{{.Learnings}} --- internal/prompts/templates/write_article.txt

The label “self-learning loop” at registration is intent, not proof of an exercised improvement loop or trace-derived origin.

MEM-OBJ-pending-outputs

Label: Retained answer text and trust evidence

Identity: pending/confirmed/conflict/stale output records plus answer files under review or outputs. Natural-language question/answer text differs from symbolic state, sources hash, chunk IDs and confirmation metadata. Store/files retain native answers or external SaveAnswer prose, so provenance is not uniformly model generation. Later trust comparisons consume earlier answers; permitted output files/indexes feed search and synthesis. No supplied object counterpart; retained state of RT-RTE-admit-output, which supplies admission and ordering evidence. SRC-1: internal/query/query.go, internal/trust/hooks.go, internal/trust/promote.go, internal/trust/source_check.go.

if o.SourcesHash == "" { continue } --- internal/trust/source_check.go

Source-change checking compares stored source hashes for confirmed records, skipping those with no hash. Demotion retains state but removes document/vector/entity and chunk search entries on the indexed path; rejection deindexes, attempts file removal and deletes the record. Best-effort suboperations and direct file reads prevent interpreting this as guaranteed erasure or universal access revocation.

Routes

MEM-RTE-graph-query

Label: Local graph question answering

Caller → registered wiki_graph_query local branch → hybrid seed search → bounded serialized graph → structured completion → cited-edge result. Software owns selection and progression; model proposes the answer and citation integers. Distinct from RT-RTE-query-answer: this consumes edge text/evidence, not article prefixes, and the inspected handler does not auto-file the result. SRC-1: internal/mcp/tools_graph.go, internal/query/graphqa.go.

  • implementation conclusion status: wired
  • operation conclusion status: uninspected
  • Immediate return: Answer, seeds, truncation flag and validated cited-edge metadata, or no-seed/no-edge response/error.
  • Later read-back: Persisted graph edges are selected on later questions; this function's result is not persisted by the inspected handler.
  • Delegated visibility: Completion receives wrapped question and serialized subgraph, not the original transcript or full workspace; no delegated agent loop.
  • Selection predicate: Hybrid top-five seed results, configured/per-call bounded hops and max edges; optional as_of selects historical validity when enabled.
  • Invalidation or expiry: Each new request consults graph state and validity; previously delivered answers are not recalled.
  • Activation or effect: Retained edge evidence reaches a synthesis invocation; subsequent real reliance and benefit remain unobserved.
  • Evidence limits: Citation-index validation does not establish that answer prose follows from those edges; full serializer/store equivalence is uninspected.

sg, err := graph.SerializeSubgraph(ont, seeds, graph.SubgraphOpts{MaxHops: hops, MaxEdges: maxEdges, AsOf: opts.AsOf}) --- internal/query/graphqa.go

No knowledge update is admitted here. Open caller questions, no expected-answer oracle; out-of-range citation integers are dropped by code. Default resolved bounds are two hops and 60 edges; model output uses 2,000 max tokens. Retrieval/serialization and output budget are distinct controls. SRC-1: internal/query/graphqa.go.

MEM-RTE-global-query

Label: Community summary question answering

Caller → wiki_graph_query global branch → summarized-community selection → per-community map completions → relevant partials → reduce completion → answer/citations. Software owns level selection and progression; models propose partial/reduced text. Distinct from RT-RTE-query-answer and MEM-RTE-graph-query; the inspected handler does not file this result. SRC-1: internal/mcp/tools_graph.go, internal/query/globalqa.go.

  • implementation conclusion status: wired
  • operation conclusion status: uninspected
  • Immediate return: Synthesized answer and community-level citations/selected level, a no-coverage answer or error.
  • Later read-back: Later invocations load stored community summaries; map/reduce partials are invocation-local, not retained memory here.
  • Delegated visibility: Each map completion gets the question and one summary; the reduce completion gets nonempty non-IRRELEVANT partials, not the full original graph or articles.
  • Selection predicate: Highest level with at least two eligible summarized communities, else highest level with one; hybrid over-fetch max(20, four times maximum communities), intersection with eligible level/membership, then cap. Defaults are eight selected communities and three minimum members.
  • Invalidation or expiry: Fresh selection uses current community rows; producer cleanup removes invalid artifacts, while member/model cache reuse can retain stale prose after edge-only changes.
  • Activation or effect: Community summaries become completion evidence; actual answer correctness, deployment activation and benefit unobserved.
  • Evidence limits: Community-level citations and hashes do not expose per-sentence raw-source grounding. Budget bounds counts/output tokens, not an exact total input-token ceiling.

// Reduce: synthesize from non-IRRELEVANT partials. --- internal/query/globalqa.go

The function body of pickLevel, rather than its caller's older comment, establishes the one-summary fallback above. Global mode rejects as_of and requires enabled communities. It is an open question route, without reference-answer oracle or content admission. Per-call parallelism is bounded; separate frames keep other community summaries out of each map call. Return values cross into reduce and then the tool caller, not an internally managed conversational history. SRC-1: internal/query/globalqa.go, internal/mcp/tools_graph.go.

MEM-RTE-resolve-aliases

Label: Resolve retain and reverse aliases

Compile-end/re-extract resolution → replay existing approved aliases → blocking/arbitration over touched entities → guarded apply or pending rows → later canonical lookup/replay/review. CLI apply/reject/unlink are alternate controls. Model proposes same-referent clusters and reasons; code admits under thresholds, description and identity/rejection guards. Caller-directed review can decide individual proposals, but caller identity is not proof of a human action. No supplied counterpart: this graph-identity maintenance is a material distinct suboperation, not the generic source-compilation progression. SRC-1: internal/compiler/resolve_entities.go, internal/ontology/aliases.go, cmd/sage-wiki/ontology_resolve.go.

  • implementation conclusion status: wired
  • operation conclusion status: uninspected
  • Immediate return: Resolution counters/logs or CLI review/apply/reject/unlink result; persisted applied/pending/rejected rows.
  • Later read-back: Applied rows drive canonical identity and edge replay in later invocations; rejected/pending pairs constrain future candidate formation and arbitration; CLI review displays retained reasons.
  • Delegated visibility: Arbitration receives selected candidate blocks, not arbitrary tool authority; replay and unlink are local database operations.
  • Selection predicate: Touched/resolvable seeds, token/vector blocking and rejection/active-alias indexes; configured auto-apply threshold and description requirement, with threshold 1.0 forcing review-only.
  • Invalidation or expiry: Unlink deletes alias-owned derived edges and retains rejected pair; replay rebuilds derived state from approved links. Base relations/entities are not wholesale renamed away.
  • Activation or effect: Retained alias decisions alter subsequent canonicalization, candidate eligibility and graph edges; observed retrieval/answer effects remain uninspected.
  • Evidence limits: Store-level unlink is narrower than complete transitive recovery; CLI sweep and full backend semantics not audited end-to-end. Reasons' display is not model reuse of their argument.

sweepAliases(ctx, ont) --- internal/compiler/resolve_entities.go:660-660

if threshold >= 1.0 { return false } --- internal/compiler/resolve_entities.go

Replay runs before the enabled/new-arbitration gate, so disabling new resolution does not necessarily stop maintenance of already-approved aliases. If rejection-index loading fails, new arbitration is abandoned rather than treating rejection memory as empty. Rejection/unlink veto later proposals; this is retained constraint memory, not an expected-answer oracle. Installed resolver guidance and cluster inputs shape proposals, and model reasons/decision metadata persist. Open maintenance, not a bounded learning curriculum. SRC-1: internal/compiler/resolve_entities.go, internal/ontology/aliases.go.

Claims

none declared in this member

Evidenced absences

none declared in this member

Behavioral-authority paths

none declared in this member

Annotations

On RT-RTE-scribe-session

Trace origin is mixed user/assistant conversation text, not tool evidence or hidden reasoning. Code removes non-JSON lines, thinking/tool types and non-text blocks; it strips inline thinking tags, caps extracted input at 50,000 bytes without splitting UTF-8, then caps candidates at ten. A completion proposes domain entities; kebab-case/difference checks and database writes are software admission, without per-entity human approval. The original transcript remains an external input; the persisted output is definitions/relations, not a durable compressed chat checkpoint created by this route. SRC-1: internal/scribe/session.go.

// Keep user and assistant text messages --- internal/scribe/session.go

Later wiki_ontology_query serializes traversed entity data, providing a concrete read-back consumer for definitions; article-oriented graph search excludes pathless entities. Thus the trace → filtered text → entity definition → later ontology tool-result chain is wired, while general prose-Q&A activation is not established. Definition overwrite retains no old-definition reasoning/history in the inspected scribe path. SRC-1: internal/scribe/session.go, internal/mcp/server.go, internal/search/graphleg.go; MEM-OBJ-entities.

On RT-RTE-query-answer

The request-driven selector consumes the question, stores, configured topK/weights/expansion/reranking and graph state. Delivery uses article prefixes rather than verbatim best chunks. Each article is capped at 16,000 bytes; estimated tokens are bytes divided by four with default context budget 8,000 when unset in the builder. The first over-budget article breaks that loop; graph-related and fallback-neighbor loops use the remaining budget. Files outside the window remain reachable by a fresh search/read; no conversational eviction checkpoint is created here. SRC-1: internal/query/query.go.

contentTokens := len(content) / 4 if tokensUsed+contentTokens > tokenBudget { break } --- internal/query/query.go:338-341

The supplied runtime already notes chunk IDs are collected before filtering/budgeting. A further provenance limit is that fallback-neighbor content is appended without appending its path to the returned sources slice in this inspected builder, unlike primary/graph-expanded articles. Returned sources therefore need not enumerate every article actually delivered to synthesis; that limits output source-hash completeness. This does not prove every invocation omits a source. SRC-1: internal/query/query.go; MEM-OBJ-pending-outputs.

On RT-RTE-search-wiki

Search results can be capped on rune boundaries and include a marker requesting wiki_read(path) for full text. This leaves retained content outside the current tool result with an explicit reload route; caller decides whether to invoke it. Direct read returns file bytes after lexical containment, not the search eligibility predicate. The ontology-query tool canonicalizes the requested entity and serializes traversed rows; list returns a smaller display (ID/type/name/path), not all definitions; provenance reads manifest associations. SRC-1: internal/mcp/server.go.

marker += fmt.Sprintf("; call wiki_read(%q) for the full text", articlePath) --- internal/mcp/server.go

These are requested retrieval/display routes, not evidence of host adoption or spontaneous memory injection. The graph search leg's path requirement means a retained definition can be accessible to explicit ontology traversal while absent from document hits. SRC-1: internal/search/graphleg.go.

On RT-RTE-compile-sources

Later article writing rereads existing prose and relevant source sections. Section selection uses concept name/formatted name/aliases, first-section fallback, 4,000-byte part truncation, relevance sorting and an estimated source budget; it always keeps the first ranked part even if over budget. The whole existing article is a separate prompt input, so the source-context budget is not a hard ceiling on the complete prompt. SRC-1: internal/compiler/write.go.

// Always keep the highest-ranked part, even if it exceeds budget. --- internal/compiler/write.go

The frame analogy fits independent summary/extract/write completions with selected inputs and returned candidates. It breaks as a memory-lifetime model: persisted summaries/articles remain externally reachable values, not references retained inside a model window. On resume, disk summaries and symbolic queue/pass state are distinct checkpoint forms; provider-native batch checkpoints remain uninspected beyond the supplied runtime seam.

Write side

Acquisition and distinct admission controls

Source capture admits caller-supplied data under structural rules; MCP capture instead asks a model to decompose text, then structurally checks candidates with raw fallback. Neither establishes the truth of retained content or mandatory human review. Their exact ownership and fallback are retained in RT-RTE-capture-source and RT-RTE-capture-knowledge.

Compilation performs automatic transformations of MEM-OBJ-raw-sources through MEM-OBJ-summaries to MEM-OBJ-articles. Count-based evidence gating checks declared source count, not source entailment; minSources <= 0 disables it. LLM curation replaces embedding dedup when selected, proposing keep/fold/drop. Missing/unknown actions and unresolved fold targets keep content; destructive drops require allow_drop, and name guards can veto folds. Reasons are logged; source/alias unions persist in the manifest. This is not a stored criticism-to-later-reasoning chain merely because an action has a reason field. SRC-1: internal/compiler/evidence_gate.go, internal/compiler/curate.go.

// - drops need llm_dedup.allow_drop (destructive otherwise; logged as // unapplied proposals) --- internal/compiler/curate.go

Quality evaluation can cause a fresh rewrite after deleting the existing article. Its score persists on compile items and influences later scheduling, but the supplied route shows a still-low article may ship; scores are not an answer oracle or semantic approval. Deletion before retry also means a failed rewrite need not preserve the old file. These findings and passages are supplied in RT-RTE-compile-sources. The retained reasons for individual model-written article claims are not reconstructed by a combined score.

Manual article/summary writes and learning-entry writes have caller authorship and software structural veto, not compiler-generation or output-trust approval. Session scribe instead automatically selects model candidates from filtered conversation traces and overwrites differing definitions without individual review. These admission differences survive the shared “knowledge” label. See RT-RTE-write-article, MEM-OBJ-learnings, and the scribe annotation. Unknown user content/initialization does not suppress the known later transformations.

Maintenance, rejection and withdrawal

Source removal with prune=false defers all mutations for a source that would leave a sole-source orphan. With pruning enabled the inspected handler removes orphan article, document/vector/entity entries and manifest concept; for multi-source concepts it removes the association. The background path uses no-prune behavior as supplied in runtime. File/index mutations are not one transaction and full chunk cleanup in this handler is not established. SRC-1: internal/compiler/pipeline.go, internal/compiler/worker_cycle.go; MEM-OBJ-manifest.

if !prune && hasSoleSourceOrphan(mf, removedPath) { --- internal/compiler/pipeline.go

Alias rejection is retained as a constraint on later arbitration rather than merely disappearing. Unlink removes derived edges and marks rejection; replay rebuilds from surviving approved links. MEM-RTE-resolve-aliases separates this from source pruning and from pending knowledge admission. Triple occurrence checks and temporal invalidation are scoped to MEM-OBJ-relations, not universal article verification.

Community cleanup explicitly removes stale search/file artifacts after membership replacement, clears stored below-minimum summaries, sweeps orphan files and retries failed summaries on later compiles. The cache's member/model comparison does not track all changed summary inputs; MEM-OBJ-communities retains that limit. SRC-1: internal/compiler/communities.go.

Output demotion changes later eligibility and removes retrieval entries while retaining the output record; rejection attempts stronger file/record removal. Confirmed source-hash checks can demote outputs when a recorded source changes, but missing hashes are skipped, and returned-source omissions limit the recorded dependency set. These are local controls, not revocation of already delivered material or universal filesystem prohibition. SRC-1: internal/trust/source_check.go, internal/trust/promote.go, internal/query/query.go; RT-RTE-admit-output.

Packs/direct prompt edits and restore admit retained machinery/state on different grounds: validation/config selection or byte integrity, not semantic review of every restored assertion. Their rollback and external-deployment limits are supplied in RT-RTE-apply-pack and RT-RTE-hydrate-workspace. No automatic trace-to-method-prompt update is inferred.

Read-back

There are several concrete later consumers, not one “memory retrieval” operation:

  • Article/source retrieval returns ranked entry/chunk text or explicitly requested file text to external callers. Display truncation leaves a full-read pointer. The host determines use and instruction precedence. RT-RTE-search-wiki and its annotation establish request, selection and delivery separately.
  • Native Q&A software selects retrieved IDs, rereads permitted article prefixes, adds graph-related files and delivers the assembled body to one synthesis completion. That is automatically expanded evidence within a requested answer, not unsolicited host-context supply. Budget/provenance limitations remain beside the query annotation.
  • Local graph Q&A selects seeds and bounded temporal edge text, not full article prose. It validates citation indices but cannot certify semantic support. MEM-RTE-graph-query.
  • Global graph Q&A selects cached community summaries; independent map contexts produce partials and reduce receives only accepted partials. Original articles remain out of those windows. MEM-RTE-global-query.
  • Later compilation reads saved summaries and existing articles, and scheduling code reads hashes/progress/scores. This is retained state affecting later computation even when nothing is delivered to an enclosing agent. MEM-OBJ-summaries, MEM-OBJ-articles, RT-OBJ-compile-items.
  • Alias selection/replay consumes applied/rejected/pending rows; CLI review reads model reasons. Ontology traversal can expose scribed definitions even without article files. MEM-RTE-resolve-aliases and the scribe annotation.
  • Stored answers feed later trust comparisons and, when policy permits, later search/Q&A. This is recurring-answer agreement, not independent reference-answer verification. MEM-OBJ-pending-outputs, RT-RTE-admit-output.
  • Learning recall/prune APIs and a template slot are capabilities without an inspected production consumer chain into native generation. Do not convert their storage into demonstrated later consumption. MEM-OBJ-learnings.

The shipped examples/evaluators establish additional caller roles only at source level: session markdown → compile → search in the benchmark backend, and externally scheduled answer/judge calls in LOCOMO. Generated instructions request search-before-work and capture-after-work. Neither source code nor a metric label establishes deployed compliance or causal memory benefit. SRC-1: eval/benchmarks/common/sagewiki.py, eval/benchmarks/locomo/run.py, examples/langgraph/main.py, internal/skill/packs/base.md.tmpl; supplied evidence in boundary.md and RT-BAP-generated-skill.

Integration issues

  1. Additional answer routes, not a correction to document Q&A. MEM-RTE-graph-query and MEM-RTE-global-query are registered shipped consumers absent from the supplied runtime's detailed route ledger. They must not be merged into RT-RTE-query-answer: selected objects, budgets, returned provenance and lack of inspected auto-filing differ. Evidence: SRC-1 internal/mcp/tools_graph.go, internal/query/graphqa.go, internal/query/globalqa.go.
  2. Resolve the supplied learning-consumer uncertainty locally. RT-RTE-write-article leaves learning consumers untraced. MEM-OBJ-learnings supports storage/recall capability but finds no native production caller filling the template in the bounded searches. Do not interpret “available to later configured consumers” as a wired native delivery claim. External library use and PostgreSQL/backend parity remain unresolved. Evidence: SRC-1 internal/compiler/write.go, internal/prompts/templates/write_article.txt, internal/linter/learning.go, internal/sqlitestore/backend.go.
  3. Answer provenance is narrower than model-visible context. In addition to the supplied pre-budget chunk-ID issue, the directly inspected enhanced builder's fallback neighbors are not appended to returned source paths. Consequently MEM-OBJ-pending-outputs dependency hashes cannot be assumed complete for everything synthesis saw. This qualifies, rather than contradicts, RT-RTE-query-answer and source-change protection in RT-RTE-admit-output. Evidence: SRC-1 internal/query/query.go, internal/trust/source_check.go.
  4. Community freshness and level comments. MEM-OBJ-communities records membership/model-based cache reuse, leaving edge-only freshness unguaranteed. MEM-RTE-global-query follows pickLevel's implemented highest-single-summary fallback, not the older caller comment implying only level-zero fallback. Evidence: SRC-1 internal/compiler/communities.go, internal/query/globalqa.go.
  5. Scribe delivery is consumer-specific. Added explicit ontology-tool read-back qualifies the supplied unresolved graph-consumer account in RT-RTE-scribe-session. MEM-OBJ-entities does not establish that new pathless definitions enter article Q&A. Evidence: SRC-1 internal/scribe/session.go, internal/mcp/server.go, internal/search/graphleg.go.
  6. Identity comparison and unresolved scope. All new objects are retained parts/results absent as objects from the supplied runtime; their related routes/components are cited at declaration. The learning object has an explicit route-parent relation; none is intended to replace a supplied record. Alias resolution is distinct maintenance, not a duplicate of generic compilation. No possible duplicate remains identified after that comparison. Included batch checkpoints, full lint/report consumption, full backend/restore/federation parity, and other evaluator drivers remain unresolved as enumerated in coverage; they prevent system-wide cleanup, checkpoint equivalence, provenance completeness and benefit conclusions, not the bounded positive routes above.

Limitations and checks

The checkout HEAD was rechecked as d3ef3a1346405c82eac01b4d7c493c94c1c59169, with clean status. All new source inspection stays under SRC-1; no new source identity, live documentation or target execution was admitted. Invocation, member types, collection, worker rules and shared records contract were read completely, recovering range endings. Method identity is the supplied instruction/type files in this worktree; no independent method-commit value was supplied or inferred.

Source-supported countercases constrained strong claims: direct writes bypass compilation; rejected outputs remain reachable by explicit file read; pathless scribe entities differ from article hits; graph/global consumers bypass the document-context route; template presence does not wire learning recall; membership cache reuse does not check every edge input. No test execution, host compliance, learned-model mutation, improved future capacity, exercised self-improvement or causal benefit is concluded. No source access gap was encountered; uninspected available files remain limits, not absences.

Deterministic validation: the invocation's validate-output check passed after quotation-attribution repairs. It checks form, references, identity and quotation occurrence, not semantic acceptance or operation.