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,135 +1,168 @@
1
1
  ---
2
2
  name: memtrace-evolution
3
- description: "Always use for source-code change history, recent modifications, what changed since a date, symbol timeline, evolution, unexpected changes, or incident timeline questions. Do not use git log, git diff, Grep, or manual file search to reconstruct history; Memtrace has symbol-level temporal memory."
3
+ description: "Trace source-code change history from Memtrace's symbol-level temporal memory. Use when the user asks about change history, recent modifications, what changed since a date, symbol timeline, evolution, unexpected changes, or incident timelines. Do not use git log, git diff, Grep, or manual file search to reconstruct history. Do NOT use for current-state architecture overviews (use memtrace-codebase-exploration) or for replaying one commit/save's graph diff (use memtrace-episode-replay)."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__get_evolution
6
6
  - mcp__memtrace__get_timeline
7
7
  - mcp__memtrace__detect_changes
8
8
  - mcp__memtrace__list_indexed_repositories
9
9
  - mcp__memtrace__get_changes_since
10
+ - mcp__memtrace__get_impact
11
+ - mcp__memtrace__get_cochange_context
12
+ - mcp__memtrace__get_episode_replay
13
+ metadata:
14
+ author: "Syncable <support@syncable.dev>"
15
+ version: "1.0.0"
16
+ category: development
10
17
  user-invocable: true
11
18
  ---
12
19
 
13
20
  ## Overview
14
21
 
15
- Multi-mode temporal analysis engine that answers "what changed and why should I care?" across arbitrary time windows. Uses Structural Significance Budgeting (SSB) to surface the most important changes without overwhelming you with noise.
22
+ Temporal analysis for "what changed in this repo between two points in time?" Works on both git commits and uncommitted working-tree saves.
16
23
 
17
- This is memtrace's most powerful analytical tool. It implements six distinct scoring algorithms choose the right one based on what the user needs.
24
+ ## Required parametersread before calling
18
25
 
19
- ## Query Modes Choose the Right Algorithm
26
+ `get_evolution` **always** requires `repo_id` and `from`. There is no `days` parameter.
20
27
 
21
- | Mode | Algorithm | Best For |
22
- |------|-----------|----------|
23
- | `compound` | Rank-fusion: 0.50×impact + 0.35×novel + 0.15×recent | **Default.** General-purpose "what changed?" — use when unsure |
24
- | `impact` | Structural Significance: `sig(n) = in_degree^0.7 × (1 + out_degree)^0.3` | "What broke?" — finds changes with the largest blast radius |
25
- | `novel` | Change Surprise Index: `surprise(n) = (1 + in_degree) / (1 + change_freq_90d)` | "What's unexpected?" — anomaly detection for rarely-changing code |
26
- | `recent` | Temporal Proximity: `impact × exp(−0.5 × Δhours)` | "What changed near the incident?" — time-weighted for root cause |
27
- | `directional` | Asymmetric scoring (added→out_degree, removed→in_degree, modified→impact) | "What was added vs removed?" structural change direction |
28
- | `overview` | Fast module-level rollup only | Quick summary — no per-symbol scoring, just module counts |
28
+ | Parameter | Required | Type | Example |
29
+ |---|---|---|---|
30
+ | `repo_id` | yes | string | `"memdb"` |
31
+ | `from` | yes | string | `"90d ago"`, `"2026-04-01T00:00:00Z"`, `"yesterday"` |
32
+ | `to` | no | string | defaults to now; set to incident time when investigating |
33
+ | `mode` | no | string | `"recent"` (default), `"compound"`, `"summary"`, `"overview"` |
34
+ | `target` | no | string | symbol name or file path substring to scope results |
35
+ | `branch` | no | string | branch filter |
29
36
 
30
- > **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
+ > **Parameter types:** MCP parameters are strictly typed. Numbers (`limit`, `cursor`, etc.) must be JSON numbers — not strings. Use `limit: 100`, never `limit: "100"`.
31
38
 
39
+ ### Time-window parameters — do not confuse these tools
32
40
 
33
- ## Steps
34
-
35
- ### 1. Determine the time window
36
-
37
- Ask the user or infer:
38
- - `from` — ISO-8601 start timestamp (required)
39
- - `to` — ISO-8601 end timestamp (defaults to now)
40
- - `repo_id` — scope to a repo (call `list_indexed_repositories` if unknown)
41
+ | Tool | Time param | Example | Notes |
42
+ |---|---|---|---|
43
+ | `get_evolution` | **`from`** (required) | `"90d ago"` | optional `to`; **never** pass `days` |
44
+ | `get_changes_since` | **`since`** (required) | `"2026-04-13T10:43:00Z"` | optional `until` |
45
+ | `replay_history` | **`days`** (optional) | `90` | re-walks git history — different tool entirely |
41
46
 
42
- ### 2. Choose the mode
47
+ Common failure: `MCP error -32602: missing field 'from'` — you omitted `from` or passed `days` instead.
43
48
 
44
- **Decision tree:**
49
+ ```json
50
+ // CORRECT — 90-day overview
51
+ { "repo_id": "memdb", "from": "90d ago", "mode": "overview" }
45
52
 
53
+ // WRONG — days is not a get_evolution parameter
54
+ { "repo_id": "memdb", "days": 90, "mode": "overview" }
46
55
  ```
47
- User wants to know...
48
- ├── "what changed?" → compound (default)
49
- ├── "what could have broken?" → impact
50
- ├── "anything unexpected?" → novel
51
- ├── "what changed near X?" → recent (set to to incident time)
52
- ├── "what was added/removed?" → directional
53
- └── "quick summary?" → overview
54
- ```
55
-
56
- ### 3. Execute the query
57
56
 
58
- Use the `get_evolution` MCP tool with:
59
- - `repo_id` — required
60
- - `from` / `to` — the time window
61
- - `mode` — one of: compound, impact, novel, recent, directional, overview
57
+ ## Query modes only these four exist
62
58
 
63
- ### 4. Interpret results
59
+ | Mode | What you get | Best for |
60
+ |---|---|---|
61
+ | `recent` | Per-episode list with nodes/edges added/removed; paginate with `limit` + `cursor` | Incident timelines, walking commit-by-commit |
62
+ | `compound` | Totals plus `top_changed_files` and `top_touched_symbols` | "What changed?" when you need hotspots |
63
+ | `summary` | Totals plus `first_episode` / `last_episode` metadata | Cheapest window check |
64
+ | `overview` | Alias for `summary` | Same as `summary` |
64
65
 
65
- The response contains:
66
+ Modes **`impact`**, **`novel`**, and **`directional`** are **not implemented** — calling them returns `unknown mode`.
66
67
 
67
- - **`added[]`** new symbols that appeared in the time window
68
- - **`removed[]`** — symbols that were deleted
69
- - **`modified[]`** — symbols that changed
70
- - **`by_module[]`** — module-level rollup (NEVER truncated — always shows all modules)
71
- - **`significance_coverage`** — fraction of total significance captured (target: ≥0.80)
72
- - **`budget_exhausted`** — if true, there were more significant changes than the budget allowed
68
+ ### `recent` mode filters (ignored by `compound` / `summary`)
73
69
 
74
- Each symbol includes: `name`, `kind`, `file_path`, `scope_path`, `in_degree`, `out_degree`, and all four scores (`impact`, `novel`, `recent`, `compound`).
70
+ | Param | Purpose |
71
+ |---|---|
72
+ | `file_path` | substring match against episode `touched_files` |
73
+ | `kind` | `"git_commit"` or `"working_tree"` |
74
+ | `limit` | page size (default 100 episodes) |
75
+ | `cursor` | pagination offset; follow `next_cursor` in response |
75
76
 
76
- ### 5. Drill deeper
77
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
77
78
 
78
- - **For a single symbol's full history:** Use `get_timeline` with the symbol name
79
- - **For diff-based change scope:** Use `detect_changes` when you have a specific diff/patch
80
- - **For blast radius of a specific change:** Use `get_impact` on high-scoring symbols
79
+ ## Steps
81
80
 
82
- ## Scoring Algorithms — Detailed Reference
81
+ ### 1. Get `repo_id`
83
82
 
84
- ### Impact Score (Structural Significance Budgeting)
85
83
  ```
86
- sig(n) = in_degree^0.7 × (1 + out_degree)^0.3
84
+ list_indexed_repositories()
87
85
  ```
88
- - Heavily weights callers (in_degree) — symbols called by many others have high blast radius
89
- - Mild boost for outbound complexity (out_degree) — complex functions that changed are notable
90
- - SSB selects the minimum set covering ≥80% of total significance mass
91
86
 
92
- ### Novelty Score (Change Surprise Index)
93
- ```
94
- surprise(n) = (1 + in_degree) / (1 + change_freq_90d)
95
- ```
96
- - High in_degree + low change frequency = **maximum surprise**
97
- - A core utility that hasn't changed in 90 days suddenly changing likely worth investigating
98
- - Low in_degree + high frequency = routine churn, deprioritized
87
+ ### 2. Choose the time window
88
+
89
+ - `from` — start (required). Relative strings work: `"7d ago"`, `"24 hours ago"`.
90
+ - `to` — end (optional, defaults to now). Set to the incident timestamp when investigating regressions.
91
+
92
+ If resuming a session and you have a stored timestamp from last time, prefer `get_changes_since(since=...)` — see `memtrace-session-continuity`.
93
+
94
+ ### 3. Choose the mode
99
95
 
100
- ### Recent Score (Temporal Proximity Weighting)
101
96
  ```
102
- recent(n) = impact(n) × exp(−0.5 × |Δhours to reference|)
97
+ User wants...
98
+ ├── per-commit / per-save changelog → recent
99
+ ├── top changed files + symbols → compound
100
+ ├── quick totals only → summary or overview
101
+ └── one symbol's full history → get_timeline (not get_evolution)
103
102
  ```
104
- - Exponential decay from the reference timestamp (the `to` parameter)
105
- - Changes close to an incident get amplified; older changes fade
106
- - Best for incident timelines: set `to` to the incident timestamp
107
103
 
108
- ### Compound Score (Rank Fusion)
109
- ```
110
- compound = 0.50×rank(impact) + 0.35×rank(novel) + 0.15×rank(recent)
104
+ ### 4. Execute
105
+
106
+ ```json
107
+ // General "what changed lately?"
108
+ { "repo_id": "memdb", "from": "30d ago", "mode": "compound" }
109
+
110
+ // Changes in one file last week
111
+ { "repo_id": "memdb", "from": "7d ago", "mode": "recent", "file_path": "auth.ts", "limit": 50 }
112
+
113
+ // Incident: 24h before failure until failure time
114
+ { "repo_id": "memdb", "from": "2026-04-16T13:00:00Z", "to": "2026-04-17T13:00:00Z", "mode": "recent" }
111
115
  ```
112
- - Rank-based fusion avoids scale sensitivity between different score types
113
- - Impact-dominant but boosted by novelty and recency
114
- - Best default when you don't have a specific hypothesis
115
116
 
116
- ## Auto-overview Safety
117
+ ### 5. Interpret results
118
+
119
+ **`recent` mode** — each entry in `episodes[]`:
120
+ - `episode` — metadata (`source_type`, `reference_time`, `touched_files`, …)
121
+ - `nodes_added`, `nodes_removed`, `edges_added`, `edges_removed`
122
+
123
+ **`compound` mode:**
124
+ - `totals` — aggregate counts
125
+ - `top_changed_files` — files with most activity
126
+ - `top_touched_symbols` — symbols with most activity
117
127
 
118
- If a time window produces more than 500 candidates and mode is not `overview`, the query **automatically downgrades to overview mode** and returns `auto_overview: true`. This prevents timeouts on wide windows. When you see `auto_overview: true`:
119
- - Narrow the window, OR
120
- - Switch to `get_changes_since` (which handles this automatically), OR
121
- - Use the `by_module` rollup to identify the specific area and query a tighter window
128
+ **`summary` / `overview` mode:**
129
+ - `totals` episode and node/edge counts
130
+ - `first_episode`, `last_episode` window boundaries
122
131
 
123
- ## Session-Aware Alternative
132
+ ### 6. Drill deeper
133
+
134
+ | Need | Tool |
135
+ |---|---|
136
+ | Full history of one symbol | `get_timeline(repo_id, scope_path, file_path)` |
137
+ | Blast radius of a suspect symbol | `get_impact(repo_id, target)` |
138
+ | What a diff would affect | `detect_changes(repo_id, diff=...)` |
139
+ | Behavioral coupling | `get_cochange_context(repo_id, target=<symbol>)` |
140
+ | Sub-commit tried-and-reverted history | `get_episode_replay` |
141
+
142
+ ## Output
143
+
144
+ Sample `compound` payload (per-mode field lists: step 5 above):
145
+
146
+ ```json
147
+ {
148
+ "totals": { "episodes": 42, "nodes_added": 310, "nodes_removed": 95,
149
+ "edges_added": 541, "edges_removed": 120 },
150
+ "top_changed_files": [ /* files ranked by activity */ ],
151
+ "top_touched_symbols": [ /* symbols ranked by activity */ ]
152
+ }
153
+ ```
124
154
 
125
- If you're resuming work after a break and don't know the right `from` timestamp, use `get_changes_since` instead — it accepts a `last_episode_id` anchor and never requires timestamp guessing.
155
+ `recent` returns `episodes[]` + `totals` + `page.next_cursor`; `summary`/`overview` return `totals` + `first_episode`/`last_episode`.
126
156
 
127
- ## Common Mistakes
157
+ ## Common mistakes
128
158
 
129
159
  | Mistake | Reality |
130
- |---------|---------|
131
- | Using `overview` when user needs details | Overview only gives module-level counts — use `compound` for symbol-level |
132
- | Ignoring `budget_exhausted` flag | If true, there are more significant changes beyond what was returned narrow the time window or use module rollup |
133
- | Not checking `by_module` first | Module rollup is never truncatedscan it to identify which areas changed before diving into symbol-level |
134
- | Using `recent` without setting `to` | The `to` timestamp is the reference point for proximity weighting set it to the incident/event time |
135
- | Guessing timestamps when resuming work | Use `get_changes_since` with a stored `session_anchor` instead exact episode boundary, no guessing |
160
+ |---|---|
161
+ | Passing `days: 90` | Use `from: "90d ago"` `days` is only on `replay_history` |
162
+ | Omitting `from` | Requiredcall fails with `-32602` before any query runs |
163
+ | Using `mode: "novel"` / `"impact"` / `"directional"` | Not implementeduse `compound` + `get_impact` + `get_cochange_context` instead |
164
+ | Expecting `by_module[]` or significance scores | Not in current response shapeuse `top_changed_files` from `compound` |
165
+ | Using `overview` when you need file/symbol detail | `overview`/`summary` are totals onlyswitch to `compound` or `recent` |
166
+ | Using `get_evolution` for one symbol's history | Use `get_timeline` |
167
+ | Guessing timestamps when resuming work | Use `get_changes_since(since=<stored time>)` — see `memtrace-session-continuity` |
168
+ | Applying `file_path` filter in `compound` mode | Filters are ignored in roll-up modes — use `recent` with `file_path` instead |
@@ -1,9 +1,14 @@
1
1
  ---
2
2
  name: memtrace-fleet-publish-intent
3
- description: "Use to declare a structural intent BEFORE editing in a fleet — what symbols you'll touch and why — so other agents on your branch coordinate around you. Triggered by: 'I'm about to edit/rename/refactor X', starting any non-trivial edit while other agents share your repo+branch. Returns the graph blast radius, overlapping live intents on your branch, and a shift-left coordination/partition hint. Do not start editing shared symbols without publishing first."
3
+ description: "Declare a structural intent BEFORE editing in a fleet — what symbols you'll touch and why — so other agents on your branch coordinate around you. Use when the user says 'I'm about to edit/rename/refactor X', or when starting any non-trivial edit while other agents share your repo+branch. Returns the graph blast radius, overlapping live intents on your branch, and a shift-left coordination/partition hint. Do not start editing shared symbols without publishing first."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__fleet_publish_intent
6
6
  - mcp__memtrace__fleet_preflight
7
+ - mcp__memtrace__fleet_record_episode
8
+ metadata:
9
+ author: "Syncable <support@syncable.dev>"
10
+ version: "1.0.0"
11
+ category: development
7
12
  ---
8
13
 
9
14
  ## Overview
@@ -25,7 +30,18 @@ fleet_publish_intent({
25
30
  })
26
31
  ```
27
32
 
28
- You get back:
33
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
34
+
35
+ ## Output
36
+
37
+ ```json
38
+ {
39
+ "impact_preview": "…graph blast radius of the touched symbols…",
40
+ "active_conflicts": [],
41
+ "coordination": { "would_escalate": false, "suggested_partition": null }
42
+ }
43
+ ```
44
+
29
45
  - `impact_preview` — the real graph blast radius of the touched symbols.
30
46
  - `active_conflicts` — overlapping live intents **on your branch** (none from other
31
47
  branches; coordination is branch-scoped).
@@ -1,10 +1,15 @@
1
1
  ---
2
2
  name: memtrace-fleet-record-episode
3
- description: "Use AFTER an edit in a fleet to record it and get its conflict class (A/B/C) against agents on your branch. Triggered by: finishing an edit, 'I just changed X', completing a refactor step while other agents share your repo+branch. Returns conflict_class + replan_hint; a Class C returns an escalation_id and mediation_request that starts the decision loop. Do not finish a coordinated edit without recording it."
3
+ description: "Record an edit you just made in a fleet and get its conflict class (A/B/C) against agents on your branch. Use when you have just finished an edit, when the user says 'I just changed X', or when completing a refactor step while other agents share your repo+branch. Returns conflict_class + replan_hint; a Class C returns an escalation_id and mediation_request that starts the decision loop. Do not finish a coordinated edit without recording it."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__fleet_record_episode
6
6
  - mcp__memtrace__fleet_get_escalation
7
7
  - mcp__memtrace__fleet_query_episodes
8
+ - mcp__memtrace__fleet_submit_verdict
9
+ metadata:
10
+ author: "Syncable <support@syncable.dev>"
11
+ version: "1.0.0"
12
+ category: development
8
13
  ---
9
14
 
10
15
  ## Overview
@@ -24,6 +29,8 @@ fleet_record_episode({
24
29
  })
25
30
  ```
26
31
 
32
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
33
+
27
34
  ## The result: conflict_class
28
35
 
29
36
  - **A → proceed.** Additive, order-independent.
@@ -45,4 +52,18 @@ never make your edit a Class C.
45
52
  - Class A/B → continue.
46
53
  - Class C → enter the decision loop (see `memtrace-fleet-coordination`). Don't keep
47
54
  editing the contested symbols until your directive is `proceed`.
48
- - Review history with `fleet_query_episodes({repo_id, node?, conflict_class?})`.
55
+ - Every recorded episode is logged and persists as the fleet's reviewable audit
56
+ trail. Review history with `fleet_query_episodes({repo_id, node?, conflict_class?})`.
57
+
58
+ ## Output
59
+
60
+ ```jsonc
61
+ {
62
+ "conflict_class": "C", // "A" | "B" | "C"
63
+ "replan_hint": "re-read auth::verify_token before continuing",
64
+ // Class C only — absent for A/B:
65
+ "escalation_id": "esc-01J9...",
66
+ "mediation_request": { /* each agent's assignment + contested symbols */ },
67
+ "next_action": "poll fleet_get_escalation until your_directive != wait"
68
+ }
69
+ ```
@@ -1,11 +1,15 @@
1
1
  ---
2
2
  name: memtrace-fleet-resolve
3
- description: "Use to act on a Class C decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Triggered by: 'a decision is waiting', 'who should proceed', being handed a mediation_request, acting as a mediator between two agents, or a human choosing a winner in the dashboard."
3
+ description: "Resolve a Class C fleet decision: submit your verdict as an agent judge (fleet_submit_verdict), poll your own directive (fleet_get_escalation), see the needs-human queue (fleet_list_escalations), or record a human decision (fleet_resolve_escalation). Use when the user says 'a decision is waiting' or 'who should proceed', when you are handed a mediation_request, when acting as a mediator between two agents, or when a human chooses a winner in the dashboard. For the underlying conflict-class model and decision loop, see memtrace-fleet-coordination."
4
4
  allowed-tools:
5
5
  - mcp__memtrace__fleet_submit_verdict
6
6
  - mcp__memtrace__fleet_get_escalation
7
7
  - mcp__memtrace__fleet_list_escalations
8
8
  - mcp__memtrace__fleet_resolve_escalation
9
+ metadata:
10
+ author: "Syncable <support@syncable.dev>"
11
+ version: "1.0.0"
12
+ category: development
9
13
  ---
10
14
 
11
15
  ## Overview
@@ -30,6 +34,8 @@ fleet_submit_verdict({
30
34
  // kinds: reconcile {merge_plan} | recommend {winner, rationale, confidence} | defer_to_human {question}
31
35
  ```
32
36
 
37
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
38
+
33
39
  The response tells you the `outcome` (`auto_apply` | `human_confirm` |
34
40
  `human_required` | `pending`) and `your_directive`.
35
41
 
@@ -50,6 +56,10 @@ onto the winner; `review` = read `resolution`.
50
56
  decision (pick which agent proceeds) and clear it. Prefer the agent-judge path;
51
57
  use this for genuine human/product calls.
52
58
 
59
+ Every verdict and resolution persists to the escalation record as the audit
60
+ trail — review any decision later via `fleet_get_escalation` /
61
+ `fleet_list_escalations`.
62
+
53
63
  ## Safety the referee guarantees
54
64
 
55
65
  - A destructive **removal** (delete/move) is **never** auto-applied — always a human.
@@ -57,3 +67,16 @@ onto the winner; `review` = read `resolution`.
57
67
  a non-destructive resolution.
58
68
  - So a wrong verdict degrades to "a human reviews a suggestion," never a silent
59
69
  bad merge.
70
+
71
+ ## Output
72
+
73
+ `fleet_submit_verdict` and `fleet_get_escalation` both return the referee's decision:
74
+
75
+ ```jsonc
76
+ {
77
+ "outcome": "human_confirm", // auto_apply | human_confirm | human_required | pending
78
+ "your_directive": "wait", // wait | proceed | defer | review
79
+ "resolution": "agent-b proceeds; agent-a rebases onto the wider contract"
80
+ // set once the escalation is resolved (directive = review)
81
+ }
82
+ ```
@@ -1,75 +1,93 @@
1
1
  ---
2
2
  name: memtrace-graph
3
- description: "Always use for source-code architecture, important symbols, centrality, PageRank, bridge functions, communities, logical modules, chokepoints, service boundaries, or dependency path questions. Do not use Glob, find, tree, or directory browsing to infer architecture; Memtrace runs graph algorithms over the AST graph."
3
+ description: "Map source-code architecture with graph algorithms — PageRank centrality, bridge symbols, Louvain communities, dependency paths, and execution flows over the AST graph. Use when the user asks about source-code architecture, important symbols, centrality, PageRank, bridge functions, communities, logical modules, chokepoints, service boundaries, or dependency path questions. Do not use Glob, find, tree, or directory browsing to infer architecture; Memtrace runs graph algorithms over the AST graph."
4
4
  allowed-tools:
5
- - mcp__memtrace__find_bridge_symbols
6
5
  - mcp__memtrace__find_central_symbols
6
+ - mcp__memtrace__find_bridge_symbols
7
7
  - mcp__memtrace__find_dependency_path
8
8
  - mcp__memtrace__list_communities
9
9
  - mcp__memtrace__list_processes
10
10
  - mcp__memtrace__get_process_flow
11
+ metadata:
12
+ author: "Syncable <support@syncable.dev>"
13
+ version: "1.0.0"
14
+ category: development
11
15
  user-invocable: true
12
16
  ---
13
17
 
14
18
  ## Overview
15
19
 
16
- Graph algorithms that reveal the structural architecture of a codebase community detection (Louvain), centrality ranking (PageRank), bridge symbol identification (Tarjan articulation points), shortest-path discovery, and execution flow tracing.
17
-
18
- All four algorithm tools (`find_central_symbols`, `find_bridge_symbols`, `find_dependency_path`, `list_communities`) run natively against the MemDB-backed knowledge graph — no Cypher required.
20
+ Graph algorithms over the knowledge graphcommunities (Louvain), PageRank centrality, bridge symbols (articulation points), shortest paths, and execution flows.
19
21
 
20
22
  ## Quick Reference
21
23
 
22
- | Tool | Purpose |
23
- |------|---------|
24
- | `find_bridge_symbols` | Architectural chokepoints symbols whose removal disconnects the graph (Tarjan articulation points) |
25
- | `find_central_symbols` | Most important symbols by **PageRank** (default) or degree centrality |
26
- | `find_dependency_path` | Shortest call/import path between two symbols (BFS over typed edges) |
27
- | `list_communities` | Louvain-detected logical modules/services |
28
- | `list_processes` | Execution flows: HTTP handlers, background jobs, CLI commands, event handlers |
29
- | `get_process_flow` | Trace a single process step-by-step |
24
+ | Tool | Required params | Key optional |
25
+ |------|-----------------|--------------|
26
+ | `find_central_symbols` | `repo_id` | `limit` (def 25), `kinds[]` |
27
+ | `find_bridge_symbols` | `repo_id` | `limit` |
28
+ | `find_dependency_path` | `repo_id`, `source`, `target` | `max_depth` (def 20), `edge_type` |
29
+ | `list_communities` | `repo_id` | `min_size`, `limit` |
30
+ | `list_processes` | `repo_id` | `limit` |
31
+ | `get_process_flow` | `repo_id`, `process` | `branch` |
32
+
33
+ Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
30
34
 
31
35
  ## Steps
32
36
 
33
37
  ### 1. Understand the architecture
34
38
 
35
- Start with `list_communities` to see how the codebase is naturally partitioned into logical modules. Each community has a name, member count, and representative symbols.
39
+ `list_communities` natural module partitions.
36
40
 
37
41
  ### 2. Find critical infrastructure
38
42
 
39
- Use `find_central_symbols` to identify the most important symbols:
40
- - `method: "pagerank"` — importance by link structure (default; same algorithm Google uses)
41
- - `method: "degree"` — importance by direct connection count
42
- - `limit` how many to return
43
+ `find_central_symbols` runs **PageRank** internally. There is **no `method` param** (no degree-centrality switch).
44
+
45
+ ```json
46
+ { "repo_id": "memdb", "limit": 25, "kinds": ["Function", "Method"] }
47
+ ```
48
+
49
+ ### 3. Find chokepoints
50
+
51
+ ```json
52
+ { "repo_id": "memdb", "limit": 15 }
53
+ ```
54
+
55
+ ### 4. Path between two symbols
43
56
 
44
- The PageRank pass walks every CALLS / REFERENCES edge in the repo, distributes rank with the standard 0.85 damping factor, and converges on a stable ordering. The output is sorted by score descending, with each entry carrying `name`, `kind`, `file_path`, `score`, and the `in_degree`/`out_degree` it accumulated during the walk.
57
+ ```json
58
+ {
59
+ "repo_id": "memdb",
60
+ "source": "handleLogin",
61
+ "target": "DatabaseClient.query",
62
+ "max_depth": 20
63
+ }
64
+ ```
45
65
 
46
- ### 3. Find architectural chokepoints
66
+ Params are **`source`** and **`target`** (symbol names) — not `from`/`to`.
47
67
 
48
- Use `find_bridge_symbols` to find symbols that, if removed, would disconnect parts of the graph (Tarjan articulation points). These are:
49
- - **Single points of failure** — if they break, cascading failures occur
50
- - **Integration points** — good places for interfaces/contracts
51
- - **Refactoring targets** — often too much responsibility concentrated in one place
68
+ ### 5. Execution flows
52
69
 
53
- ### 4. Discover the path between two symbols
70
+ ```json
71
+ { "repo_id": "memdb" }
72
+ { "repo_id": "memdb", "process": "POST /login" }
73
+ ```
54
74
 
55
- Use `find_dependency_path` to answer "how does symbol A reach symbol B?" — returns the shortest call/import chain via BFS over typed edges. Useful for:
56
- - "Why does the auth handler depend on the database client?"
57
- - "How does this CLI command reach the logging subsystem?"
58
- - "Confirm symbol X actually transitively depends on Y."
75
+ ## Output
59
76
 
60
- ### 5. Trace execution flows
77
+ `find_central_symbols` each result carries the PageRank `score` plus degree counts:
61
78
 
62
- Use `list_processes` to see all entry points (HTTP handlers, background jobs, CLI commands, event handlers).
79
+ ```json
80
+ [
81
+ { "name": "DatabaseClient.query", "score": 0.0142, "in_degree": 38, "out_degree": 5 },
82
+ { "name": "handleLogin", "score": 0.0097, "in_degree": 21, "out_degree": 9 }
83
+ ]
84
+ ```
63
85
 
64
- Use `get_process_flow` with a process name to trace a specific flow step-by-step — shows the full call chain from entry point through business logic to data access, ordered by the indexed `step` property on each STEP_IN_PROCESS edge.
86
+ `find_dependency_path` returns the ordered symbol chain from `source` to `target`; `list_communities` returns module partitions with their member symbols.
65
87
 
66
- ## Decision Points
88
+ ## Common Mistakes
67
89
 
68
- | Question | Tool |
69
- |----------|------|
70
- | "What are the main modules?" | `list_communities` |
71
- | "What are the most important functions?" | `find_central_symbols` with method=pagerank |
72
- | "Where are the bottlenecks?" | `find_bridge_symbols` |
73
- | "How does symbol A reach symbol B?" | `find_dependency_path` |
74
- | "How does a request flow through the system?" | `list_processes` → `get_process_flow` |
75
- | "What's the entry point for feature X?" | `list_processes`, then filter by name |
90
+ | Mistake | Reality |
91
+ |---------|---------|
92
+ | `find_central_symbols(method: "degree")` | **No `method` param** — always PageRank |
93
+ | `find_dependency_path(from=..., to=...)` | Use **`source`** and **`target`** |