kmelve
Joined 9 years ago
Joined 9 years ago
Happy to answer questions, and I'll pull in the author for anything I can't.
The thing that prompted this: I kept having conversations with teams where the first question was "how do we write better skills files?" and I kept finding that the issues were upstream in our error messages, CLI surface, and so on. I increasingly feel that Skill files is your "last resort."
The Workbench experiment in the post is admittedly simplified to unpack the mental model; you would probably set up evals etc to actually test it, which we have started doing at Sanity as well.
Happy to answer questions and channel more of our experience with agents (heh) and designing for them.
Rosti's approach uses three things: proportional normalization based on aspect ratio, pixel density analysis (so a dense wordmark doesn't visually overpower a thin logomark), and a center-of-mass calculation for optical alignment. The perceptual sizing math builds on Dan Paquette's earlier work.
The core normalization logic is plain JS with no React dependency: https://github.com/sanity-labs/react-logo-soup/blob/main/src...
Someone already forked it into a framework-agnostic version: https://github.com/auroris/logo-soup
Rosti is around if there are questions about the density compensation or optical alignment math.
The core formula is Dan Paquette's proportional normalization (aspect ratio raised to a scale factor), but the density compensation and visual center-of-mass calculation are the interesting additions.
The visual center algorithm weights each pixel by sqrt(colorDistance) * (alpha / 255) to find where the "ink" actually lives vs. the geometric center. It's a subtle effect but makes a noticeable difference with asymmetric logos.
Library is MIT licensed: https://github.com/sanity-labs/react-logo-soup
Live Storybook: https://react-logo-soup.sanity.dev
Working on getting Rosti signed up to HN for questions you might have!