canvas-generate: AI-Orchestrated Canvas Generation
The flagship command. Takes a high-level description and produces a complete, populated canvas.
Read ../canvas/references/template-catalog.md for archetype descriptions.
Read ../canvas/references/media-guide.md for image/SVG/GIF integration.
Read ../canvas/references/mermaid-patterns.md for native diagram options.
Read ../canvas/references/performance-guide.md for node limits.
Pipeline
User: "/canvas generate [description]"
│
▼
1. Analyze description
│
▼
2. Detect archetype
│
▼
3. Plan content (what nodes, what media)
│
▼
4. Generate in parallel:
┌─────────────┬────────────────┐
│ Composer │ Media agent │
│ (text nodes) │ (images/SVGs) │
└──────┬──────┴───────┬────────┘
│ │
▼ ▼
5. Instantiate template with content
│
▼
6. Apply layout algorithm
│
▼
7. Validate + write
Workflow
Step 1: Analyze Description
Parse the user's description to extract:
- Topic: What is the canvas about?
- Purpose: What will it be used for? (presenting, planning, exploring, showcasing)
- Content hints: Any specific items, data, or requirements mentioned?
- Visual requests: Does the user want images, diagrams, or text-only?
Step 2: Detect Archetype
Map the description to one of the 12 template archetypes:
| Keywords in description |
Archetype |
| "presentation", "slides", "deck", "present" |
presentation |
| "flowchart", "process", "workflow", "steps" |
flowchart |
| "mind map", "brainstorm", "ideas", "explore" |
mind-map |
| "gallery", "images", "photos", "showcase" |
gallery |
| "dashboard", "metrics", "KPIs", "status" |
dashboard |
| "storyboard", "scenes", "video", "script" |
storyboard |
| "knowledge graph", "entities", "relationships" |
knowledge-graph |
| "mood board", "inspiration", "aesthetic", "vibe" |
mood-board |
| "timeline", "events", "history", "milestones" |
timeline |
| "comparison", "vs", "compare", "options" |
comparison |
| "kanban", "tasks", "board", "sprint" |
kanban |
| "brief", "kickoff", "project plan", "objectives" |
project-brief |
If the archetype is ambiguous, ask the user to clarify.
Step 3: Plan Content
Based on the archetype and description, plan:
- Node count: How many nodes does this canvas need? (respect <120 target)
- Text content: What text goes in each node?
- Media assets: What images, SVGs, or GIFs are needed?
- Mermaid diagrams: What data visualizations should be embedded as Mermaid?
- Edges: What connections exist between nodes?
Step 4: Generate Content and Media
For simple canvases (text-only, <10 nodes): Generate content inline — no agents needed.
For complex canvases (media required or >10 nodes): Dispatch agents in parallel:
a. Dispatch canvas-composer agent with:
- Archetype name
- Topic description
- Number of text nodes needed
- Any source files for context
b. Dispatch canvas-media agent with (if media requested):
- List of images/SVGs/GIFs needed
- Prompt descriptions for each
- Target dimensions
c. Wait for both agents to complete. Collect their JSON output.
Step 5: Instantiate Template
Use the template engine to create the base canvas:
python3 scripts/canvas_template.py [archetype] [output_path] \
--param title="[topic]" --param [archetype_param]=[count]
Then update each node's content with the composer agent's output using the Edit tool.
If the media agent generated images:
- Add each as a file node inside the appropriate zone/slide
- Use the auto-positioning algorithm or manual placement inside groups
Step 6: Apply Layout
If the template's built-in layout is insufficient (e.g., mind-map needs radial, knowledge-graph needs force), apply the appropriate algorithm:
python3 scripts/canvas_layout.py [output_path] [algorithm]
Step 7: Quality Gate (MANDATORY)
This is the most critical step. A canvas that passes validation but has placeholder text is a FAILURE.
Content check: Read every text node in the canvas. Search for these forbidden strings:
- "Describe this" — replace with real content
- "YYYY-MM-DD" — replace with real dates
- "Content goes here" — replace with real content
- "Value: 0" — replace with realistic values
- "Define this entity" — replace with real definition
- "What happened" — replace with real event
If ANY are found, edit the canvas to replace them before proceeding.
Layout check: Verify the correct layout was applied:
- Mind-map → radial layout (nodes should expand from center, not in a grid)
- Knowledge-graph → force layout (nodes should be organically spread, not in a grid)
- Flowchart → dagre layout (hierarchical top-down or left-right flow)
If the layout looks wrong, run
python3 scripts/canvas_layout.py <path> <algorithm>.
Spacing check: Run validation to catch overlaps:
python3 scripts/canvas_validate.py [output_path]
Must return valid: true with 0 errors and 0 overlap warnings.
Visual scan: Is this canvas something you'd be proud to show? Would a user open it and immediately understand it? If not, improve it.
Only after ALL four checks pass, report success.
Examples
Example 1: Text-Only Dashboard
User: /canvas generate "project dashboard for mobile app launch"
- Archetype: dashboard
- Plan: 4 metric cards (Downloads, DAU, Crashes, Rating), 1 status zone
- Generate content inline (simple, text-only)
- Instantiate:
python3 scripts/canvas_template.py dashboard output.canvas --param title="Mobile App Launch" --param metric_count=4
- Edit metric nodes with specific content
- No layout change needed (grid is fine)
- Validate and report
Example 2: Mood Board with AI Images
User: /canvas generate "mood board for a cyberpunk game"
- Archetype: mood-board
- Plan: 8 image slots, title card with aesthetic description
- Dispatch canvas-composer: write title card content (mood, colors, style)
- Dispatch canvas-media: generate 8 images via
/banana:
- "neon cityscape, cyberpunk, rain, reflections"
- "cyberpunk character portrait, augmented, glowing eyes"
- (6 more themed prompts)
- Instantiate mood-board template
- Replace placeholder text nodes with generated image file nodes
- Validate and report
Example 3: Presentation from Topic
User: /canvas generate "presentation about our Q3 results"
- Archetype: presentation
- Plan: 6 slides (title, overview, revenue, growth, challenges, next steps)
- Dispatch canvas-composer: write 6 slides of content
- Optionally dispatch canvas-media: 1-2 hero images
- Instantiate presentation template with
slide_count=6
- Edit each slide's text with composer output
- Validate and report
Fallback Behavior
| Scenario |
Action |
| User description too vague |
Ask: "What type of canvas? (presentation, mood board, dashboard, etc.)" |
| Archetype detected but uncertain |
Confirm: "I'll create a [archetype] canvas. Sound right?" |
| Media skills not available |
Build text-only canvas, suggest manual image addition |
| Canvas would exceed 120 nodes |
Warn and suggest splitting into sub-canvases |
| Template instantiation fails |
Fall back to manual canvas construction with the orchestrator |
1---2name: canvas-generate3description: AI-orchestrated full canvas generation. Given a description, detects the best archetype, generates content and visuals, instantiates a template, applies layout, and produces a complete canvas. The flagship command. Dispatches canvas-media and canvas-composer agents for parallel asset generation. Triggers on: canvas generate, generate canvas, create a visual board, build me a canvas, make a canvas about, canvas from description, auto-generate canvas, full canvas generation.4---56# canvas-generate: AI-Orchestrated Canvas Generation78The flagship command. Takes a high-level description and produces a complete, populated canvas.910Read `../canvas/references/template-catalog.md` for archetype descriptions.11Read `../canvas/references/media-guide.md` for image/SVG/GIF integration.12Read `../canvas/references/mermaid-patterns.md` for native diagram options.13Read `../canvas/references/performance-guide.md` for node limits.1415---1617## Pipeline1819```20User: "/canvas generate [description]"21 │22 ▼23 1. Analyze description24 │25 ▼26 2. Detect archetype27 │28 ▼29 3. Plan content (what nodes, what media)30 │31 ▼32 4. Generate in parallel:33 ┌─────────────┬────────────────┐34 │ Composer │ Media agent │35 │ (text nodes) │ (images/SVGs) │36 └──────┬──────┴───────┬────────┘37 │ │38 ▼ ▼39 5. Instantiate template with content40 │41 ▼42 6. Apply layout algorithm43 │44 ▼45 7. Validate + write46```4748---4950## Workflow5152### Step 1: Analyze Description5354Parse the user's description to extract:55- **Topic**: What is the canvas about?56- **Purpose**: What will it be used for? (presenting, planning, exploring, showcasing)57- **Content hints**: Any specific items, data, or requirements mentioned?58- **Visual requests**: Does the user want images, diagrams, or text-only?5960### Step 2: Detect Archetype6162Map the description to one of the 12 template archetypes:6364| Keywords in description | Archetype |65|------------------------|-----------|66| "presentation", "slides", "deck", "present" | presentation |67| "flowchart", "process", "workflow", "steps" | flowchart |68| "mind map", "brainstorm", "ideas", "explore" | mind-map |69| "gallery", "images", "photos", "showcase" | gallery |70| "dashboard", "metrics", "KPIs", "status" | dashboard |71| "storyboard", "scenes", "video", "script" | storyboard |72| "knowledge graph", "entities", "relationships" | knowledge-graph |73| "mood board", "inspiration", "aesthetic", "vibe" | mood-board |74| "timeline", "events", "history", "milestones" | timeline |75| "comparison", "vs", "compare", "options" | comparison |76| "kanban", "tasks", "board", "sprint" | kanban |77| "brief", "kickoff", "project plan", "objectives" | project-brief |7879If the archetype is ambiguous, ask the user to clarify.8081### Step 3: Plan Content8283Based on the archetype and description, plan:84- **Node count**: How many nodes does this canvas need? (respect <120 target)85- **Text content**: What text goes in each node?86- **Media assets**: What images, SVGs, or GIFs are needed?87- **Mermaid diagrams**: What data visualizations should be embedded as Mermaid?88- **Edges**: What connections exist between nodes?8990### Step 4: Generate Content and Media9192**For simple canvases** (text-only, <10 nodes): Generate content inline — no agents needed.9394**For complex canvases** (media required or >10 nodes): Dispatch agents in parallel:9596a. **Dispatch canvas-composer agent** with:97 - Archetype name98 - Topic description99 - Number of text nodes needed100 - Any source files for context101102b. **Dispatch canvas-media agent** with (if media requested):103 - List of images/SVGs/GIFs needed104 - Prompt descriptions for each105 - Target dimensions106107c. Wait for both agents to complete. Collect their JSON output.108109### Step 5: Instantiate Template110111Use the template engine to create the base canvas:112113```bash114python3 scripts/canvas_template.py [archetype] [output_path] \115 --param title="[topic]" --param [archetype_param]=[count]116```117118Then update each node's content with the composer agent's output using the Edit tool.119120If the media agent generated images:121- Add each as a file node inside the appropriate zone/slide122- Use the auto-positioning algorithm or manual placement inside groups123124### Step 6: Apply Layout125126If the template's built-in layout is insufficient (e.g., mind-map needs radial, knowledge-graph needs force), apply the appropriate algorithm:127128```bash129python3 scripts/canvas_layout.py [output_path] [algorithm]130```131132### Step 7: Quality Gate (MANDATORY)133134This is the most critical step. A canvas that passes validation but has placeholder text is a FAILURE.1351361. **Content check**: Read every text node in the canvas. Search for these forbidden strings:137 - "Describe this" — replace with real content138 - "YYYY-MM-DD" — replace with real dates139 - "Content goes here" — replace with real content140 - "Value: 0" — replace with realistic values141 - "Define this entity" — replace with real definition142 - "What happened" — replace with real event143 If ANY are found, edit the canvas to replace them before proceeding.1441452. **Layout check**: Verify the correct layout was applied:146 - Mind-map → radial layout (nodes should expand from center, not in a grid)147 - Knowledge-graph → force layout (nodes should be organically spread, not in a grid)148 - Flowchart → dagre layout (hierarchical top-down or left-right flow)149 If the layout looks wrong, run `python3 scripts/canvas_layout.py <path> <algorithm>`.1501513. **Spacing check**: Run validation to catch overlaps:152 ```bash153 python3 scripts/canvas_validate.py [output_path]154 ```155 Must return `valid: true` with 0 errors and 0 overlap warnings.1561574. **Visual scan**: Is this canvas something you'd be proud to show? Would a user open it and immediately understand it? If not, improve it.158159Only after ALL four checks pass, report success.160161---162163## Examples164165### Example 1: Text-Only Dashboard166167User: `/canvas generate "project dashboard for mobile app launch"`1681691. Archetype: dashboard1702. Plan: 4 metric cards (Downloads, DAU, Crashes, Rating), 1 status zone1713. Generate content inline (simple, text-only)1724. Instantiate: `python3 scripts/canvas_template.py dashboard output.canvas --param title="Mobile App Launch" --param metric_count=4`1735. Edit metric nodes with specific content1746. No layout change needed (grid is fine)1757. Validate and report176177### Example 2: Mood Board with AI Images178179User: `/canvas generate "mood board for a cyberpunk game"`1801811. Archetype: mood-board1822. Plan: 8 image slots, title card with aesthetic description1833. Dispatch canvas-composer: write title card content (mood, colors, style)1844. Dispatch canvas-media: generate 8 images via `/banana`:185 - "neon cityscape, cyberpunk, rain, reflections"186 - "cyberpunk character portrait, augmented, glowing eyes"187 - (6 more themed prompts)1885. Instantiate mood-board template1896. Replace placeholder text nodes with generated image file nodes1907. Validate and report191192### Example 3: Presentation from Topic193194User: `/canvas generate "presentation about our Q3 results"`1951961. Archetype: presentation1972. Plan: 6 slides (title, overview, revenue, growth, challenges, next steps)1983. Dispatch canvas-composer: write 6 slides of content1994. Optionally dispatch canvas-media: 1-2 hero images2005. Instantiate presentation template with `slide_count=6`2016. Edit each slide's text with composer output2027. Validate and report203204---205206## Fallback Behavior207208| Scenario | Action |209|----------|--------|210| User description too vague | Ask: "What type of canvas? (presentation, mood board, dashboard, etc.)" |211| Archetype detected but uncertain | Confirm: "I'll create a [archetype] canvas. Sound right?" |212| Media skills not available | Build text-only canvas, suggest manual image addition |213| Canvas would exceed 120 nodes | Warn and suggest splitting into sub-canvases |214| Template instantiation fails | Fall back to manual canvas construction with the orchestrator |