Overview
RepoMemory is a structured representation of a repository’s architecture, patterns, and conventions. It helps coding agents understand the codebase and make informed changes.Key Features
- Evidence-backed claims: All assertions link to specific file locations
- Branch inheritance: Child experiments inherit parent’s memory
- Bounded prompts: Summary + TOC keeps context manageable
- Section-based access: Agents can read specific sections on demand
Schema
Core Sections
| Section ID | Title | Content |
|---|---|---|
core.architecture | Architecture | System design, module structure |
core.entrypoints | Entrypoints | How to run the application |
core.where_to_edit | Where to edit | Key files for modifications |
core.invariants | Invariants | Contracts and constraints |
core.testing | Testing | How to run tests |
core.gotchas | Gotchas | Common pitfalls |
core.dependencies | Dependencies | Key dependencies |
Usage
Ensure Memory Exists
Render for Prompts
Get Specific Section
Bootstrap from Existing Repo
Update After Experiment
File Location
RepoMemory is stored at.kapso/repo_memory.json in each repository.
Branch Inheritance
When experiments branch from a parent:- Child branch inherits parent’s
.kapso/repo_memory.json - After experiment runs, memory is updated with new understanding
- Memory is committed to the branch
- Future children of this branch inherit the updated memory
Evidence Validation
Claims must have evidence that exists in the repository:MCP Tools Access
For Claude Code agent, RepoMemory is accessible via MCP tools:core.architecture- System design and module structurecore.entrypoints- How to run the applicationcore.where_to_edit- Key files for modificationscore.invariants- Contracts, constraints, and assumptionscore.testing- How to run testscore.gotchas- Common pitfallscore.dependencies- Key dependencies