Commit 97c40e8
feat(skills): add 6 PowerPoint skill enhancements (#1481)
# Pull Request
## Description
Adds 6 enhancements to the PowerPoint skill addressing the most common
pain points in multi-theme deck production: manual spacing validation,
hardcoded theme colors in content-extra.py, per-project theme generation
boilerplate, lack of pre-flight checks, no audio pipeline, and missing
SVG export.
### New Scripts (4)
| Script | Enhancement | Lines |
|---|---|---|
| `validate_geometry.py` | Structural validation for edge margins,
adjacent gaps, boundary overflow (including left/top), and title
clearance | ~530 |
| `generate_themes.py` | YAML-driven theme variant generation with
single-pass hex and RGBColor color remapping | ~270 |
| `embed_audio.py` | WAV audio embedding into PPTX slides with per-slide
file matching | ~220 |
| `export_svg.py` | PPTX-to-SVG export via LibreOffice PDF conversion
and PyMuPDF rendering | ~250 |
### Modified Files (4)
| File | Change |
|---|---|
| `build_deck.py` | `--dry-run` pre-flight validation, `--verbose` flag,
`configure_logging()`, per-slide theme color lookup via
`themes[].slides` |
| `Invoke-PptxPipeline.ps1` | Wired geometric validation as Step 2b in
the existing Validate action |
| `SKILL.md` | CLI docs for dry-run, theme generation, audio embedding,
SVG export; updated script architecture table |
| `pptx.instructions.md` | Validation pipeline intro references 3-step
pipeline; theme colors in content-extra.py section |
## Related Issue(s)
Closes #1482
## Type of Change
**Code & Documentation:**
* [x] New feature (non-breaking change adding functionality)
* [x] Documentation update
**AI Artifacts:**
* [x] Reviewed contribution with `prompt-builder` agent and addressed
all feedback (N/A — scripts and wrappers are the primary deliverables;
instructions and SKILL.md updates follow established patterns verified
by automated validation)
* [x] Copilot instructions (`.github/instructions/*.instructions.md`)
* [x] Copilot skill (`.github/skills/*/SKILL.md`)
**Other:**
* [x] Script/automation (`.ps1`, `.sh`, `.py`)
## Testing
- 4 new test files: `test_validate_geometry.py` (37 tests),
`test_generate_themes.py` (20 tests), `test_embed_audio.py` (18 tests),
`test_export_svg.py` (11 tests)
- Full suite: **757 tests pass, 89.26% coverage** (above 85% threshold)
- ruff check and ruff format clean on all files
- All 4 new Python scripts pass AST parsing validation
- Geometric validation integrates into existing Validate pipeline (exit
code 1 for warnings, 2 for errors)
- `--dry-run` validates YAML parsing, speaker notes, content-extra.py
AST, and image refs without building
- Single-pass color remapping in both `remap_hex_in_text` and
`remap_rgb_in_python` prevents chain remapping
- Per-slide theme color lookup uses `themes[].slides` list with
`themes[0]` fallback; shallow-copies style dict
## Sample Prompts
### User Request
> "Build my presentation from the content directory, but first validate
the geometry and generate theme variants for the blue and green
palettes."
### Execution Flow
1. Agent reads `SKILL.md` to discover available scripts and their CLI
flags.
2. Runs `python scripts/build_deck.py --content-dir content/ --style
content/global/style.yaml --dry-run` to pre-flight validate content
YAML, speaker notes, and image references.
3. Runs `python scripts/generate_themes.py --content-dir content/
--themes themes.yaml --output-dir ../` to produce themed content
directory copies with remapped colors.
4. Runs `python scripts/build_deck.py --content-dir content/ --style
content/global/style.yaml --output presentation.pptx` to build the deck.
5. Runs `python scripts/validate_geometry.py --input presentation.pptx
--report report.md` to check margins, gaps, and overflow.
6. Optionally runs `python scripts/embed_audio.py --input
presentation.pptx --audio-dir voice-over/` to embed narration audio.
7. Optionally runs `python scripts/export_svg.py --input
presentation.pptx --output-dir svg/` to export slides as SVG.
### Output Artifacts
* `presentation.pptx` — Built deck with themed colors applied.
* `content-blue/`, `content-green/` — Generated theme variant content
directories.
* `geometry-validation-report.md` — Markdown report of margin, gap, and
overflow findings.
* `geometry-validation-results.json` — Machine-readable validation
results.
* `voice-over/*.wav` → embedded into PPTX slides (when audio pipeline is
used).
* `svg/slide-001.svg`, `svg/slide-002.svg`, ... — Exported SVG images.
### Success Indicators
* `--dry-run` exits with code 0 and reports no errors.
* `validate_geometry.py` exits with code 0 (clean) or 1 (warnings only,
no errors).
* Theme variant directories contain remapped hex colors in YAML and
`RGBColor()` calls in Python.
* Embedded audio plays automatically in PowerPoint's video export
workflow.
* SVG files render correctly when opened in a browser.
## Checklist
### Required Checks
* [x] Documentation is updated (if applicable)
* [x] Files follow existing naming conventions
* [x] Changes are backwards compatible (if applicable)
* [x] Tests added for new functionality (if applicable)
### AI Artifact Contributions
* [x] Used `/prompt-analyze` to review contribution (N/A — instructions
and SKILL.md updates are additive documentation of new CLI scripts;
patterns match existing validated sections)
* [x] Addressed all feedback from `prompt-builder` review (N/A — see
above)
* [x] Verified contribution follows common standards and type-specific
requirements
### Required Automated Checks
* [x] Markdown linting: `npm run lint:md`
* [x] Spell checking: `npm run spell-check`
* [x] Frontmatter validation: `npm run lint:frontmatter`
* [x] Skill structure validation: `npm run validate:skills`
* [x] Link validation: `npm run lint:md-links`
* [x] PowerShell analysis: `npm run lint:ps`
* [x] Plugin freshness: `npm run plugin:generate`
* [x] Docusaurus tests: `npm run docs:test`
## Security Considerations
* [x] This PR does not contain any sensitive or NDA information
* [x] Any new dependencies have been reviewed for security issues
* [x] Security-related scripts follow the principle of least privilege
## Additional Notes
Enhancement priority ranking derived from pain points during multi-theme
deck production:
| # | Enhancement | Priority |
|---|---|---|
| 4 | Structural/geometric validation | High |
| 5 | Color palette in content-extra.py style dict | High |
| 2 | Theme variant generation action | Medium |
| 6 | `--dry-run` pre-flight check | Medium |
| 3 | Audio embedding action | Medium |
| 1 | SVG export pipeline | Low |
---------
Co-authored-by: auyidi <auyidi@microsoft.com>1 parent 84e47f0 commit 97c40e8
23 files changed
Lines changed: 3607 additions & 17 deletions
File tree
- .github
- instructions/experimental
- skills/experimental/powerpoint
- scripts
- tests
- corpus
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
407 | 471 | | |
408 | 472 | | |
409 | 473 | | |
| |||
419 | 483 | | |
420 | 484 | | |
421 | 485 | | |
| 486 | + | |
422 | 487 | | |
423 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
424 | 492 | | |
425 | 493 | | |
426 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
Lines changed: 87 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
Lines changed: 86 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments