ADR-0018: One Entry Form in tre¶
Note
tre takes one standard form for each kind of value at its entry points, and the framework above it converts every other form to that one. tre does not learn colour strings, image formats or any other convenience form. Stated by the maintainer on 2026-11-03 and recorded here as the rule for every request to tre.
Context¶
The shell's binder and Tesserae UI both turn a colour string into the (r, g, b, a) tuple that tre takes. TRE-REQ-010 Colour Strings asked tre to accept strings so the converters could disappear. The maintainer declined (2026-11-03): "I dont want tre to do the conversions, I want it to have a simple entry point that is not confusing. If I start having tre convert everything it goes from being a rendering engine to a general purpose engine. Also, having a single standard is important, if another format comes along then tre does not need to add another conversion form. It is why tre does not decompress images into bitmap format. That is the job of the framework. This should apply to all of tre's entry points."
Options¶
Option A — One Entry Form per Kind of Value; the Framework Converts (Chosen)¶
- For: tre stays a rendering engine; its entry points stay few and unambiguous; a new input format (a new colour syntax, a new image codec) changes the frameworks, not tre; the rule already holds for images (decoded pixels in) and fonts (bytes in).
- Against: every framework writes or shares its converters (ADR-0017 Shared Utilities).
Option B — tre Accepts Convenience Forms¶
- Against: each form tre accepts is one more thing to specify, test and keep in step; the entry points grow without end. Rejected.
Decision¶
Accepted 2026-11-03 by the maintainer in chat, in the words quoted in Context: Option A.
Consequences¶
- No request to tre asks it to convert, parse or accept another form of a value it already takes. TRE-REQ-010 Colour Strings is withdrawn.
- The binder and Tesserae UI own their converters. Sharing them is a separate question, ADR-0017 Shared Utilities.
- Layers and Components lists format conversion among the things tre never owns (Vault Reference > Layering principle).
- Existing entry points that already accept more than one form (tre 0.5.10 takes a length as a number or as a percentage string such as
"50%") are tre's to review against this rule. The shell passes whatever form tre documents and does not rely on extra forms. - A request to tre must name a mechanism the engine lacks, not a convenience.