memtrace 0.7.25 → 0.8.0

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.
Files changed (64) hide show
  1. package/README.md +209 -287
  2. package/install.js +9 -6
  3. package/installer/package.json +1 -1
  4. package/installer/skills/commands/memtrace-api-topology.md +31 -34
  5. package/installer/skills/commands/memtrace-cochange.md +64 -33
  6. package/installer/skills/commands/memtrace-daily.md +73 -0
  7. package/installer/skills/commands/memtrace-decision-recall.md +91 -0
  8. package/installer/skills/commands/memtrace-evolution.md +121 -88
  9. package/installer/skills/commands/memtrace-fleet-publish-intent.md +18 -2
  10. package/installer/skills/commands/memtrace-fleet-record-episode.md +23 -2
  11. package/installer/skills/commands/memtrace-fleet-resolve.md +24 -1
  12. package/installer/skills/commands/memtrace-graph.md +59 -41
  13. package/installer/skills/commands/memtrace-impact.md +67 -19
  14. package/installer/skills/commands/memtrace-index.md +20 -3
  15. package/installer/skills/commands/memtrace-intent-verification.md +81 -0
  16. package/installer/skills/commands/memtrace-preflight.md +85 -0
  17. package/installer/skills/commands/memtrace-provenance.md +90 -0
  18. package/installer/skills/commands/memtrace-quality.md +49 -32
  19. package/installer/skills/commands/memtrace-relationships.md +73 -30
  20. package/installer/skills/commands/memtrace-search.md +86 -61
  21. package/installer/skills/workflows/memtrace-change-impact-analysis.md +32 -12
  22. package/installer/skills/workflows/memtrace-code-review.md +17 -11
  23. package/installer/skills/workflows/memtrace-codebase-exploration.md +41 -5
  24. package/installer/skills/workflows/memtrace-continuous-memory.md +54 -56
  25. package/installer/skills/workflows/memtrace-decision-memory.md +139 -0
  26. package/installer/skills/workflows/memtrace-episode-replay.md +87 -63
  27. package/installer/skills/workflows/memtrace-first.md +63 -7
  28. package/installer/skills/workflows/memtrace-fleet-coordination.md +21 -1
  29. package/installer/skills/workflows/memtrace-fleet-first.md +35 -5
  30. package/installer/skills/workflows/memtrace-incident-investigation.md +113 -55
  31. package/installer/skills/workflows/memtrace-refactoring-guide.md +31 -11
  32. package/installer/skills/workflows/memtrace-session-continuity.md +63 -49
  33. package/installer/skills/workflows/memtrace-style-fingerprint.md +27 -4
  34. package/package.json +7 -7
  35. package/skills/commands/memtrace-api-topology.md +31 -34
  36. package/skills/commands/memtrace-cochange.md +64 -33
  37. package/skills/commands/memtrace-daily.md +73 -0
  38. package/skills/commands/memtrace-decision-recall.md +91 -0
  39. package/skills/commands/memtrace-evolution.md +121 -88
  40. package/skills/commands/memtrace-fleet-publish-intent.md +18 -2
  41. package/skills/commands/memtrace-fleet-record-episode.md +23 -2
  42. package/skills/commands/memtrace-fleet-resolve.md +24 -1
  43. package/skills/commands/memtrace-graph.md +59 -41
  44. package/skills/commands/memtrace-impact.md +67 -19
  45. package/skills/commands/memtrace-index.md +20 -3
  46. package/skills/commands/memtrace-intent-verification.md +81 -0
  47. package/skills/commands/memtrace-preflight.md +85 -0
  48. package/skills/commands/memtrace-provenance.md +90 -0
  49. package/skills/commands/memtrace-quality.md +49 -32
  50. package/skills/commands/memtrace-relationships.md +73 -30
  51. package/skills/commands/memtrace-search.md +86 -61
  52. package/skills/workflows/memtrace-change-impact-analysis.md +32 -12
  53. package/skills/workflows/memtrace-code-review.md +17 -11
  54. package/skills/workflows/memtrace-codebase-exploration.md +41 -5
  55. package/skills/workflows/memtrace-continuous-memory.md +54 -56
  56. package/skills/workflows/memtrace-decision-memory.md +139 -0
  57. package/skills/workflows/memtrace-episode-replay.md +87 -63
  58. package/skills/workflows/memtrace-first.md +63 -7
  59. package/skills/workflows/memtrace-fleet-coordination.md +21 -1
  60. package/skills/workflows/memtrace-fleet-first.md +35 -5
  61. package/skills/workflows/memtrace-incident-investigation.md +113 -55
  62. package/skills/workflows/memtrace-refactoring-guide.md +31 -11
  63. package/skills/workflows/memtrace-session-continuity.md +63 -49
  64. package/skills/workflows/memtrace-style-fingerprint.md +27 -4
@@ -1,11 +1,18 @@
1
1
  ---
2
2
  name: memtrace-relationships
3
- description: "Always use for source-code relationship questions: callers, callees, references, imports, exports, type usages, class hierarchy, inheritance, implementations, overrides, or dependencies between symbols. Do not use Grep, Glob, rg, find, or manual text search for references; Memtrace traverses typed AST graph edges."
3
+ description: "Map source-code relationships between symbols. Use when the user asks about callers, callees, references, imports, exports, type usages, class hierarchy, inheritance, implementations, overrides, or dependencies between symbols. Do not use Grep, Glob, rg, find, or manual text search for references; Memtrace traverses typed AST graph edges."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__analyze_relationships
6
6
  - mcp__memtrace__get_symbol_context
7
7
  - mcp__memtrace__find_symbol
8
8
  - mcp__memtrace__find_code
9
+ - mcp__memtrace__get_impact
10
+ - mcp__memtrace__get_timeline
11
+ - mcp__memtrace__get_evolution
12
+ metadata:
13
+ author: "Syncable <support@syncable.dev>"
14
+ version: "1.0.0"
15
+ category: development
9
16
  user-invocable: true
10
17
  ---
11
18
 
@@ -25,49 +32,85 @@ Traverse the code knowledge graph to map relationships between symbols — calle
25
32
  | `exporters` | Which files import this module? |
26
33
  | `type_usages` | Where is this type/interface referenced? |
27
34
 
28
- > **Parameter types:** MCP parameters are strictly typed. Numbers (`limit`, `depth`, `min_size`, `last_n`, etc.) must be JSON numbers — not strings. Use `limit: 20`, never `limit: "20"`. Passing a string yields `MCP error -32602: invalid type: string, expected usize`.
35
+ > **Parameter types:** Numbers (`depth`, etc.) must be JSON numbers — not strings.
29
36
 
37
+ ## Graph tool parameters
38
+
39
+ ### `get_symbol_context` (360° view — prefer this first)
40
+
41
+ Required: `repo_id`, `symbol`
42
+
43
+ ```json
44
+ { "repo_id": "memdb", "symbol": "validateToken", "file_path": "src/auth.ts" }
45
+ ```
46
+
47
+ Returns: callers, callees, type references, community, processes, cross-repo API callers.
48
+
49
+ ### `analyze_relationships` (targeted traversal)
50
+
51
+ Required: `repo_id`, `target`, `query_type`
52
+
53
+ ```json
54
+ {
55
+ "repo_id": "memdb",
56
+ "target": "validateToken",
57
+ "query_type": "find_callers",
58
+ "depth": 3,
59
+ "file_path": "src/auth.ts"
60
+ }
61
+ ```
62
+
63
+ | Param | Default | Notes |
64
+ |---|---|---|
65
+ | `depth` | **3** (max 10) | Not 2 |
66
+ | `file_path` | — | Disambiguates overloaded names |
67
+
68
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
30
69
 
31
70
  ## Steps
32
71
 
33
- ### 1. Get the symbol ID
72
+ ### 1. Get the symbol name
34
73
 
35
- If you don't have a symbol `id`, find it first:
36
- - Use `find_symbol` for exact names
37
- - Use `find_code` for natural-language queries
74
+ Use `find_symbol` or `find_code`. Save **`name`**, **`scope_path`**, and **`file_path`** from results — pass `symbol`/`target` plus optional `file_path` to graph tools.
38
75
 
39
76
  ### 2. Choose your approach
40
77
 
41
- **Quick 360° view** → Use `get_symbol_context`
42
- Returns in one call: direct callers, callees, type references, community membership, process membership, and cross-repo API callers.
78
+ **Quick 360° view** → `get_symbol_context` (one call).
43
79
 
44
- **ALWAYS prefer `get_symbol_context` first** it answers "what does this touch and what touches it?" faster than multiple `analyze_relationships` calls.
45
-
46
- **Targeted traversal** → Use `analyze_relationships`
47
- When you need a specific relationship type at a specific depth:
48
- - `symbol_id` — the symbol to start from (required)
49
- - `query_type` — one of the types above (required)
50
- - `depth` — traversal hops, default 2 (higher = slower but reveals indirect deps)
80
+ **Targeted traversal** `analyze_relationships` when you need a specific `query_type` at custom `depth`.
51
81
 
52
82
  ### 3. Interpret results
53
83
 
54
- - **High in_degree** (many callers) widely-used symbol; changes have large blast radius
55
- - **High out_degree** (many callees) → complex function; candidate for refactoring
56
- - **Deep class hierarchy** → check for Liskov violations or fragile base class issues
57
- - **Cross-repo API callers** → changes require coordination with other teams/services
84
+ Use `get_symbol_context` fields (callers, callees, community, processes) for blast-radius and architecture context. For degree-style metrics on a specific symbol, follow up with `get_impact`.
58
85
 
59
86
  ### 4. Follow up
60
87
 
61
- After understanding relationships, consider:
62
- - `get_impact` to quantify the blast radius of a change
63
- - `get_evolution` to see how this symbol has changed over time
64
- - `find_dead_code` if you found unreferenced symbols
88
+ - `get_impact(repo_id, target=...)` — quantify blast radius
89
+ - `get_timeline(repo_id, scope_path, file_path)` full version history
90
+ - `get_evolution(repo_id, from=..., target=...)` window-scoped activity
91
+
92
+ ## Output
93
+
94
+ `get_symbol_context` returns the symbol's 360° neighbourhood:
95
+
96
+ ```json
97
+ {
98
+ "symbol": "validateToken",
99
+ "callers": ["..."],
100
+ "callees": ["..."],
101
+ "type_references": ["..."],
102
+ "community": "...",
103
+ "processes": ["..."],
104
+ "api_callers_cross_repo": ["..."]
105
+ }
106
+ ```
107
+
108
+ `analyze_relationships` returns the symbols/edges matching the requested `query_type` (no degree metrics — see Common Mistakes).
65
109
 
66
- ## Decision Points
110
+ ## Common Mistakes
67
111
 
68
- | Situation | Action |
69
- |-----------|--------|
70
- | Need broad context fast | Use `get_symbol_context` (one call, full picture) |
71
- | Need specific relationship at depth >2 | Use `analyze_relationships` with custom depth |
72
- | Symbol has many callers | Follow up with `get_impact` before modifying |
73
- | Found cross-repo API callers | This is a service boundary — coordinate changes |
112
+ | Mistake | Reality |
113
+ |---------|---------|
114
+ | Passing `symbol_id` | Use **`target`** (`analyze_relationships`) or **`symbol`** (`get_symbol_context`) |
115
+ | Assuming default `depth: 2` | Default is **3** |
116
+ | Expecting `in_degree` on `analyze_relationships` results | Use `get_symbol_context` or `get_impact` for centrality/risk context |
@@ -1,93 +1,118 @@
1
1
  ---
2
2
  name: memtrace-search
3
- description: "Always use to find, search, locate, or look up source-code symbols, functions, classes, types, constants, definitions, implementations, logic, error strings inside code, or where code lives. Do not use Grep, Glob, rg, find, or manual file search for code discovery. If Memtrace returns 0 results, broaden the Memtrace query and diagnose/reindex; do not switch to grep."
3
+ description: "Find source code with Memtrace hybrid BM25+semantic search: symbols, functions, classes, types, constants, definitions, implementations, logic, or error strings inside code. Use when the user wants to find, search, locate, or look up code or asks where code lives. Do not use Grep, Glob, rg, find, or manual file search for code discovery. If Memtrace returns 0 results, broaden the Memtrace query and diagnose/reindex; do not switch to grep."
4
+ allowed-tools:
5
+ - mcp__memtrace__find_code
6
+ - mcp__memtrace__find_symbol
7
+ - mcp__memtrace__get_source_window
8
+ - mcp__memtrace__list_indexed_repositories
9
+ - Read
10
+ metadata:
11
+ author: "Syncable <support@syncable.dev>"
12
+ version: "1.0.0"
13
+ category: development
4
14
  ---
5
15
 
6
16
  ## Overview
7
17
 
8
- Find code using hybrid BM25 full-text + semantic vector search with Reciprocal Rank Fusion. Works for both natural-language queries and exact symbol names. This is the primary discovery tool — use it before calling relationship or impact analysis tools.
18
+ Find code using hybrid BM25 + semantic search (RRF). Primary discovery tool — use before relationship or impact analysis.
9
19
 
10
20
  ## Quick Reference
11
21
 
12
22
  | Tool | Best For |
13
23
  |------|----------|
14
- | `find_code` | Natural-language queries ("authentication middleware", "retry logic"), broad searches |
15
- | `find_symbol` | Exact identifier names ("getUserById", "PaymentService"), when you know the name |
16
- | `get_source_window` | Optional: bounded source read after a Memtrace hit, when your harness lacks `Read(file, offset, limit)`. Otherwise prefer your harness's bounded read with the returned `start_line` / `end_line`. |
24
+ | `find_code` | Natural-language queries, broad searches |
25
+ | `find_symbol` | Exact identifier names |
26
+ | `get_source_window` | Bounded source read when harness lacks `Read(offset, limit)` |
17
27
 
18
- ## Steps
28
+ > **Parameter types:** Numbers must be JSON numbers — not strings.
29
+
30
+ ## `find_code` parameters
31
+
32
+ | Param | Required | Default | Notes |
33
+ |---|---|---|---|
34
+ | `query` | yes | — | Natural language or symbol text |
35
+ | `repo_id` | no | all repos | |
36
+ | `limit` | no | 20 | Max 100 |
37
+ | `file_path` | no | — | Path/directory substring filter |
38
+ | `as_of` | no | now | ISO-8601 time-travel |
39
+ | `include_diagnostics` | no | false | Set true for `id`, `score` in results |
40
+
41
+ **No `kind` param on `find_code`** — use `find_symbol(kind=...)` to filter by symbol type.
42
+
43
+ ```json
44
+ { "query": "authentication middleware", "repo_id": "memdb", "limit": 20 }
45
+ ```
19
46
 
20
- ### 1. Choose the right search tool
47
+ ## `find_symbol` parameters
48
+
49
+ | Param | Required | Default | Notes |
50
+ |---|---|---|---|
51
+ | `name` | yes | — | Symbol name to search |
52
+ | `repo_id` | no | all repos | |
53
+ | `fuzzy` | no | false | API field exists; currently exact-match in backend |
54
+ | `edit_distance` | no | 2 | Only when fuzzy enabled |
55
+ | `kind` | no | — | `Function`, `Class`, `Method`, etc. |
56
+ | `file_path` | no | — | Path substring filter |
57
+ | `limit` | no | 10 | Max 50 |
58
+
59
+ ```json
60
+ { "name": "validateToken", "repo_id": "memdb", "file_path": "auth" }
61
+ ```
62
+
63
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
64
+
65
+ ## Steps
21
66
 
22
- - **Know the exact name?** → Use `find_symbol` with `fuzzy: true` for typo tolerance
23
- - **Describing behaviour?** → Use `find_code` with a natural-language query
24
- - **Searching all repos?** → Omit `repo_id` from either tool
67
+ ### 1. Choose the tool
25
68
 
26
- ### 2. Execute the search
69
+ - Exact name `find_symbol`
70
+ - Behaviour description → `find_code`
71
+ - All repos → omit `repo_id`
27
72
 
28
- > **Parameter types:** numbers must be JSON numbers, not strings. `limit: 20` is correct; `limit: "20"` returns `MCP error -32602: expected usize`.
73
+ ### 2. Execute search
29
74
 
30
- **`find_code` parameters:**
31
- - `query` — string, required. Natural-language or exact text.
32
- - `repo_id` — string, optional. Scope to a single repo (omit to search all).
33
- - `kind` — string, optional. Filter by symbol type: `"Function"`, `"Class"`, `"Method"`, `"Interface"`, `"APIEndpoint"`, `"APICall"`.
34
- - `limit` — **integer**, optional. Max results. Default `20`, capped at `100`.
35
- - `as_of` — string, optional. ISO-8601 timestamp for time-travel search (e.g. `"2026-04-01T00:00:00Z"`).
36
- - `file_path` — string, optional. File path or directory substring to constrain results (e.g. `"cli/commands"` or `"auth.py"`).
75
+ Result shape: see [Output](#output) below.
37
76
 
38
- **`find_symbol` parameters:**
39
- - `name` — string, required. Exact or partial symbol name (e.g. `"ValidateToken"`).
40
- - `fuzzy` — boolean, optional. Enable Levenshtein correction. Default `false`.
41
- - `edit_distance` — **integer**, optional. Maximum Levenshtein edit distance for fuzzy search. Default `2`, capped at `2`.
42
- - `repo_id` — string, optional. Scope to a single repo.
43
- - `kind` — string, optional. Filter by symbol type (e.g. `"Function"`, `"Class"`, `"Variable"`).
44
- - `file_path` — string, optional. Filter by file path substring.
45
- - `limit` — **integer**, optional. Max results. Default `10`, capped at `50`.
77
+ ### 3. Hand off to graph tools
46
78
 
47
- **Success criteria:** Results include `file_path`, `start_line`, `kind`, and relevance `score`.
79
+ Save **`name`**, **`scope_path`**, and **`file_path`** **not** internal IDs:
48
80
 
49
- ### 3. Use results for next steps
81
+ ```json
82
+ { "repo_id": "memdb", "symbol": "validateToken" }
83
+ { "repo_id": "memdb", "target": "validateToken", "direction": "both" }
84
+ { "repo_id": "memdb", "target": "validateToken", "query_type": "find_callers" }
85
+ ```
50
86
 
51
- The default next step is a **graph tool** `get_symbol_context`,
52
- `analyze_relationships`, or `get_impact`. Those answer "who calls this",
53
- "what's the blast radius", "what community is it part of" — context no
54
- file read can give. That's what Memtrace uniquely provides.
87
+ Read source only when editing bounded `Read(offset, limit)` at returned lines.
55
88
 
56
- Source bytes come last, only when you're about to edit or quote. Use a
57
- bounded `Read(file_path, offset=start_line, limit=end_line-start_line+8)`,
58
- or `get_source_window` if your harness lacks bounded reads. Do not whole-file.
89
+ ### Multi-word queries
59
90
 
60
- Save the symbol `id` from results — pass it to:
61
- - `analyze_relationships` to map callers/callees
62
- - `get_symbol_context` for a 360-degree view
63
- - `get_impact` to assess blast radius before changes
91
+ 1. Try verbatim `find_code` query.
92
+ 2. If weak, fan out: camelCase, snake_case, domain identifiers.
93
+ 3. Dedupe top hits by `file_path:start_line`.
64
94
 
65
- ### Multi-word natural-language queries
95
+ ## Output
66
96
 
67
- When your query is 3+ words and feels descriptive (e.g. "validate auth token", "find HTTP server error"), don't stop at the first `find_code` call:
97
+ One `find_code` / `find_symbol` result entry:
68
98
 
69
- 1. First try the verbatim query.
70
- 2. If results look generic or the right doc isn't at rank 1, fan out **in parallel** with up to 3 identifier-shaped reshapes:
71
- - camelCase: "validate auth token" → `validateAuthToken`
72
- - snake_case: → `validate_auth_token`
73
- - Domain-likely identifiers: → `auth_token`, `tokenValidator`, `verifyToken`
74
- 3. Memtrace's tokenizer splits camelCase / snake / kebab at index time, so reshaped queries hit identifier names directly.
75
- 4. Take the union of top-5 from each call, dedupe by `file_path:start_line`.
99
+ ```json
100
+ {
101
+ "name": "validateToken",
102
+ "kind": "Function",
103
+ "file_path": "src/auth/token.rs",
104
+ "start_line": 42,
105
+ "scope_path": "auth::token"
106
+ }
107
+ ```
76
108
 
77
- **Worked examples** (verbatim reshapes to try in parallel):
78
- - "validate auth token" → `validateAuthToken`, `validate_auth_token`, `verifyToken`
79
- - "find http server error" → `findHttpServerError`, `http_error`, `serverError`
80
- - "render value panel" → `renderValuePanel`, `ValuePanel`, `value_panel`
109
+ `score` (and `id`) appear only with `include_diagnostics: true`.
81
110
 
82
111
  ## Common Mistakes
83
112
 
84
113
  | Mistake | Reality |
85
114
  |---------|---------|
86
- | Searching without indexing first | Call `list_indexed_repositories` to verify the repo is indexed |
87
- | Using find_symbol for vague queries | Use `find_code` for natural-language; `find_symbol` is for exact names |
88
- | Ignoring the `kind` filter | Narrow results with kind=Function, kind=Class etc. to reduce noise |
89
- | Re-searching to get more context | Use the symbol `id` with `get_symbol_context` instead of re-searching |
90
- | Reading the whole file after a hit | First call `get_symbol_context` for callers/callees. If you still need source, do a bounded `Read(file, offset=start_line, limit=N)` — never whole-file. `get_source_window` is fine if your harness has no bounded read. |
91
- | Going straight from `find_code` to source read | Memtrace's value is the graph. Default next step is `get_symbol_context` or `get_impact`, not source. |
92
- | Treating 0 results as permission to grep | 0 results means broaden the Memtrace query, check repo_id/path filters, then reindex if coverage is missing |
93
- | Assuming a UI subdirectory is unindexed because stats show backend files | If `ui/`, `memtrace-ui/`, or another source directory is under the indexed repo root, diagnose/reindex with Memtrace instead of searching files manually |
115
+ | `find_code(kind=...)` | **`kind` only on `find_symbol`** |
116
+ | Passing symbol `id` to graph tools | Use **`name`** as `symbol` / `target` |
117
+ | Assuming `fuzzy: true` always works | Backend is exact-match today try spelling variants |
118
+ | Skipping `list_indexed_repositories` | Verify repo is indexed first |
@@ -1,15 +1,18 @@
1
1
  ---
2
2
  name: memtrace-change-impact-analysis
3
- description: "Always use before source-code edits, refactors, API changes, renames, removals, PR reviews, or risk assessments when the user needs to know what will break. Do not manually grep references or browse files for impact; this workflow uses Memtrace graph context, impact, and change detection."
3
+ description: "Compute what a planned source-code change will break blast radius, affected processes, cross-repo callers — and produce a risk-rated change plan. Use when the user needs to know what will break before a change: edits, refactors, API changes, renames, removals, PR reviews, or risk assessments. Do not manually grep references or browse files for impact; this workflow uses Memtrace graph context, impact, and change history. For a quick blast-radius check on one symbol, use memtrace-impact."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__find_symbol
6
6
  - mcp__memtrace__find_code
7
7
  - mcp__memtrace__get_symbol_context
8
8
  - mcp__memtrace__get_impact
9
- - mcp__memtrace__detect_changes
10
9
  - mcp__memtrace__get_evolution
10
+ - mcp__memtrace__get_timeline
11
11
  - mcp__memtrace__analyze_relationships
12
- - mcp__memtrace__list_indexed_repositories
12
+ metadata:
13
+ author: "Syncable <support@syncable.dev>"
14
+ version: "1.0.0"
15
+ category: development
13
16
  user-invocable: true
14
17
  ---
15
18
 
@@ -25,11 +28,11 @@ Find the target symbol(s):
25
28
  - Use `find_symbol` if the user named specific functions/classes
26
29
  - Use `find_code` if the user described behaviour ("the authentication middleware")
27
30
 
28
- Collect symbol IDs for all targets.
31
+ Collect symbol **names** (`name`, `scope_path`, `file_path`) for all targets — graph tools use names, not internal IDs.
29
32
 
30
33
  ### 2. Get 360° context for each target
31
34
 
32
- For each symbol, call `get_symbol_context`:
35
+ For each symbol, call `get_symbol_context` (`repo_id`, `symbol`, `file_path`):
33
36
  - Direct callers and callees
34
37
  - Community membership (which module is this in?)
35
38
  - Process membership (which execution flows does this participate in?)
@@ -39,7 +42,7 @@ For each symbol, call `get_symbol_context`:
39
42
 
40
43
  ### 3. Compute blast radius
41
44
 
42
- For each target, call `get_impact` with `direction: both`:
45
+ For each target, call `get_impact` (`repo_id`, `target`) with `direction: "both"`, `depth: 5`:
43
46
  - Upstream impact: what depends on this symbol
44
47
  - Downstream impact: what this symbol depends on
45
48
  - Risk rating: Low / Medium / High / Critical
@@ -54,13 +57,16 @@ For each target, call `get_impact` with `direction: both`:
54
57
 
55
58
  ### 4. Check temporal stability
56
59
 
57
- Call `get_evolution` with mode `novel` for a 30-day window on the repo:
58
- - Are any of the target symbols flagged as "rarely changing"? If so, this change is structurally surprising and deserves extra scrutiny.
59
- - Have the target symbols been changing frequently? High churn + high impact = volatile hotspot.
60
+ Call `get_evolution` (`repo_id`, `from: "30d ago"`, `mode: "compound"`), then `get_timeline` on each target symbol (requires `scope_path` + `file_path` from `find_symbol`):
61
+ - Sparse timeline history + you're about to change it structurally surprising; extra scrutiny warranted.
62
+ - Target appears in `top_touched_symbols` high churn + high impact = volatile hotspot.
60
63
 
61
64
  ### 5. Map affected execution flows
62
65
 
63
- From step 2, you already know which processes are affected. For critical changes, use `analyze_relationships` with `query_type: find_callers` at `depth: 3` to trace the full transitive caller chain.
66
+ From step 2, you already know which processes are affected. For critical changes, use `analyze_relationships` (`repo_id`, `target`) with `query_type: "find_callers"` at `depth: 3` to trace the full transitive caller chain.
67
+
68
+ `depth: 3` is a JSON number, not a string — the validator rejects `"3"`.
69
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
64
70
 
65
71
  ### 6. Produce the risk assessment
66
72
 
@@ -70,7 +76,7 @@ Synthesize into a change plan:
70
76
  2. **Blast Radius** — number of direct/transitive dependents, risk rating
71
77
  3. **Affected Processes** — which execution flows will be impacted
72
78
  4. **Cross-Service Impact** — any external callers or consumers
73
- 5. **Stability Signal** — is this code stable (novel) or volatile (frequent changes)?
79
+ 5. **Stability Signal** — sparse `get_timeline` history (stable) vs frequent appearance in `top_touched_symbols` (volatile)
74
80
  6. **Recommended Approach** — based on risk: direct change, incremental migration, or backward-compatible evolution
75
81
  7. **Test Coverage** — which callers/processes to verify after the change
76
82
 
@@ -80,6 +86,20 @@ Synthesize into a change plan:
80
86
  |-----------|--------|
81
87
  | Risk = Critical | Recommend backward-compatible change + deprecation path |
82
88
  | Cross-repo callers exist | Flag as requiring multi-service coordination |
83
- | Symbol has high novelty score | Extra review — this rarely changes; make sure the change is intentional |
89
+ | Symbol has sparse timeline but high impact | Extra review — this rarely changes; make sure the change is intentional |
84
90
  | Multiple processes affected | List each affected flow; recommend testing each one |
85
91
  | Symbol is a bridge point | Change may disconnect parts of the architecture — verify alternative paths exist |
92
+
93
+ ## Output
94
+
95
+ The workflow's artifact is the step-6 risk-rated change plan. Compact example:
96
+
97
+ ```text
98
+ Target: AuthService::validateToken (src/auth/service.ts)
99
+ Blast Radius: 4 direct / 23 transitive dependents — Risk: High
100
+ Affected Processes: login-flow, session-refresh
101
+ Cross-Service Impact: 2 cross-repo API callers — needs multi-service coordination
102
+ Stability Signal: appears in top_touched_symbols (volatile hotspot)
103
+ Recommended Approach: incremental migration behind a feature flag
104
+ Test Coverage: all 4 direct callers + both affected processes
105
+ ```
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: memtrace-code-review
3
- description: "Always use when the user asks to review a GitHub pull request, run Memtrace code review, post Memtrace review comments, create a PR with a review step, or publish local graph-backed review findings to GitHub. Prefer the review_github_pr MCP tool over manual diff inspection."
4
- when_to_use: "Triggered by 'review this PR', 'code review this pull request', 'post Memtrace review', 'run memtrace code-review', 'create PR with review', 'GitHub PR review', 'publish review comments', or any request to use Memtrace as a GitHub code reviewer. Use after code is pushed as a PR, and call review_github_pr instead of manually grepping diffs."
5
- paths: "**/*.{py,js,jsx,ts,tsx,mjs,cjs,rs,go,java,rb,c,cc,cpp,cxx,h,hpp,hh,cs,php,swift,kt,kts,scala,clj,cljs,ex,exs,erl,hrl,ml,mli,fs,fsx,r,jl,lua,dart,m,mm,asm,sql,gql,graphql,proto,sh,bash,zsh,fish,vue,svelte}"
3
+ description: "Review GitHub pull requests with Memtrace's local graph-backed review engine. Use when the user asks to review a GitHub pull request, run Memtrace code review, post Memtrace review comments, create a PR with a review step, or publish local graph-backed review findings to GitHub. Prefer the review_github_pr MCP tool over manual diff inspection. Do not use for local working-tree diffs — that is the built-in /code-review; this skill is for GitHub PRs via review_github_pr."
6
4
  allowed-tools:
7
5
  - mcp__memtrace__review_github_pr
8
- - mcp__memtrace__find_code_review_issues
9
- - mcp__memtrace__list_indexed_repositories
6
+ metadata:
7
+ author: "Syncable <support@syncable.dev>"
8
+ version: "1.0.0"
9
+ category: development
10
10
  user-invocable: true
11
+ when_to_use: "Triggered by 'review this PR', 'code review this pull request', 'post Memtrace review', 'run memtrace code-review', 'create PR with review', 'GitHub PR review', 'publish review comments', or any request to use Memtrace as a GitHub code reviewer. Use after code is pushed as a PR, and call review_github_pr instead of manually grepping diffs."
12
+ paths: "**/*.{py,js,jsx,ts,tsx,mjs,cjs,rs,go,java,rb,c,cc,cpp,cxx,h,hpp,hh,cs,php,swift,kt,kts,scala,clj,cljs,ex,exs,erl,hrl,ml,mli,fs,fsx,r,jl,lua,dart,m,mm,asm,sql,gql,graphql,proto,sh,bash,zsh,fish,vue,svelte}"
11
13
  ---
12
14
 
13
15
  ## Overview
@@ -22,6 +24,8 @@ Use Memtrace's local-first PR review workflow. The agent should call the `review
22
24
  4. Default to `minSeverity: "high"` and `maxComments: 5` when posting. For previews, `maxComments: 10` is acceptable.
23
25
  5. Pass `repoRoot` when the PR checkout is not the current working directory. Pass `repoId` when the indexed repository id is known.
24
26
 
27
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
28
+
25
29
  ## Example User Prompts
26
30
 
27
31
  - "Review this PR with Memtrace: https://github.com/OWNER/REPO/pull/123"
@@ -32,6 +36,7 @@ Use Memtrace's local-first PR review workflow. The agent should call the `review
32
36
 
33
37
  - Do not start with generic grep, rg, or manual diff review when `review_github_pr` is available.
34
38
  - Do not post comments unless the user explicitly requested publication.
39
+ - After posting comments (`post: true`), record the PR URL and the posted comment IDs in the session output as the audit trail.
35
40
  - Do not create benchmark-specific or PR-specific findings. The review must come from general Memtrace detectors, graph evidence, and policy ranking.
36
41
  - If the tool reports missing auth, tell the user to run `memtrace auth login`.
37
42
  - If the tool reports missing GitHub App installation, tell the user to install Memtrace Code Reviewer on that repository.
@@ -39,10 +44,11 @@ Use Memtrace's local-first PR review workflow. The agent should call the `review
39
44
 
40
45
  ## Output
41
46
 
42
- For previews, summarize:
43
- - PR URL and repository
44
- - Graph state
45
- - Number of candidate comments
46
- - File, line, severity, and message for each finding
47
+ Summarize the `review_github_pr` result with these fields:
47
48
 
48
- For posted reviews, report the PR URL and number of comments posted.
49
+ | Field | Preview (`post: false`) | Posted (`post: true`) |
50
+ |---|---|---|
51
+ | PR URL + repository | yes | yes |
52
+ | Graph state | yes | yes |
53
+ | Findings | count of candidate comments, plus file, line, severity, message per finding | number of comments posted |
54
+ | Posted comment IDs | — | yes — record with the PR URL as the audit trail |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memtrace-codebase-exploration
3
- description: "Always use when the user wants to explore, understand, onboard to, map, or get an overview of an indexed source-code repo, architecture, modules, or major flows. Do not use Glob, find, tree, rg, or manual file browsing as the first exploration path; Memtrace provides structured graph briefing."
3
+ description: "Map an indexed source-code repo into a structured overview — scale, communities, central symbols, execution flows, API surface, recent activity. Use when the user wants to explore, understand, onboard to, map, or get an overview of an indexed source-code repo, architecture, modules, or major flows. Do not use Glob, find, tree, rg, or manual file browsing as the first exploration path; Memtrace provides structured graph briefing. Do NOT use for change history / what-changed questions — use memtrace-evolution."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__index_directory
6
6
  - mcp__memtrace__check_job_status
@@ -14,6 +14,10 @@ allowed-tools:
14
14
  - mcp__memtrace__get_api_topology
15
15
  - mcp__memtrace__get_evolution
16
16
  - mcp__memtrace__find_most_complex_functions
17
+ metadata:
18
+ author: "Syncable <support@syncable.dev>"
19
+ version: "1.0.0"
20
+ category: development
17
21
  user-invocable: true
18
22
  ---
19
23
 
@@ -50,7 +54,11 @@ Each community represents a cohesive module — these are the "areas" of the cod
50
54
 
51
55
  ### 4. Find the most important symbols
52
56
 
53
- Call `find_central_symbols` with `limit: 15`. It ranks symbols by PageRank over the repo's CALLS / REFERENCES edges (default `method: "pagerank"`, 0.85 damping factor).
57
+ Call `find_central_symbols` PageRank over CALLS/REFERENCES edges (no `method` param):
58
+
59
+ ```json
60
+ { "repo_id": "<repo>", "limit": 15 }
61
+ ```
54
62
 
55
63
  These are the symbols that the rest of the codebase depends on most heavily. They form the "skeleton" of the architecture.
56
64
 
@@ -78,13 +86,29 @@ Call `find_api_endpoints` to list all HTTP routes.
78
86
 
79
87
  ### 8. Recent activity
80
88
 
81
- Call `get_evolution` with mode `overview` and a 30-day window to see which modules have been most active recently.
89
+ Call `get_evolution` to see recent activity:
90
+
91
+ ```json
92
+ { "repo_id": "<repo>", "from": "30d ago", "mode": "overview" }
93
+ ```
94
+
95
+ Check `totals.episode_count` and episode boundaries. For file/symbol hotspots, switch to `compound`:
82
96
 
83
- **Decision:** If the user asks about specific recent changes, switch to mode `compound` for symbol-level detail.
97
+ ```json
98
+ { "repo_id": "<repo>", "from": "30d ago", "mode": "compound" }
99
+ ```
100
+
101
+ Review `top_changed_files` and `top_touched_symbols`.
84
102
 
85
103
  ### 9. Complexity hotspots
86
104
 
87
- Call `find_most_complex_functions` with `limit: 10` to identify potential technical debt.
105
+ Call `find_most_complex_functions`:
106
+
107
+ ```json
108
+ { "repo_id": "<repo>", "top_n": 10 }
109
+ ```
110
+
111
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
88
112
 
89
113
  ## Report Synthesis
90
114
 
@@ -98,6 +122,18 @@ Synthesize findings into a structured overview:
98
122
  6. **Recent Activity** — what's been changing in the last 30 days
99
123
  7. **Technical Debt** — complexity hotspots and potential dead code
100
124
 
125
+ ## Output
126
+
127
+ The deliverable is the 7-part overview above. Skeleton (one headline per part):
128
+
129
+ 1. Scale — 2 languages, 4,812 symbols, 19,344 relationships
130
+ 2. Architecture — 12 communities; top 5: auth, indexing, api, ui, billing
131
+ 3. Critical Infrastructure — `EngineHandle::open` (central AND bridge — flag it)
132
+ 4. Execution Flows — 14 processes: 9 HTTP handlers, 3 CLI commands, 2 jobs
133
+ 5. API Surface — 42 endpoints; 2 cross-repo service dependencies
134
+ 6. Recent Activity — 31 episodes in 30d; hottest file per `top_changed_files`
135
+ 7. Technical Debt — top-10 complex functions, highest complexity first
136
+
101
137
  ## Common Mistakes
102
138
 
103
139
  | Mistake | Reality |