Memory layers
Memory files, summaries, persisted state, and prompt-time memory loading.
45
Matched files
8
Top dirs
9,383
Lines in slice
175
Exports found
Heuristic
Classification style
Beginner explanation
This architecture page groups files that seem to solve the same type of problem. It is a good way to understand the repo as a system rather than as a list of folders.
Beginner mental model
Read the first few high-importance files here, then follow their related-file links.
Expert explanation
This slice is assembled with path heuristics, which makes it strong for navigation and code reading but not a replacement for runtime tracing. Use it to discover likely boundaries, then validate by reading imports, exports, and orchestrator files.
Related files
| File | Lines | Importance | Exports |
|---|---|---|---|
| services/teamMemorySync/index.ts | 1257 | high | SyncState, createSyncState, hashContent, batchDeltaByBytes |
| services/compact/sessionMemoryCompact.ts | 631 | high | SessionMemoryCompactConfig, DEFAULT_SM_COMPACT_CONFIG, setSessionMemoryCompactConfig, getSessionMemoryCompactConfig |
| services/extractMemories/extractMemories.ts | 616 | high | createAutoMemCanUseTool, initExtractMemories, executeExtractMemories, drainPendingExtraction |
| memdir/memdir.ts | 508 | high | ENTRYPOINT_NAME, MAX_ENTRYPOINT_LINES, MAX_ENTRYPOINT_BYTES, EntrypointTruncation |
| services/SessionMemory/sessionMemory.ts | 496 | high | resetLastMemoryMessageUuid, shouldExtractMemory, initSessionMemory, ManualExtractionResult |
| components/memory/MemoryFileSelector.tsx | 438 | high | MemoryFileSelector |
| services/teamMemorySync/watcher.ts | 388 | high | isPermanentFailure, startTeamMemoryWatcher, notifyTeamMemoryWrite, stopTeamMemoryWatcher |
| services/SessionMemory/prompts.ts | 325 | high | DEFAULT_SESSION_MEMORY_TEMPLATE, loadSessionMemoryTemplate, loadSessionMemoryPrompt, isSessionMemoryEmpty |
| services/teamMemorySync/secretScanner.ts | 325 | high | SecretMatch, scanForSecrets, getSecretLabel, redactSecrets |
| memdir/teamMemPaths.ts | 293 | high | PathTraversalError, isTeamMemoryEnabled, getTeamMemPath, getTeamMemEntrypoint |
| utils/memoryFileDetection.ts | 290 | high | detectSessionFileType, detectSessionPatternType, isAutoMemFile, MemoryScope |
| memdir/paths.ts | 279 | high | isAutoMemoryEnabled, isExtractModeActive, getMemoryBaseDir, hasAutoMemPathOverride |
| memdir/memoryTypes.ts | 272 | high | MEMORY_TYPES, MemoryType, parseMemoryType, TYPES_SECTION_COMBINED |
| components/FeedbackSurvey/useMemorySurvey.tsx | 213 | high | useMemorySurvey |
| services/SessionMemory/sessionMemoryUtils.ts | 208 | high | SessionMemoryConfig, DEFAULT_SESSION_MEMORY_CONFIG, getLastSummarizedMessageId, setLastSummarizedMessageId |
| tools/AgentTool/agentMemorySnapshot.ts | 198 | high | getSnapshotDirForAgent, checkAgentMemorySnapshot, initializeFromSnapshot, replaceFromSnapshot |
| services/AgentSummary/agentSummary.ts | 180 | high | startAgentSummarization |
| tools/AgentTool/agentMemory.ts | 178 | high | AgentMemoryScope, getAgentMemoryDir, isAgentMemoryPath, getAgentMemoryEntrypoint |
| services/teamMemorySync/types.ts | 157 | high | TeamMemoryContentSchema, TeamMemoryDataSchema, TeamMemoryTooManyEntriesSchema, TeamMemoryData |
| services/extractMemories/prompts.ts | 155 | high | buildExtractAutoOnlyPrompt, buildExtractCombinedPrompt |
| components/messages/teamMemCollapsed.tsx | 140 | high | checkHasTeamMemOps, TeamMemCountParts |
| hooks/useAwaySummary.ts | 126 | high | useAwaySummary |
| components/CompactSummary.tsx | 118 | high | CompactSummary |
| components/agents/new-agent-creation/wizard-steps/MemoryStep.tsx | 113 | high | MemoryStep |
| services/toolUseSummary/toolUseSummaryGenerator.ts | 113 | high | GenerateToolUseSummaryParams, generateToolUseSummary |
| commands/memory/memory.tsx | 90 | high | call |
| components/messages/UserMemoryInputMessage.tsx | 75 | high | UserMemoryInputMessage |
| services/awaySummary.ts | 75 | high | generateAwaySummary |
| components/memory/MemoryUpdateNotification.tsx | 45 | high | getRelativeMemoryPath, MemoryUpdateNotification |
| services/teamMemorySync/teamMemSecretGuard.ts | 45 | high | checkTeamMemSecrets |
| components/MemoryUsageIndicator.tsx | 37 | high | MemoryUsageIndicator |
| components/messages/teamMemSaved.ts | 20 | high | teamMemSavedPart |
| commands/memory/index.ts | 11 | high | — |
| commands/summary/index.js | 2 | high | — |
| utils/memoize.ts | 270 | medium | memoizeWithTTL, memoizeWithTTLAsync, memoizeWithLRU |
| memdir/findRelevantMemories.ts | 142 | medium | RelevantMemory, findRelevantMemories |
| memdir/teamMemPrompts.ts | 101 | medium | buildCombinedMemoryPrompt |
| memdir/memoryScan.ts | 95 | medium | MemoryHeader, scanMemoryFiles, formatMemoryManifest |
| utils/teamMemoryOps.ts | 89 | medium | isTeamMemorySearch, isTeamMemoryWriteOrEdit, appendTeamMemorySummaryParts, isTeamMemFile |
| skills/bundled/remember.ts | 83 | medium | registerRememberSkill |
| utils/directMemberMessage.ts | 70 | medium | parseDirectMemberMessage, DirectMessageResult, sendDirectMemberMessage |
| memdir/memoryAge.ts | 54 | medium | memoryAgeDays, memoryAge, memoryFreshnessText, memoryFreshnessNote |
| hooks/useMemoryUsage.ts | 40 | medium | MemoryUsageStatus, MemoryUsageInfo, useMemoryUsage |
| utils/memory/types.ts | 13 | medium | MEMORY_TYPE_VALUES, MemoryType |
| utils/memory/versions.ts | 9 | medium | projectIsInGitRepo |