stemedb/.claude/commands/implement-lens.md
jordan 3cfaa1e1d3 feat: Complete Phase 1 (The Spine) - storage foundation
Phase 1 delivers the complete durability and storage layer:

- WAL with crash recovery: Append-only journal with BLAKE3 checksums,
  fsync guarantees, and proper seek-to-EOF on reopen
- Storage engine: sled-backed KVStore with scan_prefix for range queries
- Content-addressed storage: H:{hash}, V:{hash}, E:{hash} key patterns
- Ingestor: Background worker tailing WAL, writing to KV with 8-byte
  aligned record headers for rkyv zero-copy deserialization
- Comprehensive tests: 31 tests covering crash recovery, round-trips,
  and multi-cycle durability

New crates: stemedb-wal, stemedb-storage, stemedb-ingest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:15:34 -07:00

555 B

description
Scaffold a new Lens implementation

I need to implement a new Lens. Use the stemedb-lens-architect agent.

Usage: /implement-lens "LensName" "Description"

Steps:

  1. Design: Propose the logic for the lens (Ranking vs Filtering).
  2. Scaffold: Create the file in crates/stemedb-core/src/lens/<name>.rs.
  3. Trait: Ensure it implements the Lens trait.
  4. Test: Generate unit tests for tie-breaking and edge cases.
  5. Document: Add entry to ai-lookup/services/lens.md with the new lens strategy.