Imported from lqdev/y1-ai-theme-generator (
AGENTS.md). Install upstream withnpx skills add lqdev/y1-ai-theme-generator. Copyright stays with the author.
AGENTS.md — Y1 Theme Generator
This repo generates AI-designed themes for the Innioasis Y1 portable music player. The pipeline is: define an aesthetic (style-guide) → describe assets (catalog) → generate SVGs (LLM) → convert to PNG → bundle for device.
Build & Run
npm install # once — installs @resvg/resvg-js
node convert.js --theme=examples/synthwave # SVG → PNG for one theme
node deploy.js --theme=examples/synthwave # full pipeline: convert + bundle + zip → dist/
--theme is required and must point to a directory containing config.json, svg/, and png/. Works for any theme under examples/ or themes/.
Validating a run
After deploy, confirm:
86 converted, 0 failedin convert outputdist/<themeName>/contains exactly 87 files (86 PNGs +config.json)dist/<themeName>.zipis present and non-zero
Directory Structure
y1-theme/
├── _theme-system/
│ └── icon-catalog-base.json ← permanent Y1 device spec (blank designIntents — template)
├── themes/ ← user workspace, all contents gitignored
│ └── README.md ← committed placeholder explaining the workspace
├── examples/ ← 5 committed sample themes (full assets, diverse art styles)
│ ├── synthwave/
│ ├── washi-ink/
│ ├── abyssal/
│ ├── constructivist/
│ └── solarpunk/
├── .github/skills/ ← Copilot agent skills (4 skills)
├── convert.js ← SVG → PNG (--theme required)
├── deploy.js ← full pipeline (--theme required)
├── AGENTS.md
└── README.md
Each theme directory has this self-contained structure:
<theme-dir>/
├── style-guide.md ← aesthetic spec (palette, mood, visual language)
├── config.json ← Y1 device config (themeName, colour fields, all asset filenames)
├── icon-catalog.json ← base spec + designIntents + palette for this theme
├── svg/ ← 86 SVG source files
└── png/ ← 86 PNG rendered files (generated from svg/)
Asset Dimensions (quick reference)
| Category | Dimensions | viewBox |
|---|---|---|
Main menu icons (icon-*.svg) |
166x166 | 0 0 166 166 |
Settings icons (setting-*.svg) |
146x146 | 0 0 146 146 |
Masks (mask.svg, setting-mask.svg) |
480x272 | 0 0 480 272 |
Status icons (status-*.svg) |
64x64 | 0 0 64 64 |
Battery icons (battery-*.svg) |
64x32 | 0 0 64 32 |
Dialog rows (dialog-*.svg) |
640x91 | 0 0 640 91 |
Wallpapers (wallpaper-*.svg) |
320x240 | 0 0 320 240 |
Cover (cover.svg) |
200x200 | 0 0 200 200 |
SVG Generation Rules
Every SVG must open with this exact structure:
<svg xmlns="http://www.w3.org/2000/svg" width="W" height="H" viewBox="0 0 W H">
<defs>
<filter id="glow" x="-30%" y="-30%" width="160%" height="160%">
<feGaussianBlur stdDeviation="2.5" result="blur"/>
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
<filter id="glow-strong" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur stdDeviation="5" result="blur"/>
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
</defs>
<rect width="W" height="H" fill="[background colour]"/>
<!-- content -->
</svg>
stroke-linecap="round"andstroke-linejoin="round"on all path/line elements- ON/OFF state pairs: OFF = identical shape, all strokes/fills in dim colour, no
filterattributes - Background fill comes from the theme's
palette.background - Always read the theme's
style-guide.mdandicon-catalog.jsonbefore generating
Icon Catalog Field Layers
icon-catalog.json (per theme) has two layers:
Permanent — never change between themes (also in _theme-system/icon-catalog-base.json):
- Top-level:
version,referenceTheme - Per-asset:
id,filename,svgFilename,category,dimensions,configSection,configKey,melodyMuncherFile,melodyMuncherDescription,description
Theme-specific — set per theme:
- Top-level:
theme(slug),palette(7-colour object: background, primary, accent1, accent2, warning, warm, dim) - Per-asset:
designIntent(what to draw for this specific theme — 86 entries)
The base template is _theme-system/icon-catalog-base.json (all designIntent fields are empty strings).
config.json Structure (per theme)
Lives at <theme-dir>/config.json. Key fields:
themeName— device folder name (PascalCase, no spaces), used bydeploy.jshomePageConfig— 12 main menu icon filenamessettingConfig— 40+ settings icon filenames, includessettingMaskstatusConfig— status icons +batteryarray (4) +batteryChargingarray (4)itemConfig/dialogConfig— dialog row background imagesdesktopWallpaper,globalWallpaper,desktopMask,themeCover— top-level keysplayerConfig—progressColor,progressBackgroundColor
Skills
.github/skills/ contains three Copilot agent skills:
| Skill | Invoke with | Purpose |
|---|---|---|
create-theme-style-guide |
/create-theme-style-guide |
Interview -> write style-guide.md, populate icon-catalog.json designIntents + palette, update config.json |
generate-y1-theme |
/generate-y1-theme |
Read style-guide + catalog, generate all 86 SVGs into svg/ |
validate-y1-theme |
/validate-y1-theme |
Run node validate.js --theme=<path> — 10 automated checks for completeness, dimensions, structure, ON/OFF pairs, config.json before deploy |
deploy-y1-theme |
/deploy-y1-theme |
Run node deploy.js --theme=<path>, verify output, guide device install |
Do Not
- Do not edit files in
png/ordist/— always regenerated - Do not edit
node_modules/ - Do not change SVG
width/height/viewBox— must matchdimensionsin the catalog - Do not commit
dist/— gitignored - Do not commit anything under
themes/(exceptthemes/README.md) — gitignored, user workspace - Do not add
font.ttfunless explicitly requested — Y1 requires.ttfformat only
Creating a New Theme
1. /create-theme-style-guide -> creates themes/<name>/{style-guide.md, config.json, icon-catalog.json}
2. /generate-y1-theme -> writes 86 SVGs to themes/<name>/svg/
3. /validate-y1-theme -> checks completeness, dimensions, palette, ON/OFF rules
4. node deploy.js --theme=themes/<name> -> dist/<themeName>.zip ready for SD card