Hero Studio
Public Made by Adomby adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
Store the showcase source with every generated hero so heroes can be regenerated later (found while fixing adom/hydrogen#48)
The use case
adom/hydrogen#48 (Drew Owens): the four adom dock heroes (parts-search, kicad-bridge, fusion-bridge, altium-bridge) do not read as one family. All four are 2000x1250, but the Adom logo is 33px on two and 51px on the other two, and the title cap height spans 105 to 206px. The fix is to regenerate all four through ONE shared style so the logo, pill, title and subtitle land identically.
That regeneration has one hard rule from John: reuse each app's existing showcase image exactly. Do not recreate showcases. The showcase is the app's real UI and it is the part a human chose; a regeneration is only a re-layout of the brand elements around it.
What we found when we tried
Only one of the four showcases still exists as a file.
| Hero | Generator | Showcase source recoverable? |
|---|---|---|
| adom-parts-search | hero-studio 0.20.3 | Yes, but only because the studio's per-thread snapshot (~/.adom/instances/hero-studio/snapshots/adom-parts-search.json) happened to still hold showcase.src as a base64 data URI on this container |
| altium-bridge | hero-studio 0.20.5 | No. Page repo has no image except the hero; no local clone; nothing on the container |
| kicad-bridge | hero-studio 0.15.0 | No. Provenance says vitrine_full: true (full-hero import), so the showcase was never a file at all |
| fusion-bridge | none (no provenance chunk) | No |
Searched: the four page repos, both local page clones, the studio snapshot store, and a date-windowed sweep of the whole container around each hero's creation date. The PNG provenance comment records layout, theme, fontSize and showcase_used: true, but not where the showcase came from.
The workaround this time was to crop the showcase window out of the published hero at full resolution. That preserves the pixels but it is fragile (edges have to be found by hand, bleed layouts have already clipped the window, and it only works while the old hero is still published).
The ask
Hero Studio is the one place that always has the showcase in hand at Generate time. It should make the showcase durable, so any hero can be regenerated later from its parts:
- Store the showcase source alongside the hero. At Generate (and in
batch), write the showcase image the hero was composed from into the page repo next to the hero, e.g.screenshots/showcase.png(ordocs/showcase.pngmatching wherever the hero goes), and have the studio's apply instructions tell the driving AI torepo pushit with the hero. The snapshot already proves the studio has these bytes; today they are only kept in a per-thread, per-container cache that is not meant to survive. - Record the showcase in provenance. Add
showcase: {path, sha256, w, h, chrome, full, cover}to the PNG provenance comment, so a later session can find the exact file and confirm it is the one that was used. Right now provenance saysshowcase_used: trueand nothing else. - Make it part of the AI instructions. The studio's reprimands and apply hints are the mechanism that actually reaches the AI (the pose flow already prints SHOWCASE_IS_GENERIC with an exact recovery). A parallel hint at Generate, "showcase saved to , push it with the hero", is what would have put us in good shape here.
- Same for full-hero imports. When
showcase.fullis used, store the imported image too; those are the ones with no other record.
Why it matters beyond these four
Every time the hero treatment changes fleet-wide, every hero has to be regenerated: the pill in the upper right is the obvious next one (John is already thinking about changing how pills are shown), then any wordmark, title ramp, or layout change. With the showcase stored, that is a batch over the fleet with a saved style. Without it, every regeneration is a hunt through repos, clones and old snapshots, and for some heroes the source simply no longer exists. The studio is the right place to fix this because it is the only component that reliably sees the showcase at the moment it matters.
Filed from the ah dock bar thread while working adom/hydrogen#48.