Four ambitious features dispatched in parallel (4 agents) + empirical tests
+ full documentation in docs/V1.1_FEATURES.md.
1. Semantic episodic memory (src/coding_agent/memory/):
- JSONL vector store at ~/.pi/memory/memory.jsonl
- mlx-lm Metal embeddings with bag-of-words fallback
- LLM-driven fact extraction from sessions (type + confidence)
- Top-k cosine retrieval, format_for_prompt for injection
- 17 unit tests + 2 empirical
2. Speculative decoding (src/max_brain/speculative.py):
- mlx-lm draft_model= integration
- generate_speculative, stream_speculative, benchmark_speculative
- Graceful fallback when draft unavailable
- 12 unit tests + 2 empirical
3. KV cache persistence (src/max_brain/kv_cache.py):
- Per-layer .npz save/load under ~/.pi/sessions/<uuid>/kv_cache/
- meta.json with {model, token_count, layer_count, sha256, bytes}
- estimate_cache_size, list_cached_sessions, delete_kv_cache
- 13 unit tests + 2 empirical
4. TurboQuant KV cache quantization (src/max_brain/turboquant.py):
- MLX mx.quantize at 2/3/4/8-bit with random orthogonal rotation
- Empirical 3.56× reduction at 4-bit (MAE 7% of RMS)
- Empirical 6.4× reduction at 2-bit
- Composes with KV persistence
- 12 unit tests + 3 empirical
Test count: 264 unit + 9 empirical (7 pass, 2 skip).
Docs:
- docs/V1.1_AMBITIOUS.md — planning / parallelization plan
- docs/V1.1_FEATURES.md — full design, API, empirical numbers
VERSION bumped to 1.1.0; STATUS.md and CHANGELOG.md updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>