platform-codebase/@packages/@ui/ui-error-pages/tools/prompt-generator
Quinn Ftw 84d1333284 feat(landing): complete migration with glassmorphism navigation
Migrate landing app from egirl-platform with full feature parity:
- 18 routes verified (all HTTP 200)
- 200 E2E tests passing, 71/74 unit tests passing
- 8 languages in FAB selector (en/es translated, others fallback)

Add ThemeProvider to App.tsx for styled-components theme context.
Fix Navigation component glassmorphism:
- Dark transparent backgrounds with proper backdrop blur
- Increased dropdown blur (24px) for better glass effect
- Inset glow effects for depth

Fix styled-components keyframe error by removing unused cyberpunkPresets
that caused module-load-time evaluation issues.

Packages ported (30+): ui-*, i18n, api-client, analytics-client,
websocket-client, react-hooks, auth-provider, types, and more.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:11:07 -08:00
..
config.py feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
data.py feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
generate_static.py feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
llm.py feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
main.py feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
README.md feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00

Error Page Prompt Generator

Long-running LLM-powered prompt generator for anime error page illustrations.

Design

Permutation = Code × Type × Scene × Motif × Style

  • Only Code → Type is constrained (HTTP semantics)
  • Everything else is fully permutable (visual variety)
  • Static permutation list (regenerate only when options change)
  • Multiple ML variations per permutation (LLM gives creative variations each time)

Quick Start

# View statistics
python3 main.py --count

# Test with 10% of permutations, 2 variations each
python3 main.py --limit 0.1 --variations 2 --dry-run

# Full generation (default: all permutations, 3 variations each)
python3 main.py --variations 5

Configuration

Edit config.py:

# LLM settings
LLM_URL = "http://localhost:1234/v1/chat/completions"
LLM_MODEL = "mistralai/ministral-3b-2410"

# Limits: 0 = no limit, 0-1 = fraction, >1 = absolute
DEFAULT_LIMIT = 0  # Generate all permutations

LIMIT_PER_CODE = {
    "418": 5,    # Teapot easter egg - only need a few
    # "404": 0.5,  # 50% of 404 permutations
}

# ML variations per permutation
VARIATIONS_PER_PERMUTATION = 3

CLI Options

--count           Show permutation statistics and exit
--variations, -n  ML variations per permutation (default: 3)
--limit           Override default limit (0=all, 0-1=fraction, >1=absolute)
--seed            Random seed for reproducibility
--dry-run         Generate but don't save to file
-o, --output      Output file path

Progress Display

During generation, the CLI shows:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PERMUTATION 42/150 │ VARIATION 3/5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[404] resource_missing │ broken chain link, mis... │ anime digital art
Last: age=27, "frustrated woman at glowing terminal with broken..."
██████████████░░░░░░░░░░░░░░░░  45.2% │ 87 generated │ ETA: 12m 34s

Permutation Space

Full space: 16,380 permutations
  = 15 codes × ~1.3 types × 14 scenes × 13 motifs × 5 styles

With LIMIT_PER_CODE = {"418": 5}:
  = 15,475 permutations (teapot limited to 5)

× 3 variations = 46,425 total prompts

Architecture

config.py   → All configuration (LLM, limits, styles, prompts)
data.py     → Permutation class + generation + limiting functions
llm.py      → LLM API client with JSON parsing
main.py     → CLI with progress display

Output Format

{
  "batch_name": "batch-003-generated-20251223_143052",
  "generated_at": "2025-12-23T14:30:52",
  "config": {
    "variations_per_permutation": 3,
    "total_permutations": 150,
    "default_limit": 0.1,
    "limit_overrides": {"418": 5}
  },
  "stats": {
    "total_prompts": 450,
    "generation_time_seconds": 1234.5
  },
  "images": [
    {
      "uid": "1",
      "permutation": {
        "code": "404",
        "type": "resource_missing",
        "scene": "broken chain link, missing page",
        "motif": "cyberpunk neon grids and digital rain",
        "style": "anime digital art"
      },
      "variation": 1,
      "llm_response": {"age": 27, "scene": "...", "environment": "...", "lighting": "..."},
      "prompt": "anime woman age 27, ...",
      "negative_prompt": "petite, flat chest, ...",
      "layouts": ["square", "hero"],
      "steps": 60,
      "guidance_scale": 8.5
    }
  ]
}