Skip to content

feat(slides): attach the slide design persona to the slides tool set#543

Draft
Denis Fadeev (fadeev) wants to merge 20 commits into
feat/app-gen-tool-improvementsfrom
feat/slide-persona-tool-set
Draft

feat(slides): attach the slide design persona to the slides tool set#543
Denis Fadeev (fadeev) wants to merge 20 commits into
feat/app-gen-tool-improvementsfrom
feat/slide-persona-tool-set

Conversation

@fadeev

Copy link
Copy Markdown
Collaborator

Summary

Makes the slide design persona ride in with semantic tool selection the same way the App Builder prompt does. When the slides tool set activates (e.g. an implicit "make a deck about X"), its design guidance — layout catalog, palettes, font presets — is now appended to the conversation, not just the slide tools. Closes the asymmetry where app-generation attached APP_BUILDER_PROMPT but the slides set attached nothing.

The slide persona builder lived in slides/index.ts, which reaches @babel/parser via ./jsx, so the lib tool-set layer couldn't import it without bundling the heavy slide runtime. Rather than snapshot the prompt (drift risk, two sources of truth), this mirrors the existing appBuilderPrompt.ts extraction:

  • FontPreset + FONT_PRESETS moved into the dependency-free fonts.ts.
  • buildSlideSystemPrompt extracted into a new dependency-free slides/slidePrompt.ts, which exports SLIDE_BUILDER_PROMPT — the default-options instance, computed at load from the live design-system / palette / font catalogs (dynamic; no generated artifact, no drift).
  • serverTools.ts imports SLIDE_BUILDER_PROMPT via the babel-free path and sets it as the slides tool set's systemPrompt — same field, same toolSetSystemPrompts collection, same additive role:system injection as app-generation.
  • index.ts re-exports both for back-compat; its now-unused builder imports were trimmed.

The load-bearing guarantee holds structurally: slidePrompt.ts only reaches fonts / designSystem / palettes, all zero-import, so no @babel edge enters the lib bundle.

Built on the feat/app-gen-tool-improvements tool-set systemPrompt machinery (ToolSet.systemPrompt, toolSetSystemPrompts, computeToolGuidance, the toolGuidance injection) — which isn't on main yet. This PR therefore targets feat/app-gen-tool-improvements, not main; retarget/rebase onto main once that lands.

Gates: pnpm test (1280 passed), pnpm check (0 errors), pnpm build all green. The slides tool-set test was inverted to assert ["plan_deck"] now yields SLIDE_BUILDER_PROMPT.

Integration

None required. The implicit slide path picks up the persona automatically through the existing toolSetSystemPrompts machinery. SLIDE_BUILDER_PROMPT is newly exported from @anuma/sdk/tools if a host wants the default-options string directly. Optional later cleanup on the consumer: drop the detectSlideDeckIntent regex heuristic now that the semantic path carries the persona.

Breaking Changes

None. Additive systemPrompt field on the slides tool set plus a new SLIDE_BUILDER_PROMPT export; buildSlideSystemPrompt, FONT_PRESETS, FontPreset, and createSlideTools keep their exports and signatures.

skosito (skosito) and others added 20 commits May 29, 2026 08:23
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Make the slide persona ride in with semantic tool selection the same way the
App Builder prompt does. When the slides tool set activates (e.g. an implicit
"make a deck about X"), its design guidance — layout catalog, palettes, font
presets — is now appended to the conversation, not just the slide tools. This
closes the asymmetry where app-generation attached APP_BUILDER_PROMPT but
slides attached nothing.

The slide persona builder lived in slides/index.ts, which reaches @babel/parser
via ./jsx, so the lib tool-set layer couldn't import it without bundling the
heavy slide runtime. Mirror the appBuilderPrompt.ts extraction instead of
snapshotting (zero drift, fully sync, no public API break):

- Move FontPreset + FONT_PRESETS into the dependency-free fonts.ts.
- Extract buildSlideSystemPrompt into a new dependency-free slides/slidePrompt.ts
  and export SLIDE_BUILDER_PROMPT — the default-options instance, computed at
  load from the live design-system/palette/font catalogs, so editing those
  flows through automatically with no generated artifact.
- serverTools.ts imports SLIDE_BUILDER_PROMPT via the babel-free path and sets
  it as the slides tool set's systemPrompt — same field/collection/injection as
  app-generation.
- index.ts re-exports both for back-compat; trim its now-unused builder imports.

Same mechanism end to end; collected by toolSetSystemPrompts. No consumer
change required — the implicit slide path picks up the persona automatically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…#537)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… shape (#555)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… loops (#528)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants