memorydetective 1.5.0 → 1.7.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,62 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.7.0] — 2026-05-03
10
+
11
+ Catalog grows from 33 to **34 patterns** (SwiftData `@Actor` cycle), every classification now ships a **`fixTemplate` field** with Swift before/after snippets the agent can adapt directly, and a new **`compareTracesByPattern` tool** does for `.trace` bundles what `verifyFix` does for memgraphs. 27 → 28 MCP tools.
12
+
13
+ ### Added
14
+
15
+ - **`swiftdata.modelcontext-actor-cycle`** cycle pattern. Fires when a `ModelContext` + `DefaultSerialModelExecutor` (or `ModelExecutor`) + `Actor` appear together in the chain. Apple-documented quirk (FB13844786) — fixed at the framework level in iOS 18 beta 1, but the user-code shape persists on older targets and on hand-rolled executors. Sourced from [Apple Developer Forums #748042](https://developer.apple.com/forums/thread/748042). Confidence-tiered: `high` when all three signals coexist, `medium` for ModelContext + Executor without an Actor in chain, `low` when only ModelContext is visible.
16
+ - **`fixTemplate` field** on every `PatternMatch`. Each pattern now carries a Swift code snippet showing the typical before/after. The agent reads the template and adapts type/method names to the user's codebase via the SourceKit-LSP source-bridging tools. Implemented in `src/runtime/fixTemplates.ts` with a 1:1-coverage test guard against `PATTERNS`. Where `staticAnalysisHint` (v1.6) says *which* linter rule would catch a pattern, `fixTemplate` shows *what* the fix looks like in code. Both ride alongside the original textual `fixHint`.
17
+ - **`compareTracesByPattern` tool** — trace-side counterpart to `verifyFix`. Takes a before/after pair of `.trace` bundles + a category (`hangs`, `animation-hitches`, or `app-launch`) + optional thresholds, and returns a PASS/PARTIAL/FAIL verdict plus before/after stats and deltas. Threshold semantics: hangs PASS when longest is below `hangsMaxLongestMs` (default 0); hitches PASS when longest is below `hitchesMaxLongestMs` (default 100ms — Apple's user-perceptible threshold); app-launch PASS when total is below `appLaunchMaxTotalMs` (default 1000ms). Designed for CI gating: a hangs-fix PR's before/after traces gate the merge. Tagged `[mg.trace][mg.ci]`.
18
+
19
+ ### Changed
20
+
21
+ - README: new "What's new in v1.7" callout. Pattern catalog count `33 → 34`. Tool count `27 → 28`. CI / test integration subsection grows from 1 to 2 tools. Resources section now lists 34 entries. The "Adding a cycle pattern" workflow gains a 4th step: add a `fixTemplate` entry alongside the `staticAnalysisHint`.
22
+ - USAGE.md section 2 gains a v1.7 sub-table with the new SwiftData+Actor pattern + a paragraph explaining the new `fixTemplate` field with a concrete JSON example. Updated header note describes the per-pattern triple now returned: `fixHint` (prose), `staticAnalysisHint` (linter rule or gap), and `fixTemplate` (code).
23
+ - Test count: 183 → 206 (23 new — 4 for the swiftdata pattern + edge cases, 8 for `fixTemplates` coverage and content, 11 for `compareTracesByPattern` verdict logic).
24
+
25
+ ### Notes
26
+
27
+ - No breaking changes — `fixTemplate` is an optional new field on `PatternMatch`. Old callers that ignore it continue to work.
28
+ - Catalog now covers 34 distinct cycle shapes; the `fixTemplate` content is the most user-visible upgrade. Each template is intentionally minimal (just enough to demonstrate the shape of the fix); the agent fills in real type/method names from the surrounding code.
29
+ - The `@ModelActor` recommendation in the SwiftData fix template only applies on iOS 17+ where the macro is available. The fallback (custom executor with weak ModelContext) is provided for older targets.
30
+
31
+ ## [1.6.0] — 2026-05-03
32
+
33
+ Catalog grows from 27 to **33 patterns** (Swift 6 / Observation / SwiftData / NavigationStack era), the server adopts MCP **Resources** + **Prompts** beyond raw Tools, every classification now carries a `staticAnalysisHint` bridging to SwiftLint, and the `--version` drift bug from earlier is fixed.
34
+
35
+ ### Added
36
+
37
+ - **6 new cycle patterns** in `classifyCycle`, sourced from Apple Developer Forums (#736110, #716804, #748042, #22795), Swift Forums (#64584, #77257), Donny Wals on the Swift 6.2 `Observations` API, and the Embrace WKWebView memory-leak writeup:
38
+ - `swiftui.observable-state-modal-leak` — `@Observable` model held as `@State` across modal presentation
39
+ - `swiftui.navigationpath-stored-in-viewmodel` — `NavigationPath` retains every element ever pushed (FB11643551, unfixed)
40
+ - `concurrency.async-sequence-on-self` — `for await ... in seq` pins self via the consuming Task; `[weak self]` does NOT help
41
+ - `concurrency.notificationcenter-async-observer-task` — special case of the above for `NotificationCenter.notifications(named:)`
42
+ - `swiftui.observations-closure-strong-self` — Swift 6.2 `Observations { }` closure retains self like `Combine.sink`
43
+ - `webkit.wkscriptmessagehandler-bridge` — handler ↔ webview ↔ contentController 3-link bridge cycle
44
+ - **MCP Resources surface** — all 33 catalog patterns are now browsable as MCP resources at `memorydetective://patterns/{patternId}`. Each resource is a markdown body. Implemented in `src/runtime/resources.ts`. `resources/list` returns all 33; `resources/read` resolves any pattern URI to its markdown body.
45
+ - **MCP Prompts surface** — 5 investigation playbooks exposed as MCP prompts (slash commands in clients that surface them, e.g. Claude Code): `/investigate-leak`, `/investigate-hangs`, `/investigate-jank`, `/investigate-launch`, `/verify-cycle-fix`. Each prompt fills the canonical playbook's argument templates with user-provided values and hands the agent a ready-to-execute brief. Implemented in `src/runtime/prompts.ts`.
46
+ - **`staticAnalysisHint` field** on every `PatternMatch` — bridges runtime evidence to static analysis. Per-pattern entries point at the SwiftLint rule that would catch this at parse time (`weak_self`, `weak_delegate`) OR explicitly note the gap (with a link to e.g. SwiftLint #776 for `@escaping` retain cycles, or Swift Forums #64584 for AsyncSequence). The `swiftui.tag-index-projection` original-investigation pattern explicitly notes "no rule exists; this is a SwiftUI-internal observation issue, not a closure-capture issue." Implemented in `src/runtime/staticAnalysisHints.ts` with a 1:1-coverage test guard against `PATTERNS`.
47
+
48
+ ### Fixed
49
+
50
+ - `memorydetective --version` now reports the actually-installed version. Previously the CLI string was hardcoded (last bumped to `"1.4.0"` in v1.4.0; never bumped for `1.5.0`). The MCP server's `SERVER_VERSION` was even staler — it had been `"0.1.0-dev"` since the v1.0.0 release. Both surfaces now read from `package.json` at runtime via `src/version.ts`, so they can never drift again. (Originally caught while dogfooding the new release script — bundled into 1.6.0 since 1.5.x didn't ship.)
51
+
52
+ ### Changed
53
+
54
+ - README: new "What's new in v1.6" callout. New "Resources (33)" and "Prompts (5)" subsections in the API section. The opening API line now reads "27 MCP tools + 33 Resources + 5 Prompts" instead of "27 MCP tools". Pattern-count and tool-description cells updated.
55
+ - USAGE.md section 2 gains a v1.6 sub-table with the 6 new patterns + a paragraph explaining the new `staticAnalysisHint` field. New section 7 ("MCP Resources + Prompts") documents the catalog-as-resources and slash-command surfaces; the old section 7 is renumbered to 8.
56
+ - Release process is now automated: `scripts/release.sh` orchestrates preflight → build/test → tag → npm publish → GitHub Release in one command. `.github/workflows/release.yml` re-validates on every `vX.Y.Z` tag push (build, tests, version match, CLI smoke). See the maintainer-facing checklist for the full process.
57
+ - Test count: 152 → 183 (31 new — 14 for resources + prompts, 10 for the 6 new patterns + edge cases, 7 for the static-analysis-hint coverage guard).
58
+
59
+ ### Notes
60
+
61
+ - No breaking changes — all additions are catalog entries or new optional fields. Old callers that ignore Resources/Prompts continue to work.
62
+ - The `webkit.wkscriptmessagehandler-bridge` pattern is intentionally additive: it fires *alongside* the broader v1.4 `webkit.scriptmessage-handler-strong` pattern when all three signals (WKWebView + WKUserContentController + handler/bridge class) coexist. Different fix templates apply to each — the new specific one tells you to wrap in a `WeakScriptMessageHandler` proxy; the old broad one just notes that `WKUserContentController.add(_:name:)` retains strongly.
63
+ - Catalog now covers 33 distinct cycle shapes across SwiftUI (incl. Swift 6 / `@Observable` / SwiftData / NavigationStack), Combine, Swift Concurrency (incl. AsyncSequence), UIKit (Timer / CADisplayLink / UIGestureRecognizer / KVO / URLSession / WebKit / DispatchSource), Core Animation, Core Data, the Coordinator pattern, RxSwift, and Realm.
64
+
9
65
  ## [1.5.0] — 2026-05-02
10
66
 
11
67
  Catalog completion + cost transparency. **24 → 27 patterns** (Core Animation animation/layer delegate quirks, Core Data `NSFetchedResultsController`), and the README now documents what `memorydetective` saves you in tokens and developer time, including the cases where the win is marginal.
package/README.md CHANGED
@@ -15,7 +15,11 @@
15
15
 
16
16
  - **CLI-driven leak hunting.** Read `.memgraph` files captured by Xcode (or by `memorydetective` itself on simulators), find ROOT CYCLEs, classify them against known SwiftUI/Combine patterns, and get a one-liner fix hint — all from a script or a chat.
17
17
  - **MCP-native.** Plugs into Claude Code, Claude Desktop, Cursor, Cline, and any other MCP client. The agent drives the full investigate → classify → suggest-fix loop without you opening Instruments.
18
- - **Honest about its limits.** No mocked outputs, no over-promises. Hangs analysis works clean from `xctrace`; sample-level Time Profile still needs Instruments today (planned for v0.2). Memory Graph capture works on Mac apps and iOS simulator; physical iOS devices still need Xcode.
18
+ - **Honest about its limits.** No mocked outputs, no over-promises. Hangs analysis works clean from `xctrace`; sample-level Time Profile is parsed when `xctrace` symbolicates the trace and returns a structured workaround notice when it can't (the underlying `xctrace` SIGSEGV on heavy unsymbolicated traces is an Apple-side limitation we surface explicitly). Memory Graph capture works on Mac apps and iOS simulator; physical iOS devices still need Xcode.
19
+
20
+ > **What's new in v1.7** (2026-05-03): catalog grew from 33 to **34 cycle patterns** (`swiftdata.modelcontext-actor-cycle` for the SwiftData `@Actor` pattern), every classification now carries a **`fixTemplate` field** with concrete Swift before/after snippets the agent can adapt directly, and a new **`compareTracesByPattern` tool** does for `.trace` bundles what `verifyFix` does for memgraphs — PASS/PARTIAL/FAIL verdicts on hangs / animation-hitches / app-launch regressions. 27 → 28 MCP tools.
21
+ >
22
+ > **Also in v1.6** (same day): catalog 27 → 33, MCP Resources + Prompts surface, and the original `staticAnalysisHint` field. Full notes in [CHANGELOG](./CHANGELOG.md).
19
23
 
20
24
  ## Quickstart
21
25
 
@@ -70,7 +74,7 @@ memorydetective classify ~/Desktop/myapp.memgraph
70
74
  > **You:** Profile DemoApp on my iPhone for 90 seconds and tell me where the hangs are.
71
75
  >
72
76
  > **Claude:** *(calls `listTraceDevices` → `recordTimeProfile` → `analyzeHangs`)*
73
- > Recorded `~/Desktop/run.trace` (90s, attached to DemoApp on iPhone 17 Pro Max). Found **23 user-visible hangs** (>500 ms each), longest 1.16 s, average 769 ms — severe load. All on the main thread. Sample-level hotspots aren't symbolicated yet; open the trace in Instruments for that step (or wait for `analyzeTimeProfile` v0.2).
77
+ > Recorded `~/Desktop/run.trace` (90s, attached to DemoApp on iPhone 17 Pro Max). Found **23 user-visible hangs** (>500 ms each), longest 1.16 s, average 769 ms — severe load. All on the main thread. Sample-level hotspots aren't symbolicated yet; open the trace in Instruments for that step (`analyzeTimeProfile` returns a structured workaround notice when `xctrace` can't symbolicate — see CHANGELOG known limits).
74
78
 
75
79
  ### End-to-end: leak → file → fix suggestion
76
80
 
@@ -256,11 +260,16 @@ Copilot's MCP integration moves fast — if this snippet is stale, see the [VS C
256
260
 
257
261
  ## API
258
262
 
259
- 27 MCP tools, grouped by purpose. Tool descriptions are tagged with a category prefix (`[mg.memory]`, `[mg.trace]`, `[mg.code]`, `[mg.log]`, `[mg.render]`, `[mg.ci]`, `[mg.discover]`, `[meta]`) so related tools are visible at a glance.
263
+ **28 MCP tools + 34 Resources + 5 Prompts**, grouped by purpose. Tool descriptions are tagged with a category prefix (`[mg.memory]`, `[mg.trace]`, `[mg.code]`, `[mg.log]`, `[mg.render]`, `[mg.ci]`, `[mg.discover]`, `[meta]`) so related tools are visible at a glance.
260
264
 
261
- Many tools include a `suggestedNextCalls` field in their response — a typed list of `{ tool, args, why }` entries pre-populated from the current result, so the orchestrating LLM can chain calls without re-reasoning. Start with `getInvestigationPlaybook(kind)` for the canonical sequence.
265
+ Many tools include a `suggestedNextCalls` field in their response — a typed list of `{ tool, args, why }` entries pre-populated from the current result, so the orchestrating LLM can chain calls without re-reasoning. Start with `getInvestigationPlaybook(kind)` for the canonical sequence — or just type `/investigate-leak` (one of the [Prompts](#prompts-5)) in any client that exposes MCP slash commands.
262
266
 
263
- The cycle classifier ships **27 named antipatterns** spanning SwiftUI, Combine, Swift Concurrency, UIKit (Timer/CADisplayLink/UIGestureRecognizer/KVO/URLSession/WebKit/DispatchSource), Core Animation (CAAnimation/custom CALayer delegate quirks), Core Data (`NSFetchedResultsController`), Coordinator pattern, and the popular third-party libs RxSwift + Realm. Each pattern has a one-line fix hint and a confidence tier.
267
+ The cycle classifier ships **34 named antipatterns** spanning SwiftUI (including the Swift 6 / `@Observable` / SwiftData / NavigationStack era), Combine, Swift Concurrency (incl. AsyncSequence-on-self and the new `Observations` API), UIKit (Timer/CADisplayLink/UIGestureRecognizer/KVO/URLSession/WebKit/DispatchSource), Core Animation, Core Data, Coordinator pattern, and the popular third-party libs RxSwift + Realm. Each pattern carries:
268
+
269
+ - a textual one-line `fixHint`
270
+ - a confidence tier (`high` / `medium` / `low`)
271
+ - a `staticAnalysisHint` pointing at the SwiftLint rule that complements the runtime evidence (or an explicit gap notice when no rule exists — reinforces the differentiator: memorydetective sees what linters miss at parse time)
272
+ - a `fixTemplate` with concrete Swift before/after snippets (new in v1.7) the agent can adapt directly to the user's code via the SourceKit-LSP source-bridging tools
264
273
 
265
274
  ### Read & analyze (13)
266
275
 
@@ -273,7 +282,7 @@ The cycle classifier ships **27 named antipatterns** spanning SwiftUI, Combine,
273
282
  | `reachableFromCycle` | Cycle-scoped reachability. "How many `<X>` instances are reachable from the cycle rooted at `<Y>`?" — distinguishes the actual culprit from its retained dependencies. |
274
283
  | `diffMemgraphs` | Compare two `.memgraph` snapshots: total deltas + class-count changes + cycles new/gone/persisted. |
275
284
  | `verifyFix` | Cycle-semantic diff: per-pattern PASS/PARTIAL/FAIL verdict + bytes freed. CI-gateable. |
276
- | `classifyCycle` | Match each ROOT CYCLE against a built-in catalog of **27 named antipatterns** (SwiftUI / Combine / Concurrency / UIKit / Core Animation / Core Data / Coordinator / RxSwift / Realm) with confidence + fix hint. |
285
+ | `classifyCycle` | Match each ROOT CYCLE against a built-in catalog of **34 named antipatterns** (SwiftUI / Combine / Concurrency / UIKit / Core Animation / Core Data / Coordinator / RxSwift / Realm) with confidence + textual `fixHint` + `staticAnalysisHint` (which SwiftLint rule complements this, or explicit gap) + `fixTemplate` (Swift before/after snippet). |
277
286
  | `analyzeHangs` | Parse `xctrace` `potential-hangs` schema; return Hang vs Microhang counts + top N longest. |
278
287
  | `analyzeAnimationHitches` | Parse `xctrace` `animation-hitches` schema; report by-type counts and how many hitches crossed Apple's user-perceptible 100ms threshold. |
279
288
  | `analyzeTimeProfile` | Parse `xctrace` `time-profile` schema; return top symbols by sample count. Reports SIGSEGV with workarounds when xctrace can't symbolicate. |
@@ -302,11 +311,12 @@ The cycle classifier ships **27 named antipatterns** spanning SwiftUI, Combine,
302
311
  |---|---|
303
312
  | `renderCycleGraph` | Read a `.memgraph`, pick a ROOT CYCLE, and emit a Mermaid graph (markdown-embeddable) or Graphviz DOT. App-level classes highlighted in red; CYCLE BACK terminators amber. |
304
313
 
305
- ### CI / test integration (1)
314
+ ### CI / test integration (2)
306
315
 
307
316
  | Tool | What |
308
317
  |---|---|
309
318
  | `detectLeaksInXCUITest` | **Experimental.** Build the workspace for testing, run the named XCUITest, capture `.memgraph` baseline + after, diff. Returns `passed: false` when new ROOT CYCLEs appear that aren't in the user's allowlist. CI-runnable. |
319
+ | `compareTracesByPattern` | Trace-side counterpart to `verifyFix`. Compares two `.trace` bundles for a perf category (`hangs`, `animation-hitches`, or `app-launch`) and returns PASS/PARTIAL/FAIL with before/after stats and deltas. Apply thresholds: hangs PASS when longest is below `hangsMaxLongestMs`; hitches PASS when longest is below `hitchesMaxLongestMs` (default 100ms — Apple's user-perceptible threshold); app-launch PASS when total is below `appLaunchMaxTotalMs` (default 1000ms). |
310
320
 
311
321
  ### Swift source bridging (5)
312
322
 
@@ -324,6 +334,34 @@ These tools require macOS + Xcode (full Xcode, not just Command Line Tools — `
324
334
 
325
335
  > **Why `captureMemgraph` doesn't work on physical iOS devices**: `leaks(1)` only attaches to processes running on the local Mac (which includes iOS simulators). Memory Graph capture from a real device goes through Xcode's debugger over USB/lockdownd — different mechanism, no public CLI equivalent.
326
336
 
337
+ ### Resources (34)
338
+
339
+ The cycle-pattern catalog is also surfaced as MCP resources, browsable at `memorydetective://patterns/{patternId}`. Each resource is a markdown body with the pattern name, a longer description, and the fix hint. Use this to let an agent (or a human in a UI-aware MCP client) browse the catalog without burning a `classifyCycle` call.
340
+
341
+ ```
342
+ memorydetective://patterns/swiftui.tag-index-projection
343
+ memorydetective://patterns/concurrency.async-sequence-on-self
344
+ memorydetective://patterns/webkit.wkscriptmessagehandler-bridge
345
+ memorydetective://patterns/swiftdata.modelcontext-actor-cycle
346
+
347
+ ```
348
+
349
+ `resources/list` returns all 34 entries. `resources/read` resolves any `memorydetective://patterns/{id}` URI to its markdown body.
350
+
351
+ ### Prompts (5)
352
+
353
+ Investigation playbooks are exposed as MCP prompts (slash commands in clients that surface them, e.g. Claude Code).
354
+
355
+ | Slash command | What it does | Args |
356
+ |---|---|---|
357
+ | `/investigate-leak` | Runs the canonical 6-step memgraph-leak investigation: `analyzeMemgraph` → `classifyCycle` → `reachableFromCycle` → `swiftSearchPattern` → `swiftGetSymbolDefinition` → `swiftFindSymbolReferences`. | `memgraphPath` |
358
+ | `/investigate-hangs` | Diagnose user-visible main-thread hangs from a `.trace`. | `tracePath` |
359
+ | `/investigate-jank` | Diagnose dropped frames / animation hitches from a `.trace`. | `tracePath` |
360
+ | `/investigate-launch` | Diagnose cold/warm launch slowness from a `.trace`. | `tracePath` |
361
+ | `/verify-cycle-fix` | Diff a before/after pair of `.memgraph` snapshots to confirm a fix landed. | `before`, `after` |
362
+
363
+ Each prompt fills the canonical playbook's argument templates with the user-provided values, then hands the agent a ready-to-execute brief. Calls the same tools listed in [Read & analyze](#read--analyze-13) — prompts are an orchestration shortcut, not a separate engine.
364
+
327
365
  ### CLI mode
328
366
 
329
367
  The same binary is also a thin CLI for scripting and CI:
@@ -361,15 +399,17 @@ npm run dev # tsx, stdio mode (dev mode)
361
399
  Contributions are welcome — bug reports, feature requests, new cycle patterns, all of it.
362
400
 
363
401
  - **Bugs / feature requests**: [open an issue](https://github.com/carloshpdoc/memorydetective/issues).
364
- - **PRs**: fork → branch → `npm install` → make changes → `npm test` (152 tests must stay green) → open a PR with a concise description of what changed and why.
402
+ - **PRs**: fork → branch → `npm install` → make changes → `npm test` (206 tests must stay green) → open a PR with a concise description of what changed and why.
365
403
 
366
404
  ### Adding a cycle pattern to `classifyCycle`
367
405
 
368
- `classifyCycle` ships with 27 built-in patterns covering SwiftUI, Combine, Swift Concurrency, UIKit (Timer / CADisplayLink / UIGestureRecognizer / KVO / URLSession / WebKit / DispatchSource), Core Animation, Core Data, the Coordinator pattern, RxSwift, and Realm. To add one:
406
+ `classifyCycle` ships with 34 built-in patterns covering SwiftUI (incl. Swift 6 / `@Observable` / SwiftData / NavigationStack), Combine, Swift Concurrency (incl. AsyncSequence-on-self and `Observations`), UIKit (Timer / CADisplayLink / UIGestureRecognizer / KVO / URLSession / WebKit / DispatchSource), Core Animation, Core Data, the Coordinator pattern, RxSwift, and Realm. To add one:
369
407
 
370
408
  1. Edit `src/tools/classifyCycle.ts` — add an entry to `PATTERNS` with `id`, `name`, `fixHint`, and a `match` function.
371
409
  2. Add a test in `src/tools/readTools.test.ts` that asserts the new pattern fires against a representative memgraph fixture.
372
- 3. Open a PR.
410
+ 3. Add a `staticAnalysisHint` entry in `src/runtime/staticAnalysisHints.ts` (the test in that file enforces 1:1 coverage with `PATTERNS`).
411
+ 4. Add a `fixTemplate` entry in `src/runtime/fixTemplates.ts` (same 1:1 coverage guard).
412
+ 5. Open a PR.
373
413
 
374
414
  ## Support this project
375
415
 
package/USAGE.md CHANGED
@@ -94,9 +94,15 @@ Claude orchestrates the full flow (see [section 3](#3-how-fixes-actually-flow-fr
94
94
 
95
95
  ---
96
96
 
97
- ## 2. The 27 cycle patterns and their fix hints
97
+ ## 2. The 34 cycle patterns and their fix hints
98
98
 
99
- `classifyCycle` ships with a built-in catalog of 27 common iOS retain-cycle patterns. Each pattern returns a `fixHint` — a plain-English string describing the fix direction. Patterns are grouped below by the framework / source they target.
99
+ `classifyCycle` ships with a built-in catalog of 34 common iOS retain-cycle patterns. Each pattern returns:
100
+
101
+ - a textual `fixHint` (one-line plain-English direction)
102
+ - a `staticAnalysisHint` (which SwiftLint rule complements the runtime evidence — or an explicit gap notice)
103
+ - a `fixTemplate` (Swift before/after code snippet — new in v1.7) the agent can adapt directly
104
+
105
+ Patterns are grouped below by the framework / source they target.
100
106
 
101
107
  ### v1.0 core (8) — SwiftUI + Combine + Concurrency + Notifications
102
108
 
@@ -140,9 +146,51 @@ Claude orchestrates the full flow (see [section 3](#3-how-fixes-actually-flow-fr
140
146
  | `coreanimation.layer-delegate-cycle` | Custom `CALayer` subclass (`CAShapeLayer` / `CAGradientLayer` / `CAEmitterLayer` / `CAMetalLayer` / etc.) in chain without `UIView` auto-pairing | Custom layer wired to non-UIView delegate leaks. Wrap in `WeakLayerDelegate` or clear `layer.delegate = nil` in `deinit`. |
141
147
  | `coredata.fetchedresultscontroller-delegate` | `NSFetchedResultsController` / `_PFFetchedResultsController` in chain | Apple's historical strong-delegate quirk via the change-tracker. `frc.delegate = nil` in `viewWillDisappear` / `deinit`. |
142
148
 
149
+ ### v1.6 catalog expansion (6) — Swift 6 / Observation / SwiftData / NavigationStack era
150
+
151
+ Sourced from Apple Developer Forums (#736110, #716804, #748042), Swift Forums (#64584, #77257), Donny Wals on the Swift 6.2 `Observations` API, and the Embrace WKWebView memory-leak writeup.
152
+
153
+ | Pattern ID | When it matches | Fix hint (summary) |
154
+ |---|---|---|
155
+ | `swiftui.observable-state-modal-leak` | `_$ObservationRegistrar` + sheet/presentation host in chain | `@Observable` model passed as `@State` to a modal leaks. Move the model to `@StateObject` on the parent and pass via `@Bindable`, or use `.sheet(item:)` with a value type. |
156
+ | `swiftui.navigationpath-stored-in-viewmodel` | `NavigationPath` / `NavigationStackStore` / `AnyHashableStorageBase` in chain | NavigationPath retains every element ever pushed (FB11643551, unfixed). Keep it `@State` local to the view, or reset with `path = NavigationPath()` after `popToRoot`. |
157
+ | `concurrency.async-sequence-on-self` | `AsyncSequence` / `AsyncIteratorProtocol` + `Task<...>` in chain | `for await ... in seq { use(self) }` pins self via the iteration context — `[weak self]` does NOT help. Capture only the values needed before the loop, or `task.cancel()` in `deinit`. |
158
+ | `concurrency.notificationcenter-async-observer-task` | `NotificationCenter.Notifications` (the `AsyncSequence` form) + `Task<...>` | Special case of the above — `for await _ in NotificationCenter.default.notifications(named:)` never terminates. Same fix discipline. |
159
+ | `swiftui.observations-closure-strong-self` | `Observations` (the Swift 6.2 API, NOT `ObservationRegistrar`) + `Closure context` | The new non-SwiftUI `Observations { }` closure retains self like `Combine.sink`. Use `[weak self]` inside the closure. |
160
+ | `webkit.wkscriptmessagehandler-bridge` | `WKWebView` + `WKUserContentController` + `WKScriptMessageHandler` (or `*Bridge`/`*Handler` class) all in chain | The 3-link bridge cycle: bridge → webView → contentController → bridge. Wrap the handler in `WeakScriptMessageHandler` proxy, or `removeScriptMessageHandler(forName:)` for every name added. Fires alongside the broader v1.4 `webkit.scriptmessage-handler-strong` pattern when the full bridge shape is present. |
161
+
162
+ ### v1.7 catalog (1) — SwiftData + Actor
163
+
164
+ | Pattern ID | When it matches | Fix hint (summary) |
165
+ |---|---|---|
166
+ | `swiftdata.modelcontext-actor-cycle` | `ModelContext` + `DefaultSerialModelExecutor` (or `ModelExecutor`) + `Actor` in chain | Apple-documented quirk on iOS 17 (FB13844786, fixed in iOS 18 beta 1). Prefer the `@ModelActor` macro over hand-rolled executors; or hold `ModelContext` weakly inside a custom executor and re-resolve per operation. |
167
+
143
168
  **Confidence tiers**: each pattern returns `high`, `medium`, or `low` based on how many specific signals match. If multiple patterns fire on the same cycle, all matches are returned — the highest-confidence one is `primaryMatch`, the rest are in `allMatches`.
144
169
 
145
- **The hints are deliberately textual, not code patches.** That's by design see the next section.
170
+ **Static analysis bridge (v1.6+)**: every classified cycle now carries a `staticAnalysisHint` field with three sub-fields:
171
+ - `rule` — the SwiftLint rule that would have caught this at parse time (`weak_self`, `weak_delegate`, etc.), or `null` when no rule exists
172
+ - `url` — link to the rule docs OR to the open issue tracking the gap (e.g. SwiftLint #776 for `@escaping` retain cycles)
173
+ - `explanation` — plain-English description of the static-vs-runtime relationship
174
+
175
+ Reinforces the differentiator: **memorydetective sees the runtime evidence linters miss**. Examples:
176
+ - `combine.sink-store-self-capture` → `weak_self` (SwiftLint catches the closure form)
177
+ - `concurrency.async-sequence-on-self` → `null` rule, with note that `[weak self]` does NOT help here
178
+ - `delegate.strong-reference` → `weak_delegate` (SwiftLint catches it directly)
179
+
180
+ **Fix template (v1.7+)**: every classified cycle also carries a `fixTemplate` with concrete Swift before/after code snippets. The agent reads the template, then adapts type/method names to the user's codebase via `swiftGetSymbolDefinition` / `swiftSearchPattern`. Example output for `combine.sink-store-self-capture`:
181
+
182
+ ```jsonc
183
+ {
184
+ "fixTemplate": {
185
+ "before": "pub.sink { v in self.value = v }.store(in: &bag) // ⚠️ retains self",
186
+ "after": "pub.sink { [weak self] v in self?.value = v }.store(in: &bag)\n// OR for property-path: pub.assign(to: &$value)"
187
+ }
188
+ }
189
+ ```
190
+
191
+ Where `staticAnalysisHint` says **which** linter rule complements this, `fixTemplate` shows **what** the fix actually looks like in code.
192
+
193
+ **The textual `fixHint` remains deliberately prose, not code.** It explains the *why*; `fixTemplate` shows the *what*. The agent uses both.
146
194
 
147
195
  ---
148
196
 
@@ -390,7 +438,54 @@ Every tool description starts with a category tag so related tools are visible a
390
438
 
391
439
  The tag is leading text in the MCP description, so it shows up in any tools/list output and inside Claude Code's "deferred tools" list.
392
440
 
393
- ## 7. Where to go from here
441
+ ## 7. MCP Resources + Prompts (catalog browsing + slash commands)
442
+
443
+ Since v1.6, memorydetective surfaces two MCP-spec features beyond raw Tools.
444
+
445
+ ### Resources — browsable cycle-pattern catalog
446
+
447
+ Each of the 33 catalog patterns is exposed as a read-only MCP resource at `memorydetective://patterns/{patternId}`. The body is markdown — the pattern name, the fix hint, and a footer pointing at how it composes with `classifyCycle`'s `primaryMatch`.
448
+
449
+ ```jsonc
450
+ // resources/list response (excerpt)
451
+ {
452
+ "resources": [
453
+ {
454
+ "uri": "memorydetective://patterns/swiftui.tag-index-projection",
455
+ "name": "SwiftUI .tag(...) closure-over-self cycle",
456
+ "description": "SwiftUI .tag(...) closure-over-self cycle",
457
+ "mimeType": "text/markdown"
458
+ },
459
+ {
460
+ "uri": "memorydetective://patterns/concurrency.async-sequence-on-self",
461
+ "name": "`for await` over an infinite AsyncSequence pins self via the consuming Task",
462
+ "description": "`for await` over an infinite AsyncSequence pins self via the consuming Task",
463
+ "mimeType": "text/markdown"
464
+ },
465
+
466
+ ]
467
+ }
468
+ ```
469
+
470
+ **Why this matters:** an agent that needs to ask "do you cover X?" can browse the resource list cheaply (no tool call). A UI-aware client can render the catalog as a sidebar or completion source.
471
+
472
+ ### Prompts — investigation playbooks as slash commands
473
+
474
+ Five prompts ship, one per investigation kind:
475
+
476
+ | Prompt name | Surfaces in Claude Code as | Args | Equivalent tool sequence |
477
+ |---|---|---|---|
478
+ | `investigate-leak` | `/investigate-leak` | `memgraphPath` | `analyzeMemgraph` → `classifyCycle` → `reachableFromCycle` → `swiftSearchPattern` → `swiftGetSymbolDefinition` → `swiftFindSymbolReferences` |
479
+ | `investigate-hangs` | `/investigate-hangs` | `tracePath` | `listTraceDevices` → `recordTimeProfile` (if needed) → `analyzeHangs` → `swiftSearchPattern` |
480
+ | `investigate-jank` | `/investigate-jank` | `tracePath` | `recordTimeProfile` (Animation Hitches template) → `analyzeAnimationHitches` → `swiftFindSymbolReferences` |
481
+ | `investigate-launch` | `/investigate-launch` | `tracePath` | `recordTimeProfile` (App Launch template) → `analyzeAppLaunch` → `swiftSearchPattern` |
482
+ | `verify-cycle-fix` | `/verify-cycle-fix` | `before`, `after` | `diffMemgraphs` → `classifyCycle` |
483
+
484
+ When the user invokes a prompt, the server fills the canonical playbook's argument templates with the user-provided values and returns a ready-to-execute brief. The agent then executes the steps — same tool calls as if the user had typed them out, just orchestrated.
485
+
486
+ > **Both surfaces (Tools + Resources + Prompts) are independent — clients that only support Tools still get the full catalog via `classifyCycle`.** Resources and Prompts are pure-add UX improvements for clients that surface them.
487
+
488
+ ## 8. Where to go from here
394
489
 
395
490
  - **Add a new cycle pattern**: see the *Adding a cycle pattern to `classifyCycle`* section in [`README.md`](./README.md#contributing).
396
491
  - **Run a custom analysis from scratch**: every tool's input schema is documented via the MCP `tools/list` request. Hit the server with `{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}` over stdio.
package/dist/cli.js CHANGED
@@ -15,6 +15,7 @@ import { homedir } from "node:os";
15
15
  import { resolve as resolvePath, join as joinPath } from "node:path";
16
16
  import { analyzeMemgraph } from "./tools/analyzeMemgraph.js";
17
17
  import { classifyCycle } from "./tools/classifyCycle.js";
18
+ import { VERSION } from "./version.js";
18
19
  const C = {
19
20
  reset: "\x1b[0m",
20
21
  dim: "\x1b[2m",
@@ -25,7 +26,6 @@ const C = {
25
26
  cyan: "\x1b[36m",
26
27
  gray: "\x1b[90m",
27
28
  };
28
- const VERSION = "1.4.0";
29
29
  const HELP = `${C.bold}memorydetective${C.reset} — iOS leak hunting from the CLI
30
30
 
31
31
  ${C.dim}Usage:${C.reset}
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,GAAG;IACR,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IAC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C;gBACrF,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,KAAK,qBAAqB,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC;gBAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC3B,OAAO,CAAC,CAAC;YACX,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,KAAK,IAAI,QAAQ,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
package/dist/index.js CHANGED
@@ -22,9 +22,13 @@ import { detectLeaksInXCUITest, detectLeaksInXCUITestSchema, } from "./tools/det
22
22
  import { reachableFromCycle, reachableFromCycleSchema, } from "./tools/reachableFromCycle.js";
23
23
  import { getInvestigationPlaybook, getInvestigationPlaybookSchema, } from "./tools/getInvestigationPlaybook.js";
24
24
  import { verifyFix, verifyFixSchema } from "./tools/verifyFix.js";
25
+ import { compareTracesByPattern, compareTracesByPatternSchema, } from "./tools/compareTracesByPattern.js";
25
26
  import { swiftGetSymbolDefinition, swiftGetSymbolDefinitionSchema, swiftFindSymbolReferences, swiftFindSymbolReferencesSchema, swiftGetSymbolsOverview, swiftGetSymbolsOverviewSchema, swiftGetHoverInfo, swiftGetHoverInfoSchema, swiftSearchPattern, swiftSearchPatternSchema, } from "./tools/swift/index.js";
27
+ import { VERSION as SERVER_VERSION } from "./version.js";
28
+ import { listPatternResources, readPatternResource, } from "./runtime/resources.js";
29
+ import { PROMPTS } from "./runtime/prompts.js";
30
+ import { z } from "zod";
26
31
  const SERVER_NAME = "memorydetective";
27
- const SERVER_VERSION = "0.1.0-dev";
28
32
  const server = new McpServer({
29
33
  name: SERVER_NAME,
30
34
  version: SERVER_VERSION,
@@ -281,6 +285,68 @@ server.registerTool("verifyFix", {
281
285
  const result = await verifyFix(input);
282
286
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
283
287
  });
288
+ server.registerTool("compareTracesByPattern", {
289
+ title: "Compare before/after .trace bundles for a perf regression target",
290
+ description: "[mg.trace][mg.ci] Trace-side counterpart to `verifyFix`. Compares two `.trace` bundles for a specific perf category (`hangs`, `animation-hitches`, or `app-launch`) and emits a PASS/PARTIAL/FAIL verdict plus before/after stats and deltas. Apply thresholds: hangs PASS when longest is below `hangsMaxLongestMs` (default 0); hitches PASS when longest is below `hitchesMaxLongestMs` (default 100ms — Apple's user-perceptible threshold); app-launch PASS when total is below `appLaunchMaxTotalMs` (default 1000ms).\n\nPipeline: capture before/after `.trace` (via `recordTimeProfile` or Xcode), then point this at the pair. The natural followup to a hangs/jank/launch fix PR.",
291
+ inputSchema: compareTracesByPatternSchema.shape,
292
+ }, async (input) => {
293
+ const result = await compareTracesByPattern(input);
294
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
295
+ });
296
+ // ─────────────────────────────────────────────────────────────────────────────
297
+ // MCP Resources — the cycle-pattern catalog as browsable URIs
298
+ // ─────────────────────────────────────────────────────────────────────────────
299
+ for (const res of listPatternResources()) {
300
+ server.registerResource(res.name, res.uri, {
301
+ title: res.name,
302
+ description: res.description,
303
+ mimeType: res.mimeType,
304
+ }, async (uri) => {
305
+ const body = readPatternResource(uri.href);
306
+ if (!body) {
307
+ throw new Error(`Unknown resource URI: ${uri.href}`);
308
+ }
309
+ return {
310
+ contents: [
311
+ {
312
+ uri: body.uri,
313
+ mimeType: body.mimeType,
314
+ text: body.text,
315
+ },
316
+ ],
317
+ };
318
+ });
319
+ }
320
+ // ─────────────────────────────────────────────────────────────────────────────
321
+ // MCP Prompts — investigation playbooks as named slash commands
322
+ // ─────────────────────────────────────────────────────────────────────────────
323
+ for (const prompt of PROMPTS) {
324
+ const argsSchema = {};
325
+ for (const arg of prompt.arguments) {
326
+ let schema = z.string().describe(arg.description);
327
+ if (!arg.required) {
328
+ // Optional args still represented as strings; leave required-ness to
329
+ // the prompt definition. (MCP SDK v1.x supports optional via .optional()
330
+ // but our prompts are all-required for now.)
331
+ }
332
+ argsSchema[arg.name] = schema;
333
+ }
334
+ server.registerPrompt(prompt.name, {
335
+ title: prompt.title,
336
+ description: prompt.description,
337
+ argsSchema,
338
+ }, (args) => ({
339
+ messages: [
340
+ {
341
+ role: "user",
342
+ content: {
343
+ type: "text",
344
+ text: prompt.render(args),
345
+ },
346
+ },
347
+ ],
348
+ }));
349
+ }
284
350
  async function main() {
285
351
  // CLI mode: when called with arguments, run the synchronous CLI wrapper.
286
352
  // No arguments → start the MCP server over stdio (the default and the
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,eAAe,EACf,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B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ChC,CAAC;IACD,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,EACX;QACE,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU;KACX,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACT,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAA8B,CAAC;iBACpD;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,yEAAyE;IACzE,sEAAsE;IACtE,sBAAsB;IACtB,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Per-pattern fix templates: Swift code snippets showing the typical
3
+ * before/after for each cycle pattern in the catalog. Pairs with
4
+ * `staticAnalysisHints.ts` and `classifyCycle.PATTERNS` to give the
5
+ * agent a concrete code example it can adapt to the user's context.
6
+ *
7
+ * Templates are deliberately minimal — just enough to demonstrate the
8
+ * shape of the fix. The agent fills in real type/method names from the
9
+ * surrounding code via the SourceKit-LSP tools.
10
+ */
11
+ export interface FixTemplate {
12
+ /** Optional one-line description if the snippet alone needs framing. */
13
+ context?: string;
14
+ /** Code that shows the leak shape. */
15
+ before: string;
16
+ /** Code that fixes it. */
17
+ after: string;
18
+ /**
19
+ * Optional notes — e.g. "this only works on iOS 14+" or
20
+ * "the WeakProxy class is a one-time helper you add to your codebase".
21
+ */
22
+ notes?: string;
23
+ }
24
+ /** Returns the fix template for a given pattern, or null if unknown. */
25
+ export declare function getFixTemplate(patternId: string): FixTemplate | null;
26
+ /** All known pattern ids that have templates. Used in tests for coverage assertion. */
27
+ export declare function knownTemplatePatternIds(): string[];