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 must |
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: rekicon generate and SHA |
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 versionTargets: 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, bg |
✅ |
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 |
✅ |
generate target: store (icon |
✅ |
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) |
✅ |
| Module |
✅ |
| 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 rsvgconvert
Design references
- RFC
001 — Buildtime icon generation from a single master SVG - RFC-002 — Design generation pipeline (procedural / imagegen / blender)
meta/docs/stack/specs/icons/products.kmdmeta/docs/stack/specs/icons/generation-targets.kmdmeta/docs/stack/specs/landing-pages/packages.kmd— consumer of theogtargetmeta/docs/stack/specs/kpkg/format.kmd §3.1— required metadata enforced byvalidate-metadataengines/sdk/go-imagegen/— SDK consumed by theimagegenbackend (SDK-first)engines/sdk/koder_kit/docs/rfcs/RFC-001-spec-encapsulation-across-platforms.md— sibling philosophy at the runtime layer