Files
claude-mem/plugin/scripts/CLAUDE.md
Alex Newman 0e502dbd21 feat: add smart-explore AST-based code navigation (#1244)
* feat: add smart-file-read module for token-optimized semantic code search

- Created package.json for the smart-file-read module with dependencies and scripts.
- Implemented parser.ts for code structure parsing using tree-sitter, supporting multiple languages.
- Developed search.ts for searching code files and symbols with grep-style and structural matching.
- Added test-run.mjs for testing search and outline functionalities.
- Configured TypeScript with tsconfig.json for strict type checking and module resolution.

* fix: update .gitignore to include _tree-sitter and remove unused subproject

* feat: add preliminary results and skill recommendation for smart-explore module

* chore: remove outdated plan.md file detailing session start hook issues

* feat: update Smart File Read integration plan and skill documentation for smart-explore

* feat: migrate Smart File Read to web-tree-sitter WASM for cross-platform compatibility

* refactor: switch to tree-sitter CLI for parsing and enhance search functionality

- Updated `parser.ts` to utilize the tree-sitter CLI for AST extraction instead of native bindings, improving compatibility and performance.
- Removed grammar loading logic and replaced it with a path resolution for grammar packages.
- Implemented batch parsing in `parseFilesBatch` to handle multiple files in a single CLI call, enhancing search speed.
- Refactored `searchCodebase` to collect files and parse them in batches, streamlining the search process.
- Adjusted symbol extraction logic to accommodate the new parsing method and ensure accurate symbol matching.

* feat: update Smart File Read integration plan to utilize tree-sitter CLI for improved performance and cross-platform compatibility

* feat: add smart-file-read parser and search to src/services

Copy validated tree-sitter CLI-based parser and search modules from
smart-file-read prototype into the claude-mem source tree for MCP
tool integration.

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

* feat: register smart_search, smart_unfold, smart_outline MCP tools

Add 3 tree-sitter AST-based code exploration tools to the MCP server.
Direct execution (no HTTP delegation) — they call parser/search
functions directly for sub-second response times.

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

* feat: add tree-sitter CLI deps to build system and plugin runtime

Externalize tree-sitter packages in esbuild MCP server build. Add
10 grammar packages + CLI to plugin package.json for runtime install.
Remove unused @chroma-core/default-embed from plugin deps.

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

* feat: create smart-explore skill with 3-layer workflow docs

Progressive disclosure workflow: search -> outline -> unfold.
Documents all 3 MCP tools with parameters and token economics.

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

* Add comprehensive documentation for the smart-explore feature

- Introduced a detailed technical reference covering the architecture, parser, search engine, and tool registration for the smart-explore feature in claude-mem.
- Documented the three-layer workflow: search, outline, and unfold, along with their respective MCP tools.
- Explained the parsing process using tree-sitter, including language support, query patterns, and symbol extraction.
- Outlined the search module's functionality, including file discovery, batch parsing, and relevance scoring.
- Provided insights into build system integration and token economics for efficient code exploration.

* chore: remove experiment artifacts, prototypes, and plan files

Remove A/B test docs, prototype smart-file-read directory, and
implementation plans. Keep only production code.

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

* refactor: simplify hooks configuration and remove setup script

* fix: use execFileSync to prevent command injection in tree-sitter parser

Replaces execSync shell string with execFileSync + argument array,
eliminating shell interpretation of file paths. Also corrects
file_pattern description from "Glob pattern" to "Substring filter".

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:00:26 -05:00

5.7 KiB

Never read built source files in this directory. These are compiled outputs — read the source files in src/ instead.

# Recent Activity

Dec 4, 2025

ID Time T Title Read
#20052 3:23 PM Built and deployed version 6.5.2 to marketplace ~321

Dec 7, 2025

ID Time T Title Read
#21251 6:06 PM 🔵 Context Hook Plugin Architecture and Worker Communication ~405

Dec 8, 2025

ID Time T Title Read
#22092 6:40 PM 🔵 Queue Depth Check Not Found in Minified Code ~217
#22091 " 🔵 Save Hook Script Structure Revealed ~472
#22085 6:34 PM 🔵 Examined pre-tool-use-hook.js implementation showing timing-only logic ~330

Dec 9, 2025

ID Time T Title Read
#22557 1:08 AM Build completed for version 7.0.3 ~342

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
#24057 2:56 PM Hook Scripts Shebang Verification ~294
#24056 2:55 PM Worker CLI Shebang Verification ~258
#24055 " Build Successful with Bun Runtime Shebangs ~355

Dec 12, 2025

ID Time T Title Read
#24636 10:46 PM 🔵 Duplicate Smart Install Scripts in Project Structure ~288
#24635 " 🔵 Claude-Mem Smart Install Script Architecture ~371
#24359 7:00 PM 🟣 Phase 1 Critical Code Fixes Completed via Agent Task ~441
#24358 6:59 PM Completed Phase 1 Code Fixes for better-sqlite3 Migration ~385
#24357 " Removed createRequire Import from smart-install.js ~284
#24356 " Removed Native Module Verification from main() Function ~384
#24355 " Removed better-sqlite3 Error Detection from runNpmInstall() ~324
#24354 6:58 PM Removed getWindowsErrorHelp() Function from smart-install.js ~356
#24353 " Removed verifyNativeModules() Function from smart-install.js ~340
#24352 " Removed better-sqlite3 Existence Check from needsInstall() ~266
#24351 " Removed BETTER_SQLITE3_PATH Constant from smart-install.js ~226
#24344 6:56 PM 🔵 smart-install.js Contains Obsolete better-sqlite3 Dependencies ~380

Dec 13, 2025

ID Time T Title Read
#25286 8:41 PM 🔵 New Hook Fails with Node.js Path Error ~298
#25285 " 🔵 Context Hook Runs Successfully with Node.js ~306
#25283 " 🔵 Bun Wrapper Analysis: Fallback Detection System ~416

Dec 14, 2025

ID Time T Title Read
#26800 11:39 PM Version 7.2.3 Build Complete With Worker Restart Fix ~394
#26791 11:38 PM Phase 3 Complete: Project Built Successfully With Worker Restart Fix ~446
#26720 11:23 PM 🔵 Smart Install Handles Dependencies But No Worker Coordination ~468
#26719 " 🔵 Worker CLI Provides Start/Stop/Restart Commands With Health Check Validation ~490
#26718 " 🔵 Worker CLI Restart Implementation Details ~452
#26717 11:22 PM 🔵 Context Hook Worker Startup Logic Handles Initial Start But Not Post-Update Restart ~485
#26716 " 🔵 Context Hook Worker Startup Logic Revealed ~538
#26715 " 🔵 Smart Install Script Handles Dependency Installation Without Worker Restart ~430
#26052 7:13 PM 🔵 Examined Minified Context Hook Source Code ~285
#25686 4:22 PM 🔵 SessionRoutes tracks missing last_user_message errors at two different locations ~456
#25685 " 🔵 Progress summary generation system uses Claude to create XML-formatted session checkpoints ~461

Dec 16, 2025

ID Time T Title Read
#27554 4:48 PM Project built successfully with version 7.3.1 ~306

Dec 17, 2025

ID Time T Title Read
#28924 7:29 PM 🔵 Plugin MCP Server Uses Bun Runtime ~283

Dec 26, 2025

ID Time T Title Read
#32983 11:04 PM 🟣 Complete build and deployment pipeline executed ~260

Jan 4, 2026

ID Time T Title Read
#36873 1:55 AM 🔵 Smart-Install Script Analyzed for Homebrew Path Implementation ~466

Jan 7, 2026

ID Time T Title Read
#38169 7:21 PM 🔵 SessionStart Hook Output Pattern Investigation Complete ~464
#38168 " 🔵 Smart-Install Script Outputs All Status Messages to stderr via console.error ~438
#38167 7:20 PM 🔵 Context-Hook Uses stdin Event Handlers for Non-TTY JSON Output Mode ~396
#38166 " 🔵 User-Message-Hook Executes at Top Level with Await and Exit Code 1 ~423
#38165 " 🔵 Context-Hook Has Minimal Console Output in Compiled Code ~333
#38164 " 🔵 Worker-Service Script is Large 1575-Line Multi-Purpose Service Manager ~352
#38163 7:19 PM 🔵 Worker-Service Script Uses console.log and console.error for Output ~385
#38162 " 🔵 Smart-Install Script Auto-Installs Bun and UV Dependencies ~495
#38161 " 🔵 User-Message-Hook Outputs to stderr and Exits with Code 1 ~211
#38160 7:18 PM 🔵 Context-Hook Returns JSON with hookSpecificOutput Structure ~470