feat: move development commands to plugin distribution (#666)

* feat: move development commands to plugin distribution

Move /do, /make-plan, and /anti-pattern-czar commands from project-level
.claude/commands/ to plugin/commands/ so they are distributed with the
plugin and available to all users as /claude-mem:do, /claude-mem:make-plan,
and /claude-mem:anti-pattern-czar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: Update CLAUDE.md and package version; fix bugs and enhance tests

- Updated CLAUDE.md to reflect changes and new entries for January 2026.
- Bumped package version from 9.0.2 to 9.0.3 in package.json.
- Refactored worker-service.cjs for improved error handling and process management.
- Added new bugfix documentation for critical issues identified on January 10, 2026.
- Cleaned up integration test logs and removed outdated entries in tests/integration/CLAUDE.md.
- Updated server test documentation to reflect recent changes and removed old entries.
- Enhanced hook response patterns and added new entries in hooks/CLAUDE.md.

* fix: keep anti-pattern-czar as internal dev tool

The anti-pattern-czar command relies on scripts that only exist in
the claude-mem development repository, so it shouldn't be distributed
with the plugin. Moving it back to .claude/commands/ for internal use.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-01-10 18:22:08 -05:00
committed by GitHub
parent 1d68e299dc
commit a2ab45a461
12 changed files with 131 additions and 239 deletions
+2 -20
View File
@@ -3,27 +3,9 @@
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
### Dec 21, 2025
### Nov 3, 2025
**test-analysis-report.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31743 | 10:36 PM | 🔵 | PR #412 proposes mode system with inheritance and multilingual support | ~523 |
### Dec 22, 2025
**test-analysis-report.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31865 | 6:56 PM | ✅ | 開発ドキュメントのクリーンアップをコミット | ~150 |
| #31864 | " | ✅ | 計画ドキュメントと分析ファイルの削除 | ~142 |
| #31859 | 6:55 PM | ✅ | 計画ドキュメントファイルの削除 | ~109 |
| #31855 | 6:53 PM | ✅ | テストスイートの大規模削除とテスト分析レポートの追加 | ~197 |
### Dec 25, 2025
**settings.json**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #32602 | 8:42 PM | 🔵 | Identified potential settings configuration files | ~224 |
| #3366 | 3:40 PM | 🔵 | Claude Mem MCP Search Architecture and Timeline Tool Capabilities | ~438 |
</claude-mem-context>
+7 -21
View File
@@ -5,30 +5,16 @@
### Oct 25, 2025
**changelog.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #2491 | 10:59 PM | 🟣 | Added changelog viewer slash command | ~290 |
| #2484 | 6:33 PM | 🔴 | Removed slash commands from incorrect root .claude/commands directory | ~268 |
### Jan 10, 2026
**terminal-shortcut.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #2480 | 6:32 PM | 🟣 | Cross-platform terminal shortcut command for claude-mem CLI | ~459 |
**setup-alias.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #2479 | 6:29 PM | 🟣 | Shell Alias Setup Slash Command | ~423 |
**version-bump.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #2358 | 1:07 PM | 🟣 | Created version-bump slash command for automated version updates | ~361 |
### Jan 1, 2026
**anti-pattern-czar.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #35638 | 11:17 PM | 🟣 | Anti-Pattern Czar Custom Command Created | ~583 |
| #39054 | 3:45 PM | 🔄 | Development commands removed from root .claude directory | ~249 |
| #39053 | " | 🟣 | Added development commands to plugin distribution | ~276 |
| #39051 | 3:44 PM | 🔵 | Development commands confirmed in .claude/commands/ | ~315 |
| #39049 | " | 🔵 | Development commands located in .claude/commands/ directory | ~293 |
</claude-mem-context>
+2 -57
View File
@@ -3,64 +3,9 @@
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
### Nov 10, 2025
### Jan 10, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #6276 | 12:58 PM | 🔴 | MCP Configuration Path Missing "plugin/" Directory Component | ~418 |
| #6274 | 12:57 PM | 🔵 | Installed MCP Configuration Uses Incorrect Path | ~389 |
| #6270 | " | 🔵 | MCP Search Server Enable/Disable Documentation | ~314 |
| #6253 | 12:55 PM | 🔵 | MCP Configuration Files Are Identical | ~311 |
| #6250 | 12:54 PM | 🔵 | MCP Search Server Connection Failure Reported | ~329 |
| #6249 | " | 🔴 | MCP Enable/Disable Implementation Overcomplicated | ~329 |
| #6244 | 12:50 PM | 🔴 | MCP search configuration persistence fixed in settings UI | ~378 |
| #6225 | 12:44 PM | 🔄 | Renamed MCP Template File from .optional to .template Convention | ~336 |
| #6217 | 12:40 PM | ✅ | MCP Documentation Updated to Reference UI Toggle | ~360 |
| #6214 | 12:39 PM | ✅ | Repository Cleanup - Removed Temporary Documentation Files | ~321 |
| #6201 | 12:28 PM | 🟣 | Created Quick Start Guide for Enabling MCP Search | ~338 |
| #6193 | 12:27 PM | 🟣 | Created Optional MCP Configuration File | ~313 |
| #6190 | " | 🟣 | Created optional MCP configuration file for user-controlled search server enablement | ~364 |
| #6189 | " | 🟣 | Created MCP search server enable/disable documentation | ~307 |
| #6183 | 12:26 PM | 🔵 | MCP Search Server Commented Out in Plugin Configuration | ~322 |
| #6180 | 12:25 PM | 🔵 | MCP configuration file current state | ~127 |
### Dec 10, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #23444 | 2:25 PM | 🟣 | Build Pipeline Execution Successful | ~293 |
### Dec 11, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #24055 | 2:55 PM | ✅ | Build Successful with Bun Runtime Shebangs | ~355 |
### Dec 14, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #26800 | 11:39 PM | ✅ | Version 7.2.3 Build Complete With Worker Restart Fix | ~394 |
| #26766 | 11:30 PM | ⚖️ | Root Cause Identified: Missing Post-Install Worker Restart Trigger in Plugin Update Flow | ~604 |
| #25815 | 5:31 PM | 🔵 | Comprehensive MCP Server and SKILL.md Structure Analysis | ~575 |
| #25813 | " | 🔵 | MCP Server Configuration with Stdio Transport | ~367 |
### Dec 16, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #27555 | 4:48 PM | ✅ | Version bump committed to main branch | ~242 |
| #27554 | " | ✅ | Project built successfully with version 7.3.1 | ~306 |
### Dec 17, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #28922 | 7:28 PM | 🔵 | Plugin MCP Server Configuration for mem-search | ~245 |
### Dec 19, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #30096 | 8:09 PM | 🔵 | Claude-Mem Plugin Includes MCP Server Configuration | ~246 |
| #39048 | 3:44 PM | 🔵 | Plugin directory contains commands folder | ~276 |
</claude-mem-context>
+18
View File
@@ -0,0 +1,18 @@
<claude-mem-context>
# Recent Activity
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
### Oct 25, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #2437 | 4:32 PM | 🟣 | Slash Command Files Created for Quick Settings Toggling | ~478 |
### Jan 10, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #39052 | 3:44 PM | 🟣 | Commands added to plugin distribution | ~268 |
| #39050 | " | 🔵 | Plugin commands directory is empty | ~255 |
</claude-mem-context>
+92
View File
@@ -0,0 +1,92 @@
# Bugfix Sprint: 2026-01-10
## Critical Priority (Blocks Users)
### #646 - Plugin bricks Claude Code - stdin fstat EINVAL crash
- **Impact**: Plugin completely bricks Claude Code on Linux. Users cannot recover without manual config editing.
- **Root Cause**: Bun's stdin handling causes fstat EINVAL when reading piped input
- **Related Discussion**: Check if this is a Bun upstream issue
- [ ] Investigate stdin handling in hook scripts
- [ ] Test on Linux with stdin piping
- [ ] Implement fix
### #623 - Crash-recovery loop when memory_session_id not captured
- **Impact**: Infinite loop consuming API tokens, growing queue unbounded
- **Root Cause**: memory_session_id not captured, causes repeated crash-recovery
- [ ] Add null/undefined check for memory_session_id
- [ ] Add circuit breaker for crash-recovery attempts
## High Priority
### #638 - Worker startup missing JSON output causes hooks to appear stuck
- **Impact**: UI appears stuck during worker startup
- [ ] Ensure worker startup emits proper JSON status
- [ ] Add progress feedback to hook output
### #641/#609 - CLAUDE.md files in subdirectories
- **Impact**: CLAUDE.md files scattered throughout project directories
- **Note**: This is a documented feature request that was never implemented (setting exists but doesn't work)
- [ ] Implement the `disableSubdirectoryCLAUDEmd` setting properly
- [ ] Or change default behavior to not create subdirectory files
### #635 - JSON parsing error prevents folder context generation
- **Impact**: Folder context not generating, breaks context injection
- **Root Cause**: String spread instead of array spread
- [ ] Fix the JSON parsing logic
- [ ] Add proper error handling
## Medium Priority
### #582 - Tilde paths create literal ~ directories
- **Impact**: Directories named "~" created instead of expanding to home
- [ ] Use path expansion for tilde in all path operations
- [ ] Audit all path handling code
### #642/#643 - ChromaDB search fails due to initialization timing
- **Impact**: Search fails with JSON parse error
- **Note**: #643 is a duplicate of #642
- [ ] Fix initialization timing issue
- [ ] Add proper async/await handling
### #626 - HealthMonitor hardcodes ~/.claude path
- **Impact**: Fails for users with custom config directories
- [ ] Use configurable path instead of hardcoded ~/.claude
- [ ] Respect CLAUDE_CONFIG_DIR or similar env var
### #598 - Too many messages pollute conversation history
- **Impact**: Hook messages clutter conversation
- [ ] Reduce verbosity of hook messages
- [ ] Make message frequency configurable
## Low Priority (Code Quality)
### #648 - Empty catch blocks swallow JSON parse errors
- [ ] Add proper error logging to catch blocks in SessionSearch.ts
### #649 - Inconsistent logging in CursorHooksInstaller
- [ ] Replace console.log with structured logger
- **Note**: 177 console.log calls across 20 files identified
## Won't Fix / Not a Bug
### #632 - Feature request for disabling CLAUDE.md in subdirectories
- **Note**: Covered by #641 implementation
### #633 - Help request about Cursor integration
- **Note**: Documentation/support issue, not a bug
### #640 - Arabic README translation
- **Note**: Documentation PR, not a bugfix
### #624 - Beta testing strategy proposal
- **Note**: Enhancement proposal, not a bugfix
## Already Fixed in v9.0.2
- Windows Terminal tab accumulation (#625/#628)
- Windows 11 compatibility - WMIC to PowerShell migration
- Claude Code 2.1.1 compatibility + path validation (#614)
---
**Recommended Approach**: Fix #646 first (critical blocker), then #623 (crash loop), then work through high priority issues in order of impact.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem-plugin",
"version": "9.0.2",
"version": "9.0.3",
"private": true,
"description": "Runtime dependencies for claude-mem bundled hooks",
"type": "module",
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -25,7 +25,6 @@
| #23075 | 6:26 PM | ✅ | Deleted Expired Announcement Code from user-message-hook.ts | ~354 |
| #23074 | " | ✅ | Replaced Verbose Manual Mode Help with Error in cleanup-hook.ts | ~222 |
| #23073 | " | ✅ | Removed cwd from cleanup-hook Debug Logging | ~177 |
| #23072 | " | ✅ | Simplified SessionEndInput Interface in cleanup-hook.ts | ~236 |
### Dec 10, 2025
@@ -97,4 +96,10 @@
| #38173 | 7:25 PM | 🔵 | Standard Hook Response Pattern for Non-SessionStart Hooks | ~343 |
| #38172 | 7:22 PM | 🔵 | Claude Code Hook Output Architecture Clarified - Exit Code Pattern is Correct for User-Only Display | ~523 |
| #38170 | 7:21 PM | 🔵 | User-Message-Hook TypeScript Source Shows Exit Code 1 Strategy for User-Only Display | ~203 |
### Jan 9, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #38783 | 4:59 PM | 🔵 | Standard Hook Response Pattern | ~263 |
</claude-mem-context>
+1 -100
View File
@@ -5,106 +5,7 @@
### Dec 5, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #20670 | 8:48 PM | 🔵 | Full Lifecycle Integration Test Analysis | ~428 |
| #20664 | 8:46 PM | 🔵 | Test Suite Verification Complete | ~238 |
| #20651 | 8:43 PM | 🟣 | Comprehensive Test Suite Merged | ~312 |
| #20447 | 7:39 PM | 🟣 | Full Lifecycle Integration Test Suite Created | ~665 |
### Dec 7, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #21829 | 11:05 PM | 🔄 | Massive refactor adds 8,671 lines and removes 5,585 lines across 60 files | ~619 |
### Dec 8, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #22081 | 6:28 PM | ✅ | Clean Test Suite Execution Without Integration Tests | ~399 |
| #22080 | 6:27 PM | ✅ | Full Test Suite Execution Results | ~456 |
| #22039 | 6:01 PM | 🔵 | Discovered comprehensive TypeScript test suite with 11 test files | ~355 |
### Dec 9, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #22606 | 11:33 AM | 🔵 | Hardcoded port 37777 found across multiple codebase locations | ~371 |
### Dec 11, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #24076 | 3:16 PM | 🔵 | 45 files modified with nearly equal additions and deletions during Bun migration | ~443 |
| #23951 | 1:45 PM | 🔄 | Integration Test Updated to Use Dynamic Port Configuration | ~272 |
| #23933 | 1:36 PM | 🔵 | Comprehensive Port 37777 References Across Documentation and Code | ~427 |
### Dec 12, 2025
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #24318 | 5:48 PM | 🟣 | Phase 6 Complete: Comprehensive Bun Worker Testing Passed | ~486 |
| #24317 | 5:47 PM | 🔵 | Test Suite Passes with 42 Tests Across 7 Files | ~326 |
| #24126 | 12:27 AM | 🟣 | Comprehensive Bun Runtime Migration Statistics | ~287 |
### Dec 13, 2025
**hook-execution-environments.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #25551 | 11:32 PM | 🟣 | Enhanced error handling system merged into main branch | ~471 |
| #25521 | 11:05 PM | 🟣 | Hook Execution Environment Tests Created | ~529 |
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #25518 | 10:37 PM | 🔵 | Integration Test Coverage Analyzed | ~502 |
| #25499 | 10:30 PM | 🔵 | Full Test Suite Passes with 52 Tests | ~350 |
### Dec 14, 2025
**context-inject-early.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #25595 | 2:33 PM | ✅ | PR #310 merged into main branch | ~292 |
### Dec 18, 2025
**hook-execution-environments.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #29603 | 5:37 PM | 🔵 | Full Test Suite Results - 120/121 Tests Passing | ~424 |
### Dec 20, 2025
**hook-execution-environments.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #30494 | 4:43 PM | 🔵 | Test Suite Status with Bun Path Resolution Failures | ~330 |
### Dec 21, 2025
**hook-execution-environments.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31371 | 6:08 PM | ✅ | Removed Five Incomplete Test Files | ~180 |
**full-lifecycle.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31370 | 6:07 PM | ✅ | Removed 9 Mock-Based Test Files | ~286 |
### Dec 22, 2025
**context-inject-early.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31855 | 6:53 PM | ✅ | テストスイートの大規模削除とテスト分析レポートの追加 | ~197 |
| #20721 | 9:02 PM | 🔵 | Full Lifecycle Integration Test Suite | ~563 |
</claude-mem-context>
+1 -38
View File
@@ -3,42 +3,5 @@
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
### Jan 3, 2026
**server.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36583 | 9:57 PM | 🟣 | Server Test Suite Created | ~485 |
**error-handler.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36581 | 9:57 PM | 🟣 | ErrorHandler Test Suite Created for Phase 6 | ~444 |
### Jan 4, 2026
**error-handler.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36841 | 1:43 AM | 🔵 | Error Handler Testing with Custom Error Classes | ~445 |
### Jan 5, 2026
**CLAUDE.md**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #38078 | 9:54 PM | ✅ | CLAUDE.md Documentation Cleanup - 1,233 Lines Removed Across 18 Files | ~590 |
**server.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #38018 | 9:14 PM | 🟣 | Added comprehensive test coverage for worktree detection and projectRoot path resolution | ~450 |
| #37758 | 6:25 PM | ⚖️ | Integration Test Design for Four Critical Testing Gaps | ~729 |
| #37710 | 6:11 PM | 🔵 | Test Audit: server.test.ts Integration Tests with Minimal Mocking for HTTP Server | ~582 |
**error-handler.test.ts**
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #37629 | 5:36 PM | 🔵 | Comprehensive Testing Patterns Documentation Generated | ~629 |
| #37625 | 5:35 PM | 🔵 | Bun Test Pattern for Error Classes and Mock Restoration | ~573 |
*No recent activity*
</claude-mem-context>