Core Concepts
Understanding how Keystone processes and organizes your codebase knowledge
Memory Engine
At the heart of Keystone is the Memory Engine, a pipeline that transforms raw git activity into structured, searchable knowledge.
How it works
- Webhook reception: when you push to a connected repository, GitHub sends a webhook event to Keystone
- Diff analysis: Keystone fetches the commit diffs and analyzes the changes
- Synthesis: an AI model extracts decisions, trade-offs, and rationale from the changes
- Embedding: the synthesized knowledge is converted into vector embeddings for semantic search
- Storage: embeddings are stored and indexed for fast retrieval
What gets extracted
Keystone focuses on the intent behind changes, not just the code itself:
- Architectural decisions: why a particular pattern or library was chosen
- Trade-offs: what alternatives were considered and why they were rejected
- Design patterns: recurring approaches and conventions in the codebase
- Migration rationale: why things were changed from one approach to another
Semantic Search
Keystone uses vector embeddings to enable natural language search across your codebase history. Instead of keyword matching, it understands the meaning behind your questions and finds relevant context.
This means you can ask "why is the auth flow complex?" and get results about authentication decisions, even if those commits never used the word "complex."
Agent Chat
The Agent Chat is your interface to Keystone's knowledge. It uses retrieval-augmented generation (RAG) to:
- Convert your question into a semantic query
- Find the most relevant pieces of codebase knowledge
- Generate a response grounded in actual commits and changes
The agent has full context of your repository's history and can connect dots across different parts of the codebase.