agentleFS
funenc-labfunenc-lab/slidemax/skills/slidemax_workflow/AGENTS.md

slidemax / slidemax_workflow

AGENTS.md0 starsChanged 9 months agoMITView on GitHub

AI agent note: this file is the canonical workflow and rule handbook for PPT generation in this repository. Read this file before executing /generate-ppt. Use this section to choose the correct path before reading the detailed stage playbooks.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

34 rules. About 0 are common, 25 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈25

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this section to choose the correct path before reading the detailed stage playbooks.

    line 20
  2. Distinctive:

    Always normalize PDF or URL sources before strategy work starts.

    line 94
  3. Distinctive:

    Always create the project folder before writing prompts, notes, SVG, or exported files.

    line 95
  4. Distinctive:

    Always resolve template files before Strategist begins.

    line 96
  5. Distinctive:

    Always write image prompts before AI image generation.

    line 97
  6. Very specific:

    Always keep image assets on project-local paths under images/ or images/stock/.

    line 98
  7. Distinctive:

    Always run provider smoke tests before treating a live image provider as stable.

    line 99
  8. Very specific:

    Always split notes explicitly with total_md_split before delivery exports.

    line 100
  9. Distinctive:

    Always treat exporter auto-split as a fallback, not the primary delivery path.

    line 101
  10. Distinctive:

    Always finalize SVG before exporting PPTX for delivery.

    line 102
  11. Very specific:

    Always run project_manager validate before claiming the workflow is complete.

    line 103
  12. Very specific:

    Always treat layout overlap, text coverage, and canvas overflow in svg_final/ as delivery-blocking errors.

    line 104
  13. Distinctive:

    Always spot check the latest output before saying delivery is done.

    line 105
  14. Distinctive:

    Use these documents for detailed stage execution.

    line 119
  15. Distinctive:

    Before executing any stage, read the corresponding role file.

    line 153
  16. Distinctive:

    Do not perform a role's task before reading its file.

    line 165
  17. Distinctive:

    Use a marker like this:

    line 169
  18. Distinctive:

    Every phase must end with a clear completion checkpoint and the next step.

    line 182
  19. Distinctive:

    When the user provides a PDF or URL, convert it immediately.

    line 192
  20. Very specific:

    Before any detailed content analysis, Strategist must complete the eight confirmations documented in …

    line 216
  21. Distinctive:

    If the image strategy includes user-provided assets, run:

    line 218
  22. Distinctive:

    Do that after the eight confirmations and before finalizing the design brief.

    line 224
  23. Distinctive:

    Do not bypass this path for delivery work unless you are intentionally debugging an internal step.

    line 245
  24. Very specific:

    Use <rect> for the background

    line 254
  25. Distinctive:

    Use system fonts defined by the chosen typography strategy

    line 255
  26. Very specific:

    Use manual line breaks with <tspan>

    line 256
  27. Distinctive:

    Read the target role file before switching stages.

    line 368
  28. Distinctive:

    Create the project immediately after source normalization is complete.

    line 371
  29. Distinctive:

    Treat the Strategist eight confirmations as mandatory, regardless of template usage.

    line 373
  30. Very specific:

    If the image strategy includes user-provided assets, run analyze_images before finalizing the design brief.

    line 374
  31. Distinctive:

    If the image strategy includes AI generation or stock assets, finish Image_Generator before Executor starts.

    line 375
  32. Distinctive:

    Treat the Executor workflow as two required phases: visual construction and logic construction.

    line 376
  33. Distinctive:

    After SVG and notes are ready, run the full Stage 7 delivery chain in order.

    line 377
  34. Very specific:

    Do not add narrow --only flags to bypass the standard delivery path unless you are intentionally debugging a specific internal step.

    line 390

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md - SlideMax Workflow Handbook

AI agent note: this file is the canonical workflow and rule handbook for PPT generation in this repository.

Read this file before executing /generate-ppt.


Navigation

SectionDescription
WorkflowEnd-to-end stage map and stage playbook routing
RulebookConstraints, handoff protocol, and non-negotiable rules
Common CommandsCanonical command quick reference
Important ResourcesRoles, guides, templates, docs, and examples

Operational Quickstart

Use this section to choose the correct path before reading the detailed stage playbooks.

End-to-End Flow

User source
  -> Normalize source format
     -> PDF: `pdf_to_md`
     -> URL: `web_to_md` or `web_to_md_cjs`
     -> Screenshot or image document: use OCR skill `.agent/skills/ocr_image_to_markdown/SKILL.md`
     -> Markdown or text: use directly
  -> Initialize project with `project_manager init`
  -> Inspect or preflight the project when needed with `project_manager info|audit|doctor`
  -> Decide template strategy
     -> Template present: copy into `templates/` and `images/` first
     -> No template: continue with free design
  -> Run Strategist
  -> Run Image_Generator when AI or stock images are needed
  -> Run the matching Executor
  -> Run `total_md_split`
  -> Run `finalize_svg`
  -> Run `svg_to_pptx -s final`
  -> Run `project_manager validate`
  -> Spot check outputs before claiming completion

Command Decision Flow

Need to start or continue a PPT task?
|
+-- Source is PDF? ----------------------------- yes -> `pdf_to_md`
|
+-- Source is URL? ----------------------------- yes -> `web_to_md` / `web_to_md_cjs`
|
+-- Source is screenshot or image document? ---- yes -> OCR skill at `.agent/skills/ocr_image_to_markdown/SKILL.md`
|
+-- Project folder missing? -------------------- yes -> `project_manager init`
|
+-- Need project inspection or preflight? ------ yes -> `project_manager info|audit|doctor`
|
+-- Template-driven delivery? ------------------ yes -> copy template assets before Strategist
|
+-- User images provided? ---------------------- yes -> `analyze_images`
|
+-- AI or stock images needed? ----------------- yes -> Stage 5 image workflow
|                                                     -> `image_generate` or stock commands
|
+-- SVG output and `notes/total.md` ready? ----- yes -> `total_md_split`
|
+-- Per-slide notes ready? --------------------- yes -> `finalize_svg`
|
+-- Finalized SVG ready? ----------------------- yes -> `svg_to_pptx -s final`
|
+-- Need delivery verification? ---------------- yes -> `project_manager validate`

Stage Gate Checklist

GateRequired EvidenceDo Not Proceed Until
PreflightAGENTS.md has been read and the workflow is understoodRole switching rules and source normalization rules are clear
Source ReadySource is already Markdown, or conversion has completedPDF, URL, or image-based source has been normalized
Project ReadyProject directory exists under workspace/Workflow outputs have a valid destination
Template ReadyTemplate files and assets are copied into the projectStrategist can reference the actual template materials
Strategy ReadyA design brief exists in the projectExecutor has a design and content contract
Image ReadyImage prompts and assets exist on project-local pathsExecutor will not need to guess or hotlink assets
SVG ReadySlides exist in svg_output/ and notes/total.md existsNote splitting has real input to process
Notes Readytotal_md_split has produced per-slide notes in notes/Finalize and export will not hide note mapping problems
Final ReadyPost-processing completed into svg_final/Export uses finalized assets instead of raw SVG
Delivery ReadyPPTX exists, validation passes, and a spot check was completedCompletion claims are backed by current evidence

Reliability Checklist

  • Always normalize PDF or URL sources before strategy work starts.
  • Always create the project folder before writing prompts, notes, SVG, or exported files.
  • Always resolve template files before Strategist begins.
  • Always write image prompts before AI image generation.
  • Always keep image assets on project-local paths under images/ or images/stock/.
  • Always run provider smoke tests before treating a live image provider as stable.
  • Always split notes explicitly with total_md_split before delivery exports.
  • Always treat exporter auto-split as a fallback, not the primary delivery path.
  • Always finalize SVG before exporting PPTX for delivery.
  • Always run project_manager validate before claiming the workflow is complete.
  • Always treat layout overlap, text coverage, and canvas overflow in svg_final/ as delivery-blocking errors.
  • Always spot check the latest output before saying delivery is done.

Workflow

This is the primary execution workflow for SlideMax PPT tasks.

Workflow Overview

Source -> Project Init -> Template Decision -> Strategist -> [Image_Generator] -> Executor -> Note Split -> Finalize -> Export -> Validate

Stage Playbooks

Use these documents for detailed stage execution.

Stage GroupFileCovers
Preflight, source, and project setupworkflows/stages/01-preflight-source-project.mdStage 0 to Stage 3
Strategy and image acquisitionworkflows/stages/02-strategy-and-images.mdStage 4 to Stage 5
Execution, delivery, and optimizationworkflows/stages/03-execution-delivery.mdStage 6 to Stage 8

Stage Summary

StageTriggerMandatory ReadPrimary OutputCanonical Commands
Stage 0Any PPT workflow taskAGENTS.md, Stage 0-3 playbookPreflight confirmationNone
Stage 1Source is PDF, URL, or image-based documentStage 0-3 playbookMarkdown sourcepdf_to_md, web_to_md, web_to_md_cjs, OCR skill
Stage 2New project requiredStage 0-3 playbookProject folderproject_manager init
Stage 3Template-based workflowStage 0-3 playbookTemplate files in projectCopy assets before Strategist
Stage 4Every PPT projectroles/Strategist.md, Stage 4-5 playbookProject design briefanalyze_images when user images exist
Stage 5AI or stock images neededroles/Image_Generator.md, Stage 4-5 playbookimages/, images/stock/, images/image_prompts.mdimage_generate, download_stock_image, register_stock_image, smoke_test_image_provider
Stage 6Slide productionMatching Executor role, Stage 6-8 playbooksvg_output/, notes/total.mdRole-driven generation
Stage 7SVG output existsStage 6-8 playbook, references/docs/command_reference.mdSplit notes, svg_final/, .pptx, validation resulttotal_md_split, finalize_svg, svg_to_pptx, project_manager validate
Stage 8User requests polish after a first draftroles/Optimizer_CRAP.md, Stage 6-8 playbookImproved SVG/PPTXRe-run Stage 7 after optimizer edits

Rulebook

The following constraints and protocols are mandatory when executing the SlideMax workflow.

Project Overview

SlideMax is an AI-assisted multi-format SVG content generation system. It turns source documents into presentation-ready outputs through staged role handoffs and canonical tooling.

Role Switching Protocol

1. Read the Role Definition Before Switching

Before executing any stage, read the corresponding role file.

StageRequired FileTrigger
Strategy planningskills/slidemax_workflow/roles/Strategist.mdNew PPT or related content-generation request
Image acquisitionskills/slidemax_workflow/roles/Image_Generator.mdImage strategy includes AI generation or stock assets
General executionskills/slidemax_workflow/roles/Executor_General.mdUser chooses the general visual route
Consultant executionskills/slidemax_workflow/roles/Executor_Consultant.mdUser chooses the consultant route
Top consultant executionskills/slidemax_workflow/roles/Executor_Consultant_Top.mdUser chooses the top consultant route
Visual optimizationskills/slidemax_workflow/roles/Optimizer_CRAP.mdUser requests polish or quality is not yet good enough
Template creationskills/slidemax_workflow/roles/Template_Designer.mdThe task is specifically to build reusable templates

Do not perform a role's task before reading its file.

2. Emit an Explicit Role Switch Marker

Use a marker like this:

---
## [Role Switch: Image_Generator]

Read: `skills/slidemax_workflow/roles/Image_Generator.md`
Task: Create prompts and prepare required image assets for the project
---

3. Emit Phase Checkpoints

Every phase must end with a clear completion checkpoint and the next step.

Reference markers live in:

  • workflows/stages/02-strategy-and-images.md
  • workflows/stages/03-execution-delivery.md
  • roles/guides/strategist-design-brief-contract.md

Automatic Source Normalization

When the user provides a PDF or URL, convert it immediately.

SourceToolCommand
PDFpdf_to_mdpython3 skills/slidemax_workflow/scripts/slidemax.py pdf_to_md <file>
Web pageweb_to_mdpython3 skills/slidemax_workflow/scripts/slidemax.py web_to_md <url>
WeChat or protected siteweb_to_md_cjspython3 skills/slidemax_workflow/scripts/slidemax.py web_to_md_cjs <url>

Prohibited behavior:

  • Waiting for the user to explicitly ask for conversion after already detecting a PDF or URL
  • Starting strategy work before normalization

Correct behavior:

  • Convert first
  • Create the project
  • Resolve template choice
  • Enter Strategist

Critical Rules

1. Strategist Must Start with Eight Confirmations

Before any detailed content analysis, Strategist must complete the eight confirmations documented in roles/guides/strategist-confirmations.md.

If the image strategy includes user-provided assets, run:

python3 skills/slidemax_workflow/scripts/slidemax.py analyze_images <project-path>/images

Do that after the eight confirmations and before finalizing the design brief.

2. Image Assets Must Be Localized Before Execution

  • Image_Generator must write images/image_prompts.md before live generation starts.
  • Stock assets must be registered under images/stock/.
  • Required image files must be local before Executor starts, unless the brief intentionally marks them as placeholders.

3. Executor Must Produce Both Slides and Notes

Executor outputs are incomplete without both:

  • svg_output/
  • notes/total.md

4. Delivery Uses the Standard Four-Step Path

total_md_split -> finalize_svg -> svg_to_pptx -s final -> project_manager validate

Do not bypass this path for delivery work unless you are intentionally debugging an internal step.

5. SVG Technical Constraints

Executor role files contain the detailed examples. These baseline rules are non-negotiable:

Base rules:

  • viewBox must match the target canvas
  • Use <rect> for the background
  • Use system fonts defined by the chosen typography strategy
  • Use manual line breaks with <tspan>

Blacklist:

clipPath | mask | <style> | class | id | external CSS | <foreignObject> | textPath | @font-face | <animate*> | <script> | marker-end | <iframe>

PPT compatibility replacements:

AvoidUse Instead
rgba() colorsfill-opacity or stroke-opacity
<g opacity>Per-element opacity
<image opacity>Overlay-based dimming or masking approach
marker-end arrowsExplicit shapes such as <polygon>

6. Canvas Formats

FormatSizeviewBox
PPT 16:91280x7200 0 1280 720
PPT 4:31024x7680 0 1024 768
Xiaohongshu1242x16600 0 1242 1660
WeChat Moments1080x10800 0 1080 1080
Story1080x19200 0 1080 1920
WeChat Header900x3830 0 900 383

Full format reference: references/docs/canvas_formats.md

Common Commands

# Convert PDF to Markdown
python3 skills/slidemax_workflow/scripts/slidemax.py pdf_to_md <pdf-file>

# Convert a web page to Markdown
python3 skills/slidemax_workflow/scripts/slidemax.py web_to_md <url>
python3 skills/slidemax_workflow/scripts/slidemax.py web_to_md_cjs <url>

# Initialize a project
python3 skills/slidemax_workflow/scripts/slidemax.py project_manager init <name> --format ppt169

# Inspect or validate a project
python3 skills/slidemax_workflow/scripts/slidemax.py project_manager info <path>
python3 skills/slidemax_workflow/scripts/slidemax.py project_manager doctor <path>
python3 skills/slidemax_workflow/scripts/slidemax.py project_manager validate <path>

# Check SVG quality
python3 skills/slidemax_workflow/scripts/slidemax.py svg_quality_checker <path>
python3 skills/slidemax_workflow/scripts/slidemax.py layout_quality_checker <path>

# Split notes
python3 skills/slidemax_workflow/scripts/slidemax.py total_md_split <project-path>

# Finalize SVG
python3 skills/slidemax_workflow/scripts/slidemax.py finalize_svg <project-path>

# Export PPTX with notes
python3 skills/slidemax_workflow/scripts/slidemax.py svg_to_pptx <project-path> -s final

# Export PPTX without notes
python3 skills/slidemax_workflow/scripts/slidemax.py svg_to_pptx <project-path> -s final --no-notes

Project Layout

project/
├── svg_output/
│   ├── 01_cover.svg
│   ├── 02_toc.svg
│   └── ...
├── svg_final/
├── images/
│   └── stock/
├── notes/
│   ├── total.md
│   ├── 01_cover.md
│   ├── 02_toc.md
│   └── ...
└── *.pptx

Important Resources

ResourcePath
Workflow redirectskills/slidemax_workflow/workflows/generate-ppt.md
Stage playbooks indexskills/slidemax_workflow/workflows/stages/README.md
Role indexskills/slidemax_workflow/roles/AGENTS.md
Role guides indexskills/slidemax_workflow/roles/guides/README.md
Chart templatesskills/slidemax_workflow/templates/charts/
Icon libraryskills/slidemax_workflow/templates/icons/
Design guidelinesskills/slidemax_workflow/references/docs/design_guidelines.md
Image layout specificationskills/slidemax_workflow/references/docs/image_layout_spec.md
Canvas formatsskills/slidemax_workflow/references/docs/canvas_formats.md
SVG image embeddingskills/slidemax_workflow/references/docs/svg_image_embedding.md
Image generation providersskills/slidemax_workflow/references/docs/image_generation_providers.md
Image setupskills/slidemax_workflow/references/docs/image_generation_setup.md
Image prompt guidanceskills/slidemax_workflow/references/docs/image_prompt_guidance.md
Example projectsskills/slidemax_workflow/examples/
Command referenceskills/slidemax_workflow/references/docs/command_reference.md

AI Agent Notes

Core Principles

  • This repository defines a role-based workflow, not a single monolithic prompt.
  • Quality depends on strict adherence to the design brief, canvas format, and delivery chain.
  • The role switching protocol is mandatory.

Mandatory Rules for Agents

  1. Read the target role file before switching stages.
  2. Emit an explicit role switch marker.
  3. Emit a checkpoint at the end of each stage.
  4. Create the project immediately after source normalization is complete.
  5. Resolve template choice before Strategist begins.
  6. Treat the Strategist eight confirmations as mandatory, regardless of template usage.
  7. If the image strategy includes user-provided assets, run analyze_images before finalizing the design brief.
  8. If the image strategy includes AI generation or stock assets, finish Image_Generator before Executor starts.
  9. Treat the Executor workflow as two required phases: visual construction and logic construction.
  10. After SVG and notes are ready, run the full Stage 7 delivery chain in order.

Delivery Reminder

Once SVG and notes are complete, run:

python3 skills/slidemax_workflow/scripts/slidemax.py total_md_split <project-path>
python3 skills/slidemax_workflow/scripts/slidemax.py finalize_svg <project-path>
python3 skills/slidemax_workflow/scripts/slidemax.py svg_to_pptx <project-path> -s final
python3 skills/slidemax_workflow/scripts/slidemax.py project_manager validate <project-path>

Do not add narrow --only flags to bypass the standard delivery path unless you are intentionally debugging a specific internal step.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.