liteagents 2.5.3 → 2.6.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 (70) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +51 -45
  3. package/installer/cli.js +1 -1
  4. package/installer/installation-engine.js +82 -21
  5. package/installer/package-manager.js +34 -3
  6. package/package.json +3 -2
  7. package/packages/ampcode/AGENT.md +1 -0
  8. package/packages/ampcode/commands/friction/friction.js +19 -4
  9. package/packages/ampcode/commands/live-canvas/DESIGN_PRINCIPLES.md +2140 -0
  10. package/packages/ampcode/commands/live-canvas/README.md +273 -0
  11. package/packages/ampcode/commands/live-canvas/templates/.claude/settings.local.json +8 -0
  12. package/packages/ampcode/commands/live-canvas/templates/demo/post-variants.html +205 -0
  13. package/packages/ampcode/commands/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +1299 -0
  14. package/packages/ampcode/commands/live-canvas/templates/feedback-react/format-utils.ts +283 -0
  15. package/packages/ampcode/commands/live-canvas/templates/feedback-react/index.ts +62 -0
  16. package/packages/ampcode/commands/live-canvas/templates/feedback-react/selector-utils.ts +423 -0
  17. package/packages/ampcode/commands/live-canvas/templates/feedback-react/types.ts +118 -0
  18. package/packages/ampcode/commands/live-canvas/templates/overlay-vanilla.js +477 -0
  19. package/packages/ampcode/commands/live-canvas.md +1104 -0
  20. package/packages/claude/CLAUDE.md +1 -0
  21. package/packages/claude/commands/friction/friction.js +19 -4
  22. package/packages/claude/plugins/live-canvas-marketplace/.claude-plugin/marketplace.json +14 -0
  23. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/.claude-plugin/plugin.json +18 -0
  24. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md +89 -0
  25. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package-lock.json +1142 -0
  26. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package.json +17 -0
  27. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/schema.json +37 -0
  28. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/server.js +179 -0
  29. package/packages/claude/plugins/live-canvas-marketplace/setup.sh +61 -0
  30. package/packages/claude/skills/live-canvas/DESIGN_PRINCIPLES.md +2140 -0
  31. package/packages/claude/skills/live-canvas/INTEGRATION_NOTES.md +210 -0
  32. package/packages/claude/skills/live-canvas/README.md +273 -0
  33. package/packages/claude/skills/live-canvas/SKILL.md +1119 -0
  34. package/packages/claude/skills/live-canvas/templates/.claude/settings.local.json +8 -0
  35. package/packages/claude/skills/live-canvas/templates/demo/post-variants.html +205 -0
  36. package/packages/claude/skills/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +1299 -0
  37. package/packages/claude/skills/live-canvas/templates/feedback-react/format-utils.ts +283 -0
  38. package/packages/claude/skills/live-canvas/templates/feedback-react/index.ts +62 -0
  39. package/packages/claude/skills/live-canvas/templates/feedback-react/selector-utils.ts +423 -0
  40. package/packages/claude/skills/live-canvas/templates/feedback-react/types.ts +118 -0
  41. package/packages/claude/skills/live-canvas/templates/overlay-vanilla.js +477 -0
  42. package/packages/claude/variants.json +2 -1
  43. package/packages/droid/AGENTS.md +1 -0
  44. package/packages/droid/commands/friction/friction.js +19 -4
  45. package/packages/droid/commands/live-canvas/DESIGN_PRINCIPLES.md +2140 -0
  46. package/packages/droid/commands/live-canvas/README.md +273 -0
  47. package/packages/droid/commands/live-canvas/templates/.claude/settings.local.json +8 -0
  48. package/packages/droid/commands/live-canvas/templates/demo/post-variants.html +205 -0
  49. package/packages/droid/commands/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +1299 -0
  50. package/packages/droid/commands/live-canvas/templates/feedback-react/format-utils.ts +283 -0
  51. package/packages/droid/commands/live-canvas/templates/feedback-react/index.ts +62 -0
  52. package/packages/droid/commands/live-canvas/templates/feedback-react/selector-utils.ts +423 -0
  53. package/packages/droid/commands/live-canvas/templates/feedback-react/types.ts +118 -0
  54. package/packages/droid/commands/live-canvas/templates/overlay-vanilla.js +477 -0
  55. package/packages/droid/commands/live-canvas.md +1104 -0
  56. package/packages/opencode/AGENTS.md +1 -0
  57. package/packages/opencode/command/friction/friction.js +19 -4
  58. package/packages/opencode/command/live-canvas/DESIGN_PRINCIPLES.md +2140 -0
  59. package/packages/opencode/command/live-canvas/README.md +273 -0
  60. package/packages/opencode/command/live-canvas/templates/.claude/settings.local.json +8 -0
  61. package/packages/opencode/command/live-canvas/templates/demo/post-variants.html +205 -0
  62. package/packages/opencode/command/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +1299 -0
  63. package/packages/opencode/command/live-canvas/templates/feedback-react/format-utils.ts +283 -0
  64. package/packages/opencode/command/live-canvas/templates/feedback-react/index.ts +62 -0
  65. package/packages/opencode/command/live-canvas/templates/feedback-react/selector-utils.ts +423 -0
  66. package/packages/opencode/command/live-canvas/templates/feedback-react/types.ts +118 -0
  67. package/packages/opencode/command/live-canvas/templates/overlay-vanilla.js +477 -0
  68. package/packages/opencode/command/live-canvas.md +1104 -0
  69. package/packages/opencode/opencode.jsonc +4 -0
  70. package/packages/subagentic-manual.md +15 -12
@@ -0,0 +1,210 @@
1
+ # Design Lab — integration notes
2
+
3
+ **Status:** draft for later revision
4
+ **Context:** These are notes from a real design-lab session on vanilla-Node gitdone.
5
+ Capture what worked, what needs adaptation, and the path to a truly live feedback
6
+ loop. Rewrite properly when you sit down to tidy this.
7
+
8
+ ---
9
+
10
+ ## What Design Lab is (and what it isn't)
11
+
12
+ **Is:** a Claude Code skill that generates N UI variations side-by-side with an
13
+ in-page `FeedbackOverlay`, collects click-to-annotate feedback on elements,
14
+ synthesizes a winner, finalizes with `DESIGN_PLAN.md` + cleanup.
15
+
16
+ **Isn't:** a live push bridge. The overlay writes feedback to disk. Claude only
17
+ sees that file when the user types a message — it can't be woken by a Save click.
18
+
19
+ ---
20
+
21
+ ## Adaptation points (upstream assumes React)
22
+
23
+ The shipped skill (`SKILL.md`) generates React/Next.js/Vite templates and uses
24
+ `FeedbackOverlay.tsx` (React + portals). Any project not in that stack needs
25
+ adaptation. Patterns observed:
26
+
27
+ ### Vanilla Node http / template-literal projects
28
+
29
+ - **Variants:** CommonJS modules at `.claude-design/lab/variants/variant-[a-f].js`
30
+ - Each exports `{ id, rationale, render(stepsCount) }`
31
+ - `render()` returns an HTML string; root element carries `data-variant-root="X"`
32
+ - Inline `<style>` per variant, CSS class prefix per variant (`.va-`, `.vb-`, etc.)
33
+ to avoid cross-variant bleed
34
+
35
+ - **Overlay:** port `FeedbackOverlay.tsx` → vanilla JS. A working port exists
36
+ from the gitdone session — consider moving it to
37
+ `design-lab/templates/overlay-vanilla.js` upstream so it's reusable.
38
+
39
+ - **Server integration:** a `/__design_lab` GET route that loads all variant
40
+ modules and renders them in a CSS grid + injects the vanilla overlay as an
41
+ inline `<script>`. Feedback POSTs to `/__design_lab/feedback` → appends JSONL
42
+ to `.claude-design/feedback.jsonl`. Echo a highlighted summary to stderr.
43
+
44
+ ### Other stacks
45
+
46
+ - **Next.js App Router** — skill's default; no adaptation needed
47
+ - **Vite React** — skill's default; minor route wiring
48
+ - **Plain HTML static** — variants served from filesystem; small fetch POST for
49
+ feedback; no server integration (no real-time auto-reload)
50
+ - **Server-rendered (Rails, Django, Phoenix)** — one route that concatenates
51
+ rendered variants; overlay via CDN / inline script
52
+
53
+ ---
54
+
55
+ ## The live-feedback problem
56
+
57
+ Design Lab today: batched feedback. User collects comments + writes overall
58
+ direction + clicks "Submit all" → one JSONL entry with the batch. Fine for
59
+ first-pass iteration; slow for rapid tweaks.
60
+
61
+ Ideal (what user described as "rapid miniscule changes"):
62
+
63
+ 1. User clicks element
64
+ 2. Types comment
65
+ 3. Save → Claude is pushed the event AT THAT MOMENT
66
+ 4. Claude edits the source file
67
+ 5. Browser auto-reloads via SSE (already working via our dev HUD)
68
+ 6. User sees the change without ever leaving the browser
69
+
70
+ Step 3 is the missing piece. Design Lab can't do it today because skills don't
71
+ push events — channels do.
72
+
73
+ ---
74
+
75
+ ## Three integration paths (cheapest → proper)
76
+
77
+ ### Path 1: Poll-on-next-message (today's behavior)
78
+
79
+ - Overlay writes JSONL on Submit
80
+ - Claude reads JSONL on next user message
81
+ - User says "check" / "k" / anything to trigger
82
+
83
+ **Cost:** 0 min. **UX:** one message per feedback batch. **Good for:**
84
+ thoughtful batched feedback, not rapid tweaks.
85
+
86
+ ### Path 2: Fakechat bridge (15 min, runs on top of the skill)
87
+
88
+ Modify `overlay.js` to add a "live mode" toggle:
89
+
90
+ - When ON, each individual **Save** (not just batch Submit) POSTs to
91
+ `http://localhost:8787/api/send` formatted as a Fakechat-compatible message:
92
+
93
+ ```json
94
+ {"text": "[DESIGN-LAB F / button \"Create event\"] too cramped\n\nselector: section:nth-of-type(1) > form > button\noutline_html: <button class=\"vf-submit\">Create event</button>"}
95
+ ```
96
+
97
+ - Launch Claude with:
98
+
99
+ ```bash
100
+ claude --channels plugin:fakechat@claude-plugins-official
101
+ ```
102
+
103
+ - Each Save pushes the payload into the live Claude session as a channel event
104
+ - Claude reacts immediately (edit file, confirm back in Fakechat UI)
105
+ - SSE reload in the dev HUD shows the change in the design-lab page
106
+
107
+ **Tradeoff:** Fakechat expects plain chat text. We embed the structured
108
+ feedback as a preformatted string. Slightly janky — good for "does push work?"
109
+ proof-of-concept, not production.
110
+
111
+ **Bonus:** with Fakechat open at localhost:8787 you also get a chat back-channel
112
+ for non-UI notes ("also fix X unrelated thing").
113
+
114
+ ### Path 3: Custom `design-channel` plugin (2-3 hours, the right way)
115
+
116
+ Dedicated channel plugin that bundles with design-lab:
117
+
118
+ - Speaks channel protocol to Claude (stdio subprocess like other channels)
119
+ - Exposes a local HTTP port (configurable; default 8788)
120
+ - Overlay POSTs directly to that port — no Fakechat detour
121
+ - Payload shape is the native structured feedback, not wrapped chat text
122
+ - Optional back-reply tool so Claude can post comments/confirmations to
123
+ specific pins in the overlay ("done — added padding")
124
+
125
+ **Implementation sketch:**
126
+
127
+ ```
128
+ design-plugin/
129
+ ├── design-and-refine/
130
+ │ ├── skills/design-lab/ # existing
131
+ │ └── channels/design-channel/ # NEW
132
+ │ ├── manifest.json # declares claude/channel capability
133
+ │ ├── server.js # HTTP server + stdio channel
134
+ │ └── schema.json # payload schema
135
+ ```
136
+
137
+ - `manifest.json` declares channel capability + stdio subprocess entry
138
+ - `server.js` runs an HTTP listener AND a stdio channel protocol handler;
139
+ POSTs to HTTP translate to channel.notify events with the payload
140
+ - Can either be launched separately (`claude --channels plugin:design-channel`)
141
+ or bundled so Design Lab auto-launches it when active
142
+
143
+ **Reusable upstream:** this belongs as a PR to
144
+ [0xdesign/design-plugin](https://github.com/0xdesign/design-plugin). Benefits
145
+ every Design Lab user, not just this project.
146
+
147
+ ### Path 4 (considered, rejected): auto-poll without a channel
148
+
149
+ Cannot work. Claude Code sessions are turn-based; no mechanism exists to
150
+ spontaneously check files between user turns. Hooks fire on Claude Code
151
+ events (user-prompt-submit, tool-use, etc.), not on external file changes.
152
+ Background tasks complete-notify but don't re-enter mid-generation. Path 2
153
+ or 3 are the only real "push" options.
154
+
155
+ ---
156
+
157
+ ## Files that matter
158
+
159
+ From the gitdone session, preserve these:
160
+
161
+ | File | Purpose | Reusable |
162
+ |---|---|---|
163
+ | `overlay.js` (vanilla port) | Click-to-annotate HUD | ✅ save to `design-lab/templates/overlay-vanilla.js` |
164
+ | Variant `render()` module pattern | Works for any server-rendered stack | ✅ document in skill |
165
+ | `/__design_lab` route shape | Server integration pattern | ✅ document per-stack |
166
+ | CSS prefix-per-variant | Prevents cross-variant style bleed | ✅ convention |
167
+
168
+ ---
169
+
170
+ ## Recommended next steps (when you sit down)
171
+
172
+ 1. **Copy** the vanilla `overlay.js` from the gitdone `.claude-design/lab/`
173
+ into `design-lab/templates/overlay-vanilla.js` so future sessions don't
174
+ re-port it.
175
+
176
+ 2. **Append to `SKILL.md`** a "Vanilla adaptation" section right after the
177
+ framework-detection phase: if no React/Vue/Svelte detected → use the
178
+ vanilla templates and CommonJS module pattern.
179
+
180
+ 3. **Decide on channel path:**
181
+ - Path 2 (Fakechat bridge) for the quick win
182
+ - Path 3 (custom channel) for the proper PR upstream
183
+
184
+ 4. **Liteagents bundling:** `./install.sh` already copies skills to
185
+ `~/.claude/skills/`. Consider having it also install Fakechat from
186
+ the plugin registry if the user opts in:
187
+
188
+ ```bash
189
+ read -p "Install Fakechat channel (for live Design Lab)? [y/N] " ans
190
+ [[ $ans =~ ^[Yy] ]] && claude /plugin install fakechat@claude-plugins-official
191
+ ```
192
+
193
+ 5. **Open questions worth thinking through:**
194
+ - Should Design Lab auto-launch its channel when active? Or require
195
+ user to pass `--channels` flag at session start?
196
+ - How should channel-received feedback interact with the batch flow?
197
+ (Auto-synthesize after N comments? Synthesize only on explicit request?)
198
+ - Should the overlay show "Claude is editing..." state via a back-reply
199
+ from the channel?
200
+
201
+ ---
202
+
203
+ ## References
204
+
205
+ - Skill: `~/.claude/skills/design-lab/SKILL.md`
206
+ - Upstream: <https://github.com/0xdesign/design-plugin>
207
+ - Channels reference: <https://code.claude.com/docs/en/channels-reference>
208
+ - Fakechat: `claude /plugin install fakechat@claude-plugins-official`
209
+ - Vanilla overlay port (today's session):
210
+ `/home/hamr/PycharmProjects/gitdone/.claude-design/lab/overlay.js`
@@ -0,0 +1,273 @@
1
+ # Live Canvas
2
+
3
+ Click-to-annotate UI design tool for Claude Code. Renders N variants of a component or page in your browser, you click an element and type what to change, and Claude edits the variant file while you watch in the browser. No window switching, no pasted JSON.
4
+
5
+ Ships as a Claude Code skill plus an MCP channel plugin. Works in every tool liteagents supports (Claude, Droid, Amp, Opencode), but **Live mode only works in Claude Code** — other tools run in Batch mode only (see modes below).
6
+
7
+ ---
8
+
9
+ ## How it works
10
+
11
+ ```
12
+ ┌──────────────────────┐ POST /feedback ┌─────────────────────┐
13
+ │ Overlay in browser │ ─────────────────────────► │ live-canvas-channel │
14
+ │ (vanilla JS or React)│ │ (Node MCP server) │
15
+ └──────────────────────┘ └──────────┬──────────┘
16
+ ▲ │
17
+ │ dev server hot-reloads the page │ notifications/
18
+ │ after Claude edits the variant │ claude/channel
19
+ │ ▼
20
+ ┌──────────────────────┐ ┌─────────────────────┐
21
+ │ Dev server (yours) │ ◄──── Claude edits ─────── │ Claude Code session │
22
+ │ e.g. pnpm dev :3000 │ variant file │ (with --dangerously-│
23
+ └──────────────────────┘ │ load-development- │
24
+ │ channels flag) │
25
+ └─────────────────────┘
26
+ ```
27
+
28
+ Each Save in the overlay streams into the Claude session as a `<channel>` tag with the variant, element selector, and user comment. Claude edits the corresponding `.claude-design/lab/variants/Variant<X>.tsx` file. Your dev server hot-reloads. You never leave the browser.
29
+
30
+ ---
31
+
32
+ ## Modes
33
+
34
+ The overlay auto-selects at runtime, the user never toggles manually.
35
+
36
+ | Mode | Trigger | What happens per Save |
37
+ |---|---|---|
38
+ | **Live** | Channel server answers `GET /health`, session was started with the dev-channels flag | Comment streams into Claude's context; Claude edits the file; dev server hot-reloads. Toast: "Pushed to Claude ✨". |
39
+ | **Batch** | No channel, or running under Droid/Amp/Opencode | Comment stays local. On Finish/Submit it writes JSONL (or downloads the file if no endpoint). User pastes or says "check" in the CLI to have the assistant act on the whole batch. |
40
+
41
+ Live mode gracefully degrades to Batch if a push ever fails mid-session.
42
+
43
+ ---
44
+
45
+ ## One-time setup (Live mode, Claude Code only)
46
+
47
+ Run this once per machine. Without it, the skill still works in Batch mode.
48
+
49
+ ### 1. Install plugin npm dependencies
50
+
51
+ ```bash
52
+ bash ~/.claude/plugins/live-canvas-marketplace/setup.sh
53
+ ```
54
+
55
+ Checks Node >= 18, runs `npm install` inside the plugin dir. Idempotent.
56
+
57
+ ### 2. Register the marketplace in Claude Code
58
+
59
+ ```
60
+ /plugin marketplace add ~/.claude/plugins/live-canvas-marketplace
61
+ ```
62
+
63
+ ### 3. Install the plugin
64
+
65
+ ```
66
+ /plugin install live-canvas-channel@live-canvas-marketplace
67
+ ```
68
+
69
+ ### 4. Start Claude Code with the dev-channels flag
70
+
71
+ ```bash
72
+ claude --dangerously-load-development-channels plugin:live-canvas-channel@live-canvas-marketplace
73
+ ```
74
+
75
+ Accept the safety prompt (custom channels are in research preview and not on the default allowlist).
76
+
77
+ **Save yourself typing** — add to `~/.bashrc` or `~/.zshrc`:
78
+
79
+ ```bash
80
+ alias claude-live='claude --dangerously-load-development-channels plugin:live-canvas-channel@live-canvas-marketplace'
81
+ ```
82
+
83
+ From now on, `claude-live` to enable Live mode, plain `claude` for everything else.
84
+
85
+ ---
86
+
87
+ ## Everyday use
88
+
89
+ ### Start a session
90
+
91
+ Either `claude` (Batch only) or `claude-live` (Live available).
92
+
93
+ ### Invoke the skill in a project
94
+
95
+ ```
96
+ /live-canvas
97
+ ```
98
+
99
+ Phase 0 probes the channel and decides what to do:
100
+
101
+ | State | Skill behavior |
102
+ |---|---|
103
+ | Channel responding | Announces Live mode, goes straight into the interview |
104
+ | Plugin installed but channel not responding (you forgot the dev flag) | AskUserQuestion: Batch now, or close and restart with the flag? |
105
+ | Plugin not installed at all (first run) | AskUserQuestion: set up Live, or just use Batch? Prints the 4-step setup. |
106
+
107
+ ### Interview & generation
108
+
109
+ Skill asks 5 short questions (scope, pain points, inspiration, persona, constraints). Then generates 5 variants in `.claude-design/lab/variants/` and wires a route at `/__live_canvas` in your app.
110
+
111
+ ### Iterate in the browser
112
+
113
+ Open `http://localhost:<dev-port>/__live_canvas`. Click **Add Feedback** (bottom right), click any element in any variant, type a one-liner, Save.
114
+
115
+ - Live mode: toast says "Pushed to Claude ✨", Claude acknowledges and edits the file, dev server hot-reloads.
116
+ - Batch mode: toast says "Saved — submit when ready", pin stays on the element, counter in the Submit button ticks up.
117
+
118
+ Keep clicking until a winner emerges.
119
+
120
+ ### Finish
121
+
122
+ Click the pink **Finish** (Live) or **Submit** (Batch) button:
123
+
124
+ 1. Type the overall direction: e.g. *"Go with B's layout, A's button styling"*
125
+ 2. Click Finish
126
+
127
+ Skill then:
128
+ - Generates `DESIGN_PLAN.md` in project root (winner, files to change, component API, states, a11y checklist)
129
+ - Updates or creates `DESIGN_MEMORY.md` with the patterns it learned
130
+ - Deletes `.claude-design/` and the `/__live_canvas` route
131
+
132
+ Done.
133
+
134
+ ---
135
+
136
+ ## Files and where they live
137
+
138
+ ### In this repo (source)
139
+
140
+ ```
141
+ packages/claude/
142
+ ├── skills/live-canvas/
143
+ │ ├── SKILL.md # Skill instructions (phases, flow)
144
+ │ ├── DESIGN_PRINCIPLES.md # UX/a11y/motion reference
145
+ │ ├── INTEGRATION_NOTES.md # Design-time notes (channel paths explored)
146
+ │ ├── README.md # This file
147
+ │ └── templates/
148
+ │ ├── overlay-vanilla.js # Framework-agnostic overlay (~400 lines)
149
+ │ ├── feedback-react/ # React overlay for React/Next/Vite projects
150
+ │ └── demo/post-variants.html # Standalone demo for testing the overlay
151
+ └── plugins/
152
+ └── live-canvas-marketplace/
153
+ ├── .claude-plugin/marketplace.json
154
+ ├── setup.sh # Runs npm install and prints manual steps
155
+ └── plugins/live-canvas-channel/
156
+ ├── .claude-plugin/plugin.json
157
+ ├── server.js # MCP server + HTTP listener on :8788
158
+ ├── schema.json # Feedback payload schema (v1.0)
159
+ ├── package.json # @modelcontextprotocol/sdk dep
160
+ └── README.md # Plugin-specific docs (protocol, debug)
161
+ ```
162
+
163
+ ### On the user's disk after liteagents install
164
+
165
+ ```
166
+ ~/.claude/
167
+ ├── skills/live-canvas/ # Copied from packages/claude/skills/
168
+ └── plugins/live-canvas-marketplace/ # Copied from packages/claude/plugins/
169
+ ```
170
+
171
+ `node_modules/` is NOT copied — `setup.sh` creates it locally via `npm install`.
172
+
173
+ ### After `/plugin install` (Claude Code's own register step)
174
+
175
+ ```
176
+ ~/.claude/plugins/cache/live-canvas-marketplace/ # Claude Code's registered copy
177
+ ```
178
+
179
+ Two different dirs:
180
+ - `~/.claude/plugins/live-canvas-marketplace/` — where liteagents puts the source
181
+ - `~/.claude/plugins/cache/live-canvas-marketplace/` — where Claude Code puts its own registered copy after `/plugin install`
182
+
183
+ The skill checks the cache dir to tell first-time vs returning users apart.
184
+
185
+ ### Per-project, during a session
186
+
187
+ ```
188
+ <project-root>/
189
+ └── .claude-design/
190
+ ├── lab/variants/VariantA.tsx … VariantE.tsx
191
+ ├── lab/FeedbackOverlay.tsx (React) OR overlay-vanilla.js (other)
192
+ ├── design-brief.json # Structured output from the interview
193
+ └── feedback.jsonl # Batch mode only; deleted on Finish
194
+ ```
195
+
196
+ Plus a temporary route (e.g. `app/__live_canvas/page.tsx` for Next.js App Router). Everything under `.claude-design/` and the temporary route is deleted on Finish or Abort.
197
+
198
+ ### What survives after Finish
199
+
200
+ ```
201
+ <project-root>/
202
+ ├── DESIGN_PLAN.md # Winner + implementation steps
203
+ └── DESIGN_MEMORY.md # Accumulated design-system patterns
204
+ ```
205
+
206
+ ---
207
+
208
+ ## The install pipeline, end to end
209
+
210
+ 1. **Liteagents installer** copies files:
211
+ - `packages/claude/skills/live-canvas/` → `~/.claude/skills/live-canvas/`
212
+ - `packages/claude/plugins/live-canvas-marketplace/` → `~/.claude/plugins/live-canvas-marketplace/`
213
+ 2. **User, once:** runs `bash ~/.claude/plugins/live-canvas-marketplace/setup.sh` → installs the plugin's npm deps
214
+ 3. **User, once:** in a Claude session, runs `/plugin marketplace add ~/.claude/plugins/live-canvas-marketplace` + `/plugin install live-canvas-channel@live-canvas-marketplace`
215
+ 4. **User, every session that wants Live mode:** starts Claude with `--dangerously-load-development-channels plugin:live-canvas-channel@live-canvas-marketplace` (or `claude-live` alias)
216
+ 5. **User, whenever:** `/live-canvas` in any project
217
+
218
+ Steps 1, 2, 3 are truly one-time. Step 4 is per-session. Step 5 is per-project-use.
219
+
220
+ ---
221
+
222
+ ## Troubleshooting
223
+
224
+ ### "Listening for channel messages…" appears on session start, but skill still says Batch
225
+
226
+ Port 8788 is stuck from an earlier session's server process. Kill it:
227
+
228
+ ```bash
229
+ lsof -i :8788
230
+ kill <pid>
231
+ ```
232
+
233
+ Then `/reload-plugins` in the new session.
234
+
235
+ ### Skill says "No response on :8788" even though I set everything up
236
+
237
+ Three common causes, in order of likelihood:
238
+
239
+ 1. You didn't start this session with the dev flag. Close it, reopen with `claude-live`.
240
+ 2. The plugin subprocess died on startup. In the session, run `/mcp` — look for `live-canvas` with its status. "Failed to connect" means a node/dep error: check `~/.claude/debug/<session-id>.txt` for the stderr.
241
+ 3. You never ran step 2 of setup. Re-run `bash ~/.claude/plugins/live-canvas-marketplace/setup.sh`.
242
+
243
+ ### Overlay loads in the browser but no pills appear
244
+
245
+ The overlay script didn't load. Most common cause: you started the Python server inside the wrong directory so the relative `../overlay-vanilla.js` path couldn't resolve. Start the server one level up and navigate with the `/demo/` prefix.
246
+
247
+ ### "Pushed to Claude ✨" toast appears but nothing happens in the terminal
248
+
249
+ Either (a) you're not in a dev-flag session, or (b) an older channel server process is answering on 8788 and is stdio-connected to a dead session. See the two troubleshooting items above.
250
+
251
+ ### I want to uninstall
252
+
253
+ 1. Remove the plugin from Claude Code: `/plugin uninstall live-canvas-channel`
254
+ 2. Delete the marketplace: `/plugin marketplace remove live-canvas-marketplace`
255
+ 3. Remove the dev flag from your alias/shortcut
256
+ 4. Rerun liteagents installer in remove mode (or delete `~/.claude/skills/live-canvas/` and `~/.claude/plugins/live-canvas-marketplace/` by hand)
257
+
258
+ ---
259
+
260
+ ## Why the multi-step setup can't be hidden
261
+
262
+ The `--dangerously-load-development-channels` flag is a per-session startup argument of Claude Code itself. A running session can't promote itself to channel-enabled mid-flight; only the next session launched with the flag gets it. Same reason a skill can't silently do `/plugin install` on your behalf — the plugin system needs explicit user consent for research-preview plugins.
263
+
264
+ Until channels leave research preview and custom channels are allowlisted, step 4 is the irreducible friction. The alias removes the retyping cost.
265
+
266
+ ---
267
+
268
+ ## Pointers
269
+
270
+ - Plugin details: [`~/.claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md`](../../plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md)
271
+ - Skill flow: [`SKILL.md`](./SKILL.md)
272
+ - Design principles reference: [`DESIGN_PRINCIPLES.md`](./DESIGN_PRINCIPLES.md)
273
+ - Channels reference (upstream): <https://code.claude.com/docs/en/channels-reference>