[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74307":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},74307,"claude-memory-compiler","coleam00\u002Fclaude-memory-compiler","coleam00","Give Claude Code a memory that evolves with your codebase. Hooks automatically capture sessions, the Claude Agent SDK extracts key decisions and lessons, and an LLM compiler organizes everything into structured, cross-referenced knowledge articles - inspired by Karpathy's LLM Knowledge Base architecture.",null,"Python",1143,299,17,12,0,13,31,110,39,20.43,false,"main",true,[],"2026-06-12 02:03:25","# LLM Personal Knowledge Base\n\n**Your AI conversations compile themselves into a searchable knowledge base.**\n\nAdapted from [Karpathy's LLM Knowledge Base](https:\u002F\u002Fgist.github.com\u002Fkarpathy\u002F442a6bf555914893e9891c11519de94f) architecture, but instead of clipping web articles, the raw data is your own conversations with Claude Code. When a session ends (or auto-compacts mid-session), Claude Code hooks capture the conversation transcript and spawn a background process that uses the [Claude Agent SDK](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-agent-sdk) to extract the important stuff - decisions, lessons learned, patterns, gotchas - and appends it to a daily log. You then compile those daily logs into structured, cross-referenced knowledge articles organized by concept. Retrieval uses a simple index file instead of RAG - no vector database, no embeddings, just markdown.\n\nAnthropic has clarified that personal use of the Claude Agent SDK is covered under your existing Claude subscription (Max, Team, or Enterprise) - no separate API credits needed. Unlike OpenClaw, which requires API billing for its memory flush, this runs on your subscription.\n\n## Quick Start\n\nTell your AI coding agent:\n\n> \"Clone https:\u002F\u002Fgithub.com\u002Fcoleam00\u002Fclaude-memory-compiler into this project. Set up the Claude Code hooks so my conversations automatically get captured into daily logs, compiled into a knowledge base, and injected back into future sessions. Read the AGENTS.md for the full technical reference on how everything works.\"\n\nThe agent will:\n1. Clone the repo and run `uv sync` to install dependencies\n2. Copy `.claude\u002Fsettings.json` into your project (or merge the hooks into your existing settings)\n3. The hooks activate automatically next time you open Claude Code\n\nFrom there, your conversations start accumulating. After 6 PM local time, the next session flush automatically triggers compilation of that day's logs into knowledge articles. You can also run `uv run python scripts\u002Fcompile.py` manually at any time.\n\n## How It Works\n\n```\nConversation -> SessionEnd\u002FPreCompact hooks -> flush.py extracts knowledge\n    -> daily\u002FYYYY-MM-DD.md -> compile.py -> knowledge\u002Fconcepts\u002F, connections\u002F, qa\u002F\n        -> SessionStart hook injects index into next session -> cycle repeats\n```\n\n- **Hooks** capture conversations automatically (session end + pre-compaction safety net)\n- **flush.py** calls the Claude Agent SDK to decide what's worth saving, and after 6 PM triggers end-of-day compilation automatically\n- **compile.py** turns daily logs into organized concept articles with cross-references (triggered automatically or run manually)\n- **query.py** answers questions using index-guided retrieval (no RAG needed at personal scale)\n- **lint.py** runs 7 health checks (broken links, orphans, contradictions, staleness)\n\n## Key Commands\n\n```bash\nuv run python scripts\u002Fcompile.py                    # compile new daily logs\nuv run python scripts\u002Fquery.py \"question\"            # ask the knowledge base\nuv run python scripts\u002Fquery.py \"question\" --file-back # ask + save answer back\nuv run python scripts\u002Flint.py                        # run health checks\nuv run python scripts\u002Flint.py --structural-only      # free structural checks only\n```\n\n## Why No RAG?\n\nKarpathy's insight: at personal scale (50-500 articles), the LLM reading a structured `index.md` outperforms vector similarity. The LLM understands what you're really asking; cosine similarity just finds similar words. RAG becomes necessary at ~2,000+ articles when the index exceeds the context window.\n\n## Technical Reference\n\nSee **[AGENTS.md](AGENTS.md)** for the complete technical reference: article formats, hook architecture, script internals, cross-platform details, costs, and customization options. AGENTS.md is designed to give an AI agent everything it needs to understand, modify, or rebuild the system.\n","该项目旨在为Claude Code提供一个随代码库演化的记忆系统，通过自动捕获会话、提取关键决策和教训，并将其编译成结构化且相互引用的知识文章。核心功能包括使用Claude Agent SDK自动提取重要信息并记录到每日日志中，随后将这些日志编译成易于检索的知识库，整个过程无需依赖向量数据库或嵌入技术，仅使用Markdown文件进行组织与索引。适用于需要长期维护复杂代码库的开发者，特别是那些希望通过AI助手提高工作效率和知识管理能力的技术团队。",2,"2026-06-11 03:49:54","high_star"]