feat: cross-session memory via MCP memory server#104
feat: cross-session memory via MCP memory server#104DavidROliverBA wants to merge 1 commit intotractorjuice:mainfrom
Conversation
Add @anthropic-ai/claude-code-mcp-memory integration for persisting project decisions, vendor insights, review outcomes, and session summaries across Claude Code sessions. Entities are stored in .arckit/memory.jsonl within the project directory. - Add memory MCP server to plugin .mcp.json (stdio, project-local storage) - Create session-learner.mjs hook (Stop) that analyses recent git commits, detects artifact types, classifies session type, and writes JSON manifests - Enhance arckit-session.mjs to read pending memory manifests on start and surface them as context for Claude to process via MCP create_entities - Auto-allow mcp__memory__* tools in allow-mcp-tools.mjs - Add memory-search.mjs for unified search across active memory and archive - Add memory-prune.mjs for ephemeral entity pruning with markdown archival - Add cross-session-memory.md guide with entity types, design principles, write triggers, size management, and troubleshooting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review: PR #104 vs Claude Code Built-in Auto MemoryClaude Code now ships with a built-in auto memory system ( What auto memory already does natively (zero config, built-in)
What this PR adds beyond auto memory
Concerns
RecommendationTwo options to consider: Option A — Adapt to auto memory: Strip down to just the Option B — Close and document: Close the PR and instead document how to use Claude Code's built-in auto memory with ArcKit-specific topic file conventions (e.g., Either way, the session-learner hook concept (auto-capturing what happened via git analysis) is genuinely useful — it's the MCP server layer on top that's now redundant. |
Summary
Adds cross-session memory to ArcKit using the
@anthropic-ai/claude-code-mcp-memoryMCP server. This allows Claude to persist and recall project decisions, vendor insights, research findings, and session summaries across sessions.session-learner.mjs): Stop hook that analyses recent git commits, detects ArcKit artifact types (REQ, ADR, HLDR, etc.), classifies the session (governance/research/procurement/review/general), and writes JSON manifestsarckit-session.mjsnow reads pending manifests and surfaces them as context, instructing Claude to process viamcp__memory__create_entities.mcp.jsonwith auto-allow formcp__memory__*toolsmemory-search.mjsprovides unified search across active memory and markdown archivememory-prune.mjsprunes ephemeralSessionSummaryentities while archiving to markdownArchitecture
MCP tools are not available inside hooks, hence the two-stage manifest approach.
Entity Types
ProjectDecisionVendorInsightReviewOutcomeResearchFindingRecurringRequirementLessonLearnedSessionSummaryFiles Changed
arckit-plugin/.mcp.jsonarckit-plugin/hooks/session-learner.mjsarckit-plugin/hooks/arckit-session.mjsarckit-plugin/hooks/allow-mcp-tools.mjsmcp__memory__prefixarckit-plugin/hooks/hooks.jsonarckit-plugin/scripts/memory-search.mjsarckit-plugin/scripts/memory-prune.mjsdocs/guides/cross-session-memory.mdTest plan
.arckit/— verify no errors from session hookpending-*.jsoncreated in.arckit/memory/memory-search.mjs --stats— verify statistics outputmemory-prune.mjs --dry-run— verify preview outputmcp__memory__*tools auto-allowed without permission prompt🤖 Generated with Claude Code