BREAKING. memwalk is no longer a personal-activity recorder; it's
an AI tool for asking questions about any codebase, with cached
SSM state per directory.
What's gone
-----------
- sources/git.py, sources/bash.py — personal activity collectors
- snapshot.py — daily snapshot rotation
- ingest.py — orchestration tied to git+bash use case
- standup / update CLI commands
- All v0.1 config keys (scan_paths, bash settings, bootstrap_days)
What's new
----------
- corpus.py — walk a codebase, filter source files, build a single
ingest-ready text block with a stable manifest hash
for cache invalidation.
- cache.py — per-directory cached state + sidecar metadata JSON.
Cache key = sha256(abs_path)[:16]; freshness check =
manifest hash over (rel_path, size, mtime_ns).
- engine.py — shared digest/ask orchestration used by both CLI
and MCP server.
- cli.py — init, digest, ask, list, drop, status, mcp.
- mcp_server.py — tools: digest, ask, list_caches, drop_cache, status.
- config.py — drastically simplified (just model+inference defaults).
The MCP server still ships as `memwalk mcp` and works the same way with
Claude Code / opencode.
Validated on memwalk's own source: digest in ~4s, ask answers in ~3s
(model+state load) including "list CLI commands", "where is cache
stored, what filename pattern", "how does cache invalidation work" —
all accurate down to specific details (sha256 length, file extensions,
metadata field semantics).
memba dep installed via git URL until both packages reach PyPI.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
New `memwalk mcp` subcommand starts a stdio MCP server exposing four
tools: ask, standup, status, update. The underlying memba Session is
loaded lazily on the first call that needs the model, then reused for
the lifetime of the process — first query ~2s, subsequent <500ms.
- memwalk/mcp_server.py — Server + tool list/dispatch using mcp SDK
- memwalk/cli.py — `memwalk mcp` subcommand wires it up
- pyproject.toml — mcp>=1.0.0 dependency
- README.md — setup instructions for Claude Code and opencode
Verified locally: tools/list returns all 4, tools/call status returns
the expected JSON without loading the model.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Config in ~/.memwalk/config.toml (typer init writes it)
- Sources: git log walker + bash history parser with secret/noise filters
- Ingest orchestrator feeds events into a memba Session and saves
~/.memwalk/current.memb via the rewritten Session.chat() that preserves
loaded state (raw eval+sample, no KV-cache reset)
- Daily snapshot rotation under ~/.memwalk/snapshots/
- CLI commands: init, update, ask, standup, status, prune
Validated on Nemotron-3-Nano-4B Q4_K_M end-to-end: ingest 304 events
(303 commits + 1 shell session) in 2.8s on GPU, recall in fresh process
returns accurate per-project summaries.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>