From d2691fcae744f1bd8131c5e0ed4b0b3b8a882992 Mon Sep 17 00:00:00 2001 From: Taeho Kim Date: Thu, 28 May 2026 10:03:17 +0900 Subject: [PATCH] fix: restructure the repo for vscode plugin rules --- .gitignore | 6 +- ARCHITECTURE.md | 38 ++-- README.md | 26 ++- agents/pptify-deck-builder.agent.md | 122 ++++++++++ .../plugins/pptify/.github/plugin/plugin.json | 29 --- .../awesome-copilot/plugins/pptify/README.md | 47 ---- .../references/design-profiles.md | 174 --------------- .../skills/pptify-quality-gates/SKILL.md | 62 ------ .../references/audit-checklist.md | 88 -------- .../skills/pptify-slide-spec/SKILL.md | 133 ----------- awesome-deploy/create-artifacts.ps1 | 208 ------------------ awesome-deploy/manifest.json | 22 -- copilot-instruction.md | 12 +- plugin.json | 21 ++ pptify-cli/README.md | 24 +- pptify-cli/__main__.py | 207 ++++++++--------- pptify-core/README.md | 66 ------ .../skills/pptify-context-prep/SKILL.md | 76 ------- .../skills/pptify-deck-generation/SKILL.md | 104 --------- pptify-core/skills/pptify-tooling/SKILL.md | 89 -------- .../references/toolkit-setup.md | 96 -------- .../skills/pptify-visual-assets/SKILL.md | 65 ------ pptify-core/workflows/deck-generation.md | 115 ---------- pptify-plugin/design/__init__.py | 1 - .../external/all-MiniLM-L6-v2/.gitkeep | 1 - pyproject.toml | 1 + {pptify-design => resources/design}/README.md | 10 +- .../contexts/alchaincyf-huashu-design.md | 0 .../awesome-copilot-design-agents.md | 0 .../contexts/corazzon-pptx-design-styles.md | 0 .../contexts/erickittelson-slidemason.md | 0 .../contexts/fluent-ui-design-tokens.md | 0 .../gabberflast-academic-pptx-skill.md | 0 .../contexts/likaku-mck-ppt-design-skill.md | 0 .../design}/contexts/nexu-io-open-design.md | 0 .../design}/contexts/pptwork-oh-my-slides.md | 0 .../design}/contexts/primer-primitives.md | 0 .../contexts/sunbigfly-ppt-agent-skills.md | 0 .../design}/sources.json | 4 +- .../design}/third-party-notices.md | 6 +- .env.template => resources/env.template | 0 {pptify-plugin => scripts}/README.md | 36 +-- {pptify-plugin => scripts}/audit/audit.py | 0 scripts/design/__init__.py | 1 + .../design/design_context_catalog.py | 4 +- .../documents/__init__.py | 0 .../documents/document_to_markdown.py | 0 .../documents/document_to_raptor_tree.py | 90 ++++---- .../download-external-assets.ps1 | 4 +- {pptify-plugin => scripts}/external/README.md | 4 +- scripts/external/all-MiniLM-L12-v2/.gitkeep | 1 + .../extraction/pptx_extractor.py | 0 .../extraction/pptx_style_master.py | 0 {pptify-plugin => scripts}/images/__init__.py | 0 .../images/iconfy_search.py | 2 +- .../images/raster_image_to_svg.py | 96 ++++---- .../images/text_prompt_to_infographic.py | 4 +- .../images/web_image_search.py | 0 .../pptify-context-prep/SKILL.md | 24 +- .../references/design-profiles.md | 6 +- .../pptify-deck-generation/SKILL.md | 6 +- .../pptify-quality-gates/SKILL.md | 10 +- .../references/audit-checklist.md | 6 +- .../pptify-slide-spec/SKILL.md | 2 +- .../skills => skills}/pptify-tooling/SKILL.md | 28 +-- .../references/toolkit-setup.md | 28 +-- .../pptify-visual-assets/SKILL.md | 22 +- uv.lock | 2 + 68 files changed, 508 insertions(+), 1721 deletions(-) create mode 100644 agents/pptify-deck-builder.agent.md delete mode 100644 awesome-deploy/awesome-copilot/plugins/pptify/.github/plugin/plugin.json delete mode 100644 awesome-deploy/awesome-copilot/plugins/pptify/README.md delete mode 100644 awesome-deploy/awesome-copilot/skills/pptify-context-prep/references/design-profiles.md delete mode 100644 awesome-deploy/awesome-copilot/skills/pptify-quality-gates/SKILL.md delete mode 100644 awesome-deploy/awesome-copilot/skills/pptify-quality-gates/references/audit-checklist.md delete mode 100644 awesome-deploy/awesome-copilot/skills/pptify-slide-spec/SKILL.md delete mode 100644 awesome-deploy/create-artifacts.ps1 delete mode 100644 awesome-deploy/manifest.json create mode 100644 plugin.json delete mode 100644 pptify-core/README.md delete mode 100644 pptify-core/skills/pptify-context-prep/SKILL.md delete mode 100644 pptify-core/skills/pptify-deck-generation/SKILL.md delete mode 100644 pptify-core/skills/pptify-tooling/SKILL.md delete mode 100644 pptify-core/skills/pptify-tooling/references/toolkit-setup.md delete mode 100644 pptify-core/skills/pptify-visual-assets/SKILL.md delete mode 100644 pptify-core/workflows/deck-generation.md delete mode 100644 pptify-plugin/design/__init__.py delete mode 100644 pptify-plugin/external/all-MiniLM-L6-v2/.gitkeep rename {pptify-design => resources/design}/README.md (83%) rename {pptify-design => resources/design}/contexts/alchaincyf-huashu-design.md (100%) rename {pptify-design/agent-prompts => resources/design/contexts}/awesome-copilot-design-agents.md (100%) rename {pptify-design => resources/design}/contexts/corazzon-pptx-design-styles.md (100%) rename {pptify-design => resources/design}/contexts/erickittelson-slidemason.md (100%) rename {pptify-design => resources/design}/contexts/fluent-ui-design-tokens.md (100%) rename {pptify-design => resources/design}/contexts/gabberflast-academic-pptx-skill.md (100%) rename {pptify-design => resources/design}/contexts/likaku-mck-ppt-design-skill.md (100%) rename {pptify-design => resources/design}/contexts/nexu-io-open-design.md (100%) rename {pptify-design => resources/design}/contexts/pptwork-oh-my-slides.md (100%) rename {pptify-design => resources/design}/contexts/primer-primitives.md (100%) rename {pptify-design => resources/design}/contexts/sunbigfly-ppt-agent-skills.md (100%) rename {pptify-design => resources/design}/sources.json (99%) rename {pptify-design => resources/design}/third-party-notices.md (90%) rename .env.template => resources/env.template (100%) rename {pptify-plugin => scripts}/README.md (60%) rename {pptify-plugin => scripts}/audit/audit.py (100%) create mode 100644 scripts/design/__init__.py rename {pptify-plugin => scripts}/design/design_context_catalog.py (96%) rename {pptify-plugin => scripts}/documents/__init__.py (100%) rename {pptify-plugin => scripts}/documents/document_to_markdown.py (100%) rename {pptify-plugin => scripts}/documents/document_to_raptor_tree.py (90%) rename {pptify-plugin => scripts}/download-external-assets.ps1 (94%) rename {pptify-plugin => scripts}/external/README.md (60%) create mode 100644 scripts/external/all-MiniLM-L12-v2/.gitkeep rename {pptify-plugin => scripts}/extraction/pptx_extractor.py (100%) rename {pptify-plugin => scripts}/extraction/pptx_style_master.py (100%) rename {pptify-plugin => scripts}/images/__init__.py (100%) rename {pptify-plugin => scripts}/images/iconfy_search.py (98%) rename {pptify-plugin => scripts}/images/raster_image_to_svg.py (83%) rename {pptify-plugin => scripts}/images/text_prompt_to_infographic.py (99%) rename {pptify-plugin => scripts}/images/web_image_search.py (100%) rename {awesome-deploy/awesome-copilot/skills => skills}/pptify-context-prep/SKILL.md (79%) rename {pptify-core/skills => skills}/pptify-context-prep/references/design-profiles.md (97%) rename {awesome-deploy/awesome-copilot/skills => skills}/pptify-deck-generation/SKILL.md (95%) rename {pptify-core/skills => skills}/pptify-quality-gates/SKILL.md (83%) rename {pptify-core/skills => skills}/pptify-quality-gates/references/audit-checklist.md (92%) rename {pptify-core/skills => skills}/pptify-slide-spec/SKILL.md (97%) rename {awesome-deploy/awesome-copilot/skills => skills}/pptify-tooling/SKILL.md (67%) rename {awesome-deploy/awesome-copilot/skills => skills}/pptify-tooling/references/toolkit-setup.md (57%) rename {awesome-deploy/awesome-copilot/skills => skills}/pptify-visual-assets/SKILL.md (68%) diff --git a/.gitignore b/.gitignore index 3fcd84d..5d931d2 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index c58c7b2..8d91570 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -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 @@ -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 diff --git a/README.md b/README.md index 9be4f99..fc97292 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 "" --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 "" --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(...)`. @@ -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 ``` diff --git a/agents/pptify-deck-builder.agent.md b/agents/pptify-deck-builder.agent.md new file mode 100644 index 0000000..b134713 --- /dev/null +++ b/agents/pptify-deck-builder.agent.md @@ -0,0 +1,122 @@ +--- +name: pptify-deck-builder +description: "Use when creating, repairing, auditing, or improving editable PowerPoint PPTX decks with pptify skills, scripts, design resources, visual assets, and quality gates." +tools: [read, search, edit, execute, browser, agent, todo] +--- + +You are a PPTify deck-building specialist. Your job is to produce or repair editable, production-ready PowerPoint decks using this plugin's bundled skills and support assets. + +## Plugin Assets + +- Use `skills/` for task-specific guidance: context prep, deck generation, slide specs, tooling, visual assets, and quality gates. +- Use `scripts/` for source ingestion, design context loading, image helpers, PPTX extraction, and audit checks. +- Use `resources/design/` for predefined design profiles and source attribution. +- Use this agent file as the end-to-end deck-generation workflow. + +## Operating Rules + +1. Start with `pptify-tooling` when you need commands, environment checks, or graceful fallbacks. +2. Use `pptify-context-prep` before writing specs for source-backed, reference-deck, or design-profile-driven work. +3. Use `pptify-slide-spec` for coordinate-explicit layout tree authoring and repair. +4. Use `pptify-visual-assets` before adding icons, web images, SVGs, or generated images. +5. Use `pptify-quality-gates` before reporting a deck as complete. + +## Deck Generation Workflow + +### 1. Intake + +1. Before creating workflow artifacts, collect missing required inputs with a prompt input dialog when available. Ask concise batched questions, offer sensible defaults for optional fields, and continue after the user answers. +2. Identify the audience, decision, core narrative, required language, target slide count, source material, reference PPTX, branding constraints, output artifact paths, and delivery deadline. +3. If the user gives only a topic, create a reasonable executive narrative and mark assumptions in the generated spec summary. +4. When the user asks for web images, sources, data enrichment, or a source-backed deck, gather and persist source material before authoring slides. +5. If the user provides source files, URLs, research material, or a reference deck, prepare them before generating the slide spec. +6. If the user requests text-to-image or generated images with OpenAI, Azure OpenAI, or Azure AI Foundry, create `.env` from `resources/env.template` when needed and have the user fill provider settings or secrets directly in `.env`. +7. Do not author a slide or summary that claims a model-generated infographic exists until provider, model or deployment, auth mode, prompt, output path, and attempt status are known. + +### 2. Image Access + +1. For any text-to-image request, prepare `.env` before invoking `scripts/images/text_prompt_to_infographic.py`. +2. The infographic helper has no local fallback provider. If OpenAI or Azure OpenAI access is missing, record `missing_provider_config` or the provider failure in an attempt manifest and do not describe placeholder artwork as generated. +3. For OpenAI, configure `PPTIFY_IMAGE_PROVIDER=openai`, `OPENAI_API_KEY`, optional `OPENAI_IMAGE_MODEL`, image size, prompt, and output path. +4. For Azure OpenAI or Azure AI Foundry, configure `PPTIFY_IMAGE_PROVIDER=azure-openai`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_IMAGE_DEPLOYMENT`, optional `AZURE_OPENAI_TIMEOUT`, and the chosen auth method. +5. For Azure CLI or Entra auth, tell the user to run `az login`; for API-key auth, have the user fill `AZURE_OPENAI_API_KEY` or `AZURE_AI_API_KEY` in `.env`. +6. Save an attempt manifest next to failed generated assets with provider, endpoint or model name, auth mode, prompt path, output path, status, and error details. + +### 3. Prepare Sources and References + +1. Convert long documents and downloaded HTML pages with `scripts/documents/document_to_markdown.py`. +2. For URL-based, topic-plus-research, source-backed, or multi-source decks, build a combined markdown corpus and run `scripts/documents/document_to_raptor_tree.py` before planning slides. +3. Record the source corpus path, RAPTOR summary path, source count, and source URLs in `summary.source_enrichment` in the generated spec. +4. When a reference deck should influence content or style, use `scripts/extraction` helpers or package inspection to collect style, brand, template, and layout-rhythm context. +5. Use analysis facts as LLM context when the new deck should preserve language, slide count, topic sequence, executive tone, colors, fonts, template conventions, and layout rhythm. +6. Use extraction helpers only when the task is preservation or reconstruction of the source deck. + +### 4. Prepare Design Context + +1. Every new deck must choose a design direction before slide planning. Do not wait for the user to explicitly ask for `resources/design`. +2. If the user supplies a brand guide or reference PPTX, use that as the primary style source and optionally add a compatible `resources/design` profile for layout vocabulary. +3. If the user does not supply a style source, load at least one source-backed profile from `resources/design/sources.json` with `uv run python scripts/design/design_context_catalog.py --profile --include-context --pretty`. +4. Default to `fluent-ui-design-tokens` for general modern, stylish, product, app, pitch, Microsoft, M365, Teams, Power Platform, or enterprise product decks. +5. Use `primer-primitives` for developer, GitHub, code, or engineering-system decks. +6. Use `likaku-mck-ppt-design-skill` plus a conservative `corazzon-pptx-design-styles` style for consulting, strategy, governance, or operations reviews. +7. Use `corazzon-pptx-design-styles` for broader visual direction exploration; add `awesome-copilot-design-agents` for design reasoning or preflight critique. +8. Lock exactly one visual style or design system before authoring slide coordinates. Record selected profile ID, style name, palette, typography, spacing rhythm, signature elements, and source URLs in `summary.design_context`. +9. Include the returned context payload in the LLM context before writing `deck-spec.json`; do not reduce it to a vague phrase like "modern design". +10. A deck that uses default PowerPoint theme colors, Calibri-only text boxes, plain white backgrounds, or bullet-only layouts without `summary.design_context` is not production-ready. + +### 5. Plan the Deck + +1. Produce one clear message per slide before choosing visuals. +2. Choose a slide form for each message: title, agenda, comparison, process, metrics, roadmap, risk, architecture, evidence, decision, infographic, dashboard overview, or appendix. +3. Use charts and dashboard-style slides only when the source corpus contains relevant quantitative or structured evidence. +4. Keep each slide to three to five major content groups. +5. Preserve user-provided terminology, names, metrics, dates, and executive tone. +6. Decide composition, hierarchy, coordinates, object sizes, z-order, colors, fonts, and font sizes during planning. The plugin scripts will not do this later. +7. Every normal content slide should contain at least one visible design element derived from the locked style, such as a color band, card system, grid, rule, accent shape, diagram primitive, image treatment, pattern, or data exhibit. + +### 6. Author the JSON Spec + +1. Return a top-level object with `slides` and optional `summary`. +2. For each slide, include `id`, `title`, and `layout_tree`. +3. Do not use `pattern`, `layout_pattern`, `composition.pattern`, `layout`, `sections`, `bullets`, `objects`, `theme`, chart placeholders, or browser layout requests as render-time shorthand. +4. Each `layout_tree` must include `slide_size`, `root_group_id`, `groups`, `objects`, and optional `notes`. +5. Each group must include `id`, `role`, `layout_mode`, `object_ids`, `group_ids`, and a `bbox` when it represents a visible or bounded region. +6. Each object must include `id`, `kind`, `role`, `classification`, `content`, `style`, `bbox`, and `z_index`. +7. Treat decorative shapes as `layout_design`; treat meaningful text, tables, lines, and media as `content`. +8. Give every text-bearing object and table explicit `style.font_size` and `style.color`; body and evidence text must be at least 10 pt, labels and captions at least 9 pt, and footers at least 8 pt. +9. Give every line object explicit endpoints plus `style.line` and `style.line_width`. +10. Give every shape object explicit `content.shape`, `style.fill`, and `style.line`. +11. Translate locked design context into explicit objects, colors, spacing, typography, and coordinates. +12. If a generated raster infographic is created, use that raster on the visible slide, convert it with `raster_image_to_svg.py`, and add the SVG as a final `hidden: true` appendix slide. Record both paths in `summary.text_to_image`. + +### 7. Build the PPTX + +1. Current workspace reality: this snapshot does not contain an importable `pptify/` package or `python -m pptify` CLI. +2. Author or update `deck-spec.json` or a generation script directly; plugin scripts do not perform prompt-to-spec generation or full-deck rendering. +3. If the core renderer is restored, render the authored spec with `uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json`. +4. Otherwise build with the available PowerPoint generation path and keep plugin evidence and audits beside the PPTX. Using `python-pptx` is only a serialization path; it must still implement locked coordinates, colors, typography, and decorative primitives. +5. For reference-guided generation, include analysis/source summaries and extracted style, brand, template, and layout context before writing `deck-spec.json`. +6. Never copy, mutate, or save over a referenced PPTX as the deck generation strategy. + +### 8. Validate and Repair + +1. Inspect the audit for content collisions, text overflows, and warnings. +2. If collisions remain, move or resize objects, reduce density, split slides, or change the coordinate plan. +3. If text overflows, shorten copy, split content across slides, or enlarge object bboxes. Lower font sizes only as a last resort and never below 9 pt for content objects. +4. Verify source and image gates before final response: source-backed decks have `summary.source_enrichment`; generated-image requests have an attempt manifest; successful raster infographics have a hidden SVG appendix slide. +5. Verify design-context gates before final response: `summary.design_context` exists, names the selected profile/style, and every visible content slide has at least one style-derived design element. +6. Treat plain white Calibri slides, default theme placeholders, unstyled bullet lists, and missing `summary.design_context` as quality failures even when collision audit passes. +7. Rebuild after each repair until generated slides have zero collisions, zero overflows, no unexpected warnings, and pass the design-context gate, or clearly report the residual issue. +8. For important deliverables, inspect the produced PPTX package with `python-pptx` or zip checks in addition to unit tests. + +### 9. Response Contract + +1. When asked to author the deck spec, write strict JSON with no markdown fences unless the user explicitly asks for prose. +2. When required workflow or artifact inputs are missing, prompt for them before authoring or building. +3. When acting in a workspace, create or update the spec or generation script, build with the available PowerPoint path, validate the audit and produced PPTX package, and report generated artifact paths. + +## Constraints + +- Do not claim the missing `python -m pptify` renderer is available unless it has been restored and verified. +- Do not ask users to paste API keys, tokens, or secrets into chat. +- Keep generated deck specs coordinate-explicit and preserve design/source/license metadata. diff --git a/awesome-deploy/awesome-copilot/plugins/pptify/.github/plugin/plugin.json b/awesome-deploy/awesome-copilot/plugins/pptify/.github/plugin/plugin.json deleted file mode 100644 index 8eaf08d..0000000 --- a/awesome-deploy/awesome-copilot/plugins/pptify/.github/plugin/plugin.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "pptify", - "description": "Generate production-ready PowerPoint decks with pptify skills, source ingestion, design-context selection, coordinate-explicit slide specs, visual assets, runtime tooling, and audit-driven quality gates.", - "version": "1.0.0", - "author": { - "name": "PPTify maintainers" - }, - "repository": "https://github.com/github/awesome-copilot", - "license": "MIT", - "keywords": [ - "pptify", - "powerpoint", - "pptx", - "presentations", - "deck-generation", - "slides", - "design-context", - "visual-assets", - "quality-gates" - ], - "skills": [ - "./skills/pptify-context-prep/", - "./skills/pptify-deck-generation/", - "./skills/pptify-quality-gates/", - "./skills/pptify-slide-spec/", - "./skills/pptify-tooling/", - "./skills/pptify-visual-assets/" - ] -} \ No newline at end of file diff --git a/awesome-deploy/awesome-copilot/plugins/pptify/README.md b/awesome-deploy/awesome-copilot/plugins/pptify/README.md deleted file mode 100644 index f01fdc5..0000000 --- a/awesome-deploy/awesome-copilot/plugins/pptify/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# PPTify Plugin - -Generate production-ready PowerPoint decks with pptify skills, source ingestion, design context, coordinate-explicit slide specs, visual assets, runtime tooling, and audit-driven quality gates. - -## Installation - -```bash -copilot plugin install pptify@awesome-copilot -``` - -## What's Included - -### Skills - -| Skill | Description | -| --- | --- | -| `pptify-context-prep` | Prepare source material and design context before authoring a pptify deck spec. | -| `pptify-deck-generation` | Generate PPTX decks end to end from prompts, source material, reference PPTX analysis, coordinate-explicit layout trees, or pptify JSON specs. | -| `pptify-quality-gates` | Validate and repair PPTX artifacts by checking specs, PPTX packages, audits, layout trees, collisions, text overflows, warnings, visual hierarchy, asset layering, and reference deck alignment. | -| `pptify-slide-spec` | Author or repair coordinate-explicit pptify JSON deck specs with layout tree groups, objects, bounding boxes, tables, images, lines, shapes, type scale, and collision-safe content. | -| `pptify-tooling` | Look up pptify install commands, plugin script syntax, and workspace reality checks. | -| `pptify-visual-assets` | Find, generate, and place icons, images, SVGs, raster conversions, infographics, image placeholders, and asset-backed slide objects. | - -## Optional Toolkit - -The bundled skills include reference material for design profile selection and manual quality checks. To run helper scripts for source prep, design context, visual assets, extraction, or audits, users can optionally install the PPTify toolkit from its source repository. The current external toolkit does not provide an importable `pptify` renderer module. - -Do not clone or install the external toolkit automatically. Install it only when the user explicitly asks to use helper scripts: - -```powershell -git clone https://github.com/kimtth/agent-pptify-kit -cd agent-pptify-kit -uv sync # base project -uv sync --extra plugins # add source ingestion and image helpers -``` - -## Usage - -Ask Copilot to create or repair a deck and mention `pptify`. The plugin guides the agent to collect required deck inputs, prepare source and reference context, select a design profile, author a coordinate-explicit JSON spec, build through the available PowerPoint path, and repair audit findings before reporting artifact paths. - -## Source - -Plugin skills are sourced from [kimtth/agent-pptify-kit](https://github.com/kimtth/agent-pptify-kit) for submission to [Awesome Copilot](https://github.com/github/awesome-copilot). - -## License - -MIT \ No newline at end of file diff --git a/awesome-deploy/awesome-copilot/skills/pptify-context-prep/references/design-profiles.md b/awesome-deploy/awesome-copilot/skills/pptify-context-prep/references/design-profiles.md deleted file mode 100644 index ed863c6..0000000 --- a/awesome-deploy/awesome-copilot/skills/pptify-context-prep/references/design-profiles.md +++ /dev/null @@ -1,174 +0,0 @@ -# PPTify Design Profile Catalog - -Source: `pptify-design/sources.json` — updated 2026-05-20. -Load this file when `pptify-plugin/design/design_context_catalog.py` is unavailable. - -## Quick-Select Guide - -| Profile ID | Best for | -|---|---| -| `fluent-ui-design-tokens` | Microsoft, M365, Teams, Power Platform, enterprise — **default for new decks** | -| `primer-primitives` | GitHub-style, developer products, token-driven UI reviews, engineering docs | -| `corazzon-pptx-design-styles` | 30 modern style catalog; use when visual variety or multiple direction options are needed | -| `likaku-mck-ppt-design-skill` | Consulting, strategy, governance, operations — strict action-title discipline | -| `sunbigfly-ppt-agent-skills` | Source-backed, stage-gated delivery pipelines with human approval at each phase | -| `awesome-copilot-design-agents` | Prompting agent for design review, UX discovery, visual hierarchy reasoning | -| `nexu-io-open-design` | Direction-picker workflows with explicit style-lock and artifact-lint gates | -| `alchaincyf-huashu-design` | Brand-constrained enterprise decks requiring exact color/type fidelity | -| `pptwork-oh-my-slides` | HTML-prototype-first workflows; raster fidelity + constrained PPTX editability as separate deliverables | -| `erickittelson-slidemason` | Cautionary reference: JSX primitive composition — auto-layout incompatibility | -| `gabberflast-academic-pptx-skill` | High-stakes governance, board, or investor presentations needing narrative rigour | - -## Profiles - -### `fluent-ui-design-tokens` -**Name:** Fluent UI Design Token Guidance -**Kind:** design-system-context -**License:** MIT — Copyright (c) Microsoft Corporation -**Source:** [microsoft/fluentui](https://github.com/microsoft/fluentui/blob/master/docs/architecture/design-tokens.md) -**Token categories:** color, spacing, border radius, font, line height, stroke, shadow, duration, easing -**Themes:** webLightTheme, webDarkTheme, teamsLightTheme, teamsDarkTheme, teamsHighContrastTheme -**Agent rule:** Use design tokens instead of hardcoded colors, spacing, or typography values. -**Best for:** Microsoft-aligned decks, Teams, M365, Power Platform governance, enterprise product reviews - ---- - -### `primer-primitives` -**Name:** Primer Primitives Design Tokens -**Kind:** design-system-context -**License:** MIT — Copyright (c) 2018 GitHub Inc. -**Source:** [primer/primitives](https://github.com/primer/primitives) -**Token categories:** color, spacing, typography, motion, z-index -**Spacing scale:** xxs, xs, sm, md, lg, xl -**Typography roles:** display, title, subtitle, body, caption, codeBlock, codeInline -**Color examples:** `#ffffff`, `#1f2328`, `#F6F8FA`, `#0969da`, `#1a7f37`, `#cf222e` -**Best for:** GitHub-style decks, developer products, token-driven UI reviews, engineering documentation - ---- - -### `corazzon-pptx-design-styles` -**Name:** corazzon/pptx-design-styles — 30 Modern PPTX Style Templates -**Kind:** pptx-style-template-context -**License:** MIT — Copyright TodayCode / corazzon contributors -**Source:** [corazzon/pptx-design-styles](https://github.com/corazzon/pptx-design-styles) -**30 styles:** Glassmorphism, Neo-Brutalism, Bento Grid, Dark Academia, Gradient Mesh, Claymorphism, Swiss International, Aurora Neon Glow, Retro Y2K, Nordic Minimalism, Typographic Bold, Duotone Color Split, Monochrome Minimal, Cyberpunk Outline, Editorial Magazine, Pastel Soft UI, Dark Neon Miami, Hand-crafted Organic, Isometric 3D Flat, Vaporwave, Art Deco Luxe, Brutalist Newspaper, Stained Glass Mosaic, Liquid Blob Morphing, Memphis Pop Pattern, Dark Forest Nature, Architectural Blueprint, Maximalist Collage, SciFi Holographic Data, Risograph Print -**Style families:** modern-ui, editorial, retro, technical, luxury, organic, experimental -**Source inputs per style:** hex colors, font pairings, layout rules, signature elements, avoid lists -**Agent rule:** Pick one style, lock its palette and typography, then translate visual effects into explicit pptify `layout_tree` primitives or documented raster accents. Do not mix styles accidentally. -**Best for:** Choosing a predefined modern style from a broad catalog; generating multiple visual direction options before deck production - ---- - -### `likaku-mck-ppt-design-skill` -**Name:** likaku/Mck-ppt-design-skill — McKinsey-Style Native PPTX Layout Runtime -**Kind:** pptx-pattern-context -**License:** MIT — Copyright likaku contributors -**Source:** [likaku/Mck-ppt-design-skill](https://github.com/likaku/Mck-ppt-design-skill) -**Pattern count:** ~70 consulting-style layout patterns -**Pattern families:** structure-navigation, data-metrics, frameworks-matrices, content-narrative -**Action title discipline:** required on every content slide -**Geometry norms (inches):** kicker_y=0.48, title_y=0.72, rule_y=1.12, content_top_y=1.30 -**Agent rule:** Use the source taxonomy as design inspiration only. Author exact `layout_tree` coordinates, sizes, and primitives. Action titles on every content slide. -**Best for:** Consulting decks for strategy, governance, or operations reviews; strict action-title discipline - ---- - -### `sunbigfly-ppt-agent-skills` -**Name:** sunbigfly/ppt-agent-skills — Staged Deck Generation Pipeline -**Kind:** agent-pipeline-context -**License:** MIT — Copyright sunbigfly contributors -**Source:** [sunbigfly/ppt-agent-skills](https://github.com/sunbigfly/ppt-agent-skills) -**Pipeline stages:** interview → source-compression → outline → style-lock → slide-plan → visual-qa → dual-export -**Stage outputs:** structured brief JSON, compressed source ≤800 words, outline JSON, style_lock JSON, complete spec.json, qa-report, pptx + raster -**Agent rule:** Never skip the interview. Source compression before outline. Style lock is stage-gated. Per-slide plans are full specs. Action titles mandatory. -**Best for:** Source-grounded decks; high-stakes presentations; workflows requiring explicit human approval at each phase - ---- - -### `awesome-copilot-design-agents` -**Name:** Awesome Copilot Design Agent and Prompt Context -**Kind:** agent-prompt-context -**License:** MIT — Copyright GitHub, Inc. -**Source:** [github/awesome-copilot](https://github.com/github/awesome-copilot) -**Key files:** `agents/gem-designer.agent.md`, `agents/se-ux-ui-designer.agent.md`, `skills/penpot-uiux-design/SKILL.md`, `skills/prompt-optimizer/SKILL.md` -**Prompt focus:** existing design systems, visual hierarchy, UX discovery, accessibility, slides and reports design intentionality -**Best for:** Prompting an LLM to reason about deck design; UX discovery before deck planning; design review checklists; visual hierarchy guidance - ---- - -### `nexu-io-open-design` -**Name:** nexu-io/open-design — Claude Design Style -**Kind:** agent-skill-context -**License:** MIT — Copyright nexu-io contributors -**Source:** [nexu-io/open-design](https://github.com/nexu-io/open-design) -**Key patterns:** direction-picker, sandbox-preview, artifact-lint, design-critique -**Stage gates:** direction selection → style lock → preview approval → artifact lint → critique gate -**Agent rule:** Never start layout without a locked direction. Run artifact lint after every build. Preview before full deck. -**Best for:** Reasoning about deck design direction before committing; parallel design options for selection; lint and critique gates on generated decks - ---- - -### `alchaincyf-huashu-design` -**Name:** alchaincyf/huashu-design — HTML-Native Brand Design Pipeline -**Kind:** agent-skill-context -**License:** MIT — Copyright alchaincyf contributors -**Source:** [alchaincyf/huashu-design](https://github.com/alchaincyf/huashu-design) -**Key patterns:** brand-asset-protocol, visual-directions, html-to-editable-pptx, playwright-check -**Brand lock fields:** primary_palette, neutral_palette, typeface_display, typeface_body, tone -**Agent rule:** Brand lock is non-negotiable. Parallel directions before deck plan. Every text frame must be individually editable. -**Best for:** Brand-constrained enterprise decks requiring exact color/type fidelity; multi-direction style exploration before committing - ---- - -### `pptwork-oh-my-slides` -**Name:** PPTWork/oh-my-slides — HTML-as-Source PPTX Build Artifact Pipeline -**Kind:** pptx-export-context -**License:** MIT — Copyright PPTWork contributors -**Source:** [PPTWork/oh-my-slides](https://github.com/PPTWork/oh-my-slides) -**Key patterns:** html-source, preset-picker, mini-preview, raster-export, constrained-editable -**Export model:** HTML (design source) → raster export (fidelity) + constrained PPTX (editability) -**Forbidden in editable PPTX:** background images, raster embeds of slide content, CSS transform rotate, SVG filter effects -**Agent rule:** Never promise both pixel fidelity and full editability from the same export path. Raster embeds in editable PPTX are a quality failure. -**Best for:** HTML-prototype-first workflows; design fidelity and PowerPoint editability as separate deliverables; Playwright-in-the-loop generation - ---- - -### `erickittelson-slidemason` -**Name:** erickittelson/slidemason — JSX Primitive Composition (Cautionary Reference) -**Kind:** agent-skill-context -**License:** MIT — Copyright erickittelson contributors -**Source:** [erickittelson/slidemason](https://github.com/erickittelson/slidemason) -**Key patterns:** jsx-primitives, jsx-bento, bespoke-slide, primitive-composition -**Primitive map:** Card→`_shape(round_rect)`, Text→`_text()`, Line→`_line()`, Image→`_image()`, Oval→`_shape(oval)` -**Editability failure modes:** nested flex containers, auto-sized text frames, SVG filter effects, rotated text boxes, image fills on shapes -**Agent rule:** Auto-layout is the enemy of editability. All coordinates are in inches. Bespoke layout is a last resort. -**Best for:** Understanding limits of programmatic slide composition; cautionary reference for auto-layout / PPTX editability incompatibility - ---- - -### `gabberflast-academic-pptx-skill` -**Name:** Gabberflast/academic-pptx-skill — Narrative Discipline Gates -**Kind:** agent-skill-context -**License:** MIT — Copyright Gabberflast contributors -**Source:** [Gabberflast/academic-pptx-skill](https://github.com/Gabberflast/academic-pptx-skill) -**Key patterns:** action-title, ghost-deck-test, one-exhibit-discipline, evidence-slide, citation-slide -**Narrative gates:** action title on every content slide; ghost deck test passes; one exhibit per slide; last slide names a specific next action; every quantitative claim has a source -**Agent rule:** Run ghost deck test before building slides. Rewrite descriptive titles as action titles. One exhibit per slide is a hard rule. The closing slide must name a decision, deadline, and owner. -**Best for:** High-stakes governance or board presentations requiring narrative rigour; decks reviewed by investors, regulators, or boards - ---- - -## Using This Catalog - -**When the toolkit is present**, load full style context with: - -```powershell -uv run python pptify-plugin/design/design_context_catalog.py --profile --include-context --pretty -``` - -**When the toolkit is absent**, use the entries above to: - -1. Select the profile ID that best matches the user's audience, topic, and delivery context. -2. Lock the palette, typography, and signature element conventions described in the profile's `source_signals`. -3. Record the selected profile ID, source URL, and license in `summary.design_context` before building the deck spec. -4. Translate the style signals directly into explicit `layout_tree` primitives — colors, fills, rules, card shells, accent bands, and bboxes. diff --git a/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/SKILL.md b/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/SKILL.md deleted file mode 100644 index 9be914e..0000000 --- a/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/SKILL.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -name: pptify-quality-gates -description: "Validate and repair pptify PPTX artifacts. Use when checking deck specs, PPTX packages, audits, coordinate-explicit layout trees, collisions, text overflows, warnings, visual hierarchy, asset layering, or reference deck alignment." ---- - -# PPTify Quality Gates - -> **Prerequisite:** Before running `audit.py`, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, load [`references/audit-checklist.md`](references/audit-checklist.md) and apply the manual checklist — it covers all 8 audit dimensions without requiring the script. - -Use this skill before considering a generated PPTX complete. - -## Workflow - -1. Confirm required artifacts exist or collect missing paths before validating. -2. Run the workspace detection check from `pptify-tooling`. -3. Run `audit.py` when available; otherwise load `references/audit-checklist.md` and apply the manual checks. -4. Repair the spec or generation script, rebuild the PPTX, and rerun the audit. -5. Stop only when collisions, overflows, small fonts, package checks, and design-context checks are clean or clearly reported. - -## Required Artifacts - -- If required artifact paths or names are missing, collect them with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent) before building, validating, or repairing. -- Keep the generated spec, PPTX, and audit together: `deck-spec.json`, `deck.pptx`, and `deck-audit.json`. -- Keep the agent-authored JSON spec or generation script on disk so it can be reviewed, repaired, and rebuilt. -- Save analysis or extraction manifests when reference PPTX context was used. -- Save the selected `pptify-design` profile IDs, source URLs, license IDs, and style lock details in `summary.design_context` for every newly generated deck unless a user-provided brand guide or reference PPTX is the primary style source. - -## Audit Checks - -- A production-ready generated deck should have zero content collisions. -- A production-ready generated deck should have zero text overflows. -- A production-ready generated deck should have zero `classification: "content"` objects with `style.font_size` below 9 pt. Run `uv run python pptify-plugin/audit/audit.py deck-spec.json --json` and check `total_small_fonts`. -- Review audit `warnings` for each slide even when collisions and overflows are zero. -- Check that slide count, language, tone, and major topic sequence match the user request or reference context. -- Check that the selected design context profile matches the user request and that source-backed context was translated into explicit primitives, colors, spacing, typography, and bboxes. -- Fail generated decks that have no `summary.design_context`, plain white backgrounds throughout, Calibri-only text, default theme colors, or placeholder-like title-plus-bullet layouts unless the user explicitly requested that style. -- Confirm every normal content slide contains at least one style-derived visual element such as an accent band, card shell, grid, divider, shape motif, image treatment, or pattern. -- When a deck includes hidden appendix slides, inspect `ppt/presentation.xml` for `p:sldId show="0"` and confirm the hidden slides are last unless the user asked otherwise. -- When a generated infographic has both raster and SVG assets, verify the visible slide uses the raster for text fidelity and the SVG appears only in the hidden appendix slide. -- For important deliverables, open the generated PPTX with `python-pptx` or inspect the zip package to confirm slide count, relationships, media, and hidden-slide metadata. - -## Repair Loop - -- If content collides, move or resize objects, reduce content density, split slides, or change the coordinate plan. -- If text overflows, shorten bullets, split sections, enlarge target bboxes, or split slides. **Lower explicit `font_size` only as a last resort, and never below 9 pt for content objects.** -- If visual hierarchy is weak, edit explicit colors, type scale, dividers, metric cards, callouts, or whitespace in the layout tree. -- If the deck looks like default `python-pptx`, load a `pptify-design` profile, add `summary.design_context`, choose a style lock, and rebuild with explicit background/accent/card/rule primitives. -- If an asset covers text, lower its `z_index`, move it to `layout_design`, resize it, or change its bbox. -- If coordinates are cramped or inconsistent, repair the agent-authored bboxes directly; current plugin scripts will not run a browser or auto-layout pass. -- Rebuild after each spec repair and inspect the new audit or package checks. - -## Verification Commands - -- Current workspace reality check: no importable `pptify/` package or `python -m pptify` CLI is present in this snapshot. Use the standalone audit plugin and package inspection unless the core renderer package is restored. -- Audit a layout-tree spec and run the full test suite: - -```powershell -uv run python pptify-plugin/audit/audit.py deck-spec.json --json -uv run python -m unittest discover -s tests -v -``` - -- If the core renderer package is restored, add renderer/CLI smoke tests before considering rendered deck behavior covered. diff --git a/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/references/audit-checklist.md b/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/references/audit-checklist.md deleted file mode 100644 index 4afc618..0000000 --- a/awesome-deploy/awesome-copilot/skills/pptify-quality-gates/references/audit-checklist.md +++ /dev/null @@ -1,88 +0,0 @@ -# PPTify Manual Audit Checklist - -Load this file when `pptify-plugin/audit/audit.py` is unavailable. -Apply every check manually to `deck-spec.json` before considering a deck production-ready. - -## 1. Content Collisions - -For every slide, inspect all `layout_tree` objects. Two `classification: "content"` objects collide when their bounding boxes overlap: - -``` -A.x < B.x + B.w AND B.x < A.x + A.w -A.y < B.y + B.h AND B.y < A.y + A.h -``` - -- **Pass:** zero overlapping content objects per slide. -- **Fail:** any overlap → move objects, resize bboxes, reduce content density, or split the slide. - -## 2. Text Overflows - -For each text object estimate whether its text fits within its bbox. - -Rough capacity: -- Characters per line ≈ `(bbox.w × 10) / font_size` -- Lines available ≈ `(bbox.h × 72) / (font_size × 1.2)` - _(bbox in inches, font_size in pt)_ - -- **Pass:** estimated text volume ≤ available capacity. -- **Fail:** likely overflow → shorten bullets, enlarge bbox, or split slide. - **Never set `font_size` below 9 pt for `classification: "content"` objects.** - -## 3. Font Size Minimums - -Scan every object with `classification: "content"`. Check `style.font_size`. - -- **Pass:** all content objects ≥ 9 pt. -- **Fail:** any content object < 9 pt → increase font size and split content if needed. - -## 4. Design Context Presence - -Inspect `summary.design_context` in the spec root. - -- **Pass:** field present and contains `profile_id`, source URL, and license ID. -- **Fail — any of the following:** - - `summary.design_context` absent → load a `pptify-design` profile (see `references/design-profiles.md` in `pptify-context-prep`) and rebuild. - - Plain white backgrounds throughout with no accent elements. - - Calibri-only text with default theme colors across all slides. - - All slides are title-plus-bullets only (no cards, shapes, rules, or image treatments). - -## 5. Visual Design Per Slide - -For each normal content slide (exclude section headers and hidden appendix slides): - -- **Pass:** at least one style-derived visual element present — accent band, card shell, grid cell, rule/divider, shape motif, image treatment, or background pattern. -- **Fail:** slide is plain white with only text objects → add a design element derived from the selected profile's `source_signals`. - -## 6. Narrative and Count - -- Slide count is within ±2 of the user's requested count. -- Topic sequence matches the requested business framework (McKinsey, SCQA, pyramid, etc.) or the user's stated structure. -- If `likaku-mck-ppt-design-skill` or `gabberflast-academic-pptx-skill` context was used: every content slide has an **action title** (not a descriptive label). Run the ghost-deck test: read only slide titles — they must tell the full story on their own. - -## 7. Hidden Slides - -If the deck contains hidden slides (`hidden: true`): - -- **Pass:** hidden slides are last in the `slides` array unless the user specified otherwise. -- In the rendered PPTX, confirm `ppt/presentation.xml` contains `p:sldId show="0"` on the correct entries. - -## 8. Asset Layering - -For slides mixing image/SVG objects with text: - -- **Pass:** image/SVG `z_index` is lower than all overlapping text objects. -- **Fail:** image covers text → lower `z_index`, adjust bbox, or reclassify as `classification: "layout_design"`. -- When a generated infographic exists as both raster and SVG: the raster must be on the **visible** slide; the SVG must be in a **hidden appendix** slide only. - -## 9. Audit Script (when toolkit is present) - -```powershell -uv run python pptify-plugin/audit/audit.py deck-spec.json --json -``` - -Check `total_collisions`, `total_overflows`, `total_small_fonts`, and `warnings` per slide even when the numeric totals are zero. - -## Completion Criterion - -All 8 checks pass before delivery. -Any failure triggers the repair loop in `pptify-quality-gates`: fix the spec, rebuild, and re-audit. diff --git a/awesome-deploy/awesome-copilot/skills/pptify-slide-spec/SKILL.md b/awesome-deploy/awesome-copilot/skills/pptify-slide-spec/SKILL.md deleted file mode 100644 index 590a486..0000000 --- a/awesome-deploy/awesome-copilot/skills/pptify-slide-spec/SKILL.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -name: pptify-slide-spec -description: "Author or repair coordinate-explicit pptify JSON deck specs. Use when writing layout_tree groups, objects, bboxes, tables, images, lines, shapes, type scale, or collision-safe content." ---- - -# PPTify Slide Spec - -Use this skill when writing or repairing a coordinate-explicit JSON deck spec. - -Author final coordinates directly in `layout_tree`; current plugin scripts will not choose layouts, measure browser boxes, or shrink text to fit. Split dense material across slides rather than relying on tiny fonts. - -## Workflow - -1. Define slide messages, design context, and slide size before writing objects. -2. Create each slide with `id`, `title`, and a complete `layout_tree`. -3. Place groups and objects with final inch-based bboxes, z-order, and style values. -4. Add at least one style-derived `layout_design` element on every normal content slide. -5. Audit collisions, text density, font sizes, and default-theme failures before shipping. - -## Deck Shape - -- Return a JSON object with a top-level `slides` array for generated decks. -- Keep slide IDs stable and readable, such as `s01_overview`. -- Use top-level `summary` for deck metadata that belongs in the audit but not on slides. -- When source-backed design context from `pptify-design` is used, record selected profile IDs, source URLs, and license IDs in `summary.design_context`. -- For newly generated decks, `summary.design_context` is required unless a user-provided brand guide or reference PPTX is documented as the primary style source. -- Use `render_mode: "layout"` or omit it for generated decks; OOXML mode is for extracted specs with `ooxml_elements`. -- Every generated slide must include `layout_tree`; do not rely on shorthand layout specs. - -## Slide Fields - -- Each generated slide must include `id`, `title`, and `layout_tree`. -- Use `hidden: true` only for appendix/reference slides that should remain in the PPTX package but not appear during normal presentation. -- Do not use `pattern`, `layout_pattern`, `composition.pattern`, `layout`, `sections`, `bullets`, `objects`, or `theme` as render-time shorthand. -- Do not overfill a slide: prefer three to five major content groups. -- Decide all positions, sizes, z-order, colors, font sizes, and object relationships in the JSON before rendering. -- Do not ship default `python-pptx`-looking slides: plain white background, Calibri-only text, default theme colors, and bullet-only layouts are design failures unless explicitly requested. - -## Layout Tree - -- Include `slide_size` with explicit `width` and `height` in inches. -- Include `root_group_id`. -- Include `groups`, keyed by group ID. -- Include `objects`, keyed by object ID. -- Add `notes` only when notes are useful for audit or speaker context. - -Example skeleton: - -```json -{ - "id": "s01_overview", - "title": "Overview", - "layout_tree": { - "id": "s01_overview", - "title": "Overview", - "slide_size": { "width": 13.333, "height": 7.5 }, - "root_group_id": "root", - "groups": { - "root": { - "id": "root", - "role": "slide", - "layout_mode": "absolute", - "object_ids": ["title"], - "group_ids": [], - "bbox": { "x": 0, "y": 0, "width": 13.333, "height": 7.5 } - } - }, - "objects": { - "title": { - "id": "title", - "kind": "text", - "role": "title", - "classification": "content", - "content": { "text": "Overview" }, - "style": { "font_size": 30, "bold": true, "color": "#111827" }, - "bbox": { "x": 0.75, "y": 0.55, "width": 8.5, "height": 0.65 }, - "z_index": 2 - } - }, - "notes": [] - } -} -``` - -## Groups - -- Each group must include `id`, `role`, `layout_mode`, `object_ids`, `group_ids`, and `bbox`. -- Use `layout_mode: "absolute"` for generated slides to make the coordinate contract explicit. -- Keep group IDs unique and stable so audit repairs can target them. -- Use groups for semantic organization and audit readability; coordinates are still final object coordinates. - -## Objects - -- Every object must include `id`, `kind`, `role`, `classification`, `content`, `style`, `bbox`, and `z_index`. -- Supported `kind` values: `text`, `shape`, `image`, `line`, `table`. -- Supported shape names (`content.shape`): `rect`, `round_rect`, `oval`, `triangle`, `diamond`, `hexagon`, `parallelogram`, `chevron`, `pentagon`, `trapezoid`, and arrow variants. -- Use `classification: "layout_design"` for decorative or background objects. -- Use `classification: "content"` for meaningful text, tables, lines, and media. -- Shape content must include `content.shape`; text on a shape uses `content.text`. -- Image content uses `content.path`, `content.blob_base64`, and `content.alt`. -- Table content uses `content.rows` as a list of row arrays. -- Line content must include `content.x1`, `content.y1`, `content.x2`, and `content.y2`. -- Do not use `chart` objects; render charts as explicit shapes, labels, lines, tables, or file-backed images. - -## Styling - -- Every text-bearing object and table must include `style.font_size` and `style.color`. -- Every line object must include `style.line` and `style.line_width`. -- Every shape object must include `content.shape`, `style.fill`, and `style.line`. -- Specify text color with `style.color`; do not rely on a later tool to infer contrast or default text color. -- Use `z_index` intentionally: low values for backgrounds and decorations, higher for text and foreground content. -- Every normal content slide must include at least one `layout_design` object or style-derived visual structure such as an accent band, card shell, grid, divider rule, signature shape, or image treatment. -- If a vector-traced SVG is provided only for editability, keep the readable raster image in the visible slide and put the SVG on a separate hidden final slide. - -### Type Scale - -| Role | Recommended (pt) | Minimum (pt) | -|---|---|---| -| Slide title | 24–32 | 20 | -| Section heading / H2 | 16–20 | 14 | -| Claim / callout | 13–15 | 12 | -| Body / narrative | 11–12 | 10 | -| Evidence / bullet | 10–11 | 10 | -| Label / caption | 9–10 | 9 | -| Footer / meta (Courier) | 8–9 | 8 | - -Decorative text (`classification: "layout_design"`) such as monogram numerals, rule labels, or background watermarks is exempt from the minimum floor. - -## Repair Rules - -- If content collides, edit bboxes, z-order, grouping, slide density, or split the slide. -- If text overflows, shorten copy, enlarge the bbox, or split content across slides. **Lower `font_size` only as a last resort, and never below the type scale minimum.** -- If an object is misplaced, repair the final coordinates directly; do not add layout hints expecting a later tool to resolve them. diff --git a/awesome-deploy/create-artifacts.ps1 b/awesome-deploy/create-artifacts.ps1 deleted file mode 100644 index cb26360..0000000 --- a/awesome-deploy/create-artifacts.ps1 +++ /dev/null @@ -1,208 +0,0 @@ -param( - [string]$Version = "1.0.0", - [string]$PluginId = "pptify", - [string]$Repository = "https://github.com/github/awesome-copilot", - [string]$AuthorName = "PPTify maintainers" -) - -$ErrorActionPreference = "Stop" - -$scriptPath = $PSCommandPath -if (-not $scriptPath) { - $scriptPath = $MyInvocation.MyCommand.Path -} - -$deployRoot = Split-Path -Parent $scriptPath -$repoRoot = Split-Path -Parent $deployRoot -$awesomeRoot = Join-Path $deployRoot "awesome-copilot" -$pluginRoot = Join-Path $awesomeRoot "plugins\$PluginId" -$pluginMetadataDir = Join-Path $pluginRoot ".github\plugin" -$skillsRoot = Join-Path $awesomeRoot "skills" -$manifestPath = Join-Path $deployRoot "manifest.json" - -function ConvertTo-PrettyJsonFile { - param( - [Parameter(Mandatory = $true)] [object]$InputObject, - [Parameter(Mandatory = $true)] [string]$Path, - [int]$Depth = 10 - ) - - $json = $InputObject | ConvertTo-Json -Depth $Depth - Write-Utf8NoBom -Path $Path -Value $json -} - -function Write-Utf8NoBom { - param( - [Parameter(Mandatory = $true)] [string]$Path, - [Parameter(Mandatory = $true)] [string]$Value - ) - - $encoding = New-Object System.Text.UTF8Encoding $false - [System.IO.File]::WriteAllText($Path, $Value, $encoding) -} - -function Get-RelativeDeployPath { - param([Parameter(Mandatory = $true)] [string]$Path) - - $fullPath = [System.IO.Path]::GetFullPath($Path) - $basePath = [System.IO.Path]::GetFullPath($repoRoot) - if (-not $basePath.EndsWith("\")) { - $basePath = "$basePath\" - } - if ($fullPath.StartsWith($basePath, [System.StringComparison]::OrdinalIgnoreCase)) { - return $fullPath.Substring($basePath.Length).Replace("/", "\") - } - return $fullPath.Replace("/", "\") -} - -Push-Location -LiteralPath $repoRoot -try { - if (Test-Path -LiteralPath $awesomeRoot) { - Remove-Item -LiteralPath $awesomeRoot -Recurse -Force - } - New-Item -ItemType Directory -Path $pluginMetadataDir -Force | Out-Null - New-Item -ItemType Directory -Path $skillsRoot -Force | Out-Null - - $sourceSkillsRoot = Join-Path $repoRoot "pptify-core\skills" - if (-not (Test-Path -LiteralPath $sourceSkillsRoot)) { - throw "Source skills directory not found: $sourceSkillsRoot" - } - - $skills = Get-ChildItem -LiteralPath $sourceSkillsRoot -Directory | - Where-Object { Test-Path -LiteralPath (Join-Path $_.FullName "SKILL.md") } | - Sort-Object Name - - foreach ($skill in $skills) { - $destDir = Join-Path $skillsRoot $skill.Name - New-Item -ItemType Directory -Path $destDir -Force | Out-Null - Copy-Item -Path (Join-Path $skill.FullName "*") ` - -Destination $destDir -Recurse -Force - } - - $pluginJson = [ordered]@{ - name = $PluginId - description = "Generate production-ready PowerPoint decks with pptify skills, source ingestion, design-context selection, coordinate-explicit slide specs, visual assets, runtime tooling, and audit-driven quality gates." - version = $Version - author = [ordered]@{ - name = $AuthorName - } - repository = $Repository - license = "MIT" - keywords = @( - "pptify", - "powerpoint", - "pptx", - "presentations", - "deck-generation", - "slides", - "design-context", - "visual-assets", - "quality-gates" - ) - skills = @($skills | ForEach-Object { "./skills/$($_.Name)/" }) - } - ConvertTo-PrettyJsonFile -InputObject $pluginJson -Path (Join-Path $pluginMetadataDir "plugin.json") - - $readme = @' -# PPTify Plugin - -Generate production-ready PowerPoint decks with pptify skills, source ingestion, design context, coordinate-explicit slide specs, visual assets, runtime tooling, and audit-driven quality gates. - -## Installation - -```bash -copilot plugin install pptify@awesome-copilot -``` - -## What's Included - -### Skills - -| Skill | Description | -| --- | --- | -| `pptify-context-prep` | Prepare source material and design context before authoring a pptify deck spec. | -| `pptify-deck-generation` | Generate PPTX decks end to end from prompts, source material, reference PPTX analysis, coordinate-explicit layout trees, or pptify JSON specs. | -| `pptify-quality-gates` | Validate and repair PPTX artifacts by checking specs, PPTX packages, audits, layout trees, collisions, text overflows, warnings, visual hierarchy, asset layering, and reference deck alignment. | -| `pptify-slide-spec` | Author or repair coordinate-explicit pptify JSON deck specs with layout tree groups, objects, bounding boxes, tables, images, lines, shapes, type scale, and collision-safe content. | -| `pptify-tooling` | Look up pptify install commands, plugin script syntax, and workspace reality checks. | -| `pptify-visual-assets` | Find, generate, and place icons, images, SVGs, raster conversions, infographics, image placeholders, and asset-backed slide objects. | - -## Optional Toolkit - -The bundled skills include reference material for design profile selection and manual quality checks. To run helper scripts for source prep, design context, visual assets, extraction, or audits, users can optionally install the PPTify toolkit from its source repository. The current external toolkit does not provide an importable `pptify` renderer module. - -Do not clone or install the external toolkit automatically. Install it only when the user explicitly asks to use helper scripts: - -```powershell -git clone https://github.com/kimtth/agent-pptify-kit -cd agent-pptify-kit -uv sync # base project -uv sync --extra plugins # add source ingestion and image helpers -``` - -## Usage - -Ask Copilot to create or repair a deck and mention `pptify`. The plugin guides the agent to collect required deck inputs, prepare source and reference context, select a design profile, author a coordinate-explicit JSON spec, build through the available PowerPoint path, and repair audit findings before reporting artifact paths. - -## Source - -Plugin skills are sourced from [kimtth/agent-pptify-kit](https://github.com/kimtth/agent-pptify-kit) for submission to [Awesome Copilot](https://github.com/github/awesome-copilot). - -## License - -MIT -'@ - Write-Utf8NoBom -Path (Join-Path $pluginRoot "README.md") -Value $readme - - $manifest = [ordered]@{ - name = "pptify-awesome-copilot-deploy" - targetRepository = "https://github.com/github/awesome-copilot" - pluginId = $PluginId - version = $Version - description = "Awesome Copilot PR artifacts for PPTify plugin with skills at top-level." - generatedWith = [ordered]@{ - command = "awesome-deploy\create-artifacts.ps1 - copies skill folders from pptify-core\skills\" - } - copyRoot = "awesome-deploy\awesome-copilot" - generator = "awesome-deploy\create-artifacts.ps1" - artifacts = @( - "awesome-deploy\awesome-copilot\plugins\$PluginId\.github\plugin\plugin.json", - "awesome-deploy\awesome-copilot\plugins\$PluginId\README.md", - "awesome-deploy\awesome-copilot\skills" - ) - validationCommands = @( - "npm install", - "npm run plugin:validate", - "npm run build" - ) - } - ConvertTo-PrettyJsonFile -InputObject $manifest -Path $manifestPath - - $requiredPaths = @( - (Join-Path $pluginMetadataDir "plugin.json"), - (Join-Path $pluginRoot "README.md") - ) - foreach ($skill in $skills) { - $sourceFiles = Get-ChildItem -LiteralPath $skill.FullName -Recurse -File - foreach ($sourceFile in $sourceFiles) { - $relativePath = $sourceFile.FullName.Substring($skill.FullName.Length).TrimStart("\", "/") - $requiredPaths += Join-Path (Join-Path $skillsRoot $skill.Name) $relativePath - } - } - foreach ($path in $requiredPaths) { - if (-not (Test-Path -LiteralPath $path)) { - throw "Required artifact missing: $(Get-RelativeDeployPath -Path $path)" - } - } - - $fileCount = (Get-ChildItem -LiteralPath $deployRoot -Recurse -File | Measure-Object).Count - $sizeBytes = (Get-ChildItem -LiteralPath $deployRoot -Recurse -File | Measure-Object Length -Sum).Sum - - Write-Host "Created deploy artifacts for '$PluginId'." - Write-Host "Skills root: $(Get-RelativeDeployPath -Path $skillsRoot)" - Write-Host "Skills copied: $($skills.Count)" - Write-Host ("Deploy tree: {0} files, {1:N2} MB" -f $fileCount, ($sizeBytes / 1MB)) -} -finally { - Pop-Location -} diff --git a/awesome-deploy/manifest.json b/awesome-deploy/manifest.json deleted file mode 100644 index 920e3c8..0000000 --- a/awesome-deploy/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "pptify-awesome-copilot-deploy", - "targetRepository": "https://github.com/github/awesome-copilot", - "pluginId": "pptify", - "version": "1.0.0", - "description": "Awesome Copilot PR artifacts for PPTify plugin with skills at top-level.", - "generatedWith": { - "command": "awesome-deploy\\create-artifacts.ps1 - copies skill folders from pptify-core\\skills\\" - }, - "copyRoot": "awesome-deploy\\awesome-copilot", - "generator": "awesome-deploy\\create-artifacts.ps1", - "artifacts": [ - "awesome-deploy\\awesome-copilot\\plugins\\pptify\\.github\\plugin\\plugin.json", - "awesome-deploy\\awesome-copilot\\plugins\\pptify\\README.md", - "awesome-deploy\\awesome-copilot\\skills" - ], - "validationCommands": [ - "npm install", - "npm run plugin:validate", - "npm run build" - ] -} \ No newline at end of file diff --git a/copilot-instruction.md b/copilot-instruction.md index 11a4074..bf7fd09 100644 --- a/copilot-instruction.md +++ b/copilot-instruction.md @@ -6,13 +6,13 @@ After running `pptify install`, agents should read and use: - `./.agent/pptify-policy.md` for developer-protection and quality rules. - `./.agent/skills/pptify-*` for deck-generation skills. -- `./.agent/workflows` for end-to-end workflow prompts. -- `./.agent/pptify-design` for predefined design profiles and template context. -- `./.agent/pptify-plugin` for source ingestion, design context loading, visual assets, extraction, and audit tools. -- `./.agent/.env.template` for image-provider configuration when credentials are needed. +- `./.agent/agents/pptify-deck-builder.agent.md` for the end-to-end deck-generation workflow. +- `./.agent/resources/design` for predefined design profiles and template context. +- `./.agent/scripts` for source ingestion, design context loading, visual assets, extraction, and audit tools. +- `./.agent/resources/env.template` for image-provider configuration when credentials are needed. -When image generation needs OpenAI or Azure OpenAI settings, create `./.agent/.env` from `./.agent/.env.template` and have the user fill secrets directly in that file. Do not ask for secrets in chat or prompt dialogs. +When image generation needs OpenAI or Azure OpenAI settings, create `./.agent/.env` from `./.agent/resources/env.template` and have the user fill secrets directly in that file. Do not ask for secrets in chat or prompt dialogs. -For every new generated deck, choose and load a `pptify-design` profile before authoring slides unless a user-provided brand guide or reference PPTX is the primary style source. Default to `fluent-ui-design-tokens`; for developer decks use `primer-primitives`; for consulting/governance decks use `likaku-mck-ppt-design-skill`; use `corazzon-pptx-design-styles` only when a broader modern style catalog is explicitly useful. Record the selected profile and style lock in `summary.design_context`. Plain white, Calibri-only, bullet-heavy `python-pptx`-looking decks are not production-ready. +For every new generated deck, choose and load a `resources/design` profile before authoring slides unless a user-provided brand guide or reference PPTX is the primary style source. Default to `fluent-ui-design-tokens`; for developer decks use `primer-primitives`; for consulting/governance decks use `likaku-mck-ppt-design-skill`; use `corazzon-pptx-design-styles` only when a broader modern style catalog is explicitly useful. Record the selected profile and style lock in `summary.design_context`. Plain white, Calibri-only, bullet-heavy `python-pptx`-looking decks are not production-ready. The supported runtime install surface is `./.agent`. diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..06d9ec2 --- /dev/null +++ b/plugin.json @@ -0,0 +1,21 @@ +{ + "name": "pptify-plugin", + "description": "Generate production-ready PowerPoint decks with pptify skills, source ingestion, design-context selection, coordinate-explicit slide specs, visual assets, runtime tooling, and audit-driven quality gates.", + "version": "0.0.1", + "author": { + "name": "kimtth" + }, + "repository": "https://github.com/kimtth/agent-pptify-kit", + "license": "MIT", + "keywords": [ + "pptify", + "powerpoint", + "pptx", + "presentations", + "slidedecks", + "slides", + "pptx-generation" + ], + "skills": "skills/", + "agents": "agents/" +} diff --git a/pptify-cli/README.md b/pptify-cli/README.md index 1d9124f..009119f 100644 --- a/pptify-cli/README.md +++ b/pptify-cli/README.md @@ -2,17 +2,17 @@ Production install surface for the pptify generic coding-agent skill extension. -`pptify-cli` copies the pptify skill set from `pptify-core/skills/` into the -local agent home (`./.agent/`), copies the predefined design context, plugin -tool set, and `.env.template`, seeds a default developer-protection policy, and +`pptify-cli` copies the pptify agent and skill set from root-level `agents/` +and `skills/` into the local agent home (`./.agent/`), copies the predefined design context, plugin +tool set, and `resources/env.template`, seeds a default developer-protection policy, and provides explicit lifecycle commands. -Runtime dependencies: `pptify-core`, `pptify-design`, `pptify-plugin`. +Runtime dependencies: `agents`, `skills`, `resources/design`, `scripts`. ## Commands ```powershell -pptify install # copy skills, workflows, plugin/design assets, policy into ./.agent/ +pptify install # copy agents, skills, plugin/design assets, policy into ./.agent/ pptify install --dry-run # preview without writing files pptify install --home # install into /.agent (e.g. temp/pptify-install-test/.agent) @@ -30,11 +30,11 @@ pptify help --profile # print full JSON for one design profile | Artifact | Destination | | --- | --- | -| `pptify-core/skills/pptify-*/SKILL.md` | `./.agent/skills/pptify-*/SKILL.md` | -| `pptify-core/workflows/*.md` | `./.agent/workflows/*.md` | -| `pptify-plugin/` | `./.agent/pptify-plugin/` | -| `pptify-design/` | `./.agent/pptify-design/` | -| `.env.template` | `./.agent/.env.template` | +| `agents/*.agent.md` | `./.agent/agents/*.agent.md` | +| `skills/pptify-*/SKILL.md` | `./.agent/skills/pptify-*/SKILL.md` | +| `scripts/` | `./.agent/scripts/` | +| `resources/design/` | `./.agent/resources/design/` | +| `resources/env.template` | `./.agent/resources/env.template` | | Developer-protection policy | `./.agent/pptify-policy.md` | | Generic agent instruction | `./.agent/copilot-instruction.md` | @@ -90,8 +90,8 @@ pptify help --designs Or load profile context directly: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile primer-primitives --include-context --pretty +uv run python scripts/design/design_context_catalog.py --list --pretty +uv run python scripts/design/design_context_catalog.py --profile primer-primitives --include-context --pretty ``` | Profile | Best for | diff --git a/pptify-cli/__main__.py b/pptify-cli/__main__.py index a2d025a..a986f11 100644 --- a/pptify-cli/__main__.py +++ b/pptify-cli/__main__.py @@ -30,19 +30,19 @@ _CLI_DIR = Path(__file__).parent # pptify-cli/ _REPO_ROOT = _CLI_DIR.parent # workspace root -_SKILLS_SRC = _REPO_ROOT / "pptify-core" / "skills" -_WORKFLOWS_SRC = _REPO_ROOT / "pptify-core" / "workflows" -_DESIGN_SRC = _REPO_ROOT / "pptify-design" +_AGENTS_SRC = _REPO_ROOT / "agents" +_SKILLS_SRC = _REPO_ROOT / "skills" +_DESIGN_SRC = _REPO_ROOT / "resources" / "design" _DESIGN_CATALOG = _DESIGN_SRC / "sources.json" -_PLUGIN_ROOT = _REPO_ROOT / "pptify-plugin" -_ENV_TEMPLATE_SRC = _REPO_ROOT / ".env.template" +_PLUGIN_ROOT = _REPO_ROOT / "scripts" +_ENV_TEMPLATE_SRC = _REPO_ROOT / "resources" / "env.template" _AGENT_HOME = Path.cwd() / ".agent" +_AGENTS_DST = _AGENT_HOME / "agents" _SKILLS_DST = _AGENT_HOME / "skills" -_WORKFLOWS_DST = _AGENT_HOME / "workflows" -_PLUGIN_DST = _AGENT_HOME / "pptify-plugin" -_DESIGN_DST = _AGENT_HOME / "pptify-design" -_ENV_TEMPLATE_DST = _AGENT_HOME / ".env.template" +_PLUGIN_DST = _AGENT_HOME / "scripts" +_DESIGN_DST = _AGENT_HOME / "resources" / "design" +_ENV_TEMPLATE_DST = _AGENT_HOME / "resources" / "env.template" _POLICY_DST = _AGENT_HOME / "pptify-policy.md" _INSTRUCTIONS_DST = _AGENT_HOME / "copilot-instruction.md" @@ -89,16 +89,16 @@ ## Quality Gates - Production-ready decks must have zero content collisions (verified by - `pptify-plugin/audit/audit.py`). + `scripts/audit/audit.py`). - Production-ready decks must have zero text overflows. - No `classification: "content"` object may use `style.font_size` below 9 pt. ## Asset and Design Boundaries - Do not copy external fonts, icons, images, or binary assets without explicit - license metadata and source attribution in `pptify-design/sources.json` or - `pptify-design/third-party-notices.md`. -- For every new generated deck, load a profile from `pptify-design/sources.json` + license metadata and source attribution in `resources/design/sources.json` or + `resources/design/third-party-notices.md`. +- For every new generated deck, load a profile from `resources/design/sources.json` unless a user-provided brand guide or reference PPTX is the primary style source. Do not invent a new design template. - Production-ready decks must record selected profile IDs, source URLs, and @@ -126,17 +126,17 @@ ## Installed Context +- Agents: `./.agent/agents/*.agent.md` - Skills: `./.agent/skills/pptify-*` -- Workflows: `./.agent/workflows` -- Design profiles and predefined templates: `./.agent/pptify-design` -- Plugin tool set: `./.agent/pptify-plugin` -- Image provider environment template: `./.agent/.env.template` +- Design profiles and predefined templates: `./.agent/resources/design` +- Plugin tool set: `./.agent/scripts` +- Image provider environment template: `./.agent/resources/env.template` - Developer-protection policy: `./.agent/pptify-policy.md` ## Agent Rules - Read `./.agent/pptify-policy.md` before generating or repairing a deck. -- For every new generated deck, choose and load a `./.agent/pptify-design` +- For every new generated deck, choose and load a `./.agent/resources/design` profile before authoring slides unless a user-provided brand guide or reference PPTX is the primary style source. Default to `fluent-ui-design-tokens`; for developer decks use `primer-primitives`; for @@ -147,10 +147,10 @@ and signature elements in `summary.design_context`. - Treat plain white, Calibri-only, bullet-heavy `python-pptx`-looking output as not production-ready. -- Use scripts under `./.agent/pptify-plugin` for source ingestion, design +- Use scripts under `./.agent/scripts` for source ingestion, design context loading, visual assets, PPTX extraction, and audit checks. - When image generation needs provider configuration or credentials, create - `./.agent/.env` from `./.agent/.env.template` and have the user fill secrets + `./.agent/.env` from `./.agent/resources/env.template` and have the user fill secrets directly in that file. Do not ask for secrets in chat or prompt dialogs. - Keep generated specs coordinate-explicit and preserve source/license metadata from the selected design profile. @@ -163,56 +163,56 @@ _PLUGINS: list[dict] = [ { "id": "audit", - "path": "pptify-plugin/audit/audit.py", + "path": "scripts/audit/audit.py", "description": "Check content-region collisions and text overflows in layout-tree JSON specs.", - "usage": "uv run python pptify-plugin/audit/audit.py --json", + "usage": "uv run python scripts/audit/audit.py --json", }, { "id": "design-context-catalog", - "path": "pptify-plugin/design/design_context_catalog.py", - "description": "List or load source-backed design context profiles from pptify-design.", - "usage": "uv run python pptify-plugin/design/design_context_catalog.py --list --pretty", + "path": "scripts/design/design_context_catalog.py", + "description": "List or load source-backed design context profiles from resources/design.", + "usage": "uv run python scripts/design/design_context_catalog.py --list --pretty", }, { "id": "document-to-markdown", - "path": "pptify-plugin/documents/document_to_markdown.py", + "path": "scripts/documents/document_to_markdown.py", "description": "Convert documents (PDF, DOCX, HTML) to Markdown using MarkItDown.", - "usage": "uv run python pptify-plugin/documents/document_to_markdown.py --input doc.pdf --output doc.md", + "usage": "uv run python scripts/documents/document_to_markdown.py --source doc.pdf --output-path doc.md", }, { "id": "document-to-raptor-tree", - "path": "pptify-plugin/documents/document_to_raptor_tree.py", - "description": "Build a deterministic RAPTOR-style summary tree from a Markdown corpus.", - "usage": "uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown '# Source' --output-path tree.json --pretty", + "path": "scripts/documents/document_to_raptor_tree.py", + "description": "Build a RAPTOR-style summary tree from a Markdown corpus, using local ONNX embeddings when available.", + "usage": "uv run python scripts/documents/document_to_raptor_tree.py --markdown '# Source' --output-path tree.json --pretty", }, { "id": "iconify-search", - "path": "pptify-plugin/images/iconfy_search.py", + "path": "scripts/images/iconfy_search.py", "description": "Search Iconify for SVG icon candidates (Fluent, Material, etc.).", - "usage": "uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --pretty", + "usage": "uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --pretty", }, { "id": "web-image-search", - "path": "pptify-plugin/images/web_image_search.py", + "path": "scripts/images/web_image_search.py", "description": "Return web image candidates for a search query.", - "usage": "uv run python pptify-plugin/images/web_image_search.py --query 'cloud governance' --pretty", + "usage": "uv run python scripts/images/web_image_search.py --query 'cloud governance' --pretty", }, { "id": "raster-image-to-svg", - "path": "pptify-plugin/images/raster_image_to_svg.py", + "path": "scripts/images/raster_image_to_svg.py", "description": "Wrap a raster image as SVG or vector-trace it using vtracer.", - "usage": "uv run python pptify-plugin/images/raster_image_to_svg.py --input image.png --output image.svg --pretty", + "usage": "uv run python scripts/images/raster_image_to_svg.py --source image.png --output-path image.svg --pretty", }, { "id": "text-prompt-to-infographic", - "path": "pptify-plugin/images/text_prompt_to_infographic.py", + "path": "scripts/images/text_prompt_to_infographic.py", "description": ( "Generate infographic images via OpenAI or Azure OpenAI. " - "No local fallback provider. Create .env from .env.template " + "No local fallback provider. Create .env from resources/env.template " "when credentials or provider settings are required; never pass API keys as CLI arguments." ), "usage": ( - "uv run python pptify-plugin/images/text_prompt_to_infographic.py " + "uv run python scripts/images/text_prompt_to_infographic.py " "--provider azure-openai --azure-endpoint " "--model --prompt 'Cloud governance roadmap' " "--output-path infographic.png --pretty" @@ -220,20 +220,20 @@ }, { "id": "pptx-extractor", - "path": "pptify-plugin/extraction/pptx_extractor.py", + "path": "scripts/extraction/pptx_extractor.py", "description": "Importable PPTX extraction helper (load with importlib; not a CLI script).", "usage": ( "importlib.util.spec_from_file_location(" - "'pptx_extractor', 'pptify-plugin/extraction/pptx_extractor.py')" + "'pptx_extractor', 'scripts/extraction/pptx_extractor.py')" ), }, { "id": "pptx-style-master", - "path": "pptify-plugin/extraction/pptx_style_master.py", + "path": "scripts/extraction/pptx_style_master.py", "description": "Importable PPTX style-master analysis helper (load with importlib; not a CLI script).", "usage": ( "importlib.util.spec_from_file_location(" - "'pptx_style_master', 'pptify-plugin/extraction/pptx_style_master.py')" + "'pptx_style_master', 'scripts/extraction/pptx_style_master.py')" ), }, ] @@ -264,16 +264,19 @@ def _copy_tree(src: Path, dst: Path) -> None: def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: - """Copy pptify skills, workflows, tools, design context, instructions, and policy.""" + """Copy pptify agents, skills, tools, design context, instructions, and policy.""" home = agent_home or _AGENT_HOME + agents_dst = home / "agents" skills_dst = home / "skills" - workflows_dst = home / "workflows" - plugin_dst = home / "pptify-plugin" - design_dst = home / "pptify-design" - env_template_dst = home / ".env.template" + plugin_dst = home / "scripts" + design_dst = home / "resources" / "design" + env_template_dst = home / "resources" / "env.template" policy_dst = home / "pptify-policy.md" instructions_dst = home / "copilot-instruction.md" + if not _AGENTS_SRC.is_dir(): + print(f"ERROR: Agents source not found: {_AGENTS_SRC}", file=sys.stderr) + sys.exit(1) if not _SKILLS_SRC.is_dir(): print(f"ERROR: Skills source not found: {_SKILLS_SRC}", file=sys.stderr) sys.exit(1) @@ -288,10 +291,21 @@ def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: sys.exit(1) if not dry_run: + agents_dst.mkdir(parents=True, exist_ok=True) skills_dst.mkdir(parents=True, exist_ok=True) + installed_agents: list[str] = [] installed_skills: list[str] = [] + for agent_file in sorted(_AGENTS_SRC.glob("*.agent.md")): + dst = agents_dst / agent_file.name + if dry_run: + print(f" [dry-run] Would install agent: {agent_file.name} -> {dst}") + else: + shutil.copy2(agent_file, dst) + print(f" Installed agent: {agent_file.name} -> {dst}") + installed_agents.append(agent_file.name) + for skill_dir in sorted(_SKILLS_SRC.iterdir()): if not skill_dir.is_dir() or not skill_dir.name.startswith(_SKILL_PREFIX): continue @@ -305,20 +319,6 @@ def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: print(f" Installed skill: {skill_dir.name} -> {dst}") installed_skills.append(skill_dir.name) - # Workflow prompts - if _WORKFLOWS_SRC.is_dir(): - if not dry_run: - workflows_dst.mkdir(parents=True, exist_ok=True) - for wf_file in sorted(_WORKFLOWS_SRC.iterdir()): - if not wf_file.is_file(): - continue - dst = workflows_dst / wf_file.name - if dry_run: - print(f" [dry-run] Would install workflow: {wf_file.name} -> {dst}") - else: - shutil.copy2(wf_file, dst) - print(f" Installed workflow: {wf_file.name} -> {dst}") - # Plugin tool set and predefined design context for label, src, dst in ( ("plugin tool set", _PLUGIN_ROOT, plugin_dst), @@ -336,6 +336,7 @@ def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: elif env_template_dst.exists(): print(f" SKIP env template (already exists): {env_template_dst}") else: + env_template_dst.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(_ENV_TEMPLATE_SRC, env_template_dst) print(f" Installed env template: {env_template_dst}") @@ -357,7 +358,7 @@ def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: else: print(f" SKIP instructions (user-owned, no sentinel): {instructions_dst}") - msg = f"pptify installed: {len(installed_skills)} skill(s) to {skills_dst}" + msg = f"pptify installed: {len(installed_agents)} agent(s) to {agents_dst}; {len(installed_skills)} skill(s) to {skills_dst}" print(f"\n{('[dry-run] ' if dry_run else '')}{msg}") @@ -369,16 +370,32 @@ def _install(dry_run: bool = False, agent_home: Path | None = None) -> None: def _uninstall(dry_run: bool = False, agent_home: Path | None = None) -> None: """Remove installed pptify assets from the user's agent home.""" home = agent_home or _AGENT_HOME + agents_dst = home / "agents" skills_dst = home / "skills" - workflows_dst = home / "workflows" - plugin_dst = home / "pptify-plugin" - design_dst = home / "pptify-design" + plugin_dst = home / "scripts" + design_dst = home / "resources" / "design" + env_template_dst = home / "resources" / "env.template" policy_dst = home / "pptify-policy.md" instructions_dst = home / "copilot-instruction.md" removed: list[str] = [] removed_assets = 0 + if agents_dst.is_dir(): + installed_agent_names = { + p.name for p in _AGENTS_SRC.glob("*.agent.md") + } if _AGENTS_SRC.is_dir() else set() + for agent_file in sorted(agents_dst.iterdir()): + if agent_file.is_file() and agent_file.name in installed_agent_names: + if dry_run: + print(f" [dry-run] Would remove agent: {agent_file}") + else: + agent_file.unlink() + print(f" Removed agent: {agent_file}") + removed_assets += 1 + if not dry_run and agents_dst.is_dir() and not any(agents_dst.iterdir()): + agents_dst.rmdir() + if skills_dst.is_dir(): for skill_dir in sorted(skills_dst.iterdir()): if skill_dir.is_dir() and skill_dir.name.startswith(_SKILL_PREFIX): @@ -424,24 +441,17 @@ def _uninstall(dry_run: bool = False, agent_home: Path | None = None) -> None: print(f" Removed {label}: {dst}") removed_assets += 1 - if workflows_dst.is_dir(): - wf_removed: list[str] = [] - installed_workflow_names = { - p.name for p in _WORKFLOWS_SRC.iterdir() - if p.is_file() - } if _WORKFLOWS_SRC.is_dir() else set() - for wf_file in sorted(workflows_dst.iterdir()): - if wf_file.is_file() and wf_file.name in installed_workflow_names: - if dry_run: - print(f" [dry-run] Would remove workflow: {wf_file}") - else: - wf_file.unlink() - print(f" Removed workflow: {wf_file}") - wf_removed.append(wf_file.name) - removed_assets += 1 - if wf_removed and not _any_non_pptify_files(workflows_dst): - if not dry_run: - workflows_dst.rmdir() + if env_template_dst.exists(): + if dry_run: + print(f" [dry-run] Would remove env template: {env_template_dst}") + else: + env_template_dst.unlink() + print(f" Removed env template: {env_template_dst}") + removed_assets += 1 + + resources_dst = home / "resources" + if resources_dst.is_dir() and not any(resources_dst.iterdir()) and not dry_run: + resources_dst.rmdir() if removed_assets == 0 and not removed: print(f"pptify is not installed in {home}.") @@ -450,14 +460,6 @@ def _uninstall(dry_run: bool = False, agent_home: Path | None = None) -> None: msg = f"pptify uninstalled: {len(removed)} skill(s) removed from {skills_dst}" print(f"\n{('[dry-run] ' if dry_run else '')}{msg}") - -def _any_non_pptify_files(directory: Path) -> bool: - return any( - p for p in directory.iterdir() - if not p.name.startswith(_SKILL_PREFIX) - ) - - # --------------------------------------------------------------------------- # Help # --------------------------------------------------------------------------- @@ -515,7 +517,7 @@ def _print_designs() -> None: print() print("Load a profile:") - print(" uv run python pptify-plugin/design/design_context_catalog.py \\") + print(" uv run python scripts/design/design_context_catalog.py \\") print(" --profile --include-context --pretty") print() print("Show detail: pptify help --profile ") @@ -575,11 +577,11 @@ def _build_parser() -> argparse.ArgumentParser: # install install_p = subparsers.add_parser( "install", - help="Install pptify skills, tools, design context, instructions, and policy into ./.agent/.", + help="Install pptify agents, skills, tools, design context, instructions, and policy into ./.agent/.", description=( - "Copy all pptify-* skills from pptify-core/skills/ into " - "./.agent/skills/, copy workflow prompts from pptify-core/workflows/ " - "into ./.agent/workflows/, copy pptify-plugin/ and pptify-design/ " + "Copy pptify agents from agents/ into ./.agent/agents/, " + "copy all pptify-* skills from skills/ into ./.agent/skills/, " + "copy scripts/ and resources/design/ " "into ./.agent/, and seed the developer-protection policy and " "agent instruction file." ), @@ -600,10 +602,11 @@ def _build_parser() -> argparse.ArgumentParser: "uninstall", help="Remove installed pptify assets from ./.agent/.", description=( - "Remove all pptify-* skill directories from ./.agent/skills/, " - "remove workflow files installed by pptify, delete " + "Remove installed pptify agents from ./.agent/agents/, " + "remove all pptify-* skill directories from ./.agent/skills/, " + "delete " "./.agent/pptify-policy.md and ./.agent/copilot-instruction.md, " - "and remove ./.agent/pptify-plugin/ and ./.agent/pptify-design/." + "and remove ./.agent/scripts/ and ./.agent/resources/design/." ), ) uninstall_p.add_argument( @@ -622,8 +625,8 @@ def _build_parser() -> argparse.ArgumentParser: "help", help="List available design profiles and plugin scripts.", description=( - "Show available pptify design profiles (from pptify-design/sources.json) " - "and plugin scripts (from pptify-plugin/). " + "Show available pptify design profiles (from resources/design/sources.json) " + "and plugin scripts (from scripts/). " "With no flags, both sections are shown." ), ) diff --git a/pptify-core/README.md b/pptify-core/README.md deleted file mode 100644 index b0760d3..0000000 --- a/pptify-core/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# pptify-core - -Agent Skills and workflow prompts for GitHub Copilot CLI, the VS Code GitHub Copilot extension, and generic coding agents live here. The old Python GitHub Copilot SDK provider has been removed. This workspace snapshot does not contain an importable `pptify/` core package or `python -m pptify` CLI. - -Agents use the files in `skills/` and `workflows/` as guidance for choosing standalone plugin tools, authoring coordinate-explicit JSON or generation scripts, using source and asset plugins, and repairing layout issues. Restore the core renderer package before relying on historical render/analyze/extract CLI commands. - -## Prompt Assets - -The `skills/` directory uses the Agent Skills standard: each skill is a lowercase hyphenated directory with a required `SKILL.md` file containing YAML frontmatter with `name` and `description`. - -The current skill set covers: - -- PPTX tooling and plugin selection. -- JSON deck spec authoring. -- Source and reference PPTX ingestion. -- Source-backed predefined design templates and design-system context from `pptify-design`. -- Visual asset generation and placement. -- Production-ready slide structure rules. -- Audit-based quality gates. -- End-to-end deck generation workflow. - -For GitHub Copilot project-level discovery, this repository also includes `.github/skills/pptify-pptx-generation/SKILL.md`, which points agents at the pptify deck-generation workflow and package-local skill set. - -## E2E Workflow - -1. Collect missing required workflow and artifact inputs with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent) before creating files or running helpers. -2. For source-backed, URL-based, or multi-source decks, prepare a markdown corpus and RAPTOR summary with the document plugins before authoring slides. Use `pptify-plugin/extraction` helpers or package inspection when a reference deck or reconstruction path is needed. -3. Prepare design context with `pptify-plugin/design/design_context_catalog.py` for every new deck unless a user-provided brand guide or reference PPTX is the primary style source. Default to `fluent-ui-design-tokens` and record the style lock in `summary.design_context`; use `corazzon-pptx-design-styles` only when a broader modern style catalog is explicitly useful. -4. Ask GitHub Copilot CLI or the VS Code GitHub Copilot extension to generate `deck-spec.json` using the project skill and package-local skills. -5. If the core renderer package is restored, render the spec with `uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json`. Otherwise build with the available PowerPoint generation path and keep plugin evidence/audits beside the PPTX. -6. Check the audit or package inspection for collisions, overflows, warnings, and design-context failures. Plain white, Calibri-only, bullet-heavy `python-pptx`-looking decks are not production-ready. - -## Image Generation Access - -For text-to-image or infographic generation, use `.env` for provider configuration and credentials. If `.env` is missing, create it from `.env.template` and ask the user to fill the required values directly in that file before running the helper. Do not ask the user to paste API keys, tokens, or connection strings into chat or a prompt input dialog. - -For OpenAI image generation, configure `PPTIFY_IMAGE_PROVIDER=openai`, `OPENAI_API_KEY`, and optionally `OPENAI_IMAGE_MODEL` in `.env`. The helper defaults to `gpt-image-1` when the model is unspecified. - -The image helper has no local fallback provider. Agents must record an attempt manifest with provider, model or deployment, auth mode, prompt path, output path, status, and error details when generation fails. - -For Azure `gpt-image-2` or `gpt-image-2.0` infographic generation, configure these values in `.env`: - -- `PPTIFY_IMAGE_PROVIDER=azure-openai`. -- `AZURE_OPENAI_ENDPOINT`, for example `https://.services.ai.azure.com/openai/v1`. -- `AZURE_OPENAI_IMAGE_DEPLOYMENT`, for example `gpt-image-2` or the user's exact deployment name. -- Image size, defaulting to `1024x1024`. -- Auth method: Azure CLI/Entra auth or API-key auth. -- `AZURE_OPENAI_TIMEOUT`, optional, defaulting to `300`. - -Use Azure CLI/Entra auth by running `az login`. For API-key auth, fill `AZURE_OPENAI_API_KEY`, `AZURE_AI_API_KEY`, or `OPENAI_API_KEY` in `.env`. `.env` is git-ignored; never commit it. - -Run the image helper with the collected non-secret values: - -```powershell -Copy-Item .env.template .env -# Edit .env, then run: -uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty -``` - -For OpenAI image generation, run the helper with the collected non-secret values after the user confirms access is configured. - -Example: - -```powershell -uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty -``` diff --git a/pptify-core/skills/pptify-context-prep/SKILL.md b/pptify-core/skills/pptify-context-prep/SKILL.md deleted file mode 100644 index 0b8aa65..0000000 --- a/pptify-core/skills/pptify-context-prep/SKILL.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -name: pptify-context-prep -description: "Prepare source material and design context before authoring a pptify deck spec. Use when converting documents, building RAPTOR summaries, analyzing reference PPTX decks, or selecting and loading pptify-design profiles." ---- - -# PPTify Context Prep - -> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, follow the install or graceful-degradation steps there before continuing. - -Use this skill before writing a deck spec. It covers two parallel preparation tracks: **source context** (documents, research, reference PPTX) and **design context** (predefined style profiles from `pptify-design`). - -## Source Documents - -- Convert long source documents to markdown before planning slides: `uv run python pptify-plugin/documents/document_to_markdown.py --source source.pdf --output-path source.md`. -- Build a structured summary tree when a source is long or multi-topic: `uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown-path source.md --output-path source-summary.json --title "Source" --pretty`. -- For URL-based, topic-plus-research, source-backed, or multi-source decks, combine converted/downloaded source markdown into a corpus and run the RAPTOR summary before slide planning, even when individual sources are short. -- Record the corpus path, summary path, source count, and source URLs in `summary.source_enrichment` so enrichment evidence survives review. -- Use the summary tree to identify audience, thesis, slide sequence, evidence, risks, and decision points. -- Do not paste entire long documents into the deck spec; summarize into concise slide messages and cite sources in footers when needed. - -## Reference PPTX - -- Use the importable helpers in `pptify-plugin/extraction` or package inspection to inspect production complexity, slide text, style, brand, template, and layout-rhythm facts. The `python -m pptify --analyze-pptx` command is unavailable unless the core renderer package is restored. -- Use the extracted facts as agent context when the new deck should follow a source deck's language, slide count, topic sequence, executive tone, colors, fonts, template conventions, and layout rhythm. -- When authoring the new spec, translate `brands.primary_color`, `brands.accent_colors`, `brands.fonts`, `template.slide_size`, `template.layout_usage`, and `layout.slides[*].dominant_flow` into explicit `layout_tree` primitives, colors, typography, spacing, and coordinates. -- Use extraction helpers when the goal is reconstructing or preserving an existing production deck rather than authoring a new editable deck. -- For new editable decks, treat reference layout rhythm as prompt context; generated coordinates must be authored directly by the agent in `layout_tree`. -- Never copy or mutate a referenced PPTX as the generation strategy. Use analysis as context and build a new PPTX artifact. - -## Design Profile Selection - -Load [`references/design-profiles.md`](references/design-profiles.md) for the full profile catalog with IDs, `best_for` guidance, key style signals, and license information. Use it whether or not the toolkit is installed — when the toolkit is present, it cross-checks the catalog with the live output of `design_context_catalog.py`. - -Use profiles from `pptify-design/sources.json`; do not invent a new design template when the user asks for predefined templates. - -- Use `fluent-ui-design-tokens` as the default for new decks, including Microsoft, M365, Teams, Power Platform, enterprise-aligned, general modern, stylish, product, app, pitch, or unspecified visual style requests. -- Use `primer-primitives` for GitHub-style product, developer, or token-driven engineering decks. -- Use `corazzon-pptx-design-styles` when a broader modern style catalog or multiple visual direction options are explicitly useful. Pick one style from the catalog and lock its palette, typography, spacing, and signature element before layout planning. -- Use `likaku-mck-ppt-design-skill` for consulting, strategy, governance, or operations decks that need action-title discipline and structured native PPTX layouts. -- Use `awesome-copilot-design-agents` when the agent prompt itself needs design review, UX discovery, visual hierarchy, or accessibility framing. -- Keep source attribution and license metadata attached to the context used. -- If no catalog profile fits, use reference PPTX analysis, search for another public source, or ask the user for a source template. -- Record selected profile IDs, source URLs, and style lock details in `summary.design_context` before building the PPTX. - -Load profiles: - -```powershell -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile primer-primitives --include-context --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile corazzon-pptx-design-styles --include-context --pretty -``` - -## Applying Context to Spec Authoring - -1. Put the selected profile payload into the agent context before writing `deck-spec.json`. -2. Translate source signals into explicit `layout_tree` objects, colors, fills, lines, typography, spacing, bboxes, and z-order. -3. Keep meaningful slide content as `classification: "content"` objects and decorative/background elements as `classification: "layout_design"` objects. -4. Use source CSS or reference deck rhythm only as design evidence; final coordinates must be authored directly in inches. -5. Add at least one style-derived visible design element to every normal content slide: accent band, rule, card shell, grid cell, diagram primitive, shape motif, image treatment, or pattern. A plain title-plus-bullets slide fails the design gate. -6. Do not treat `pptify-design` profiles as content source material; they are design context only. - -## Source-to-Deck Planning - -- Convert source material into one message per slide before authoring visual structure. -- Treat charts and dashboard-style slides as source-evidence-driven exhibits; do not create generic metric or dashboard slides when the source corpus does not provide relevant data. -- Preserve important terminology, product names, metrics, dates, and user-provided wording. -- Reduce dense narrative into executive slide titles plus short sections. -- Track open assumptions in speaker notes or audit-facing summary fields instead of overcrowding slides. - -## Restrictions - -- Do not copy external fonts, icon packs, photos, or binary assets unless their license and source are explicitly added. -- Do not claim the output is a Primer, Fluent UI, or Awesome Copilot artifact; these are context sources for a new `pptify` deck. -- Do not let source CSS override pptify quality gates: built decks still need zero content collisions and zero text overflows. -- Do not accept default PowerPoint theme colors, Calibri-only text boxes, plain white backgrounds, or placeholder-style bullet layouts as a finished design. diff --git a/pptify-core/skills/pptify-deck-generation/SKILL.md b/pptify-core/skills/pptify-deck-generation/SKILL.md deleted file mode 100644 index c222fad..0000000 --- a/pptify-core/skills/pptify-deck-generation/SKILL.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -name: pptify-deck-generation -description: "Generate PPTX decks end to end with pptify. Use when creating PowerPoint slides from prompts, source material, reference PPTX analysis, coordinate-explicit layout trees, or pptify JSON specs." ---- - -# PPTify Deck Generation - -Use this skill when a Copilot or coding agent needs to generate PPTX slides with `pptify`. - -## Intake - -1. Before creating workflow artifacts, collect any missing required inputs with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent). Batch concise questions, offer sensible defaults for optional fields, and continue after the user answers. -2. Identify the audience, decision, business framework, core narrative, required language, target slide count, source material, reference PPTX, branding constraints, output artifact paths, and delivery deadline. -3. If the user gives only a topic, create a reasonable executive narrative and mark assumptions in the generated spec summary. When the request asks for web research, source-backed content, or data enrichment, persist source material and run the source pipeline before authoring slides. -4. If the user provides source files, URLs, research material, or a reference deck, prepare them before generating the slide spec. -5. If the user requests text-to-image or generated images with OpenAI, Azure OpenAI, or Azure AI Foundry, create `.env` from `.env.template` when needed and have the user fill provider settings or secrets directly in `.env`. Do not ask for API keys or tokens in chat or in the dialog. -6. Do not claim an infographic is model-generated until provider, model or deployment, auth mode, prompt, output path, and attempt status are known. The image helper has no local fallback provider. - -## Required Input Dialog - -- Use the prompt input dialog for missing required workflow values such as audience, slide count, source material, design/reference context, output filenames, and artifact destinations. -- Use `.env` for missing text-to-image provider values such as provider, model or deployment, endpoint, auth method, timeout, and required API keys. Collect only non-secret prompt, image size, and output path values through the dialog when needed. -- Treat API keys, tokens, connection strings, and passphrases as secrets. Do not collect them through chat or the dialog; the user must enter them directly in `.env` or authenticate with a managed tool such as `az login`. - -## Prepare Sources and References - -Follow `pptify-context-prep` to convert source documents, build RAPTOR summaries, analyze reference PPTX files, and select and load a design profile. Record results in `summary.source_enrichment` and `summary.design_context` before authoring `deck-spec.json`. - -## Confirm Business Framework - -The business framework is defined by the user, not by the assistant. If the user has already specified a framework, use it directly. If no framework has been specified, present the available options and ask which one to use before planning the deck. Include `custom` when the user wants to provide their own structure, naming convention, or slide sequence. Do not auto-select a framework on the user's behalf. - -| Framework | Best for | -|---|---| -| `mckinsey` | Executive proposals, consulting deliverables, strategic recommendations | -| `scqa` | Problem-solving presentations, situation analysis, incident reports | -| `pyramid` | Complex arguments requiring strong logical structure | -| `mece` | Issue decomposition, audits, multi-workstream analysis | -| `action-title` | Executive communications where every slide must drive action | -| `assertion-evidence` | Technical or academic presentations, research findings | -| `exec-summary-first` | C-suite briefings, board decks, press releases | -| `custom` | User-defined structures, organization-specific playbooks, hybrid narrative patterns | - -## Framework Story Templates - -Use the selected framework as the starting narrative spine, then adapt slide count and evidence density to the user's source material. - -| Framework | Default slide spine | -|---|---| -| `mckinsey` | Title → executive summary → situation → complication → key question → recommendation → 2-3 evidence slides → options → roadmap → appendix | -| `scqa` | Title → situation → complication → question → answer → evidence → implementation plan → summary | -| `pyramid` | Title → main answer → argument 1 → argument 2 → argument 3 → evidence → summary | -| `mece` | Title → issue tree → workstream slides → synthesis | -| `action-title` | Title → action summary → action-titled content slides → next steps | -| `assertion-evidence` | Title → overview assertion → assertion/evidence slides → conclusion | -| `exec-summary-first` | Title → full answer on slide 2 → supporting detail → appendix | -| `custom` | Ask for framework name, objective, slide sequence, title rules, layout preferences, and evidence expectations before planning | - -Record the resolved framework in `summary.business_framework`, including source, slide sequence, title rules, and approved assumptions. - -## Storytelling Principles - -- Apply the Pyramid Principle: put the conclusion first, make each slide title state the slide's conclusion or assertion, and avoid questions or vague labels. -- Make every `keyMessage` answer "So what?" for the audience. -- Keep topics MECE: mutually exclusive and collectively exhaustive. -- Write specific slide titles, such as "Azure AI cuts development costs by 40%" or "3 implementation patterns enable rapid onboarding," instead of generic labels like "About Azure AI" or "Implementation Patterns Overview." -- Include concrete data, numbers, dates, owners, sources, or quantified directional signals in bullets when the source material supports them. -- Keep speaker notes useful: two to three sentences, never empty and never just a dash. -- Avoid generic statements; every bullet should be specific, defensible, and tied to the selected framework's role in the story. - -## Plan the Deck - -1. Produce one clear message per slide before choosing visuals. -2. Map the selected business framework to the deck outline and document the selected framework in `summary.business_framework`. -3. Choose a slide form for each message: title, agenda, comparison, process, metrics, roadmap, risk, architecture, evidence, decision, infographic, dashboard-style overview, or appendix. -4. Use charts and dashboard-style slides only when source evidence contains relevant quantitative or structured data. Represent them as explicit tables, labels, shapes, lines, or image-backed exhibits. -5. Keep each slide to three to five major content groups. -6. Preserve user-provided terminology, names, metrics, dates, and executive tone. -7. Decide the exact coordinates, dimensions, z-order, colors, fonts, and font sizes before building. Current plugin scripts will not generate layout or resize text for you. -8. Record the selected profile ID, source URL, style lock, palette, typography, spacing rhythm, and signature elements in `summary.design_context` and translate source signals into explicit primitives in `layout_tree`. -9. Every normal content slide should include at least one style-derived design element such as an accent band, card shell, grid, divider, shape motif, image treatment, or pattern. Plain white title-plus-bullet slides are not production-ready. - -## Build and Validate - -1. Current workspace reality check: no importable `pptify/` package or `python -m pptify` CLI is present in this snapshot. Restore the core renderer package before relying on renderer-specific commands. -2. Every generated slide must include `layout_tree`. Follow `pptify-slide-spec` for the full coordinate contract. -3. If the core renderer is restored, render the authored spec with `uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json`. Otherwise create the PPTX through direct PowerPoint generation and keep plugin evidence/audits alongside it. Direct `python-pptx` generation must still implement the locked design context; default placeholders and bullet-only slides are failures. -4. For reference-guided generation, include analysis/source summaries and the extracted `styles`, `brands`, `template`, and `layout` context before writing `deck-spec.json`. -5. Include the selected `pptify-design` context before writing `deck-spec.json` for every new deck unless a user-provided brand guide or reference PPTX is the primary style source. -6. Inspect the audit for content collisions, text overflows, and warnings. -7. Verify workflow gates: source-backed decks include source corpus and RAPTOR summary metadata; requested generated images include a provider attempt manifest; successful generated raster infographics include a final hidden SVG appendix slide; generated decks include `summary.design_context` and style-derived visual elements. -8. Rebuild after each repair until generated slides have zero collisions, zero overflows, and no default-theme design failures, or clearly report the residual issue. - -```powershell -# Preferred renderer when available; otherwise use direct PowerPoint generation and keep this audit step. -uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json -uv run python pptify-plugin/audit/audit.py deck-spec.json --json -``` - -## Response Contract - -1. When asked to author the deck spec, write strict JSON with no markdown fences unless the user explicitly asks for prose. -2. When required workflow or artifact inputs are missing, prompt for them with the input dialog before authoring or building. -3. When acting as a coding agent in the workspace, create or update the spec or generation script, produce the PPTX with the available PowerPoint path, validate the audit and PPTX package, and report the generated artifact paths. diff --git a/pptify-core/skills/pptify-tooling/SKILL.md b/pptify-core/skills/pptify-tooling/SKILL.md deleted file mode 100644 index d1d641d..0000000 --- a/pptify-core/skills/pptify-tooling/SKILL.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -name: pptify-tooling -description: "Command reference for pptify plugin tools. Use when looking up install commands, plugin script syntax, or the workspace reality check." ---- - -# PPTify Tooling - -## Workflow - -1. Run the workspace detection check before invoking any plugin script. -2. If `pptify-plugin/` is missing, read `references/toolkit-setup.md` before responding. -3. Ask before cloning or installing the optional external toolkit. -4. Run helper scripts only after dependencies are present. -5. Treat the renderer import check as diagnostic; current external toolkit installs helper scripts, not `python -m pptify`. - -## Install - -```powershell -uv sync # base project -uv sync --extra plugins # add source ingestion and image helpers -``` - -## Workspace Detection - -Run this check **before** invoking any plugin script. Do not assume the toolkit is present. - -```powershell -# PowerShell -Test-Path "pptify-plugin\README.md" -``` -```bash -# bash / macOS / Linux -test -f pptify-plugin/README.md && echo "present" || echo "missing" -``` - -**Decision table — act on the result before continuing:** - -| `pptify-plugin/` found | `pyproject.toml` found | Action | -|---|---|---| -| Yes | Yes | Proceed: run `uv run python pptify-plugin/...` commands normally | -| Yes | No | Run `uv sync --extra plugins` in the repo root, then retry | -| No | — | **Read [`references/toolkit-setup.md`](references/toolkit-setup.md) now** (before responding), then ask the user whether to install the optional toolkit or apply graceful fallbacks | - -**Optional toolkit install:** - -Do not clone or install the external toolkit automatically. Ask the user before fetching code from `https://github.com/kimtth/agent-pptify-kit`. - -If the user approves installation: - -```powershell -# Clone into the workspace root (or a subdirectory if another project already occupies it) -git clone https://github.com/kimtth/agent-pptify-kit . -uv sync --extra plugins -``` - -If the workspace root already belongs to a different project, ask the user where to place the toolkit before cloning. - -**Graceful degradation — if install is not possible, apply these fallbacks:** - -| Affected skill | Blocked capability | Fallback | -|---|---|---| -| `pptify-context-prep` | Document-to-markdown conversion, RAPTOR summary, design profile loading | Ask the user to paste source content directly; load `references/design-profiles.md` from `pptify-context-prep` for bundled design profile guidance | -| `pptify-visual-assets` | Icon search, image search, raster→SVG, infographic generation | Use `bbox` placeholder objects with descriptive `content.alt`; omit image objects rather than leaving them empty | -| `pptify-quality-gates` | Spec audit via `audit.py` | Apply the manual checklist rules in that skill; skip the `audit.py` output check | -| `pptify-deck-generation` | End-to-end PPTX render via `pptify` CLI | Stop and inform the user — PPTX generation requires the renderer; do not produce a partial artifact | - -**Renderer reality check:** - -```powershell -# Diagnostic only; this currently fails in the external toolkit -uv run python -c "import pptify; print('renderer present')" -``` - -If the import fails with `ModuleNotFoundError: No module named 'pptify'`, the `python -m pptify` render command is unavailable. This is expected for the current external toolkit. Use standalone plugin scripts for all non-render steps, and do not claim that `uv sync` restores the renderer. - -## Plugin Scripts - -| Purpose | Command | -|---|---| -| Convert document to markdown | `uv run python pptify-plugin/documents/document_to_markdown.py --source --output-path out.md` | -| Build RAPTOR summary tree | `uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown-path source.md --output-path summary.json --title "Title" --pretty` | -| List design profiles | `uv run python pptify-plugin/design/design_context_catalog.py --list --pretty` | -| Load design profile context | `uv run python pptify-plugin/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty` | -| Search web images | `uv run python pptify-plugin/images/web_image_search.py --query "topic" --max-num 8 --pretty` | -| Search Iconify icons | `uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty` | -| Raster to SVG | `uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty` | -| Generate infographic | `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "..." --output-path out.png --pretty` | -| Audit spec | `uv run python pptify-plugin/audit/audit.py deck-spec.json --json` | -| Run tests | `uv run python -m unittest discover -s tests -v` | diff --git a/pptify-core/skills/pptify-tooling/references/toolkit-setup.md b/pptify-core/skills/pptify-tooling/references/toolkit-setup.md deleted file mode 100644 index e3b5e16..0000000 --- a/pptify-core/skills/pptify-tooling/references/toolkit-setup.md +++ /dev/null @@ -1,96 +0,0 @@ -# PPTify Toolkit Setup - -Load this file when `pptify-plugin/` is not found in the workspace and the user wants to install the optional PPTify toolkit. - -## Repository - -| Field | Value | -|---|---| -| URL | https://github.com/kimtth/agent-pptify-kit | -| License | MIT | -| Package manager | `uv` (Python) | - -## Install - -Do not clone or install this external repository automatically. First explain that the built-in awesome-copilot skill includes bundled references, while the external toolkit is only needed for helper-script execution. The current external toolkit does not provide an importable `pptify` renderer module. Continue only after the user explicitly asks to install it. - -```powershell -# 1. Clone into workspace root (use a subdirectory if the root already has a project) -git clone https://github.com/kimtth/agent-pptify-kit . - -# 2. Install base dependencies -uv sync - -# 3. Install plugin extras: source ingestion, image helpers, audit tools -uv sync --extra plugins -``` - -If `uv` is not available: - -```powershell -pip install uv -# or on macOS/Linux: -# curl -LsSf https://astral.sh/uv/install.sh | sh -``` - -If the workspace root belongs to another project, ask the user before cloning. Suggest a named subdirectory, e.g. `git clone https://github.com/kimtth/agent-pptify-kit pptify-kit`. - -## Module Map - -| Module path | Requires extra | What it provides | -|---|---|---| -| `pptify-plugin/documents/document_to_markdown.py` | plugins | Convert PDF, DOCX, HTML, or plain text to markdown for source prep | -| `pptify-plugin/documents/document_to_raptor_tree.py` | plugins | Build a RAPTOR hierarchical summary tree from a markdown source | -| `pptify-plugin/design/design_context_catalog.py` | plugins | List and load pptify-design profiles; returns style context for spec authoring | -| `pptify-plugin/images/web_image_search.py` | plugins | Search the web for candidate images without required API keys | -| `pptify-plugin/images/iconfy_search.py` | plugins | Search Iconify icon library for SVG icons by query, collection, and hex color | -| `pptify-plugin/images/raster_image_to_svg.py` | plugins | Convert raster images to SVG wrappers; optional vector trace mode | -| `pptify-plugin/images/text_prompt_to_infographic.py` | plugins | Generate infographic images via OpenAI or Azure OpenAI (no local fallback) | -| `pptify-plugin/audit/audit.py` | plugins | Validate a deck spec JSON for collisions, overflows, small fonts, and warnings | -| `pptify-plugin/extraction/pptx_extractor.py` | plugins | Extract slide text, style, layout, and media metadata from a reference PPTX | -| `pptify-plugin/extraction/pptx_style_master.py` | plugins | Extract brand, template, and master-slide style facts from a reference PPTX | - -## Image Generation `.env` - -Create `.env` in the workspace root before invoking `text_prompt_to_infographic.py`. Never put secrets in chat or in the prompt dialog — fill the file directly in the editor or terminal. - -```dotenv -# Provider: openai | azure-openai | azure-ai-foundry -PPTIFY_IMAGE_PROVIDER= - -# --- OpenAI --- -OPENAI_API_KEY= -OPENAI_IMAGE_MODEL=gpt-image-1 - -# --- Azure OpenAI --- -AZURE_OPENAI_API_KEY= -AZURE_OPENAI_ENDPOINT= -AZURE_OPENAI_DEPLOYMENT= - -# --- Azure AI Foundry --- -AZURE_AI_FOUNDRY_ENDPOINT= -AZURE_AI_FOUNDRY_MODEL= -``` - -Use `az login` when managed identity or CLI auth is preferred over an API key. - -## Verification After Install - -```powershell -# Confirm the helper CLI is available -uv run python pptify-cli help - -# List available design profiles -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty - -# Run a spec audit smoke test -uv run python pptify-plugin/audit/audit.py deck-spec.json -``` - -Renderer check, for diagnostics only: - -```powershell -uv run python -c "import pptify; print('renderer present')" -``` - -If this fails with `ModuleNotFoundError: No module named 'pptify'`, that is expected for the current external toolkit. Use the standalone `pptify-plugin/` helper scripts and do not run `python -m pptify`. diff --git a/pptify-core/skills/pptify-visual-assets/SKILL.md b/pptify-core/skills/pptify-visual-assets/SKILL.md deleted file mode 100644 index dee3790..0000000 --- a/pptify-core/skills/pptify-visual-assets/SKILL.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: pptify-visual-assets -description: "Find, generate, and place visual assets for pptify PPTX decks. Use when adding icons, images, SVGs, raster conversions, infographics, image placeholders, or asset-backed slide objects." ---- - -# PPTify Visual Assets - -> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, apply the graceful-degradation fallbacks documented there. - -Use this skill when a deck needs icons, images, diagrams, infographics, or media-backed slide objects. - -## Workflow - -1. Run the workspace detection check from `pptify-tooling`. -2. Choose the asset type: icon, web image, raster/SVG conversion, or generated infographic. -3. Run the relevant helper script and save its output path or result JSON. -4. Add the asset to `layout_tree.objects` with final bbox, `z_index`, `content.alt`, and `classification`. -5. Recheck layering so assets do not cover readable text. - -```powershell -uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty -uv run python pptify-plugin/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty -uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty -``` - -## Icons - -- Search Iconify when an icon improves scanning: `uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty`. -- Prefer simple, single-color SVG icons that match the theme accent. -- Use icons as supporting visual cues, not as replacements for required text. - -## Images - -- Search candidate images with `uv run python pptify-plugin/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty`. -- Use local file paths in image objects when an image is selected: `content.path` plus `content.alt`. -- Give images an explicit `bbox` and use concise adjacent text. -- Do not use image placeholders as fallback assets; select an approved asset or omit the image object. - -## SVG and Raster Handling - -- Convert raster images to SVG wrappers with `uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty`. -- Use `--mode vector-trace` only when optional tracing dependencies are installed and a true vector result is needed. -- Keep generated SVGs simple and readable when they are intended for PowerPoint editing. -- Vector tracing raster infographics can lose or distort text. Keep the original generated raster on visible slides when text fidelity matters, and place the traced SVG on a separate hidden final appendix slide for editability/reference. - -## Infographics - -- Generate text-to-image infographics only through OpenAI or Azure OpenAI providers configured by the user. -- Do not substitute a local fallback image provider when user-managed provider access is missing. -- Before generating any text-to-image artifact, collect missing required values with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent): provider, prompt, model or deployment, image size, output path, and any non-secret access settings. -- For OpenAI image generation, create `.env` from `.env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=openai`, `OPENAI_API_KEY`, and optionally `OPENAI_IMAGE_MODEL` directly in `.env`. -- For Azure `gpt-image-2` or `gpt-image-2.0` requests, create `.env` from `.env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=azure-openai`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_IMAGE_DEPLOYMENT`, optional timeout, and any required key auth value directly in `.env`. -- Never ask the user to paste API keys, tokens, or connection strings into chat or into the prompt input dialog. If Entra auth is preferred, tell them to run `az login` in a terminal. -- The image helper loads `.env` automatically before generation. Example: `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty`. -- Save an attempt manifest beside the image output with provider, model or deployment, auth mode, prompt path, output path, success status, and error details on failure. A failed model call should be reported as failed, not replaced by a local placeholder and described as generated. -- If a provider call times out after authentication succeeds, retry once with a longer timeout when the user has already provided non-secret provider details. -- NotebookLM bridge commands are unavailable in this workspace snapshot because `pptify-plugin/images/notebooklm_infographic.py` is absent. Do not call a NotebookLM bridge unless that script is restored. -- For generated infographics, prefer the raster output as the visible slide asset. Add any raster-to-SVG vector trace as `hidden: true` on the final slide rather than replacing the visible infographic. - -## Asset Placement - -- Put decorative asset containers in `layout_tree.objects` with `classification: "layout_design"`. -- Put meaningful icons, diagrams, images, and infographics in `layout_tree.objects` with `classification: "content"`. -- Every asset object needs final inch-based `bbox` coordinates and a deliberate `z_index`. -- Use `z_index` so assets do not cover readable text. \ No newline at end of file diff --git a/pptify-core/workflows/deck-generation.md b/pptify-core/workflows/deck-generation.md deleted file mode 100644 index 6c08dd0..0000000 --- a/pptify-core/workflows/deck-generation.md +++ /dev/null @@ -1,115 +0,0 @@ -# Deck Generation E2E Workflow - -Use this workflow when a Copilot or coding agent needs to generate PPTX slides with `pptify`. - -## 1. Intake - -1. Before creating workflow artifacts, collect any missing required inputs with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent). Batch concise questions, offer sensible defaults for optional fields, and continue after the user answers. -2. Identify the audience, decision, core narrative, required language, target slide count, source material, reference PPTX, branding constraints, output artifact paths, and delivery deadline. -3. If the user gives only a topic, create a reasonable executive narrative and mark assumptions in the generated spec summary. When the user asks for web images, sources, data enrichment, or a source-backed deck, gather and persist source material before authoring slides. -4. If the user provides source files, URLs, research material, or a reference deck, prepare them before generating the slide spec. -5. If the user requests text-to-image or generated images with OpenAI, Azure OpenAI, or Azure AI Foundry, create `.env` from `.env.template` when it is missing and have the user fill provider settings or secrets directly in `.env`. Never ask for API keys, tokens, or connection strings in chat or in the dialog. -6. Do not author a slide or summary that claims a model-generated infographic exists until provider, model or deployment, auth mode, prompt, output path, and attempt status are known. - -## 1A. Image Access Intake - -For any text-to-image request, prepare `.env` before invoking `pptify-plugin/images/text_prompt_to_infographic.py`. - -The infographic helper has no local fallback provider. If OpenAI or Azure OpenAI access is missing, record `missing_provider_config` or the provider failure in an attempt manifest and do not describe placeholder artwork as generated. - -For OpenAI image generation, configure these values in `.env`: - -1. `PPTIFY_IMAGE_PROVIDER=openai` or pass `--provider openai`. -2. `OPENAI_API_KEY`. -3. `OPENAI_IMAGE_MODEL`, defaulting to `gpt-image-1` when unspecified. -4. Image size, defaulting to `1024x1024` when unspecified. -5. Text prompt and output path. -6. Run image generation after `.env` is filled, for example `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty`. - -For Azure OpenAI / Azure AI Foundry image generation, configure these values in `.env`: - -1. `PPTIFY_IMAGE_PROVIDER=azure-openai` or pass `--provider azure-openai`. -2. `AZURE_OPENAI_ENDPOINT`, for example `https://.services.ai.azure.com/openai/v1`. -3. `AZURE_OPENAI_IMAGE_DEPLOYMENT`, for example `gpt-image-2` or the user's exact `gpt-image-2.0` deployment name. -4. Ask whether the user wants Azure CLI/Entra auth or API-key auth. -5. `AZURE_OPENAI_TIMEOUT`, defaulting to `300` when unspecified. -6. For Azure CLI/Entra auth, tell the user to run `az login`; for API-key auth, have the user fill `AZURE_OPENAI_API_KEY` or `AZURE_AI_API_KEY` in `.env`. -7. Run image generation after `.env` is filled, for example `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty`. -8. Save a small attempt manifest next to the asset with provider, endpoint or model name, auth mode, prompt path, output path, status, and error details when generation fails. Do not silently replace a failed or missing model output with local artwork. - -## 2. Prepare Sources and References - -1. Convert long documents and downloaded HTML pages with `pptify-plugin/documents/document_to_markdown.py`. -2. For URL-based, topic-plus-research, source-backed, or multi-source decks, build a combined markdown corpus and run `pptify-plugin/documents/document_to_raptor_tree.py` before planning slides. This is required even when the source files are individually short, because the deck should use synthesized evidence rather than a few searched keywords. -3. Record the source corpus path, RAPTOR summary path, source count, and source URLs in `summary.source_enrichment` in the generated spec. -4. When a reference deck should influence content or style, use the importable helpers in `pptify-plugin/extraction` or package inspection to collect style, brand, template, and layout-rhythm context. The `python -m pptify --analyze-pptx` command is unavailable unless the core renderer package is restored. -5. Use the analysis facts as LLM context when the new deck should preserve language, slide count, topic sequence, executive tone, colors, fonts, template conventions, and layout rhythm. -6. Use extraction helpers only when the task is preservation or reconstruction of the source deck. - -## 2A. Prepare Design Context (Required) - -1. Every new deck must choose a design direction before slide planning. Do not wait for the user to explicitly ask for `pptify-design`. -2. If the user supplies a brand guide or reference PPTX, use that as the primary style source and optionally add a compatible `pptify-design` profile for layout vocabulary. -3. If the user does not supply a style source, load at least one source-backed profile from `pptify-design/sources.json` with `uv run python pptify-plugin/design/design_context_catalog.py --profile --include-context --pretty`. -4. Default profile selection: - - Default, general modern, stylish, product, app, pitch, Microsoft, M365, Teams, Power Platform, or enterprise product decks: `fluent-ui-design-tokens`. - - Developer, GitHub, code, or engineering-system decks: `primer-primitives`. - - Consulting, strategy, governance, or operations reviews: `likaku-mck-ppt-design-skill` plus a conservative `corazzon-pptx-design-styles` style such as Swiss International, Monochrome Minimal, Editorial Magazine, or Architectural Blueprint. - - Broader modern style exploration or explicitly visual direction selection: `corazzon-pptx-design-styles`. - - Design reasoning or preflight critique: add `awesome-copilot-design-agents` as a secondary prompt context. -5. Lock exactly one visual style or design system before authoring slide coordinates. Record the selected profile ID, style name when applicable, palette, typography, spacing rhythm, signature elements, and source URLs in `summary.design_context`. -6. Include the returned context payload in the LLM context before writing `deck-spec.json`; do not summarize it away into a vague phrase such as "modern design". -7. A deck that uses default PowerPoint theme colors, Calibri-only text boxes, plain white backgrounds, or bullet-only layouts without a selected `summary.design_context` is not production-ready. - -## 3. Plan the Deck - -1. Produce one clear message per slide before choosing visuals. -2. Choose a slide form for each message, such as title, agenda, comparison, process, metrics, roadmap, risk, architecture, evidence, decision, infographic, dashboard-style overview, or appendix. -3. Use charts and dashboard-style slides only when the source corpus contains relevant quantitative or structured evidence. Represent them as explicit editable primitives or image-backed exhibits. -4. Keep each slide to three to five major content groups. -5. Preserve user-provided terminology, names, metrics, dates, and executive tone. -6. Decide the slide composition, hierarchy, coordinates, object sizes, z-order, colors, fonts, and font sizes during planning. The available plugin scripts will not do this later. -7. Every normal content slide should contain at least one visible design element derived from the locked style: a color band, card system, grid, rule, accent shape, diagram primitive, image treatment, pattern, or data exhibit. Avoid text-only slides unless the locked style is explicitly typographic. - -## 4. Author the JSON Spec - -1. Return a top-level object with `slides` and optional `summary`. -2. For each generated slide, include `id`, `title`, and `layout_tree`. -3. Do not use `pattern`, `layout_pattern`, `composition.pattern`, `layout`, `sections`, `bullets`, `objects`, `theme`, chart placeholders, or browser layout requests as render-time shorthand. -4. Each `layout_tree` must include `slide_size`, `root_group_id`, `groups`, `objects`, and optional `notes`. -5. Each group must include `id`, `role`, `layout_mode`, `object_ids`, `group_ids`, and a `bbox` when it represents a visible or bounded region. -6. Each object must include `id`, `kind`, `role`, `classification`, `content`, `style`, `bbox`, and `z_index`. -7. Treat decorative shapes as `layout_design`; treat meaningful text, tables, lines, and media as `content`. -8. Give every text-bearing object and table explicit `style.font_size` and `style.color`; do not rely on a later tool to shrink text to fit or infer contrast. Body and evidence text must be at least 10 pt; labels and captions at least 9 pt; footers at least 8 pt. -9. Give every line object explicit `content.x1`, `content.y1`, `content.x2`, and `content.y2`. -10. Give every line object explicit `style.line` and `style.line_width`. -11. Give every shape object explicit `content.shape`, `style.fill`, and `style.line`. -12. Translate the locked design context into explicit objects, colors, spacing, typography, and coordinates; do not rely on runtime pattern selection. -13. If a generated raster infographic is created, use that raster on the visible slide for fidelity, convert it with `raster_image_to_svg.py`, and add the SVG as a final `hidden: true` appendix slide. Record both paths in `summary.text_to_image`. - -## 5. Build the PPTX - -Current workspace reality check: this snapshot does not contain an importable `pptify/` package or `python -m pptify` CLI. Restore the core renderer package before using core render commands, or produce PPTX artifacts through direct PowerPoint generation plus standalone plugin evidence. - -1. As the Copilot CLI or VS Code agent, author or update `deck-spec.json` or a generation script directly; plugin scripts do not perform prompt-to-spec generation or full-deck rendering. -2. If the core renderer is restored, render the authored spec with `uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json`. Otherwise build with the available PowerPoint generation path and keep plugin evidence/audits alongside the PPTX. Using `python-pptx` is only a serialization path; it must still implement the locked `pptify-design` coordinates, colors, typography, and decorative primitives. -3. For reference-guided generation, include analysis/source summaries and extracted `styles`, `brands`, `template`, and `layout` context in the agent prompt before writing `deck-spec.json`. -4. For predefined-template generation, include selected `pptify-design` context in the agent prompt before writing `deck-spec.json`. -5. Never copy, mutate, or save over a referenced PPTX as the deck generation strategy. - -## 6. Validate and Repair - -1. Inspect the audit for content collisions, text overflows, and warnings. -2. If collisions remain, move or resize objects, reduce density, split slides, or change the coordinate plan. -3. If text overflows, shorten copy, split content across slides, or enlarge object bboxes. Lower explicit font sizes only as a last resort and never below 9 pt for content objects. -4. Verify source and image workflow gates before final response: source-backed decks have `summary.source_enrichment` with corpus and RAPTOR paths; generated-image requests have an attempt manifest; successful raster infographics have a hidden SVG appendix slide. -5. Verify design-context gates before final response: `summary.design_context` exists, names the selected profile/style, and every visible content slide has at least one style-derived design element. -6. Treat plain white Calibri slides, default theme placeholders, unstyled bullet lists, and missing `summary.design_context` as quality failures even when collision audit passes. -7. Rebuild after each repair until generated slides have zero collisions, zero overflows, no unexpected warnings, and pass the design-context gate, or clearly report the residual issue. -8. For important deliverables, inspect the produced PPTX package with `python-pptx` or zip checks in addition to unit tests. - -## 7. Response Contract - -1. When asked to author the deck spec, write strict JSON with no markdown fences unless the user explicitly asks for prose. -2. When required workflow or artifact inputs are missing, prompt for them with the input dialog before authoring or building. -3. When acting as a coding agent in the workspace, create or update the spec or generation script, build with the available PowerPoint path, validate the audit and produced PPTX package, and report the generated artifact paths. diff --git a/pptify-plugin/design/__init__.py b/pptify-plugin/design/__init__.py deleted file mode 100644 index afee1cf..0000000 --- a/pptify-plugin/design/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Design-context plugin helpers for pptify workflows.""" \ No newline at end of file diff --git a/pptify-plugin/external/all-MiniLM-L6-v2/.gitkeep b/pptify-plugin/external/all-MiniLM-L6-v2/.gitkeep deleted file mode 100644 index 3c21ce7..0000000 --- a/pptify-plugin/external/all-MiniLM-L6-v2/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -Download MiniLM ONNX/tokenizer assets with pptify-plugin/download-external-assets.ps1. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d80ef8f..c39d211 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ plugins = [ "beautifulsoup4>=4.12.0", "icrawler>=0.6.10", "markitdown[docx,pdf]>=0.1.5", + "onnxruntime>=1.20.0", "tokenizers>=0.21.0", "vtracer>=0.6.15", ] diff --git a/pptify-design/README.md b/resources/design/README.md similarity index 83% rename from pptify-design/README.md rename to resources/design/README.md index a80f389..bbac52e 100644 --- a/pptify-design/README.md +++ b/resources/design/README.md @@ -1,4 +1,4 @@ -# pptify-design +# resources/design Source-backed design context packs for `pptify` agents live here. The profiles in this folder are curated from public GitHub projects and web-accessible source files; the actual design templates are not invented by this repository. @@ -24,25 +24,25 @@ Additional profiles in [sources.json](sources.json) cover staged deck-generation List available profiles: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty +uv run python scripts/design/design_context_catalog.py --list --pretty ``` Load one profile with local context text: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --profile primer-primitives --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile primer-primitives --include-context --pretty ``` Load multiple profiles when a deck needs both a presentation theme and a design-system prompt: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --profile fluent-ui-design-tokens --profile awesome-copilot-design-agents --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile fluent-ui-design-tokens --profile awesome-copilot-design-agents --include-context --pretty ``` Load the modern PPTX style catalog: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --profile corazzon-pptx-design-styles --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile corazzon-pptx-design-styles --include-context --pretty ``` ## Rules diff --git a/pptify-design/contexts/alchaincyf-huashu-design.md b/resources/design/contexts/alchaincyf-huashu-design.md similarity index 100% rename from pptify-design/contexts/alchaincyf-huashu-design.md rename to resources/design/contexts/alchaincyf-huashu-design.md diff --git a/pptify-design/agent-prompts/awesome-copilot-design-agents.md b/resources/design/contexts/awesome-copilot-design-agents.md similarity index 100% rename from pptify-design/agent-prompts/awesome-copilot-design-agents.md rename to resources/design/contexts/awesome-copilot-design-agents.md diff --git a/pptify-design/contexts/corazzon-pptx-design-styles.md b/resources/design/contexts/corazzon-pptx-design-styles.md similarity index 100% rename from pptify-design/contexts/corazzon-pptx-design-styles.md rename to resources/design/contexts/corazzon-pptx-design-styles.md diff --git a/pptify-design/contexts/erickittelson-slidemason.md b/resources/design/contexts/erickittelson-slidemason.md similarity index 100% rename from pptify-design/contexts/erickittelson-slidemason.md rename to resources/design/contexts/erickittelson-slidemason.md diff --git a/pptify-design/contexts/fluent-ui-design-tokens.md b/resources/design/contexts/fluent-ui-design-tokens.md similarity index 100% rename from pptify-design/contexts/fluent-ui-design-tokens.md rename to resources/design/contexts/fluent-ui-design-tokens.md diff --git a/pptify-design/contexts/gabberflast-academic-pptx-skill.md b/resources/design/contexts/gabberflast-academic-pptx-skill.md similarity index 100% rename from pptify-design/contexts/gabberflast-academic-pptx-skill.md rename to resources/design/contexts/gabberflast-academic-pptx-skill.md diff --git a/pptify-design/contexts/likaku-mck-ppt-design-skill.md b/resources/design/contexts/likaku-mck-ppt-design-skill.md similarity index 100% rename from pptify-design/contexts/likaku-mck-ppt-design-skill.md rename to resources/design/contexts/likaku-mck-ppt-design-skill.md diff --git a/pptify-design/contexts/nexu-io-open-design.md b/resources/design/contexts/nexu-io-open-design.md similarity index 100% rename from pptify-design/contexts/nexu-io-open-design.md rename to resources/design/contexts/nexu-io-open-design.md diff --git a/pptify-design/contexts/pptwork-oh-my-slides.md b/resources/design/contexts/pptwork-oh-my-slides.md similarity index 100% rename from pptify-design/contexts/pptwork-oh-my-slides.md rename to resources/design/contexts/pptwork-oh-my-slides.md diff --git a/pptify-design/contexts/primer-primitives.md b/resources/design/contexts/primer-primitives.md similarity index 100% rename from pptify-design/contexts/primer-primitives.md rename to resources/design/contexts/primer-primitives.md diff --git a/pptify-design/contexts/sunbigfly-ppt-agent-skills.md b/resources/design/contexts/sunbigfly-ppt-agent-skills.md similarity index 100% rename from pptify-design/contexts/sunbigfly-ppt-agent-skills.md rename to resources/design/contexts/sunbigfly-ppt-agent-skills.md diff --git a/pptify-design/sources.json b/resources/design/sources.json similarity index 99% rename from pptify-design/sources.json rename to resources/design/sources.json index b4fc15d..541698e 100644 --- a/pptify-design/sources.json +++ b/resources/design/sources.json @@ -1,5 +1,5 @@ { - "schema": "pptify-design.context-catalog.v1", + "schema": "resources/design.context-catalog.v1", "updated": "2026-05-20", "purpose": "Source-backed design template and agent-prompt context packs for LLM-assisted pptify deck authoring.", "profiles": [ @@ -62,7 +62,7 @@ "license_url": "https://github.com/github/awesome-copilot/blob/main/LICENSE", "retrieved": "2026-05-18" }, - "local_context": "agent-prompts/awesome-copilot-design-agents.md", + "local_context": "contexts/awesome-copilot-design-agents.md", "source_signals": { "agent_files": ["agents/gem-designer.agent.md", "agents/se-ux-ui-designer.agent.md"], "skill_files": ["skills/penpot-uiux-design/SKILL.md", "skills/prompt-optimizer/SKILL.md"], diff --git a/pptify-design/third-party-notices.md b/resources/design/third-party-notices.md similarity index 90% rename from pptify-design/third-party-notices.md rename to resources/design/third-party-notices.md index 4892ec2..02da2c7 100644 --- a/pptify-design/third-party-notices.md +++ b/resources/design/third-party-notices.md @@ -1,4 +1,4 @@ -# Third-Party Notices for pptify-design +# Third-Party Notices for resources/design The design context packs in this folder include selected source excerpts and source-derived metadata from the projects below. They are included to provide predefined design context to LLM agents. @@ -15,7 +15,7 @@ The design context packs in this folder include selected source excerpts and sou - Files referenced: `AGENTS.md`, `docs/architecture/design-tokens.md`, `LICENSE` - License: MIT - Notice: Copyright (c) Microsoft Corporation. -- Note: Usage of fonts and icons referenced in Fluent UI React is subject to the terms listed by Fluent UI at https://aka.ms/fluentui-assets-license. The `pptify-design` context pack references token guidance only and does not copy those assets. +- Note: Usage of fonts and icons referenced in Fluent UI React is subject to the terms listed by Fluent UI at https://aka.ms/fluentui-assets-license. The `resources/design` context pack references token guidance only and does not copy those assets. ## Awesome Copilot @@ -30,7 +30,7 @@ The design context packs in this folder include selected source excerpts and sou - Files referenced: `README.md`, `SKILL.md`, `references/styles.md` - License: MIT, as stated in the upstream `README.md` license section - Notice: Copyright TodayCode / corazzon contributors. -- Note: The upstream repository also contains Korean-language documentation, a Korean preview page, and preview images. The local `pptify-design` context normalizes the design guidance to English and does not copy upstream binary assets. +- Note: The upstream repository also contains Korean-language documentation, a Korean preview page, and preview images. The local `resources/design` context normalizes the design guidance to English and does not copy upstream binary assets. ## MIT License Text diff --git a/.env.template b/resources/env.template similarity index 100% rename from .env.template rename to resources/env.template diff --git a/pptify-plugin/README.md b/scripts/README.md similarity index 60% rename from pptify-plugin/README.md rename to scripts/README.md index a18de06..41157c1 100644 --- a/pptify-plugin/README.md +++ b/scripts/README.md @@ -1,6 +1,6 @@ -# pptify-plugin +# scripts -Standalone plugin scripts for source ingestion, design context, image assets, extraction, and audit helpers used by pptify workflows. CLI-style tools can be called directly by path and write a JSON payload to stdout. Extraction helpers are import APIs. +Standalone plugin scripts for source ingestion, design context, image assets, extraction, and audit helpers used by the pptify deck-building agent and skills. CLI-style tools can be called directly by path and write a JSON payload to stdout. Extraction helpers are import APIs. ## Optional Dependencies @@ -12,8 +12,8 @@ uv sync --extra plugins Some scripts also work without optional packages: -- `documents/document_to_raptor_tree.py` uses stable local embeddings and requires only the standard library. -- `design/design_context_catalog.py` reads local `pptify-design` metadata and requires only the standard library. +- `documents/document_to_raptor_tree.py` uses restored local ONNX embeddings when `onnxruntime`, `tokenizers`, and the external MiniLM assets are available; otherwise it falls back to stable local embeddings that require only the standard library. +- `design/design_context_catalog.py` reads local `resources/design` metadata and requires only the standard library. - `images/raster_image_to_svg.py` defaults to wrapping raster bytes in an SVG and requires only the standard library. Its `--mode vector-trace` path uses optional `vtracer`. ## External Assets @@ -21,14 +21,14 @@ Some scripts also work without optional packages: Large optional runtime assets are restored on demand instead of being maintained as source files. Run the downloader from the repository root when you need local ONNX embeddings or other optional helper assets: ```powershell -.\pptify-plugin\download-external-assets.ps1 +.\scripts\download-external-assets.ps1 ``` -The script downloads MiniLM tokenizer files plus the selected ONNX model into `pptify-plugin/external/all-MiniLM-L6-v2`. The default MiniLM model is `onnx/model_quint8_avx2.onnx`, saved locally as `model_quantized.onnx`; pass `-MiniLmModelPath onnx/model.onnx` for the larger non-quantized model. +The script downloads MiniLM tokenizer files plus the selected ONNX model into `scripts/external/all-MiniLM-L12-v2`. The default MiniLM model is `onnx/model_quint8_avx2.onnx`, saved locally as `model_quantized.onnx`; pass `-MiniLmModelPath onnx/model.onnx` for the larger non-quantized model. ## Image Provider Access -`images/text_prompt_to_infographic.py` loads image-provider settings from `.env` before it runs. When image generation needs credentials or provider configuration, copy `.env.template` to `.env`, ask the user to fill the required values directly in that file, then run the helper. Do not ask the user to paste API keys, tokens, or connection strings into chat or a prompt input dialog. +`images/text_prompt_to_infographic.py` loads image-provider settings from `.env` before it runs. When image generation needs credentials or provider configuration, copy `resources/env.template` to `.env`, ask the user to fill the required values directly in that file, then run the helper. Do not ask the user to paste API keys, tokens, or connection strings into chat or a prompt input dialog. The helper does not provide a built-in local fallback image provider. If `--provider auto` is used and neither OpenAI nor Azure OpenAI is configured, the command fails with `missing_provider_config` instead of generating a substitute asset. @@ -54,9 +54,9 @@ For Azure CLI/Entra auth, run `az login`. For API-key auth, fill `AZURE_OPENAI_A Example: ```powershell -Copy-Item .env.template .env +Copy-Item resources/env.template .env # Edit .env, then run: -uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty +uv run python scripts/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty ``` For OpenAI image generation, fill `OPENAI_API_KEY` in `.env` and run the helper. @@ -64,14 +64,14 @@ For OpenAI image generation, fill `OPENAI_API_KEY` in `.env` and run the helper. Example: ```powershell -uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty +uv run python scripts/images/text_prompt_to_infographic.py --provider openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty ``` ## Scripts - `documents/document_to_markdown.py` - convert PDF, DOCX, PPTX, XLSX, HTML, or TXT with MarkItDown. - `documents/document_to_raptor_tree.py` - split markdown, embed sections, and build a RAPTOR-style JSON tree. -- `design/design_context_catalog.py` - list or emit source-backed predefined design template and agent-prompt context from `pptify-design`. +- `design/design_context_catalog.py` - list or emit source-backed predefined design template and agent-prompt context from `resources/design`. - `images/web_image_search.py` - search Google when `icrawler` is available, then fall back to Bing HTML candidates. - `images/iconfy_search.py` - search Iconify and return candidate SVG URLs. The filename keeps the existing `iconfy` spelling. - `images/raster_image_to_svg.py` - create an SVG wrapper around a raster image, or trace it into vector paths with optional `vtracer`. @@ -84,11 +84,11 @@ uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider open ## Examples ```powershell -uv run python pptify-plugin/documents/document_to_markdown.py --source source.pdf --output-path source.md -uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown-path source.md --output-path source.structured-summary.json --title "Source" -uv run python pptify-plugin/design/design_context_catalog.py --profile primer-primitives --include-context --pretty -uv run python pptify-plugin/images/web_image_search.py --query "Power Platform governance" --max-num 8 -uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 -uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --mode vector-trace --output-path logo.svg -uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider openai --prompt "Cloud governance roadmap" --output-path infographic.png +uv run python scripts/documents/document_to_markdown.py --source source.pdf --output-path source.md +uv run python scripts/documents/document_to_raptor_tree.py --markdown-path source.md --output-path source.structured-summary.json --title "Source" +uv run python scripts/design/design_context_catalog.py --profile primer-primitives --include-context --pretty +uv run python scripts/images/web_image_search.py --query "Power Platform governance" --max-num 8 +uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 +uv run python scripts/images/raster_image_to_svg.py --source logo.png --mode vector-trace --output-path logo.svg +uv run python scripts/images/text_prompt_to_infographic.py --provider openai --prompt "Cloud governance roadmap" --output-path infographic.png ``` \ No newline at end of file diff --git a/pptify-plugin/audit/audit.py b/scripts/audit/audit.py similarity index 100% rename from pptify-plugin/audit/audit.py rename to scripts/audit/audit.py diff --git a/scripts/design/__init__.py b/scripts/design/__init__.py new file mode 100644 index 0000000..fdff23f --- /dev/null +++ b/scripts/design/__init__.py @@ -0,0 +1 @@ +"""Design-context plugin helpers for pptify deck building.""" \ No newline at end of file diff --git a/pptify-plugin/design/design_context_catalog.py b/scripts/design/design_context_catalog.py similarity index 96% rename from pptify-plugin/design/design_context_catalog.py rename to scripts/design/design_context_catalog.py index df5a784..957855f 100644 --- a/pptify-plugin/design/design_context_catalog.py +++ b/scripts/design/design_context_catalog.py @@ -7,7 +7,7 @@ from typing import Any -DEFAULT_MANIFEST_PATH = Path(__file__).resolve().parents[2] / "pptify-design" / "sources.json" +DEFAULT_MANIFEST_PATH = Path(__file__).resolve().parents[2] / "resources/design" / "sources.json" def load_catalog(manifest_path: Path = DEFAULT_MANIFEST_PATH) -> dict[str, Any]: @@ -96,7 +96,7 @@ def build_payload( def build_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser(description="Emit source-backed pptify design context catalog entries as JSON.") - parser.add_argument("--manifest", type=Path, default=DEFAULT_MANIFEST_PATH, help="Path to pptify-design/sources.json.") + parser.add_argument("--manifest", type=Path, default=DEFAULT_MANIFEST_PATH, help="Path to resources/design/sources.json.") parser.add_argument("--profile", action="append", help="Profile ID to select. Can be repeated. Defaults to all profiles.") parser.add_argument("--include-context", action="store_true", help="Include local context file contents in the JSON payload.") parser.add_argument("--list", action="store_true", help="Return a compact list of profiles.") diff --git a/pptify-plugin/documents/__init__.py b/scripts/documents/__init__.py similarity index 100% rename from pptify-plugin/documents/__init__.py rename to scripts/documents/__init__.py diff --git a/pptify-plugin/documents/document_to_markdown.py b/scripts/documents/document_to_markdown.py similarity index 100% rename from pptify-plugin/documents/document_to_markdown.py rename to scripts/documents/document_to_markdown.py diff --git a/pptify-plugin/documents/document_to_raptor_tree.py b/scripts/documents/document_to_raptor_tree.py similarity index 90% rename from pptify-plugin/documents/document_to_raptor_tree.py rename to scripts/documents/document_to_raptor_tree.py index 168ea81..a382dc3 100644 --- a/pptify-plugin/documents/document_to_raptor_tree.py +++ b/scripts/documents/document_to_raptor_tree.py @@ -122,55 +122,69 @@ def _hash_embedding(text: str, *, dim: int = DEFAULT_EMBEDDING_DIM) -> list[floa return _normalize(vector) -_ONNX_SESSION: Any = None # ort.InferenceSession once loaded -_ONNX_TOKENIZER: Any = None # tokenizers.Tokenizer once loaded -_ONNX_TRIED: bool = False - -_EXTERNAL_MODEL_DIR = Path(__file__).parent.parent / "external" / "all-MiniLM-L6-v2" - - -def _try_load_onnx() -> bool: - """Load the ONNX session and tokenizer from external/. Returns True on success.""" - global _ONNX_SESSION, _ONNX_TOKENIZER, _ONNX_TRIED - if _ONNX_TRIED: - return _ONNX_SESSION is not None - _ONNX_TRIED = True - - model_path = _EXTERNAL_MODEL_DIR / "model_quantized.onnx" - tokenizer_path = _EXTERNAL_MODEL_DIR / "tokenizer.json" - if not model_path.exists() or not tokenizer_path.exists(): - return False - - try: - import onnxruntime as ort - from tokenizers import Tokenizer - - session = ort.InferenceSession(str(model_path), providers=["CPUExecutionProvider"]) - tok = Tokenizer.from_file(str(tokenizer_path)) - tok.enable_truncation(max_length=256) - tok.enable_padding(pad_id=0, pad_token="[PAD]") - _ONNX_SESSION = session - _ONNX_TOKENIZER = tok - print("[raptor] Using local ONNX embedding model (all-MiniLM-L6-v2).", file=sys.stderr) - return True - except Exception as exc: - print(f"[raptor] Could not load ONNX model, falling back to hash embeddings: {exc}", file=sys.stderr) - return False +_EXTERNAL_MODEL_DIR = Path(__file__).parent.parent / "external" / "all-MiniLM-L12-v2" + + +class _OnnxLoader: + """Lazy-loads the ONNX session and tokenizer exactly once.""" + + def __init__(self) -> None: + self._session: Any = None + self._tokenizer: Any = None + self._tried: bool = False + + def try_load(self) -> bool: + """Returns True if the ONNX model is available and loaded.""" + if self._tried: + return self._session is not None + self._tried = True + + model_path = _EXTERNAL_MODEL_DIR / "model_quantized.onnx" + tokenizer_path = _EXTERNAL_MODEL_DIR / "tokenizer.json" + if not model_path.exists() or not tokenizer_path.exists(): + return False + + try: + import onnxruntime as ort + from tokenizers import Tokenizer + + session = ort.InferenceSession(str(model_path), providers=["CPUExecutionProvider"]) + tok = Tokenizer.from_file(str(tokenizer_path)) + tok.enable_truncation(max_length=256) + tok.enable_padding(pad_id=0, pad_token="[PAD]") + self._session = session + self._tokenizer = tok + print("[raptor] Using local ONNX embedding model (all-MiniLM-L12-v2).", file=sys.stderr) + return True + except Exception as exc: + print(f"[raptor] Could not load ONNX model, falling back to hash embeddings: {exc}", file=sys.stderr) + return False + + @property + def session(self) -> Any: + return self._session + + @property + def tokenizer(self) -> Any: + return self._tokenizer + + +_ONNX_LOADER = _OnnxLoader() def _embed_with_onnx(texts: list[str], *, prefix: str, dim: int) -> list[list[float]]: import numpy as np prefixed = [f"{prefix}{text}" for text in texts] - encodings = _ONNX_TOKENIZER.encode_batch(prefixed) + encodings = _ONNX_LOADER.tokenizer.encode_batch(prefixed) input_ids = np.array([enc.ids for enc in encodings], dtype=np.int64) attention_mask = np.array([enc.attention_mask for enc in encodings], dtype=np.int64) - input_names = {inp.name for inp in _ONNX_SESSION.get_inputs()} + input_names = {inp.name for inp in _ONNX_LOADER.session.get_inputs()} feed: dict[str, Any] = {"input_ids": input_ids, "attention_mask": attention_mask} if "token_type_ids" in input_names: feed["token_type_ids"] = np.zeros_like(input_ids) - outputs = _ONNX_SESSION.run(None, feed) + outputs = _ONNX_LOADER.session.run(None, feed) token_embeddings: Any = outputs[0] # (batch, seq_len, hidden_dim) mask = attention_mask[..., np.newaxis].astype(np.float32) mean_embeddings = (token_embeddings * mask).sum(axis=1) / mask.sum(axis=1) @@ -189,7 +203,7 @@ def _embed_with_onnx(texts: list[str], *, prefix: str, dim: int) -> list[list[fl def embed(texts: list[str], *, prefix: str = "passage: ", dim: int = DEFAULT_EMBEDDING_DIM) -> list[list[float]]: - if _try_load_onnx(): + if _ONNX_LOADER.try_load(): return _embed_with_onnx(texts, prefix=prefix, dim=dim) return [_hash_embedding(f"{prefix}{text}", dim=dim) for text in texts] diff --git a/pptify-plugin/download-external-assets.ps1 b/scripts/download-external-assets.ps1 similarity index 94% rename from pptify-plugin/download-external-assets.ps1 rename to scripts/download-external-assets.ps1 index b9b0cad..d300302 100644 --- a/pptify-plugin/download-external-assets.ps1 +++ b/scripts/download-external-assets.ps1 @@ -1,7 +1,7 @@ #Requires -Version 5.1 [CmdletBinding()] param( - [string]$MiniLmRepo = "sentence-transformers/all-MiniLM-L6-v2", + [string]$MiniLmRepo = "sentence-transformers/all-MiniLM-L12-v2", [string]$MiniLmRevision = "main", [string]$MiniLmModelPath = "onnx/model_quint8_avx2.onnx", @@ -55,7 +55,7 @@ function Join-HuggingFaceResolveUrl { function Install-MiniLm { param([Parameter(Mandatory = $true)][string]$RepoRoot) - $targetDir = Join-Path $RepoRoot "pptify-plugin\external\all-MiniLM-L6-v2" + $targetDir = Join-Path $RepoRoot "scripts\external\all-MiniLM-L12-v2" $files = @( @{ Source = $MiniLmModelPath; Target = "model_quantized.onnx" }, @{ Source = "tokenizer.json"; Target = "tokenizer.json" }, diff --git a/pptify-plugin/external/README.md b/scripts/external/README.md similarity index 60% rename from pptify-plugin/external/README.md rename to scripts/external/README.md index 4cef8dd..baf5b0c 100644 --- a/pptify-plugin/external/README.md +++ b/scripts/external/README.md @@ -5,9 +5,9 @@ This directory is for optional binary/model assets that are re-downloadable and Run from the repository root to restore the MiniLM ONNX model and tokenizer files: ```powershell -.\pptify-plugin\download-external-assets.ps1 +.\scripts\download-external-assets.ps1 ``` -Restores `all-MiniLM-L6-v2/model_quantized.onnx`, `tokenizer.json`, and `tokenizer_config.json` from the Hugging Face `sentence-transformers/all-MiniLM-L6-v2` repository. +Restores `all-MiniLM-L12-v2/model_quantized.onnx`, `tokenizer.json`, and `tokenizer_config.json` from the Hugging Face `sentence-transformers/all-MiniLM-L12-v2` repository. Pass `-MiniLmModelPath onnx/model.onnx` for the larger non-quantized model. Use `-Force` to overwrite existing files. \ No newline at end of file diff --git a/scripts/external/all-MiniLM-L12-v2/.gitkeep b/scripts/external/all-MiniLM-L12-v2/.gitkeep new file mode 100644 index 0000000..52392a8 --- /dev/null +++ b/scripts/external/all-MiniLM-L12-v2/.gitkeep @@ -0,0 +1 @@ +Download MiniLM ONNX/tokenizer assets with scripts/download-external-assets.ps1. \ No newline at end of file diff --git a/pptify-plugin/extraction/pptx_extractor.py b/scripts/extraction/pptx_extractor.py similarity index 100% rename from pptify-plugin/extraction/pptx_extractor.py rename to scripts/extraction/pptx_extractor.py diff --git a/pptify-plugin/extraction/pptx_style_master.py b/scripts/extraction/pptx_style_master.py similarity index 100% rename from pptify-plugin/extraction/pptx_style_master.py rename to scripts/extraction/pptx_style_master.py diff --git a/pptify-plugin/images/__init__.py b/scripts/images/__init__.py similarity index 100% rename from pptify-plugin/images/__init__.py rename to scripts/images/__init__.py diff --git a/pptify-plugin/images/iconfy_search.py b/scripts/images/iconfy_search.py similarity index 98% rename from pptify-plugin/images/iconfy_search.py rename to scripts/images/iconfy_search.py index 3c50937..9f0d5cf 100644 --- a/pptify-plugin/images/iconfy_search.py +++ b/scripts/images/iconfy_search.py @@ -66,7 +66,7 @@ def build_iconify_svg_url(icon_name: str, color_hex: str | None = None, *, host_ def _request_json(host: str, path: str, params: dict[str, str]) -> dict[str, Any]: url = f"{host}{path}?{urlencode(params)}" - request = Request(url, headers={"User-Agent": "pptify-plugin/0.1"}) + request = Request(url, headers={"User-Agent": "pptify-scripts/0.1"}) with urlopen(request, timeout=15) as response: return json.loads(response.read().decode("utf-8", errors="replace")) diff --git a/pptify-plugin/images/raster_image_to_svg.py b/scripts/images/raster_image_to_svg.py similarity index 83% rename from pptify-plugin/images/raster_image_to_svg.py rename to scripts/images/raster_image_to_svg.py index 1f74bf4..0772427 100644 --- a/pptify-plugin/images/raster_image_to_svg.py +++ b/scripts/images/raster_image_to_svg.py @@ -8,7 +8,7 @@ import struct import sys from pathlib import Path -from typing import Any +from typing import Any, TypedDict MIME_BY_SUFFIX = { @@ -24,6 +24,20 @@ VECTOR_MODE = "vector-trace" +class VTracerOptions(TypedDict): + colormode: str + hierarchical: str + trace_mode: str + filter_speckle: int + color_precision: int + layer_difference: int + corner_threshold: int + length_threshold: float + max_iterations: int + splice_threshold: int + path_precision: int + + def _png_size(data: bytes) -> tuple[int, int] | None: if data.startswith(b"\x89PNG\r\n\x1a\n") and len(data) >= 24: return struct.unpack(">II", data[16:24]) @@ -95,18 +109,7 @@ def image_dimensions(data: bytes) -> tuple[int, int]: def _trace_with_vtracer( source_path: Path, destination: Path, - *, - colormode: str, - hierarchical: str, - trace_mode: str, - filter_speckle: int, - color_precision: int, - layer_difference: int, - corner_threshold: int, - length_threshold: float, - max_iterations: int, - splice_threshold: int, - path_precision: int, + options: VTracerOptions, ) -> dict[str, Any] | None: try: vtracer = importlib.import_module("vtracer") @@ -121,17 +124,17 @@ def _trace_with_vtracer( vtracer.convert_image_to_svg_py( str(source_path), str(destination), - colormode=colormode, - hierarchical=hierarchical, - mode=trace_mode, - filter_speckle=filter_speckle, - color_precision=color_precision, - layer_difference=layer_difference, - corner_threshold=corner_threshold, - length_threshold=length_threshold, - max_iterations=max_iterations, - splice_threshold=splice_threshold, - path_precision=path_precision, + colormode=options["colormode"], + hierarchical=options["hierarchical"], + mode=options["trace_mode"], + filter_speckle=options["filter_speckle"], + color_precision=options["color_precision"], + layer_difference=options["layer_difference"], + corner_threshold=options["corner_threshold"], + length_threshold=options["length_threshold"], + max_iterations=options["max_iterations"], + splice_threshold=options["splice_threshold"], + path_precision=options["path_precision"], ) except Exception as exc: return {"ok": False, "error": f"vtracer conversion failed: {exc}", "code": "vtracer_failed"} @@ -168,21 +171,20 @@ def raster_to_svg( width, height = image_dimensions(data) if mode == VECTOR_MODE: - error = _trace_with_vtracer( - source_path, - destination, - colormode=colormode, - hierarchical=hierarchical, - trace_mode=trace_mode, - filter_speckle=filter_speckle, - color_precision=color_precision, - layer_difference=layer_difference, - corner_threshold=corner_threshold, - length_threshold=length_threshold, - max_iterations=max_iterations, - splice_threshold=splice_threshold, - path_precision=path_precision, - ) + options: VTracerOptions = { + "colormode": colormode, + "hierarchical": hierarchical, + "trace_mode": trace_mode, + "filter_speckle": filter_speckle, + "color_precision": color_precision, + "layer_difference": layer_difference, + "corner_threshold": corner_threshold, + "length_threshold": length_threshold, + "max_iterations": max_iterations, + "splice_threshold": splice_threshold, + "path_precision": path_precision, + } + error = _trace_with_vtracer(source_path, destination, options) if error: return error return { @@ -193,19 +195,7 @@ def raster_to_svg( "height": height, "mode": VECTOR_MODE, "vectorizer": "vtracer", - "trace_options": { - "colormode": colormode, - "hierarchical": hierarchical, - "trace_mode": trace_mode, - "filter_speckle": filter_speckle, - "color_precision": color_precision, - "layer_difference": layer_difference, - "corner_threshold": corner_threshold, - "length_threshold": length_threshold, - "max_iterations": max_iterations, - "splice_threshold": splice_threshold, - "path_precision": path_precision, - }, + "trace_options": dict(options), } if mode != RASTER_MODE: @@ -229,7 +219,7 @@ def raster_to_svg( "path": str(destination), "width": width, "height": height, - "mode": "embedded-raster", + "mode": RASTER_MODE, "mime": mime, } diff --git a/pptify-plugin/images/text_prompt_to_infographic.py b/scripts/images/text_prompt_to_infographic.py similarity index 99% rename from pptify-plugin/images/text_prompt_to_infographic.py rename to scripts/images/text_prompt_to_infographic.py index 2bb4c28..f802ea3 100644 --- a/pptify-plugin/images/text_prompt_to_infographic.py +++ b/scripts/images/text_prompt_to_infographic.py @@ -13,7 +13,7 @@ from urllib.parse import urljoin from urllib.request import Request, urlopen -_ENV_TEMPLATE = ".env.template" +_ENV_TEMPLATE = "resources/env.template" def _env_guidance() -> str: @@ -64,7 +64,7 @@ def _post_json(url: str, headers: dict[str, str], payload: dict[str, Any], *, ti def _download_bytes(url: str, *, timeout: int = 120) -> bytes: - request = Request(url, headers={"User-Agent": "pptify-plugin/0.1"}) + request = Request(url, headers={"User-Agent": "pptify-scripts/0.1"}) with urlopen(request, timeout=timeout) as response: return response.read() diff --git a/pptify-plugin/images/web_image_search.py b/scripts/images/web_image_search.py similarity index 100% rename from pptify-plugin/images/web_image_search.py rename to scripts/images/web_image_search.py diff --git a/awesome-deploy/awesome-copilot/skills/pptify-context-prep/SKILL.md b/skills/pptify-context-prep/SKILL.md similarity index 79% rename from awesome-deploy/awesome-copilot/skills/pptify-context-prep/SKILL.md rename to skills/pptify-context-prep/SKILL.md index 0b8aa65..800a729 100644 --- a/awesome-deploy/awesome-copilot/skills/pptify-context-prep/SKILL.md +++ b/skills/pptify-context-prep/SKILL.md @@ -1,18 +1,18 @@ --- name: pptify-context-prep -description: "Prepare source material and design context before authoring a pptify deck spec. Use when converting documents, building RAPTOR summaries, analyzing reference PPTX decks, or selecting and loading pptify-design profiles." +description: "Prepare source material and design context before authoring a pptify deck spec. Use when converting documents, building RAPTOR summaries, analyzing reference PPTX decks, or selecting and loading resources/design profiles." --- # PPTify Context Prep -> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, follow the install or graceful-degradation steps there before continuing. +> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `scripts/` is absent, follow the install or graceful-degradation steps there before continuing. -Use this skill before writing a deck spec. It covers two parallel preparation tracks: **source context** (documents, research, reference PPTX) and **design context** (predefined style profiles from `pptify-design`). +Use this skill before writing a deck spec. It covers two parallel preparation tracks: **source context** (documents, research, reference PPTX) and **design context** (predefined style profiles from `resources/design`). ## Source Documents -- Convert long source documents to markdown before planning slides: `uv run python pptify-plugin/documents/document_to_markdown.py --source source.pdf --output-path source.md`. -- Build a structured summary tree when a source is long or multi-topic: `uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown-path source.md --output-path source-summary.json --title "Source" --pretty`. +- Convert long source documents to markdown before planning slides: `uv run python scripts/documents/document_to_markdown.py --source source.pdf --output-path source.md`. +- Build a structured summary tree when a source is long or multi-topic: `uv run python scripts/documents/document_to_raptor_tree.py --markdown-path source.md --output-path source-summary.json --title "Source" --pretty`. - For URL-based, topic-plus-research, source-backed, or multi-source decks, combine converted/downloaded source markdown into a corpus and run the RAPTOR summary before slide planning, even when individual sources are short. - Record the corpus path, summary path, source count, and source URLs in `summary.source_enrichment` so enrichment evidence survives review. - Use the summary tree to identify audience, thesis, slide sequence, evidence, risks, and decision points. @@ -20,7 +20,7 @@ Use this skill before writing a deck spec. It covers two parallel preparation tr ## Reference PPTX -- Use the importable helpers in `pptify-plugin/extraction` or package inspection to inspect production complexity, slide text, style, brand, template, and layout-rhythm facts. The `python -m pptify --analyze-pptx` command is unavailable unless the core renderer package is restored. +- Use the importable helpers in `scripts/extraction` or package inspection to inspect production complexity, slide text, style, brand, template, and layout-rhythm facts. The `python -m pptify --analyze-pptx` command is unavailable unless the core renderer package is restored. - Use the extracted facts as agent context when the new deck should follow a source deck's language, slide count, topic sequence, executive tone, colors, fonts, template conventions, and layout rhythm. - When authoring the new spec, translate `brands.primary_color`, `brands.accent_colors`, `brands.fonts`, `template.slide_size`, `template.layout_usage`, and `layout.slides[*].dominant_flow` into explicit `layout_tree` primitives, colors, typography, spacing, and coordinates. - Use extraction helpers when the goal is reconstructing or preserving an existing production deck rather than authoring a new editable deck. @@ -31,7 +31,7 @@ Use this skill before writing a deck spec. It covers two parallel preparation tr Load [`references/design-profiles.md`](references/design-profiles.md) for the full profile catalog with IDs, `best_for` guidance, key style signals, and license information. Use it whether or not the toolkit is installed — when the toolkit is present, it cross-checks the catalog with the live output of `design_context_catalog.py`. -Use profiles from `pptify-design/sources.json`; do not invent a new design template when the user asks for predefined templates. +Use profiles from `resources/design/sources.json`; do not invent a new design template when the user asks for predefined templates. - Use `fluent-ui-design-tokens` as the default for new decks, including Microsoft, M365, Teams, Power Platform, enterprise-aligned, general modern, stylish, product, app, pitch, or unspecified visual style requests. - Use `primer-primitives` for GitHub-style product, developer, or token-driven engineering decks. @@ -45,10 +45,10 @@ Use profiles from `pptify-design/sources.json`; do not invent a new design templ Load profiles: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile primer-primitives --include-context --pretty -uv run python pptify-plugin/design/design_context_catalog.py --profile corazzon-pptx-design-styles --include-context --pretty +uv run python scripts/design/design_context_catalog.py --list --pretty +uv run python scripts/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile primer-primitives --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile corazzon-pptx-design-styles --include-context --pretty ``` ## Applying Context to Spec Authoring @@ -58,7 +58,7 @@ uv run python pptify-plugin/design/design_context_catalog.py --profile corazzon- 3. Keep meaningful slide content as `classification: "content"` objects and decorative/background elements as `classification: "layout_design"` objects. 4. Use source CSS or reference deck rhythm only as design evidence; final coordinates must be authored directly in inches. 5. Add at least one style-derived visible design element to every normal content slide: accent band, rule, card shell, grid cell, diagram primitive, shape motif, image treatment, or pattern. A plain title-plus-bullets slide fails the design gate. -6. Do not treat `pptify-design` profiles as content source material; they are design context only. +6. Do not treat `resources/design` profiles as content source material; they are design context only. ## Source-to-Deck Planning diff --git a/pptify-core/skills/pptify-context-prep/references/design-profiles.md b/skills/pptify-context-prep/references/design-profiles.md similarity index 97% rename from pptify-core/skills/pptify-context-prep/references/design-profiles.md rename to skills/pptify-context-prep/references/design-profiles.md index ed863c6..03ab506 100644 --- a/pptify-core/skills/pptify-context-prep/references/design-profiles.md +++ b/skills/pptify-context-prep/references/design-profiles.md @@ -1,7 +1,7 @@ # PPTify Design Profile Catalog -Source: `pptify-design/sources.json` — updated 2026-05-20. -Load this file when `pptify-plugin/design/design_context_catalog.py` is unavailable. +Source: `resources/design/sources.json` — updated 2026-05-20. +Load this file when `scripts/design/design_context_catalog.py` is unavailable. ## Quick-Select Guide @@ -163,7 +163,7 @@ Load this file when `pptify-plugin/design/design_context_catalog.py` is unavaila **When the toolkit is present**, load full style context with: ```powershell -uv run python pptify-plugin/design/design_context_catalog.py --profile --include-context --pretty +uv run python scripts/design/design_context_catalog.py --profile --include-context --pretty ``` **When the toolkit is absent**, use the entries above to: diff --git a/awesome-deploy/awesome-copilot/skills/pptify-deck-generation/SKILL.md b/skills/pptify-deck-generation/SKILL.md similarity index 95% rename from awesome-deploy/awesome-copilot/skills/pptify-deck-generation/SKILL.md rename to skills/pptify-deck-generation/SKILL.md index c222fad..df1b5c4 100644 --- a/awesome-deploy/awesome-copilot/skills/pptify-deck-generation/SKILL.md +++ b/skills/pptify-deck-generation/SKILL.md @@ -13,7 +13,7 @@ Use this skill when a Copilot or coding agent needs to generate PPTX slides with 2. Identify the audience, decision, business framework, core narrative, required language, target slide count, source material, reference PPTX, branding constraints, output artifact paths, and delivery deadline. 3. If the user gives only a topic, create a reasonable executive narrative and mark assumptions in the generated spec summary. When the request asks for web research, source-backed content, or data enrichment, persist source material and run the source pipeline before authoring slides. 4. If the user provides source files, URLs, research material, or a reference deck, prepare them before generating the slide spec. -5. If the user requests text-to-image or generated images with OpenAI, Azure OpenAI, or Azure AI Foundry, create `.env` from `.env.template` when needed and have the user fill provider settings or secrets directly in `.env`. Do not ask for API keys or tokens in chat or in the dialog. +5. If the user requests text-to-image or generated images with OpenAI, Azure OpenAI, or Azure AI Foundry, create `.env` from `resources/env.template` when needed and have the user fill provider settings or secrets directly in `.env`. Do not ask for API keys or tokens in chat or in the dialog. 6. Do not claim an infographic is model-generated until provider, model or deployment, auth mode, prompt, output path, and attempt status are known. The image helper has no local fallback provider. ## Required Input Dialog @@ -86,7 +86,7 @@ Record the resolved framework in `summary.business_framework`, including source, 2. Every generated slide must include `layout_tree`. Follow `pptify-slide-spec` for the full coordinate contract. 3. If the core renderer is restored, render the authored spec with `uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json`. Otherwise create the PPTX through direct PowerPoint generation and keep plugin evidence/audits alongside it. Direct `python-pptx` generation must still implement the locked design context; default placeholders and bullet-only slides are failures. 4. For reference-guided generation, include analysis/source summaries and the extracted `styles`, `brands`, `template`, and `layout` context before writing `deck-spec.json`. -5. Include the selected `pptify-design` context before writing `deck-spec.json` for every new deck unless a user-provided brand guide or reference PPTX is the primary style source. +5. Include the selected `resources/design` context before writing `deck-spec.json` for every new deck unless a user-provided brand guide or reference PPTX is the primary style source. 6. Inspect the audit for content collisions, text overflows, and warnings. 7. Verify workflow gates: source-backed decks include source corpus and RAPTOR summary metadata; requested generated images include a provider attempt manifest; successful generated raster infographics include a final hidden SVG appendix slide; generated decks include `summary.design_context` and style-derived visual elements. 8. Rebuild after each repair until generated slides have zero collisions, zero overflows, and no default-theme design failures, or clearly report the residual issue. @@ -94,7 +94,7 @@ Record the resolved framework in `summary.business_framework`, including source, ```powershell # Preferred renderer when available; otherwise use direct PowerPoint generation and keep this audit step. uv run python -m pptify deck-spec.json --out deck.pptx --audit deck-audit.json -uv run python pptify-plugin/audit/audit.py deck-spec.json --json +uv run python scripts/audit/audit.py deck-spec.json --json ``` ## Response Contract diff --git a/pptify-core/skills/pptify-quality-gates/SKILL.md b/skills/pptify-quality-gates/SKILL.md similarity index 83% rename from pptify-core/skills/pptify-quality-gates/SKILL.md rename to skills/pptify-quality-gates/SKILL.md index 9be914e..49b2956 100644 --- a/pptify-core/skills/pptify-quality-gates/SKILL.md +++ b/skills/pptify-quality-gates/SKILL.md @@ -5,7 +5,7 @@ description: "Validate and repair pptify PPTX artifacts. Use when checking deck # PPTify Quality Gates -> **Prerequisite:** Before running `audit.py`, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, load [`references/audit-checklist.md`](references/audit-checklist.md) and apply the manual checklist — it covers all 8 audit dimensions without requiring the script. +> **Prerequisite:** Before running `audit.py`, run the workspace detection check in `pptify-tooling`. If `scripts/` is absent, load [`references/audit-checklist.md`](references/audit-checklist.md) and apply the manual checklist — it covers all 8 audit dimensions without requiring the script. Use this skill before considering a generated PPTX complete. @@ -23,13 +23,13 @@ Use this skill before considering a generated PPTX complete. - Keep the generated spec, PPTX, and audit together: `deck-spec.json`, `deck.pptx`, and `deck-audit.json`. - Keep the agent-authored JSON spec or generation script on disk so it can be reviewed, repaired, and rebuilt. - Save analysis or extraction manifests when reference PPTX context was used. -- Save the selected `pptify-design` profile IDs, source URLs, license IDs, and style lock details in `summary.design_context` for every newly generated deck unless a user-provided brand guide or reference PPTX is the primary style source. +- Save the selected `resources/design` profile IDs, source URLs, license IDs, and style lock details in `summary.design_context` for every newly generated deck unless a user-provided brand guide or reference PPTX is the primary style source. ## Audit Checks - A production-ready generated deck should have zero content collisions. - A production-ready generated deck should have zero text overflows. -- A production-ready generated deck should have zero `classification: "content"` objects with `style.font_size` below 9 pt. Run `uv run python pptify-plugin/audit/audit.py deck-spec.json --json` and check `total_small_fonts`. +- A production-ready generated deck should have zero `classification: "content"` objects with `style.font_size` below 9 pt. Run `uv run python scripts/audit/audit.py deck-spec.json --json` and check `total_small_fonts`. - Review audit `warnings` for each slide even when collisions and overflows are zero. - Check that slide count, language, tone, and major topic sequence match the user request or reference context. - Check that the selected design context profile matches the user request and that source-backed context was translated into explicit primitives, colors, spacing, typography, and bboxes. @@ -44,7 +44,7 @@ Use this skill before considering a generated PPTX complete. - If content collides, move or resize objects, reduce content density, split slides, or change the coordinate plan. - If text overflows, shorten bullets, split sections, enlarge target bboxes, or split slides. **Lower explicit `font_size` only as a last resort, and never below 9 pt for content objects.** - If visual hierarchy is weak, edit explicit colors, type scale, dividers, metric cards, callouts, or whitespace in the layout tree. -- If the deck looks like default `python-pptx`, load a `pptify-design` profile, add `summary.design_context`, choose a style lock, and rebuild with explicit background/accent/card/rule primitives. +- If the deck looks like default `python-pptx`, load a `resources/design` profile, add `summary.design_context`, choose a style lock, and rebuild with explicit background/accent/card/rule primitives. - If an asset covers text, lower its `z_index`, move it to `layout_design`, resize it, or change its bbox. - If coordinates are cramped or inconsistent, repair the agent-authored bboxes directly; current plugin scripts will not run a browser or auto-layout pass. - Rebuild after each spec repair and inspect the new audit or package checks. @@ -55,7 +55,7 @@ Use this skill before considering a generated PPTX complete. - Audit a layout-tree spec and run the full test suite: ```powershell -uv run python pptify-plugin/audit/audit.py deck-spec.json --json +uv run python scripts/audit/audit.py deck-spec.json --json uv run python -m unittest discover -s tests -v ``` diff --git a/pptify-core/skills/pptify-quality-gates/references/audit-checklist.md b/skills/pptify-quality-gates/references/audit-checklist.md similarity index 92% rename from pptify-core/skills/pptify-quality-gates/references/audit-checklist.md rename to skills/pptify-quality-gates/references/audit-checklist.md index 4afc618..bf38335 100644 --- a/pptify-core/skills/pptify-quality-gates/references/audit-checklist.md +++ b/skills/pptify-quality-gates/references/audit-checklist.md @@ -1,6 +1,6 @@ # PPTify Manual Audit Checklist -Load this file when `pptify-plugin/audit/audit.py` is unavailable. +Load this file when `scripts/audit/audit.py` is unavailable. Apply every check manually to `deck-spec.json` before considering a deck production-ready. ## 1. Content Collisions @@ -41,7 +41,7 @@ Inspect `summary.design_context` in the spec root. - **Pass:** field present and contains `profile_id`, source URL, and license ID. - **Fail — any of the following:** - - `summary.design_context` absent → load a `pptify-design` profile (see `references/design-profiles.md` in `pptify-context-prep`) and rebuild. + - `summary.design_context` absent → load a `resources/design` profile (see `references/design-profiles.md` in `pptify-context-prep`) and rebuild. - Plain white backgrounds throughout with no accent elements. - Calibri-only text with default theme colors across all slides. - All slides are title-plus-bullets only (no cards, shapes, rules, or image treatments). @@ -77,7 +77,7 @@ For slides mixing image/SVG objects with text: ## 9. Audit Script (when toolkit is present) ```powershell -uv run python pptify-plugin/audit/audit.py deck-spec.json --json +uv run python scripts/audit/audit.py deck-spec.json --json ``` Check `total_collisions`, `total_overflows`, `total_small_fonts`, and `warnings` per slide even when the numeric totals are zero. diff --git a/pptify-core/skills/pptify-slide-spec/SKILL.md b/skills/pptify-slide-spec/SKILL.md similarity index 97% rename from pptify-core/skills/pptify-slide-spec/SKILL.md rename to skills/pptify-slide-spec/SKILL.md index 590a486..28f3862 100644 --- a/pptify-core/skills/pptify-slide-spec/SKILL.md +++ b/skills/pptify-slide-spec/SKILL.md @@ -22,7 +22,7 @@ Author final coordinates directly in `layout_tree`; current plugin scripts will - Return a JSON object with a top-level `slides` array for generated decks. - Keep slide IDs stable and readable, such as `s01_overview`. - Use top-level `summary` for deck metadata that belongs in the audit but not on slides. -- When source-backed design context from `pptify-design` is used, record selected profile IDs, source URLs, and license IDs in `summary.design_context`. +- When source-backed design context from `resources/design` is used, record selected profile IDs, source URLs, and license IDs in `summary.design_context`. - For newly generated decks, `summary.design_context` is required unless a user-provided brand guide or reference PPTX is documented as the primary style source. - Use `render_mode: "layout"` or omit it for generated decks; OOXML mode is for extracted specs with `ooxml_elements`. - Every generated slide must include `layout_tree`; do not rely on shorthand layout specs. diff --git a/awesome-deploy/awesome-copilot/skills/pptify-tooling/SKILL.md b/skills/pptify-tooling/SKILL.md similarity index 67% rename from awesome-deploy/awesome-copilot/skills/pptify-tooling/SKILL.md rename to skills/pptify-tooling/SKILL.md index d1d641d..5d32cd8 100644 --- a/awesome-deploy/awesome-copilot/skills/pptify-tooling/SKILL.md +++ b/skills/pptify-tooling/SKILL.md @@ -8,7 +8,7 @@ description: "Command reference for pptify plugin tools. Use when looking up ins ## Workflow 1. Run the workspace detection check before invoking any plugin script. -2. If `pptify-plugin/` is missing, read `references/toolkit-setup.md` before responding. +2. If `scripts/` is missing, read `references/toolkit-setup.md` before responding. 3. Ask before cloning or installing the optional external toolkit. 4. Run helper scripts only after dependencies are present. 5. Treat the renderer import check as diagnostic; current external toolkit installs helper scripts, not `python -m pptify`. @@ -26,18 +26,18 @@ Run this check **before** invoking any plugin script. Do not assume the toolkit ```powershell # PowerShell -Test-Path "pptify-plugin\README.md" +Test-Path "scripts\README.md" ``` ```bash # bash / macOS / Linux -test -f pptify-plugin/README.md && echo "present" || echo "missing" +test -f scripts/README.md && echo "present" || echo "missing" ``` **Decision table — act on the result before continuing:** -| `pptify-plugin/` found | `pyproject.toml` found | Action | +| `scripts/` found | `pyproject.toml` found | Action | |---|---|---| -| Yes | Yes | Proceed: run `uv run python pptify-plugin/...` commands normally | +| Yes | Yes | Proceed: run `uv run python scripts/...` commands normally | | Yes | No | Run `uv sync --extra plugins` in the repo root, then retry | | No | — | **Read [`references/toolkit-setup.md`](references/toolkit-setup.md) now** (before responding), then ask the user whether to install the optional toolkit or apply graceful fallbacks | @@ -77,13 +77,13 @@ If the import fails with `ModuleNotFoundError: No module named 'pptify'`, the `p | Purpose | Command | |---|---| -| Convert document to markdown | `uv run python pptify-plugin/documents/document_to_markdown.py --source --output-path out.md` | -| Build RAPTOR summary tree | `uv run python pptify-plugin/documents/document_to_raptor_tree.py --markdown-path source.md --output-path summary.json --title "Title" --pretty` | -| List design profiles | `uv run python pptify-plugin/design/design_context_catalog.py --list --pretty` | -| Load design profile context | `uv run python pptify-plugin/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty` | -| Search web images | `uv run python pptify-plugin/images/web_image_search.py --query "topic" --max-num 8 --pretty` | -| Search Iconify icons | `uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty` | -| Raster to SVG | `uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty` | -| Generate infographic | `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "..." --output-path out.png --pretty` | -| Audit spec | `uv run python pptify-plugin/audit/audit.py deck-spec.json --json` | +| Convert document to markdown | `uv run python scripts/documents/document_to_markdown.py --source --output-path out.md` | +| Build RAPTOR summary tree | `uv run python scripts/documents/document_to_raptor_tree.py --markdown-path source.md --output-path summary.json --title "Title" --pretty` | +| List design profiles | `uv run python scripts/design/design_context_catalog.py --list --pretty` | +| Load design profile context | `uv run python scripts/design/design_context_catalog.py --profile fluent-ui-design-tokens --include-context --pretty` | +| Search web images | `uv run python scripts/images/web_image_search.py --query "topic" --max-num 8 --pretty` | +| Search Iconify icons | `uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty` | +| Raster to SVG | `uv run python scripts/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty` | +| Generate infographic | `uv run python scripts/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "..." --output-path out.png --pretty` | +| Audit spec | `uv run python scripts/audit/audit.py deck-spec.json --json` | | Run tests | `uv run python -m unittest discover -s tests -v` | diff --git a/awesome-deploy/awesome-copilot/skills/pptify-tooling/references/toolkit-setup.md b/skills/pptify-tooling/references/toolkit-setup.md similarity index 57% rename from awesome-deploy/awesome-copilot/skills/pptify-tooling/references/toolkit-setup.md rename to skills/pptify-tooling/references/toolkit-setup.md index e3b5e16..86f72c5 100644 --- a/awesome-deploy/awesome-copilot/skills/pptify-tooling/references/toolkit-setup.md +++ b/skills/pptify-tooling/references/toolkit-setup.md @@ -1,6 +1,6 @@ # PPTify Toolkit Setup -Load this file when `pptify-plugin/` is not found in the workspace and the user wants to install the optional PPTify toolkit. +Load this file when `scripts/` is not found in the workspace and the user wants to install the optional PPTify toolkit. ## Repository @@ -39,16 +39,16 @@ If the workspace root belongs to another project, ask the user before cloning. S | Module path | Requires extra | What it provides | |---|---|---| -| `pptify-plugin/documents/document_to_markdown.py` | plugins | Convert PDF, DOCX, HTML, or plain text to markdown for source prep | -| `pptify-plugin/documents/document_to_raptor_tree.py` | plugins | Build a RAPTOR hierarchical summary tree from a markdown source | -| `pptify-plugin/design/design_context_catalog.py` | plugins | List and load pptify-design profiles; returns style context for spec authoring | -| `pptify-plugin/images/web_image_search.py` | plugins | Search the web for candidate images without required API keys | -| `pptify-plugin/images/iconfy_search.py` | plugins | Search Iconify icon library for SVG icons by query, collection, and hex color | -| `pptify-plugin/images/raster_image_to_svg.py` | plugins | Convert raster images to SVG wrappers; optional vector trace mode | -| `pptify-plugin/images/text_prompt_to_infographic.py` | plugins | Generate infographic images via OpenAI or Azure OpenAI (no local fallback) | -| `pptify-plugin/audit/audit.py` | plugins | Validate a deck spec JSON for collisions, overflows, small fonts, and warnings | -| `pptify-plugin/extraction/pptx_extractor.py` | plugins | Extract slide text, style, layout, and media metadata from a reference PPTX | -| `pptify-plugin/extraction/pptx_style_master.py` | plugins | Extract brand, template, and master-slide style facts from a reference PPTX | +| `scripts/documents/document_to_markdown.py` | plugins | Convert PDF, DOCX, HTML, or plain text to markdown for source prep | +| `scripts/documents/document_to_raptor_tree.py` | plugins | Build a RAPTOR hierarchical summary tree from a markdown source | +| `scripts/design/design_context_catalog.py` | plugins | List and load resources/design profiles; returns style context for spec authoring | +| `scripts/images/web_image_search.py` | plugins | Search the web for candidate images without required API keys | +| `scripts/images/iconfy_search.py` | plugins | Search Iconify icon library for SVG icons by query, collection, and hex color | +| `scripts/images/raster_image_to_svg.py` | plugins | Convert raster images to SVG wrappers; optional vector trace mode | +| `scripts/images/text_prompt_to_infographic.py` | plugins | Generate infographic images via OpenAI or Azure OpenAI (no local fallback) | +| `scripts/audit/audit.py` | plugins | Validate a deck spec JSON for collisions, overflows, small fonts, and warnings | +| `scripts/extraction/pptx_extractor.py` | plugins | Extract slide text, style, layout, and media metadata from a reference PPTX | +| `scripts/extraction/pptx_style_master.py` | plugins | Extract brand, template, and master-slide style facts from a reference PPTX | ## Image Generation `.env` @@ -81,10 +81,10 @@ Use `az login` when managed identity or CLI auth is preferred over an API key. uv run python pptify-cli help # List available design profiles -uv run python pptify-plugin/design/design_context_catalog.py --list --pretty +uv run python scripts/design/design_context_catalog.py --list --pretty # Run a spec audit smoke test -uv run python pptify-plugin/audit/audit.py deck-spec.json +uv run python scripts/audit/audit.py deck-spec.json ``` Renderer check, for diagnostics only: @@ -93,4 +93,4 @@ Renderer check, for diagnostics only: uv run python -c "import pptify; print('renderer present')" ``` -If this fails with `ModuleNotFoundError: No module named 'pptify'`, that is expected for the current external toolkit. Use the standalone `pptify-plugin/` helper scripts and do not run `python -m pptify`. +If this fails with `ModuleNotFoundError: No module named 'pptify'`, that is expected for the current external toolkit. Use the standalone `scripts/` helper scripts and do not run `python -m pptify`. diff --git a/awesome-deploy/awesome-copilot/skills/pptify-visual-assets/SKILL.md b/skills/pptify-visual-assets/SKILL.md similarity index 68% rename from awesome-deploy/awesome-copilot/skills/pptify-visual-assets/SKILL.md rename to skills/pptify-visual-assets/SKILL.md index dee3790..45530d3 100644 --- a/awesome-deploy/awesome-copilot/skills/pptify-visual-assets/SKILL.md +++ b/skills/pptify-visual-assets/SKILL.md @@ -5,7 +5,7 @@ description: "Find, generate, and place visual assets for pptify PPTX decks. Use # PPTify Visual Assets -> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `pptify-plugin/` is absent, apply the graceful-degradation fallbacks documented there. +> **Prerequisite:** Before running any plugin script in this skill, run the workspace detection check in `pptify-tooling`. If `scripts/` is absent, apply the graceful-degradation fallbacks documented there. Use this skill when a deck needs icons, images, diagrams, infographics, or media-backed slide objects. @@ -18,27 +18,27 @@ Use this skill when a deck needs icons, images, diagrams, infographics, or media 5. Recheck layering so assets do not cover readable text. ```powershell -uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty -uv run python pptify-plugin/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty -uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty +uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty +uv run python scripts/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty +uv run python scripts/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty ``` ## Icons -- Search Iconify when an icon improves scanning: `uv run python pptify-plugin/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty`. +- Search Iconify when an icon improves scanning: `uv run python scripts/images/iconfy_search.py --query governance --collection fluent --color 0078D4 --max-num 8 --pretty`. - Prefer simple, single-color SVG icons that match the theme accent. - Use icons as supporting visual cues, not as replacements for required text. ## Images -- Search candidate images with `uv run python pptify-plugin/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty`. +- Search candidate images with `uv run python scripts/images/web_image_search.py --query "factory traceability dashboard" --max-num 8 --pretty`. - Use local file paths in image objects when an image is selected: `content.path` plus `content.alt`. - Give images an explicit `bbox` and use concise adjacent text. - Do not use image placeholders as fallback assets; select an approved asset or omit the image object. ## SVG and Raster Handling -- Convert raster images to SVG wrappers with `uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty`. +- Convert raster images to SVG wrappers with `uv run python scripts/images/raster_image_to_svg.py --source logo.png --output-path logo.svg --pretty`. - Use `--mode vector-trace` only when optional tracing dependencies are installed and a true vector result is needed. - Keep generated SVGs simple and readable when they are intended for PowerPoint editing. - Vector tracing raster infographics can lose or distort text. Keep the original generated raster on visible slides when text fidelity matters, and place the traced SVG on a separate hidden final appendix slide for editability/reference. @@ -48,13 +48,13 @@ uv run python pptify-plugin/images/raster_image_to_svg.py --source logo.png --ou - Generate text-to-image infographics only through OpenAI or Azure OpenAI providers configured by the user. - Do not substitute a local fallback image provider when user-managed provider access is missing. - Before generating any text-to-image artifact, collect missing required values with the VS Code prompt input dialog (`vscode_askQuestions` or equivalent): provider, prompt, model or deployment, image size, output path, and any non-secret access settings. -- For OpenAI image generation, create `.env` from `.env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=openai`, `OPENAI_API_KEY`, and optionally `OPENAI_IMAGE_MODEL` directly in `.env`. -- For Azure `gpt-image-2` or `gpt-image-2.0` requests, create `.env` from `.env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=azure-openai`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_IMAGE_DEPLOYMENT`, optional timeout, and any required key auth value directly in `.env`. +- For OpenAI image generation, create `.env` from `resources/env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=openai`, `OPENAI_API_KEY`, and optionally `OPENAI_IMAGE_MODEL` directly in `.env`. +- For Azure `gpt-image-2` or `gpt-image-2.0` requests, create `.env` from `resources/env.template` when needed and have the user fill `PPTIFY_IMAGE_PROVIDER=azure-openai`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_IMAGE_DEPLOYMENT`, optional timeout, and any required key auth value directly in `.env`. - Never ask the user to paste API keys, tokens, or connection strings into chat or into the prompt input dialog. If Entra auth is preferred, tell them to run `az login` in a terminal. -- The image helper loads `.env` automatically before generation. Example: `uv run python pptify-plugin/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty`. +- The image helper loads `.env` automatically before generation. Example: `uv run python scripts/images/text_prompt_to_infographic.py --provider azure-openai --size "1024x1024" --prompt "Cloud governance roadmap" --output-path infographic.png --pretty`. - Save an attempt manifest beside the image output with provider, model or deployment, auth mode, prompt path, output path, success status, and error details on failure. A failed model call should be reported as failed, not replaced by a local placeholder and described as generated. - If a provider call times out after authentication succeeds, retry once with a longer timeout when the user has already provided non-secret provider details. -- NotebookLM bridge commands are unavailable in this workspace snapshot because `pptify-plugin/images/notebooklm_infographic.py` is absent. Do not call a NotebookLM bridge unless that script is restored. +- NotebookLM bridge commands are unavailable in this workspace snapshot because `scripts/images/notebooklm_infographic.py` is absent. Do not call a NotebookLM bridge unless that script is restored. - For generated infographics, prefer the raster output as the visible slide asset. Add any raster-to-SVG vector trace as `hidden: true` on the final slide rather than replacing the visible infographic. ## Asset Placement diff --git a/uv.lock b/uv.lock index ff6fbbb..fe1f440 100644 --- a/uv.lock +++ b/uv.lock @@ -761,6 +761,7 @@ plugins = [ { name = "beautifulsoup4" }, { name = "icrawler" }, { name = "markitdown", extra = ["docx", "pdf"] }, + { name = "onnxruntime" }, { name = "tokenizers" }, { name = "vtracer" }, ] @@ -770,6 +771,7 @@ requires-dist = [ { name = "beautifulsoup4", marker = "extra == 'plugins'", specifier = ">=4.12.0" }, { name = "icrawler", marker = "extra == 'plugins'", specifier = ">=0.6.10" }, { name = "markitdown", extras = ["docx", "pdf"], marker = "extra == 'plugins'", specifier = ">=0.1.5" }, + { name = "onnxruntime", marker = "extra == 'plugins'", specifier = ">=1.20.0" }, { name = "python-pptx", specifier = ">=1.0.2" }, { name = "tokenizers", marker = "extra == 'plugins'", specifier = ">=0.21.0" }, { name = "vtracer", marker = "extra == 'plugins'", specifier = ">=0.6.15" },