This page is a design/reference spec. Release truth lives in the runtime capability manifest and shipped product docs.
Context Engine Specification
Current Implementation State
Implemented:
- recursive file indexing
- extension-based type classification
- language detection for known extensions
- simple query search over path/content
- aggregate context statistics and health score
Reference: packages/core/src/context.ts
Current Limitations
- in-memory map storage only
- no persistent embedding index
- limited semantic relevance ranking
- large-file content skip threshold is fixed
Target State
- persistent index store with incremental updates
- semantic retrieval path for richer context grounding
- configurable file limits and ignore policies
- richer metadata extraction for artifacts
Public Contract
Primary operations:
addPath(path)getStats()search(query)clear()
Data Model
Entry fields:
- id
- type (
code|document|image|design|data) - absolute and relative paths
- metadata including size, extension, modified time, language, lines
Performance Targets
- index medium repository (<5k files) in acceptable local time
- keep memory footprint bounded by configurable limits
Acceptance Criteria
- deterministic indexing for same input set
- search returns stable results for repeated query
- ignore rules consistently applied