Skip to content

Split presentation.json into per-slide files and enable parallel slide generation #57

@ShotaroKataoka

Description

@ShotaroKataoka

Problem

Slide generation is sequential — each slide takes 1+ minute, so a 10-slide deck takes 10+ minutes. This is unacceptable for the Web UI experience. Additionally, the single presentation.json file containing all slides creates write conflicts when multiple agents work in parallel.

Proposal

1. Per-slide file splitting

Replace the monolithic presentation.json with a split structure:

decks/{deckId}/
deck.json # metadata only (template, fonts, defaultTextColor)
slides/{slug}.json # one file per slide
specs/outline.md # slug-based ordering

  • deck.json is created in Phase 1 (art direction) and read-only in Phase 2
  • Each slides/{slug}.json contains exactly one slide definition
  • Slide ordering is determined by line order in outline.md
  • presentation.json remains supported for backward compatibility in Layer 1

2. Outline slug format

Change outline format from numbered labels to slugs:

markdown

Before

  • [1: Title] Audience knows the topic and speaker
  • [2: Current state] Audience sees the problem

After

  • [title] Audience knows the topic and speaker
  • [current-state] Audience sees the problem

Slugs map directly to filenames (slides/{slug}.json). Inserting a slide — even at the front of a 50-slide deck — requires only adding one line to outline.md. No file renaming needed.

3. Agent separation (SPEC agent + Composer agent)

Split the single agent into:

  • SPEC agent (Phase 1): briefing → outline → art direction. Owns user dialogue.
  • Composer agent (Phase 2+3): compose + review. Stateless — reads deck.json + assigned slides + specs on each invocation.

Uses Strands Agents SDK "Agents as Tools" pattern (@tool decorator).

4. Parallel slide generation

Multiple composer agents run concurrently via asyncio.gather, each writing only its assigned slides/{slug}.json files. No write conflicts since files don't overlap.

Expected improvement: 10+ minutes → 1-2 minutes for a 10-slide deck.

Scope

Changes:

  • Layer 1 (Engine): _resolve_config supports directory input (deck.json + slides/*.json)
  • Layer 3 (MCP Server): Storage, generate, sandbox, init adapted to split structure
  • Layer 4 (Agent): Agent separation + parallel composer
  • Web UI: outlineParser.ts updated for slug format
  • Workflows: outline and art-direction workflows updated

No changes to:

  • MCP tool interfaces (agent-facing API stays the same)
  • Layer 2 (Local MCP Server) — future follow-up

Implementation phases

  1. Phase C — File splitting + serial composer agent (validate the architecture)
  2. Phase B — Parallel composer agents (deliver the speed improvement)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions