Agent skill
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 this agent skill to your Project
npx add-skill https://github.com/Fr-e-d/GAAI-framework/tree/main/.gaai/core/skills/cross/memory-refresh
Metadata
Additional technical details for this skill
- id
- SKILL-MEMORY-REFRESH-001
- track
- cross-cutting
- author
- gaai-framework
- status
- stable
- version
- 1.0
- category
- cross
- updated at
- 1772496000
SKILL.md
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,> OBSOLETE — {reason}) may be archived. All other entries are ACTIVE and MUST NOT be archived. Decisions are already individual ADR files (decisions/DEC-{N}.md) — no compaction needed. For other oversized durable files → domain-split, not archive. - 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→decisions-90-155.summary.md): a. Write the new summary file with updated frontmatter (id,updated_at, source range). b. Updateindex.mdSummaries 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.mdpointer is updated before proceeding. Also checkdecisions/_log.mdfor any⚠️ PENDING: extend summary rangenotes — process them and remove the notes once handled.
- Durable memory (decisions, patterns, project, ops, contacts, domains): only entries with explicit supersession markers (
- Update memory index: update
index.mdfrontmatterupdated_atto reflect this refresh run.
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
memory-ingestordecision-extraction) - Generate architecture context
Governs existing memory. Keeps it clean, cheap, and precise.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ci-watch-and-fix
Watch GitHub Actions CI after PR creation, detect failures, extract logs, apply minimal fixes, and re-push — keeping the delivery session alive until CI resolves or escalating after 3 cycles. Activate immediately after gh pr create and before marking the story done.
qa-review
Validate that implemented code fully satisfies Story acceptance criteria, respects rules, and introduces no regressions. This is the hard quality gate — no pass means no delivery. Activate after implementation is complete.
compose-team
Assemble the context bundles for each sub-agent based on evaluate-story output. Produces spawn-ready packages for Planning, Implementation, QA, or MicroDelivery sub-agents. Activate after evaluate-story, before spawning any sub-agent.
coordinate-handoffs
Validate sub-agent handoff artefacts, sequence phase transitions, and manage retry and escalation logic. Activate after each sub-agent terminates to determine next action.
implement
Generate correct, minimal, maintainable code that satisfies a validated Story's acceptance criteria against an execution plan. Activate when a Story is validated, a plan exists, and all prerequisites are unambiguous.
delivery-high-level-plan
Transform validated Stories into a clear, minimal, governed execution plan. Used by the Planning Sub-Agent as the first planning pass before prepare-execution-plan for Tier 2/3, or as the sole planning output for simple Stories.
Didn't find tool you were looking for?