Location: universal-refiner/src/memory/
This module provides the "Long-term Memory" for the refiner. it uses RAG (Retrieval Augmented Generation) to inject project-specific code snippets and patterns into prompts.
- neural-snippets.ts: Implements the RAG system. Searches the local codebase for relevant snippets.
- local-brain.ts: Manages persistent project-level engineering mandates and learned patterns.
- Snippet Precision: Prioritize high-signal files (main entry points, core logic) over boilerplate when retrieving snippets.
- Pattern Persistence: All patterns learned via
discover_rulesmust be saved tolocal-brain.ts. - Consistency: Ensure injected mandates match the current project's
GEMINI.mdwhere possible.