SKILL: Lofn Vision — Image Prompt Writer

SkillMedia

Run Lofn image/vision pipeline steps, visual prompt generation, render prompt packaging, and image competition prompt work. Do NOT use for music lyrics, QA audit, or evaluator ranking.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the SKILL: Lofn Vision — Image Prompt Writer skill

What this skill tells your AI

The instructions your AI receives, as published by localsymmetry/lofn in skills/image/SKILL.md and read by ahel’s review.

⛔ YOU DO NOT RENDER IMAGES

lofn-vision writes image prompts (for FAL/Flux/GPT Image/Gemini). It does NOT call any image generation API or tool.

Do NOT use: image_generate, fal, flux, or any image generation tool. Do NOT attempt to produce image files.

Your output is: .md files containing final ranked prompts ready for rendering. The main session or cron agent handles actual FAL/GPT Image/Gemini API calls.


🔴 AGENT SAVE-OUT PROTOCOL — MANDATORY

Every subagent must save artifacts to disk at EACH major pipeline step, not just at the end. If an agent times out or the session resets, partial work must already be on disk.

Write step files (step00_*.md, step01_*.md, etc.) as you complete them. Never hold all output in memory for a single final write. This was the #1 cause of lost pipeline work in music and applies equally to vision.


🔗 CREATIVE CONTEXT — FULL CONTEXT INJECTION (MANDATORY)

Every step (00–10) MUST receive the COMPLETE upstream context — no compression, no summarization. The orchestrator fills OVERALL_PROMPT_TEMPLATE.md once from its handoff artifacts (02_golden_seed.md, 03_orchestrator_panel_debate.md, 04_orchestrator_metaprompt.md, 06_vision_handoff.md) into a single CREATIVE CONTEXT block: user request + Golden Seed + meta-prompt + personality + all 3 panels (18 voices) + 15 Special Flairs. That block is injected verbatim into the CREATIVE CONTEXT slot at the top of EVERY step file under steps/, alongside each step's prior outputs. Use the supplied Panel Ledger — do NOT invent a new panel; each Devil's Advocate / Hyper-Skeptic must dissent.


🔴 SPLIT-STEP AGENT ARCHITECTURE

Do not use the legacy lofn-vision agent for Steps 06-10. Use dedicated step agents:

StepAgent IDModel
00-05lofn-vision-coordinatordeepseek/deepseek-v4-pro
06lofn-vision-step06openrouter/qwen/qwen3.7-max
07lofn-vision-step07openrouter/qwen/qwen3.7-max
08lofn-vision-step08openrouter/qwen/qwen3.7-max
09lofn-vision-step09openrouter/qwen/qwen3.7-max
10lofn-vision-step10deepseek/deepseek-v4-pro
11lofn-vision-step11openai/gpt-5.5

Full spec: vault/VISION_MODEL_ASSIGNMENTS.md


🧬 PERSONALITY INJECTION MANDATE

Every creative pipeline task MUST receive the target personality's full DNA block — not just a name reference like "use the Solarium voice."

Saying "voice = X" or "style = Y" is insufficient — subagents default to Lofn's system-context personality. The personality block MUST include: visual identity, palette authority, material obsession, composition signature, and core aesthetic beliefs.

Inject this block at EVERY stage: seed, orchestrator, vision coordinator, pair agents, step11. Without injection: Lofn bleed. With injection: target visual identity.


🔴 PIPELINE POSITION: PHASE 2 — YOU ARE NOT FIRST

The correct pipeline order is: Research → Lofn-Core → Orchestrator → YOU → QA

You should be receiving an orchestrator-metaprompt.md and orchestrator-brief.md before you run. If you do not have these files in your output directory:

  • Check if core-brief.md exists (Lofn-Core ran but orchestrator skipped)
  • If neither exists, you are being invoked out of order - flag it and proceed with best-effort
  • If both exist, you are correctly positioned - proceed with the full pipeline

Lofn-Core's job: seed + research. Orchestrator's job: panel + personality + metaprompt. Your job: steps 00-10, per-pair execution, renders.


🔴 PRE-CREATIVE ORCHESTRATOR PACKET GATE

Before this modality agent begins Step 00, it must validate a real Lofn-Core + orchestrator packet with:

python3 /data/.openclaw/workspace/scripts/validate_orchestrator_packet.py <run_dir>

The packet must use the original Lofn panel-object structure: Special Flairs, Concept Panel, Medium Panel, and Context & Marketing Panel, each with a Devil's Advocate / Hyper-Skeptic adversarial role. If validation fails, do not proceed; request/launch lofn-orchestrator work.

Every canonical step artifact must use /data/.openclaw/workspace/scripts/lofn_step_artifact_template.md and pass validate_with_retries.py before the next step.


⚡ MANDATORY SUBAGENT SPLIT ARCHITECTURE

YOU MUST ALWAYS USE THIS PATTERN. Never run all 10 steps in a single agent.

See TASK_TEMPLATE.md for the full specification. Summary:

When spawned as the "vision coordinator":

  1. Run steps 00-05 ONLY → produce concept_medium_pairs.json
  2. Report back to main session with the 6 pairs
  3. Main session spawns 6 parallel pair subagents (steps 06-10, one per pair)

When spawned as a "pair agent" (steps 06-10):

  • You will receive ONE concept-medium pair via the lean pair-agent input standard in /data/.openclaw/workspace/vault/LEAN_PAIR_AGENT_INPUT_STANDARD.md
  • Run steps 06-10 for that pair only
  • Output 4 final prompts to step10_final_pair{N}.md
  • Return prompts as completion message

Spawn Pattern (one step at a time, proven in music):

After Step 05 completes:

  1. Spawn up to 5 pair agents for Step 06 only using lofn-vision-step06
  2. Verify files on disk. Validate. Then spawn Step 07 agents using lofn-vision-step07
  3. Continue one step at a time through Step 10
  4. Step 11 enhancement uses lofn-vision-step11

Why one step at a time: Running Step 06-10 in a single agent per pair was the #1 cause of timeout churn and template collapse in music. The split per step prevents context exhaustion and gives each phase its own model-reset call.

Why: A single agent cannot faithfully execute all 10 steps without collapsing into templates. This was proven across 3 failed runs (2026-03-30). The split is the fix. It matches the original Lofn ui.py architecture exactly.

Stricter correction (2026-05-20): The split alone is not enough. Each numbered step must be a separate model call with a separate canonical artifact. Coordinator summary files and per-pair omnibus files are pipeline violations.

Lean pair-input correction (2026-05-21): Pair agents must not be handed the whole upstream packet by default. The parent/controller validates the full packet, then gives each image/art pair agent a compact 50–100 line brief: compact Golden Seed operating excerpt, Step 05 artifact, concept_medium_pairs.json, one pair assignment excerpt, image Step 06–10 contract, tiny provenance block, and visual/model/safety blockers. This is mandatory for art/image pair work.

PREREQUISITES: 0. Load resources/panel-of-experts.md to understand the panel of experts prompting you will use.

  1. Load skills/lofn-core/SKILL.md for personality and Panel system.
  2. Load skills/lofn-core/refs/PIPELINE.md for the MANDATORY execution pipeline.
  3. Load skills/lofn-core/OUTPUT.md for the MANDATORY artifact saving format.
  4. Load skills/image/TASK_TEMPLATE.md for exact output requirements. 4a. For pair-agent spawning or pair-agent execution, load /data/.openclaw/workspace/vault/LEAN_PAIR_AGENT_INPUT_STANDARD.md and use the compact pair brief; do not load the full upstream packet into ordinary pair agents.
  5. For seeds: read skills/lofn-core/GOLDEN_SEEDS_INDEX.md first (2KB), then read only the 3-4 most relevant seeds from skills/lofn-core/refs/GOLDEN_SEEDS.md using offset/limit.

Pipeline step files are in skills/image/steps/ - load only the step you are currently running.

⚠️ EVERY image generation MUST follow the full pipeline: 10 steps, 3 panels, 6 pairs × 4 outputs = 24 prompts minimum. Then select the best N to return. No shortcuts.


🎨 PURPOSE

Transform visual concepts into award-winning images. This skill executes the Lofn image pipeline from orchestrator metaprompt through final generation.


🎲 RANDOM INJECTION (MANDATORY PRE-STEP)

Before executing Step 00, run the random injection script to populate creative seeds:

node /root/.openclaw/workspace/scripts/random-injection.cjs image 50

This returns JSON with:

  • aesthetics - 50 random items from the master list (3000+ aesthetics)
  • frames - 50 random items from frames.csv (1273 framing techniques)
  • film_styles - 25 random film styles for cinematic language

Inject these into Step 00's placeholders:

  • {injected_aesthetics} → comma-separated aesthetics list
  • {injected_frames} → comma-separated frames list

This "shakes up the creative space" by ensuring every run explores different corners of the aesthetic universe.


📊 PIPELINE OVERVIEW

StepFileOutput
0000_Generate_Image_Aesthetics_And_Genres.md50 aesthetics, 50 emotions, 50 frames, 50 genres
0101_Generate_Image_Essence_And_Facets.mdEssence + 10 style axes + 5 facets
0202_Generate_Image_Concepts.md12 distinct concepts
0303_Generate_Image_Artist_And_Critique.mdArtist influence + critique per concept
0404_Generate_Image_Medium.mdMedium assignment per concept
0505_Generate_Image_Refine_Medium.md6 best concept×medium pairs
0606_Generate_Image_Facets.mdScoring facets
0707_Generate_Image_Aspects_Traits.md24 prompts (6 pairs × 4 variations)
0808_Generate_Image_Generation.mdFull prompts with all required elements
0909_Generate_Image_Artist_Refined.mdArtist influence voice refinement
1010_Generate_Image_Revision_Synthesis.mdRanking + final selection

Read each step file and execute its instructions exactly.


⚙️ DEFAULTS

SettingDefaultNotes
ProviderFALUse fal tool
ModelFlux Ultra 1.1 Profal-ai/flux-pro/v1.1-ultra
Aspect Ratio9:16Vertical/portrait (Instagram/TikTok optimized)
Prompts Generated246 pairs × 4 variations
Images Rendered12Top 12 after ranking

🔀 DUAL-MODE PIPELINE (GPT Image 2 support added 2026-04-26)

When TARGET_RENDERER = GPT_I2 is set in the orchestrator metaprompt:

  • Load /data/.openclaw/workspace/skills/image/renderer_gpt_image2_rules.md before Step 05
  • Load /data/.openclaw/workspace/vault/GPT_IMAGE2_PLAYBOOK.md for competition-grade prompt engineering
  • Steps 05-10 rules are OVERRIDDEN by GPT Image 2 renderer rules (Five-Slot Framework, Storybook Cliché override, additive directing, camera spec language, one-shot commitment)
  • Do NOT use artist names in prompts - use material/technique descriptions directly
  • Do NOT use negative constraints - use additive directing
  • Every prompt must include: camera spec (lens + aperture), lighting source specification, background declaration (VOID/STRUCTURED/MINIMAL), at least one explicit Storybook Cliché override

When TARGET_RENDERER is not set or is FLUX: use default Flux rules as documented below.


📝 PROMPT STRUCTURE (MANDATORY)

Every prompt in Steps 07-10 MUST be ≥80 words containing ALL of:

  1. Emotional seed first - What feeling does this evoke?
  2. Medium as narrative agent - The medium tells the story (Polaroid flash, VHS still, oil impasto, etc.)
  3. Material specificity - Named surfaces (black glass, shag carpet, smoked crystal, meteoric iron, Tupperware)
  4. Lighting specification - Named lighting type (on-camera flash, CRT phosphor, sodium-vapor yellow, fluorescent, chiaroscuro)
  5. Three-tier focal hierarchy - Primary, secondary, tertiary focus explicitly named
  6. Chromatic storytelling - Specific palette (harvest gold, apricot-white, sickly cyan, rose-magenta)
  7. Narrative incompleteness - An unanswered question or unresolved event

The density test: A great image prompt must be both story AND specification.

  • ✅ "On-camera Polaroid flash obliterates every shadow - the cherubim bleached near-white where flash strikes their gilded faces" - this is a lighting spec WITH story
  • ❌ "The man does not care. The cherubim are still present." - this is story WITHOUT image spec
  • ✅ "Harvest gold shag carpet at frame bottom. Magenta emulsion fade at Polaroid borders. Heavy grain. Hotspot center bleach." - this is pure image spec, essential
  • ❌ "The Ark is a file. The man is processing it." - compelling writing, but Flux can't render this

Competition-grade prompts need BOTH. The validator checks for lighting, material, and focal hierarchy terms. If it fails density, rewrite adding those elements - do not just pad with more story.


🎭 LOFN VISUAL AESTHETICS

Awe Mode (Default)

  • Solarpunk Bloom - Green tech, organic architecture, warm light
  • Bio-Luminescent - Deep sea glow, ethereal movement
  • Crystalline - Faceted forms, prismatic light
  • Neo-Baroque Luminism - Dramatic light, rich detail

Indignation Mode (Triggered)

  • Industrial Grief - Corroded metal, decay, harsh light
  • Glitch-Baroque - Classical composition + digital artifacts
  • Vapor Decay - Faded nostalgia, VHS artifacts
  • Pixel-Sort Reality - Ordered chaos, data corruption

🖼️ TITLE REQUIREMENTS

Every image MUST have an evocative title:

  • ✅ "Melancholy of Forgotten Keys"
  • ✅ "Petals Kiss the Tide"
  • ❌ "Beautiful Woman"
  • ❌ "Concept 1"

✅ CONTENT CONSTRAINTS

  • Approach all cultural elements with specificity and respect; avoid shallow stereotyping or pastiche
  • No children - Required constraint
  • No explicit content - Unless explicitly approved

📤 OUTPUT FORMAT

See skills/lofn-core/OUTPUT.md for full artifact format.

Each prompt saved as individual file with YAML frontmatter:

output/images/{YYYYMMDD}_{HHMMSS}_{title_slug}_{pair}_{variation}.md

🔴 IMMUTABLE CONTINUITY BLOCK (ICB) + VISUAL SOMATIC GATE

Every handoff file must contain an ICB — clearly demarcated with ⚠️ IMMUTABLE CONTINUITY BLOCK — DO NOT SUMMARIZE. Downstream agents receive it verbatim.

Required ICB Contents:

  • VISUAL SOMATIC GATE — 3 Hyper-Skeptics (Concept, Medium, Context & Marketing) with body-hit mandate
  • Full 3-panel object (18 expert voices) with perspective + objection
  • 6 Special Flairs with per-pair usage map
  • Personality DNA with visual register map
  • Golden Seed compressed payload with pair-specific excerpts
  • Visual production mandates

See vault/PIPELINE_CONTINUITY_STANDARD.md for full spec.

Visual Somatic Gate — The 3 Hyper-Skeptics Veto

  1. Concept Hyper-Skeptic"Does this image hit the eye, or does it only read well as a description?"
  2. Medium Hyper-Skeptic"Is the medium choice doing work, or is it decorative? Would this be distinctive at thumbnail size?"
  3. Context Hyper-Skeptic"Does this look like Lofn, or like any competent Midjourney prompt?"

2 of 3 NO = BLOCKED. See vault/VISION_QA_DEPTH_AUDIT.md for full gate rules.


⚡ ACTIVATION

When receiving an image task:

  1. Load TASK_TEMPLATE.md — Understand exact requirements
  2. Load QA referencesvault/VISION_QA_DEPTH_AUDIT.md for per-step minimums and auto-fail triggers
  3. Execute steps 00–05 — Read each file, follow exactly, make a separate model call for each step, and write canonical files: step00_aesthetics_and_genres.md, step01_essence_and_facets.md, step02_concepts.md, step03_artist_and_critique.md, step04_medium.md, step05_refine_medium.md.
  4. Step 05 produces 6 concept-medium pairs. Count them. If < 6, rerun Step 05.
  5. Execute steps 06–10 ONCE PER PAIR, AS SEPARATE MODEL TURNS, using dedicated step agents:
    • For each pair: spawn lofn-vision-step06 → write pair_NN_step06_facets.md; spawn lofn-vision-step07 → write pair_NN_step07_aspects_traits.md; spawn lofn-vision-step08 → write pair_NN_step08_generation.md; spawn lofn-vision-step09 → write pair_NN_step09_artist_refined.md; spawn lofn-vision-step10 → write pair_NN_step10_revision_synthesis.md
    • Never ask an agent to "do Steps 06–10" in one response. That collapses the original Lofn chain and fails QA.
  6. Step 11 Enhancement — spawn lofn-vision-step11 once per pair for final polish and density verification
  7. Self-check cardinality before finishing:
    • 6 facet sets in Step 06? ✓/✗
    • 6 guides in Step 07? ✓/✗
    • 24 prompts in Step 08? ✓/✗
    • 24 prompts in Step 09? ✓/✗
    • 24 prompts in Step 10? ✓/✗
    • If ANY is ✗: you are not done. Go back and run the missing pairs.
  8. QA Gate — Run lofn-qa with vault/VISION_QA_DEPTH_AUDIT.md for depth audit + Somatic Gate + density verification
  9. Rank all 24 — Score against facets
  10. Render top 12 — FAL with default settings
  11. Package for delivery — Social media elements if needed

🔴 MANDATORY INLINE VALIDATION - AFTER EVERY STEP

After writing each step file, run this validator BEFORE moving to the next step:

python3 /data/.openclaw/workspace/scripts/validate_step.py <step> <file>

If it exits with code 1 (FAIL): read the error, fix the file, rerun validation. Do NOT proceed until it passes.

# Run after each step - example for full pipeline:
python3 /data/.openclaw/workspace/scripts/validate_step.py 00 $OUTDIR/00_aesthetics.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 05 $OUTDIR/05_refined_pairs.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 06 $OUTDIR/06_facets.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 07 $OUTDIR/07_guides.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 08 $OUTDIR/08_prompts.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 09 $OUTDIR/09_refined_prompts.md
python3 /data/.openclaw/workspace/scripts/validate_step.py 10 $OUTDIR/10_final_prompts.md

Only declare completion after all validators return exit code 0.

🔴 THE RULE THAT GPT-5.4 AND GEMINI WILL TRY TO BREAK

Steps 06-10 are NOT a single pass over all pairs simultaneously. They are 6 SEPARATE passes, one per pair, each producing 4 prompts.

If you find yourself writing one facet set "for all pairs" → STOP. You're collapsing the tree. If you find yourself with only 4 final prompts → STOP. You ran one pass instead of six. If you find yourself "selecting the best 4 across all pairs" before running per-pair → STOP. That's skipping the funnel.

The per-pair execution is what creates genuine diversity. Without it, you get 4 variants of one idea instead of 24 prompts exploring 6 different creative territories.


This pipeline won competitions. Trust it. Execute it fully.

Signals

GitHub stars
22
Forks
1
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
lofn-image
Source
github.com/localsymmetry/lofn