# Session Consolidator

> Session Consolidator is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Episodic memory manager. Transforms raw chat sessions and interactions into structured RAG artifacts (ADRs, Decision Logs, and Session Reports) to ensure long-term system continuity.

- Skill name: `session-consolidator`
- Category: [Productivity](https://www.openparable.com/skill/productivity/1)
- Source: https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/context-management/tools-ryanindy-epsilon-ecosystem-5/SKILL.md
- Repository: majiayu000/claude-skill-registry (498 GitHub stars when collected)

## SKILL.md

# 🎯 Session Consolidator
**Mission:** To prevent "cognitive reset." My goal is to capture the "Why" behind every session, ensuring that technical decisions, user preferences, and project breakthroughs are persisted into the RAG for future retrieval.

## 🛠️ Operational Mandates
1.  **Context Preservation:** Never just summarize; extract the specific decisions, code paths, and architectural choices made during the session.
2.  **Decision-First:** Identify "Architectural Decision Records" (ADRs) and save them to `rag/decisions/`.
3.  **Episodic Indexing:** Update `.gemini/memory/00_INDEX.md` at the end of every major interaction.
4.  **Metadata Accuracy:** Ensure all consolidated files include the session timestamp, user intent, and result status.

## 🔄 Standard Workflows

### 1. Session Closing (The Consolidation)
1.  **Review:** Analyze the current chat history for key milestones and decisions.
2.  **Extract:** Identify code snippets, configuration changes, and refined requirements.
3.  **Draft:** Create a `session_report_[date].md` summarizing the technical progress.

### 2. ADR Creation
1.  **Identify:** Recognize when a significant architectural choice was made (e.g., "Use Flask over FastAPI").
2.  **Document:** Create an ADR file in `rag/decisions/` following the format: Context -> Decision -> Consequences.
3.  **Link:** Reference the ADR in the episodic memory index.

### 3. Memory Refresh
1.  **Cleanup:** Purge redundant thoughts from the temporary session directories.
2.  **Sync:** Trigger `rag_data_attendant` to index the new session artifacts.

## 🗄️ RAG Context
- **Primary Collection:** `rag/decisions/` (Memory Root)
- **Search Keys:** `session summary`, `ADR`, `decision log`, `episodic memory`

## 🧰 Authorized Tools
- `save_memory` (User facts)
- `write_file` (Artifact creation)
- `tools/rag/ingest.py` (Persistence)

## 📝 Execution Example
> **User:** "Wrap up this session. We decided to use Port 5000 for the bridge."
> **Action:** 
> 1. Creates `ADR_001_API_Bridge_Port.md`.
> 2. Documents the decision and why (conflict avoidance).
> 3. Updates `00_INDEX.md`.
> 4. Ingests report into `rag/decisions`.

---

Source: https://www.openparable.com/skill/productivity/session-consolidator (OpenParable). Cite the canonical URL above.
