claude-presentation-master 1.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,762 +2,542 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)
6
- ![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-green.svg)
5
+ ![NPM Version](https://img.shields.io/npm/v/claude-presentation-master)
6
+ ![Downloads](https://img.shields.io/npm/dm/claude-presentation-master)
7
7
  ![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)
8
- ![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)
8
+ ![Zero Cost](https://img.shields.io/badge/cost-FREE-success)
9
9
 
10
- **Generate world-class presentations using expert methodologies from the world's best presentation coaches.**
10
+ ### World-Class Presentations from Any Content Zero Cost, Zero API Keys
11
11
 
12
- [Installation](#installation)
13
- [Quick Start](#quick-start) •
14
- [Documentation](#documentation) •
15
- [Examples](#examples) •
16
- [API Reference](#api-reference)
12
+ **7 Presentation Types Expert Methodologies • QA Validation • Auto-Remediation**
13
+
14
+ [Install Now](#installation) •
15
+ [See It Work](#quick-start) •
16
+ [Presentation Types](#7-presentation-types)
17
+ [Expert Knowledge](#the-knowledge-base)
17
18
 
18
19
  </div>
19
20
 
20
21
  ---
21
22
 
22
- ## What is Claude Presentation Master?
23
-
24
- Claude Presentation Master is a TypeScript/Node.js library that transforms your content into professionally designed presentations. Unlike simple slide generators, it applies proven methodologies from world-renowned presentation experts:
25
-
26
- - **Nancy Duarte** (Slide:ology, Resonate) - Sparkline narrative structure, STAR moments
27
- - **Garr Reynolds** (Presentation Zen) - Signal-to-noise ratio, visual simplicity
28
- - **Carmine Gallo** (Talk Like TED) - Rule of Three, emotional connection
29
- - **Chris Anderson** (TED Talks) - One powerful idea per presentation
30
- - **Barbara Minto** (McKinsey) - Pyramid Principle, SCQA structure
23
+ ## What's New in v2.1.0
31
24
 
32
- The library enforces quality through **real visual validation** using Playwright, ensuring your presentations meet a 95/100 minimum quality score before they're considered complete.
33
-
34
- ### Key Differentiators
35
-
36
- | Feature | Other Tools | Claude Presentation Master |
37
- |---------|-------------|---------------------------|
38
- | Quality Control | None or basic linting | Real visual QA with Playwright screenshots |
39
- | Expert Methods | Generic templates | 40+ expert methodologies encoded |
40
- | Word Limits | User must count | Automatically enforced per mode |
41
- | Layout Validation | None | Whitespace %, balance, contrast measured |
42
- | Accessibility | Often ignored | WCAG AA compliance built-in |
43
- | API Dependency | Usually required | **Works 100% offline** |
25
+ - **7 Specialized Presentation Types** TED Keynote, Sales Pitch, Consulting Deck, Investment Banking, Investor Pitch, Technical Presentation, All Hands
26
+ - **Strategy Pattern Architecture** — Each type uses its own expert methodology (Duarte for keynotes, Minto for consulting, etc.)
27
+ - **Investment Banking Charts** — Football field, waterfall, sources & uses tables, comparable companies analysis
28
+ - **Professional Typography** — Google Fonts for each presentation type (Libre Baskerville for IB, Space Grotesk for technical, etc.)
29
+ - **Hallucination Detection** Zero-tolerance fact checking ensures all content is sourced from your input
30
+ - **Auto-Remediation** — Automatically fixes quality issues until 95/100 threshold is met
31
+ - **100% Zero Cost** No API keys, no subscriptions, runs entirely on your machine
44
32
 
45
33
  ---
46
34
 
47
- ## Installation
35
+ ## The Scenario
48
36
 
49
- ```bash
50
- # npm
51
- npm install claude-presentation-master
37
+ You're deep in a Claude Code session. You've built something real:
38
+ - A product strategy
39
+ - A quarterly business review
40
+ - An investor pitch
41
+ - A project plan
42
+ - A competitive analysis
52
43
 
53
- # yarn
54
- yarn add claude-presentation-master
44
+ Now you need slides.
55
45
 
56
- # pnpm
57
- pnpm add claude-presentation-master
58
- ```
46
+ **What usually happens:**
59
47
 
60
- ### Post-Installation
48
+ You ask Claude to make a presentation. You get walls of text, generic bullet points, and amateur formatting. You spend the next two hours manually fixing everything in PowerPoint. Or you give up and just build it from scratch.
61
49
 
62
- The first time you run visual QA, Playwright will download browser binaries:
50
+ **What happens with this library:**
63
51
 
64
- ```bash
65
- npx playwright install chromium
52
+ ```
53
+ Your Claude project context
54
+
55
+ One command
56
+
57
+ Professional presentation (HTML or PowerPoint)
58
+ Ready to present. Ready to send to clients.
66
59
  ```
67
60
 
68
61
  ---
69
62
 
70
- ## Quick Start
71
-
72
- ### Option 1: CLI (Command Line)
63
+ ## 7 Presentation Types
73
64
 
74
- ```bash
75
- # Generate a keynote-style presentation
76
- cpm generate my-content.md --mode keynote --format html,pptx
65
+ The engine automatically detects your content and applies the right expert methodology:
77
66
 
78
- # Validate an existing presentation
79
- cpm validate presentation.html --mode keynote
67
+ | Type | Expert Methodology | Visual Style | Best For |
68
+ |------|-------------------|--------------|----------|
69
+ | **TED Keynote** | Nancy Duarte (Sparkline) | Bold, minimal, black backgrounds | Conference talks, inspiration |
70
+ | **Sales Pitch** | Robert Cialdini (Persuasion) | Trust blue, success green | Closing deals, demos |
71
+ | **Consulting Deck** | Barbara Minto (Pyramid Principle) | McKinsey blue, action titles | Strategy, recommendations |
72
+ | **Investment Banking** | Analyst Academy | Navy + gold, serif fonts | M&A, valuations, pitchbooks |
73
+ | **Investor Pitch** | Sequoia/YC frameworks | Clean, startup purple | Fundraising, board decks |
74
+ | **Technical Presentation** | Edward Tufte (Data-ink) | Dark mode, Space Grotesk | Architecture, engineering |
75
+ | **All Hands Meeting** | Internal comms best practices | Corporate blue, win green | Company updates, celebrations |
80
76
 
81
- # See all options
82
- cpm --help
83
- ```
77
+ ### Investment Banking Specialty Charts
84
78
 
85
- ### Option 2: Programmatic API
79
+ For IB presentations, the engine generates industry-standard visualizations:
86
80
 
87
81
  ```typescript
88
- import { generate } from 'claude-presentation-master';
89
- import { writeFileSync } from 'fs';
90
-
91
- const result = await generate({
92
- content: `
93
- # Revolutionizing Customer Experience
94
-
95
- ## The Problem
96
- Today's customers expect instant, personalized service.
97
- Yet 73% report frustration with current support systems.
98
-
99
- ## Our Solution
100
- AI-powered support that understands context and delivers
101
- human-quality responses in seconds, not hours.
102
-
103
- ## The Results
104
- - 90% faster resolution times
105
- - 4.8/5 customer satisfaction
106
- - 60% cost reduction
82
+ // Football Field Valuation Chart
83
+ engine.addFootballFieldChart(slide, {
84
+ title: 'Valuation Summary',
85
+ methodologies: [
86
+ { name: 'DCF', low: 42, mid: 48, high: 55 },
87
+ { name: 'Comps', low: 38, mid: 45, high: 52 },
88
+ { name: 'Precedents', low: 44, mid: 50, high: 58 }
89
+ ],
90
+ currentPrice: 46
91
+ });
107
92
 
108
- ## Next Steps
109
- Join our pilot program and transform your customer experience.
110
- `,
111
- contentType: 'markdown',
112
- mode: 'keynote',
113
- format: ['html', 'pptx'],
114
- title: 'Customer Experience Revolution',
115
- author: 'Your Name',
116
- qaThreshold: 95
93
+ // Waterfall Chart
94
+ engine.addWaterfallChart(slide, {
95
+ title: 'Enterprise Value Bridge',
96
+ startLabel: 'Equity Value',
97
+ startValue: 850000,
98
+ steps: [
99
+ { label: 'Plus: Debt', value: 250000 },
100
+ { label: 'Less: Cash', value: -150000 },
101
+ { label: 'EV', value: 950000, isTotal: true }
102
+ ]
117
103
  });
118
104
 
119
- // Check the quality score
120
- console.log(`Quality Score: ${result.score}/100`);
121
- console.log(`Slide Count: ${result.metadata.slideCount}`);
122
- console.log(`Frameworks Applied: ${result.metadata.frameworks.join(', ')}`);
105
+ // Sources & Uses Table
106
+ engine.addSourcesUsesTable(slide, {
107
+ title: 'Transaction Financing',
108
+ sources: [
109
+ { label: 'Senior Debt', amount: 500000 },
110
+ { label: 'Equity', amount: 300000 }
111
+ ],
112
+ uses: [
113
+ { label: 'Purchase Price', amount: 750000 },
114
+ { label: 'Fees & Expenses', amount: 50000 }
115
+ ]
116
+ });
123
117
 
124
- // Save the outputs
125
- if (result.outputs.html) {
126
- writeFileSync('presentation.html', result.outputs.html);
127
- }
128
- if (result.outputs.pptx) {
129
- writeFileSync('presentation.pptx', result.outputs.pptx);
130
- }
118
+ // Comparable Companies Table
119
+ engine.addCompsTable(slide, {
120
+ title: 'Trading Comparables',
121
+ columns: ['EV/Revenue', 'EV/EBITDA', 'P/E'],
122
+ companies: [
123
+ { name: 'Company A', values: [3.2, 12.5, 18.3] },
124
+ { name: 'Company B', values: [2.8, 10.2, 15.7] },
125
+ { name: 'Target Co', values: [2.5, 9.8, 14.2], highlight: true }
126
+ ],
127
+ medianRow: true
128
+ });
131
129
  ```
132
130
 
133
131
  ---
134
132
 
135
- ## How It Works
136
-
137
- ### The Pipeline
133
+ ## Professional Typography
138
134
 
139
- ```
140
- ┌─────────────────────────────────────────────────────────────────┐
141
- │ YOUR CONTENT (Markdown/JSON/YAML) │
142
- └─────────────────────────────────────────────────────────────────┘
143
-
144
-
145
- ┌─────────────────────────────────────────────────────────────────┐
146
- │ 1. CONTENT ANALYSIS │
147
- │ • Extract SCQA structure (Situation, Complication, Question, │
148
- │ Answer) using Barbara Minto's Pyramid Principle │
149
- │ • Identify Sparkline narrative arc (What Is vs What Could Be) │
150
- │ • Find STAR moments (Something They'll Always Remember) │
151
- │ • Extract key messages (max 3 - Rule of Three) │
152
- │ • Generate action titles (McKinsey style) │
153
- └─────────────────────────────────────────────────────────────────┘
154
-
155
-
156
- ┌─────────────────────────────────────────────────────────────────┐
157
- │ 2. SLIDE GENERATION │
158
- │ • Select appropriate slide types based on content │
159
- │ • Apply mode constraints (keynote: 6-25 words, business: 40-80)│
160
- │ • Structure narrative flow with proper pacing │
161
- │ • Add section dividers, transitions, and closing │
162
- └─────────────────────────────────────────────────────────────────┘
163
-
164
-
165
- ┌─────────────────────────────────────────────────────────────────┐
166
- │ 3. OUTPUT GENERATION │
167
- │ • HTML: Reveal.js with animations, Chart.js, Mermaid │
168
- │ • PPTX: PptxGenJS with proper positioning and styling │
169
- │ • Apply theme colors, typography, and visual hierarchy │
170
- └─────────────────────────────────────────────────────────────────┘
171
-
172
-
173
- ┌─────────────────────────────────────────────────────────────────┐
174
- │ 4. QA VALIDATION │
175
- │ • Screenshot each slide with Playwright │
176
- │ • Calculate whitespace percentage (target: 35%+ keynote) │
177
- │ • Measure layout balance (center of mass analysis) │
178
- │ • Check contrast ratios (WCAG 4.5:1 minimum) │
179
- │ • Validate expert principle compliance │
180
- │ • Generate 0-100 score with detailed breakdown │
181
- └─────────────────────────────────────────────────────────────────┘
182
-
183
-
184
- ┌─────────────────────────────────────────────────────────────────┐
185
- │ 5. THRESHOLD ENFORCEMENT │
186
- │ • Score >= 95: ✅ Return presentation │
187
- │ • Score < 95: ❌ Throw QAFailureError with improvement list │
188
- └─────────────────────────────────────────────────────────────────┘
189
- ```
190
-
191
- ### The Knowledge Base
135
+ Each presentation type loads appropriate Google Fonts (zero cost):
192
136
 
193
- The package includes a 6,300+ line knowledge base (`presentation-knowledge.yaml`) containing:
194
-
195
- - **40+ Expert Methodologies**: Encoded principles from presentation masters
196
- - **Framework Selector**: Automatically chooses the best framework for your audience
197
- - **Slide Type Definitions**: 20+ slide types with constraints and templates
198
- - **QA Scoring Rubric**: Detailed validation rules with point values
199
- - **Mode Configurations**: Keynote vs Business rules and limits
200
-
201
- This knowledge base powers every decision the engine makes, ensuring expert-level quality without requiring AI API calls.
137
+ | Type | Heading Font | Body Font | Personality |
138
+ |------|-------------|-----------|-------------|
139
+ | TED Keynote | DM Sans | DM Sans | Modern, bold |
140
+ | Sales Pitch | Poppins | Poppins | Friendly, approachable |
141
+ | Consulting | IBM Plex Sans | IBM Plex Sans | Clean, corporate |
142
+ | Investment Banking | Libre Baskerville | IBM Plex Sans | Classic, authoritative |
143
+ | Investor Pitch | DM Sans | Source Sans Pro | Startup, modern |
144
+ | Technical | Space Grotesk | Source Sans Pro | Precision, engineering |
145
+ | All Hands | Source Sans Pro | Source Sans Pro | Clear, professional |
202
146
 
203
147
  ---
204
148
 
205
- ## Presentation Modes
149
+ ## Quality Assurance System
206
150
 
207
- ### Keynote Mode
151
+ ### Bulletproof QA Pipeline
208
152
 
209
- Optimized for **high-impact presentations** like TED talks, product launches, and keynotes.
153
+ Every presentation goes through a rigorous validation pipeline:
210
154
 
211
- | Constraint | Value |
212
- |------------|-------|
213
- | Words per slide | 6-25 maximum |
214
- | Whitespace | 35%+ of slide area |
215
- | Ideas per slide | Exactly 1 |
216
- | Bullet points | Avoided (use single statements) |
217
- | Reading time | < 3 seconds per slide |
155
+ ```
156
+ Content Analysis → Slide Generation → QA Validation → Auto-Remediation → Final Output
157
+
158
+ [Loops until 95/100 threshold met]
159
+ ```
218
160
 
219
- **Best for**: Conferences, product launches, investor pitches, inspirational talks
161
+ ### What Gets Validated
220
162
 
221
- ### Business Mode
163
+ | Category | Checks |
164
+ |----------|--------|
165
+ | **Content** | Word count per slide, bullet count, one-idea-per-slide |
166
+ | **Visual** | Whitespace %, font consistency, color count |
167
+ | **Structure** | Title slide present, conclusion slide, logical flow |
168
+ | **Expert Rules** | Glance test (3-second rule), Rule of Three, Pyramid structure |
169
+ | **Accessibility** | WCAG contrast ratios, minimum font sizes |
170
+ | **Hallucination** | Every fact must be traceable to source content |
222
171
 
223
- Optimized for **information-rich presentations** like board meetings, strategy reviews, and training.
172
+ ### Hallucination Detection
224
173
 
225
- | Constraint | Value |
226
- |------------|-------|
227
- | Words per slide | 40-80 |
228
- | Whitespace | 25%+ of slide area |
229
- | Ideas per slide | 1-2 maximum |
230
- | Bullet points | Up to 5 per slide |
231
- | Data density | Medium to high |
174
+ The engine includes a **zero-tolerance hallucination detector**:
232
175
 
233
- **Best for**: Board meetings, quarterly reviews, training sessions, documentation
176
+ ```typescript
177
+ // The engine checks every statistic, quote, and claim
178
+ const factCheck = await hallucinationDetector.checkForHallucinations(
179
+ slides,
180
+ originalContent,
181
+ contentAnalysis
182
+ );
183
+
184
+ // If unverified facts are found, they're automatically flagged and removed
185
+ if (!factCheck.passed) {
186
+ slides = hallucinationDetector.remediate(slides, factCheck);
187
+ console.log(`Removed ${factCheck.issues.length} unverified claims`);
188
+ }
189
+ ```
234
190
 
235
191
  ---
236
192
 
237
- ## Slide Types
193
+ ## Installation
238
194
 
239
- ### Universal Slides (Both Modes)
240
-
241
- | Type | Description | Use Case |
242
- |------|-------------|----------|
243
- | `title` | Opening slide with title and subtitle | Always first |
244
- | `section-divider` | Section break with dark background | Between major sections |
245
- | `quote` | Blockquote with attribution | Expert quotes, testimonials |
246
- | `big-number` | Large statistic with context | Dramatic data points |
247
- | `cta` | Call to action | Near the end |
248
- | `thank-you` | Closing slide | Always last |
249
-
250
- ### Keynote-Specific Slides
251
-
252
- | Type | Description | Use Case |
253
- |------|-------------|----------|
254
- | `big-idea` | Single powerful statement, large text | Core message delivery |
255
- | `single-statement` | One sentence, centered | Key points |
256
- | `full-image` | Full-bleed image with text overlay | Emotional impact |
257
-
258
- ### Business-Specific Slides
259
-
260
- | Type | Description | Use Case |
261
- |------|-------------|----------|
262
- | `agenda` | Numbered list of topics | After title slide |
263
- | `bullet-points` | Title with bullet list | Detailed information |
264
- | `two-column` | Split layout (text + image/data) | Comparison, illustration |
265
- | `three-column` | Three equal columns | Feature comparison |
266
- | `comparison` | Side-by-side with divider | Before/after, pros/cons |
267
- | `timeline` | Chronological events | History, roadmap |
268
- | `process` | Step-by-step flow with arrows | Workflows, procedures |
269
- | `metrics-grid` | KPI dashboard layout | Performance data |
270
- | `screenshot` | Product screenshot with caption | Demo, walkthrough |
271
- | `screenshot-left` | Screenshot on left, text on right | Feature explanation |
272
- | `screenshot-right` | Text on left, screenshot on right | Feature explanation |
273
- | `social-proof` | Customer testimonials | Trust building |
274
- | `case-study` | Challenge/Solution/Results | Customer success |
275
- | `pricing` | Pricing table | Sales presentations |
276
- | `team` | Team member grid | About us |
277
- | `features` | Feature list with icons | Product overview |
195
+ ```bash
196
+ npm install claude-presentation-master
197
+ ```
278
198
 
279
- ---
199
+ **Optional** (for visual regression testing):
200
+ ```bash
201
+ npx playwright install chromium
202
+ ```
280
203
 
281
- ## Themes
204
+ That's it. **No API keys. No subscriptions. Zero cost.**
282
205
 
283
- ```typescript
284
- type ThemeName =
285
- | 'default' // Clean, professional
286
- | 'light-corporate' // Traditional business
287
- | 'modern-tech' // Contemporary tech look
288
- | 'minimal' // Maximum whitespace, B&W
289
- | 'warm' // Earthy, approachable
290
- | 'creative'; // Bold, artistic
291
- ```
206
+ ---
292
207
 
293
- ### Theme Preview
208
+ ## Quick Start
294
209
 
295
- | Theme | Primary | Accent | Best For |
296
- |-------|---------|--------|----------|
297
- | `default` | Dark navy | Coral red | General use |
298
- | `light-corporate` | Slate blue | Ocean blue | Enterprise, finance |
299
- | `modern-tech` | Deep navy | Electric pink | Startups, tech |
300
- | `minimal` | Pure black | Black | Design, luxury |
301
- | `warm` | Brown | Orange | Food, hospitality |
302
- | `creative` | Purple | Pink | Marketing, design |
210
+ ### From the Command Line
303
211
 
304
- ---
212
+ ```bash
213
+ # TED-style keynote presentation
214
+ cpm generate keynote-talk.md --mode keynote --format html
305
215
 
306
- ## QA Scoring System
216
+ # Consulting strategy deck
217
+ cpm generate strategy.md --mode business --format pptx
307
218
 
308
- Every presentation is validated against a 100-point rubric:
219
+ # Investment banking pitchbook
220
+ cpm generate deal-memo.md --type investment_banking --format pptx
309
221
 
310
- ### Score Breakdown
222
+ # Generate both formats
223
+ cpm generate quarterly-review.md --mode business --format html,pptx
224
+ ```
311
225
 
312
- | Category | Weight | What's Checked |
313
- |----------|--------|----------------|
314
- | **Visual Quality** | 35% | Whitespace %, layout balance, contrast ratio, font count, color count |
315
- | **Content Quality** | 30% | Word limits, action titles, glance test, signal-to-noise, one idea rule |
316
- | **Expert Compliance** | 25% | Duarte, Reynolds, Gallo, Anderson principles |
317
- | **Accessibility** | 10% | WCAG level, contrast issues, font sizes, color-blind safety |
226
+ ### From Your Code
318
227
 
319
- ### Grading Scale
228
+ ```typescript
229
+ import { PresentationEngine } from 'claude-presentation-master';
320
230
 
321
- | Score | Grade | Status |
322
- |-------|-------|--------|
323
- | 95-100 | A+ | ✅ Excellent - Ready to present |
324
- | 90-94 | A | ⚠️ Good - Minor improvements suggested |
325
- | 85-89 | A- | ⚠️ Acceptable - Several issues to address |
326
- | 80-84 | B+ | ❌ Below standard - Significant issues |
327
- | < 80 | B or lower | ❌ Fails - Major redesign needed |
231
+ const engine = new PresentationEngine();
328
232
 
329
- ### Threshold Enforcement
233
+ const result = await engine.generate({
234
+ content: `
235
+ # Series A Pitch
330
236
 
331
- By default, the library **rejects presentations scoring below 95**:
237
+ ## The Problem
238
+ Enterprise teams waste 40% of time on manual data entry.
239
+ $50B market. Growing 23% annually.
332
240
 
333
- ```typescript
334
- try {
335
- const result = await generate(config);
336
- } catch (error) {
337
- if (error instanceof QAFailureError) {
338
- console.log(`Score: ${error.score}/100`);
339
- console.log(`Threshold: ${error.threshold}`);
340
- console.log('Issues to fix:');
341
- error.getIssues().forEach(issue => console.log(` - ${issue}`));
342
- }
343
- }
344
- ```
241
+ ## Our Solution
242
+ AI-powered automation that learns from your workflow.
243
+ Currently serving 150 enterprise customers.
345
244
 
346
- You can lower the threshold (not recommended):
245
+ ## Traction
246
+ - $2.4M ARR (up from $800K last year)
247
+ - 94% customer retention
248
+ - NPS score of 72
347
249
 
348
- ```typescript
349
- const result = await generate({
350
- ...config,
351
- qaThreshold: 80 // Accept lower quality (NOT RECOMMENDED)
250
+ ## The Ask
251
+ Raising $15M to expand into Europe and build enterprise sales team.
252
+ `,
253
+ contentType: 'markdown',
254
+ title: 'Series A Pitch',
255
+ mode: 'keynote',
256
+ format: ['html', 'pptx'],
257
+ author: 'Founder Name'
352
258
  });
353
- ```
354
259
 
355
- ---
356
-
357
- ## Media Providers
260
+ // Guaranteed 95/100 quality or higher
261
+ console.log(`Score: ${result.score}/100`);
262
+ console.log(`Grade: ${result.metadata.grade}`);
358
263
 
359
- All media features work **without API keys**.
264
+ // Save outputs
265
+ fs.writeFileSync('pitch.html', result.outputs.html);
266
+ fs.writeFileSync('pitch.pptx', result.outputs.pptx);
267
+ ```
360
268
 
361
- ### Images
269
+ ### Specifying Presentation Type
362
270
 
363
271
  ```typescript
364
- import { createDefaultImageProvider } from 'claude-presentation-master';
365
-
366
- // Default: Uses placeholder images (picsum.photos)
367
- const provider = createDefaultImageProvider();
368
-
369
- // With local images
370
- const provider = createDefaultImageProvider({
371
- localImages: {
372
- 'team-photo': './images/team.jpg',
373
- 'product-screenshot': './images/product.png',
374
- 'logo': './images/logo.svg'
375
- }
272
+ // Let the engine auto-detect (recommended)
273
+ const result = await engine.generate({
274
+ content: dealMemo,
275
+ mode: 'business',
276
+ format: ['pptx']
376
277
  });
278
+ // Engine detects "investment_banking" from content keywords
377
279
 
378
- // With Unsplash (optional API key for better rate limits)
379
- const provider = createDefaultImageProvider({
380
- unsplashKey: process.env.UNSPLASH_ACCESS_KEY // Optional
280
+ // Or specify explicitly
281
+ const result = await engine.generate({
282
+ content: techSpec,
283
+ mode: 'keynote',
284
+ presentationType: 'technical_presentation',
285
+ format: ['html']
381
286
  });
382
287
  ```
383
288
 
384
- **Image Provider Priority:**
385
- 1. Local images (exact match)
386
- 2. Unsplash API (if key provided)
387
- 3. Unsplash Source (no key needed)
388
- 4. Placeholder (always works)
289
+ ---
389
290
 
390
- ### Charts
291
+ ## The Knowledge Base
391
292
 
392
- ```typescript
393
- import { createDefaultChartProvider } from 'claude-presentation-master';
394
-
395
- const chartProvider = createDefaultChartProvider();
396
-
397
- // Generate a chart
398
- const chart = await chartProvider.generateChart({
399
- type: 'bar',
400
- data: {
401
- labels: ['Q1', 'Q2', 'Q3', 'Q4'],
402
- datasets: [{
403
- label: 'Revenue ($M)',
404
- data: [10, 15, 22, 31]
405
- }]
406
- },
407
- title: 'Quarterly Revenue Growth',
408
- palette: 'professional' // 'default' | 'professional' | 'vibrant' | 'monochrome'
409
- });
293
+ This isn't a template library. It's a **complete expert system** — 6,300+ lines of encoded expertise.
410
294
 
411
- // chart.html - For HTML output (Chart.js canvas)
412
- // chart.imageUrl - For PPTX output (QuickChart.io URL)
413
- ```
295
+ ### What's Inside
414
296
 
415
- **Supported Chart Types:**
416
- - `bar` - Bar chart
417
- - `line` - Line chart
418
- - `pie` - Pie chart
419
- - `doughnut` - Doughnut chart
420
- - `radar` - Radar chart
421
- - `polarArea` - Polar area chart
422
- - `scatter` - Scatter plot
423
- - `bubble` - Bubble chart
297
+ **From McKinsey, BCG, Bain:**
298
+ - Pyramid Principle Lead with the answer
299
+ - SCQA Framework Situation → Complication → Question → Answer
300
+ - Action Titles "Revenue grew 23%" not "Revenue Analysis"
301
+ - One Message Per Slide — Every slide has exactly one job
302
+ - Chart Callouts Always tell the audience what to see
424
303
 
425
- ### Diagrams (Mermaid)
304
+ **From Nancy Duarte (Slide:ology, Resonate):**
305
+ - Sparkline Structure — Alternate between "what is" and "what could be"
306
+ - STAR Moments — Something They'll Always Remember
307
+ - Glance Test — Understand it in 3 seconds or less
308
+ - Signal-to-Noise — Maximize meaning, eliminate clutter
426
309
 
427
- ```typescript
428
- const chartProvider = createDefaultChartProvider();
429
-
430
- // Generate flowchart
431
- const flowchart = chartProvider.generateFlowchart([
432
- { id: 'A', label: 'Start', next: ['B'] },
433
- { id: 'B', label: 'Process', next: ['C', 'D'] },
434
- { id: 'C', label: 'Option 1', next: ['E'] },
435
- { id: 'D', label: 'Option 2', next: ['E'] },
436
- { id: 'E', label: 'End' }
437
- ]);
438
-
439
- // Generate timeline
440
- const timeline = chartProvider.generateTimeline([
441
- { date: '2020', title: 'Company Founded' },
442
- { date: '2021', title: 'Series A' },
443
- { date: '2022', title: 'Product Launch' },
444
- { date: '2023', title: '1M Users' }
445
- ]);
446
- ```
310
+ **From Garr Reynolds (Presentation Zen):**
311
+ - Simplicity When in doubt, leave it out
312
+ - Restraint — Resist the urge to add
313
+ - Visual over Verbal — Show, don't tell
447
314
 
448
- ---
315
+ **From Carmine Gallo (Talk Like TED):**
316
+ - Rule of Three — Human memory works in threes
317
+ - 18-Minute Rule — Optimal presentation length
318
+ - Emotional Connection — Touch hearts before minds
449
319
 
450
- ## API Reference
320
+ **From Edward Tufte:**
321
+ - Data-Ink Ratio — Every drop of ink should represent data
322
+ - Chartjunk Elimination — No 3D effects, no decorative gridlines
323
+ - Graphical Integrity — Never distort data for visual effect
451
324
 
452
- ### `generate(config)`
325
+ **From Barbara Minto (The Pyramid Principle):**
326
+ - Top-Down Communication — Conclusion first, support second
327
+ - MECE Grouping — Mutually Exclusive, Collectively Exhaustive
328
+ - Vertical Logic — Each level supports the one above
453
329
 
454
- Generate a presentation from content.
330
+ **From Robert Cialdini (Influence):**
331
+ - Social Proof — Show who else succeeded
332
+ - Scarcity — Limited time, limited availability
333
+ - Authority — Credentials and expertise
334
+ - Reciprocity — Give value first
455
335
 
456
- ```typescript
457
- async function generate(config: PresentationConfig): Promise<PresentationResult>
458
- ```
336
+ ---
459
337
 
460
- **Parameters:**
338
+ ## Two Modes × Seven Types
461
339
 
462
- ```typescript
463
- interface PresentationConfig {
464
- // Required
465
- content: string; // Your content
466
- contentType: 'markdown' | 'json' | 'yaml' | 'text';
467
- mode: 'keynote' | 'business';
468
- format: ('html' | 'pptx')[];
469
- title: string;
340
+ ### Presentation Modes
470
341
 
471
- // Optional
472
- theme?: ThemeName; // Default: 'default'
473
- author?: string;
474
- subject?: string;
475
- qaThreshold?: number; // Default: 95
476
- skipQA?: boolean; // Default: false (NOT RECOMMENDED)
477
- minify?: boolean; // Minify HTML output
478
- customCSS?: string; // Additional CSS
479
- customTemplates?: Record<string, string>; // Handlebars overrides
480
- }
481
- ```
342
+ **Keynote Mode** — For inspiring and persuading
343
+ - 6-15 words per slide (like Steve Jobs)
344
+ - 40%+ whitespace
345
+ - One idea per slide
346
+ - Emotional narrative structure
347
+ - Big visuals, minimal text
482
348
 
483
- **Returns:**
349
+ **Business Mode** — For informing and documenting
350
+ - 40-80 words per slide
351
+ - Action titles (full sentences that state conclusions)
352
+ - Data with callouts
353
+ - Structured with Pyramid Principle
354
+ - Charts, tables, metrics grids
484
355
 
485
- ```typescript
486
- interface PresentationResult {
487
- outputs: {
488
- html?: string; // Reveal.js HTML
489
- pptx?: Buffer; // PowerPoint file
490
- };
491
- qaResults: QAResults; // Detailed QA breakdown
492
- score: number; // 0-100 quality score
493
- metadata: {
494
- title: string;
495
- author: string;
496
- generatedAt: string;
497
- mode: 'keynote' | 'business';
498
- slideCount: number;
499
- wordCount: number;
500
- avgWordsPerSlide: number;
501
- estimatedDuration: number; // Minutes
502
- frameworks: string[]; // Applied expert frameworks
503
- };
504
- }
505
- ```
356
+ ### Presentation Types (Auto-Detected)
506
357
 
507
- ### `validate(presentation, options)`
358
+ | Keyword Triggers | Detected Type |
359
+ |-----------------|---------------|
360
+ | "TED", "keynote", "inspire" | `ted_keynote` |
361
+ | "sales", "demo", "prospect" | `sales_pitch` |
362
+ | "strategy", "recommendation", "McKinsey" | `consulting_deck` |
363
+ | "M&A", "valuation", "DCF", "pitchbook" | `investment_banking` |
364
+ | "Series A", "raise", "investor" | `investor_pitch` |
365
+ | "API", "architecture", "system design" | `technical_presentation` |
366
+ | "all hands", "company update", "quarterly" | `all_hands` |
508
367
 
509
- Validate an existing HTML presentation.
368
+ ---
510
369
 
511
- ```typescript
512
- async function validate(
513
- presentation: string | Buffer,
514
- options?: {
515
- mode?: 'keynote' | 'business';
516
- threshold?: number;
517
- strictMode?: boolean;
518
- }
519
- ): Promise<QAResults & { score: number }>
520
- ```
370
+ ## Output Formats
521
371
 
522
- ### Error Classes
372
+ ### HTML Presentations (Reveal.js)
523
373
 
524
- ```typescript
525
- // Thrown when configuration is invalid
526
- class ValidationError extends Error {
527
- errors: string[];
528
- }
374
+ Modern, web-native slides:
375
+ - Share via URL just send a link
376
+ - Works on any device — desktop, tablet, phone
377
+ - Keyboard shortcuts: `S` for speaker notes, `F` for fullscreen
378
+ - Embedded CSS with presentation-type-specific theming
379
+ - Glass morphism effects, smooth transitions
529
380
 
530
- // Thrown when QA score is below threshold
531
- class QAFailureError extends Error {
532
- score: number;
533
- threshold: number;
534
- qaResults: QAResults;
381
+ ### PowerPoint (PPTX)
535
382
 
536
- getIssues(): string[]; // List of issues to fix
537
- }
538
- ```
383
+ Traditional format:
384
+ - Opens in Microsoft PowerPoint
385
+ - Fully editable
386
+ - Send to clients who expect PPTX
387
+ - Print to PDF for handouts
388
+ - Includes IB specialty charts (football field, waterfall, etc.)
539
389
 
540
390
  ---
541
391
 
542
- ## CLI Reference
392
+ ## Quality Scores
543
393
 
544
- ```
545
- Claude Presentation Master v1.0.0
546
-
547
- USAGE:
548
- cpm <command> [options]
549
-
550
- COMMANDS:
551
- generate <input> Generate presentation from input file
552
- validate <file> Validate an existing HTML presentation
553
- info Show package information
554
-
555
- OPTIONS:
556
- -o, --output <dir> Output directory (default: ./output)
557
- -m, --mode <mode> keynote or business (default: keynote)
558
- -f, --format <fmt> html, pptx, or html,pptx (default: html)
559
- -t, --theme <name> Theme name
560
- --title <title> Presentation title
561
- --author <name> Author name
562
- --threshold <num> QA threshold 0-100 (default: 95)
563
- --skip-qa Skip QA (NOT recommended)
564
- -h, --help Show help
565
- -v, --version Show version
566
-
567
- EXAMPLES:
568
- cpm generate deck.md -m keynote -f html,pptx
569
- cpm generate report.yaml -m business -o ./slides
570
- cpm validate presentation.html --threshold 90
571
- ```
394
+ Every presentation gets a quality score:
395
+
396
+ | Score | Grade | Status |
397
+ |-------|-------|--------|
398
+ | 97-100 | A+ | Exceptional |
399
+ | 93-96 | A | Excellent |
400
+ | 90-92 | A- | Very Good |
401
+ | 85-89 | B+ | Good |
402
+ | 80-84 | B | Acceptable |
403
+ | 75-79 | B- | Needs Work |
404
+ | < 75 | C or below | Blocked (auto-remediation applied) |
405
+
406
+ **Default threshold: 95/100**
407
+
408
+ The engine will automatically remediate issues (up to 5 iterations) until the threshold is met. If it can't reach 95, it delivers the best result with a detailed report of remaining issues.
572
409
 
573
410
  ---
574
411
 
575
- ## Examples
412
+ ## Zero Cost Guarantee
576
413
 
577
- ### Example 1: Investor Pitch (Keynote Mode)
414
+ | Component | Cost | Notes |
415
+ |-----------|------|-------|
416
+ | NPM Package | FREE | MIT License |
417
+ | Dependencies | FREE | pptxgenjs, reveal.js, marked, etc. |
418
+ | Fonts | FREE | Google Fonts CDN |
419
+ | QA Validation | FREE | Built-in validators |
420
+ | Visual Testing | FREE | Playwright (optional) |
421
+ | API Keys | NONE | Runs 100% locally |
578
422
 
579
- ```typescript
580
- const result = await generate({
581
- content: `
582
- # Acme AI - Revolutionizing Customer Support
423
+ **No subscriptions. No usage limits. No API costs.**
583
424
 
584
- ## The $400B Problem
585
- Companies spend $400 billion annually on customer support.
586
- Yet 67% of customers prefer self-service over speaking to a representative.
425
+ ---
587
426
 
588
- ## Our Solution
589
- Acme AI delivers human-quality support responses in under 3 seconds,
590
- handling 80% of inquiries without human intervention.
427
+ ## FAQ
591
428
 
592
- ## Traction
593
- - 50+ enterprise customers
594
- - $5M ARR (300% YoY growth)
595
- - 95% customer retention
429
+ **Does this require an API key?**
430
+ No. Everything runs locally on your machine.
596
431
 
597
- ## The Team
598
- Former leaders from Google, Amazon, and Salesforce
599
- with 50+ years combined experience in AI and customer success.
432
+ **What's the difference between mode and type?**
433
+ - **Mode** (`keynote` or `business`) controls word counts and visual density
434
+ - **Type** (e.g., `investment_banking`) selects the expert methodology and theming
600
435
 
601
- ## The Ask
602
- $20M Series B to expand into European markets
603
- and launch our enterprise platform.
604
- `,
605
- contentType: 'markdown',
606
- mode: 'keynote',
607
- format: ['html', 'pptx'],
608
- title: 'Acme AI - Series B',
609
- theme: 'modern-tech'
610
- });
611
- ```
436
+ **Can I customize the output?**
437
+ Yes. HTML is just HTML. PPTX opens in PowerPoint. Edit freely.
612
438
 
613
- ### Example 2: Quarterly Business Review (Business Mode)
439
+ **What if I don't like the auto-detected type?**
440
+ Specify it explicitly: `presentationType: 'consulting_deck'`
614
441
 
615
- ```typescript
616
- const result = await generate({
617
- content: `
618
- # Q4 2024 Business Review
619
-
620
- ## Executive Summary
621
- Q4 exceeded targets across all key metrics.
622
- Revenue grew 25% QoQ while maintaining profitability.
623
-
624
- ## Financial Performance
625
- - Revenue: $12.5M (+25% QoQ)
626
- - Gross Margin: 72% (+3pp)
627
- - Operating Expenses: $8.2M (-5%)
628
- - Net Income: $1.8M (first profitable quarter)
629
-
630
- ## Customer Metrics
631
- - New Customers: 127 (+40%)
632
- - Churn Rate: 2.1% (-0.5pp)
633
- - NPS Score: 72 (+8 points)
634
- - Average Contract Value: $45,000 (+15%)
635
-
636
- ## Product Updates
637
- 1. Launched AI Assistant v2.0
638
- 2. Released mobile app for iOS and Android
639
- 3. Added 15 new integrations
640
- 4. Improved API response time by 40%
641
-
642
- ## Challenges
643
- - Hiring senior engineers remains difficult
644
- - Supply chain issues delayed hardware launch
645
- - Competitor launched similar feature
646
-
647
- ## Q1 2025 Priorities
648
- 1. Launch enterprise tier
649
- 2. Expand sales team by 5 reps
650
- 3. Open European data center
651
- 4. Achieve SOC 2 Type II certification
652
- `,
653
- contentType: 'markdown',
654
- mode: 'business',
655
- format: ['html', 'pptx'],
656
- title: 'Q4 2024 Business Review',
657
- theme: 'light-corporate'
658
- });
659
- ```
442
+ **Does it work with Claude Code?**
443
+ Yes that's exactly what it's designed for.
660
444
 
661
- ### Example 3: With Custom Templates
445
+ **What about images?**
446
+ The engine generates placeholder boxes. Replace with your actual images.
662
447
 
663
- ```typescript
664
- const result = await generate({
665
- content: myContent,
666
- contentType: 'markdown',
667
- mode: 'keynote',
668
- format: ['html'],
669
- title: 'Custom Presentation',
670
- customTemplates: {
671
- 'title': `
672
- <section class="slide slide-title custom-title">
673
- <div class="slide-content">
674
- <div class="logo">YOUR LOGO</div>
675
- <h1>{{title}}</h1>
676
- <p class="subtitle">{{subtitle}}</p>
677
- <p class="date">{{date}}</p>
678
- </div>
679
- </section>
680
- `
681
- },
682
- customCSS: `
683
- .custom-title {
684
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
685
- }
686
- .custom-title h1 {
687
- color: white;
688
- }
689
- `
690
- });
691
- ```
448
+ **Can I lower the quality threshold?**
449
+ Yes, but not recommended: `qaThreshold: 80`
692
450
 
693
451
  ---
694
452
 
695
- ## Troubleshooting
453
+ ## Themes
696
454
 
697
- ### "QA score below threshold"
455
+ | Theme | Look | Best For |
456
+ |-------|------|----------|
457
+ | `default` | Dark executive | General use |
458
+ | `consulting-classic` | Cream + navy | McKinsey/BCG style |
459
+ | `modern-tech` | Light + teal | Startups |
460
+ | `minimal` | Maximum whitespace | Design-focused |
461
+ | `dark-executive` | Dark mode | Screen presentations |
462
+ | `investment-banking` | Navy + gold | Finance |
698
463
 
699
- Your presentation didn't meet the 95/100 quality bar. Check the error for specific issues:
464
+ ---
700
465
 
701
- ```typescript
702
- catch (error) {
703
- if (error instanceof QAFailureError) {
704
- console.log('Issues to fix:');
705
- error.getIssues().forEach(issue => {
706
- console.log(` - ${issue}`);
707
- });
708
- }
709
- }
710
- ```
466
+ ## Slide Types
711
467
 
712
- Common fixes:
713
- - Reduce word count per slide (keynote: max 25, business: max 80)
714
- - Increase whitespace (remove clutter)
715
- - Ensure proper contrast (4.5:1 minimum)
716
- - Use only 1-2 font families
717
- - Limit colors to 5 or fewer
468
+ **Keynote Mode:**
469
+ Title Big Idea Single Statement Full Image Big Number • Quote • CTA • Thank You
718
470
 
719
- ### "Playwright browsers not found"
471
+ **Business Mode:**
472
+ Title • Agenda • Bullet Points • Two Column • Three Column • Metrics Grid • Timeline • Process Flow • Comparison • Case Study • Section Divider • Thank You
720
473
 
721
- Run the Playwright installation:
474
+ **Investment Banking (PPTX):**
475
+ Football Field Chart • Waterfall Chart • Sources & Uses Table • Comparable Companies Table
722
476
 
723
- ```bash
724
- npx playwright install chromium
725
- ```
477
+ ---
726
478
 
727
- ### "Module not found"
479
+ ## API Reference
728
480
 
729
- Ensure you've built the package:
481
+ ### PresentationEngine
730
482
 
731
- ```bash
732
- npm run build
733
- ```
483
+ ```typescript
484
+ const engine = new PresentationEngine();
734
485
 
735
- ---
486
+ const result = await engine.generate({
487
+ // Required
488
+ content: string, // Your source content
489
+ title: string, // Presentation title
490
+ mode: 'keynote' | 'business',
491
+ format: ('html' | 'pptx')[],
736
492
 
737
- ## Contributing
493
+ // Optional
494
+ contentType?: 'markdown' | 'text' | 'html',
495
+ presentationType?: PresentationType, // Auto-detected if omitted
496
+ author?: string,
497
+ theme?: string,
498
+ qaThreshold?: number, // Default: 95
499
+ });
738
500
 
739
- See [CONTRIBUTING.md](./docs/CONTRIBUTING.md) for development setup and guidelines.
501
+ // Result
502
+ interface PresentationResult {
503
+ outputs: {
504
+ html?: string,
505
+ pptx?: Buffer
506
+ },
507
+ score: number, // Quality score 0-100
508
+ qaResults: QAResults, // Detailed validation results
509
+ metadata: PresentationMetadata
510
+ }
511
+ ```
740
512
 
741
513
  ---
742
514
 
743
515
  ## License
744
516
 
745
- MIT License - see [LICENSE](./LICENSE) for details.
517
+ MIT free to use, modify, and distribute.
746
518
 
747
519
  ---
748
520
 
749
521
  ## Author
750
522
 
751
- **Stuart Kerr**
752
- <stuart@isovision.ai>
753
- [Isovision.ai](https://isovision.ai)
523
+ **Stuart Kerr** — [Isovision.ai](https://isovision.ai)
524
+
525
+ Questions? [stuart@isovision.ai](mailto:stuart@isovision.ai)
754
526
 
755
527
  ---
756
528
 
757
529
  <div align="center">
758
530
 
759
- **Built with expert methodologies from the world's best presentation coaches.**
531
+ **Stop fighting with slides. Start presenting.**
532
+
533
+ ```bash
534
+ npm install claude-presentation-master
535
+ ```
536
+
537
+ **100% Free • Zero API Keys • Runs Locally**
760
538
 
761
- Nancy Duarte Garr Reynolds • Carmine Gallo • Chris Anderson • Barbara Minto
539
+ Built on methodologies from:
540
+ McKinsey • BCG • Bain • Nancy Duarte • Garr Reynolds • Carmine Gallo
541
+ Chris Anderson • Barbara Minto • Edward Tufte • Robert Cialdini
762
542
 
763
543
  </div>