[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76XANN90PKQ6QF65WQDWPJ9":3,"skill-same:01M76XANN90PKQ6QF65WQDWPJ9":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M76XANN90PKQ6QF65WQDWPJ9","Agent Memory Architecture",null,"Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fa\u002Fafrexai-agent-memory\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: Agent Memory Architecture\ndescription: Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.\nmetadata:\n  category: agent\n  skills: [\"memory\", \"agent\", \"context\", \"persistence\", \"knowledge-management\", \"openclaw\", \"productivity\"]\n---\n\n# Agent Memory Architecture\n\nComplete memory system for AI agents using only files. No APIs. No databases. No external dependencies. Just smart file structures and disciplined practices that give your agent perfect recall.\n\n---\n\n## 1. Memory Architecture Overview\n\n```\nworkspace\u002F\n├── MEMORY.md              ← Long-term curated memory (the brain)\n├── ACTIVE-CONTEXT.md      ← Hot working memory (what matters NOW)\n├── AGENTS.md              ← Operating manual (how you work)\n├── memory\u002F\n│   ├── 2026-01-15.md      ← Daily notes (raw event log)\n│   ├── 2026-01-16.md\n│   ├── heartbeat-state.json  ← Heartbeat tracking state\n│   ├── topics\u002F\n│   │   ├── project-alpha.md  ← Topic-specific deep context\n│   │   ├── client-acme.md\n│   │   └── tech-stack.md\n│   └── archive\u002F\n│       ├── 2025-Q4.md       ← Quarterly archive summaries\n│       └── 2025-Q3.md\n```\n\n### The 5 Memory Layers\n\n| Layer | File | Purpose | Read Frequency | Write Frequency |\n|-------|------|---------|----------------|-----------------|\n| **1. Hot** | ACTIVE-CONTEXT.md | Current priorities, blockers, in-flight work | Every session | Multiple times\u002Fday |\n| **2. Warm** | MEMORY.md | Curated long-term knowledge, decisions, people | Every main session | Weekly curation |\n| **3. Daily** | memory\u002FYYYY-MM-DD.md | Raw event log, conversations, actions taken | Today + yesterday | Throughout the day |\n| **4. Topic** | memory\u002Ftopics\u002F*.md | Deep context on specific subjects | When topic comes up | As knowledge grows |\n| **5. Cold** | memory\u002Farchive\u002F*.md | Historical summaries, rarely accessed | On explicit search | Quarterly rollup |\n\n### Core Principle: Write It Down\n\n**Memory is limited. Files are permanent.**\n\n- \"Mental notes\" don't survive session restarts. Files do.\n- If someone says \"remember this\" → write to a file\n- If you learn a lesson → update the relevant file\n- If you make a mistake → document it so future-you doesn't repeat it\n- **Text > Brain** 📝\n\n---\n\n## 2. Layer 1: Hot Memory (ACTIVE-CONTEXT.md)\n\nYour working scratchpad. What's happening RIGHT NOW.\n\n### Template\n\n```markdown\n# ACTIVE-CONTEXT.md — What's Hot\n\nLast updated: 2026-01-15 14:30 GMT\n\n## 🔥 Current Priority\n[ONE sentence: what is the most important thing right now?]\n\n## In Progress\n- [ ] Task A — status, next step\n- [ ] Task B — status, blocker\n\n## Waiting On\n- Waiting for [person] to [action] — asked [date]\n- Waiting for [system] to [complete] — ETA [time]\n\n## Key Decisions Made Today\n- Decided to [X] because [Y] — reversible: yes\u002Fno\n\n## Context for Next Session\n[What does future-you need to know to pick up where you left off?]\n```\n\n### Rules\n- **Max 50 lines** — if it's longer, you're hoarding. Move completed items to daily notes.\n- **Update before ending session** — your gift to future-you\n- **One priority** — if everything is priority, nothing is\n- **Delete completed items** — this is NOT an archive\n\n---\n\n## 3. Layer 2: Long-Term Memory (MEMORY.md)\n\nYour curated brain. Distilled knowledge, not raw logs.\n\n### Structure Template\n\n```markdown\n# MEMORY.md — Long-Term Memory\n\n## About [Human]\n- Name, preferences, timezone, communication style\n- What motivates them, what frustrates them\n- Key relationships, roles, goals\n\n## About Me [Agent]\n- Name, personality, capabilities\n- Operating preferences learned over time\n\n## Active Projects\n### Project Name\n- Status, key decisions, blockers\n- Links to relevant topic files\n\n## Key People\n- [Name] — role, relationship, communication notes\n\n## Lessons Learned\n- [Date] — [What happened] → [What I learned]\n\n## Preferences & Patterns\n- [Human prefers X over Y]\n- [This approach works better than that one]\n\n## Important Dates\n- [Event] — [Date] — [Context]\n```\n\n### Curation Rules\n\n1. **Only curated insights** — not raw events (those go in daily notes)\n2. **Review weekly** — scan daily notes, extract what's worth keeping\n3. **Prune quarterly** — remove outdated info, archive completed projects\n4. **Max 500 lines** — if it's longer, you need topic files\n5. **Security** — never store secrets, API keys, passwords\n6. **Main session only** — don't load MEMORY.md in group chats or shared contexts\n\n### What Goes In vs What Doesn't\n\n| ✅ Goes in MEMORY.md | ❌ Stays in daily notes |\n|----------------------|------------------------|\n| \"Kalin prefers being told, not asked\" | \"Today Kalin said he prefers being told\" |\n| \"Apollo.io free plan doesn't support API\" | \"Tried Apollo.io API, got 403 error\" |\n| \"Client AcmeCo — $50K deal, Q2 close\" | \"Sent AcmeCo the proposal at 3pm\" |\n| \"Always verify prospect names with live search\" | \"Found 6\u002F18 prospect names were wrong\" |\n\n---\n\n## 4. Layer 3: Daily Notes (memory\u002FYYYY-MM-DD.md)\n\nRaw event log. Everything that happened today.\n\n### Template\n\n```markdown\n# 2026-01-15 — Daily Notes\n\n## Morning\n- [08:15] Started session, reviewed ACTIVE-CONTEXT\n- [08:30] Received task from [human]: [summary]\n- [09:00] Completed [task] — result: [outcome]\n\n## Afternoon\n- [14:00] [Event\u002Fconversation summary]\n- [15:30] Decision: [what was decided and why]\n\n## Key Takeaways\n- [Anything worth remembering beyond today]\n\n## Tomorrow\n- [ ] Follow up on [X]\n- [ ] Check [Y]\n```\n\n### Rules\n- **One file per day** — `memory\u002FYYYY-MM-DD.md`\n- **Append-only** during the day — don't edit earlier entries\n- **Timestamps** for important events\n- **Summarize, don't transcribe** — capture essence, not every word\n- **Auto-create** the `memory\u002F` directory if it doesn't exist\n- **Retention**: Keep 30 days of daily notes. Archive older ones quarterly.\n\n---\n\n## 5. Layer 4: Topic Files (memory\u002Ftopics\u002F*.md)\n\nDeep context on specific subjects that span many days.\n\n### When to Create a Topic File\n\n- A project lasts more than 2 weeks\n- A client\u002Fperson comes up frequently\n- A technical area needs accumulated knowledge\n- You keep searching daily notes for the same information\n\n### Template\n\n```markdown\n# [Topic Name]\n\nCreated: YYYY-MM-DD\nLast updated: YYYY-MM-DD\n\n## Summary\n[2-3 sentences: what is this about?]\n\n## Key Facts\n- [Fact 1]\n- [Fact 2]\n\n## Decision Log\n| Date | Decision | Reasoning | Outcome |\n|------|----------|-----------|---------|\n| | | | |\n\n## Open Questions\n- [Question 1]\n\n## Related\n- memory\u002Ftopics\u002F[related-topic].md\n- [External link]\n```\n\n### Rules\n- **Name descriptively** — `project-alpha.md` not `topic-1.md`\n- **One topic per file** — if it covers two things, split it\n- **Link from MEMORY.md** — topic files are extensions of long-term memory\n- **Update when you learn** — don't let them go stale\n\n---\n\n## 6. Layer 5: Archive (memory\u002Farchive\u002F*.md)\n\nHistorical summaries for completed projects and past quarters.\n\n### Quarterly Archive Process\n\nEvery quarter (or when daily notes exceed 30 files):\n\n1. Read all daily notes older than 30 days\n2. Extract key events, decisions, outcomes, lessons\n3. Write `memory\u002Farchive\u002FYYYY-QN.md` (e.g., `2025-Q4.md`)\n4. Delete or move archived daily notes\n5. Update MEMORY.md if any long-term insights emerged\n\n### Archive Template\n\n```markdown\n# Q4 2025 Archive\n\n## Summary\n[3-5 sentences: what defined this quarter?]\n\n## Major Events\n- [Event 1] — [outcome]\n- [Event 2] — [outcome]\n\n## Projects\n### [Project Name]\n- Started: [date], Ended: [date]\n- Outcome: [result]\n- Lesson: [what we learned]\n\n## Metrics\n- [Key metric 1]: [value]\n- [Key metric 2]: [value]\n\n## Lessons Carried Forward\n- [Lesson added to MEMORY.md: yes\u002Fno]\n```\n\n---\n\n## 7. Session Startup Protocol\n\nWhat to read at the start of every session, in order:\n\n### Main Session (Direct Chat with Human)\n\n```\n1. SOUL.md          — Who am I? (personality, values)\n2. USER.md          — Who am I helping? (human context)\n3. MEMORY.md        — Long-term memory (full brain)\n4. ACTIVE-CONTEXT.md — Hot working memory (current state)\n5. memory\u002Ftoday.md  — Today's daily notes (if exists)\n6. memory\u002Fyesterday.md — Yesterday's notes (recent context)\n```\n\n### Shared\u002FGroup Session (Discord, Slack, Group Chats)\n\n```\n1. SOUL.md          — Who am I?\n2. USER.md          — Who am I helping?\n3. ACTIVE-CONTEXT.md — Current priorities only\n4. memory\u002Ftoday.md  — Today's notes\n⚠️ DO NOT load MEMORY.md — contains private context\n```\n\n### Sub-Agent \u002F Isolated Session\n\n```\n1. Task-specific context only\n2. Relevant topic file if applicable\n3. ACTIVE-CONTEXT.md for current state\n⚠️ Minimal context = focused output + lower token cost\n```\n\n---\n\n## 8. Memory Write Protocol\n\n### When to Write (Triggers)\n\n| Event | Action | Target File |\n|-------|--------|-------------|\n| Session starts | Log start time | Daily notes |\n| Task completed | Log result + outcome | Daily notes |\n| Decision made | Log decision + reasoning | Daily notes + topic file |\n| Lesson learned | Log lesson | Daily notes → MEMORY.md |\n| Person mentioned with new info | Update person section | MEMORY.md or topic file |\n| Human says \"remember this\" | Write immediately | MEMORY.md |\n| Session ends | Update ACTIVE-CONTEXT | ACTIVE-CONTEXT.md |\n| Weekly review | Curate MEMORY.md | MEMORY.md |\n| Quarterly | Archive old daily notes | Archive |\n\n### Write-Ahead Protocol\n\nFor critical information, write BEFORE acting:\n\n```\n1. Human gives important instruction\n2. IMMEDIATELY write to daily notes or MEMORY.md\n3. THEN execute the instruction\n4. Update with results after\n\nWhy: If the session crashes mid-execution, the instruction is preserved.\n```\n\n### Conflict Resolution\n\nWhen information conflicts between layers:\n- **ACTIVE-CONTEXT.md wins** for current state (most recent)\n- **MEMORY.md wins** for long-term facts (curated)\n- **Daily notes** are evidence — use to resolve disputes\n- **Topic files** win for deep domain knowledge\n\n---\n\n## 9. Memory Search Strategy\n\nWhen you need to find something:\n\n### Search Order (Fast to Slow)\n\n```\n1. ACTIVE-CONTEXT.md    — Is it current? (instant)\n2. MEMORY.md            — Is it a known fact? (quick scan)\n3. memory\u002Ftoday.md      — Did it happen today? (quick)\n4. memory\u002Fyesterday.md  — Did it happen recently? (quick)\n5. memory\u002Ftopics\u002F*.md   — Is it a deep topic? (targeted)\n6. memory_search tool   — Semantic search across all files\n7. memory\u002Farchive\u002F*.md  — Is it historical? (slow)\n```\n\n### Search Tips\n- Use `memory_search` tool for fuzzy\u002Fsemantic queries\n- Use `memory_get` with line numbers for precise retrieval after search\n- Check daily notes in reverse chronological order\n- If you can't find it after 3 searches, ask the human\n\n---\n\n## 10. Memory Hygiene Schedule\n\n### Daily (During Session)\n- [ ] Read ACTIVE-CONTEXT.md at session start\n- [ ] Create\u002Fappend to today's daily notes\n- [ ] Update ACTIVE-CONTEXT.md before session ends\n- [ ] Move completed ACTIVE-CONTEXT items to daily notes\n\n### Weekly (Pick One Heartbeat)\n- [ ] Read last 7 daily notes\n- [ ] Extract significant events\u002Flessons to MEMORY.md\n- [ ] Prune ACTIVE-CONTEXT.md (remove stale items)\n- [ ] Check topic files for staleness\n- [ ] Review MEMORY.md for outdated information\n\n### Monthly\n- [ ] MEMORY.md line count check (target: \u003C500 lines)\n- [ ] Topic files audit — any need merging or archiving?\n- [ ] Daily notes older than 30 days → archive\n- [ ] Check if any topic files should be promoted to MEMORY.md sections\n\n### Quarterly\n- [ ] Full archive process (see Layer 5)\n- [ ] MEMORY.md deep review — still accurate?\n- [ ] Topic files — archive completed projects\n- [ ] Update AGENTS.md with any process improvements learned\n\n---\n\n## 11. Heartbeat Integration\n\nUse heartbeats (periodic agent wake-ups) for memory maintenance:\n\n### heartbeat-state.json\n\n```json\n{\n  \"last_memory_review\": \"2026-01-15\",\n  \"last_archive\": \"2025-12-31\",\n  \"last_active_context_prune\": \"2026-01-14\",\n  \"daily_notes_count\": 12,\n  \"memory_md_lines\": 287,\n  \"next_scheduled\": {\n    \"weekly_review\": \"2026-01-19\",\n    \"monthly_audit\": \"2026-02-01\",\n    \"quarterly_archive\": \"2026-03-31\"\n  }\n}\n```\n\n### Heartbeat Memory Tasks (Rotate)\n\n```\nHeartbeat 1: Check daily notes count, prune ACTIVE-CONTEXT\nHeartbeat 2: Scan recent daily notes, update MEMORY.md\nHeartbeat 3: Check topic files for staleness\nHeartbeat 4: Token guard — how much are memory reads costing?\n```\n\n---\n\n## 12. Context Window Management\n\n### Token Budget Rules\n\n| File | Max Size | If Over Limit |\n|------|----------|---------------|\n| ACTIVE-CONTEXT.md | 50 lines \u002F 2KB | Move items to daily notes |\n| MEMORY.md | 500 lines \u002F 25KB | Split into topic files |\n| Daily notes | 200 lines \u002F 10KB | Summarize, stop transcribing |\n| Topic files | 300 lines \u002F 15KB | Split or archive |\n\n### Smart Loading Strategy\n\nDon't load everything every session. Use progressive disclosure:\n\n```\nLevel 1: Always load (every session)\n  → ACTIVE-CONTEXT.md (tiny, essential)\n  → SOUL.md, USER.md (identity)\n\nLevel 2: Load in main sessions\n  → MEMORY.md (the brain)\n  → Today's daily notes\n\nLevel 3: Load on demand\n  → Topic files (when topic comes up)\n  → Yesterday's notes (if needed)\n  → Archive (only on explicit search)\n```\n\n### Context Overflow Protocol\n\nWhen context gets too large mid-session:\n\n1. Write ACTIVE-CONTEXT.md with full current state\n2. Write `HANDOFF.md` with: what was done, in progress, next steps, key decisions, gotchas\n3. Start fresh session\n4. New session reads HANDOFF.md → picks up seamlessly\n5. Delete HANDOFF.md after successful handoff\n\n---\n\n## 13. Security Rules\n\n### Never Store in Memory Files\n- API keys, tokens, passwords, secrets\n- Full credit card or bank account numbers\n- Social security numbers or government IDs\n- Private encryption keys\n- Anything that would cause harm if the file were shared\n\n### Safe Storage Pattern\n```markdown\n# ✅ Safe\n- API keys: stored in 1Password vault \"MyVault\"\n- Database password: see secrets manager, item \"prod-db\"\n\n# ❌ Dangerous\n- API key: sk-abc123def456...\n- Password: MyS3cretP@ss!\n```\n\n### Privacy in Shared Contexts\n- MEMORY.md contains personal context — **never load in group chats**\n- Topic files may contain sensitive business data — check before sharing\n- Daily notes may reference private conversations — don't share\n- When in doubt, ask before exposing any memory content\n\n---\n\n## 14. Memory Patterns & Anti-Patterns\n\n### ✅ Good Patterns\n\n| Pattern | Why It Works |\n|---------|-------------|\n| Write immediately when told \"remember\" | Captures before you forget |\n| One fact per line in MEMORY.md | Easy to find, update, delete |\n| Date-prefix important entries | Enables chronological search |\n| Link between files | Creates a knowledge web |\n| Prune regularly | Keeps context fresh and cheap |\n\n### ❌ Anti-Patterns\n\n| Anti-Pattern | Why It Fails | Fix |\n|-------------|-------------|-----|\n| Giant MEMORY.md (1000+ lines) | Expensive to load, hard to find things | Split into topic files |\n| Never pruning ACTIVE-CONTEXT | Stale items cause confusion | Prune daily, archive weekly |\n| Transcribing conversations verbatim | Wastes tokens, buries signal | Summarize: essence, not every word |\n| Storing secrets in memory files | Security risk | Use secrets manager, reference by name |\n| Reading all files every session | Token burn, slow startup | Progressive loading strategy |\n| No daily notes | History is lost | Discipline: one file per day |\n| Multiple sources of truth | Conflicts, confusion | Single source per fact type |\n\n---\n\n## 15. Migration Guide\n\n### From No Memory System\n\n```\nDay 1: Create MEMORY.md with basic info about human + agent\nDay 2: Start daily notes (memory\u002FYYYY-MM-DD.md)\nDay 3: Create ACTIVE-CONTEXT.md\nWeek 2: First weekly review — extract lessons to MEMORY.md\nMonth 2: Create first topic files for recurring subjects\nQuarter 2: First archive cycle\n```\n\n### From MEMORY.md-Only System\n\n```\n1. Create memory\u002F directory\n2. Start daily notes — stop putting raw events in MEMORY.md\n3. Create ACTIVE-CONTEXT.md — move \"current\" stuff out of MEMORY.md\n4. Review MEMORY.md — what's curated vs what's raw? Move raw to daily notes.\n5. Identify topics that deserve their own files — split them out\n```\n\n### From External Tool (Database, API, Cloud)\n\n```\n1. Export key data to markdown files\n2. Structure into the 5-layer architecture\n3. Set up heartbeat maintenance schedule\n4. Gradually reduce dependency on external tool\n5. Benefits: zero cost, zero dependencies, works offline, no vendor lock-in\n```\n\n---\n\n## 16. Natural Language Commands\n\n- `\u002Fmemory-status` — Show memory system health: file sizes, line counts, staleness, next maintenance\n- `\u002Fmemory-review` — Run weekly review: scan daily notes, extract to MEMORY.md, prune active context\n- `\u002Fmemory-search [query]` — Search across all memory layers for a topic\n- `\u002Fmemory-archive` — Run quarterly archive: summarize old daily notes, create archive file\n- `\u002Fremember [fact]` — Immediately write a fact to MEMORY.md\n- `\u002Factive-context` — Show current ACTIVE-CONTEXT.md contents\n- `\u002Fdaily-summary` — Generate summary of today's daily notes\n- `\u002Ftopic-create [name]` — Create a new topic file with template\n- `\u002Fmemory-prune` — Audit all memory files for staleness and bloat\n- `\u002Fhandoff` — Write HANDOFF.md for session transition\n- `\u002Fmemory-migrate` — Guided migration from current system to this architecture\n- `\u002Fmemory-debug` — Diagnose memory issues: missing files, conflicts, outdated info\n","# Agent Memory Architecture\n\nComplete memory system for AI agents using only files. No APIs. No databases. No external dependencies. Just smart file structures and disciplined practices that give your agent perfect recall.\n\n---\n\n## 1. Memory Architecture Overview\n\n```\nworkspace\u002F\n├── MEMORY.md              ← Long-term curated memory (the brain)\n├── ACTIVE-CONTEXT.md      ← Hot working memory (what matters NOW)\n├── AGENTS.md              ← Operating manual (how you work)\n├── memory\u002F\n│   ├── 2026-01-15.md      ← Daily notes (raw event log)\n│   ├── 2026-01-16.md\n│   ├── heartbeat-state.json  ← Heartbeat tracking state\n│   ├── topics\u002F\n│   │   ├── project-alpha.md  ← Topic-specific deep context\n│   │   ├── client-acme.md\n│   │   └── tech-stack.md\n│   └── archive\u002F\n│       ├── 2025-Q4.md       ← Quarterly archive summaries\n│       └── 2025-Q3.md\n```\n\n### The 5 Memory Layers\n\n| Layer | File | Purpose | Read Frequency | Write Frequency |\n|-------|------|---------|----------------|-----------------|\n| **1. Hot** | ACTIVE-CONTEXT.md | Current priorities, blockers, in-flight work | Every session | Multiple times\u002Fday |\n| **2. Warm** | MEMORY.md | Curated long-term knowledge, decisions, people | Every main session | Weekly curation |\n| **3. Daily** | memory\u002FYYYY-MM-DD.md | Raw event log, conversations, actions taken | Today + yesterday | Throughout the day |\n| **4. Topic** | memory\u002Ftopics\u002F*.md | Deep context on specific subjects | When topic comes up | As knowledge grows |\n| **5. Cold** | memory\u002Farchive\u002F*.md | Historical summaries, rarely accessed | On explicit search | Quarterly rollup |\n\n### Core Principle: Write It Down\n\n**Memory is limited. Files are permanent.**\n\n- \"Mental notes\" don't survive session restarts. Files do.\n- If someone says \"remember this\" → write to a file\n- If you learn a lesson → update the relevant file\n- If you make a mistake → document it so future-you doesn't repeat it\n- **Text > Brain** 📝\n\n---\n\n## 2. Layer 1: Hot Memory (ACTIVE-CONTEXT.md)\n\nYour working scratchpad. What's happening RIGHT NOW.\n\n### Template\n\n```markdown\n# ACTIVE-CONTEXT.md — What's Hot\n\nLast updated: 2026-01-15 14:30 GMT\n\n## 🔥 Current Priority\n[ONE sentence: what is the most important thing right now?]\n\n## In Progress\n- [ ] Task A — status, next step\n- [ ] Task B — status, blocker\n\n## Waiting On\n- Waiting for [person] to [action] — asked [date]\n- Waiting for [system] to [complete] — ETA [time]\n\n## Key Decisions Made Today\n- Decided to [X] because [Y] — reversible: yes\u002Fno\n\n## Context for Next Session\n[What does future-you need to know to pick up where you left off?]\n```\n\n### Rules\n- **Max 50 lines** — if it's longer, you're hoarding. Move completed items to daily notes.\n- **Update before ending session** — your gift to future-you\n- **One priority** — if everything is priority, nothing is\n- **Delete completed items** — this is NOT an archive\n\n---\n\n## 3. Layer 2: Long-Term Memory (MEMORY.md)\n\nYour curated brain. Distilled knowledge, not raw logs.\n\n### Structure Template\n\n```markdown\n# MEMORY.md — Long-Term Memory\n\n## About [Human]\n- Name, preferences, timezone, communication style\n- What motivates them, what frustrates them\n- Key relationships, roles, goals\n\n## About Me [Agent]\n- Name, personality, capabilities\n- Operating preferences learned over time\n\n## Active Projects\n### Project Name\n- Status, key decisions, blockers\n- Links to relevant topic files\n\n## Key People\n- [Name] — role, relationship, communication notes\n\n## Lessons Learned\n- [Date] — [What happened] → [What I learned]\n\n## Preferences & Patterns\n- [Human prefers X over Y]\n- [This approach works better than that one]\n\n## Important Dates\n- [Event] — [Date] — [Context]\n```\n\n### Curation Rules\n\n1. **Only curated insights** — not raw events (those go in daily notes)\n2. **Review weekly** — scan daily notes, extract what's worth keeping\n3. **Prune quarterly** — remove outdated info, archive completed projects\n4. **Max 500 lines** — if it's longer, you need topic files\n5. **Security** — never store secrets, API keys, passwords\n6. **Main session only** — don't load MEMORY.md in group chats or shared contexts\n\n### What Goes In vs What Doesn't\n\n| ✅ Goes in MEMORY.md | ❌ Stays in daily notes |\n|----------------------|------------------------|\n| \"Kalin prefers being told, not asked\" | \"Today Kalin said he prefers being told\" |\n| \"Apollo.io free plan doesn't support API\" | \"Tried Apollo.io API, got 403 error\" |\n| \"Client AcmeCo — $50K deal, Q2 close\" | \"Sent AcmeCo the proposal at 3pm\" |\n| \"Always verify prospect names with live search\" | \"Found 6\u002F18 prospect names were wrong\" |\n\n---\n\n## 4. Layer 3: Daily Notes (memory\u002FYYYY-MM-DD.md)\n\nRaw event log. Everything that happened today.\n\n### Template\n\n```markdown\n# 2026-01-15 — Daily Notes\n\n## Morning\n- [08:15] Started session, reviewed ACTIVE-CONTEXT\n- [08:30] Received task from [human]: [summary]\n- [09:00] Completed [task] — result: [outcome]\n\n## Afternoon\n- [14:00] [Event\u002Fconversation summary]\n- [15:30] Decision: [what was decided and why]\n\n## Key Takeaways\n- [Anything worth remembering beyond today]\n\n## Tomorrow\n- [ ] Follow up on [X]\n- [ ] Check [Y]\n```\n\n### Rules\n- **One file per day** — `memory\u002FYYYY-MM-DD.md`\n- **Append-only** during the day — don't edit earlier entries\n- **Timestamps** for important events\n- **Summarize, don't transcribe** — capture essence, not every word\n- **Auto-create** the `memory\u002F` directory if it doesn't exist\n- **Retention**: Keep 30 days of daily notes. Archive older ones quarterly.\n\n---\n\n## 5. Layer 4: Topic Files (memory\u002Ftopics\u002F*.md)\n\nDeep context on specific subjects that span many days.\n\n### When to Create a Topic File\n\n- A project lasts more than 2 weeks\n- A client\u002Fperson comes up frequently\n- A technical area needs accumulated knowledge\n- You keep searching daily notes for the same information\n\n### Template\n\n```markdown\n# [Topic Name]\n\nCreated: YYYY-MM-DD\nLast updated: YYYY-MM-DD\n\n## Summary\n[2-3 sentences: what is this about?]\n\n## Key Facts\n- [Fact 1]\n- [Fact 2]\n\n## Decision Log\n| Date | Decision | Reasoning | Outcome |\n|------|----------|-----------|---------|\n| | | | |\n\n## Open Questions\n- [Question 1]\n\n## Related\n- memory\u002Ftopics\u002F[related-topic].md\n- [External link]\n```\n\n### Rules\n- **Name descriptively** — `project-alpha.md` not `topic-1.md`\n- **One topic per file** — if it covers two things, split it\n- **Link from MEMORY.md** — topic files are extensions of long-term memory\n- **Update when you learn** — don't let them go stale\n\n---\n\n## 6. Layer 5: Archive (memory\u002Farchive\u002F*.md)\n\nHistorical summaries for completed projects and past quarters.\n\n### Quarterly Archive Process\n\nEvery quarter (or when daily notes exceed 30 files):\n\n1. Read all daily notes older than 30 days\n2. Extract key events, decisions, outcomes, lessons\n3. Write `memory\u002Farchive\u002FYYYY-QN.md` (e.g., `2025-Q4.md`)\n4. Delete or move archived daily notes\n5. Update MEMORY.md if any long-term insights emerged\n\n### Archive Template\n\n```markdown\n# Q4 2025 Archive\n\n## Summary\n[3-5 sentences: what defined this quarter?]\n\n## Major Events\n- [Event 1] — [outcome]\n- [Event 2] — [outcome]\n\n## Projects\n### [Project Name]\n- Started: [date], Ended: [date]\n- Outcome: [result]\n- Lesson: [what we learned]\n\n## Metrics\n- [Key metric 1]: [value]\n- [Key metric 2]: [value]\n\n## Lessons Carried Forward\n- [Lesson added to MEMORY.md: yes\u002Fno]\n```\n\n---\n\n## 7. Session Startup Protocol\n\nWhat to read at the start of every session, in order:\n\n### Main Session (Direct Chat with Human)\n\n```\n1. SOUL.md          — Who am I? (personality, values)\n2. USER.md          — Who am I helping? (human context)\n3. MEMORY.md        — Long-term memory (full brain)\n4. ACTIVE-CONTEXT.md — Hot working memory (current state)\n5. memory\u002Ftoday.md  — Today's daily notes (if exists)\n6. memory\u002Fyesterday.md — Yesterday's notes (recent context)\n```\n\n### Shared\u002FGroup Session (Discord, Slack, Group Chats)\n\n```\n1. SOUL.md          — Who am I?\n2. USER.md          — Who am I helping?\n3. ACTIVE-CONTEXT.md — Current priorities only\n4. memory\u002Ftoday.md  — Today's notes\n⚠️ DO NOT load MEMORY.md — contains private context\n```\n\n### Sub-Agent \u002F Isolated Session\n\n```\n1. Task-specific context only\n2. Relevant topic file if applicable\n3. ACTIVE-CONTEXT.md for current state\n⚠️ Minimal context = focused output + lower token cost\n```\n\n---\n\n## 8. Memory Write Protocol\n\n### When to Write (Triggers)\n\n| Event | Action | Target File |\n|-------|--------|-------------|\n| Session starts | Log start time | Daily notes |\n| Task completed | Log result + outcome | Daily notes |\n| Decision made | Log decision + reasoning | Daily notes + topic file |\n| Lesson learned | Log lesson | Daily notes → MEMORY.md |\n| Person mentioned with new info | Update person section | MEMORY.md or topic file |\n| Human says \"remember this\" | Write immediately | MEMORY.md |\n| Session ends | Update ACTIVE-CONTEXT | ACTIVE-CONTEXT.md |\n| Weekly review | Curate MEMORY.md | MEMORY.md |\n| Quarterly | Archive old daily notes | Archive |\n\n### Write-Ahead Protocol\n\nFor critical information, write BEFORE acting:\n\n```\n1. Human gives important instruction\n2. IMMEDIATELY write to daily notes or MEMORY.md\n3. THEN execute the instruction\n4. Update with results after\n\nWhy: If the session crashes mid-execution, the instruction is preserved.\n```\n\n### Conflict Resolution\n\nWhen information conflicts between layers:\n- **ACTIVE-CONTEXT.md wins** for current state (most recent)\n- **MEMORY.md wins** for long-term facts (curated)\n- **Daily notes** are evidence — use to resolve disputes\n- **Topic files** win for deep domain knowledge\n\n---\n\n## 9. Memory Search Strategy\n\nWhen you need to find something:\n\n### Search Order (Fast to Slow)\n\n```\n1. ACTIVE-CONTEXT.md    — Is it current? (instant)\n2. MEMORY.md            — Is it a known fact? (quick scan)\n3. memory\u002Ftoday.md      — Did it happen today? (quick)\n4. memory\u002Fyesterday.md  — Did it happen recently? (quick)\n5. memory\u002Ftopics\u002F*.md   — Is it a deep topic? (targeted)\n6. memory_search tool   — Semantic search across all files\n7. memory\u002Farchive\u002F*.md  — Is it historical? (slow)\n```\n\n### Search Tips\n- Use `memory_search` tool for fuzzy\u002Fsemantic queries\n- Use `memory_get` with line numbers for precise retrieval after search\n- Check daily notes in reverse chronological order\n- If you can't find it after 3 searches, ask the human\n\n---\n\n## 10. Memory Hygiene Schedule\n\n### Daily (During Session)\n- [ ] Read ACTIVE-CONTEXT.md at session start\n- [ ] Create\u002Fappend to today's daily notes\n- [ ] Update ACTIVE-CONTEXT.md before session ends\n- [ ] Move completed ACTIVE-CONTEXT items to daily notes\n\n### Weekly (Pick One Heartbeat)\n- [ ] Read last 7 daily notes\n- [ ] Extract significant events\u002Flessons to MEMORY.md\n- [ ] Prune ACTIVE-CONTEXT.md (remove stale items)\n- [ ] Check topic files for staleness\n- [ ] Review MEMORY.md for outdated information\n\n### Monthly\n- [ ] MEMORY.md line count check (target: \u003C500 lines)\n- [ ] Topic files audit — any need merging or archiving?\n- [ ] Daily notes older than 30 days → archive\n- [ ] Check if any topic files should be promoted to MEMORY.md sections\n\n### Quarterly\n- [ ] Full archive process (see Layer 5)\n- [ ] MEMORY.md deep review — still accurate?\n- [ ] Topic files — archive completed projects\n- [ ] Update AGENTS.md with any process improvements learned\n\n---\n\n## 11. Heartbeat Integration\n\nUse heartbeats (periodic agent wake-ups) for memory maintenance:\n\n### heartbeat-state.json\n\n```json\n{\n  \"last_memory_review\": \"2026-01-15\",\n  \"last_archive\": \"2025-12-31\",\n  \"last_active_context_prune\": \"2026-01-14\",\n  \"daily_notes_count\": 12,\n  \"memory_md_lines\": 287,\n  \"next_scheduled\": {\n    \"weekly_review\": \"2026-01-19\",\n    \"monthly_audit\": \"2026-02-01\",\n    \"quarterly_archive\": \"2026-03-31\"\n  }\n}\n```\n\n### Heartbeat Memory Tasks (Rotate)\n\n```\nHeartbeat 1: Check daily notes count, prune ACTIVE-CONTEXT\nHeartbeat 2: Scan recent daily notes, update MEMORY.md\nHeartbeat 3: Check topic files for staleness\nHeartbeat 4: Token guard — how much are memory reads costing?\n```\n\n---\n\n## 12. Context Window Management\n\n### Token Budget Rules\n\n| File | Max Size | If Over Limit |\n|------|----------|---------------|\n| ACTIVE-CONTEXT.md | 50 lines \u002F 2KB | Move items to daily notes |\n| MEMORY.md | 500 lines \u002F 25KB | Split into topic files |\n| Daily notes | 200 lines \u002F 10KB | Summarize, stop transcribing |\n| Topic files | 300 lines \u002F 15KB | Split or archive |\n\n### Smart Loading Strategy\n\nDon't load everything every session. Use progressive disclosure:\n\n```\nLevel 1: Always load (every session)\n  → ACTIVE-CONTEXT.md (tiny, essential)\n  → SOUL.md, USER.md (identity)\n\nLevel 2: Load in main sessions\n  → MEMORY.md (the brain)\n  → Today's daily notes\n\nLevel 3: Load on demand\n  → Topic files (when topic comes up)\n  → Yesterday's notes (if needed)\n  → Archive (only on explicit search)\n```\n\n### Context Overflow Protocol\n\nWhen context gets too large mid-session:\n\n1. Write ACTIVE-CONTEXT.md with full current state\n2. Write `HANDOFF.md` with: what was done, in progress, next steps, key decisions, gotchas\n3. Start fresh session\n4. New session reads HANDOFF.md → picks up seamlessly\n5. Delete HANDOFF.md after successful handoff\n\n---\n\n## 13. Security Rules\n\n### Never Store in Memory Files\n- API keys, tokens, passwords, secrets\n- Full credit card or bank account numbers\n- Social security numbers or government IDs\n- Private encryption keys\n- Anything that would cause harm if the file were shared\n\n### Safe Storage Pattern\n```markdown\n# ✅ Safe\n- API keys: stored in 1Password vault \"MyVault\"\n- Database password: see secrets manager, item \"prod-db\"\n\n# ❌ Dangerous\n- API key: sk-abc123def456...\n- Password: MyS3cretP@ss!\n```\n\n### Privacy in Shared Contexts\n- MEMORY.md contains personal context — **never load in group chats**\n- Topic files may contain sensitive business data — check before sharing\n- Daily notes may reference private conversations — don't share\n- When in doubt, ask before exposing any memory content\n\n---\n\n## 14. Memory Patterns & Anti-Patterns\n\n### ✅ Good Patterns\n\n| Pattern | Why It Works |\n|---------|-------------|\n| Write immediately when told \"remember\" | Captures before you forget |\n| One fact per line in MEMORY.md | Easy to find, update, delete |\n| Date-prefix important entries | Enables chronological search |\n| Link between files | Creates a knowledge web |\n| Prune regularly | Keeps context fresh and cheap |\n\n### ❌ Anti-Patterns\n\n| Anti-Pattern | Why It Fails | Fix |\n|-------------|-------------|-----|\n| Giant MEMORY.md (1000+ lines) | Expensive to load, hard to find things | Split into topic files |\n| Never pruning ACTIVE-CONTEXT | Stale items cause confusion | Prune daily, archive weekly |\n| Transcribing conversations verbatim | Wastes tokens, buries signal | Summarize: essence, not every word |\n| Storing secrets in memory files | Security risk | Use secrets manager, reference by name |\n| Reading all files every session | Token burn, slow startup | Progressive loading strategy |\n| No daily notes | History is lost | Discipline: one file per day |\n| Multiple sources of truth | Conflicts, confusion | Single source per fact type |\n\n---\n\n## 15. Migration Guide\n\n### From No Memory System\n\n```\nDay 1: Create MEMORY.md with basic info about human + agent\nDay 2: Start daily notes (memory\u002FYYYY-MM-DD.md)\nDay 3: Create ACTIVE-CONTEXT.md\nWeek 2: First weekly review — extract lessons to MEMORY.md\nMonth 2: Create first topic files for recurring subjects\nQuarter 2: First archive cycle\n```\n\n### From MEMORY.md-Only System\n\n```\n1. Create memory\u002F directory\n2. Start daily notes — stop putting raw events in MEMORY.md\n3. Create ACTIVE-CONTEXT.md — move \"current\" stuff out of MEMORY.md\n4. Review MEMORY.md — what's curated vs what's raw? Move raw to daily notes.\n5. Identify topics that deserve their own files — split them out\n```\n\n### From External Tool (Database, API, Cloud)\n\n```\n1. Export key data to markdown files\n2. Structure into the 5-layer architecture\n3. Set up heartbeat maintenance schedule\n4. Gradually reduce dependency on external tool\n5. Benefits: zero cost, zero dependencies, works offline, no vendor lock-in\n```\n\n---\n\n## 16. Natural Language Commands\n\n- `\u002Fmemory-status` — Show memory system health: file sizes, line counts, staleness, next maintenance\n- `\u002Fmemory-review` — Run weekly review: scan daily notes, extract to MEMORY.md, prune active context\n- `\u002Fmemory-search [query]` — Search across all memory layers for a topic\n- `\u002Fmemory-archive` — Run quarterly archive: summarize old daily notes, create archive file\n- `\u002Fremember [fact]` — Immediately write a fact to MEMORY.md\n- `\u002Factive-context` — Show current ACTIVE-CONTEXT.md contents\n- `\u002Fdaily-summary` — Generate summary of today's daily notes\n- `\u002Ftopic-create [name]` — Create a new topic file with template\n- `\u002Fmemory-prune` — Audit all memory files for staleness and bloat\n- `\u002Fhandoff` — Write HANDOFF.md for session transition\n- `\u002Fmemory-migrate` — Guided migration from current system to this architecture\n- `\u002Fmemory-debug` — Diagnose memory issues: missing files, conflicts, outdated info\n",{"name":5,"metadata":24,"description":7},{"skills":25,"category":27},[26,27,28,29,30,31,32],"memory","agent","context","persistence","knowledge-management","openclaw","productivity","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fa\u002Fafrexai-agent-memory",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"Agent Memory Architecture\"",{"tool":48,"command":49},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"Agent Memory Architecture\"",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"Agent Memory Architecture\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fa\u002Fafrexai-agent-memory\u002FSKILL.md",true,[],[57,65,72,79,86,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":64},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":64},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":64},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":64},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":64},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":64},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]