refactor: Reorganize skill numbering and update documentation
Skill Numbering Changes: - 01-03: OurDigital core (was 30-32) - 31-32: Notion tools (was 01-02) - 99_archive: Renamed from _archive for sorting New Files: - AGENTS.md: Claude Code agent routing guide - requirements.txt for 00-claude-code-setting, 32-notion-writer, 43-jamie-youtube-manager Documentation Updates: - CLAUDE.md: Updated skill inventory (23 skills) - AUDIT_REPORT.md: Current completion status (91%) - Archived REFACTORING_PLAN.md (most tasks complete) Removed: - ga-agent-skills/ (moved to separate repo ~/Project/dintel-ga4-agent) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
74
custom-skills/02-ourdigital-designer/code/CLAUDE.md
Normal file
74
custom-skills/02-ourdigital-designer/code/CLAUDE.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## Overview
|
||||
|
||||
Visual storytelling toolkit for OurDigital blog featured images. Creates sophisticated image prompts that capture philosophical depth through minimalist visual metaphors.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Generate image prompt
|
||||
python scripts/generate_prompt.py --topic "AI identity" --mood "contemplative"
|
||||
|
||||
# Calibrate mood parameters
|
||||
python scripts/mood_calibrator.py --input "essay excerpt" --style "minimalist"
|
||||
```
|
||||
|
||||
## Scripts
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `generate_prompt.py` | Generate AI image prompts from essay concepts |
|
||||
| `mood_calibrator.py` | Calibrate emotional parameters for consistency |
|
||||
|
||||
## Prompt Generator
|
||||
|
||||
```bash
|
||||
# Basic generation
|
||||
python scripts/generate_prompt.py --topic "AI identity crisis"
|
||||
|
||||
# With mood and metaphor
|
||||
python scripts/generate_prompt.py \
|
||||
--topic "AI identity crisis" \
|
||||
--mood "contemplative anxiety" \
|
||||
--metaphor "mirror fragments"
|
||||
|
||||
# From essay text
|
||||
python scripts/generate_prompt.py --input essay.txt --auto-extract
|
||||
```
|
||||
|
||||
## Mood Calibrator
|
||||
|
||||
```bash
|
||||
# Analyze text for emotional tone
|
||||
python scripts/mood_calibrator.py --input "essay text"
|
||||
|
||||
# Adjust existing prompt
|
||||
python scripts/mood_calibrator.py \
|
||||
--prompt "existing prompt" \
|
||||
--adjust-warmth 0.3 \
|
||||
--adjust-complexity -0.2
|
||||
```
|
||||
|
||||
## Output Format
|
||||
|
||||
Generated prompts follow OurDigital style:
|
||||
- 1200x630px dimensions (OG standard)
|
||||
- Minimalist vector + subtle textures
|
||||
- 60-30-10 color rule
|
||||
- 20%+ negative space
|
||||
|
||||
## References
|
||||
|
||||
See `references/` for:
|
||||
- `visual_metaphors.md` - Concept to visual mapping
|
||||
- `color_palettes.md` - Emotion to color mapping
|
||||
- `advanced_techniques.md` - Style guidelines
|
||||
|
||||
## Visual Approaches by Essay Type
|
||||
|
||||
| Type | Strategy | Colors |
|
||||
|------|----------|--------|
|
||||
| Technology | Organic-digital hybrids | Cool blues → warm accents |
|
||||
| Social | Network patterns | Desaturated → hope spots |
|
||||
| Philosophy | Zen space, symbols | Monochrome + single accent |
|
||||
@@ -0,0 +1,214 @@
|
||||
# Advanced Visual Techniques
|
||||
|
||||
Sophisticated methods for complex visual narratives.
|
||||
|
||||
## Metaphor Layering
|
||||
|
||||
### Three-Layer Structure
|
||||
```
|
||||
Layer 1: Immediate visual (what viewer sees first)
|
||||
Layer 2: Symbolic meaning (conceptual understanding)
|
||||
Layer 3: Philosophical depth (deeper reflection)
|
||||
|
||||
Example: "Digital Identity Crisis"
|
||||
L1: Fragmented mirror with face
|
||||
L2: Multiple reflections = multiple online personas
|
||||
L3: Question of authentic self in digital age
|
||||
```
|
||||
|
||||
### Transition States
|
||||
Show transformation between concepts:
|
||||
- **Discrete**: Clear before/after states
|
||||
- **Continuous**: Gradient transformation
|
||||
- **Recursive**: Self-referential loops
|
||||
- **Parallel**: Simultaneous states
|
||||
|
||||
## Composition Dynamics
|
||||
|
||||
### Sacred Geometry Applications
|
||||
|
||||
**Golden Spiral**
|
||||
```python
|
||||
# Place key elements along spiral path
|
||||
phi = 1.618
|
||||
spiral_points = [(r * cos(θ), r * sin(θ))
|
||||
where r = phi^(θ/2π)]
|
||||
```
|
||||
|
||||
**Rule of Triangles**
|
||||
- Stable: Base down △
|
||||
- Unstable: Point down ▽
|
||||
- Dynamic: Multiple overlapping
|
||||
|
||||
**Grid Breaking**
|
||||
- Start with rigid grid
|
||||
- Selectively break for emphasis
|
||||
- Maintain overall structure
|
||||
|
||||
### Negative Space as Active Element
|
||||
|
||||
Use empty space to:
|
||||
1. Create secondary images
|
||||
2. Guide eye movement
|
||||
3. Represent absence/loss
|
||||
4. Provide breathing room
|
||||
5. Suggest the ineffable
|
||||
|
||||
## Cultural Symbolism Integration
|
||||
|
||||
### Korean Elements (Subtle)
|
||||
- **Ma (마/間)**: Pregnant emptiness
|
||||
- **Jeong (정)**: Emotional bonds as visual threads
|
||||
- **Han (한)**: Melancholic beauty in shadows
|
||||
- **Nunchi (눈치)**: Implied awareness in composition
|
||||
|
||||
### Western Elements (Structural)
|
||||
- **Bauhaus**: Function drives form
|
||||
- **Swiss Grid**: Underlying order
|
||||
- **Brutalism**: Raw honesty
|
||||
- **Minimalism**: Essential only
|
||||
|
||||
### Fusion Techniques
|
||||
```
|
||||
Korean softness + Western structure =
|
||||
- Geometric forms with organic edges
|
||||
- Grid with breathing spaces
|
||||
- Minimal palette with emotional depth
|
||||
- Clean lines with textural warmth
|
||||
```
|
||||
|
||||
## Texture Integration
|
||||
|
||||
### Digital Textures
|
||||
- **Glitch**: Controlled chaos, disruption
|
||||
- **Grain**: Film nostalgia, warmth
|
||||
- **Pixels**: Digital breakdown, transformation
|
||||
- **Code**: Underlying structure revealed
|
||||
|
||||
### Organic Textures
|
||||
- **Paper**: Tangible, traditional
|
||||
- **Water**: Flow, change, transparency
|
||||
- **Stone**: Permanence, weight
|
||||
- **Cloud**: Ethereal, transient
|
||||
|
||||
### Hybrid Approach
|
||||
```css
|
||||
/* Layer organic over digital */
|
||||
base: clean_vector;
|
||||
overlay: paper_texture at 15% opacity;
|
||||
accent: digital_grain at edges;
|
||||
```
|
||||
|
||||
## Color Psychology Advanced
|
||||
|
||||
### Emotional Journey Mapping
|
||||
```
|
||||
Start → Middle → End
|
||||
Cold Blue → Neutral Gray → Warm Gold
|
||||
(Analysis) → (Process) → (Understanding)
|
||||
```
|
||||
|
||||
### Color Dissonance for Tension
|
||||
- Complementary colors at borders
|
||||
- Unexpected accent in monochrome
|
||||
- Temperature shift for emphasis
|
||||
|
||||
### Cultural Color Codes
|
||||
- Red in Korea: More passionate than West
|
||||
- White in Korea: Death/purity duality
|
||||
- Black: Universal depth, different meanings
|
||||
|
||||
## Temporal Narrative Techniques
|
||||
|
||||
### Static Image, Dynamic Story
|
||||
1. **Past-Present-Future**: Three zones in composition
|
||||
2. **Cycle Representation**: Circular time
|
||||
3. **Erosion/Growth**: Time's effect
|
||||
4. **Palimpsest**: Layers of history
|
||||
|
||||
### Motion Implied in Stillness
|
||||
- Blur suggesting movement
|
||||
- Repetition showing progression
|
||||
- Fragments indicating explosion
|
||||
- Spiral showing evolution
|
||||
|
||||
## Abstraction Gradients
|
||||
|
||||
### Level 1: Recognizable (0.3 abstract)
|
||||
- Clear objects with stylization
|
||||
- Obvious metaphors
|
||||
- Direct symbolism
|
||||
|
||||
### Level 2: Suggestive (0.6 abstract)
|
||||
- Forms hint at objects
|
||||
- Metaphors require thought
|
||||
- Symbolism is layered
|
||||
|
||||
### Level 3: Conceptual (0.9 abstract)
|
||||
- Pure form and color
|
||||
- Metaphors are felt
|
||||
- Symbolism is philosophical
|
||||
|
||||
## Technical Excellence
|
||||
|
||||
### File Optimization
|
||||
```bash
|
||||
# ImageMagick optimization
|
||||
convert input.png \
|
||||
-quality 85 \
|
||||
-strip \
|
||||
-resize 1200x630 \
|
||||
-colorspace sRGB \
|
||||
output.webp
|
||||
```
|
||||
|
||||
### Accessibility Checks
|
||||
- Contrast ratio: minimum 4.5:1
|
||||
- Color-blind safe palettes
|
||||
- Clear focal points
|
||||
- Alternative interpretations valid
|
||||
|
||||
## Prompt Engineering Advanced
|
||||
|
||||
### Complex Concept Formula
|
||||
```
|
||||
[PHILOSOPHICAL CONCEPT] through [NATURAL METAPHOR]
|
||||
+ [TECHNICAL ELEMENT] suggesting [EMOTIONAL JOURNEY]
|
||||
+ [CULTURAL REFERENCE] without cliché
|
||||
+ [TEMPORAL ASPECT] in single frame
|
||||
= Sophisticated visual narrative
|
||||
```
|
||||
|
||||
### Negative Prompting
|
||||
Always include what to avoid:
|
||||
- "No literal representations"
|
||||
- "Avoid tech clichés"
|
||||
- "No stock photo aesthetics"
|
||||
- "Exclude obvious symbols"
|
||||
|
||||
## Quality Evaluation Matrix
|
||||
|
||||
| Aspect | Weight | Evaluation Criteria |
|
||||
|--------|--------|-------------------|
|
||||
| Concept | 30% | Captures essay essence? |
|
||||
| Originality | 25% | Unique perspective? |
|
||||
| Execution | 20% | Technical excellence? |
|
||||
| Emotion | 15% | Evokes intended feeling? |
|
||||
| Timelessness | 10% | Will age well? |
|
||||
|
||||
## Iteration Strategies
|
||||
|
||||
1. **Generate 3 variations**: Different moods
|
||||
2. **A/B test concepts**: Literal vs abstract
|
||||
3. **Color studies**: Warm vs cool
|
||||
4. **Composition alternatives**: Central vs offset
|
||||
|
||||
## Cultural Sensitivity Checklist
|
||||
|
||||
- [ ] Avoids stereotypes
|
||||
- [ ] Respects both traditions
|
||||
- [ ] Universal symbolism
|
||||
- [ ] Inclusive imagery
|
||||
- [ ] Cross-cultural readable
|
||||
|
||||
Remember: Every image is a visual philosophy—not decoration, but thought.
|
||||
@@ -0,0 +1,147 @@
|
||||
# Color Palette Reference
|
||||
|
||||
Emotion-driven color systems for OurDigital visual storytelling.
|
||||
|
||||
## Core Palettes
|
||||
|
||||
### Contemplative Analysis
|
||||
```
|
||||
Primary: #2C3E50 Deep Blue-Gray
|
||||
Secondary: #95A5A6 Cool Gray
|
||||
Accent: #E74C3C Sharp Red
|
||||
Background:#F8F9FA Soft White
|
||||
Usage: Critical thinking, analytical pieces
|
||||
```
|
||||
|
||||
### Hopeful Exploration
|
||||
```
|
||||
Primary: #F39C12 Warm Amber
|
||||
Secondary: #E8E2D5 Soft Beige
|
||||
Accent: #3498DB Sky Blue
|
||||
Background:#FFF9F0 Warm White
|
||||
Usage: Future-oriented, optimistic content
|
||||
```
|
||||
|
||||
### Philosophical Depth
|
||||
```
|
||||
Primary: #1A1A1A Near Black
|
||||
Secondary: #F5F5F5 Off White
|
||||
Accent: #8B7355 Muted Gold
|
||||
Background:#FAFAFA Pure White
|
||||
Usage: Deep thinking, timeless topics
|
||||
```
|
||||
|
||||
### Social Commentary
|
||||
```
|
||||
Primary: #34495E Slate
|
||||
Secondary: #ECF0F1 Cloud
|
||||
Accent: #9B59B6 Purple
|
||||
Background:#F7F8F9 Cool White
|
||||
Usage: Cultural observation, social critique
|
||||
```
|
||||
|
||||
### Digital Anxiety
|
||||
```
|
||||
Primary: #2F3640 Charcoal
|
||||
Secondary: #718093 Grey Blue
|
||||
Accent: #44BD32 Digital Green
|
||||
Background:#F5F6FA Ghost White
|
||||
Usage: Technology concerns, digital culture
|
||||
```
|
||||
|
||||
## Gradient Formulas
|
||||
|
||||
### Dawn (Hope/Beginning)
|
||||
```css
|
||||
linear-gradient(135deg, #667eea 0%, #764ba2 100%)
|
||||
```
|
||||
|
||||
### Dusk (Reflection/End)
|
||||
```css
|
||||
linear-gradient(135deg, #f093fb 0%, #f5576c 100%)
|
||||
```
|
||||
|
||||
### Digital Flow (Technology)
|
||||
```css
|
||||
linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)
|
||||
```
|
||||
|
||||
### Organic (Nature/Human)
|
||||
```css
|
||||
linear-gradient(135deg, #fa709a 0%, #fee140 100%)
|
||||
```
|
||||
|
||||
## Cultural Color Notes
|
||||
|
||||
### Korean Traditional (오방색)
|
||||
- **청 (Blue-Green)**: #0C7B93 - Future, technology
|
||||
- **적 (Red)**: #C0392B - Warning, passion
|
||||
- **황 (Yellow)**: #F1C40F - Center, balance
|
||||
- **백 (White)**: #FFFFFF - Beginning, void
|
||||
- **흑 (Black)**: #000000 - Depth, unknown
|
||||
|
||||
### Modern Minimal
|
||||
- **Primary**: Single strong color
|
||||
- **Support**: 90% grayscale
|
||||
- **Accent**: 10% vibrant touch
|
||||
|
||||
## Emotional Temperature Map
|
||||
|
||||
| Cool → Warm Scale | Hex Code | Emotional State |
|
||||
|------------------|----------|-----------------|
|
||||
| Ice | #E3F2FD | Detached analysis |
|
||||
| Cold | #90CAF9 | Objective observation |
|
||||
| Cool | #64B5F6 | Calm reflection |
|
||||
| Neutral | #42A5F5 | Balanced view |
|
||||
| Warm | #FFA726 | Human connection |
|
||||
| Hot | #FF7043 | Passionate engagement |
|
||||
| Fire | #F4511E | Urgent concern |
|
||||
|
||||
## Accessibility Combinations
|
||||
|
||||
### High Contrast (WCAG AAA)
|
||||
- Black (#000000) on White (#FFFFFF)
|
||||
- White (#FFFFFF) on Black (#000000)
|
||||
- Dark Blue (#003366) on Light Yellow (#FFFFCC)
|
||||
|
||||
### Medium Contrast (WCAG AA)
|
||||
- Charcoal (#333333) on Light Gray (#F5F5F5)
|
||||
- Navy (#2C3E50) on Cream (#FFF8DC)
|
||||
|
||||
## Application Rules
|
||||
|
||||
1. **60-30-10 Rule**
|
||||
- 60% dominant color (usually neutral)
|
||||
- 30% secondary color (supporting)
|
||||
- 10% accent color (attention)
|
||||
|
||||
2. **Mood Matching**
|
||||
- Technical → Cool spectrum
|
||||
- Emotional → Warm spectrum
|
||||
- Philosophical → Monochrome
|
||||
- Social → Mixed temperature
|
||||
|
||||
3. **Cultural Balance**
|
||||
- Western: High contrast, bold
|
||||
- Korean: Subtle gradation, harmony
|
||||
- Fusion: Selective contrast points
|
||||
|
||||
## Quick Selection Matrix
|
||||
|
||||
| Essay Type | Primary | Accent | Mood |
|
||||
|------------|---------|---------|------|
|
||||
| AI Ethics | Cool Gray | Red | Caution |
|
||||
| Digital Culture | Blue-Gray | Green | Technical |
|
||||
| Social Media | Desaturated | Purple | Critical |
|
||||
| Philosophy | Monochrome | Gold | Timeless |
|
||||
| Future Tech | Blue | Orange | Optimistic |
|
||||
| Cultural | Earth | Red | Grounded |
|
||||
|
||||
## Seasonal Adjustments
|
||||
|
||||
- **Spring**: Fresh greens, light blues
|
||||
- **Summer**: Vibrant, high saturation
|
||||
- **Autumn**: Warm earth tones
|
||||
- **Winter**: Cool, desaturated
|
||||
|
||||
Use colors intentionally—each hue carries meaning.
|
||||
@@ -0,0 +1,101 @@
|
||||
# Visual Metaphor Dictionary
|
||||
|
||||
Quick reference for translating abstract concepts into visual elements.
|
||||
|
||||
## Technology & Digital
|
||||
|
||||
| Concept | Primary Metaphor | Alternative Visuals |
|
||||
|---------|-----------------|-------------------|
|
||||
| Algorithm | Constellation patterns | Maze structures, flow charts as art |
|
||||
| AI | Crystalline growth | Mirror reflections, fractal patterns |
|
||||
| Data | Water flow, particles | Bird murmurations, sand grains |
|
||||
| Network | Root systems | Neural pathways, spider silk, web |
|
||||
| Code | Musical notation | DNA strands, city blueprints |
|
||||
| Cloud | Atmospheric forms | Floating islands, ethereal spaces |
|
||||
| Privacy | Veils, shadows | One-way mirrors, fog, barriers |
|
||||
| Security | Locks dissolving | Fortresses becoming permeable |
|
||||
| Automation | Clockwork organic | Self-assembling structures |
|
||||
| Virtual | Layers of reality | Parallel dimensions, glass planes |
|
||||
|
||||
## Social & Cultural
|
||||
|
||||
| Concept | Primary Metaphor | Alternative Visuals |
|
||||
|---------|-----------------|-------------------|
|
||||
| Identity | Layered masks | Fingerprints merging, mirrors |
|
||||
| Community | Overlapping circles | Shared spaces, woven threads |
|
||||
| Isolation | Islands in fog | Glass barriers, empty chairs |
|
||||
| Communication | Bridge structures | Echo patterns, light beams |
|
||||
| Conflict | Opposing forces | Tectonic plates, storm systems |
|
||||
| Harmony | Resonance patterns | Orchestra arrangements, balance |
|
||||
| Culture | Textile patterns | Layered sediments, palimpsest |
|
||||
| Tradition | Tree rings | Ancient stones, inherited objects |
|
||||
| Change | Metamorphosis | Phase transitions, seasonal cycles |
|
||||
| Power | Pyramids inverting | Current flows, gravity wells |
|
||||
|
||||
## Philosophical & Abstract
|
||||
|
||||
| Concept | Primary Metaphor | Alternative Visuals |
|
||||
|---------|-----------------|-------------------|
|
||||
| Time | Spirals, loops | Sediment layers, clock dissolution |
|
||||
| Knowledge | Light sources | Growing trees, opening books |
|
||||
| Wisdom | Mountain vistas | Deep waters, ancient libraries |
|
||||
| Truth | Clear water | Prisms splitting light, unveiled |
|
||||
| Illusion | Distorted mirrors | Smoke shapes, double images |
|
||||
| Choice | Diverging paths | Doors opening, quantum splits |
|
||||
| Balance | Tensegrity | Scales reimagined, equilibrium |
|
||||
| Paradox | Möbius strips | Impossible objects, Escher-like |
|
||||
| Existence | Breath patterns | Pulse rhythms, presence/absence |
|
||||
| Consciousness | Nested awareness | Recursive mirrors, awakening |
|
||||
|
||||
## Emotional States
|
||||
|
||||
| Emotion | Visual Translation | Color Association |
|
||||
|---------|-------------------|------------------|
|
||||
| Anxiety | Fragmented grids | Desaturated, glitch |
|
||||
| Hope | Light breaking through | Warm gradients |
|
||||
| Melancholy | Soft dissolution | Muted blues, grays |
|
||||
| Joy | Expansion patterns | Bright, ascending |
|
||||
| Fear | Contracting spaces | Sharp contrasts |
|
||||
| Peace | Still water | Soft neutrals |
|
||||
| Confusion | Tangled lines | Overlapping hues |
|
||||
| Clarity | Clean geometry | Pure, minimal |
|
||||
|
||||
## Transformation & Process
|
||||
|
||||
| Process | Visual Narrative | Symbolic Elements |
|
||||
|---------|------------------|------------------|
|
||||
| Growth | Seeds → trees | Fibonacci spirals |
|
||||
| Decay | Entropy patterns | Rust, dissolution |
|
||||
| Evolution | Branching forms | Darwin's tree reimagined |
|
||||
| Revolution | Circles breaking | Shattered patterns |
|
||||
| Innovation | Spark → flame | Lightning, fusion |
|
||||
| Tradition | Continuous thread | Inherited patterns |
|
||||
| Disruption | Broken grids | Glitch aesthetics |
|
||||
| Integration | Merging streams | Confluence points |
|
||||
|
||||
## Korean-Western Fusion Elements
|
||||
|
||||
| Korean Element | Western Parallel | Fusion Approach |
|
||||
|---------------|-----------------|-----------------|
|
||||
| 여백 (Empty space) | Negative space | Active emptiness |
|
||||
| 오방색 (Five colors) | Color theory | Symbolic palette |
|
||||
| 달항아리 (Moon jar) | Minimalism | Imperfect circles |
|
||||
| 한글 geometry | Typography | Structural letters |
|
||||
| 산수화 (Landscape) | Abstract landscape | Atmospheric depth |
|
||||
| 전통문양 (Patterns) | Geometric design | Cultural geometry |
|
||||
|
||||
## Usage Notes
|
||||
|
||||
1. **Layer metaphors**: Combine 2-3 for depth
|
||||
2. **Avoid clichés**: No obvious tech symbols
|
||||
3. **Cultural sensitivity**: Universal over specific
|
||||
4. **Abstraction levels**: Match essay tone
|
||||
5. **Emotional resonance**: Feel over literal
|
||||
|
||||
## Quick Selection Guide
|
||||
|
||||
For **technology essays**: organic-digital hybrids
|
||||
For **social commentary**: human elements in systems
|
||||
For **philosophy pieces**: space and light
|
||||
For **cultural topics**: layered traditions
|
||||
For **future themes**: transformation states
|
||||
@@ -0,0 +1,211 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
OurDigital Visual Storytelling Prompt Generator
|
||||
Generates sophisticated image prompts for blog featured images
|
||||
"""
|
||||
|
||||
import argparse
|
||||
from typing import Dict, Tuple
|
||||
import json
|
||||
|
||||
class VisualPromptGenerator:
|
||||
def __init__(self):
|
||||
self.style_base = (
|
||||
"sophisticated featured image, minimalist contemporary design, "
|
||||
"clean vector illustration with subtle texture overlays, "
|
||||
"1200x630px, suitable for blog header"
|
||||
)
|
||||
|
||||
self.moods = {
|
||||
"contemplative": "contemplative and introspective atmosphere, zen-like calm",
|
||||
"critical": "analytical precision with underlying urgency, sharp clarity",
|
||||
"hopeful": "dawn breaking through uncertainty, warm optimism",
|
||||
"anxious": "subtle tension and uncertainty, digital unease",
|
||||
"philosophical": "deep meditation quality, timeless wisdom"
|
||||
}
|
||||
|
||||
self.color_palettes = {
|
||||
"contemplative": "monochrome palette with single accent color",
|
||||
"critical": "cool blue-gray with sharp red accents",
|
||||
"hopeful": "warm amber gradients with sky blue highlights",
|
||||
"anxious": "desaturated colors with digital green touches",
|
||||
"philosophical": "near black and off-white with muted gold"
|
||||
}
|
||||
|
||||
self.metaphor_types = {
|
||||
"technology": "organic-digital hybrid forms, natural systems becoming circuits",
|
||||
"identity": "layered masks, fragmented mirrors, dissolving boundaries",
|
||||
"network": "root systems, neural pathways, constellation patterns",
|
||||
"transformation": "metamorphosis states, particle dissolution, phase transitions",
|
||||
"knowledge": "light sources, growing trees, prismatic refractions"
|
||||
}
|
||||
|
||||
def generate_prompt(
|
||||
self,
|
||||
topic: str,
|
||||
mood: str = "contemplative",
|
||||
metaphor: str = None,
|
||||
cultural_fusion: float = 0.6,
|
||||
abstract_level: float = 0.8
|
||||
) -> str:
|
||||
"""
|
||||
Generate a sophisticated image prompt for OurDigital blog
|
||||
|
||||
Args:
|
||||
topic: Main subject of the blog post
|
||||
mood: Emotional tone (contemplative/critical/hopeful/anxious/philosophical)
|
||||
metaphor: Visual metaphor to use
|
||||
cultural_fusion: Balance of Korean-Western aesthetics (0-1)
|
||||
abstract_level: Level of abstraction (0=literal, 1=highly abstract)
|
||||
"""
|
||||
|
||||
# Build core prompt
|
||||
prompt_parts = [
|
||||
f"Create a {self.style_base} for blog post about {topic}.",
|
||||
""
|
||||
]
|
||||
|
||||
# Add visual concept
|
||||
if metaphor:
|
||||
prompt_parts.append(f"Visual concept: {metaphor}.")
|
||||
else:
|
||||
prompt_parts.append(f"Visual concept: Abstract representation of {topic}.")
|
||||
|
||||
prompt_parts.append("")
|
||||
|
||||
# Add mood and atmosphere
|
||||
mood_desc = self.moods.get(mood, self.moods["contemplative"])
|
||||
prompt_parts.append(f"Atmosphere: {mood_desc}.")
|
||||
|
||||
# Add color palette
|
||||
colors = self.color_palettes.get(mood, self.color_palettes["contemplative"])
|
||||
prompt_parts.append(f"Colors: {colors}.")
|
||||
|
||||
# Add composition guidelines
|
||||
prompt_parts.extend([
|
||||
"",
|
||||
"Composition:",
|
||||
f"- {'Highly abstract' if abstract_level > 0.7 else 'Semi-abstract'} interpretation",
|
||||
f"- Minimum 20% negative space for contemplative breathing room",
|
||||
f"- Asymmetrical balance with {'strong' if abstract_level > 0.5 else 'subtle'} geometric structure"
|
||||
])
|
||||
|
||||
# Add cultural elements if needed
|
||||
if cultural_fusion > 0.3:
|
||||
fusion_level = "subtle" if cultural_fusion < 0.6 else "balanced"
|
||||
prompt_parts.append(
|
||||
f"- {fusion_level} integration of Korean minimalist aesthetics with Western modernism"
|
||||
)
|
||||
|
||||
# Add quality notes
|
||||
prompt_parts.extend([
|
||||
"",
|
||||
"Technical notes:",
|
||||
"- Ensure clarity at thumbnail size (200px)",
|
||||
"- Avoid tech clichés (circuits, binary codes)",
|
||||
"- No stock photo aesthetics or literal interpretations",
|
||||
"- Timeless design that won't date quickly"
|
||||
])
|
||||
|
||||
# Add reference
|
||||
prompt_parts.extend([
|
||||
"",
|
||||
"Aesthetic reference: Combine Bauhaus principles with Agnes Martin's contemplative minimalism."
|
||||
])
|
||||
|
||||
return "\n".join(prompt_parts)
|
||||
|
||||
def generate_variations(self, topic: str, count: int = 3) -> list:
|
||||
"""Generate multiple prompt variations for the same topic"""
|
||||
variations = []
|
||||
moods = ["contemplative", "critical", "philosophical"]
|
||||
|
||||
for i in range(min(count, len(moods))):
|
||||
prompt = self.generate_prompt(
|
||||
topic=topic,
|
||||
mood=moods[i],
|
||||
abstract_level=0.7 + (i * 0.1)
|
||||
)
|
||||
variations.append({
|
||||
"variation": i + 1,
|
||||
"mood": moods[i],
|
||||
"prompt": prompt
|
||||
})
|
||||
|
||||
return variations
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate visual prompts for OurDigital blog featured images"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--topic",
|
||||
required=True,
|
||||
help="Main topic/subject of the blog post"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--mood",
|
||||
choices=["contemplative", "critical", "hopeful", "anxious", "philosophical"],
|
||||
default="contemplative",
|
||||
help="Emotional tone of the image"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--metaphor",
|
||||
help="Specific visual metaphor to use"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cultural-fusion",
|
||||
type=float,
|
||||
default=0.6,
|
||||
help="Korean-Western aesthetic balance (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--abstract",
|
||||
type=float,
|
||||
default=0.8,
|
||||
help="Level of abstraction (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--variations",
|
||||
type=int,
|
||||
help="Generate N variations of the prompt"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--json",
|
||||
action="store_true",
|
||||
help="Output as JSON"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
generator = VisualPromptGenerator()
|
||||
|
||||
if args.variations:
|
||||
results = generator.generate_variations(args.topic, args.variations)
|
||||
if args.json:
|
||||
print(json.dumps(results, indent=2, ensure_ascii=False))
|
||||
else:
|
||||
for var in results:
|
||||
print(f"\n--- Variation {var['variation']} ({var['mood']}) ---")
|
||||
print(var['prompt'])
|
||||
else:
|
||||
prompt = generator.generate_prompt(
|
||||
topic=args.topic,
|
||||
mood=args.mood,
|
||||
metaphor=args.metaphor,
|
||||
cultural_fusion=args.cultural_fusion,
|
||||
abstract_level=args.abstract
|
||||
)
|
||||
|
||||
if args.json:
|
||||
result = {
|
||||
"topic": args.topic,
|
||||
"mood": args.mood,
|
||||
"prompt": prompt
|
||||
}
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
else:
|
||||
print(prompt)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,251 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
OurDigital Mood Calibrator
|
||||
Fine-tune emotional and stylistic parameters for visual prompts
|
||||
"""
|
||||
|
||||
import json
|
||||
from typing import Dict, Any
|
||||
import argparse
|
||||
|
||||
class MoodCalibrator:
|
||||
def __init__(self):
|
||||
self.presets = {
|
||||
"default": {
|
||||
"contemplative_depth": 0.8,
|
||||
"cultural_fusion": 0.6,
|
||||
"technical_precision": 0.7,
|
||||
"emotional_weight": 0.5,
|
||||
"innovation_index": 0.7
|
||||
},
|
||||
"philosophical_essay": {
|
||||
"contemplative_depth": 0.95,
|
||||
"cultural_fusion": 0.7,
|
||||
"technical_precision": 0.6,
|
||||
"emotional_weight": 0.3,
|
||||
"innovation_index": 0.8
|
||||
},
|
||||
"technical_analysis": {
|
||||
"contemplative_depth": 0.6,
|
||||
"cultural_fusion": 0.4,
|
||||
"technical_precision": 0.9,
|
||||
"emotional_weight": 0.3,
|
||||
"innovation_index": 0.6
|
||||
},
|
||||
"social_commentary": {
|
||||
"contemplative_depth": 0.7,
|
||||
"cultural_fusion": 0.6,
|
||||
"technical_precision": 0.5,
|
||||
"emotional_weight": 0.7,
|
||||
"innovation_index": 0.7
|
||||
},
|
||||
"cultural_exploration": {
|
||||
"contemplative_depth": 0.8,
|
||||
"cultural_fusion": 0.9,
|
||||
"technical_precision": 0.4,
|
||||
"emotional_weight": 0.6,
|
||||
"innovation_index": 0.8
|
||||
}
|
||||
}
|
||||
|
||||
self.parameter_descriptions = {
|
||||
"contemplative_depth": "Level of abstraction (0=literal, 1=highly abstract)",
|
||||
"cultural_fusion": "Balance of Korean-Western aesthetics (0=Western only, 1=Korean dominant)",
|
||||
"technical_precision": "Clean geometric vs organic forms (0=organic, 1=geometric)",
|
||||
"emotional_weight": "Mood intensity (0=neutral, 1=heavy atmosphere)",
|
||||
"innovation_index": "Traditional vs experimental approach (0=traditional, 1=experimental)"
|
||||
}
|
||||
|
||||
def calibrate(self, preset: str = "default", **overrides) -> Dict[str, float]:
|
||||
"""
|
||||
Get calibrated mood parameters
|
||||
|
||||
Args:
|
||||
preset: Base preset to use
|
||||
**overrides: Specific parameter overrides
|
||||
|
||||
Returns:
|
||||
Dictionary of calibrated parameters
|
||||
"""
|
||||
params = self.presets.get(preset, self.presets["default"]).copy()
|
||||
|
||||
# Apply overrides
|
||||
for key, value in overrides.items():
|
||||
if key in params:
|
||||
params[key] = max(0, min(1, value)) # Clamp to 0-1
|
||||
|
||||
return params
|
||||
|
||||
def generate_modifier_text(self, params: Dict[str, float]) -> str:
|
||||
"""
|
||||
Generate text modifiers based on parameters
|
||||
|
||||
Args:
|
||||
params: Dictionary of mood parameters
|
||||
|
||||
Returns:
|
||||
Text description for prompt modification
|
||||
"""
|
||||
modifiers = []
|
||||
|
||||
# Contemplative depth
|
||||
if params["contemplative_depth"] > 0.8:
|
||||
modifiers.append("highly abstract and philosophical")
|
||||
elif params["contemplative_depth"] > 0.6:
|
||||
modifiers.append("semi-abstract with symbolic elements")
|
||||
else:
|
||||
modifiers.append("grounded with recognizable forms")
|
||||
|
||||
# Cultural fusion
|
||||
if params["cultural_fusion"] > 0.7:
|
||||
modifiers.append("strong Korean aesthetic influence")
|
||||
elif params["cultural_fusion"] > 0.4:
|
||||
modifiers.append("balanced East-West aesthetic fusion")
|
||||
else:
|
||||
modifiers.append("Western minimalist approach")
|
||||
|
||||
# Technical precision
|
||||
if params["technical_precision"] > 0.7:
|
||||
modifiers.append("precise geometric construction")
|
||||
elif params["technical_precision"] > 0.4:
|
||||
modifiers.append("blend of geometric and organic")
|
||||
else:
|
||||
modifiers.append("flowing organic forms")
|
||||
|
||||
# Emotional weight
|
||||
if params["emotional_weight"] > 0.7:
|
||||
modifiers.append("heavy, contemplative atmosphere")
|
||||
elif params["emotional_weight"] > 0.4:
|
||||
modifiers.append("balanced emotional tone")
|
||||
else:
|
||||
modifiers.append("light, open feeling")
|
||||
|
||||
# Innovation index
|
||||
if params["innovation_index"] > 0.7:
|
||||
modifiers.append("experimental and avant-garde")
|
||||
elif params["innovation_index"] > 0.4:
|
||||
modifiers.append("contemporary with classic elements")
|
||||
else:
|
||||
modifiers.append("timeless and traditional")
|
||||
|
||||
return ", ".join(modifiers)
|
||||
|
||||
def suggest_color_temperature(self, params: Dict[str, float]) -> str:
|
||||
"""
|
||||
Suggest color temperature based on parameters
|
||||
|
||||
Args:
|
||||
params: Dictionary of mood parameters
|
||||
|
||||
Returns:
|
||||
Color temperature suggestion
|
||||
"""
|
||||
emotional = params.get("emotional_weight", 0.5)
|
||||
technical = params.get("technical_precision", 0.7)
|
||||
|
||||
if emotional > 0.6:
|
||||
if technical > 0.6:
|
||||
return "Cool palette with strategic warm accents"
|
||||
else:
|
||||
return "Warm, earthy tones with depth"
|
||||
else:
|
||||
if technical > 0.6:
|
||||
return "Neutral grays with single accent color"
|
||||
else:
|
||||
return "Soft, desaturated natural colors"
|
||||
|
||||
def export_for_prompt(self, params: Dict[str, float]) -> Dict[str, Any]:
|
||||
"""
|
||||
Export parameters in a format ready for prompt generation
|
||||
|
||||
Args:
|
||||
params: Dictionary of mood parameters
|
||||
|
||||
Returns:
|
||||
Formatted export for prompt generation
|
||||
"""
|
||||
return {
|
||||
"parameters": params,
|
||||
"modifiers": self.generate_modifier_text(params),
|
||||
"color_temperature": self.suggest_color_temperature(params),
|
||||
"abstraction_level": params["contemplative_depth"],
|
||||
"cultural_balance": params["cultural_fusion"]
|
||||
}
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Calibrate mood parameters for OurDigital visual prompts"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--preset",
|
||||
choices=["default", "philosophical_essay", "technical_analysis",
|
||||
"social_commentary", "cultural_exploration"],
|
||||
default="default",
|
||||
help="Base preset to use"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--contemplative-depth",
|
||||
type=float,
|
||||
help="Override contemplative depth (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cultural-fusion",
|
||||
type=float,
|
||||
help="Override cultural fusion (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--technical-precision",
|
||||
type=float,
|
||||
help="Override technical precision (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--emotional-weight",
|
||||
type=float,
|
||||
help="Override emotional weight (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--innovation-index",
|
||||
type=float,
|
||||
help="Override innovation index (0-1)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--export",
|
||||
action="store_true",
|
||||
help="Export full configuration for prompt generation"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
calibrator = MoodCalibrator()
|
||||
|
||||
# Build overrides
|
||||
overrides = {}
|
||||
if args.contemplative_depth is not None:
|
||||
overrides["contemplative_depth"] = args.contemplative_depth
|
||||
if args.cultural_fusion is not None:
|
||||
overrides["cultural_fusion"] = args.cultural_fusion
|
||||
if args.technical_precision is not None:
|
||||
overrides["technical_precision"] = args.technical_precision
|
||||
if args.emotional_weight is not None:
|
||||
overrides["emotional_weight"] = args.emotional_weight
|
||||
if args.innovation_index is not None:
|
||||
overrides["innovation_index"] = args.innovation_index
|
||||
|
||||
# Calibrate
|
||||
params = calibrator.calibrate(args.preset, **overrides)
|
||||
|
||||
if args.export:
|
||||
export = calibrator.export_for_prompt(params)
|
||||
print(json.dumps(export, indent=2, ensure_ascii=False))
|
||||
else:
|
||||
print(f"Calibrated Parameters for '{args.preset}':")
|
||||
print("-" * 50)
|
||||
for key, value in params.items():
|
||||
desc = calibrator.parameter_descriptions[key]
|
||||
print(f"{key}: {value:.2f} - {desc}")
|
||||
print("-" * 50)
|
||||
print(f"Modifiers: {calibrator.generate_modifier_text(params)}")
|
||||
print(f"Color Temperature: {calibrator.suggest_color_temperature(params)}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,5 @@
|
||||
# 30-ourdigital-designer dependencies
|
||||
openai>=1.0.0
|
||||
python-dotenv>=1.0.0
|
||||
rich>=13.7.0
|
||||
typer>=0.9.0
|
||||
Reference in New Issue
Block a user