Expand description
Context builder service.
Builds context for Claude Code hooks, selecting the most relevant memories.
StructsΒ§
- Context
Builder Service - Service for building context for AI assistants.
- Memory
Statistics - Statistics about memories in the system.
ConstantsΒ§
- CONTEXT_
DECISIONS_ πLIMIT - Maximum memories to fetch for decisions (high priority).
- CONTEXT_
PATTERNS_ πLIMIT - Maximum memories to fetch for patterns.
- CONTEXT_
PROJECT_ πLIMIT - Maximum memories to fetch for project context.
- CONTEXT_
TECH_ πDEBT_ LIMIT - Maximum memories to fetch for tech debt.
- MAX_
TOPICS π - Maximum topics to track.
- MAX_
TOPIC_ πDISPLAY_ LENGTH - Maximum length for topic display.
- MEMORY_
CONTENT_ πPREVIEW_ LENGTH - Maximum length for memory content preview in formatted output.
- RECENT_
MEMORIES_ πLIMIT - Maximum recent memories to fetch for statistics.
- SEARCH_
RESULT_ πLIMIT - Default search result limit.
- TOKENS_
PER_ πCHAR - Tokens per character approximation (for context truncation).
- TOPIC_
WORDS_ πLIMIT - Maximum words to extract for topic summary.
- TOP_
TAGS_ πLIMIT - Maximum top tags to return.
FunctionsΒ§
- add_
topic_ πif_ unique - Adds a topic to the list if itβs unique and list has space.
- extract_
topic π - Extracts a topic summary from memory content.
- format_
section π - Formats a section with a title and memories.
- truncate_
content π - Truncates content to a maximum length.
- truncate_
context π - Truncates context to fit within a character limit.