Work / Trunk / Wiki / Decisions
2026-10-17-get-code
Decisioncanonicalverified 2026-10-18
DECISION.2026-10-17.GET-CODEGet code: a neutral spec, built-in converters, and AI for the rest
Context
The first drawing of Copy code always gave "HTML · Tailwind" and "JSX", made from the captured markup. The owner, 2026-10-17: code is "supposed to be dynamic and user requirement basis"; a person "might ask for html/css/js or react or angular"; "we are not supposed to give a library specific code directly without user asking".
Decision
- The capture describes each variant once, with no framework in it: a component spec. It is a tree of elements with tag, role, text as content, the attributes that matter, each element's own styles at each captured width, and each value tied to a product token where one matches. A draft's or branch's changes are laid over it when it is read.
- The person picks a target: a framework, a styling and options. Nothing is chosen the first time. The choice is remembered per person, per product.
- Built-in converters make the common targets: HTML, React, Vue, Angular, Svelte and Web Component, each with CSS, CSS Modules, Tailwind or inline styles. They are exact, instant and free, and every access level has them, because they are part of View.
- Anything else goes to AI: a request in words, with the spec as data. It is one AI action, and it needs Can edit on Team.
- The capture notes the product's stack (Next.js, Tailwind, Angular, Vue, Svelte) and the sheet shows it as a hint. It never chooses by itself.
Why
- One spec and many converters means a new target is one converter, not a new capture.
- Converting is exact and costs nothing, so the common case needs no AI. AI covers the long tail without a converter for every language.
- Showing nothing until asked meets the owner's rule.
Schema, approved by the owner
Variant.specKey: the spec file, next tomarkupKey.Product.detectedStack String[].AiAction.kind(DRAW · CODE), plusrequestandresultKeyfor a CODE action. It creates no draft.CodePreference: per person, per product. It holds the framework, styling, options and last request.
Status
Active. Approved and built 2026-10-17.
Sources
- The owner's messages in the session of 2026-10-17.