Skip to content

Deep review: evidence-first agent memory gaps for Sherlog #69

Description

@catoncat

Deep review: evidence-first agent memory gaps for Sherlog

This issue is the single umbrella for the June 26, 2026 deep review of Sherlog against the agent-memory framework in arXiv:2606.24775. It replaces the earlier generic roadmap wording with a code-aware review summary.

This is not a roadmap release and not a request to replace Sherlog's current architecture. The goal is to keep the issue tracker aligned with the current codebase and with executable next work.

Paper Lens

The review uses the paper's four-module framework:

  • Memory representation and storage
  • Memory extraction
  • Memory retrieval and query routing
  • Memory maintenance

It also uses the paper's five evaluation questions:

  • Overall effectiveness
  • Retrieval fidelity
  • Dynamic update robustness
  • Long-horizon stability
  • Operation cost

Current Sherlog Baseline

Sherlog is best understood as a local evidence locator for agent session logs, not a full autonomous memory bank. The implemented retrieval chain is:

status -> sync -> message/session recall -> heuristic rerank -> read-range/read-page

Local evidence:

  • AGENTS.md fixes the command surface to status, sync, find, read-range, read-page, list, and stats; it also says sync is the only writer and there is no watcher/daemon/realtime sync.
  • docs/ARCHITECTURE.md describes the current chain as message/session recall plus heuristic rerank, not a full resource-level reranker.
  • docs/INDEX_COVERAGE_DESIGN.md defines the key invariant: content answers come from the index, while raw sessions are used for inventory/sync planning.
  • src/db/schema.ts defines the session/message/FTS/coverage representation.
  • src/indexer.ts implements strict sync, snapshot checks, transactions, coverage writing, and optional prune.
  • src/query/search.ts, src/query/find.ts, and src/ranking.ts implement message/session FTS, CJK fallback, and heuristic session ranking.
  • src/query/read.ts exposes the raw transcript context through range/page reads.

What Is Already Solid

  • Representation and storage are strong for Sherlog's scope: sessions, messages, messages_fts, sessions_fts, and coverage preserve source-aware transcript evidence.
  • Extraction is intentionally conservative: Codex user/assistant event_msg records become messages; compact/reasoning material becomes session-level recall text.
  • Dynamic freshness is stronger than a plain append-only store: coverage, source fingerprints, file-set fingerprints, stale reasons, and recommended actions are implemented.
  • The design preserves raw transcript context instead of replacing it with generated memory facts.

Main Gaps

  • Public evidence-level eval is still too weak. eval/manual-eval-core.ts only checks title/summary, cwd, and snippet; eval/dogfood-eval-core.ts has stronger private predicates but they are not a shareable gate.
  • Session-level recall is implemented but evidence assembly is incomplete. src/query-session-fields.test.ts verifies matchSource = "session" and matchSeq = null; src/query/read.ts currently anchors precise ranges through message hits.
  • Query profile classification exists but is not actually used as a scoring/routing branch. src/query-profile.test.ts covers classification; src/ranking.ts documents that v3 scoring does not branch on broad/exact kind.
  • Source adapter hardening is partly implemented, especially for Claude Code, but parity/contract coverage still needs work.
  • Operation cost tracking exists in fragments, but not yet as a memory-systems RQ5 view across sync/find/read/source/freshness dimensions.

Linked Executable Work

Non-Goals For Now

  • Do not add vector/graph/heavy reranking before P0: Strengthen retrieval eval into an evidence-level acceptance gate #70 can catch retrieval regressions.
  • Do not add a new top-level command for evidence assembly; use the existing find surface if this work proceeds.
  • Do not replace raw transcript evidence with extracted facts or summaries.
  • Do not add watcher/daemon/realtime/implicit sync.

Trace

  • deep review request: cxs_deep_review_correction_20260626T040901Z_api_append
  • issue update request: cxs_update_issues_after_review_20260626T044426Z_api_append

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions