Memory hygiene system to prevent MEMORY.md bloat.
Activate this skill when:
Important: Do NOT use file size (lines/tokens) as the trigger. A large MEMORY.md with only core rules is fine. Only act when factual bloat is detected.
Before starting the first clear-mind task:
> "Note: The following categories will be kept in MEMORY.md for quick access:
> - Installed Skills list — needed for every task
> - Technical Setup — agent capabilities and frequent-use configs
>
> Only factual information used for specific scenarios (projects, portfolio, historical events) will be migrated.
>
> Are there any other factual categories you'd like to keep in MEMORY.md?"
Wait for user confirmation before proceeding to Core Workflow.
Migration Principle: Only move facts that are scenario-specific (this project, that stock, past events). Capabilities stay, specifics go.
Critical Safeguard: When in doubt, KEEP in MEMORY.md. It's safer to retain information in the core memory than to risk losing important capabilities.
Skip if: MEMORY.md contains only core rules and indexes — even if the file is large.
Ensure /memory/facts/ exists with these files:
memory/facts/
├── critical-events.md # Important incidents and lessons
├── projects.md # Active project statuses
├── technical-setup.md # DEPRECATED — technical configs now stay in MEMORY.md
├── portfolio.md # Stocks, investments, strategies
└── user-directives.md # User preferences and instructions
Note: technical-setup.md is kept for backward compatibility. New technical content goes to MEMORY.md.
Move factual details from MEMORY.md to appropriate facts/ files:
| Source Section | Target File | Migration Rule |
|---|---|---|
| --------------------- | ---------------------- | ----------------------------------------------------------------------------------------------- |
| Critical Events | critical-events.md | Move full details, keep index link |
| Projects | projects.md | Move all project details |
| Technical Setup | technical-setup.md | KEEP in MEMORY.md — agent capabilities stay; only move niche/deprecated configs if requested |
| Portfolio/Trading | portfolio.md | Move holdings, strategies |
| User Directives | user-directives.md | Move preferences, quotes |
New structure:
# MEMORY.md - Long-Term Memory
_Curated rules and index. Detailed facts stored separately._
---
## Tasks, Plans and Missions
### [Task Name]
**Current Plan**: /memory/YYYY-MM-DD.md
---
## Quick Index (Factual Information)
| Category | Location |
|-----------------|---------------------------------------|
| Critical Events | /memory/facts/critical-events.md |
| Active Projects | /memory/facts/projects.md |
| Technical Setup | **MEMORY.md** (agent capabilities) |
| Portfolio | /memory/facts/portfolio.md |
| User Directives | /memory/facts/user-directives.md |
---
## Core Principles (Immutable)
[Keep only essential rules - max 6-8 items]
---
## Cognitive Memory System
[Minimal reference to architecture]
Check results:
Activate rollback when:
| Scenario | Action |
|---|---|
| -------------------------- | ------------------------------------------------------------------------ |
| Restore specific category | Copy content from facts/[category].md back to MEMORY.md |
| Rollback entire memory | Rebuild MEMORY.md from all facts/ files and core rules |
| Undo recent migration | Restore from pre-migration backup if available |
Critical Safety Metrics:
Anti-Goal: Reducing line count is NOT the goal. Removing factual bloat while preserving core capabilities IS.
# Critical Events Record
## YYYY-MM-DD: Event Name
- **What happened**: [Description]
- **Root cause**: [Analysis]
- **Lesson**: [Key takeaway]
- **Status**: [Resolved/Ongoing]
# Active Project Status
## Project: [Name]
- **Status**: [PENDING/ACTIVE/COMPLETED]
- **User role**: [Role]
- **My role**: [Role]
- **Constraints**: [Any limitations]
# Technical Setup & Configuration (ARCHIVE)
> **DEPRECATED**: Technical configurations and installed skills are now kept in MEMORY.md for quick access.
> This file is maintained for historical reference only.
## Archived Content
[Any legacy technical notes from before the migration]
# Portfolio & Strategies
## Holdings
- **Symbol**: [Ticker]
- **Quantity**: [Number]
- **Purchase price**: [Amount]
- **Current price**: [Amount]
- **Status**: [HOLD/SELL/BUY]
## Strategies
- **Strategy name**: [Name]
- **Description**: [Details]
- **Performance**: [Metrics]
# User Directives & Preferences
**Last Updated**: YYYY-MM-DD
> "[User quote or directive]"
## Preferences
- [Preference 1]
- [Preference 2]
## Instructions
- [Instruction 1]
- [Instruction 2]
MEMORY.md is for rules and navigation, not storage.
Factual details belong in specialized files.
Rollback capability is essential — always maintain backups and ensure the ability to restore information when requested.
共 1 个版本