Bruce's PPTX Generator
Task Routing
Based on the task type, select the correct path and load the corresponding file.
| Task | File to Load |
|---|---|
| Editing an existing PPTX template | editing.md + pptxgenjs.md |
| Creating from scratch (using a style preset) | workflow.md + preset file + pptxgenjs.md + qa.md |
Style Presets
When using a preset, load the preset file which includes complete page layouts, component functions, color palettes, and content density rules.
Style Selection
If the user doesn't specify a style, default to Huawei Corporate. To confirm, use AskUserQuestion: What feeling should the audience have after viewing this presentation?
| Preset | Audience Feeling | Font | File | Use Case |
|---|---|---|---|---|
| McKinsey Blue | Logical Rigor | YaHei + Arial Black | mckinsey-style.md | Strategic briefings, consulting reports, management proposals |
| Huawei Corporate | Professional Authority | YaHei + Arial Black | huawei-style.md | Product introductions, company overviews, solutions, government/enterprise proposals |
| Apple Minimal | Inspiring | YaHei + Arial Black | apple-minimal-style.md | Product launches, Demos, Vision talks, external roadshows |
| Pitch Deck | Sell the Vision | YaHei + Arial Black | pitch-deck-style.md | Fundraising roadshows, Roadmap proposals, Business Cases |
| Data Analysis | Clarify Insights | YaHei + Arial Black | data-analysis-style.md | User research reports, A/B results, OKR reviews, Metrics meetings |
| Dark Tech | Innovation & Forward-thinking | YaHei + Arial Black | dark-tech-style.md | Product launches, Technical talks, AI capability demos |
Inform the user of the recommended preset and the reason, then enter the workflow. Allow manual selection if the user is unsatisfied.
Data Inference Principles
Vague statements are prohibited in presentations. Every argument must be supported by specific data. When user input lacks data:
- Ask First: If there are 1–3 data gaps in the input, use
AskUserQuestionto ask for all missing numbers at once, specifying which slide each number is for. - Allow Estimations: When there are many gaps or the user explicitly says "generate directly," use typical industry benchmark values. Add a footnote at the bottom of the slide: "Based on industry estimates; replace with actual data." Inform the user which values are estimated in your response.
- No Empty Placeholders: Do not write "XX%", "N items", "hundreds of thousands of users" without filling in actual numbers.
Signal words triggering a question (ask for numbers if any appear):
"many users," "significant improvement," "dramatic reduction," "rapid growth," "substantial," "clearly," "effective"
Furnished Apartment Delivery Standard (Mandatory)
Every presentation must meet the "furnished apartment" standard; delivering "bare shell" slides with just a title and one sentence is prohibited.
Content Richness (Required per content slide)
- Data or statistics are mandatory: Every core argument must be supported by a number, ratio, time, or industry data. E.g., "Chronic follow-up dropout rate > 60%" or "Reaching 118 million empty-nest elderly."
- Tagline is mandatory: Each card or module must have a precise tagline of 12–20 words explaining "What problem does this solve?" E.g., "Financial-grade identity authentication, fully controllable data access."
- Bullets must have visual prefixes: Use small squares/dots/numbers as prefixes. Pure text stacking is prohibited. Each bullet should be a complete semantic sentence, not just a keyword.
- Non-text visual elements are mandatory: Except for Apple Minimal, every content slide must include at least one non-text visual component (SVG icon, data card, flow chart, progress ring, comparison matrix, architecture diagram, KPI card). A slide with only a text list is considered a bare shell and must be supplemented with visual elements. For Apple Minimal style, which emphasizes minimalism and restraint, add visual elements as appropriate per slide.
- Graphic density limits (overflow prevention):
- Each slide may use at most one large graphic component (Flowchart OR Matrix OR Progress Ring Group OR Pyramid – choose one; stacking is prohibited)
- Do not combine two large graphics on the same page: Progress Ring + Matrix, Pyramid + Flowchart = high overflow risk
- The content area height is only 3.95" (y:1.05 → y:5.0). After placing a large graphic, remaining text space is limited; estimate before adding whether the text can fit
- Do not hand-code from scratch the following components (not in the preset library; implementing an algorithm would be required): Funnel chart, Gantt chart, Radar chart. If the current preset file contains a corresponding function, use it; otherwise, skip.
- Bottom note/insight area is mandatory: The bottom of each core module should have a 1–2 line supplementary note to reinforce value or provide an action recommendation.
Component Upgrade Principle
Each style has corresponding Furnished Rich Card components that must be used as the first choice; avoid falling back to basic cards with only title + desc:
| Style | Rich Cover Component | Rich Content Components | Prohibited Basic Components |
|---|---|---|---|
| Huawei Corporate | createRichCover | addHuaweiRichCard, makePainPointCard, addHuaweiProcessFlow | Basic usage of addHuaweiNumberedCard (only title+desc, no tagline/bullet/bottom note) |
| McKinsey Blue | createRichCover | addMcKinseyRichCard, makeProgressRing + KPI card | addMcKinseyCard(value, label, desc) |
| Apple Minimal | createRichCover | addAppleRichCard, addAppleKPI | addAppleBullets used alone |
| Pitch Deck | createRichCover | addPitchRichCard, addTractionCard | Plain text list slide |
| Dark Tech | createRichCover | addDarkRichCard, addFeatureItem | Only title + body paragraph |
| Data Analysis | createRichCover | addDataRichCard, createChartWithInsightsSlide | Plain text analysis slide |
- The cover slide must have decorative visual elements (geometric shapes, SVG decorations, capability cards on the right, etc.); a cover with only title and date is prohibited.
- Note:
createRichCoverhas different parameter signatures per style (Huawei version hasmetrics/valueSlogan, Apple version hasspotlight, Pitch Deck version hastraction/stage). Always consult the current preset file for call examples before use; do not apply parameters across styles.
Mandatory Rules
The following rules apply to every slide in every presentation.
Dimensions — 10" × 5.625" (LAYOUT_16x9). Every element must satisfy x + w ≤ 10 and y + h ≤ 5.625.
Colors — 6-digit hexadecimal, without # (e.g., "FF0000"). Using "#FF0000" is prohibited — it will corrupt the file.
Fonts — Chinese: Microsoft YaHei | English: Arial (or alternative fonts specified in the current preset)
Prohibited Fonts — The following fonts are prohibited for display/title fonts: SimSun, Fangsong, Times New Roman. They look amateurish in modern presentations.
theme object — Two-layer convention that must be clearly distinguished:
① compile.js / subagent input layer (strictly 5 keys)
| Key | Purpose |
|---|---|
theme.primary | Darkest color — titles, main text |
theme.secondary | Accent color — interactive elements, highlights |
theme.accent | Signature decorative color (e.g., orange lines) |
theme.light | Light fill — card backgrounds, zebra striping rows |
theme.bg | Slide background color |
The theme object defined in compile.js should only pass these 5 keys. The subagent must also declare only these 5 in the DESIGN INTENT comment. Do not use background, text, muted, darkest, lightest, or other invented key names at this layer.
② Style preset file internal layer (allows extended keys)
Component functions in each preset file (e.g., huawei-style.md) may reference extended keys defined within the preset file, such as theme.border, theme.bodyText, theme.mutedText, theme.orangeLight, etc. These keys are defined in the theme const block of the preset file and are not considered violations.
Page Number Badge — Every slide except the cover must have one:
- Circle shape:
x: 9.3, y: 5.1, w: 0.4, h: 0.4 - Capsule shape:
x: 9.1, y: 5.15, w: 0.6, h: 0.35 - Show only the page number (e.g.,
"3"); using a"3/12"format is prohibited
createSlide() must be a synchronous function — Do not use async. compile.js will not await it.
Prohibitions (Common AI-Generated Quality Traps)
These are patterns most likely to make a presentation look low-quality. Actively avoid them every time:
Content Density
- More than 6 bullet points on a single content slide — if exceeded, split into two slides
- Any bullet exceeding 20 words — shorten or switch to a card layout
- More than 3 consecutive slides with the same layout type
Visual
- Inconsistent background colors across slides (all content slides must consistently use
theme.bg) - Adding gradients to every element — gradients are for emphasis only, not for overuse
- Center-aligned everything — it looks bland; left alignment creates better hierarchy
- Stacking decorative color blocks without layout logic
Text
- Title that copies the first sentence of the body text — the title should be the conclusion or main point, not a description
- English text mixed with SimSun/Fangsong fonts — English must use the specified English font
- Color values with
#prefix ("#1F3864"→ change to"1F3864") — will corrupt the file
Dependency Installation
npm install -g pptxgenjs