feat(memory): note, status, and read_memory MCP tool — kill agent cold-start#233
Merged
Merged
Conversation
…d-start
Add the Phase 1.5 memory tools (targets v6.16.0) so an agent can recall what
was being worked on across sessions without re-scanning the repo:
- src/session/notes.js: append-only decision log at .context/notes.ndjson
(text + ISO timestamp + git branch). addNote/readNotes/formatNotes/clearNotes.
- sigmap note "<text>": append a note; bare 'note' lists recent (--list N,
--json). Value-flag-aware positional parsing so --cwd never leaks into text.
- sigmap status: branch (unborn-branch fallback), dirty-file count, last index
run + staleness (tracked files modified since), notes summary. --json.
- read_memory MCP tool (11th): recent notes + last ask() session focus.
Registered in tools.js/handlers.js/server.js; bundled for the standalone
binary (verified over the MCP wire in a no-src run).
- Bundle: re-synced mcp/{tools,handlers,server} factories from src and inserted
src/session/notes; build pre-flight passes.
- Tests: test/integration/memory-tools.test.js (13 cases); update MCP tool-count
gates 10 -> 11; wire memory-tools into test:integration; fix pre-existing
broken mcp-server.test.js path.
- Docs: docs-vp/guide/memory.md + sidebar; CHANGELOG [Unreleased].
# Conflicts: # CHANGELOG.md # gen-context.js # package.json
…sion.json + mcp.md CI auto-discovers all integration tests; several asserted the old 10-tool count outside test/integration/mcp/. Update impact.test.js, retrieval.test.js, version-json.test.js (mcp_tools 10->11), and docs-sync.test.js, plus the mcp.md guide (counts + read_memory row + example list) and version.json.
This was referenced Jun 9, 2026
lguzzon
pushed a commit
to lguzzon-scratchbook/sigmap
that referenced
this pull request
Jun 10, 2026
- CHANGELOG: v6.15.0 section (verify-ai-output Reliable MVP manojmallick#232 + Memory tools manojmallick#233); version synced across package.json ×3, gen-context.js, src/mcp/server.js, version.json (mcp_tools 11). - Benchmarks re-run (sigmap-v6.15-main, 2026-06-09): token reduction 97.1%, hit@5 75.6%, lift 5.6x, task success 51.1%, prompt reduction 39.0%, 1.73 prompts/task. Propagated to version.json, README, index hero, benchmark/retrieval/quality/task guides, generalization, compare-alternatives, methodology, how-i-built, and the comparison-chart + impact-banner SVGs. - Docs: new CLI sections (note, status, verify-ai-output --report); mcp.md read_memory (11 tools); roadmap v6.15.0 entry + next-milestone; memory guide. - Tests: content-consistency gates (readme-structure, version-json, docs-sync) updated to the new metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Targets v6.16.0 (Phase 1.5). Implements the Memory milestone from
.personal/BACKEND_IMPLEMENTATION.md— closes the cold-start gap so an agent can recall what we were doing and why without re-scanning the repo.What's in it
sigmap note "<text>"— append to a cross-session decision log stored as append-only NDJSON at.context/notes.ndjson(text + ISO timestamp + git branch). Barenotelists recent (--list <N>,--json). Positional parsing is value-flag-aware so--cwd <dir>never leaks into the note text. New modulesrc/session/notes.js.sigmap status— repo state at a glance: branch (with unborn-branchsymbolic-reffallback), dirty-file count, last index run (time/version/file-count) with a staleness signal (tracked files modified since the last index), and notes summary.--jsonsupported.read_memoryMCP tool (11th) — returns recent notes (most-recent first) plus the lastasksession focus, formatted for agents. Registered intools.js/handlers.js/server.js.Bundle —
--mcpruns the server from__require('./src/mcp/server')(always the bundle), so themcp/{tools,handlers,server}factories were re-synced fromsrc/andsrc/session/notesinserted. Verified over the MCP wire in a no-src/binary-equivalent run (11 tools,read_memoryreturns a seeded note). Build pre-flight passes.Tests
test/integration/memory-tools.test.js— 13 cases: notes store (append/read/limit/corrupt-line/clear),note/statusCLI (incl. the--cwd-leak regression), andread_memoryover the MCP wire.get-lines/server/tools-v14tests (+ assertread_memorypresent).npm run test:integration; fixed a pre-existing brokenmcp-server.test.jspath →mcp/server.test.js.npm test,npm run test:integration, all MCP tests, and the VitePress docs build pass.Notes
.context/state convention (not.sigmap/as the plan draft said) and NDJSON pattern; complementssrc/session/memory.jsrather than duplicating it.6.16.0) + CHANGELOG header left to/update-docsat release.🤖 Generated with Claude Code