kicon — `products/dev/kicon`

Build-time icon generator. One master SVG in, every platform-correct icon variant out. Encodes the rules that every Koder module used to rediscover manually.

Role in the stack

Area Sector Consumers
Developer Platform Build tooling every Koder module that ships an icon

Sits alongside dev/kpkg (packaging) and dev/ci (CI orchestration) as a build-time tool that normalizes one class of output across all modules.

Primary couplings

Module Nature
meta/docs/stack/specs/icons/products.kmd contract for the master SVG (the input kicon consumes)
meta/docs/stack/specs/icons/generation-targets.kmd per-platform output rules — mirrored verbatim in kicon's code
meta/docs/stack/policies/sdk-first.kmd lists icon generation as a must-use-tool pattern
products/dev/store/cli/publish.sh receives icon-256.png / icon-512.png that kicon emits under store target
/new-product runs kicon generate automatically after placing the master SVG
/k-housekeep audit rule §2.9.10: re-runs kicon generate and SHA-compares outputs against committed files

Interfaces

Command-line binary. No runtime library — this is pure build-time.

kicon validate <icon.svg> [--strict]
kicon generate --src <icon.svg> --targets <list> --out <dir> [--slug <name>] [--force]
kicon generate --module <path>
kicon validate-metadata --module <path>             (kpkg.toml §3.1 hard gate)
kicon vectorize --src <png> [--backend vtracer|potrace] [--out <svg>]
kicon design generate --backend procedural|imagegen|blender ...
kicon design pick <workdir> [--no-browser]
kicon design promote <workdir>/<id> --dest <icon.svg>
kicon version

Targets: android, linux, web, store, ios, macos, windows, og.

The og target composes a 1200×630 social-share image (icon + name + description) consumed by Hub package pages and product landings.

The verge-symbols subcommand is the family-level target (not per-module): it reads the whole Verge Symbols glyph set + the stable PUA codepoint contract and emits the artifacts every Koder UI consumes via KoderIcon — SVG sprite, KoderIcons Dart bindings, the static opsz-24 icon font (verge-symbols.{ttf,woff2}), and the opsz-correct PNG ladder. Sprite + Dart are pure-Go; the font + PNG orchestrate an external build-time chain (inkscape stroke→fill expansion → embedded fonttools glyf/cmap assembly → woff2_compressrsvg-convert raster), skipped gracefully when the toolchain is absent. See generation-targets.kmd §verge-symbols.

The design subcommand promotes kicon from variant generator to full design pipeline: produces the master SVG via three pluggable backends, selects interactively via local browser grid, vectorizes raster outputs, promotes to a module's icon slot. See RFC-002.

Status

v0.2.18 (2026-05-29) — released.

Feature Status
validate subcommand (viewBox, bg-rect, margin, safe-zone)
generate target: android (5 mipmap densities + adaptive foreground with 66.7% safe-zone wrapper)
generate target: linux (hicolor 8 sizes + root)
generate target: web (favicons + apple-touch + maskable + og-image)
generate target: store (icon-256 + icon-512)
generate target: ios (AppIcon.appiconset, 13 PNGs, no alpha)
generate target: macos (icon.icns, pure-Go .icns writer, 7 sizes)
generate target: windows (icon.ico, pure-Go .ico writer, 163248/256)
dark variants: icon-dark.svg → iOS 18 dark appearance + Android 13+ themed monochrome (kicon#032)
verge-symbols family target: SVG sprite + KoderIcons Dart (pure-Go)
verge-symbols family target: static opsz-24 font (.ttf/.woff2, 136 glyphs) + opsz-correct PNG ladder (kicon#038)
verge-symbols variable opsz axis (kicon#039 — input-blocked on opsz-16 master set)
Module-aware: --module <path> reads koder.toml
Go tests: 7 validate + 8 target = 15 total, all passing
kpkg distribution (build-release.sh + CI pipeline on tag)
/k-housekeep audit rule §2.9.10 — icon drift detection
Adoption sweep (97 store icons across 50 modules)

Dependencies

  • rsvg-convert (librsvg2-bin) on PATH — SVG → PNG rasterization
  • Go 1.22+
  • Single-file binary; no runtime deps beyond rsvg-convert

Design references