From 38f4f253dff6376809149f0676ca025504512282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20Liu=20=E5=AE=9D=E7=8E=89?= Date: Tue, 7 Apr 2026 01:31:32 -0500 Subject: [PATCH] feat(baoyu-comic): add four-panel preset, minimalist art style, and flexible image workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add minimalist art style (clean line art, limited spot color, stick-figure characters) - Add four-panel layout with 起承转合 structure - Add four-panel preset combining minimalist + neutral + four-panel layout - Make character sheet conditional (skip for simple presets like four-panel) - Add --ref failure recovery: compress → retry → fall back to prompt-only --- skills/baoyu-comic/SKILL.md | 71 +++++++----- .../references/art-styles/minimalist.md | 84 ++++++++++++++ .../baoyu-comic/references/auto-selection.md | 7 ++ .../references/config/preferences-schema.md | 7 +- .../references/layouts/four-panel.md | 40 +++++++ .../references/presets/four-panel.md | 107 ++++++++++++++++++ skills/baoyu-comic/references/workflow.md | 58 +++++++--- 7 files changed, 331 insertions(+), 43 deletions(-) create mode 100644 skills/baoyu-comic/references/art-styles/minimalist.md create mode 100644 skills/baoyu-comic/references/layouts/four-panel.md create mode 100644 skills/baoyu-comic/references/presets/four-panel.md diff --git a/skills/baoyu-comic/SKILL.md b/skills/baoyu-comic/SKILL.md index 61e866a..10d330e 100644 --- a/skills/baoyu-comic/SKILL.md +++ b/skills/baoyu-comic/SKILL.md @@ -29,9 +29,9 @@ Create original knowledge comics with flexible art style × tone combinations. | Option | Values | Description | |--------|--------|-------------| -| `--art` | ligne-claire (default), manga, realistic, ink-brush, chalk | Art style / rendering technique | +| `--art` | ligne-claire (default), manga, realistic, ink-brush, chalk, minimalist | Art style / rendering technique | | `--tone` | neutral (default), warm, dramatic, romantic, energetic, vintage, action | Mood / atmosphere | -| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon | Panel arrangement | +| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon, four-panel | Panel arrangement | | `--aspect` | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) | Page aspect ratio | | `--lang` | auto (default), zh, en, ja, etc. | Output language | @@ -55,6 +55,7 @@ Details: [references/partial-workflows.md](references/partial-workflows.md) | `realistic` | 写实 | Digital painting, realistic proportions, sophisticated | | `ink-brush` | 水墨 | Chinese brush strokes, ink wash effects | | `chalk` | 粉笔 | Chalkboard aesthetic, hand-drawn warmth | +| `minimalist` | 极简 | Clean black line art, limited spot color, stick-figure characters | ### Tones (基调) @@ -78,6 +79,7 @@ Presets with special rules beyond art+tone: | `--style wuxia` | `--art ink-brush --tone action` | Qi effects, combat visuals, atmospheric elements | | `--style shoujo` | `--art manga --tone romantic` | Decorative elements, eye details, romantic beats | | `--style concept-story` | `--art manga --tone warm` | Visual symbol system, growth arc, dialogue+action balance | +| `--style four-panel` | `--art minimalist --tone neutral --layout four-panel` | 起承转合 4-panel structure, B&W + spot color, stick-figure characters | ### Compatibility Matrix @@ -88,6 +90,7 @@ Presets with special rules beyond art+tone: | realistic | neutral, warm, dramatic, vintage | action | romantic, energetic | | ink-brush | neutral, dramatic, action, vintage | warm | romantic, energetic | | chalk | neutral, warm, energetic | vintage | dramatic, action, romantic | +| minimalist | neutral | warm, energetic | dramatic, vintage, romantic, action | Details: [references/auto-selection.md](references/auto-selection.md) @@ -103,6 +106,7 @@ Content signals determine default art + tone + layout (or preset): | Martial arts, wuxia | **wuxia** preset | | Romance, school life | **shoujo** preset | | Psychology, motivation, business narrative | **concept-story** preset | +| Business allegory, fable, parable, short insight, 四格 | **four-panel** preset | | Biography, balanced | ligne-claire + neutral | **When preset is recommended**: Load `references/presets/{preset}.md` and apply all special rules. @@ -174,9 +178,9 @@ Comic Progress: - [ ] Step 4: Review outline (conditional) - [ ] Step 5: Generate prompts - [ ] Step 6: Review prompts (conditional) -- [ ] Step 7: Generate images ⚠️ CHARACTER REF REQUIRED - - [ ] 7.1 Generate character sheet FIRST → characters/characters.png - - [ ] 7.2 Generate pages WITH --ref characters/characters.png +- [ ] Step 7: Generate images + - [ ] 7.1 Generate character sheet (if needed) → characters/characters.png + - [ ] 7.2 Generate pages (with --ref if character sheet exists) - [ ] Step 8: Merge to PDF - [ ] Step 9: Completion report ``` @@ -207,16 +211,24 @@ Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard → | 4 | Review outline (if requested) | User approval | | 5 | Generate prompts | `prompts/*.md` | | 6 | Review prompts (if requested) | User approval | -| **7.1** | **Generate character sheet FIRST** | `characters/characters.png` | -| **7.2** | Generate pages **with character ref** | `*.png` files | +| 7.1 | Generate character sheet (if needed) | `characters/characters.png` | +| 7.2 | Generate pages (with character ref if available) | `*.png` files | | 8 | Merge to PDF | `{slug}.pdf` | | 9 | Completion report | Summary | -### Step 7: Image Generation ⚠️ CRITICAL +### Step 7: Image Generation -**Character reference is MANDATORY for visual consistency.** +**7.1 Generate character sheet (conditional)**: -**7.1 Generate character sheet first**: +Character sheet is recommended for multi-page comics with recurring characters, but **NOT required** for all presets: + +| Condition | Action | +|-----------|--------| +| Multi-page comic with detailed characters | Generate character sheet (recommended) | +| Preset with simplified characters (e.g., four-panel minimalist) | Skip — prompt descriptions are sufficient | +| Single-page comic | Skip unless characters are complex | + +**When generating character sheet**: - **Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png` - Invoke an installed image generation skill such as `baoyu-imagine` - Read that skill's `SKILL.md` and follow its documented interface rather than calling its scripts directly @@ -224,18 +236,25 @@ Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard → - Save output to `characters/characters.png` - Use aspect ratio `4:3` -**Compress character sheet** (recommended): -Compress to reduce token usage when used as reference image: +**Compress character sheet** (recommended when using as `--ref`): - Use available image compression skill (if any) -- Or system tools: `pngquant`, `optipng`, `sips` (macOS) -- **Keep PNG format**, lossless compression preferred +- Or system tools: `sips -s format jpeg -s formatOptions 80 input.png --out output.jpg` (macOS) +- Or: `pngquant --quality=65-80 input.png -o output.png` +- Compression reduces API payload size and avoids `--ref` failures -**7.2 Generate each page WITH character reference**: +**7.2 Generate each page**: -| Skill Capability | Strategy | -|------------------|----------| -| Supports `--ref` | Pass `characters/characters.png` with EVERY page | -| No `--ref` support | Prepend character descriptions to EVERY prompt file | +| Character Sheet | Skill Capability | Strategy | +|-----------------|------------------|----------| +| Exists | Supports `--ref` | Pass `characters/characters.png` with EVERY page | +| Exists | No `--ref` support | Prepend character descriptions to EVERY prompt file | +| Skipped | — | Prompt file contains all character descriptions inline | + +**`--ref` failure recovery**: If generation fails with `--ref`: +1. **Compress**: Convert reference image to JPEG with reduced quality: + `sips -s format jpeg -s formatOptions 70 characters.png --out characters-compressed.jpg` +2. **Retry** with compressed image as `--ref` +3. **If still fails**: Fall back to generating WITHOUT `--ref` (prompt-only, character descriptions embedded in prompt text) **Backup rules for page generation**: - If prompt file exists: rename to `prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md` @@ -243,8 +262,8 @@ Compress to reduce token usage when used as reference image: - Invoke the installed image generation skill for each page - Use `prompts/01-page-xxx.md` as the prompt-file input - Save output to `01-page-xxx.png` -- Use aspect ratio `3:4` -- If the chosen skill supports reference images, pass `characters/characters.png` as `--ref` +- Use aspect ratio from storyboard (default `3:4`, preset may override) +- If character sheet exists and skill supports reference images, pass as `--ref` **Full workflow details**: [references/workflow.md](references/workflow.md) @@ -275,10 +294,10 @@ Schema: [references/config/preferences-schema.md](references/config/preferences- - [ohmsha-guide.md](references/ohmsha-guide.md) - Ohmsha manga specifics **Style Definitions**: -- `references/art-styles/` - Art styles (ligne-claire, manga, realistic, ink-brush, chalk) +- `references/art-styles/` - Art styles (ligne-claire, manga, realistic, ink-brush, chalk, minimalist) - `references/tones/` - Tones (neutral, warm, dramatic, romantic, energetic, vintage, action) -- `references/presets/` - Presets with special rules (ohmsha, wuxia, shoujo, concept-story) -- `references/layouts/` - Layouts (standard, cinematic, dense, splash, mixed, webtoon) +- `references/presets/` - Presets with special rules (ohmsha, wuxia, shoujo, concept-story, four-panel) +- `references/layouts/` - Layouts (standard, cinematic, dense, splash, mixed, webtoon, four-panel) **Workflow**: - [workflow.md](references/workflow.md) - Full workflow details @@ -308,6 +327,6 @@ Schema: [references/config/preferences-schema.md](references/config/preferences- - Maintain style consistency via session ID - **Step 2 confirmation required** - do not skip - **Steps 4/6 conditional** - only if user requested in Step 2 -- **Step 7.1 character sheet MUST be generated before pages** - ensures consistency -- **Step 7.2 EVERY page MUST reference characters** - use `--ref` or embed descriptions +- **Step 7.1 character sheet** - recommended for multi-page comics, optional for simple presets +- **Step 7.2 character reference** - use `--ref` if sheet exists; compress/convert on failure; fall back to prompt-only - Watermark/language configured once in EXTEND.md diff --git a/skills/baoyu-comic/references/art-styles/minimalist.md b/skills/baoyu-comic/references/art-styles/minimalist.md new file mode 100644 index 0000000..f075b2d --- /dev/null +++ b/skills/baoyu-comic/references/art-styles/minimalist.md @@ -0,0 +1,84 @@ +# minimalist + +极简画风 - Clean black line art, limited spot color, simplified stick-figure characters + +## Overview + +Minimalist cartoon illustration characterized by clean black line art on white background with very limited spot color for emphasis. Characters are simplified to near-stick-figure abstraction, focusing on gesture and concept rather than anatomical detail. Designed for business allegory, quick-read educational content, and concept illustration. + +## Line Work + +- Clean, uniform black lines (1.5-2px) +- No hatching, cross-hatching, or shading techniques +- Minimal detail — every line serves a purpose +- Bold outlines for characters, thinner lines for props/labels +- No decorative flourishes or ornamental lines + +## Character Design + +- Highly simplified, stick-figure-like business characters +- Circle or oval heads with minimal facial features (dot eyes, simple line mouth) +- Body as simple geometric shapes or line constructions +- Distinguishing features through props only (tie, hat, briefcase, glasses) +- No anatomical detail — expressive through posture and gesture +- 4-5 head height proportions (squat, iconic) + +## Background Treatment + +- Mostly blank/white — negative space is a design element +- Minimal environmental cues (a line for ground, simple desk outline) +- Concept labels and text annotations replace detailed environments +- Icons and symbols over realistic rendering +- No perspective or spatial depth + +## Color Approach + +- Primarily black and white (90%+ of the image) +- 1-2 spot accent colors for emphasis on key concepts +- Accent color used sparingly: highlighting key objects, text labels, concept indicators +- No gradients, no shading, no color fills on backgrounds +- Color draws the eye to the most important element in each panel + +## Default Color Palette + +| Role | Color | Hex | +|------|-------|-----| +| Primary | Black ink | `#1A1A1A` | +| Background | Clean white | `#FFFFFF` | +| Accent 1 | Spot orange | `#FF6B35` | +| Accent 2 | Spot blue (optional) | `#3182CE` | +| Text labels | Dark gray | `#4A4A4A` | +| Panel border | Medium gray | `#666666` | + +## Visual Elements + +- Text labels with accent-color backgrounds or underlines for key terms +- Simple icons: arrows, circles, checkmarks, crosses +- Concept highlight boxes with spot color +- Minimal speech bubbles (simple oval or rectangle, thin black outline) +- No sound effects, no motion lines, no screen tones + +## Quality Markers + +- ✓ Clean, purposeful line work with no unnecessary detail +- ✓ 90%+ black-and-white with strategic spot color +- ✓ Simplified characters readable at small sizes +- ✓ Text labels integrated naturally into panels +- ✓ Strong negative space usage +- ✓ Every element serves the narrative point + +## Compatibility + +| Tone | Fit | Notes | +|------|-----|-------| +| neutral | ✓✓ | Ideal for business/educational content | +| warm | ✓ | Works for gentle stories, slight warmth in accent | +| energetic | ✓ | Works for punchy, high-energy content | +| dramatic | ✗ | Style too stripped down for dramatic intensity | +| vintage | ✗ | Minimalist aesthetic conflicts with aged/textured look | +| romantic | ✗ | No capacity for decorative/soft elements | +| action | ✗ | No dynamic line capability for speed/impact | + +## Best For + +Business allegory, management fables, short concept illustration, four-panel comic strips, quick-insight education, social media content diff --git a/skills/baoyu-comic/references/auto-selection.md b/skills/baoyu-comic/references/auto-selection.md index 36c752f..15a49d1 100644 --- a/skills/baoyu-comic/references/auto-selection.md +++ b/skills/baoyu-comic/references/auto-selection.md @@ -17,6 +17,7 @@ Content signals determine default art + tone + layout (or preset). | Wine, food, lifestyle | realistic | neutral | cinematic | - | | Martial arts, wuxia, xianxia | ink-brush | action | splash | **wuxia** | | Romance, love, school life | manga | romantic | standard | **shoujo** | +| Business allegory, fable, parable, short insight, 四格 | minimalist | neutral | four-panel | **four-panel** | | Biography, balanced | ligne-claire | neutral | mixed | - | ## Preset Recommendation Rules @@ -43,6 +44,11 @@ Content signals determine default art + tone + layout (or preset). - **Special rules**: Visual symbol system, growth arc, dialogue+action balance, original characters - **Base**: manga + warm + standard +### four-panel +- **Triggers**: Business allegory, fable, parable, short insight, four-panel, 四格, 四格漫画, single-page comic, minimalist comic strip +- **Special rules**: Strict 起承转合 4-panel structure, B&W + spot color, simplified stick-figure characters, single-page story +- **Base**: minimalist + neutral + four-panel + ## Compatibility Matrix Art Style × Tone combinations work best when matched appropriately: @@ -54,6 +60,7 @@ Art Style × Tone combinations work best when matched appropriately: | realistic | neutral, warm, dramatic, vintage | action | romantic, energetic | | ink-brush | neutral, dramatic, action, vintage | warm | romantic, energetic | | chalk | neutral, warm, energetic | vintage | dramatic, action, romantic | +| minimalist | neutral | warm, energetic | dramatic, vintage, romantic, action | **Note**: Art Style × Tone × Layout can be freely combined. Incompatible combinations work but may produce unexpected results. diff --git a/skills/baoyu-comic/references/config/preferences-schema.md b/skills/baoyu-comic/references/config/preferences-schema.md index 05a71ab..b9ba376 100644 --- a/skills/baoyu-comic/references/config/preferences-schema.md +++ b/skills/baoyu-comic/references/config/preferences-schema.md @@ -16,9 +16,9 @@ watermark: content: "" position: bottom-right # bottom-right|bottom-left|bottom-center|top-right -preferred_art: null # ligne-claire|manga|realistic|ink-brush|chalk +preferred_art: null # ligne-claire|manga|realistic|ink-brush|chalk|minimalist preferred_tone: null # neutral|warm|dramatic|romantic|energetic|vintage|action -preferred_layout: null # standard|cinematic|dense|splash|mixed|webtoon +preferred_layout: null # standard|cinematic|dense|splash|mixed|webtoon|four-panel preferred_aspect: null # 3:4|4:3|16:9 language: null # zh|en|ja|ko|auto @@ -41,7 +41,7 @@ character_presets: | `watermark.enabled` | bool | false | Enable watermark | | `watermark.content` | string | "" | Watermark text (@username or custom) | | `watermark.position` | enum | bottom-right | Position on image | -| `preferred_art` | string | null | Art style (ligne-claire, manga, realistic, ink-brush, chalk) | +| `preferred_art` | string | null | Art style (ligne-claire, manga, realistic, ink-brush, chalk, minimalist) | | `preferred_tone` | string | null | Tone (neutral, warm, dramatic, romantic, energetic, vintage, action) | | `preferred_layout` | string | null | Layout preference or null | | `preferred_aspect` | string | null | Aspect ratio (3:4, 4:3, 16:9) | @@ -57,6 +57,7 @@ character_presets: | `realistic` | 写实 | Digital painting, realistic proportions | | `ink-brush` | 水墨 | Chinese brush strokes, ink wash effects | | `chalk` | 粉笔 | Chalkboard aesthetic, hand-drawn warmth | +| `minimalist` | 极简 | Clean black line art, limited spot color, stick-figure characters | ## Tone Options diff --git a/skills/baoyu-comic/references/layouts/four-panel.md b/skills/baoyu-comic/references/layouts/four-panel.md new file mode 100644 index 0000000..e9cbdfc --- /dev/null +++ b/skills/baoyu-comic/references/layouts/four-panel.md @@ -0,0 +1,40 @@ +# four-panel + +四格漫画 - Strict 2×2 grid, single-page story + +## Panel Structure + +- **Panels per page**: 4 (exactly, no variation) +- **Structure**: Strict 2×2 equal grid +- **Gutters**: Consistent white space (8-10px), uniform on all sides + +## Grid Configuration + +- 2 columns × 2 rows, all panels identical size +- Panel sizes: Exactly equal (each panel = 25% of content area) +- Reading flow: Z-pattern — Panel 1 (top-left) → Panel 2 (top-right) → Panel 3 (bottom-left) → Panel 4 (bottom-right) + +## Narrative Structure + +Each panel serves a specific narrative role (起承转合 / kishōtenketsu): + +| Panel | Position | Role | Purpose | +|-------|----------|------|---------| +| 1 | Top-left | 起 Setup | Establish situation, introduce characters/problem | +| 2 | Top-right | 承 Development | Build on setup, add complication or attempt | +| 3 | Bottom-left | 转 Turn | Twist, key insight, or reversal — the pivotal moment | +| 4 | Bottom-right | 合 Conclusion | Resolution, punchline, or takeaway | + +## Aspect Ratio + +- Recommended page aspect: **4:3** (landscape) +- Landscape gives each panel a comfortable wide rectangle +- Portrait (3:4) makes panels tall and narrow — avoid for this layout + +## Best For + +Business allegory, quick-insight education, social media comics, fables, parables, single-concept explanation + +## Best Style Pairings + +minimalist, ligne-claire, chalk diff --git a/skills/baoyu-comic/references/presets/four-panel.md b/skills/baoyu-comic/references/presets/four-panel.md new file mode 100644 index 0000000..b745348 --- /dev/null +++ b/skills/baoyu-comic/references/presets/four-panel.md @@ -0,0 +1,107 @@ +# four-panel + +四格漫画预设 - Minimalist four-panel business allegory comics + +## Base Configuration + +| Dimension | Value | +|-----------|-------| +| Art Style | minimalist | +| Tone | neutral | +| Layout | four-panel (default) | +| Aspect | 4:3 (landscape) | + +Equivalent to: `--art minimalist --tone neutral --layout four-panel --aspect 4:3` + +## Unique Rules + +This preset includes special rules beyond the art+tone combination. When `--style four-panel` is used, ALL rules below must be applied. + +### 起承转合 Narrative Structure (CRITICAL) + +Every comic MUST follow the four-panel 起承转合 structure: + +| Panel | Role | Requirements | +|-------|------|-------------| +| 1 (起 Setup) | Introduce the situation | Show character(s) in a recognizable context. Establish the "normal" state or problem | +| 2 (承 Development) | Build on the setup | Add complication, show an attempt, or introduce the concept. Stakes become clearer | +| 3 (转 Turn) | The twist or key insight | **Most important panel.** Show the unexpected reversal, contrast, or "aha" moment that makes the allegory work | +| 4 (合 Conclusion) | Resolution and takeaway | Show the result, consequence, or lesson learned. Can be a visual punchline or summary | + +**CRITICAL**: Do NOT deviate from exactly 4 panels. No 5th panel, no title panel, no footer panel within the image. + +### Single-Page Story Rule (CRITICAL) + +- The entire story is told in ONE page with exactly 4 panels +- Page count: always 1 (plus optional cover) +- No multi-page four-panel stories — if content requires more, create multiple separate four-panel comics +- Storyboard structure: Cover (optional) + 1 page + +### Accent Color System + +- The image is primarily black-and-white line art +- Use exactly 1-2 spot colors per strip (default: orange `#FF6B35`) +- Rules: + - Key concept label or object: filled with accent color or outlined in accent + - Panel 3 (转 Turn) should have the strongest color emphasis + - Characters remain B&W — color is for concepts/objects/labels only + - Consistent accent color across all 4 panels (do not switch colors between panels) + +### Character Design Rules + +- Simplified stick-figure-like characters +- Distinguish characters through simple props: ties, glasses, hats, briefcases, aprons +- No detailed faces — dot eyes, line mouth at most +- Characters should be generic enough to represent archetypes (the manager, the employee, the customer) +- Maximum 2-3 characters per strip + +### Text in Panels + +- Chinese text for dialogue and labels (or match source language) +- Keep text minimal — 1-2 short lines per panel maximum +- Key concept terms can be highlighted with accent color background +- No narrator boxes — dialogue and labels only +- Speech bubbles: simple rectangles or ovals, thin black outline + +### Optional Title & Caption + +- A brief descriptive title above the 4 panels +- An optional one-line caption/moral below the panels +- These are part of the page composition, not separate panels + +### Character Archetypes (Flexible) + +Create simple stick-figure characters based on content. No fixed defaults: + +| Role | Archetype | Visual Cues | +|------|-----------|------------| +| Protagonist | Worker/employee facing a situation | Simple figure, minimal distinguishing feature (glasses, tie) | +| Authority | Boss/manager/expert | Slightly larger figure, or prop like pointer/clipboard | +| Object | The concept itself | Labeled object, icon, or highlighted text with accent color | + +### Prompt Template + +When generating image prompts for four-panel comics, include these keywords: + +> A minimalist, clean line art digital comic strip in a four-panel grid layout (2×2). The style is simplified cartoon illustration with clear black outlines and a minimal color palette of black, white, and specific spot [accent color] for key concepts. + +Each panel description should specify: +- Panel position (Top Left / Top Right / Bottom Left / Bottom Right) +- Character poses and gestures (simple, stick-figure style) +- Dialogue text in Chinese (hand-drawn style) +- Any accent-colored elements (concept labels, key objects) + +## Quality Markers + +- ✓ Exactly 4 panels in strict 2×2 grid +- ✓ 起承转合 narrative arc clearly present +- ✓ 90%+ black-and-white with strategic spot color +- ✓ Simplified stick-figure characters +- ✓ Key concept visually highlighted with accent color +- ✓ Text is minimal and in Chinese (or source language) +- ✓ Single complete story in one page +- ✓ Panel 3 delivers a clear "turn" or insight + +## Best For + +Business allegory, management fables, short insights, workplace parables, concept contrasts, social media educational content, quick-read comics diff --git a/skills/baoyu-comic/references/workflow.md b/skills/baoyu-comic/references/workflow.md index 9e679b7..4b8ad38 100644 --- a/skills/baoyu-comic/references/workflow.md +++ b/skills/baoyu-comic/references/workflow.md @@ -18,6 +18,8 @@ Comic Progress: - [ ] Step 5: Generate prompts - [ ] Step 6: Review prompts (conditional) - [ ] Step 7: Generate images + - [ ] 7.1 Character sheet (if needed) + - [ ] 7.2 Generate pages - [ ] Step 8: Merge to PDF - [ ] Step 9: Completion report ``` @@ -410,28 +412,41 @@ options: With confirmed prompts from Step 5/6: -### 7.1 Generate Character Reference Sheet (first) +### 7.1 Generate Character Reference Sheet (conditional) +Character sheet is recommended for multi-page comics with recurring characters, but **NOT required** for all presets. + +**When to generate**: + +| Condition | Action | +|-----------|--------| +| Multi-page comic with detailed/recurring characters | Generate character sheet (recommended) | +| Preset with simplified characters (e.g., four-panel minimalist) | Skip — prompt descriptions are sufficient | +| Single-page comic | Skip unless characters are complex | + +**When generating**: 1. Use Reference Sheet Prompt from `characters/characters.md` 2. **Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png` 3. Generate → `characters/characters.png` -4. This ensures visual consistency for all subsequent pages +4. **Compress** to reduce API payload size when used as `--ref`: + - `sips -s format jpeg -s formatOptions 80 characters.png --out characters-compressed.jpg` (macOS) + - Or: `pngquant --quality=65-80 characters.png -o characters-compressed.png` ### 7.2 Generate Comic Pages -**CRITICAL: Character Reference is MANDATORY** for visual consistency across all pages. - **Before generating any page**: 1. Read the image generation skill's SKILL.md 2. Check if it supports reference image input (`--ref`, `--reference`, etc.) -3. Choose the appropriate strategy below +3. Determine if character sheet exists +4. Choose the appropriate strategy below -**Character Reference Strategy**: +**Page Generation Strategy**: -| Skill Capability | Strategy | Action | -|------------------|----------|--------| -| Supports `--ref` | **Strategy A** | Pass `characters/characters.png` with EVERY page | -| Does NOT support `--ref` | **Strategy B** | Prepend character descriptions to EVERY prompt | +| Character Sheet | Skill Capability | Strategy | +|-----------------|------------------|----------| +| Exists | Supports `--ref` | **A**: Pass character sheet as `--ref` with every page | +| Exists | No `--ref` support | **B**: Embed character descriptions in every prompt | +| Skipped | — | **C**: Prompt file contains all descriptions inline | **Strategy A: Using `--ref` parameter** (e.g., baoyu-imagine) @@ -439,8 +454,16 @@ With confirmed prompts from Step 5/6: - Invoke that installed skill via its documented interface, not by calling its scripts directly - For every page, use `prompts/01-page-xxx.md` as the prompt-file input - Save output to `01-page-xxx.png` -- Use aspect ratio `3:4` -- Pass `characters/characters.png` as `--ref` on every page generation +- Use aspect ratio from storyboard (default `3:4`, preset may override) +- Pass `characters/characters.png` (or compressed version) as `--ref` + +**`--ref` failure recovery**: +If generation fails when using `--ref`: +1. **Compress/convert** reference image: + - `sips -s format jpeg -s formatOptions 70 characters.png --out characters-compressed.jpg` + - Or reduce resolution: `sips -Z 1024 characters.png --out characters-small.png` +2. **Retry** with compressed/converted image as `--ref` +3. **If still fails**: Fall back to **Strategy C** — generate WITHOUT `--ref`, with character descriptions embedded in prompt text **Strategy B: Embedding character descriptions in prompt** @@ -458,10 +481,17 @@ When skill does NOT support reference images, create combined prompt files: [Original page prompt here] ``` +**Strategy C: Prompt-only (no character sheet)** + +When character sheet was skipped or `--ref` failed: +- Prompt file already contains all character descriptions inline +- No `--ref` parameter needed +- Rely on detailed text descriptions for character consistency + **For each page (cover + pages)**: 1. Read prompt from `prompts/NN-{cover|page}-[slug].md` 2. **Backup rule**: If image file exists, rename to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png` -3. Generate image using Strategy A or B (based on skill capability) +3. Generate image using Strategy A, B, or C 4. Save to `NN-{cover|page}-[slug].png` 5. Report progress after each generation: "Generated X/N: [page title]" @@ -493,7 +523,7 @@ Title: [title] | Art: [art] | Tone: [tone] | Pages: [count] | Aspect: [ratio] | Watermark: [enabled/disabled] Location: [path] ✓ analysis.md -✓ characters.png +✓ characters.png (if generated) ✓ 00-cover-[slug].png ... NN-page-[slug].png ✓ {topic-slug}.pdf ```