memory_scope_overview
Assess memory scope counts in one call at session start to decide whether to search memory and see pending curation or write confirmations.
Instructions
Cheap session-start hint: per-scope counts, no bodies / ids / summaries. Call once at the start of a conversation; if total is 0, skip memory_search for the rest of the session unless explicitly asked.
Returns {current_repo, current_cwd, auto_scope, scopes: {scope: count}, total, disabled_scopes, curation_pending, curation_pending_new_since_last_session, recently_removed_in_worktree, proposals_pending, pending_writes}. proposals_pending is the count of write-reflex proposals the Stop hook has captured awaiting review via memory_proposals (0 unless the opt-in [proposals] auto_propose is on). pending_writes is this session's staged writes awaiting memory_write_confirm/cancel — a dangling confirmation (silent 1h expiry). curation_pending is an integer-count rollup the model should branch on:
{stale, never_verified, drifted, cold, dead, silent_misses, unique_silent_miss_memories, cold_endorsement_memories, conflicts}
conflicts = contradiction pairs awaiting a memory_conflicts verdict. Any non-zero dead or drifted is a cue to suggest a curation pass when the conversation has time. Non-zero silent_misses / cold_endorsement_memories means the audit-turn telemetry has actionable backlog. silent_misses counts events; unique_silent_miss_memories counts the distinct memories those misses pointed at (dedup'd by top-hit id). Misses whose top-hit memory has been tombstoned are excluded from both counters. cold_endorsement_memories counts distinct memories (NOT turns) with retrieval_count >= N AND zero explicit applies — usually a sign the memory is over-surfaced or stale.
recently_removed_in_worktree is the integer count of tombstones removed in the trailing 7 days; under auto_scope=True it's filtered to this worktree (tombstones with no recorded worktree are excluded), under auto_scope=False it covers every tombstone in the window. Non-zero is a 'where did X go?' signal — material was deliberately trimmed here recently; don't blindly re-suggest it.
curation_pending_new_since_last_session is the same shape, filtered to events emitted and memories created since the previous session ended (not memories that aged into a bucket; an older record aging into stale between sessions stays visible only in the absolute curation_pending view — note this is distinct from the separate drifted bucket, which tracks working-tree drift). Branch on it when deciding whether to prompt about curation — non-zero means new rot since the last session, vs. the absolute view which persists until resolved. null on the very first session — fall back to curation_pending.
Default-scoped to the caller's current repository; memories with no origin always pass as global. Set auto_scope=False for the cross-project view. Counts respect session-disabled scopes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_scope | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||