Summary
Propose a layered memory system for MiniCode, inspired by Claude Code's CLAUDE.md hierarchy.
Claude Code's design
Claude Code loads CLAUDE.md files from multiple layers at startup:
~/.claude/CLAUDE.md — user global preferences
./CLAUDE.md or ./.claude/CLAUDE.md — project-level rules
- Nested directories — walks upward from cwd collecting CLAUDE.md files
./CLAUDE.local.md — personal project config, not committed to Git
~/.claude/projects/<path>/memory/ — auto-generated project memory
@path include — CLAUDE.md can reference other files like @docs/architecture.md
.claude/rules/*.md — modular rule files
All memory is injected into the model's context. More specific rules naturally take priority over broader ones.
What I plan to implement
Phase 1 — the basics:
- Read
~/.mini-code/CLAUDE.md (user global)
- Read
./CLAUDE.md or ./.mini-code/CLAUDE.md (project root), also scan ./.claude/ for compatibility
- Walk upward from cwd collecting CLAUDE.md files
- Concatenate everything into the system prompt
- Cap total content at ~50k chars
Phase 2 — follow-up PRs:
@path include resolution
CLAUDE.local.md
.mini-code/rules/*.md auto-discovery
- Auto memory read/write
/memory command to inspect loaded files
Why
Session persistence (just merged) gives MiniCode cross-session continuity. Layered memory gives it cross-session context — project knowledge and preferences persist without re-explaining every time.
Does this scope look reasonable?
Summary
Propose a layered memory system for MiniCode, inspired by Claude Code's CLAUDE.md hierarchy.
Claude Code's design
Claude Code loads CLAUDE.md files from multiple layers at startup:
~/.claude/CLAUDE.md— user global preferences./CLAUDE.mdor./.claude/CLAUDE.md— project-level rules./CLAUDE.local.md— personal project config, not committed to Git~/.claude/projects/<path>/memory/— auto-generated project memory@pathinclude — CLAUDE.md can reference other files like@docs/architecture.md.claude/rules/*.md— modular rule filesAll memory is injected into the model's context. More specific rules naturally take priority over broader ones.
What I plan to implement
Phase 1 — the basics:
~/.mini-code/CLAUDE.md(user global)./CLAUDE.mdor./.mini-code/CLAUDE.md(project root), also scan./.claude/for compatibilityPhase 2 — follow-up PRs:
@pathinclude resolutionCLAUDE.local.md.mini-code/rules/*.mdauto-discovery/memorycommand to inspect loaded filesWhy
Session persistence (just merged) gives MiniCode cross-session continuity. Layered memory gives it cross-session context — project knowledge and preferences persist without re-explaining every time.
Does this scope look reasonable?