Use this map to find the right PR boundary before opening the large files.
crates/mem-api: shared request/response types, config loading, validation helpers, and public API contracts.crates/mem-cli: thememorybinary, CLI command routing, TUI, setup wizard, eval runner orchestration, and local service tooling.crates/mem-service: HTTP service runtime, routes, repository reads, migrations entrypoint, activity persistence, and service-mounted MCP.crates/mem-search: query retrieval, lexical/semantic/graph merging, answer synthesis, citations, and query diagnostics.crates/mem-curate: raw capture curation, memory replacement proposals, curation policies, and memory write shaping.crates/mem-graph: repository index graph extraction, symbol/reference storage, and graph status.crates/mem-watch: watcher daemon and automation capture logic.crates/mem-mcp: read-only MCP protocol adapter over the service HTTP API.crates/mem-eval: eval suite schemas, scoring, comparisons, gates, and report rendering.crates/mem-test-support: pgvector-backed integration test harness.
crates/mem-cli/src/tui.rs: TUI orchestration and tab rendering. Pure helpers are being split undercrates/mem-cli/src/tui/.web/src/App.tsx: browser UI shell, project selection, polling, and feature composition.web/src/features/: extracted browser feature tabs.web/src/api.ts: browser API boundary. Keep fetch details here instead of scattering endpoint strings.
- Add a CLI command: update
crates/mem-cli/src/main.rsorcrates/mem-cli/src/commands/, add help metadata, add adocs/user/cli/*.mdpage, and extend command-help tests. - Add a service endpoint: add types in
mem-api, route/service logic inmem-service, tests in the touched crate, and client wiring where needed. - Change query ranking: update
mem-search, preserve diagnostics, and add tests for result ordering or explanation fields. - Change memory curation: update
mem-curate, replacement proposal behavior, memory type docs, and database tests when persistence changes. - Change the TUI: keep tab behavior localized; extract pure rendering helpers before moving state.
- Change the web UI: extract feature components under
web/src/features/<feature>/, add a component smoke test, then build. - Change eval behavior: update
mem-evalfor schema/scoring andmem-clifor execution. Use--allow-shellfor real shell suites and keep production query code separate from research adapters. - Add a migration: create a new numbered file in
migrations/; never edit a migration that may already have been applied.
Start with the narrowest useful command:
cargo test -p mem-cli --all-targets --locked
cargo test -p mem-service --all-targets --locked
cargo test -p mem-eval --all-targets --locked
npm --prefix web run test
npm --prefix web run buildBefore release or broad refactors:
cargo fmt --check
cargo test --workspace --all-targets --locked
cargo clippy --workspace --all-targets --locked -- -D warningsFor DB-sensitive work, also run the pgvector-backed tests described in CONTRIBUTING.md.