memtrace-skills 0.7.24 → 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 (63) hide show
  1. package/package.json +1 -1
  2. package/plugins/memtrace-skills/.claude-plugin/plugin.json +2 -2
  3. package/plugins/memtrace-skills/references/mcp-parameters.md +147 -46
  4. package/plugins/memtrace-skills/skills/memtrace-api-topology/SKILL.md +27 -34
  5. package/plugins/memtrace-skills/skills/memtrace-change-impact-analysis/SKILL.md +27 -10
  6. package/plugins/memtrace-skills/skills/memtrace-cochange/SKILL.md +59 -33
  7. package/plugins/memtrace-skills/skills/memtrace-code-review/SKILL.md +11 -7
  8. package/plugins/memtrace-skills/skills/memtrace-codebase-exploration/SKILL.md +37 -5
  9. package/plugins/memtrace-skills/skills/memtrace-continuous-memory/SKILL.md +50 -56
  10. package/plugins/memtrace-skills/skills/memtrace-daily/SKILL.md +63 -0
  11. package/plugins/memtrace-skills/skills/memtrace-decision-memory/SKILL.md +129 -0
  12. package/plugins/memtrace-skills/skills/memtrace-decision-recall/SKILL.md +83 -0
  13. package/plugins/memtrace-skills/skills/memtrace-episode-replay/SKILL.md +82 -61
  14. package/plugins/memtrace-skills/skills/memtrace-evolution/SKILL.md +114 -88
  15. package/plugins/memtrace-skills/skills/memtrace-first/SKILL.md +34 -7
  16. package/plugins/memtrace-skills/skills/memtrace-fleet-coordination/SKILL.md +17 -1
  17. package/plugins/memtrace-skills/skills/memtrace-fleet-first/SKILL.md +29 -5
  18. package/plugins/memtrace-skills/skills/memtrace-fleet-publish-intent/SKILL.md +13 -2
  19. package/plugins/memtrace-skills/skills/memtrace-fleet-record-episode/SKILL.md +18 -2
  20. package/plugins/memtrace-skills/skills/memtrace-fleet-resolve/SKILL.md +20 -1
  21. package/plugins/memtrace-skills/skills/memtrace-graph/SKILL.md +54 -40
  22. package/plugins/memtrace-skills/skills/memtrace-impact/SKILL.md +63 -19
  23. package/plugins/memtrace-skills/skills/memtrace-incident-investigation/SKILL.md +106 -49
  24. package/plugins/memtrace-skills/skills/memtrace-index/SKILL.md +16 -3
  25. package/plugins/memtrace-skills/skills/memtrace-intent-verification/SKILL.md +72 -0
  26. package/plugins/memtrace-skills/skills/memtrace-preflight/SKILL.md +76 -0
  27. package/plugins/memtrace-skills/skills/memtrace-provenance/SKILL.md +81 -0
  28. package/plugins/memtrace-skills/skills/memtrace-quality/SKILL.md +44 -32
  29. package/plugins/memtrace-skills/skills/memtrace-refactoring-guide/SKILL.md +25 -6
  30. package/plugins/memtrace-skills/skills/memtrace-relationships/SKILL.md +66 -30
  31. package/plugins/memtrace-skills/skills/memtrace-search/SKILL.md +76 -61
  32. package/plugins/memtrace-skills/skills/memtrace-session-continuity/SKILL.md +59 -49
  33. package/plugins/memtrace-skills/skills/memtrace-style-fingerprint/SKILL.md +23 -3
  34. package/skills/commands/memtrace-api-topology.md +31 -34
  35. package/skills/commands/memtrace-cochange.md +64 -33
  36. package/skills/commands/memtrace-daily.md +73 -0
  37. package/skills/commands/memtrace-decision-recall.md +91 -0
  38. package/skills/commands/memtrace-evolution.md +121 -88
  39. package/skills/commands/memtrace-fleet-publish-intent.md +18 -2
  40. package/skills/commands/memtrace-fleet-record-episode.md +23 -2
  41. package/skills/commands/memtrace-fleet-resolve.md +24 -1
  42. package/skills/commands/memtrace-graph.md +59 -41
  43. package/skills/commands/memtrace-impact.md +67 -19
  44. package/skills/commands/memtrace-index.md +20 -3
  45. package/skills/commands/memtrace-intent-verification.md +81 -0
  46. package/skills/commands/memtrace-preflight.md +85 -0
  47. package/skills/commands/memtrace-provenance.md +90 -0
  48. package/skills/commands/memtrace-quality.md +49 -32
  49. package/skills/commands/memtrace-relationships.md +73 -30
  50. package/skills/commands/memtrace-search.md +86 -61
  51. package/skills/workflows/memtrace-change-impact-analysis.md +32 -12
  52. package/skills/workflows/memtrace-code-review.md +17 -11
  53. package/skills/workflows/memtrace-codebase-exploration.md +41 -5
  54. package/skills/workflows/memtrace-continuous-memory.md +54 -56
  55. package/skills/workflows/memtrace-decision-memory.md +139 -0
  56. package/skills/workflows/memtrace-episode-replay.md +87 -63
  57. package/skills/workflows/memtrace-first.md +63 -7
  58. package/skills/workflows/memtrace-fleet-coordination.md +21 -1
  59. package/skills/workflows/memtrace-fleet-first.md +35 -5
  60. package/skills/workflows/memtrace-incident-investigation.md +113 -55
  61. package/skills/workflows/memtrace-refactoring-guide.md +31 -11
  62. package/skills/workflows/memtrace-session-continuity.md +63 -49
  63. package/skills/workflows/memtrace-style-fingerprint.md +27 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memtrace-skills",
3
- "version": "0.7.24",
3
+ "version": "0.8.0",
4
4
  "description": "Memtrace skills for AI coding agents — codebase exploration, temporal evolution, impact analysis, and more.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memtrace-skills",
3
- "description": "Memtrace skills for codebase exploration, code search, relationship analysis, temporal evolution, blast radius impact, code quality, graph algorithms, API topology, GitHub PR code review, multi-agent fleet coordination (branch-scoped intents, conflict classification, and agent-judged Class C resolution), and multi-step workflows for change impact, incident investigation, refactoring, session continuity, co-change analysis, and episode replay.",
4
- "version": "0.7.24",
3
+ "description": "Memtrace skills for codebase exploration, code search, relationship analysis, temporal evolution, blast radius impact, code quality, graph algorithms, API topology, GitHub PR code review, multi-agent fleet coordination (branch-scoped intents, conflict classification, and agent-judged Class C resolution), and multi-step workflows for change impact, incident investigation, refactoring, session continuity, co-change analysis, and episode replay, Cortex decision memory (decision recall, provenance, intent verification), session bookends (daily briefing, hotspots, self-audit), and single-symbol pre-edit preflight checks.",
4
+ "version": "0.8.0",
5
5
  "author": {
6
6
  "name": "Syncable",
7
7
  "email": "support@syncable.dev"
@@ -35,8 +35,8 @@ arrays as arrays. No quoting numbers, no `"true"` for booleans.
35
35
  | `branch` *or* `branch_name` | string | Git branch. Default `"main"` across every tool. Both spellings occur historically — use whichever the specific tool's schema says |
36
36
  | `limit` | integer | Cap on returned results. Always a JSON number, never a string |
37
37
  | `depth` | integer | Graph traversal hops. 1–5 is reasonable; >8 explodes on wide graphs |
38
- | `symbol_id` | string (UUID) | Node UUID from `find_symbol` / `find_code` results |
39
- | `from` / `to` / `incident_time` | string (ISO-8601 with timezone) | e.g. `"2026-04-17T13:00:00Z"` — NOT a date like `"2026-04-17"` |
38
+ | `target` / `symbol` | string | Symbol **name** for graph tools — `get_impact`/`analyze_relationships` use `target`; `get_symbol_context` uses `symbol` |
39
+ | `from` / `to` / `since` / `until` | string | e.g. `"90d ago"`, `"2026-04-17T13:00:00Z"`, `"yesterday"`relative strings work for temporal tools. **Never `days` on `get_evolution`.** |
40
40
 
41
41
  ## Search & discovery
42
42
 
@@ -45,16 +45,18 @@ arrays as arrays. No quoting numbers, no `"true"` for booleans.
45
45
  |---|---|---|---|---|
46
46
  | `query` | string | yes | — | Natural-language text |
47
47
  | `repo_id` | string | no | all repos | Scope to one repo |
48
- | `kind` | string | no | — | One of `Function`, `Class`, `Method`, `Interface`, `APIEndpoint`, `APICall` |
49
48
  | `file_path` | string | no | — | Path substring filter |
50
- | `limit` | integer | no | `20` | Capped at `100` |
51
- | `as_of` | string (ISO-8601) | no | now | Time-travel search |
49
+ | `limit` | integer | no | `20` | Max 100 |
50
+ | `as_of` | string | no | now | Time-travel search |
51
+ | `include_diagnostics` | boolean | no | `false` | Include `id`, `score` in results |
52
+
53
+ No `kind` param — use `find_symbol(kind=...)` instead.
52
54
 
53
55
  ### `find_symbol`
54
56
  | Field | Type | Required | Default | Notes |
55
57
  |---|---|---|---|---|
56
58
  | `name` | string | yes | — | Exact or partial identifier |
57
- | `fuzzy` | boolean | no | `false` | Levenshtein tolerance |
59
+ | `fuzzy` | boolean | no | `false` | Exact-match today; field kept for API parity |
58
60
  | `edit_distance` | integer | no | `2` | Max 2. Only used when `fuzzy: true` |
59
61
  | `repo_id` | string | no | all repos | |
60
62
  | `kind` | string | no | — | Same enum as `find_code` |
@@ -80,27 +82,34 @@ No parameters. Call once at session start to get `repo_id` values.
80
82
  ### `get_symbol_context`
81
83
  | Field | Type | Required | Default |
82
84
  |---|---|---|---|
83
- | `symbol_id` | string (UUID) | yes | — |
85
+ | `repo_id` | string | yes | — |
86
+ | `symbol` | string | yes | — |
87
+ | `file_path` | string | no | — |
88
+ | `branch` | string | no | `"main"` |
89
+ | `as_of` | string | no | now |
90
+ | `view` | string | no | `"live"` |
84
91
 
85
92
  Returns: symbol, callers, callees, type_references, community, processes, api_callers_cross_repo.
86
93
 
87
94
  ### `analyze_relationships`
88
95
  | Field | Type | Required | Default | Notes |
89
96
  |---|---|---|---|---|
90
- | `symbol_id` | string (UUID) | yes | — | |
97
+ | `repo_id` | string | yes | — | |
98
+ | `target` | string | yes | — | Symbol name |
91
99
  | `query_type` | string enum | yes | — | `find_callers` \| `find_callees` \| `class_hierarchy` \| `overrides` \| `imports` \| `exporters` \| `type_usages` |
92
- | `depth` | integer | no | `2` | |
93
- | `limit` | integer | no | `50` | |
100
+ | `depth` | integer | no | `3` | Max 10 |
101
+ | `file_path` | string | no | | Disambiguation hint |
94
102
 
95
103
  ## Impact
96
104
 
97
105
  ### `get_impact`
98
106
  | Field | Type | Required | Default | Notes |
99
107
  |---|---|---|---|---|
100
- | `symbol_id` | string (UUID) | yes | — | |
108
+ | `repo_id` | string | yes | — | |
109
+ | `target` | string | yes | — | Symbol name |
101
110
  | `direction` | string enum | no | `"both"` | `"upstream"` \| `"downstream"` \| `"both"` |
102
- | `depth` | integer | no | `3` | |
103
- | `limit` | integer | no | `100` | |
111
+ | `depth` | integer | no | `5` | Max 15 |
112
+ | `as_of` | string | no | now | |
104
113
 
105
114
  ### `detect_changes`
106
115
  | Field | Type | Required | Default | Notes |
@@ -118,13 +127,22 @@ Returns: symbol, callers, callees, type_references, community, processes, api_ca
118
127
  | Field | Type | Required | Default | Notes |
119
128
  |---|---|---|---|---|
120
129
  | `repo_id` | string | yes | — | |
121
- | `from` | string (ISO-8601) | yes | — | Start of window |
122
- | `to` | string (ISO-8601) | yes | | End of window |
123
- | `mode` | string enum | no | `"compound"` | `"compound"` \| `"impact"` \| `"novel"` \| `"recent"` \| `"directional"` \| `"overview"` |
124
- | `incident_time` | string (ISO-8601) | no | — | Reference for `recent` mode |
125
- | `branch` | string | no | `"main"` | |
126
- | `max_symbols` | integer | no | `50` | Per category |
127
- | `scope` | string | no | — | File / module prefix |
130
+ | `from` | string | yes | — | Start of window. RFC3339, ISO date, epoch, or relative (`"7d ago"`, `"yesterday"`). **Never pass `days`.** |
131
+ | `to` | string | no | now | End of window |
132
+ | `mode` | string enum | no | `"recent"` | `"recent"` \| `"compound"` \| `"summary"` \| `"overview"` (alias for `summary`) |
133
+ | `target` | string | no | — | Symbol name or file path substring scope |
134
+ | `branch` | string | no | any branch | |
135
+ | `file_path` | string | no | | **`recent` mode only** — substring match on `touched_files` |
136
+ | `kind` | string | no | — | **`recent` mode only** `"git_commit"` or `"working_tree"` |
137
+ | `limit` | integer | no | `100` | **`recent` mode only** — page size; `0` = server cap |
138
+ | `cursor` | integer | no | `0` | **`recent` mode only** — pagination offset |
139
+
140
+ **Response by mode:**
141
+ - `recent` → `episodes[]`, `totals`, `page` (with `next_cursor`)
142
+ - `compound` → `totals`, `top_changed_files`, `top_touched_symbols`
143
+ - `summary` / `overview` → `totals`, `first_episode`, `last_episode`
144
+
145
+ Modes **`impact`**, **`novel`**, **`directional`** are **not implemented**.
128
146
 
129
147
  ### `get_timeline`
130
148
  | Field | Type | Required | Default | Notes |
@@ -137,30 +155,41 @@ Returns: symbol, callers, callees, type_references, community, processes, api_ca
137
155
  ### `get_episode_replay`
138
156
  | Field | Type | Required | Default | Notes |
139
157
  |---|---|---|---|---|
140
- | `repo_id` | string | yes | — | |
141
- | `symbol` | string | yes | — | Symbol name, e.g. `"validateToken"` |
142
- | `from` | string (ISO-8601) | yes | — | Window start |
143
- | `to` | string (ISO-8601) | yes | | Window end |
144
- | `branch` | string | no | `"main"` | |
145
- | `include_working_tree` | boolean | no | `true` | Include uncommitted file-save episodes |
158
+ | `episode_id` | string | | — | Episode UUID — preferred when known |
159
+ | `repo_id` | string | | — | Required with `episode_index` when `episode_id` omitted |
160
+ | `episode_index` | integer | | — | 0 = newest episode |
161
+ | `branch` | string | no | any branch | Used with `episode_index` |
162
+ | `symbol` | string | no | | Optional filter — scope to one symbol |
163
+ | `kind` | string | no | — | e.g. `Function`, `CALLS` narrow large commits |
164
+ | `file_path` | string | no | — | Substring filter on record paths |
165
+ | `limit` | integer | no | `200` | Page size per bucket; `0` = no pagination |
166
+ | `cursor` | integer | no | `0` | Pagination offset |
167
+ | `mode` | string | no | default | `"graph_summary"` for digest on large commits |
168
+ | `compress` | boolean | no | `true` | Collapse identical-hash modifications |
169
+
170
+ † Supply `episode_id`, OR `repo_id` + `episode_index`.
146
171
 
147
172
  ### `get_changes_since`
148
173
  | Field | Type | Required | Default | Notes |
149
174
  |---|---|---|---|---|
150
175
  | `repo_id` | string | yes | — | |
151
- | `last_episode_id` | string | no | — | Preferred anchor from previous response |
152
- | `last_reference_time` | string (ISO-8601) | no | | Fallback when no episode ID |
153
- | `branch` | string | no | `"main"` | |
176
+ | `since` | string | yes | — | Cutoff timestamp. Same formats as `get_evolution.from`. **Not** `last_episode_id`. |
177
+ | `until` | string | no | now | Optional upper bound |
178
+ | `branch` | string | no | any branch | |
154
179
 
155
- Pass exactly one.
180
+ Returns `episodes[]` with per-episode change counts and `totals`. Store `until` (or latest episode `reference_time`) as the next session's `since` value.
156
181
 
157
182
  ### `get_cochange_context`
158
183
  | Field | Type | Required | Default | Notes |
159
184
  |---|---|---|---|---|
160
185
  | `repo_id` | string | yes | — | |
161
- | `symbol` | string | yes | — | Symbol name (not ID) |
162
- | `branch` | string | no | `"main"` | |
163
- | `limit` | integer | no | `20` | |
186
+ | `target` | string | yes | — | Symbol name or file path |
187
+ | `window_days` | integer | no | `30` | Lookback from `as_of` |
188
+ | `as_of` | string | no | now | Window anchor |
189
+ | `branch` | string | no | any branch | |
190
+ | `limit` | integer | no | `10` | Max cochanged files returned |
191
+
192
+ Returns `cochanged_files[]` with `file_path`, `cochange_count`, `last_cochanged_at`.
164
193
 
165
194
  ## Graph algorithms
166
195
 
@@ -168,9 +197,9 @@ Returns: symbol, callers, callees, type_references, community, processes, api_ca
168
197
  | Field | Type | Required | Default | Notes |
169
198
  |---|---|---|---|---|
170
199
  | `repo_id` | string | yes | — | |
171
- | `branch` | string | no | `"main"` | |
172
- | `algorithm` | string enum | no | `"pagerank"` | `"pagerank"` \| `"degree"` — falls back to degree if MAGE unavailable |
173
- | `limit` | integer | no | `20` | Max 100 |
200
+ | `branch` | string | no | any branch | |
201
+ | `kinds` | array of string | no | Function/Method/Class/… | |
202
+ | `limit` | integer | no | `25` | Max 100. Always PageRank — no `method` param. |
174
203
 
175
204
  ### `find_bridge_symbols`
176
205
  | Field | Type | Required | Default | Notes |
@@ -204,10 +233,11 @@ Returns: symbol, callers, callees, type_references, community, processes, api_ca
204
233
  ### `find_dependency_path`
205
234
  | Field | Type | Required | Default | Notes |
206
235
  |---|---|---|---|---|
207
- | `repo_id` | string | yes | — | |
208
- | `from` | string | yes | — | Source symbol name |
209
- | `to` | string | yes | — | Destination symbol name |
210
- | `max_depth` | integer | no | `8` | BFS hop limit |
236
+ | `repo_id` | string | yes | — | |
237
+ | `source` | string | yes | — | Start symbol name |
238
+ | `target` | string | yes | — | End symbol name |
239
+ | `max_depth` | integer | no | `20` | Max 20 |
240
+ | `edge_type` | string | no | calls+refs+… | Comma-separated or alias |
211
241
 
212
242
  ## Quality
213
243
 
@@ -231,13 +261,14 @@ Returns: symbol, callers, callees, type_references, community, processes, api_ca
231
261
  |---|---|---|---|
232
262
  | `repo_id` | string | yes | — |
233
263
  | `branch` | string | no | `"main"` |
234
- | `limit` | integer | no | `10` |
235
- | `min_complexity` | integer | no | `0` |
264
+ | `top_n` | integer | no | `20` |
265
+ | `kinds` | array of string | no | Function+Method |
236
266
 
237
267
  ### `calculate_cyclomatic_complexity`
238
268
  | Field | Type | Required | Default |
239
269
  |---|---|---|---|
240
- | `symbol_id` | string (UUID) | yes | — |
270
+ | `repo_id` | string | yes | — |
271
+ | `target` | string | yes | — |
241
272
 
242
273
  ## API topology
243
274
 
@@ -291,12 +322,82 @@ Connects already-indexed repos so `get_api_topology` can stitch their HTTP graph
291
322
  |---|---|---|---|
292
323
  | `repo_id` | string | yes | — |
293
324
 
294
- ### `watch_directory` / `unwatch_directory` / `list_watched_paths`
295
- File watcher control. See the tool schema via `list_tools` for current fields.
325
+ ### `watch_directory`
326
+ | Field | Type | Required | Default |
327
+ |---|---|---|---|
328
+ | `path` | string | yes | — |
329
+ | `repo_id` | string | yes | — |
330
+ | `branch` | string | no | `"main"` |
331
+
332
+ ### `unwatch_directory`
333
+ | Field | Type | Required |
334
+ |---|---|---|
335
+ | `path` | string | yes |
336
+
337
+ ### `list_watched_paths`
338
+ No parameters. Returns `{ watches: [{ path, repo_id, branch, started_at, origin }], count }`.
339
+
340
+ ### `replay_history`
341
+ | Field | Type | Required | Default |
342
+ |---|---|---|---|
343
+ | `repo_id` | string | yes | — |
344
+ | `days` | integer | no | all history |
345
+
346
+ ## Session bookends & pre-edit checks
347
+
348
+ ### `get_daily_briefing`
349
+ | Field | Type | Required | Default | Notes |
350
+ |---|---|---|---|---|
351
+ | `repo_id` | string | yes | — | |
352
+ | `window_hours` | integer | no | `24` | Clamped to 1–336 (14 days) |
353
+
354
+ ### `review_agent_sessions`
355
+ | Field | Type | Required | Default | Notes |
356
+ |---|---|---|---|---|
357
+ | `repo_id` | string | yes | — | |
358
+ | `window_hours` | integer | no | `24` | Clamped to 1–336. Saves >30 min apart split into separate sessions |
359
+
360
+ ### `find_hotspots`
361
+ | Field | Type | Required | Default | Notes |
362
+ |---|---|---|---|---|
363
+ | `repo_id` | string | yes | — | |
364
+ | `window_days` | integer | no | `14` | Kept inside the engine's 15-day hot-history horizon; deeper windows trigger a full-store scan |
365
+ | `top_n` | integer | no | `20` | Max rows |
366
+
367
+ ### `preflight_check`
368
+ | Field | Type | Required | Default |
369
+ |---|---|---|---|
370
+ | `repo_id` | string | yes | — |
371
+ | `symbol` | string | yes | — |
372
+
373
+ ## Cortex decision memory
374
+
375
+ Proxied to memcortex-serve; available when the Cortex store is enabled. Ids are
376
+ **JSON numbers** (Cortex node ids), not strings — `decision_id: 1`, never `"1"`.
377
+ An unknown or empty query/id returns an explicit **CannotProve**, never a
378
+ fabricated result.
379
+
380
+ ### `recall_decision`
381
+ | Field | Type | Required | Notes |
382
+ |---|---|---|---|
383
+ | `query` | string | yes | Free text; drives the lexical lane, decisions ranked first |
384
+
385
+ (A tier-based decision cap is applied server-side; it is not a caller parameter.)
386
+
387
+ ### `get_arc` / `verify_intent`
388
+ | Field | Type | Required | Notes |
389
+ |---|---|---|---|
390
+ | `decision_id` | integer | yes | The `id` of a `kind: "decision"` hit from `recall_decision` |
391
+
392
+ ### `why_is_this_here` / `governing_contracts`
393
+ | Field | Type | Required | Notes |
394
+ |---|---|---|---|
395
+ | `symbol_id` | integer | yes | Cortex symbol node id |
296
396
 
297
397
  ## When this file is wrong
298
398
 
299
399
  It's drift-prone. Regenerate by grepping `crates/memtrace-mcp/src/tools/*.rs`
300
- for `^pub struct.*Params` — the Rust declarations are the source of truth.
400
+ for `^pub struct.*Params` — the Rust declarations are the source of truth
401
+ (Cortex decision tools: `MemCortex/crates/memcortex-mcp/src/request.rs`).
301
402
  If a live tool call rejects with `-32602`, trust the Rust struct over this
302
403
  doc and file a fix PR.
@@ -1,58 +1,51 @@
1
1
  ---
2
2
  name: memtrace-api-topology
3
- description: "Always use for API endpoint, HTTP route, fetch/client call, REST surface, service dependency, cross-repo dependency, or API topology questions in source code. Do not use Grep, Glob, rg, find, or manual file search for routes or HTTP calls; Memtrace maps endpoints and call edges from the indexed AST graph."
3
+ description: "Map API endpoints, outbound HTTP calls, and cross-repo service topology in indexed source code. Use when the user asks about API endpoints, HTTP routes, fetch/client calls, REST surface, service dependencies, cross-repo dependencies, or API topology. Do not use Grep, Glob, rg, find, or manual file search for routes or HTTP calls; Memtrace maps endpoints and call edges from the indexed AST graph."
4
4
  ---
5
5
 
6
6
  ## Overview
7
7
 
8
- Map the HTTP API surface of a codebase exposed endpoints, outbound HTTP calls, and cross-repo service-to-service dependency graphs. Supports auto-detection for Express, Encore, NestJS, Axum, FastAPI, Flask, Gin, Spring Boot, and more.
8
+ Map HTTP API surface — endpoints, outbound calls, cross-repo topology.
9
9
 
10
10
  ## Quick Reference
11
11
 
12
- | Tool | Purpose |
13
- |------|---------|
14
- | `find_api_endpoints` | All exposed HTTP endpoints (GET /users, POST /orders, etc.) |
15
- | `find_api_calls` | All outbound HTTP calls (fetch, axios, reqwest, etc.) |
16
- | `get_api_topology` | Cross-repo call graph: which service calls which endpoint |
17
- | `link_repositories` | Manually link repos for cross-repo edge detection |
18
-
19
- > **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`.
12
+ | Tool | Required | Key optional |
13
+ |------|----------|--------------|
14
+ | `find_api_endpoints` | `repo_id` | `method`, `path_contains`, `limit`, `branch` |
15
+ | `find_api_calls` | `repo_id` | `method`, `path_contains`, `limit`, `branch` |
16
+ | `get_api_topology` | | `repo_id`, `min_confidence`, `include_external` |
20
17
 
18
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
21
19
 
22
20
  ## Steps
23
21
 
24
- ### 1. Discover endpoints
25
-
26
- Use `find_api_endpoints`:
27
- - `repo_id` — required
28
- - Returns: method, path, handler function, framework detected
29
-
30
- ### 2. Discover outbound calls
22
+ ### 1–3. Endpoints, calls, topology
31
23
 
32
- Use `find_api_calls`:
33
- - `repo_id` required
34
- - Returns: target URL/path, HTTP method, calling function, library used (fetch, axios, reqwest, etc.)
24
+ ```json
25
+ { "repo_id": "memdb" }
26
+ { "repo_id": "memdb", "method": "GET", "path_contains": "/users" }
27
+ { "min_confidence": 0.7 }
28
+ ```
35
29
 
36
- ### 3. Map service topology
30
+ ### 4. Deep-dive an endpoint handler
37
31
 
38
- Use `get_api_topology` to see the cross-repo HTTP call graph:
39
- - Which services call which endpoints
40
- - Confidence scores for each detected link
41
- - Service-to-service dependency direction
32
+ Use handler **symbol name** not symbol ID:
42
33
 
43
- **Prerequisite:** Multiple repos must be indexed. If cross-repo links aren't appearing, use `link_repositories` to explicitly connect them.
34
+ ```json
35
+ { "repo_id": "memdb", "symbol": "handleGetUsers" }
36
+ ```
44
37
 
45
- ### 4. Deep-dive into an endpoint
38
+ ## Output
46
39
 
47
- For any specific endpoint, use `get_symbol_context` with the endpoint's symbol ID to see:
48
- - Which internal functions handle the request
49
- - Which processes (execution flows) include this endpoint
50
- - Which external services call this endpoint
40
+ | Result | Carries |
41
+ |--------|---------|
42
+ | Endpoint entry (`find_api_endpoints`) | HTTP method, route path, handler symbol name (feed to `get_symbol_context` as `symbol`) |
43
+ | Call entry (`find_api_calls`) | HTTP method, target path, calling symbol |
44
+ | Topology edge (`get_api_topology`) | caller repo → handler repo, confidence 0.0–1.0 (edges below `min_confidence` dropped) |
51
45
 
52
46
  ## Common Mistakes
53
47
 
54
48
  | Mistake | Reality |
55
49
  |---------|---------|
56
- | Expecting cross-repo links with only one repo indexed | Index ALL related services first; cross-repo HTTP edges are linked automatically after indexing |
57
- | Missing endpoints from custom frameworks | Memtrace auto-detects major frameworks; for custom routers, the endpoints may appear as regular functions |
58
- | Not using `link_repositories` | If auto-linking missed a connection, use this to manually establish cross-repo edges |
50
+ | `get_symbol_context(symbol_id=...)` | Use **`symbol`** (name) + `repo_id` |
51
+ | Cross-repo links with one repo indexed | Index all services; use `link_repositories` if needed |
@@ -1,6 +1,6 @@
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
  ---
5
5
 
6
6
  ## Overview
@@ -15,11 +15,11 @@ Find the target symbol(s):
15
15
  - Use `find_symbol` if the user named specific functions/classes
16
16
  - Use `find_code` if the user described behaviour ("the authentication middleware")
17
17
 
18
- Collect symbol IDs for all targets.
18
+ Collect symbol **names** (`name`, `scope_path`, `file_path`) for all targets — graph tools use names, not internal IDs.
19
19
 
20
20
  ### 2. Get 360° context for each target
21
21
 
22
- For each symbol, call `get_symbol_context`:
22
+ For each symbol, call `get_symbol_context` (`repo_id`, `symbol`, `file_path`):
23
23
  - Direct callers and callees
24
24
  - Community membership (which module is this in?)
25
25
  - Process membership (which execution flows does this participate in?)
@@ -29,7 +29,7 @@ For each symbol, call `get_symbol_context`:
29
29
 
30
30
  ### 3. Compute blast radius
31
31
 
32
- For each target, call `get_impact` with `direction: both`:
32
+ For each target, call `get_impact` (`repo_id`, `target`) with `direction: "both"`, `depth: 5`:
33
33
  - Upstream impact: what depends on this symbol
34
34
  - Downstream impact: what this symbol depends on
35
35
  - Risk rating: Low / Medium / High / Critical
@@ -44,13 +44,16 @@ For each target, call `get_impact` with `direction: both`:
44
44
 
45
45
  ### 4. Check temporal stability
46
46
 
47
- Call `get_evolution` with mode `novel` for a 30-day window on the repo:
48
- - Are any of the target symbols flagged as "rarely changing"? If so, this change is structurally surprising and deserves extra scrutiny.
49
- - Have the target symbols been changing frequently? High churn + high impact = volatile hotspot.
47
+ 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`):
48
+ - Sparse timeline history + you're about to change it structurally surprising; extra scrutiny warranted.
49
+ - Target appears in `top_touched_symbols` high churn + high impact = volatile hotspot.
50
50
 
51
51
  ### 5. Map affected execution flows
52
52
 
53
- 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.
53
+ 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.
54
+
55
+ `depth: 3` is a JSON number, not a string — the validator rejects `"3"`.
56
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
54
57
 
55
58
  ### 6. Produce the risk assessment
56
59
 
@@ -60,7 +63,7 @@ Synthesize into a change plan:
60
63
  2. **Blast Radius** — number of direct/transitive dependents, risk rating
61
64
  3. **Affected Processes** — which execution flows will be impacted
62
65
  4. **Cross-Service Impact** — any external callers or consumers
63
- 5. **Stability Signal** — is this code stable (novel) or volatile (frequent changes)?
66
+ 5. **Stability Signal** — sparse `get_timeline` history (stable) vs frequent appearance in `top_touched_symbols` (volatile)
64
67
  6. **Recommended Approach** — based on risk: direct change, incremental migration, or backward-compatible evolution
65
68
  7. **Test Coverage** — which callers/processes to verify after the change
66
69
 
@@ -70,6 +73,20 @@ Synthesize into a change plan:
70
73
  |-----------|--------|
71
74
  | Risk = Critical | Recommend backward-compatible change + deprecation path |
72
75
  | Cross-repo callers exist | Flag as requiring multi-service coordination |
73
- | Symbol has high novelty score | Extra review — this rarely changes; make sure the change is intentional |
76
+ | Symbol has sparse timeline but high impact | Extra review — this rarely changes; make sure the change is intentional |
74
77
  | Multiple processes affected | List each affected flow; recommend testing each one |
75
78
  | Symbol is a bridge point | Change may disconnect parts of the architecture — verify alternative paths exist |
79
+
80
+ ## Output
81
+
82
+ The workflow's artifact is the step-6 risk-rated change plan. Compact example:
83
+
84
+ ```text
85
+ Target: AuthService::validateToken (src/auth/service.ts)
86
+ Blast Radius: 4 direct / 23 transitive dependents — Risk: High
87
+ Affected Processes: login-flow, session-refresh
88
+ Cross-Service Impact: 2 cross-repo API callers — needs multi-service coordination
89
+ Stability Signal: appears in top_touched_symbols (volatile hotspot)
90
+ Recommended Approach: incremental migration behind a feature flag
91
+ Test Coverage: all 4 direct callers + both affected processes
92
+ ```
@@ -1,61 +1,83 @@
1
1
  ---
2
2
  name: memtrace-cochange
3
- description: "Always use for historical coupling, co-change, what changes with this, hidden dependency, or what else needs to move questions for source code. Do not use git log, git diff, Grep, or manual file search to correlate changes; Memtrace queries co-change and temporal graph data directly."
3
+ description: "Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git log, git diff, Grep, or manual file search to correlate changes; Memtrace queries co-change and temporal graph data directly."
4
4
  ---
5
5
 
6
6
  ## Overview
7
7
 
8
- Find symbols that historically co-change with a target symbol — ranked by co-occurrence frequency across all episodes. This surfaces **behavioral coupling** that the static call graph cannot see.
8
+ Find **files** that historically co-change with a target symbol or file path — ranked by co-occurrence frequency across git episodes. Surfaces **behavioral coupling** the static call graph cannot see.
9
9
 
10
10
  `get_impact` answers "who calls this?" (structural).
11
- `get_cochange_context` answers "what always moves when this moves?" (historical).
12
-
13
- They are complementary. A symbol with no direct callers can still have strong cochange partners if it's always modified alongside another in every commit.
11
+ `get_cochange_context` answers "what files always move when this moves?" (historical, file-level).
12
+
13
+ They are complementary. A file with no call-graph edges to the target can still be a strong cochange partner if it's always modified alongside it in every commit.
14
+
15
+ > **Parameter types:** Numbers (`limit`, `window_days`, etc.) must be JSON numbers — not strings.
16
+
17
+ ## Required parameters
18
+
19
+ | Parameter | Required | Default | Notes |
20
+ |---|---|---|---|
21
+ | `repo_id` | yes | — | |
22
+ | `target` | yes | — | Symbol name **or** file path substring — **not** `symbol` |
23
+ | `limit` | no | **10** | Max cochanged files returned |
24
+ | `window_days` | no | **30** | Lookback from `as_of` |
25
+ | `as_of` | no | now | Window anchor |
26
+ | `branch` | no | any branch | |
27
+
28
+ ```json
29
+ {
30
+ "repo_id": "memdb",
31
+ "target": "execute",
32
+ "limit": 10,
33
+ "window_days": 30
34
+ }
35
+ ```
14
36
 
15
- > **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`.
37
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
38
+
39
+ ## Output
40
+
41
+ ```json
42
+ {
43
+ "cochanged_files": [
44
+ {
45
+ "file_path": "src/order/types.rs",
46
+ "cochange_count": 8,
47
+ "last_cochanged_at": "2026-04-13T10:43:00Z"
48
+ }
49
+ ],
50
+ "target_files": ["src/order/service.rs"]
51
+ }
52
+ ```
16
53
 
54
+ There is **no** `cochanges[]` with symbol names — results are **file-level**.
17
55
 
18
56
  ## Steps
19
57
 
20
- ### 1. Identify the target symbol
58
+ ### 1. Identify the target
21
59
 
22
- Use `find_symbol` if you need the exact name. The tool matches by `name` field.
60
+ Use `find_symbol` if needed. Pass the symbol **`name`** or a **`file_path`** as `target`.
23
61
 
24
62
  ### 2. Call `get_cochange_context`
25
63
 
26
- ```
27
- get_cochange_context(
28
- repo_id: "...",
29
- symbol: "execute", // exact symbol name
30
- limit: 20 // default 20, increase for broader view
31
- )
32
- ```
64
+ See required parameters above.
33
65
 
34
66
  ### 3. Interpret results
35
67
 
36
- The response contains `cochanges[]`, each with:
37
- - `name` — symbol name
38
- - `kind` — Function / Method / Class / Struct
39
- - `file_path` — where it lives
40
- - `cochange_count` — how many episodes it shared with the target
41
-
42
- ```
43
- High cochange_count = strong historical coupling
44
- → If you modify the target, you will likely need to touch this too
45
- → Or it may be the real root cause you should investigate first
46
- ```
68
+ High `cochange_count` on a file → strong historical coupling. When you modify the target, review those files too — even without direct call-graph edges.
47
69
 
48
70
  ### 4. Cross-reference with call graph
49
71
 
50
- For the top cochange partners, optionally run `get_impact` to see if the coupling is also structural:
72
+ For symbols in cochanged files, optionally run `get_impact(target=...)`:
51
73
 
52
74
  | Structural coupling | Historical coupling | Interpretation |
53
75
  |---|---|---|
54
- | Yes | Yes | Core architectural dependency — highest risk |
55
- | No | Yes | Hidden coupling — only visible through history |
56
- | Yes | No | Called frequently but changed independently — lower risk |
76
+ | Yes | Yes | Core dependency — highest risk |
77
+ | No | Yes | Hidden coupling — history-only |
78
+ | Yes | No | Called often but changed independently |
57
79
 
58
- ## When to Use
80
+ ## Use Cases
59
81
 
60
82
  - **Before modifying a symbol** — get blast awareness beyond what `get_impact` shows
61
83
  - **Incident investigation** — when `get_impact` doesn't explain the blast radius, check cochange history
@@ -67,5 +89,9 @@ For the top cochange partners, optionally run `get_impact` to see if the couplin
67
89
  | Mistake | Reality |
68
90
  |---------|---------|
69
91
  | Only using `get_impact` for blast radius | Structural coupling misses behavioral coupling — always pair with cochange |
70
- | Ignoring low-`in_degree` cochange partners | A rarely-called utility with high cochange_count is a strong coupling signal |
71
- | Using cochange as a dependency map | It's not a dependency graph — it's a change correlation. Two symbols can cochange without any direct relationship. |
92
+ | Ignoring cochanged files with no call-graph edges | A rarely-called file with high `cochange_count` is a strong coupling signal |
93
+ | Using cochange as a dependency map | It's a change correlation, not a dependency graph — files can cochange without any direct relationship |
94
+ | Passing `symbol:` | Required param is **`target`** |
95
+ | Expecting `cochanges[]` with symbol names | Response is **`cochanged_files[]`** (file paths) |
96
+ | Using `limit: 20` as default | API default is **10** |
97
+ | Empty results with 0 git episodes | Run `replay_history` during indexing to populate co-change data |