Repository navigation
Component records, one place for each component’s decisions #90
Replies: 2 comments 3 replies
|
Very helpful, especially for non-primitives like the Tile. What concerns me is that it's a lot of text, and feels somewhat defensive. Is it needed at this stage? The decision log should carry most of the "we already tried that" weight. For your open questions:
|
|
This is a good initiative !
As a quick start, the ruled out section could be pre-filled by an AI scanning all refused PR in GitHub concerning Tile card if a reason was given. This is the synthesis a public gemini access gave me when askking to analyse tile related rejected PR reasons:
Side remark, this one:
Should also be pushed to features... At least any feature should reflect the state of the associated entity, as what was finaly done with the latest creation of color features and the correction of temperature color feature that are now changing color when associated light is off (with a de-saturated scale, not with state-inactive-color) |
Uh oh!
There was an error while loading. Please reload this page.
Every new card or page in Home Assistant makes its own choices for color, spacing, states and behaviour. The reasons behind earlier choices live in people's heads, old pull requests and Discord threads, so contributors, and the AI tools many of them use, can't find them. I want to change that with a component record: one Markdown file per component, next to the code, that designers, developers and Claude read and update.
The pain point
I wrote a first record for the tile to test the idea. Some observations:
The concept
The idea builds on Cassie Groos's article Probabilistic isn't a dirty word.
Design systems so far were a component library and documentation for people. Now AI tools build UI too, and they only get it right when they know why a component works the way it does. I see component records as the next step: the design system's memory, written as plain text that people and AI tools can both read and update.
A component record holds what Figma and code can't tell you: requirements, behaviour, accessibility intent, what was ruled out, and decisions with their reasons. Each fact has one origin: token values in the theme, the visual spec in Figma, the API in code, behaviour and decisions in the record.
We want the records to be the source everything else builds on:
Statements are numbered so they can be tested. Three markers keep it honest:
[open]for undecided,[review]for things a person checks,[drift]when code or Figma disagrees with the record.Designers are the editors and decide what goes in. Claude keeps the records in sync and points out drift on pull requests. It doesn't make the decisions.
This is the first example component record, for the Tile card:
Open questions
If you want to help write the first records, say so below.
Curious about your feedback.
All reactions