Sitar118 Claude Sonnet 4.6 commited on
Commit
ac96bfc
Β·
1 Parent(s): fdc4e41

docs: rewrite SYNC.md as live handoff protocol between ML Intern and Claude Code

Browse files

Old SYNC.md was a static history log β€” ML intern pushed AudioAnalyser without
updating it, Claude Code had no idea what was coming.

New structure:
- NEXT PUSH section: ML Intern fills before every push (task, files changed, APIs used)
- LAST BUILD RESULT: Claude Code fills after every pull+build
- LOCKED FILES table: explicit list of files ML intern must not modify
- Sprint log with regression note from Sprint 4
- What Claude Code can do (so ML Intern knows what to request)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. SYNC.md +108 -49
SYNC.md CHANGED
@@ -1,79 +1,138 @@
1
- # PluginBridge β€” Sync File
 
 
 
 
 
 
2
 
3
  ---
4
 
5
- ## STATUS: v0.5.2 β€” SPRINT 3 COMPLETE (2026-05-17)
6
 
7
- Build: βœ… Clean
8
- GUI: βœ… Working (Pro-Q 4, God Particle, Little MicroShift, LIMITER)
9
- MCP: βœ… Verified end-to-end β€” registered in Claude Code config
10
- Crashes: βœ… None (unsafe plugins handled via audio-only mode)
 
 
 
11
 
12
  ---
13
 
14
- ## MCP INTEGRATION CONFIRMED
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- **Server:** `http://127.0.0.1:16620/mcp`
17
- **Registered as:** `pluginbridge` in Claude Code local config
18
- **Scope:** AI MUSIC PRODUCTION project
19
 
20
- **Verified working (2026-05-17):**
21
- - `GET /health` β†’ `{"status":"ok","helper":"connected","port":16620}`
22
- - `initialize` β†’ handshake complete
23
- - `tools/list` β†’ 5 tools registered
24
- - `search_param "band 1"` β†’ 24 params returned from Pro-Q 4 with real values
25
 
26
- **Pro-Q 4 via MCP:** 737 parameters fully accessible (vs 1 parameter via Ableton LOM)
 
 
 
 
 
 
 
 
 
 
27
 
28
  ---
29
 
30
- ## SPRINTS
 
 
 
 
31
 
32
- | Sprint | Status | What |
33
- |---|---|---|
34
- | Sprint 1 | βœ… | Plugin shell + MCP server |
35
- | Sprint 2 | βœ… | Out-of-process hosting, crash-safe, GUI |
36
- | Sprint 3 | βœ… | MCP param control β€” verified from Claude Code |
37
- | Sprint 4 | **NEXT** | Real-time audio analysis (LUFS, FFT, spectral) |
 
38
 
39
  ---
40
 
41
- ## ARCHITECTURE (v0.5.2)
42
 
43
- ```
44
- Claude Code / Gemini CLI
45
- β”‚
46
- β”œβ”€β”€ ableton-live-mcp (port 16619) β€” DAW control, LOM, tracks, routing
47
- β”‚
48
- └── pluginbridge (port 16620) β€” plugin parameter control
49
- β”‚
50
- β–Ό
51
- PluginBridge.vst3 (inside Ableton)
52
- β”œβ”€β”€ In-process GUI (safe plugins)
53
- β”œβ”€β”€ Shared memory audio β†’ Helper process (crash-safe)
54
- β”œβ”€β”€ MCP server (5 tools)
55
- └── Safety DB + blocklist
56
-
57
- PluginBridgeHelper.app (separate process)
58
- β”œβ”€β”€ Audio processing via shared memory
59
- β”œβ”€β”€ --scan mode for safety testing
60
- └── --load mode for audio routing
61
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  ---
64
 
65
- ## BUILD
66
 
67
  ```bash
 
68
  cd "/Volumes/T7 Shield/Users/Aditya/pluginbridge/build"
69
  cmake --build . --target PluginBridge_VST3 -- -j4
 
 
 
 
 
 
 
70
  ```
71
 
72
  ---
73
 
74
- ## MODE: NORMAL (build+test only)
75
 
76
- Claude Code rules:
77
- - `pull and build` β†’ pull + cmake build + report result
78
- - `pull and test` β†’ pull + build + run curl tests + report
79
- - For debugging: ML Intern will update SYNC.md to grant full debug mode when needed
 
 
 
1
+ # PluginBridge β€” Live Sync File
2
+
3
+ > **How this file works:**
4
+ > ML Intern fills `## NEXT PUSH` BEFORE pushing any code.
5
+ > Claude Code reads it, pulls, builds, tests, then fills `## LAST BUILD RESULT`.
6
+ > After a successful build, Claude Code moves the push details to `## SPRINT LOG`.
7
+ > Neither side should push without reading what the other wrote last.
8
 
9
  ---
10
 
11
+ ## CURRENT STATUS (updated by Claude Code after each build)
12
 
13
+ **Version:** v0.5.2 + AudioAnalyser
14
+ **Last build:** 2026-05-17 ~18:30
15
+ **Build:** βœ… Clean β€” `[100%] Built target PluginBridge_VST3`
16
+ **Runtime:** βœ… GUI working β€” TreeView picker + in-process createEditor()
17
+ **MCP:** βœ… Running on port 16620, registered in Claude Code config
18
+ **AudioAnalyser:** βœ… Wired β€” LUFS, FFT bands, stereo width, centroid, true peak
19
+ **get_analysis:** βœ… Returns live data when audio is playing
20
 
21
  ---
22
 
23
+ ## NEXT PUSH β€” ML Intern fills this before every push
24
+
25
+ > **ML Intern: Before you push anything, fill this section completely.**
26
+ > Claude Code reads this to know what's coming and catch problems early.
27
+ > Leave it blank = Claude Code has no idea what you did = breaks things.
28
+
29
+ ```
30
+ STATUS: [waiting for ML Intern to fill]
31
+
32
+ TASK: [what feature/fix are you implementing?]
33
+
34
+ FILES I WILL CHANGE:
35
+ - [filename] β€” [what specifically you're changing in it]
36
+ - [filename] β€” [what specifically you're changing in it]
37
 
38
+ FILES I WILL NOT TOUCH:
39
+ (List everything else β€” confirm you're not touching the locked files)
 
40
 
41
+ NEW FILES (if any):
42
+ - [filename] β€” [purpose]
43
+ NOTE: Tell Claude Code about new .cpp/.mm files β€” they must be added to CMakeLists.txt
 
 
44
 
45
+ APIs/APPROACHES USED:
46
+ - [API name] β€” [confirmed working? or needs Claude Code to verify first?]
47
+
48
+ WHAT I AM NOT CHANGING:
49
+ - PluginBridgeEditor.mm β€” locked
50
+ - PluginPickerComponent.mm β€” locked
51
+ - HelperPluginHost.mm β€” locked
52
+ - HelperConnection.cpp β€” locked
53
+ - The in-process createEditor() load flow β€” locked
54
+ - All PBLOG calls β€” never remove these
55
+ ```
56
 
57
  ---
58
 
59
+ ## LAST BUILD RESULT β€” Claude Code fills this after every pull+build
60
+
61
+ **Date:** 2026-05-17 ~18:30
62
+ **Pulled commits:**
63
+ - `fdc4e41` fix: restore v0.5.2 architecture + wire AudioAnalyser correctly
64
 
65
+ **Build:** βœ… Clean
66
+ **Tests run:**
67
+ - `GET /health` β†’ `{"status":"ok","helper":"connected","port":16620}` βœ…
68
+ - `tools/call get_analysis` β†’ pending (need audio playing)
69
+
70
+ **Issues found:** None
71
+ **Action taken:** Pushed CMakeLists.txt fix (PluginPickerComponent.mm was missing from build)
72
 
73
  ---
74
 
75
+ ## LOCKED FILES β€” do not modify without explicit permission from Adi
76
 
77
+ | File | Why locked |
78
+ |---|---|
79
+ | `Source/Plugin/PluginBridgeEditor.mm` | In-process GUI embedding β€” 4 sprints to get right |
80
+ | `Source/Plugin/PluginPickerComponent.mm` | Ableton-style TreeView picker β€” working |
81
+ | `Source/Helper/HelperPluginHost.mm` | Audio routing + process lifecycle |
82
+ | `Source/Plugin/HelperConnection.cpp` | IPC + shared memory protocol |
83
+
84
+ **Also never:**
85
+ - Remove `PBLOG(...)` calls β€” they're how Claude Code diagnoses bugs
86
+ - Change the `loadInProcessPlugin()` flow
87
+ - Use CALayerHost for GUI (see FAILED-APPROACHES #10 β€” doesn't work in Ableton)
88
+
89
+ ---
90
+
91
+ ## SPRINT LOG
92
+
93
+ ### Sprint 1 βœ…
94
+ Plugin shell + MCP server. Basic VST3 structure, HTTP JSON-RPC endpoint.
95
+
96
+ ### Sprint 2 βœ…
97
+ Out-of-process hosting via shared memory. Helper process. Crash isolation.
98
+ GUI showed in windowed Ableton but broke in fullscreen β†’ led to Sprint 3 redesign.
99
+
100
+ ### Sprint 3 βœ… (v0.5.2)
101
+ Full in-process hosting with safety scan. Ableton-style TreeView picker.
102
+ Fixes: deduplication, manufacturer names, background scan conflict, addChildComponent bug.
103
+ MCP verified end-to-end. Pro-Q 4 = 737 params via MCP.
104
+
105
+ ### Sprint 4 βœ… (AudioAnalyser)
106
+ Real-time audio analysis: LUFS, true peak, stereo width, spectral centroid, 7-band FFT.
107
+ `get_analysis` MCP tool wired.
108
+ **Regression introduced and fixed:** ML intern rewrote Editor+Processor while adding AudioAnalyser,
109
+ accidentally reverting to CALayerHost architecture. Fixed by Claude Code (2026-05-17).
110
+ Root cause documented in MACHINE-CONTEXT.md scope rules.
111
 
112
  ---
113
 
114
+ ## BUILD COMMANDS
115
 
116
  ```bash
117
+ # Full build
118
  cd "/Volumes/T7 Shield/Users/Aditya/pluginbridge/build"
119
  cmake --build . --target PluginBridge_VST3 -- -j4
120
+
121
+ # Quick MCP test (with plugin loaded in Ableton)
122
+ curl -s http://127.0.0.1:16620/health
123
+ curl -s -X POST http://127.0.0.1:16620/mcp \
124
+ -H "Content-Type: application/json" \
125
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_analysis","arguments":{}}}' \
126
+ | python3 -m json.tool
127
  ```
128
 
129
  ---
130
 
131
+ ## WHAT CLAUDE CODE CAN DO (ML Intern can request these)
132
 
133
+ - `pull and build` β€” pull latest, build, report result
134
+ - `pull and test` β€” pull, build, run curl tests, report
135
+ - `verify [API]` β€” test whether an API works on this machine, write result to MACHINE-CONTEXT.md
136
+ - `check the log` β€” read debug.log and crash reports, diagnose issues
137
+ - `run debugger` β€” start live tail of debug.log in background
138
+ - Full debug investigation when something breaks β€” reads log, checks processes, reports root cause