Architecture

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

FileLinesImportanceExports
services/teamMemorySync/index.ts1257highSyncState, createSyncState, hashContent, batchDeltaByBytes
services/compact/sessionMemoryCompact.ts631highSessionMemoryCompactConfig, DEFAULT_SM_COMPACT_CONFIG, setSessionMemoryCompactConfig, getSessionMemoryCompactConfig
services/extractMemories/extractMemories.ts616highcreateAutoMemCanUseTool, initExtractMemories, executeExtractMemories, drainPendingExtraction
memdir/memdir.ts508highENTRYPOINT_NAME, MAX_ENTRYPOINT_LINES, MAX_ENTRYPOINT_BYTES, EntrypointTruncation
services/SessionMemory/sessionMemory.ts496highresetLastMemoryMessageUuid, shouldExtractMemory, initSessionMemory, ManualExtractionResult
components/memory/MemoryFileSelector.tsx438highMemoryFileSelector
services/teamMemorySync/watcher.ts388highisPermanentFailure, startTeamMemoryWatcher, notifyTeamMemoryWrite, stopTeamMemoryWatcher
services/SessionMemory/prompts.ts325highDEFAULT_SESSION_MEMORY_TEMPLATE, loadSessionMemoryTemplate, loadSessionMemoryPrompt, isSessionMemoryEmpty
services/teamMemorySync/secretScanner.ts325highSecretMatch, scanForSecrets, getSecretLabel, redactSecrets
memdir/teamMemPaths.ts293highPathTraversalError, isTeamMemoryEnabled, getTeamMemPath, getTeamMemEntrypoint
utils/memoryFileDetection.ts290highdetectSessionFileType, detectSessionPatternType, isAutoMemFile, MemoryScope
memdir/paths.ts279highisAutoMemoryEnabled, isExtractModeActive, getMemoryBaseDir, hasAutoMemPathOverride
memdir/memoryTypes.ts272highMEMORY_TYPES, MemoryType, parseMemoryType, TYPES_SECTION_COMBINED
components/FeedbackSurvey/useMemorySurvey.tsx213highuseMemorySurvey
services/SessionMemory/sessionMemoryUtils.ts208highSessionMemoryConfig, DEFAULT_SESSION_MEMORY_CONFIG, getLastSummarizedMessageId, setLastSummarizedMessageId
tools/AgentTool/agentMemorySnapshot.ts198highgetSnapshotDirForAgent, checkAgentMemorySnapshot, initializeFromSnapshot, replaceFromSnapshot
services/AgentSummary/agentSummary.ts180highstartAgentSummarization
tools/AgentTool/agentMemory.ts178highAgentMemoryScope, getAgentMemoryDir, isAgentMemoryPath, getAgentMemoryEntrypoint
services/teamMemorySync/types.ts157highTeamMemoryContentSchema, TeamMemoryDataSchema, TeamMemoryTooManyEntriesSchema, TeamMemoryData
services/extractMemories/prompts.ts155highbuildExtractAutoOnlyPrompt, buildExtractCombinedPrompt
components/messages/teamMemCollapsed.tsx140highcheckHasTeamMemOps, TeamMemCountParts
hooks/useAwaySummary.ts126highuseAwaySummary
components/CompactSummary.tsx118highCompactSummary
components/agents/new-agent-creation/wizard-steps/MemoryStep.tsx113highMemoryStep
services/toolUseSummary/toolUseSummaryGenerator.ts113highGenerateToolUseSummaryParams, generateToolUseSummary
commands/memory/memory.tsx90highcall
components/messages/UserMemoryInputMessage.tsx75highUserMemoryInputMessage
services/awaySummary.ts75highgenerateAwaySummary
components/memory/MemoryUpdateNotification.tsx45highgetRelativeMemoryPath, MemoryUpdateNotification
services/teamMemorySync/teamMemSecretGuard.ts45highcheckTeamMemSecrets
components/MemoryUsageIndicator.tsx37highMemoryUsageIndicator
components/messages/teamMemSaved.ts20highteamMemSavedPart
commands/memory/index.ts11high
commands/summary/index.js2high
utils/memoize.ts270mediummemoizeWithTTL, memoizeWithTTLAsync, memoizeWithLRU
memdir/findRelevantMemories.ts142mediumRelevantMemory, findRelevantMemories
memdir/teamMemPrompts.ts101mediumbuildCombinedMemoryPrompt
memdir/memoryScan.ts95mediumMemoryHeader, scanMemoryFiles, formatMemoryManifest
utils/teamMemoryOps.ts89mediumisTeamMemorySearch, isTeamMemoryWriteOrEdit, appendTeamMemorySummaryParts, isTeamMemFile
skills/bundled/remember.ts83mediumregisterRememberSkill
utils/directMemberMessage.ts70mediumparseDirectMemberMessage, DirectMessageResult, sendDirectMemberMessage
memdir/memoryAge.ts54mediummemoryAgeDays, memoryAge, memoryFreshnessText, memoryFreshnessNote
hooks/useMemoryUsage.ts40mediumMemoryUsageStatus, MemoryUsageInfo, useMemoryUsage
utils/memory/types.ts13mediumMEMORY_TYPE_VALUES, MemoryType
utils/memory/versions.ts9mediumprojectIsInGitRepo