memtrace 0.1.30 → 0.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memtrace",
3
- "version": "0.1.30",
3
+ "version": "0.1.33",
4
4
  "description": "Code intelligence graph — MCP server + AI agent skills + visualization UI",
5
5
  "keywords": [
6
6
  "mcp",
@@ -31,9 +31,9 @@
31
31
  "preuninstall": "node uninstall.js"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@memtrace/darwin-arm64": "0.1.30",
35
- "@memtrace/linux-x64": "0.1.30",
36
- "@memtrace/win32-x64": "0.1.30"
34
+ "@memtrace/darwin-arm64": "0.1.33",
35
+ "@memtrace/linux-x64": "0.1.33",
36
+ "@memtrace/win32-x64": "0.1.33"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=18"
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: memtrace-first
3
+ description: "Use when working on any indexed codebase before searching files, reading code, debugging issues, tracing call flows, finding implementations, understanding behavior, or answering 'how does X work' questions. Triggered by: file search, symbol lookup, code navigation, debugging, tracing, understanding architecture, finding where something is defined or called."
4
+ ---
5
+
6
+ # Memtrace First
7
+
8
+ ## The Iron Law
9
+
10
+ ```
11
+ IF THE REPO IS INDEXED IN MEMTRACE → USE MEMTRACE TOOLS FIRST.
12
+ NEVER reach for Grep/Glob/Read to discover or understand code.
13
+ ```
14
+
15
+ Memtrace is the memory layer of the codebase. It has the full knowledge graph: every symbol, call, import, community, process, and API — with time dimension. File tools are blind to this structure.
16
+
17
+ **97% better accuracy. 83% fewer wasted tokens. No exceptions.**
18
+
19
+ ## Check Indexing First (Once Per Session)
20
+
21
+ ```
22
+ mcp__memtrace__list_indexed_repositories
23
+ ```
24
+
25
+ If the current repo appears → Memtrace is active. Follow this skill for ALL code tasks.
26
+ If not indexed → offer to index with `mcp__memtrace__index_directory`, then follow this skill.
27
+
28
+ ## Task → Tool Map
29
+
30
+ | What you need | Use instead of Grep/Glob/Read |
31
+ |---|---|
32
+ | Find a function / class / symbol | `find_symbol` or `find_code` |
33
+ | Understand how something works | `get_symbol_context` |
34
+ | Find all callers of a function | `get_symbol_context` (callers field) |
35
+ | Find all callees / dependencies | `get_symbol_context` (callees field) |
36
+ | Trace a request / execution path | `get_process_flow` |
37
+ | Understand module structure | `list_communities` |
38
+ | Find the most important symbols | `find_central_symbols` |
39
+ | Find API endpoints | `find_api_endpoints` |
40
+ | Find where an API is called | `find_api_calls` |
41
+ | Debug a problem | `get_symbol_context` → `get_impact` → `get_evolution` |
42
+ | What changed recently? | `get_changes_since` or `get_evolution` |
43
+ | What breaks if I change X? | `get_impact` |
44
+ | Cross-service / cross-repo calls | `get_service_diagram` or `get_api_topology` |
45
+ | Dependency between two symbols | `find_dependency_path` |
46
+ | What files change together? | `get_cochange_context` |
47
+ | Architecture overview | `list_communities` + `find_central_symbols` |
48
+
49
+ ## Standard Workflows
50
+
51
+ ### "How does X work?" / "Explain X"
52
+ 1. `find_symbol` or `find_code` → locate the symbol
53
+ 2. `get_symbol_context` → callers, callees, community, processes
54
+ 3. `get_process_flow` (if it's a process/request path)
55
+ 4. Read source ONLY for the exact lines you need to quote
56
+
57
+ ### Debugging "X is broken"
58
+ 1. `find_symbol` → locate the broken thing
59
+ 2. `get_symbol_context` → understand its role
60
+ 3. `get_impact` → blast radius (what else breaks)
61
+ 4. `get_evolution` → what changed recently (mode: `recent`)
62
+ 5. `get_changes_since` → confirm timing vs incident
63
+
64
+ ### "Where is X defined / called?"
65
+ 1. `find_symbol` with `fuzzy: true`
66
+ 2. `get_symbol_context` for full caller/callee map
67
+ 3. Read specific file only after locating exact line
68
+
69
+ ### Before any code modification
70
+ 1. `find_symbol` → confirm you have the right target
71
+ 2. `get_symbol_context` → understand full context
72
+ 3. `get_impact` → know blast radius before touching anything
73
+
74
+ ## Red Flags — STOP, Use Memtrace Instead
75
+
76
+ You are violating this skill if you think:
77
+
78
+ | Thought | Reality |
79
+ |---|---|
80
+ | "Let me grep for this" | `find_code` or `find_symbol` is faster and structurally aware |
81
+ | "Let me glob for the file" | `find_symbol` returns exact location with context |
82
+ | "Let me read the whole file" | `get_symbol_context` gives you only what matters |
83
+ | "It's just a quick search" | Grep has no understanding of call graphs, communities, or time |
84
+ | "I don't know if it's indexed" | Check with `list_indexed_repositories` first — takes 1 second |
85
+ | "The user didn't say to use Memtrace" | User asked about the code. Repo is indexed. Use Memtrace. |
86
+ | "This is a simple question" | Simple questions benefit most — one `find_symbol` vs 20 file reads |
87
+
88
+ ## When File Tools Are Still Correct
89
+
90
+ Use Grep/Glob/Read ONLY for:
91
+ - Reading the **exact source lines** of a symbol you already located via Memtrace
92
+ - Files that are config, data, or docs (not source code symbols)
93
+ - Repos confirmed NOT indexed in Memtrace
94
+
95
+ Never use file tools as a **discovery** mechanism when Memtrace is available.
96
+
97
+ ## Skill Priority
98
+
99
+ This skill is a **process skill** — it runs BEFORE any implementation or search skill.
100
+
101
+ When this skill applies, it overrides default file-search behavior. Use the specific Memtrace sub-skills for deep detail on each tool:
102
+
103
+ - Discovery → `memtrace-search`
104
+ - Impact analysis → `memtrace-impact`
105
+ - Temporal / change analysis → `memtrace-evolution`
106
+ - Incident investigation → `memtrace-incident-investigation`
107
+ - Architecture overview → `memtrace-codebase-exploration`
108
+ - Refactoring → `memtrace-refactoring-guide`