brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
manage-memoryOrganize, extract, prune, verify Claude Code persistent memory files. MEMORY.md as concise index, topic extraction to dedicated files, staleness detection, accuracy verification vs project state, 200-line truncation. Use when MEMORY.md nearing 200-line limit, after session produces durable insights, when topic section > 10-15 lines should extract, or when p…
Independent GitHub snapshot · Automated classification · Original documentation governs
Maintain Claude Code's persistent memory dir → accurate, concise, useful across sessions. MEMORY.md loaded into system prompt every conv — lines after 200 truncated → file must be lean index pointing to topic files for detail.
~/.claude/projects/<project-path>/memory/)Read MEMORY.md + list all files in memory dir:
wc -l <memory-dir>/MEMORY.md
ls -la <memory-dir>/
Check line count vs 200-line limit. Inventory existing topic files.
→ Clear picture of total lines, # topic files, which sections exist in MEMORY.md.
If err: Memory dir doesn't exist → create. MEMORY.md doesn't exist → minimal one w/ # Project Memory header + ## Topic Files section.
Compare memory claims vs current project state. Common staleness:
Use Grep to spot-check:
# Example: verify a skill count claim
grep -c "^ - id:" skills/_registry.yml
# Example: verify a file still exists
ls path/claimed/in/memory.md
→ List of stale entries w/ correct current vals.
If err: Can't verify claim (refs external state) → leave but add (unverified) note rather than silently preserve potentially wrong info.
For new entries, apply filters before writing:
Exception: User explicitly asks to remember → save immediately, no multi confirmations needed.
→ Filtered list worth adding, each meeting durability + non-dup + verified + actionable.
If err: Unsure if worth keeping → err toward keeping briefly in MEMORY.md — easier to prune later than rediscover.
Section > ~10-15 lines → extract to dedicated topic file:
<memory-dir>/<topic-name>.md w/ descriptive header## Topic Files
- [topic-name.md](topic-name.md) — Brief description of contents
Naming conventions:
viz-architecture.md, not VizArchitecture.mdpatterns.md, not session-2024-12.mdpatterns.md vs one file per fact→ MEMORY.md stays < 200 lines. Each topic file self-contained + readable w/o MEMORY.md ctx.
If err: Topic file < 5 lines → probably not worth extracting → leave inline.
Apply changes: remove stale, add new, update counts, ensure Topic Files section lists all dedicated files.
MEMORY.md structure:
# Project Memory
## Section 1 — High-level context
- Bullet points, concise
## Section 2 — Another topic
- Key facts only
## Topic Files
- [file.md](file.md) — What it covers
Guidelines:
code, bold) for scanability→ MEMORY.md < 200 lines, accurate, working links to all topic files.
If err: Can't get < 200 after extraction → ID least-freq-used section + extract. Every section candidate — even project structure overview can go to topic file if needed, leaving 1-line summary.
Final check:
wc -l <memory-dir>/MEMORY.md
# Check for broken links
for f in $(grep -oP '\[.*?\]\(\K[^)]+' <memory-dir>/MEMORY.md); do
ls <memory-dir>/$f 2>/dev/null || echo "BROKEN: $f"
done
# Check for orphan files
ls <memory-dir>/*.md | grep -v MEMORY.md
→ Line count < 200, no broken links, no orphans, spot-checked claims accurate.
If err: Fix broken links (update / remove). Orphans → add ref in MEMORY.md / delete if no longer relevant.
.md in memory dir (every file linked from MEMORY.md)patterns.md, viz-architecture.md) > date-based files.write-claude-md — CLAUDE.md captures project instructions; memory captures cross-session learningprune-agent-memory — inverse of manage-memory: auditing, classifying, selectively forgetting storedwrite-continue-here — structured continuation file for session handoff; complements memory as short-term bridgeread-continue-here — read + act on continuation at session start; consumption side of handoffcreate-skill — new skills may produce memory-worthy patternsheal — self-healing may update memory as part of integration stepmeditate — meditation sessions may surface insights worth persisting