@aksp/opencrew 1.0.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +24 -0
  3. package/README.md +118 -0
  4. package/bin/opencrew.js +8 -0
  5. package/package.json +57 -0
  6. package/src/cli.js +70 -0
  7. package/src/commands/init.js +97 -0
  8. package/src/commands/update.js +58 -0
  9. package/src/lib/fsx.js +55 -0
  10. package/src/lib/ides.js +120 -0
  11. package/src/lib/paths.js +8 -0
  12. package/src/lib/prompts.js +35 -0
  13. package/src/lib/ui.js +20 -0
  14. package/templates/.env.example +23 -0
  15. package/templates/.mcp.json +8 -0
  16. package/templates/AGENTS.md +105 -0
  17. package/templates/_opencrew/.opencrew-version +1 -0
  18. package/templates/_opencrew/_investigations/.gitkeep +0 -0
  19. package/templates/_opencrew/_memory/company.md +4 -0
  20. package/templates/_opencrew/_memory/preferences.md +9 -0
  21. package/templates/_opencrew/config/playwright.config.json +11 -0
  22. package/templates/_opencrew/core/architect.agent.yaml +110 -0
  23. package/templates/_opencrew/core/best-practices/_catalog.yaml +116 -0
  24. package/templates/_opencrew/core/best-practices/blog-post.md +151 -0
  25. package/templates/_opencrew/core/best-practices/blog-seo.md +146 -0
  26. package/templates/_opencrew/core/best-practices/copywriting.md +446 -0
  27. package/templates/_opencrew/core/best-practices/data-analysis.md +420 -0
  28. package/templates/_opencrew/core/best-practices/email-newsletter.md +136 -0
  29. package/templates/_opencrew/core/best-practices/email-sales.md +127 -0
  30. package/templates/_opencrew/core/best-practices/image-design.md +365 -0
  31. package/templates/_opencrew/core/best-practices/instagram-feed.md +252 -0
  32. package/templates/_opencrew/core/best-practices/instagram-reels.md +128 -0
  33. package/templates/_opencrew/core/best-practices/instagram-stories.md +123 -0
  34. package/templates/_opencrew/core/best-practices/linkedin-article.md +133 -0
  35. package/templates/_opencrew/core/best-practices/linkedin-post.md +138 -0
  36. package/templates/_opencrew/core/best-practices/researching.md +366 -0
  37. package/templates/_opencrew/core/best-practices/review.md +286 -0
  38. package/templates/_opencrew/core/best-practices/social-networks-publishing.md +311 -0
  39. package/templates/_opencrew/core/best-practices/strategist.md +361 -0
  40. package/templates/_opencrew/core/best-practices/technical-writing.md +382 -0
  41. package/templates/_opencrew/core/best-practices/twitter-post.md +122 -0
  42. package/templates/_opencrew/core/best-practices/twitter-thread.md +139 -0
  43. package/templates/_opencrew/core/best-practices/whatsapp-broadcast.md +124 -0
  44. package/templates/_opencrew/core/best-practices/youtube-script.md +139 -0
  45. package/templates/_opencrew/core/best-practices/youtube-shorts.md +129 -0
  46. package/templates/_opencrew/core/prompts/build.prompt.md +547 -0
  47. package/templates/_opencrew/core/prompts/design.prompt.md +469 -0
  48. package/templates/_opencrew/core/prompts/discovery.prompt.md +269 -0
  49. package/templates/_opencrew/core/prompts/sherlock-instagram.md +123 -0
  50. package/templates/_opencrew/core/prompts/sherlock-linkedin.md +73 -0
  51. package/templates/_opencrew/core/prompts/sherlock-shared.md +684 -0
  52. package/templates/_opencrew/core/prompts/sherlock-twitter.md +78 -0
  53. package/templates/_opencrew/core/prompts/sherlock-youtube.md +85 -0
  54. package/templates/_opencrew/core/runner.pipeline.md +611 -0
  55. package/templates/_opencrew/core/skills.engine.md +388 -0
  56. package/templates/_opencrew/logs/.gitkeep +0 -0
  57. package/templates/crews/.gitkeep +0 -0
  58. package/templates/gitignore +8 -0
  59. package/templates/skills/apify/SKILL.md +55 -0
  60. package/templates/skills/blotato/SKILL.md +63 -0
  61. package/templates/skills/canva/SKILL.md +60 -0
  62. package/templates/skills/image-ai-generator/SKILL.md +124 -0
  63. package/templates/skills/image-ai-generator/scripts/generate.py +175 -0
  64. package/templates/skills/image-creator/SKILL.md +155 -0
  65. package/templates/skills/image-fetcher/SKILL.md +91 -0
  66. package/templates/skills/instagram-publisher/SKILL.md +119 -0
  67. package/templates/skills/instagram-publisher/scripts/publish.js +165 -0
  68. package/templates/skills/opencrew-best-practice-creator/SKILL.md +192 -0
  69. package/templates/skills/opencrew-skill-creator/SKILL.md +420 -0
  70. package/templates/skills/opencrew-skill-creator/agents/analyzer.md +274 -0
  71. package/templates/skills/opencrew-skill-creator/agents/comparator.md +202 -0
  72. package/templates/skills/opencrew-skill-creator/agents/grader.md +223 -0
  73. package/templates/skills/opencrew-skill-creator/assets/eval_review.html +146 -0
  74. package/templates/skills/opencrew-skill-creator/eval-viewer/generate_review.py +471 -0
  75. package/templates/skills/opencrew-skill-creator/eval-viewer/viewer.html +1325 -0
  76. package/templates/skills/opencrew-skill-creator/references/schemas.md +430 -0
  77. package/templates/skills/opencrew-skill-creator/references/skill-format.md +235 -0
  78. package/templates/skills/opencrew-skill-creator/scripts/__init__.py +0 -0
  79. package/templates/skills/opencrew-skill-creator/scripts/aggregate_benchmark.py +401 -0
  80. package/templates/skills/opencrew-skill-creator/scripts/quick_validate.py +103 -0
  81. package/templates/skills/opencrew-skill-creator/scripts/run_eval.py +310 -0
  82. package/templates/skills/opencrew-skill-creator/scripts/utils.py +47 -0
  83. package/templates/skills/resend/SKILL.md +80 -0
  84. package/templates/skills/template-designer/SKILL.md +208 -0
  85. package/templates/skills/template-designer/base-templates/model-a.html +27 -0
  86. package/templates/skills/template-designer/base-templates/model-b.html +31 -0
  87. package/templates/skills/template-designer/base-templates/model-c.html +42 -0
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: "Sales Email"
3
+ platform: "email"
4
+ content_type: "sales"
5
+ description: "Direct response sales emails optimized for a single conversion action using persuasion frameworks"
6
+ whenToUse: |
7
+ Creating agents that produce sales emails, cold outreach, or direct response email campaigns.
8
+ constraints:
9
+ subject_line_max_chars: 60
10
+ optimal_word_count: "100-300"
11
+ cta_count: 1
12
+ version: "1.0.0"
13
+ ---
14
+
15
+ ## Compact Rules
16
+
17
+ 1. Keep subject lines to 4-7 words; personalize them without being deceptive.
18
+ 2. Limit cold emails to 150 words maximum (300 for warm leads).
19
+ 3. Personalize the opening line based on specific research (never use "Hope this finds you well").
20
+ 4. Articulate the recipient's problem using their specific industry language.
21
+ 5. Provide one concrete social proof point (named company, metric, and timeframe).
22
+ 6. Include exactly one low-friction CTA matched to the relationship stage.
23
+ 7. Always include a PS line for urgency, proof, or a personal touch.
24
+ 8. Use plain text formatting; avoid HTML templates, images, and attachments for cold emails.
25
+ 9. Write in short sentences and paragraphs (1-2 sentences maximum per block).
26
+ 10. Comply with CAN-SPAM/GDPR by including a physical address and unsubscribe link.
27
+ 11. Send follow-ups on days 3-4, 7-10, and 14; 80% of conversions happen after the first email.
28
+ 12. Limit volume to 35-40 cold emails per day per address to protect domain reputation.
29
+
30
+ <!-- End Compact Rules. Full reference below. -->
31
+
32
+ ## Platform Rules
33
+
34
+ - Sales emails live or die by the subject line. Open rates above 60% are achievable with well-crafted, personalized subject lines of 4-7 words. Generic subject lines land in spam or get ignored.
35
+ - Deliverability is the invisible prerequisite. HTML-heavy cold emails, attachments, and image-loaded templates trigger spam filters. Plain-text formatting with minimal links outperforms designed templates for cold outreach.
36
+ - Reply rate is the primary success metric, not open rate. A 3-5% positive reply rate is a strong baseline. Well-targeted campaigns with deep personalization can reach 15-30% reply rates.
37
+ - Cold emails must comply with CAN-SPAM, GDPR, and local regulations. Include a physical address and unsubscribe mechanism. Non-compliance risks fines and domain blacklisting.
38
+ - Send volume matters: limit cold outreach to 35-40 emails per day per sending address to protect domain reputation. Warming up new domains over 2-4 weeks is mandatory before scaling.
39
+ - Follow-up cadence drives results. 80% of conversions happen after the initial email. Follow up on days 3-4, 7-10, and 14. After 4-5 follow-ups with no response, stop.
40
+ - Warm emails (to existing leads or subscribers) tolerate slightly longer formats and HTML design. Cold emails must be short, plain-text, and hyper-personalized.
41
+ - Best send times for sales emails: 8-10 AM or 1-3 PM on Tuesday, Wednesday, or Thursday in the recipient's time zone. Monday mornings and Friday afternoons underperform.
42
+
43
+ ## Content Structure
44
+
45
+ ### Sales Email Architecture (PAS Framework)
46
+
47
+ 1. **Subject line** — 4-7 words. Specific to the recipient's situation. Creates just enough curiosity to earn the open without resorting to clickbait or deception.
48
+ 2. **Opener (1-2 sentences)** — Personalized reference to the recipient's company, role, recent activity, or shared connection. Must demonstrate that this is not a mass email.
49
+ 3. **Problem/Pain (2-3 sentences)** — Articulate a specific problem the recipient likely faces. Use their industry language, not yours. The reader should think "yes, that is exactly my situation."
50
+ 4. **Solution (2-3 sentences)** — Position your offer as the bridge from their pain to their desired outcome. Focus on the result, not the features. One specific proof point (metric, case study, or name-drop).
51
+ 5. **Social proof (1-2 sentences)** — A concrete result: "[Company similar to theirs] achieved [specific outcome] in [timeframe]." Numbers and named companies outperform vague claims.
52
+ 6. **CTA (1 sentence)** — One single, low-friction ask. Not "buy now" — instead, "Would a 15-minute call this week make sense?" The ask must match the relationship stage.
53
+ 7. **PS line** — The second most-read line after the subject. Use it for urgency, a secondary proof point, or a personal note that reinforces the value proposition.
54
+
55
+ ### Alternative Frameworks
56
+
57
+ - **AIDA**: Attention (subject + opener), Interest (pain point), Desire (solution + proof), Action (CTA).
58
+ - **Before/After/Bridge**: Before (current state), After (desired outcome), Bridge (your solution).
59
+ - **Star/Story/Solution**: Star (the prospect), Story (the challenge they face), Solution (your offer).
60
+
61
+ ## Writing Guidelines
62
+
63
+ - **Personalize the first line or lose the reader.** "I noticed your team just launched X" or "Saw your post about Y" demonstrates genuine research. "Hope this finds you well" signals a template and gets deleted.
64
+ - Keep cold emails under 150 words. Every word beyond 150 reduces reply probability. Shorter emails look like personal messages, not sales blasts.
65
+ - One CTA per email, always. Multiple asks ("book a call, check our website, download this guide, follow us on LinkedIn") create decision paralysis and dilute the conversion path.
66
+ - Match your CTA to the relationship temperature. Cold: "Worth a quick chat?" Warm: "Ready to see how this works for your team?" Hot: "Should I send the proposal?"
67
+ - Write the PS line. It is the second most-read part of any email. Use it for urgency ("We are only taking 3 more clients this quarter"), a testimonial, or a personal touch.
68
+ - Use plain text for cold emails. HTML templates, embedded images, and fancy formatting signal "marketing email" and reduce deliverability and reply rates.
69
+ - Avoid attachments in cold emails. They trigger spam filters and create friction. Link to a hosted resource if you must share a document.
70
+ - Write in short sentences and short paragraphs (1-2 sentences each). Dense paragraphs look like effort to process and get skimmed or skipped.
71
+ - A/B test subject lines aggressively. Test curiosity vs. direct benefit, question vs. statement, and with vs. without the recipient's name. Small subject line changes can swing open rates by 20-30%.
72
+
73
+ ## Output Format
74
+
75
+ ```
76
+ === SUBJECT LINE ===
77
+ [4-7 words — specific to recipient, creates curiosity. Max 60 characters.]
78
+
79
+ === OPENER ===
80
+ [Personalized first line — reference to recipient's company, role, recent activity, or shared connection. 1-2 sentences.]
81
+
82
+ === PROBLEM / PAIN ===
83
+ [Specific pain point the recipient faces — in their industry language. 2-3 sentences.]
84
+
85
+ === SOLUTION ===
86
+ [Your offer as the bridge from pain to desired outcome — result-focused, not feature-focused. One proof point. 2-3 sentences.]
87
+
88
+ === PROOF ===
89
+ [Concrete social proof — named company, specific metric, defined timeframe. 1-2 sentences.]
90
+
91
+ === CTA ===
92
+ [Single, low-friction ask appropriate to the relationship stage. 1 sentence.]
93
+
94
+ === PS ===
95
+ P.S. [Urgency element, secondary proof point, or personal note. 1-2 sentences.]
96
+
97
+ === EMAIL NOTES ===
98
+ Target recipient: [Role / company type]
99
+ Relationship stage: [Cold / Warm / Hot]
100
+ Primary goal: [Reply / Book call / Purchase]
101
+ Follow-up cadence: [Day 3-4 / Day 7-10 / Day 14]
102
+ ```
103
+
104
+ ## Quality Criteria
105
+
106
+ - [ ] Subject line is 4-7 words and specific to the recipient (not a generic template)
107
+ - [ ] Opener references something specific about the recipient (company, role, activity, or connection)
108
+ - [ ] Problem statement uses the recipient's industry language, not internal jargon
109
+ - [ ] Solution focuses on outcomes and results, not product features
110
+ - [ ] Social proof includes a named company or specific metric with a timeframe
111
+ - [ ] Exactly one CTA that matches the relationship stage (not "buy now" for cold outreach)
112
+ - [ ] PS line is present and adds urgency, proof, or a personal touch
113
+ - [ ] Total word count is under 300 words (under 150 for cold emails)
114
+ - [ ] Email is formatted as plain text with no HTML, images, or attachments (for cold outreach)
115
+ - [ ] Unsubscribe mechanism and physical address are included (CAN-SPAM / GDPR compliance)
116
+
117
+ ## Anti-Patterns
118
+
119
+ - **Generic opener ("Hope this finds you well")** — This phrase instantly signals a mass template. Recipients delete these emails reflexively. Always lead with a personalized, specific reference that proves human effort.
120
+ - **Multiple CTAs** — "Book a call, visit our website, download the guide, and follow us on LinkedIn" dilutes every action. Each additional CTA reduces the conversion probability of the primary ask.
121
+ - **Feature dumping** — Listing product features instead of articulating outcomes. "We have AI-powered analytics with real-time dashboards" means nothing. "We helped [Company] cut reporting time by 70%" means everything.
122
+ - **Long paragraphs in cold emails** — Dense 4-5 sentence paragraphs look like work to read. On mobile (where most emails are first seen), a long paragraph fills the entire screen and triggers an immediate delete.
123
+ - **HTML-heavy cold emails** — Designed templates with images, buttons, and formatting trigger spam filters, reduce deliverability, and signal "marketing blast." Plain text outperforms for cold outreach.
124
+ - **Attachments in cold emails** — Files attached to cold emails trigger spam filters and create security concerns. Many corporate email systems strip or quarantine attachments from unknown senders.
125
+ - **No follow-up** — Sending one email and giving up leaves 80% of potential conversions on the table. A structured follow-up sequence (days 3, 7, 14) is essential for results.
126
+ - **Selling in the first cold email** — The goal of a cold email is to start a conversation, not close a deal. Asking for a purchase in the first contact feels aggressive and signals a lack of understanding of the sales process.
127
+ - **Ignoring send limits** — Blasting 500+ cold emails per day from a single domain destroys sender reputation. Domain blacklisting takes weeks to recover from and affects all emails from that domain, including internal ones.
@@ -0,0 +1,365 @@
1
+ ---
2
+ id: image-design
3
+ name: "Visual Design & Image Creation"
4
+ whenToUse: |
5
+ Creating agents that design graphics, carousel slides, social media visuals,
6
+ or HTML/CSS templates for rendering.
7
+ NOT for: copywriting, research, data analysis, publishing.
8
+ version: "1.0.0"
9
+ ---
10
+
11
+ ## Compact Rules
12
+
13
+ 1. Define a complete design system (colors, fonts, spacing, grid) before creating any slide.
14
+ 2. Produce self-contained HTML files with inline CSS and no external dependencies (except Google Fonts).
15
+ 3. Ensure all text meets the WCAG AA minimum contrast ratio of 4.5:1.
16
+ 4. Respect platform minimum font sizes (e.g., minimum 20px on all platforms, 58px hero for IG).
17
+ 5. Establish visual hierarchy through contrast in size (1.5x minimum ratio) and weight.
18
+ 6. Use CSS Grid or Flexbox for layout; never use absolute positioning for primary content.
19
+ 7. Limit the design system to a maximum of 3-5 colors.
20
+ 8. Set exact pixel dimensions on the body element matching the target viewport.
21
+ 9. Visually verify the rendering of the first slide before batching the rest.
22
+ 10. Use a consistent design system and zero-padded naming across multi-slide carousels.
23
+ 11. Never place readable text over complex images without a contrast-protecting overlay.
24
+ 12. Do not include redundant visual elements like slide number counters (e.g., "1/7") on Instagram.
25
+
26
+ <!-- End Compact Rules. Full reference below. -->
27
+
28
+ # Visual Design & Image Creation — Best Practices
29
+
30
+ ## Core Principles
31
+
32
+ 1. **Design system before individual pieces.** Before creating any visual, define the design system: primary and secondary colors, font family and scale, spacing unit, border radius, shadow style, and grid structure. Every element in the design draws from this system. No ad-hoc styling decisions.
33
+
34
+ 2. **Platform-aware viewport and typography.** Every design targets a specific platform viewport. Respect the minimum font sizes enforced by the rendering engine:
35
+
36
+ | Platform / Format | Hero | Heading | Body | Caption |
37
+ |--------------------------|--------|---------|-------|---------|
38
+ | Instagram Post/Carousel | 58px | 43px | 34px | 24px |
39
+ | Instagram Story/Reel | 56px | 42px | 32px | 20px |
40
+
41
+ No text element meant to be read may use a font size smaller than 20px on any platform. Never include slide number counters (e.g., "7/8", "1/7") in carousel images. Instagram shows native carousel navigation. Font weight for body text and above must be 500 or higher.
42
+
43
+ 3. **Visual hierarchy through contrast and scale.** Every design must have a clear reading order: hero text first, supporting text second, details third. Achieve hierarchy through font size contrast (minimum 1.5x ratio between levels), weight contrast (bold vs. medium), and spatial separation. Never rely on color alone for hierarchy.
44
+
45
+ 4. **Self-contained HTML is non-negotiable.** Every HTML file must be completely self-contained: inline CSS only, no external stylesheets, no CDN links, no JavaScript, no external font files. Use web-safe fonts or Google Fonts via CSS @import (the only allowed external resource). All images must be referenced as absolute paths or base64 data URIs. Body must set exact pixel dimensions matching the target viewport with margin: 0, padding: 0, overflow: hidden.
46
+
47
+ 5. **Accessibility and contrast.** All text must meet WCAG AA minimum contrast ratio of 4.5:1 against its background. White text (#FFFFFF) on dark backgrounds needs the background to be darker than #767676. Dark text on light backgrounds follows the inverse rule. Never place text directly on complex images without a solid or gradient overlay.
48
+
49
+ 6. **Batch consistency for multi-slide content.** When creating carousels or multi-slide content, generate one HTML file per slide. All slides must share the exact same design system. Slide numbering uses zero-padded format: slide-01.html, slide-02.html. First slide is always the hook/cover. Last slide is always the CTA.
50
+
51
+ 7. **CSS Grid and Flexbox for layout.** Use CSS Grid or Flexbox for all layout composition. Never use absolute positioning for primary content layout (reserved only for decorative overlays). Grid and Flexbox render consistently across Playwright and are the most reliable layout methods.
52
+
53
+ 8. **Brand alignment from company context.** Before designing, read the company context file for brand colors, fonts, visual style guidelines, and tone. If no brand guidelines exist, ask the user for color preferences and visual direction before generating any HTML. Never default to generic blue/white corporate aesthetics without explicit brand input.
54
+
55
+ 9. **Verify before batch.** Always render and visually verify the first slide of any multi-slide content before proceeding with the rest. Catching typography, spacing, or color issues on slide 1 prevents rework across all slides.
56
+
57
+ ## Design Methodology
58
+
59
+ ### 1. Load context and brief
60
+ Read the company context file, any upstream agent output (copywriter text, strategist direction), and the crew configuration. Identify the target platform, content format (single image, carousel, story), and the text content to be visualized.
61
+
62
+ ### 2. Confirm design direction
63
+ Before designing, clarify: target platform and viewport, visual mood (bold/minimal/playful/corporate), color preferences (brand colors or custom), and the number of slides or images needed. If the brief is ambiguous, ask.
64
+
65
+ ### 3. Define the design system
66
+ Based on the brief and brand context, define:
67
+ - **Colors**: Primary, secondary, accent, background, text colors with hex values
68
+ - **Typography**: Font family, size scale (hero/heading/body/caption), weight scale
69
+ - **Spacing**: Base unit (e.g., 24px), multiples for margins and padding
70
+ - **Grid**: Column structure, gutter width, content margins
71
+ - **Visual elements**: Border radius, shadow style, decorative patterns
72
+
73
+ ### 4. Create the HTML/CSS
74
+ Write complete, self-contained HTML files. Each file is one slide or image. Follow the design system strictly. Use semantic class names. Set body dimensions to match the target viewport exactly. Verify all text meets minimum font size requirements for the target platform.
75
+
76
+ ### 5. Render and verify
77
+ Save HTML to the output folder, start the HTTP server, navigate the browser to the file, resize to the target viewport, take the screenshot. Read the rendered image to verify quality. Check: text is readable, colors render correctly, no content is clipped, layout is balanced.
78
+
79
+ ### 6. Iterate if needed
80
+ If the rendered image has issues (text too small, clipped content, color mismatch), adjust the HTML and re-render. Do not proceed to the next slide until the current one passes visual verification.
81
+
82
+ ### 7. Batch render remaining slides
83
+ After the first slide is verified, generate and render all remaining slides using the same design system. Keep the HTTP server running for the entire batch. Stop the server only after all slides are rendered.
84
+
85
+ ### 8. Deliver the output
86
+ Present all rendered images to the user or downstream agent. Include the design system documentation alongside the images so the visual identity can be reused in future content.
87
+
88
+ ## Platform Specifications
89
+
90
+ ### Instagram Post / Carousel
91
+ - **Viewport**: 1080 x 1440 (3:4 portrait)
92
+ - **Min font sizes**: Hero 58px, Heading 43px, Body 34px, Caption 24px
93
+ - **Optimal slide count**: 5-10 slides. Under 5 feels incomplete, over 10 causes drop-off.
94
+ - **Structure**: Hook on slide 1, CTA on last slide, value in between.
95
+ - **No slide counters**: Instagram displays native carousel navigation indicators.
96
+
97
+ ### Instagram Story / Reel
98
+ - **Viewport**: 1080 x 1920 (9:16 portrait)
99
+ - **Min font sizes**: Hero 56px, Heading 42px, Body 32px, Caption 20px
100
+
101
+ ### LinkedIn Post
102
+ - **Viewport**: 1200 x 627 (1.91:1 horizontal)
103
+ - **Min font sizes**: Hero 40px+, Body 24px+, Caption 20px+
104
+
105
+ ### General
106
+ - **Absolute minimum**: 20px for any readable text on any platform.
107
+ - **Font weight floor**: 500 or higher for body text and above.
108
+
109
+ ## Decision Criteria
110
+
111
+ - **Font family selection**: Sans-serif for social media (Inter, Montserrat, Open Sans, Poppins). Serif only for editorial or luxury brands. Monospace only for technical content.
112
+ - **Color palette size**: 3-5 colors maximum per design system. Primary + secondary + accent + background + text. More colors create visual noise.
113
+ - **Slide count for carousels**: Instagram carousels perform best at 5-10 slides. Under 5 feels incomplete, over 10 causes drop-off. Hook on slide 1, CTA on last slide, value in between.
114
+ - **When to use gradients**: For background overlays on images, for hero sections, for CTAs. Never for body text backgrounds. Linear gradients only (radial gradients render inconsistently).
115
+ - **When to use images vs. solid colors**: Solid colors for text-heavy slides (better readability). Images for cover slides, mood-setting slides, and when the visual tells the story better than text.
116
+
117
+ ## Quality Criteria
118
+
119
+ - [ ] Design system is documented before individual slides are created (colors, fonts, spacing, grid)
120
+ - [ ] All HTML files are self-contained: inline CSS, no external dependencies except Google Fonts @import
121
+ - [ ] All text meets minimum font size requirements for the target platform (checked against platform specifications table)
122
+ - [ ] All text meets WCAG AA contrast ratio of 4.5:1 against its background
123
+ - [ ] Body dimensions match target viewport exactly (width and height in px)
124
+ - [ ] CSS uses Grid or Flexbox for layout (no absolute positioning for primary structure)
125
+ - [ ] Multi-slide content uses consistent design system across all slides (same colors, fonts, spacing)
126
+ - [ ] First slide was rendered and visually verified before batch rendering
127
+ - [ ] No placeholder text (Lorem ipsum, "Text here", etc.) in any deliverable
128
+ - [ ] Design rationale is documented alongside the output
129
+
130
+ ## Output Examples
131
+
132
+ ### Example 1: Instagram Carousel Design System + Slide 1
133
+
134
+ ```
135
+ DESIGN SYSTEM
136
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
137
+ Platform: Instagram Carousel
138
+ Viewport: 1080 x 1440
139
+ Slides: 7 (hook + 5 content + CTA)
140
+
141
+ Colors:
142
+ Primary: #1A1A2E (deep navy — background)
143
+ Secondary: #E94560 (coral red — accent, CTAs)
144
+ Text: #FFFFFF (white — all body text)
145
+ Muted: #A0A0B8 (gray-blue — captions, slide numbers)
146
+ Highlight: #FFD93D (gold — emphasis, icons)
147
+
148
+ Typography:
149
+ Family: 'Inter', sans-serif (via Google Fonts @import)
150
+ Hero: 67px / 700 weight (slide 1 hook only)
151
+ Heading: 48px / 700 weight
152
+ Body: 34px / 500 weight
153
+ Caption: 24px / 500 weight
154
+
155
+ Spacing:
156
+ Base unit: 24px
157
+ Content margin: 72px (3x base) from edges
158
+ Section gap: 48px (2x base)
159
+
160
+ Grid:
161
+ Single column, centered content
162
+ Max content width: 936px (1080 - 2*72)
163
+
164
+ Visual elements:
165
+ Border radius: 16px (cards, buttons)
166
+ CTA button: #E94560 background, #FFFFFF text, 16px radius, 20px 40px padding
167
+ Slide number: bottom-right, caption size, muted color
168
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
169
+
170
+ SLIDE 1 (Hook):
171
+
172
+ File: slide-01.html
173
+ ```
174
+
175
+ ```html
176
+ <!DOCTYPE html>
177
+ <html>
178
+ <head>
179
+ <meta charset="UTF-8">
180
+ <style>
181
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap');
182
+ * { margin: 0; padding: 0; box-sizing: border-box; }
183
+ body {
184
+ width: 1080px; height: 1440px; overflow: hidden;
185
+ background: #1A1A2E;
186
+ font-family: 'Inter', sans-serif;
187
+ display: flex; flex-direction: column;
188
+ justify-content: center; align-items: center;
189
+ padding: 72px;
190
+ }
191
+ .hook {
192
+ font-size: 67px; font-weight: 700; color: #FFFFFF;
193
+ text-align: center; line-height: 1.25;
194
+ max-width: 936px;
195
+ }
196
+ .hook .accent { color: #E94560; }
197
+ .subtitle {
198
+ font-size: 34px; font-weight: 500; color: #A0A0B8;
199
+ text-align: center; margin-top: 32px;
200
+ max-width: 800px; line-height: 1.5;
201
+ }
202
+ .swipe-cta {
203
+ position: absolute; bottom: 48px; right: 72px;
204
+ font-size: 24px; font-weight: 500; color: #A0A0B8;
205
+ display: flex; align-items: center; gap: 8px;
206
+ }
207
+ </style>
208
+ </head>
209
+ <body>
210
+ <h1 class="hook">
211
+ You are doing <span class="accent">100 things</span> to grow on Instagram.<br>
212
+ And ignoring the <span class="accent">ONE</span> that actually works.
213
+ </h1>
214
+ <p class="subtitle">Swipe to learn the strategy that grew 3 accounts from 0 to 50K in 90 days.</p>
215
+ <span class="swipe-cta">Swipe →</span>
216
+ </body>
217
+ </html>
218
+ ```
219
+
220
+ Design rationale: Deep navy background with white text creates strong contrast (ratio 15.3:1). Coral accent draws attention to key numbers. The hook uses 67px hero weight for maximum impact on mobile. Subtitle at 34px body weight provides context without competing with the hook. Swipe CTA uses muted gray-blue at caption size to stay visible but secondary.
221
+
222
+ ---
223
+
224
+ ### Example 2: LinkedIn Post Single Image
225
+
226
+ ```
227
+ DESIGN SYSTEM
228
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
229
+ Platform: LinkedIn Post
230
+ Viewport: 1200 x 627
231
+
232
+ Colors:
233
+ Primary: #FFFFFF (white — background)
234
+ Secondary: #0A66C2 (LinkedIn blue — accent)
235
+ Text: #191919 (near-black — headings, body)
236
+ Muted: #666666 (gray — captions)
237
+ Card BG: #F3F6F8 (light gray — content cards)
238
+
239
+ Typography:
240
+ Family: 'Inter', sans-serif
241
+ Hero: 44px / 700 weight
242
+ Body: 24px / 500 weight
243
+ Caption: 20px / 500 weight
244
+
245
+ Spacing:
246
+ Base unit: 20px
247
+ Content margin: 60px from edges
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+
250
+ File: linkedin-post.html
251
+ ```
252
+
253
+ ```html
254
+ <!DOCTYPE html>
255
+ <html>
256
+ <head>
257
+ <meta charset="UTF-8">
258
+ <style>
259
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap');
260
+ * { margin: 0; padding: 0; box-sizing: border-box; }
261
+ body {
262
+ width: 1200px; height: 627px; overflow: hidden;
263
+ background: #FFFFFF;
264
+ font-family: 'Inter', sans-serif;
265
+ display: flex; align-items: center;
266
+ padding: 60px;
267
+ gap: 60px;
268
+ }
269
+ .left {
270
+ flex: 1; display: flex; flex-direction: column; gap: 20px;
271
+ }
272
+ .tag {
273
+ font-size: 20px; font-weight: 700; color: #0A66C2;
274
+ text-transform: uppercase; letter-spacing: 2px;
275
+ }
276
+ h1 {
277
+ font-size: 44px; font-weight: 700; color: #191919;
278
+ line-height: 1.2;
279
+ }
280
+ .body-text {
281
+ font-size: 24px; font-weight: 500; color: #666666;
282
+ line-height: 1.5;
283
+ }
284
+ .right {
285
+ width: 340px; height: 340px;
286
+ background: #F3F6F8;
287
+ border-radius: 20px;
288
+ display: flex; flex-direction: column;
289
+ justify-content: center; align-items: center;
290
+ gap: 12px;
291
+ }
292
+ .metric {
293
+ font-size: 60px; font-weight: 700; color: #0A66C2;
294
+ }
295
+ .metric-label {
296
+ font-size: 20px; font-weight: 500; color: #666666;
297
+ text-align: center;
298
+ }
299
+ </style>
300
+ </head>
301
+ <body>
302
+ <div class="left">
303
+ <span class="tag">Case Study</span>
304
+ <h1>How we reduced churn by 34% without changing the product</h1>
305
+ <p class="body-text">The fix was in the onboarding flow. Three changes, two weeks, measurable results.</p>
306
+ </div>
307
+ <div class="right">
308
+ <span class="metric">-34%</span>
309
+ <span class="metric-label">Customer Churn<br>in 60 days</span>
310
+ </div>
311
+ </body>
312
+ </html>
313
+ ```
314
+
315
+ Design rationale: Clean white background matches LinkedIn's professional aesthetic. Two-column layout with text left and metric card right creates visual balance. LinkedIn blue as accent ties the graphic to the platform. The 44px hero exceeds the LinkedIn minimum of 40px. The metric card uses a large 60px number as a visual anchor that draws the eye immediately.
316
+
317
+ ## Anti-Patterns
318
+
319
+ ### Never Do
320
+
321
+ 1. **Never use external dependencies in HTML.** No CDN links for CSS frameworks (Bootstrap, Tailwind), no external JavaScript, no externally hosted images. The only allowed external resource is Google Fonts via @import. Everything else must be inline. External dependencies break rendering in Playwright.
322
+
323
+ 2. **Never design without defining the design system first.** Jumping straight into individual slide HTML leads to inconsistency across slides. Colors drift, spacing varies, fonts change. Define the system, document it, then apply it uniformly.
324
+
325
+ 3. **Never use font sizes below platform minimums.** The rendering engine enforces hard minimums: 20px is the absolute floor for any readable text. 58px for hero text on Instagram carousels. 40px for hero on LinkedIn. These are not suggestions. Designs with undersized text fail quality review.
326
+
327
+ 4. **Never use absolute positioning for primary layout.** CSS absolute positioning is fragile and breaks when content length varies. Use CSS Grid or Flexbox for all structural layout. Reserve absolute positioning only for decorative overlays (slide numbers, watermarks, swipe indicators).
328
+
329
+ 5. **Never skip rendering verification.** The HTML may look correct in theory, but browser rendering can differ: fonts may fall back, spacing may collapse, colors may shift. Always take the screenshot and visually inspect the result before proceeding to the next slide.
330
+
331
+ 6. **Never place text on images without contrast protection.** Readable text over a photograph or complex image requires either: (a) a solid-color overlay at 60%+ opacity, (b) a gradient overlay from solid to transparent, or (c) a text shadow/backdrop-filter blur. Unprotected text on images fails the 4.5:1 contrast requirement.
332
+
333
+ 7. **Never use more than 5 colors in a design system.** More colors create visual noise and make the design feel uncoordinated. Five is enough: primary, secondary, accent, background, text. Variations (muted, highlight) should be derived from these five.
334
+
335
+ 8. **Never include slide number counters in carousel images.** Text elements like "7/8" or "1/7" must not appear in the rendered HTML for carousels. Instagram displays its own native slide navigation indicators. Adding a counter creates redundant UI noise and clutters the design. If slide order context is needed, communicate it through the design structure (visual hierarchy, headers), not a footer counter.
336
+
337
+ ### Always Do
338
+
339
+ 1. **Start every design with the design system documentation.** Before writing any HTML, document colors, fonts, spacing, grid, and visual elements. This document is both your guide and the deliverable for brand consistency.
340
+
341
+ 2. **Verify the first slide before batch rendering.** Render slide 1, inspect the screenshot, confirm quality. Only then proceed to slides 2 through N. This prevents rework across an entire carousel.
342
+
343
+ 3. **Document design rationale.** After each completed design, briefly explain why you made the key visual choices: color rationale, font selection, layout strategy. This helps the user understand the design thinking and makes iteration faster.
344
+
345
+ 4. **Match viewport exactly.** Body width and height in CSS must match the browser viewport resize dimensions exactly. A 1080x1440 carousel slide means body { width: 1080px; height: 1440px; }.
346
+
347
+ ## Vocabulary Guidance
348
+
349
+ ### Use
350
+
351
+ - **"Design system"**: The foundational term for consistent visual identity across pieces. Always define it before creating individual assets.
352
+ - **"Visual hierarchy"**: How the eye moves through the design. Use this when explaining font size, weight, and positioning choices.
353
+ - **"Viewport: WxH"**: Always state the target dimensions explicitly. "Instagram carousel at 1080x1440" not "standard Instagram size."
354
+ - **"Contrast ratio"**: Reference WCAG contrast standards when justifying color combinations. "4.5:1 minimum for body text."
355
+ - **"Self-contained HTML"**: The non-negotiable constraint. Reinforce that every file must render independently without external dependencies.
356
+ - **"Rendering verification"**: The step where you visually confirm the screenshot matches the intended design before proceeding.
357
+ - **"Brand palette"**: Reference the brand's color system by name when applying colors. "Using the primary brand color (#2D5BFF) for headings."
358
+
359
+ ### Avoid
360
+
361
+ - **"Placeholder"** or **"Lorem ipsum"**: Every text element must contain real content from the brief. No placeholder text in deliverables.
362
+ - **"Approximately"** or **"around"** for sizes: All dimensions, font sizes, and spacing must be exact pixel values. "About 36px" is not a design decision.
363
+ - **"Generic"** or **"standard"** for design choices: Every choice must be justified. "Standard blue" is not a color rationale; "brand primary #2D5BFF for trust and authority" is.
364
+ - **"It should look something like..."**: Deliver finished HTML, not descriptions of what designs should look like.
365
+ - **Em dashes**: Use periods, colons, or line breaks instead. Em dashes slow reading rhythm.