slidemind 0.1.3 → 0.1.5
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/CLAUDE.md +31 -19
- package/README.md +31 -6
- package/bin/slidemind.mjs +442 -18
- package/package.json +2 -6
- package/skills/create-slides/SKILL.md +14 -8
- package/skills/search/SKILL.md +75 -0
- package/src/bridge/build-and-push.mjs +178 -34
- package/src/bridge/bundle.mjs +325 -99
- package/src/bridge/capture.mjs +187 -0
- package/src/bridge/client.mjs +719 -46
- package/src/builders/build.mjs +75 -26
- package/src/builders/lint.mjs +112 -0
- package/src/builders/resolve-skill.mjs +16 -21
- package/src/builders/review-overlay.js +821 -0
- package/src/builders/review.mjs +388 -0
- package/src/lib/reused-slides.mjs +67 -0
- package/src/lib/slide-order.mjs +4 -1
- package/src/mcp/server.mjs +375 -28
- package/src/builders/lint-slides.mjs +0 -796
- package/src/builders/primitives.json +0 -19
package/CLAUDE.md
CHANGED
|
@@ -64,26 +64,30 @@ slidemind/
|
|
|
64
64
|
├── .claude-plugin/
|
|
65
65
|
│ └── plugin.json Claude Code plugin manifest
|
|
66
66
|
├── bin/
|
|
67
|
-
│ └── slidemind.mjs CLI dispatcher (presentations, download-bundle, init, build, build-pptx, push, search, install, pair/whoami/use/logout)
|
|
67
|
+
│ └── slidemind.mjs CLI dispatcher (presentations, download-bundle, init, build, build-pptx, push, ls engines, search, insert-slide, add-slide, install, pair/whoami/use/logout)
|
|
68
68
|
├── skills/ canonical, installable skill payload — thin CLI workflow glue only
|
|
69
|
-
│
|
|
70
|
-
│
|
|
71
|
-
│
|
|
72
|
-
│
|
|
69
|
+
│ ├── create-slides/
|
|
70
|
+
│ │ └── SKILL.md authoring skill: host gate + intake/plan + create flow + CLI⇄in-app command map.
|
|
71
|
+
│ │ Brand AND the authoring workflow craft (create/edit/composition/layouts/
|
|
72
|
+
│ │ authoring/build-export) are READ from the materialized bundle — owned by the add-in.
|
|
73
|
+
│ └── search/
|
|
74
|
+
│ └── SKILL.md engine-search + slide-reuse skill (installs as slidemind-search): host gate +
|
|
75
|
+
│ discover → search → pick → reuse loop + CLI⇄in-app command map. The craft is READ
|
|
76
|
+
│ from the bundle's workflow/search.md — owned by the add-in.
|
|
73
77
|
├── src/ implementation of the slidemind CLI
|
|
74
|
-
│ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render)
|
|
75
|
-
│ ├── builders/ build.mjs (HTML preview), resolve-skill.mjs (→ bundle),
|
|
76
|
-
│ ├── mcp/ MCP server: list/push +
|
|
78
|
+
│ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render; native-slide splicing)
|
|
79
|
+
│ ├── builders/ build.mjs (HTML preview), review.mjs (spatial preview-review gate + local server), resolve-skill.mjs (→ bundle), lint.mjs (runs the add-in's engine)
|
|
80
|
+
│ ├── mcp/ MCP server: list/push + list_engines/search_engine/view_slide/insert_slide/add_slide_to_deck/download_result
|
|
77
81
|
│ └── installers/ per-harness installers: claude.mjs, codex.mjs, opencode.mjs, lib.mjs
|
|
78
82
|
├── archive/ retired code/assets (local exporter, icon library, brand design files) — NOT shipped
|
|
79
83
|
├── decks/ the user's working decks; sources are slides/*.jsx, design via .bundle-ref.json
|
|
80
84
|
├── docs/slidemind-cli-connect/ the connect architecture (bridge contract, bundle, engine, phasing)
|
|
81
|
-
└── test/ node:test suites (bridge client/bundle/build-and-push/resolve-skill/lint/packaging)
|
|
85
|
+
└── test/ node:test suites (bridge client/bundle/build-and-push/resolve-skill/lint-wrapper/packaging/engine-search/native-slides/cli-dispatch/mcp-server)
|
|
82
86
|
```
|
|
83
87
|
|
|
84
|
-
The
|
|
88
|
+
The skills at the **root** of `skills/` are deliberate: that's the layout Claude Code, Codex (0.128+), and opencode all expect for skill auto-discovery — `<harness-root>/skills/<name>/SKILL.md`. There are **two** skills, each auto-discovered by `listSkills()` (no installer change to add one): `create-slides` (installs as `slidemind-create-slides`) owns the user-facing plan / create / edit / render workflow, and `search` (installs as `slidemind-search`) owns engine discovery + slide reuse (search → insert live / fold into a deck). Both are **brand-agnostic** — every brand rule lives in the per-CD bundle's `design.md` / `workflow/*.md`, which the skills point the agent at. (Pre-skills opencode versions used an `agent/` shim under `~/.config/opencode/`; the installer removes any leftover from those installs on every run.)
|
|
85
89
|
|
|
86
|
-
We **do not** ship separate slash commands. Earlier versions had a top-level `commands/` directory that became `/slidemind:plan` etc. on Claude Code and `~/.codex/prompts/slidemind-*.md` on Codex. The Codex prompts mechanism is broken in 0.117+ ([openai/codex#15941](https://github.com/openai/codex/issues/15941)) and officially deprecated in favour of skills, so we collapsed everything into the skill itself. Re-running `slidemind init` actively wipes legacy command/prompt entries on every harness.
|
|
90
|
+
We **do not** ship separate slash commands. Earlier versions had a top-level `commands/` directory that became `/slidemind:plan` etc. on Claude Code and `~/.codex/prompts/slidemind-*.md` on Codex. The Codex prompts mechanism is broken in 0.117+ ([openai/codex#15941](https://github.com/openai/codex/issues/15941)) and officially deprecated in favour of skills, so we collapsed everything into the skill itself. Re-running `slidemind init` actively wipes legacy command/prompt entries on every harness, and clears the materialized bundle cache (`bundleCacheRoot()`) so the next `build`/`push`/`download-bundle` re-fetches every design bundle fresh from the add-in.
|
|
87
91
|
|
|
88
92
|
## CLI surface
|
|
89
93
|
|
|
@@ -92,22 +96,26 @@ slidemind presentations # list PowerPoint windows registered with the
|
|
|
92
96
|
slidemind download-bundle [deck] # materialize the active corporate design's bundle locally
|
|
93
97
|
slidemind new <name> # scaffold ./decks/<name>/
|
|
94
98
|
slidemind build <deck> # build self-contained HTML preview
|
|
99
|
+
slidemind review <deck> # spatial preview-review gate; blocks for approve/comments (host-free)
|
|
95
100
|
slidemind build-pptx <deck> # render native .pptx via the add-in (HOST REQUIRED)
|
|
96
101
|
slidemind push <deck> # render + push slides into a running PowerPoint (HOST REQUIRED)
|
|
97
|
-
slidemind
|
|
102
|
+
slidemind ls engines # list the live engine catalog (image + slide; --type/--subtype) (HOST REQUIRED)
|
|
103
|
+
slidemind search "<query>" # search an engine for imagery or slides (--engine/--intent/--top) (HOST REQUIRED)
|
|
104
|
+
slidemind insert-slide [opts] # reuse found slide(s) live into a window (--search/--pick/--to/--at) (HOST REQUIRED)
|
|
105
|
+
slidemind add-slide [opts] # fold found slide(s) into a deck as native .pptx (--search/--pick/--deck/--to/--at) (HOST REQUIRED)
|
|
98
106
|
slidemind pair <code> # pair with an add-in environment (copy from its "Connect CLI")
|
|
99
107
|
slidemind whoami # list every paired environment (* = default)
|
|
100
108
|
slidemind use <url|env> # set the default environment
|
|
101
109
|
slidemind logout [url|env] # unpair one environment (--all unpairs every one)
|
|
102
|
-
slidemind init --for <target> # install skill into claude | codex | opencode | all
|
|
103
|
-
slidemind uninstall --for <target>
|
|
110
|
+
slidemind init --for <target> # install skill into claude | codex | opencode | all (also clears the bundle cache)
|
|
111
|
+
slidemind uninstall --for <target> # remove skill + MCP server (also clears the bundle cache)
|
|
104
112
|
```
|
|
105
113
|
|
|
106
114
|
`<deck>` resolves as: absolute path → `./<arg>` if it exists → `./decks/<arg>`. The decks directory is `./decks/` by default; override with `SLIDEMIND_DECKS=/abs/path`.
|
|
107
115
|
|
|
108
116
|
**Multi-environment pairing.** The CLI stores one session **per backend** (`~/.config/slidemind/session.json`, v2 `{version, sessions[], default}`; the legacy single-record v1 shape is migrated on read). Pair once per environment (local / dev / prod) and every command **fans out** across all paired backends, tags each open window with its `env`, and **routes by the presentation's origin backend** automatically — no manual switching. Scope a command to one backend with `--backend <url|env>` (or `SLIDEMIND_BACKEND`). This is a developer convenience; a normal user pairs exactly one. See the memory note *CLI↔add-in: cloud relay + pairing*.
|
|
109
117
|
|
|
110
|
-
**The design truth lives in the add-in, not the CLI.** The `.pptx` is rendered server-side over the local bridge (no local exporter), the corporate design is fetched as a bundle,
|
|
118
|
+
**The design truth lives in the add-in, not the CLI.** The `.pptx` is rendered server-side over the local bridge (no local exporter), the corporate design is fetched as a bundle, brand imagery comes from the add-in's engine, and slide reuse (extract / insert / splice) executes in the add-in too. So `create`/`build-pptx`/`push`/`ls engines`/`search`/`insert-slide`/`add-slide` all hard-require an **open PowerPoint host with the slidemind add-in and an active corporate design**. The engine-search + slide-reuse wire contract is in `docs/slidemind-cli-connect/11-engine-search-slide-reuse.md`; see `docs/slidemind-cli-connect/` for the rest.
|
|
111
119
|
|
|
112
120
|
## Design system ground rules
|
|
113
121
|
|
|
@@ -118,7 +126,7 @@ The corporate design is **served by the add-in, not shipped by the CLI.** `slide
|
|
|
118
126
|
- `layouts/*.jsx` + `layouts/layouts.css` — the closed layout palette to compose against.
|
|
119
127
|
- `assets/`, `engines.json` — brand assets and the searchable image/icon engines.
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
Both skills are **brand-agnostic workflow guidance** and must not duplicate any brand rule — `scripts/check-skill-parity.mjs` (`npm run lint:parity`) scans **every** `skills/<name>/SKILL.md` and fails the build if a hardcoded color, design token, or layout name leaks into any skill doc.
|
|
122
130
|
|
|
123
131
|
## Sanity rules when editing slides
|
|
124
132
|
|
|
@@ -134,10 +142,14 @@ The skill is **brand-agnostic workflow guidance** and must not duplicate any bra
|
|
|
134
142
|
slidemind download-bundle <deck> # materialize the corporate design locally (do this first)
|
|
135
143
|
slidemind build <deck> # HTML preview (reads the materialized bundle)
|
|
136
144
|
slidemind build <deck> --open # HTML + open in browser
|
|
145
|
+
slidemind review <deck> # spatial preview-review gate; blocks until approve/comments (host-free)
|
|
137
146
|
slidemind build-pptx <deck> # native PPTX rendered server-side via the add-in (host required)
|
|
138
147
|
slidemind push <deck> # render + push into a running PowerPoint (host required)
|
|
139
|
-
slidemind
|
|
140
|
-
|
|
148
|
+
slidemind ls engines # list the live engine catalog (image + slide) (host required)
|
|
149
|
+
slidemind search "<query>" # search an engine for imagery or slides (host required)
|
|
150
|
+
slidemind insert-slide [opts] # reuse found slide(s) live into a window (host required)
|
|
151
|
+
slidemind add-slide [opts] # fold found slide(s) into a deck as native .pptx (host required)
|
|
152
|
+
npm run lint:parity # assert EVERY skill (create-slides + search) carries no brand rules (CI guard)
|
|
141
153
|
```
|
|
142
154
|
|
|
143
|
-
No linter beyond the parity guard, `node --test` for the suite, no package manager beyond npm itself. CI (`.github/workflows/test.yml`) runs the suite + parity guard on Linux, **Windows**, and macOS (Node 18 + 22) — the CLI promises native-Windows support, so keep it green there. The HTML preview is self-contained except for React + Babel-standalone pulled from a CDN on first load.
|
|
155
|
+
No linter beyond the parity guard, `node --test` for the suite, no package manager beyond npm itself. Slide-JSX lint in `slidemind build` runs the **add-in's** capability-table engine, materialized into the bundle cache as `lint-engine.mjs` (+ `primitives.json`) and dynamic-imported by `src/builders/lint.mjs` — this repo owns no lint rules; they update on the next bundle fetch. CI (`.github/workflows/test.yml`) runs the suite + parity guard on Linux, **Windows**, and macOS (Node 18 + 22) — the CLI promises native-Windows support, so keep it green there. The HTML preview is self-contained except for React + Babel-standalone pulled from a CDN on first load.
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Both drive the same add-in bridge, so an agent and a human end up producing the
|
|
|
49
49
|
|
|
50
50
|
The CLI reaches PowerPoint through the add-in's **cloud relay** (no localhost, no certificates). Because of that, the machine running the CLI **does not have to be the same machine running PowerPoint** — pair once and commands route to wherever your add-in is registered.
|
|
51
51
|
|
|
52
|
-
Commands that read the design, render, or
|
|
52
|
+
Commands that read the design, render, push, or reach an engine (`download-bundle`, `build-pptx`, `push`, `ls engines`, `search`, `insert-slide`, `add-slide`) **require an open PowerPoint host with the add-in and an active corporate design.** Only `new`, `build`, and `review` (HTML preview) work fully offline.
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
@@ -70,6 +70,8 @@ slidemind --version
|
|
|
70
70
|
|
|
71
71
|
`slidemind init --for <claude|codex|opencode|all|none>` scopes the harness deployment. Use `none` to install the CLI only.
|
|
72
72
|
|
|
73
|
+
> **Heads-up — first install downloads a headless Chrome.** slidemind renders decks by capturing slides with a local headless browser (then assembling the `.pptx` server-side), so `npm install -g slidemind` pulls a pinned Chromium (~150–300 MB) via `puppeteer`'s postinstall. Behind a corporate proxy/firewall this download can fail; set `HTTPS_PROXY` (and, if needed, `PUPPETEER_DOWNLOAD_BASE_URL`) so npm can reach it, or point `PUPPETEER_EXECUTABLE_PATH` at an existing Chrome/Edge. The browser lives in puppeteer's own cache, not the slidemind package.
|
|
74
|
+
|
|
73
75
|
### Windows
|
|
74
76
|
|
|
75
77
|
slidemind runs on native Windows (PowerShell, Windows Terminal, or cmd) — no WSL or Git Bash required.
|
|
@@ -153,9 +155,13 @@ slidemind logout # unpair this machine
|
|
|
153
155
|
```bash
|
|
154
156
|
slidemind new my-deck # scaffold ./decks/my-deck/
|
|
155
157
|
slidemind build my-deck # build a self-contained HTML preview (offline)
|
|
158
|
+
slidemind review my-deck # spatial preview review: leave comments / approve in the browser (offline)
|
|
156
159
|
slidemind build-pptx my-deck # render a native .pptx via the add-in (host required)
|
|
157
160
|
slidemind push my-deck # stream slides straight into an open PowerPoint (host required)
|
|
158
|
-
slidemind
|
|
161
|
+
slidemind ls engines # list the active design's image + slide engines (host required)
|
|
162
|
+
slidemind search "shield" # search an engine for imagery or slides (host required)
|
|
163
|
+
slidemind insert-slide ... # reuse a found slide live into an open PowerPoint (host required)
|
|
164
|
+
slidemind add-slide ... # fold a found slide into a deck as a native .pptx (host required)
|
|
159
165
|
```
|
|
160
166
|
|
|
161
167
|
Decks live under `./decks/` in your current working directory — one folder per deck: `decks/<name>/slides/*.jsx`. Override the location with `SLIDEMIND_DECKS=/abs/path`.
|
|
@@ -172,7 +178,9 @@ You don't hand-write OOXML or hardcode brand colors — slides are small `.jsx`
|
|
|
172
178
|
|
|
173
179
|
Your agent (Claude Code, Codex, or opencode) auto-discovers the `slidemind-create-slides` skill, reads the active corporate design's rules from the add-in, writes the slide files, and renders + pushes them into PowerPoint for you. The skill owns the whole **plan → create → edit → render** workflow — there are no slash commands to memorize.
|
|
174
180
|
|
|
175
|
-
|
|
181
|
+
A second skill, `slidemind-search`, owns engine discovery and **slide reuse**: ask "is there a slide on X in our library?" or "drop in our pricing slide" and the agent searches the brand's image/slide engines, then either inserts a found slide live into PowerPoint or folds it into a deck as a native `.pptx`.
|
|
182
|
+
|
|
183
|
+
The MCP server registered by `slidemind init` gives the agent direct tools to list open presentations, push decks, list engines, search for imagery or slides, view a result, insert a slide live, fold a slide into a deck, and download brand imagery.
|
|
176
184
|
|
|
177
185
|
---
|
|
178
186
|
|
|
@@ -181,17 +189,24 @@ The MCP server registered by `slidemind init` gives the agent direct tools to li
|
|
|
181
189
|
```text
|
|
182
190
|
slidemind new <name> Scaffold ./decks/<name>/
|
|
183
191
|
slidemind build <deck> Build a self-contained HTML preview (offline)
|
|
192
|
+
slidemind review <deck> Spatial preview review; blocks for approve/comments (offline)
|
|
184
193
|
slidemind build-pptx <deck> Render a native .pptx via the add-in (host required)
|
|
185
194
|
slidemind push <deck> Build + push slides into an open PowerPoint (host required)
|
|
186
|
-
slidemind
|
|
195
|
+
slidemind ls engines List the live engine catalog (image + slide) (host required)
|
|
196
|
+
slidemind search "<query>" Search an engine for imagery or slides (host required)
|
|
197
|
+
--engine <id> --intent auto|content|visual --top <N>
|
|
198
|
+
slidemind insert-slide [opts] Insert reused slide results live into a window (host required)
|
|
199
|
+
--search <id> --pick <n[,n,...]> --to <presId> [--at <N>]
|
|
200
|
+
slidemind add-slide [opts] Fold reused slide results into a deck as native .pptx (host required)
|
|
201
|
+
--search <id> --pick <n[,n,...]> --deck <deck> [--to <presId>] [--at <N>]
|
|
187
202
|
slidemind download-bundle [deck] Materialize the active corporate design locally (host required)
|
|
188
203
|
slidemind presentations List PowerPoint windows registered with the add-in
|
|
189
204
|
slidemind pair <code> Pair with an add-in (copy the code from "Connect CLI")
|
|
190
205
|
slidemind whoami Show paired environment(s)
|
|
191
206
|
slidemind use <url|env> Set the default environment
|
|
192
207
|
slidemind logout [url|env] Unpair an environment (--all unpairs every one)
|
|
193
|
-
slidemind init --for <target> Install the skill + MCP server into a harness
|
|
194
|
-
slidemind uninstall --for <t> Remove a previously-installed skill
|
|
208
|
+
slidemind init --for <target> Install the skill + MCP server into a harness (clears the bundle cache)
|
|
209
|
+
slidemind uninstall --for <t> Remove a previously-installed skill (clears the bundle cache)
|
|
195
210
|
slidemind update [--for <t>] Fetch the latest release and redeploy
|
|
196
211
|
slidemind --help Full usage
|
|
197
212
|
slidemind --version Print version
|
|
@@ -207,6 +222,16 @@ slidemind --version Print version
|
|
|
207
222
|
| `slidemind build-pptx <deck>` | `decks/<deck>/<deck>.pptx` | An editable native PowerPoint file |
|
|
208
223
|
| `slidemind push <deck>` | (streamed via the add-in) | Live insertion into an open PowerPoint window |
|
|
209
224
|
|
|
225
|
+
### Reviewing before you export
|
|
226
|
+
|
|
227
|
+
`slidemind review <deck>` opens the HTML preview in your browser with a comment overlay and **waits** until you decide:
|
|
228
|
+
|
|
229
|
+
- **Click any element** on a slide to leave a comment pinned to that spot. Each comment is anchored to the exact slide source (`slides/<file>.jsx:line:col`), so your agent knows precisely what to change.
|
|
230
|
+
- **Approve & continue** when it looks right — the command unblocks and your agent proceeds to the export you asked for (`push` / `build-pptx`).
|
|
231
|
+
- **Send comments** to hand your notes back to the agent; it edits the cited files and re-runs `review`, where your previous notes appear as faded "ghost" pins so you can confirm each was addressed.
|
|
232
|
+
|
|
233
|
+
It runs entirely offline (no open PowerPoint needed) — review happens *before* the native render. There's no copy-paste: the moment you approve or send comments in the browser, your coding agent picks up where it left off.
|
|
234
|
+
|
|
210
235
|
---
|
|
211
236
|
|
|
212
237
|
## Pushing slides into an open PowerPoint
|