feat: Sprint 22 — Purge + Doctor Modernization#4
Merged
Conversation
- memory purge <project>: bulk delete all memories for a project with confirmation prompt and orphan relation cleanup - doctor: detect SessionEnd, UserPromptSubmit hooks (info severity), hook type diversity check, info issues no longer reduce score - doctor: flag missing allowedMcpServers when MCP servers configured, flag sandbox without network config for HTTP MCP servers - fixer: auto-generate allowedMcpServers from configured server names - HookConfig.event widened to string to support all 28+ Claude Code events 309 tests + 54 benchmarks green.
When memory sync is configured (gist ID exists), automatically add a SessionEnd hook that pushes memories after each session. - memory install: adds SessionEnd push hook when sync is already set up - doctor: flags missing SessionEnd push hook (medium severity) - fixer: auto-adds the hook respecting placement (shared vs local) - parser: now reads hooks from settings.local.json too (bugfix) - readSyncConfig(): lightweight file-read only, no gh CLI discovery 312 tests + 54 benchmarks green.
- Doctor: hook analyzer detects SessionEnd (memory projects), MCP security checks for allowedMcpServers, fixer adds both - TUI: project purge via 'd' key, single remove via 'r', killed manual refresh - Push: guard against 0 memories (warn and bail instead of empty gist) - Header: responsive layout (hides chips on narrow terminals) - Killed CLI purge subcommand (TUI handles single + bulk delete) - Updated backlog with sync hardening items
- DashboardDataSource unit tests (purge, delete, filtering, stats) - Regression test script moved from /tmp to tests/regression/ - Doc updates: doctor.mdx, memory.mdx, README, landing page - Content review fixes across all surfaces - Convention rule: evaluate landing page, docs, README on every content change - Fix mutation violation in addSessionEndPushHook
…tion - Add SessionStart pull hook (runs before context injection) when sync configured - Switch MCP registration from --scope user to --scope project (writes .mcp.json) - Local placement uses --scope local, shared uses --scope project - Parser reads .mcp.json for MCP server detection (standard Claude Code pattern) - Broaden hasMemoryIndicators to detect via tool permissions and hooks as fallback - Doctor analyzer flags missing pull hook when sync configured, fixer auto-repairs - 322 unit tests (4 new) + 21 regression tests (3 new)
- memory.mdx: --scope user → --scope project/local, document .mcp.json - memory.mdx: add pull hook and sync hooks to doctor integration section - README: mention .mcp.json as MCP config location
- getMemoryPlacement infers placement from existing agentic-memory permissions instead of prompting on every --fix for pre-existing installs - addAllowedMcpServers reads .mcp.json (not just settings.json), respects placement routing, and fixes analyzer name mismatch - SessionEnd push hook backgrounded with & to avoid timeout kill - Backlog: added dedup race condition entry
- Extract memory/MCP fix functions to fixer-memory.ts (fixer.ts: 536→392 lines) - Fix purge count showing filtered count instead of total project count - Add HookEvent type with SessionEnd to restore compile-time validation - Document auto-sync hooks, allowedMcpServers, and destructive keybindings - Clarify session lifecycle in memory.mdx (pull→inject→store→push)
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.
Summary
dkeybinding), single memory remove (r), responsive header, killed manual refresh + CLI purge commandallowedMcpServerscheck + auto-fixer (reads.mcp.json), hook analyzer cleanupgetMemoryPlacementinfers placement from existing config instead of prompting on every--fixfor pre-existing installs.mcp.jsonfor server names, respects shared/local placement routingStats
Test plan
pnpm test:run— 322 tests passpnpm bench:memory— 54 benchmarks passpnpm test:regression— doctor regression script passesclaude-launchpad doctor --fixon fresh project — all fixes apply correctlyclaude-launchpad doctor --fixon existing project — no spurious placement prompt/exitdpurges project,rremoves single memory🤖 Generated with Claude Code