This skill allows using the local file system as a persistent and extended memory layer. The goal is to offload verbose or static information (logs, detailed plans, massive documentation) outside the active context window, keeping only high-signal references.
Mental Model: The file system is the agent's "hard drive," while the context is the "RAM." Optimizing the flow between both maximizes reasoning capacity without saturating attention.
🚩 Fragility and Autonomy
- Fragility: Low. The file system is a stable and reliable medium.
- Freedom: Very High in the organization of directories and persistence formats.
🚀 When to Activate
- In debugging sessions with massive terminal outputs.
- When coordinating complex tasks among multiple sub-agents.
- To maintain long-running execution plans that survive session restarts.
- When implementing self-modification systems or preference learning.
🧠 Core Concepts
1. The Scratchpad Pattern
Use temporary files (.scratch, plans/) to jot down ideas, code drafts, or research results before integrating them into the final solution.
2. Offloading Observations
Move verbose tool outputs (e.g., npm test with 1000 lines) to a file and provide the model with a summary and the path.
3. Plan Persistence (Stateful Agents)
Save the current state of the plan in a YAML/Markdown file so that the agent (or a new one) can resume exactly where it left off.
🛠️ Implementation in Gemini Elite Core
Pattern: Structured Working Directory
Define a clear hierarchy so the agent knows where to look for each type of "memory."
.gemini/
├── scratch/ # Archivos efímeros de trabajo
├── plans/ # Planes de tareas activos
├── agents/ # Workspaces de sub-agentes
└── preferences.yaml # Preferencias aprendidas
Pattern: Dynamic Skill Loading
Do not load all skills at the start. Load the SKILL.md in full only when the agent detects that it is relevant to the current task.
<OFFLOADED_CONTEXT>
- Skill: advanced-evaluation (Path: skills/advanced-evaluation/SKILL.md)
- Reason: User requested LLM-as-a-Judge implementation.
</OFFLOADED_CONTEXT>
🔗 Integrations
context-optimization: The filesystem is the main tool for context "compaction."multi-agent-patterns: Use of shared workspaces for asynchronous communication.project-development: Tracking of milestones and progress in project files.
📚 Internal References
references/implementation-patterns.md: Library of classes and scripts for ScratchPad, PlanPersistence, and Workspaces.