GAAI-framework memory-refresh
Periodic memory maintenance — archive session files, convert recurring knowledge into summaries, update the memory index. Activate at end of a major phase (Discovery complete, sprint done) or when memory spans many sessions. For emergency context-window pressure mid-task, use memory-compact instead.
install
source · Clone the upstream repo
git clone https://github.com/Fr-e-d/GAAI-framework
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Fr-e-d/GAAI-framework "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.gaai/core/skills/cross/memory-refresh" ~/.claude/skills/fr-e-d-gaai-framework-memory-refresh && rm -rf "$T"
manifest:
.gaai/core/skills/cross/memory-refresh/SKILL.mdsource content
Memory Refresh
Purpose / When to Activate
Activate:
- After major discovery or delivery phases
- When memory exceeds comfortable context size
- Periodically on active projects (weekly or per sprint)
This skill governs and optimizes existing memory only — it does not create new knowledge.
Process
- Read memory index
- Extract durable knowledge from session memory
- Convert recurring or validated information into summary memory
- Archive raw session files to
contexts/memory/archive/ - Compact with R7 category-aware rules:
- Durable memory (decisions, patterns, project, ops, contacts, domains): only entries with explicit supersession markers (
,> SUPERSEDED by DEC-XX
,> RETRACTED
) may be archived. All other entries are ACTIVE and MUST NOT be archived. Decisions are already individual ADR files (> OBSOLETE — {reason}
) — no compaction needed. For other oversized durable files → domain-split, not archive.decisions/DEC-{N}.md - Ephemeral memory (sessions): standard compaction — summarize and archive.
5b. Summary lifecycle — mandatory when extending summary coverage: When creating or extending a decisions summary file that supersedes an existing one (e.g.,
→decisions-90-145.summary.md
): a. Write the new summary file with updated frontmatter (decisions-90-155.summary.md
,id
, source range). b. Updateupdated_at
Summaries section: replace the old filename with the new one. c. Delete the old summary file from disk (it is now superseded; do not leave orphan files). d. Verify: confirm old filename is gone from disk ANDindex.md
pointer is updated before proceeding. Also checkindex.md
for anydecisions/_log.md
notes — process them and remove the notes once handled.⚠️ PENDING: extend summary range
- Durable memory (decisions, patterns, project, ops, contacts, domains): only entries with explicit supersession markers (
- Update memory index: update
frontmatterindex.md
to reflect this refresh run.updated_at
Quality Checks
- Active memory remains minimal and high-signal
- Summaries become the primary long-term context source
- Raw exploration is archived, not deleted
- No uncontrolled memory growth
- Index always reflects current active memory
- No active durable memory entry archived — only superseded/retracted entries may be archived (R7/R7b)
Non-Goals
This skill must NOT:
- Create new project memory
- Record new decisions (use
ormemory-ingest
)decision-extraction - Generate architecture context
Governs existing memory. Keeps it clean, cheap, and precise.