RepoPilot

thedotmack / claude-mem

Search thedotmack/claude-mem

GitHub

Code

How thedotmack/claude-mem is laid out, and where to start for common changes.

A
Architecture grade
score 99/100
0
Import cycles
lower is better
400
Files mapped
104 imports between them
98%
Layering
of imports point one way

From the map of which files import which, built when the code was last read in full. It shows what depends on what, not a reading order.

Module map

Shade by
Entry points and orchestratorsShared coreFoundationtypes1 file · 16 commitsutils9 files · 8 commitsconstants6 files · 25 commitscomponents20 files · 37 commitshooks7 files · 14 commitsApp1 file · 9 commitsindex1 file · 0 commits

7 modules, 15 links. A link means one module imports another; thicker lines mean more imports. Links come from 400 of 751 source files, so the real counts are higher. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.

types14016Foundation
utils9328Shared core
constants63025Foundation
components202437Orchestrator
hooks72314Orchestrator
App1149Orchestrator
index1020Entry or leaf

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Likely start-up file
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add Support for a New IDE/Agent

  • Export the adapter from src/cli/adapters/index.ts registry so it's discoverable by the installation system.
  • Add detection logic in src/npx-cli/commands/ide-detection.ts to auto-identify the IDE during installation.

Add a Custom Memory Extraction Rule

  • Create a new prompt template in src/sdk/prompts.ts for your extraction logic (e.g., extracting only bugs vs. features).
  • Modify src/services/context/ObservationCompiler.ts to apply your custom filter during observation compilation.
  • Update the memory-item schema in src/core/schemas/memory-item.ts if you need custom fields.
  • Add parser logic in src/sdk/parser.ts to handle the structured output from your new prompt.

Add Support for a New LLM Provider

  • Extend src/server/generation/ProviderObservationGenerator.ts with a new provider branch (e.g., for Anthropic, OpenAI, etc.).
  • Update src/shared/EnvManager.ts to load and validate credentials for the new provider.
  • Register generation job tracking in src/storage/postgres/generation-jobs.ts for async processing.

Add a New Context Injection Strategy

  • Update src/services/context/ContextBudget.ts to handle your strategy's token budgeting requirements.
  • Register the strategy in src/servers/mcp-server.ts so it's callable via the MCP API.

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.
  • Some entry points named in the manifest are build output or are missing from the file list, so their source is not shown.
  • The file list is newer than the written guide, so descriptions and suggested changes may describe older code.

Code quality and hotspots

Largest source files

  • Branch points294 per file on average
  • Code issues0 errors, 143 warnings
  • Largest file4,777 lines
  • Hotspot load10 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions8 workflows
  • Tests1,196 test filesPytest · 1.6 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: claude-mem-cursor/skills/agent-cost-report/scripts/tests · claude-mem-cursor/skills/agent-cost-report/scripts/tests/fixtures · claude-mem-grok-bot/skills/agent-cost-report/scripts/tests/fixtures

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.