Hash-Compressed Repository Memory
To prevent context bloat and ensure token-efficient prompting, MultiModel Dev OS leverages a diff-driven, hash-compressed repository memory engine.
Codebase State Index (memory.hash.json)
The memory engine compiles the workspace structure into a compact JSON file under .ai/intelligence/memory.hash.json:
- Content Fingerprints: SHA-256 hashes and size metrics of files to detect changes quickly.
- Framework Signals: Automatically detected project framework and environment indicators.
- Package Manager Signals: Detected package managers (npm, yarn, pnpm, etc.).
- AI Dev OS Integration: Mapped list of present MultiModel Dev OS workspace files.
- Risk Profile: Scans and logs files/patterns that require stricter verification checks.
- Recommended Next Steps: Tailored integration and stabilization recommendations.
Memory CLI Commands
MultiModel Dev OS provides four commands to scan the codebase and manage the memory index:
1. mmdo scan
Scans the codebase target directory, detects package managers, frameworks/languages, MultiModel Dev OS integrations, and lists security or size risks without writing any files.
npx multimodel-dev-os@latest scan2. mmdo memory build
Performs a full codebase scan and compiles the index files under .ai/intelligence/:
memory.hash.json: Structural fingerprints and framework signals.memory.summary.md: Human-readable codebase status summary.
npx multimodel-dev-os@latest memory build3. mmdo memory refresh
Incremental refresh of memory files, comparing current file hashes against memory.hash.json to update changed, added, or removed files without re-indexing unchanged assets.
npx multimodel-dev-os@latest memory refresh4. mmdo memory diff
Computes the difference between the current workspace state and the existing memory.hash.json file. Reports count and paths of added, removed, and changed files without writing any changes to disk.
npx multimodel-dev-os@latest memory diffMemory Refresh Operations
Re-indexing the workspace is optimized to run incrementally:
- Hash Scanning: The scanner compares current file hashes against the fingerprints in
memory.hash.json. - Pruning: Files no longer present in the directory are removed from summaries.
- Targeted Summarization: Only modified or new files are summarized, preserving historical decision logs and unchanged summaries to minimize token costs.
- Ignore Bounds: Any directory or file path matching patterns inside
.gitignoreor default excludes (likenode_modules,.git,build, etc.) is completely excluded from the memory scanning loop. - Secret Redaction: Skips configuration files containing secrets, credential blocks, or keystores (e.g.
.env,.npmrc,.keystore).
Command Center Integration
The status of the memory index is monitored in the Repository Command Center. Running mmdo status displays one of three states for your codebase memory:
CURRENT: The filesystem matches the built memory index exactly.STALE: The filesystem has changed since the last build. Runmmdo memory refreshto update the index.MISSING: No memory index is built yet. Runmmdo memory buildto generate it.
