Dev kicon

kicon — products/dev/kicon

Buildtime icon generator. One master SVG in, every platformcorrect 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 mustusetool 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: reruns kicon generate and SHAcompares outputs against committed files

Interfaces

Commandline binary. No runtime library — this is pure buildtime.

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 design subcommand promotes kicon from variant generator to full *esign 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

*0.2.17 (20260520)*— released.

Feature Status
validate subcommand (viewBox, bgrect, margin, safezone)
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 + appletouch + maskable + ogimage)
generate target: store (icon256 + icon512)
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)
Moduleaware: `-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+
  • Singlefile binary; no runtime deps beyond rsvgconvert

Design references

Source: ../home/koder/dev/koder/meta/docs/stack/modules/dev-kicon.md