Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ instance/
.env.*
!.env.template

# Optional external assets restored by pptify-plugin/download-external-assets.ps1
pptify-plugin/external/all-MiniLM-L6-v2/*
!pptify-plugin/external/all-MiniLM-L6-v2/.gitkeep
# Optional external assets restored by scripts/download-external-assets.ps1
scripts/external/all-MiniLM-L12-v2/*
!scripts/external/all-MiniLM-L12-v2/.gitkeep

# Generated scratch artifacts and external reference repos
temp/code/
Expand Down
38 changes: 21 additions & 17 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# pptify Architecture

This workspace snapshot is a PPTX plugin toolkit plus Copilot prompt assets. It does not currently contain an importable `pptify/` core renderer package or a `python -m pptify` command; lifecycle commands run through the `pptify-cli` directory entry point.
This workspace snapshot is a VS Code agent plugin for PPTX generation plus local helper tools. It does not currently contain an importable `pptify/` core renderer package or a `python -m pptify` command; lifecycle commands run through the `pptify-cli` directory entry point.

## Current Components

- `pptify-plugin/documents`: document-to-markdown and markdown-to-RAPTOR helpers.
- `pptify-plugin/design`: source-backed design context catalog loader for `pptify-design`.
- `pptify-plugin/images`: web image search, Iconify search, raster-to-SVG conversion, and OpenAI/Azure OpenAI infographic generation.
- `pptify-plugin/audit`: standalone content-region collision audit for layout-tree JSON specs.
- `pptify-plugin/extraction`: importable PPTX extraction and style-master analysis helpers.
- `pptify-core`: Agent Skills and workflow prompts used by Copilot or any generic coding agent when planning decks.
- `plugin.json`: VS Code/Copilot plugin metadata at the repository root. It declares `skills/` and `agents/` as exposed plugin component folders.
- `agents`: Custom agents discovered directly by Copilot from the plugin root.
- `skills`: Agent Skills discovered directly by Copilot from the plugin root.
- `scripts/documents`: document-to-markdown and markdown-to-RAPTOR helpers bundled as support assets for the declared skills and agents.
- `scripts/design`: source-backed design context catalog loader for `resources/design`.
- `scripts/images`: web image search, Iconify search, raster-to-SVG conversion, and OpenAI/Azure OpenAI infographic generation.
- `scripts/audit`: standalone content-region collision audit for layout-tree JSON specs.
- `scripts/extraction`: importable PPTX extraction and style-master analysis helpers.
- `pptify-cli`: Lifecycle commands for installing and uninstalling the pptify skill set into a local coding-agent home (`./.agent` by default).
- `pptify-design`: local source-backed design context packs and attribution metadata.
- `resources/design`: local source-backed design context packs and attribution metadata.

The end-to-end deck-generation workflow is consolidated into `agents/pptify-deck-builder.agent.md`; there is no separate `workflows/` directory.

## Execution Model

Plugin scripts are called directly by file path and write JSON to stdout:

```powershell
uv run python pptify-plugin/design/design_context_catalog.py --list --pretty
uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider auto --prompt "Cloud governance roadmap" --output-path infographic.png --pretty
uv run python pptify-plugin/audit/audit.py deck-spec.json --json
uv run python scripts/design/design_context_catalog.py --list --pretty
uv run python scripts/images/text_prompt_to_infographic.py --provider auto --prompt "Cloud governance roadmap" --output-path infographic.png --pretty
uv run python scripts/audit/audit.py deck-spec.json --json
```

Extraction helpers are import APIs. Because `pptify-plugin` contains a dash, load those modules with `importlib.util.spec_from_file_location(...)`.
Extraction helpers are import APIs; load those modules with `importlib.util.spec_from_file_location(...)`.

## Data Contracts

Expand All @@ -39,23 +43,23 @@ In this snapshot, that contract is planning/audit context. There is no local ren

## Image Generation Boundary

`pptify-plugin/images/text_prompt_to_infographic.py` supports `openai`, `azure-openai`, and `auto` provider selection. It deliberately has no local fallback image provider. If credentials or provider configuration are missing, or the provider returns an error, the caller should persist the failure manifest and avoid describing substitute artwork as model-generated.
`scripts/images/text_prompt_to_infographic.py` supports `openai`, `azure-openai`, and `auto` provider selection. It deliberately has no local fallback image provider. If credentials or provider configuration are missing, or the provider returns an error, the caller should persist the failure manifest and avoid describing substitute artwork as model-generated.

Provider configuration and credentials are loaded from `.env`. Create `.env` from `.env.template` when image generation is needed, fill the required values locally, and keep `.env` out of git.
Provider configuration and credentials are loaded from `.env`. Create `.env` from `resources/env.template` when image generation is needed, fill the required values locally, and keep `.env` out of git.

## Optional Assets

The MiniLM ONNX model and tokenizer are downloaded on demand and ignored by git:

- `pptify-plugin/external/all-MiniLM-L6-v2/*`
- `scripts/external/all-MiniLM-L12-v2/*`

Restore with:

```powershell
.\pptify-plugin\download-external-assets.ps1
.\scripts\download-external-assets.ps1
```

`document_to_raptor_tree.py` currently uses deterministic local embeddings and does not require the MiniLM external assets.
`document_to_raptor_tree.py` uses the local MiniLM ONNX model when restored, then falls back to deterministic local embeddings when the optional assets are absent.

## Quality Gates

Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# pptify-kit

Agent-driven PPTX toolkit. Coding agents use the installed skill set, plugin tools, and predefined design context to plan and generate coordinate-explicit PowerPoint decks.
Agent-driven PPTX toolkit packaged as a VS Code agent plugin. Coding agents use the root-level skill set, plugin tools, and predefined design context to plan and generate coordinate-explicit PowerPoint decks.

> **Sample** (densed and overcomplicated layout for stress testing): [pptify-kit-stress-demo.pptx](https://view.officeapps.live.com/op/view.aspx?src=https%3A%2F%2Fraw.githubusercontent.com%2Fkimtth%2Fpptify-kit%2Fmain%2Fdocs%2Fpptify-kit-stress-demo.pptx)


| Package | Purpose |
| --- | --- |
| [pptify-plugin](pptify-plugin) | Source ingestion, design context, image/SVG helpers, PPTX extraction, collision audit |
| [pptify-core](pptify-core) | Agent Skills and workflow prompts |
| [pptify-design](pptify-design) | Predefined design profiles and template context |
| [plugin.json](plugin.json) | VS Code/Copilot plugin metadata declaring exposed component folders |
| [agents](agents) | Custom agents discovered by the plugin |
| [skills](skills) | Agent Skills discovered by the plugin |
| [scripts](scripts) | Bundled support scripts called by skills and agents |
| [resources/design](resources/design) | Predefined design profiles and template context |
| [pptify-cli](pptify-cli) | Installs the above into `./.agent/` |

The plugin manifest intentionally declares the supported Copilot component folders, `skills/` and `agents/`. The end-to-end deck-generation workflow is consolidated into the custom agent; `scripts/` and `resources/` are bundled support assets referenced by declared components.

See [ARCHITECTURE.md](ARCHITECTURE.md) for details.

## Setup
Expand All @@ -33,19 +37,19 @@ See [pptify-cli/README.md](pptify-cli/README.md) for `uninstall`, `help`, and `-

## Image Provider Credentials

When OpenAI or Azure OpenAI image generation is needed, create a local `.env` from `.env.template` and fill the required provider values there. The image helper loads `.env` automatically; `.env` is git-ignored and must not be committed.
When OpenAI or Azure OpenAI image generation is needed, create a local `.env` from `resources/env.template` and fill the required provider values there. The image helper loads `.env` automatically; `.env` is git-ignored and must not be committed.

```powershell
Copy-Item .env.template .env
Copy-Item resources/env.template .env
```

## Common Plugin Commands

```powershell
uv run python pptify-plugin/design/design_context_catalog.py --list --pretty
uv run python pptify-plugin/audit/audit.py deck-spec.json --json
uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --pretty
uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --azure-endpoint "<endpoint>" --model "gpt-image-2" --prompt "..." --output-path out.png --pretty
uv run python scripts/design/design_context_catalog.py --list --pretty
uv run python scripts/audit/audit.py deck-spec.json --json
uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --pretty
uv run python scripts/images/text_prompt_to_infographic.py --provider azure-openai --azure-endpoint "<endpoint>" --model "gpt-image-2" --prompt "..." --output-path out.png --pretty
```

Extraction helpers (`extraction/pptx_extractor.py`, `extraction/pptx_style_master.py`) are import APIs — load them with `importlib.util.spec_from_file_location(...)`.
Expand All @@ -55,5 +59,5 @@ Extraction helpers (`extraction/pptx_extractor.py`, `extraction/pptx_style_maste
The MiniLM ONNX model and tokenizer are not committed. Restore from the repository root:

```powershell
.\pptify-plugin\download-external-assets.ps1
.\scripts\download-external-assets.ps1
```
Loading
Loading