-
Notifications
You must be signed in to change notification settings - Fork 0
feat: introduce /recall skill for reliable memory retrieval #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Replace MCP subprocess approach with persistent Chroma HTTP server for improved performance and reliability. This re-enables Chroma on Windows by eliminating the subprocess spawning that caused console popups. Changes: - NEW: ChromaServerManager.ts - Manages local Chroma server lifecycle via `npx chroma run` - REFACTOR: ChromaSync.ts - Uses chromadb npm package's ChromaClient instead of MCP subprocess (removes Windows disabling) - UPDATE: worker-service.ts - Starts Chroma server on initialization - UPDATE: GracefulShutdown.ts - Stops Chroma server on shutdown - UPDATE: SettingsDefaultsManager.ts - New Chroma configuration options - UPDATE: build-hooks.js - Mark optional chromadb deps as external Benefits: - Eliminates subprocess spawn latency on first query - Single server process instead of per-operation subprocesses - No Python/uvx dependency for local mode - Re-enables Chroma vector search on Windows - Future-ready for cloud-hosted Chroma (claude-mem pro) - Cross-platform: Linux, macOS, Windows Configuration: CLAUDE_MEM_CHROMA_MODE=local|remote CLAUDE_MEM_CHROMA_HOST=127.0.0.1 CLAUDE_MEM_CHROMA_PORT=8000 CLAUDE_MEM_CHROMA_SSL=false Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated chromadb from ^1.9.2 to ^3.2.2 (includes CLI binary) - Changed heartbeat endpoint from /api/v1 to /api/v2 The 1.9.x version did not include the CLI, causing `npx chroma run` to fail. Version 3.2.2 includes the chroma CLI and uses the v2 API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added @chroma-core/default-embed dependency for local embeddings - Updated ChromaSync to use DefaultEmbeddingFunction with collections - Added isServerReachable() async method for reliable server detection - Fixed start() to detect and reuse existing Chroma servers - Updated build script to externalize native ONNX binaries - Added runtime dependency to plugin/package.json The embedding function uses all-MiniLM-L6-v2 model locally via ONNX, eliminating need for external embedding API calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wire tenant, database, and API key settings into ChromaSync for remote/pro mode. In remote mode: - Passes tenant and database to ChromaClient for data isolation - Adds Authorization header when API key is configured - Logs tenant isolation connection details Local mode unchanged - uses default_tenant without explicit params. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
What the
|
Greptile OverviewGreptile SummaryThis PR introduces the Key Changes:
2-Step Workflow:
This achieves ~10x token savings compared to bulk loading while maintaining full context retrieval capabilities. Architecture Improvements:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Claude
participant RecallSkill as /recall Skill
participant SearchAPI as /api/search
participant RecallAPI as /api/recall
participant SearchMgr as SearchManager
participant SessionStore as SessionStore
participant ChromaDB as ChromaDB
User->>Claude: "How did we fix the auth bug?"
Claude->>RecallSkill: Invokes /recall skill
Note over Claude,RecallAPI: Step 1: Search for relevant memories
Claude->>SearchAPI: GET /api/search?query=auth+bug&limit=15
SearchAPI->>SearchMgr: search(query, limit)
SearchMgr->>ChromaDB: queryChroma(query, 100)
ChromaDB-->>SearchMgr: vector search results (IDs only)
SearchMgr->>SessionStore: Get metadata for IDs
SessionStore-->>SearchMgr: titles, types, dates
SearchMgr-->>SearchAPI: Index (~100 tokens/result)
SearchAPI-->>Claude: [ID, Title, Type, Date] list
Note over Claude: Claude reviews index and<br/>decides which memories<br/>are relevant
Note over Claude,RecallAPI: Step 2: Fetch full details for selected IDs
Claude->>RecallAPI: GET /api/recall?ids=234,567,891
RecallAPI->>SearchMgr: recall([234,567,891])
SearchMgr->>SessionStore: getObservationsByIds([234,567,891])
SessionStore-->>SearchMgr: Full observation records
SearchMgr-->>RecallAPI: Formatted markdown (~500 tokens/result)
RecallAPI-->>Claude: Full memory narratives
Claude->>User: Answers question using<br/>retrieved context
|
The 3-layer memory system (search → timeline → get_observations) is powerful but wasn't being used due to friction and poor prompting. This PR wraps the workflow into a single /recall skill that: 1. Prompts Claude with clear trigger conditions for when to use it 2. Bundles the 2-step workflow (search index → fetch selected IDs) 3. Preserves token efficiency by letting Claude decide what to fetch 4. Updates context injection with assertive prompting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move from plugin/commands/recall.md to plugin/skills/recall/SKILL.md for proper Claude Code skill discovery. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add instructions for getting the shorter /recall command by copying to personal skills directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added comprehensive documentation for the /recall skill: - Explains the 2-step prompted workflow (search → fetch) - Documents token efficiency (~10x savings) - Shows invocation options (/recall vs /claude-mem:recall) - Includes installation instructions for personal skills Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bb75919 to
4108e57
Compare
Summary
/recallskill for token-efficient memory retrieval using 2-step workflow/api/recallendpoint to worker serviceSkill Invocation
/claude-mem:recall/recall: copy to~/.claude/skills/recall/SKILL.mdTest plan
/recallskill discovery🤖 Generated with Claude Code