Build MagicSlides

KINDAreplaces $29/mosaves $348/yrback to the verdict

0%0 of 17 items done

Saved on this device only. Tick prerequisites first, then work the phases in order · do not start one until the checks above it pass.

A deck generator whose two real problems are that a model asked to summarise will produce confident claims the source never made, and that generating a genuine presentation file means writing a format whose text layout is computed by the renderer rather than by you.

estimated effort multi-daythe files for this build are in the project pack

ExtractionSource parsing into a numbered block sequenceGenerationStructured output with a required citation per bulletLayoutTemplates with measured text fittingOutputA real editable presentation file, not imagesRuntimePython 3.12

Before step 1

Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.

  1. installfree

    Why Runs extraction, generation and file writing.

    Get it python.org or your package manager, then a virtual environment.

    Verify python3 --version prints 3.12 or higher

  2. installfree

    Why Writing the format by hand means implementing a specification whose text layout is computed by the renderer, which is the trap this build is about.

    Get it A maintained library for the presentation format, and a real presentation application to open the output in.

    Verify A trivial generated file opens without warnings in a real application

  3. installfree locally; per-token if hosted

    Why Every bullet must carry a citation, and a model that returns prose instead of structure makes validation impossible.

    Get it Local or hosted, tested for whether it returns valid structured output ten times in a row for this task.

    Verify Ten generations produce parseable structured output with citations

  4. have readyfree

    Why Extraction breaks on the things real documents contain: a heavily structured report, an article with tables, a transcript, and something long enough that later sections get ignored.

    Get it Use documents you would genuinely turn into a deck.

    Verify All four parse into blocks with heading context

  5. have readyfree

    Why Text fitting is measured against specific boxes at specific sizes, and a template whose dimensions you do not know cannot be fitted to.

    Get it Build or take a simple template and record every layout's box dimensions and fonts.

    Verify A written table gives box dimensions and font sizes per layout

Data model

Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.

- sources(id, kind, path_or_url, title, extracted_at) · kind is document, article or transcript
- blocks(id, source_id, ordinal, text, heading_path) · the numbered sequence citations refer to
- decks(id, source_id, template_id, created_at, validated)
- slides(id, deck_id, ordinal, layout, title, notes)
- bullets(id, slide_id, ordinal, text, cited_block_ids_json, verbatim)
- fit_checks(slide_id, element, measured_width, measured_height, overflowed) · because overflow is invisible until someone presents
- A bullet with no citation cannot be stored, which is enforced rather than validated afterwards.

Environment variables

These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.

VariableNeededExampleWhere the value comes from
SOURCE_DIRrequired./sourcesDocuments to turn into decks. Read only.
OUTPUT_DIRrequired./decksGenerated presentation files and provenance documents.
TEMPLATE_PATHrequired./templates/standard.pptxThe template whose box dimensions text is measured against.
MIN_FONT_SIZE_PTrequired18Below this a slide is split rather than shrunk. There is a size that is not a slide.
MAX_SLIDESrequired0Zero means as many as the source supports. A requested count is a request to invent.
REQUIRE_IMAGE_LICENCErequiredalwaysPresent as a constant so the answer is visible in configuration. There is no other value.

The build, in order

  1. The source, as numbered blocks

    A document becomes an ordered sequence you can cite into.

    1. Structure is what tells a deck what is subordinate to what.

      Files src/extract.py

    2. Both break paragraph splitting and both are common sources.

      Files src/blocks.py

    3. Citations refer to numbers. Unstable numbering makes them meaningless.

      Files src/blocks.pytests/test_stability.py

    done when · tick each as it passes
    watch out
    • Flattening a document to plain text loses the heading hierarchy, and without it a generated deck has no idea which points were subordinate to which, so it produces a flat list of facts in the order they happened to appear. Keep the heading path with every block.
  2. Bullets that came from the document

    Every line on every slide traces to a block in the source.

    1. A pure function over the block set, unit tested with a bad citation.

      Files src/generate.pytests/test_citations.py

    2. A deck with one invented slide silently removed is still untrustworthy.

      Files src/generate.py

    3. Fewer slides is the correct answer when the source is short.

      Files src/generate.py

    done when · tick each as it passes
    watch out
    • A model asked to make a document into a presentation will produce the summary slide it thinks a deck needs, including figures and conclusions the document never contained, and those slides are the most confident-looking ones in the deck. Require a citation per bullet, validate it, and reject rather than dropping the offending line, since a partially invented deck is worse than none.
  3. Text that fits on the slide

    No slide overflows its box when someone actually opens it.

    1. At the template's font and size. Autofit is an instruction, not a layout.

      Files src/fit.py

    2. There is a size below which a slide is not a slide.

      Files src/fit.py

    3. So an overflow found later can be traced to what was measured.

      Files src/fit_checks.py

    done when · tick each as it passes
    watch out
    • The presentation format stores an instruction to autofit rather than the resulting layout, so the file looks correct to your code and overflows or shrinks to an unreadable size when opened in the actual application. Measure the text yourself against the box, and treat overflow as a generation problem rather than a rendering one.
  4. A file people can edit

    The output opens as a real, editable deck in the application people use.

    1. Editable. Images are a picture of a deck, not a deck.

      Files src/write_pptx.py

    2. Where they are available to the presenter and out of the audience's way.

      Files src/notes.py

    3. Absolute positioning everything breaks the moment someone edits a slide.

      Files src/template.py

    done when · tick each as it passes
    watch out
    • Generating slides as images guarantees they look exactly as intended and makes them completely uneditable, which is the first thing every user needs to do. Write real text elements, and accept that they will render slightly differently in different applications.
what this build does not replace
after v1, if you want it

Need the files? The project pack on the verdict page hands your agent the whole brief · more presentations.