feat(creative): add deck_builder skill for deterministic PPTX assembly (#276) - #331
Conversation
|
Thanks for the thorough work on this @tusharjamunkar The multi-action design, JSON Schema validation, bundled templates, offline constitution, tests, catalog page, extras sync, and smoke demo all match what we ask for in CONTRIBUTING and the ai-native workflow. Really nice and clean job <3 This looks merge-ready after rebase onto current Rebase / merge hygiene (required)Please rebase and resolve conflicts in:
After rebase, fill the Skill history row in Agent-flow validation (new)I simulated the intended host-agent loop: NL prompt → agent drafts
Overall, any host agent with this bundle can read Small v1 improvements I'd like before merge with this PRThese are not blockers as per the original issue, but they materially help agents and I think would make this a very tight first version:
Image strategy (v1 vs v2, for awareness)For v1, we agree with the offline constitution:
For v2 (separate upgrade issue I will create after we merge this, and tag you if you wanna pick it up), we're planning bundled smart placeholders, optional image-gen behind env vars, and a separate stock-image finder skill in a chain, not in v0.1 scope. Overall this is in a very good shape, thank you for the effort. <3 |
dc977a4 to
ecdbb66
Compare
|
Thanks for the review and validation testing @rosspeili! <3 I have addressed all feedback items:
All 679 repository tests, formatting/linting ( |
Rebase onto main (CHANGELOG merge with ARPAHLS#335), fix skill history commit hash, and correct instructions typo.
ecdbb66 to
b25c80d
Compare
|
Thanks for the quick turnaround @tusharjamunkar, I took the initiative and pushed a maintainer wrap-up to your branch, rebase onto latest |
Resolves #276
Summary of Changes
Adds the creative/deck_builder skill (v0.1.0) for deterministic, offline assembly of Microsoft PowerPoint (
.pptx) presentations from structured JSON deck specifications.Actions:
validate_spec(default): Validatesdeck_specagainst strict JSON Schema and flags soft-limit warnings (e.g. text truncations, missing assets) without file I/O. Supportsstrict=trueto fail closed on warnings.render: Assembles slides, applies theme tokens, inserts normalized images/charts, writes editable.pptxto disk. Protected with path traversal checks against unauthorized directory escapes.inspect: Reads an existing.pptxpresentation and returns slide counts, titles, layout names, shape counts, and speaker notes presence.list_templates: Enumerates bundled template IDs, names, descriptions, and aspect ratios.10 Supported Slide Layout Types:
title: Cover slide with title, subtitle, optional logo/hero picture, and speaker notes.section: Section header divider.bullets: Standard bullet list with soft-limit truncation warning (BULLET_TRUNCATEDfor bullets >120 chars).two_column: Side-by-side comparison layout.image: Full or half-bleed graphic with optional title and caption.image_caption: Side-by-side graphic and detailed explanation body.quote: Stylized pull-quote and attribution.table: Tabular data grid with styled headers.chart: Native OpenXML chart (bar,line,pie) with categories and series data.blank: Clean canvas with optional speaker notes.3 Bundled 16:9 Widescreen Templates:
pitch_v1(default): Modern startup aesthetic with vibrant purple/indigo accent (#6E57E0).corporate_v1: Executive presentation with navy/slate accent (#1E3A8A).minimal_v1: Editorial monochrome aesthetic with charcoal accent (#262626).Asset & Security Hardening:
Pillow.output_pathpreventing directory traversal sequences.Packaging, Documentation & Demos:
python-pptx>=1.0.0andpillowin manifest; added import alias mapping inskillware/core/extras.py; updated optional extras viascripts/sync_extras.py.docs/skills/deck_builder.md) with Claude, OpenAI, Gemini, DeepSeek, and Ollama snippets.examples/deck_builder_demo.py) smoke-tested in CI (tests/test_examples_smoke.py).[Unreleased]entry toCHANGELOG.md.Verification
pytest skills/creative/deck_builder/test_skill.py -v(14 passed)pytest tests/skills/creative/test_deck_builder.py -v(2 passed)pytest tests/test_card_ui_schema.py -v(18 passed)pytest tests/test_registry_docs.py -v(9 passed)pytest tests/test_extras_sync.py -v(6 passed)pytest tests/test_skill_issuer.py -v(5 passed)pytest tests/test_examples_smoke.py -v(11 passed)pytest(618 passed, 4 skipped, 0 failures)python scripts/sync_extras.py --check(Optional extras sync OK)python -m black . && python -m flake8 .(100% clean)python examples/deck_builder_demo.py(verified all 4 steps offline)