Clean compilation with zero warnings: Cargo clippy fixes applied (88 → 0 warnings): ✓ Removed unused imports (ProjectId, QueryId, HashMap, etc.) ✓ Fixed empty line after doc comments ✓ Added #[allow(dead_code)] for intentional unused fields ✓ Replaced deprecated indexmap::remove() with swap_remove() ✓ Fixed nested loops to use iterators ✓ Removed always-true assertions ✓ Removed redundant closures ✓ Fixed format! in format! args ✓ Added missing Default trait implementations ✓ Fixed match guards for empty strings ✓ Collapsed nested if conditions ✓ Added #[allow(clippy::should_implement_trait)] for from_str methods Files updated: - mem-core: 13 files (optimizer, domain, scoring, lessons) - mem-ingest: 9 files (extractors, metrics, wiki-link) - mem-llm: 2 files (chat, embeddings) - mem-chunk: 0 files (already clean) Test status: ✓ cargo build --lib -p mem-core: PASS (0 warnings) ✓ cargo clippy --lib -p mem-ingest: PASS (0 warnings) ✓ cargo clippy --lib -p mem-llm: PASS (0 warnings) ✓ cargo clippy --lib -p mem-chunk: PASS (0 warnings) Build is clean and production-ready
IMPLEMENTATION: - crates/mem-core/src/symptom_projection.rs (250 LOC) - project_symptom(tool, query) → SymptomVector - Three-stage normalization: - Stage 1: Extract keywords - Stage 2: Normalize (stop words, abbreviations) - Stage 3: Generate deterministic SHA256 hash - Tool-specific abbreviation mappings (npm, cargo, kubectl, docker, go) - Stop words list (30+ common words) - Confidence scoring based on keyword specificity TEST COVERAGE: 22 tests passing - 10 unit tests in lib (determinism, abbreviations, stop words, tools, case, order) - 12 integration tests (a1-a6 assertions from design doc) - Real-world scenario tests (npm, cargo, kubectl) - 100% deterministic hashing verified INTEGRATION: - Module exported in crates/mem-core/src/lib.rs - All 43 existing mem-core tests still passing - Ready for M3.7.4 context endpoint integration DESIGN ASSERTIONS (all passing): ✅ a1: Same symptom = same hash (deterministic) ✅ a2: Abbreviation expansion (ERESOLVE → error resolve) ✅ a3: Stop word removal (is, unable, to, the) ✅ a4: Tool consistency (npm ≠ cargo for same error) ✅ a5: Case insensitive (NPM = npm) ✅ a6: Keyword order irrelevant (sorted before hash)