@12ui/design 0.2.65 → 0.2.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +45 -35
  2. package/SKILL.md +1 -1
  3. package/dist/branch-client.d.ts +4 -2
  4. package/dist/branch-client.d.ts.map +1 -1
  5. package/dist/branch-client.js +36 -21
  6. package/dist/branch-client.js.map +1 -1
  7. package/dist/branch-conversion-engine.d.ts +8 -0
  8. package/dist/branch-conversion-engine.d.ts.map +1 -0
  9. package/dist/branch-conversion-engine.js +43 -0
  10. package/dist/branch-conversion-engine.js.map +1 -0
  11. package/dist/branch-execution.d.ts +12 -0
  12. package/dist/branch-execution.d.ts.map +1 -1
  13. package/dist/branch-execution.js +62 -39
  14. package/dist/branch-execution.js.map +1 -1
  15. package/dist/branch-local-conversion.d.ts +27 -0
  16. package/dist/branch-local-conversion.d.ts.map +1 -0
  17. package/dist/branch-local-conversion.js +80 -0
  18. package/dist/branch-local-conversion.js.map +1 -0
  19. package/dist/branch-local-publication.d.ts +15 -0
  20. package/dist/branch-local-publication.d.ts.map +1 -0
  21. package/dist/branch-local-publication.js +111 -0
  22. package/dist/branch-local-publication.js.map +1 -0
  23. package/dist/branch-page-conversion.d.ts +7 -0
  24. package/dist/branch-page-conversion.d.ts.map +1 -1
  25. package/dist/branch-page-conversion.js +13 -0
  26. package/dist/branch-page-conversion.js.map +1 -1
  27. package/dist/branch-progress.d.ts +2 -0
  28. package/dist/branch-progress.d.ts.map +1 -1
  29. package/dist/branch-progress.js.map +1 -1
  30. package/dist/branch-run-record.d.ts +24 -2
  31. package/dist/branch-run-record.d.ts.map +1 -1
  32. package/dist/branch-run-record.js +3 -2
  33. package/dist/branch-run-record.js.map +1 -1
  34. package/dist/branch-status.d.ts.map +1 -1
  35. package/dist/branch-status.js +21 -3
  36. package/dist/branch-status.js.map +1 -1
  37. package/dist/branch-winner.d.ts.map +1 -1
  38. package/dist/branch-winner.js +1 -2
  39. package/dist/branch-winner.js.map +1 -1
  40. package/dist/cli-arguments.d.ts.map +1 -1
  41. package/dist/cli-arguments.js +1 -0
  42. package/dist/cli-arguments.js.map +1 -1
  43. package/dist/cli-branch-command.d.ts.map +1 -1
  44. package/dist/cli-branch-command.js +7 -2
  45. package/dist/cli-branch-command.js.map +1 -1
  46. package/dist/cli-capabilities.d.ts +37 -15
  47. package/dist/cli-capabilities.d.ts.map +1 -1
  48. package/dist/cli-capabilities.js +38 -22
  49. package/dist/cli-capabilities.js.map +1 -1
  50. package/dist/cli-codex-readiness.d.ts +11 -0
  51. package/dist/cli-codex-readiness.d.ts.map +1 -0
  52. package/dist/cli-codex-readiness.js +72 -0
  53. package/dist/cli-codex-readiness.js.map +1 -0
  54. package/dist/cli-conversion-engine.d.ts +11 -0
  55. package/dist/cli-conversion-engine.d.ts.map +1 -0
  56. package/dist/cli-conversion-engine.js +26 -0
  57. package/dist/cli-conversion-engine.js.map +1 -0
  58. package/dist/cli-conversion-receipt.d.ts +28 -0
  59. package/dist/cli-conversion-receipt.d.ts.map +1 -0
  60. package/dist/cli-conversion-receipt.js +130 -0
  61. package/dist/cli-conversion-receipt.js.map +1 -0
  62. package/dist/cli-convert-command.d.ts.map +1 -1
  63. package/dist/cli-convert-command.js +12 -5
  64. package/dist/cli-convert-command.js.map +1 -1
  65. package/dist/cli-corpus-command.d.ts.map +1 -1
  66. package/dist/cli-corpus-command.js +5 -7
  67. package/dist/cli-corpus-command.js.map +1 -1
  68. package/dist/cli-corpus-evidence.d.ts +0 -1
  69. package/dist/cli-corpus-evidence.d.ts.map +1 -1
  70. package/dist/cli-corpus-evidence.js +22 -49
  71. package/dist/cli-corpus-evidence.js.map +1 -1
  72. package/dist/cli-corpus-manifest.d.ts +18 -0
  73. package/dist/cli-corpus-manifest.d.ts.map +1 -0
  74. package/dist/cli-corpus-manifest.js +83 -0
  75. package/dist/cli-corpus-manifest.js.map +1 -0
  76. package/dist/cli-corpus-reference-downloads.d.ts.map +1 -1
  77. package/dist/cli-corpus-reference-downloads.js +5 -3
  78. package/dist/cli-corpus-reference-downloads.js.map +1 -1
  79. package/dist/cli-corpus-run.d.ts +2 -0
  80. package/dist/cli-corpus-run.d.ts.map +1 -1
  81. package/dist/cli-corpus-run.js +40 -16
  82. package/dist/cli-corpus-run.js.map +1 -1
  83. package/dist/cli-corpus-types.d.ts +10 -6
  84. package/dist/cli-corpus-types.d.ts.map +1 -1
  85. package/dist/cli-corpus-types.js.map +1 -1
  86. package/dist/cli-draft-command.d.ts +2 -0
  87. package/dist/cli-draft-command.d.ts.map +1 -1
  88. package/dist/cli-draft-command.js +20 -9
  89. package/dist/cli-draft-command.js.map +1 -1
  90. package/dist/cli-engine.d.ts +10 -0
  91. package/dist/cli-engine.d.ts.map +1 -0
  92. package/dist/cli-engine.js +28 -0
  93. package/dist/cli-engine.js.map +1 -0
  94. package/dist/cli-help/conversion.d.ts +10 -3
  95. package/dist/cli-help/conversion.d.ts.map +1 -1
  96. package/dist/cli-help/conversion.js +14 -6
  97. package/dist/cli-help/conversion.js.map +1 -1
  98. package/dist/cli-help/design.d.ts +7 -7
  99. package/dist/cli-help/design.d.ts.map +1 -1
  100. package/dist/cli-help/design.js +9 -7
  101. package/dist/cli-help/design.js.map +1 -1
  102. package/dist/cli-help/index.d.ts +19 -12
  103. package/dist/cli-help/index.d.ts.map +1 -1
  104. package/dist/cli-help/setup.d.ts +2 -2
  105. package/dist/cli-help/setup.js +3 -3
  106. package/dist/cli-help/setup.js.map +1 -1
  107. package/dist/cli-image-backend.d.ts +3 -0
  108. package/dist/cli-image-backend.d.ts.map +1 -0
  109. package/dist/cli-image-backend.js +12 -0
  110. package/dist/cli-image-backend.js.map +1 -0
  111. package/dist/cli-local-conversion.d.ts +17 -0
  112. package/dist/cli-local-conversion.d.ts.map +1 -0
  113. package/dist/cli-local-conversion.js +74 -0
  114. package/dist/cli-local-conversion.js.map +1 -0
  115. package/dist/cli-local-dispatch.d.ts +4 -0
  116. package/dist/cli-local-dispatch.d.ts.map +1 -0
  117. package/dist/cli-local-dispatch.js +102 -0
  118. package/dist/cli-local-dispatch.js.map +1 -0
  119. package/dist/cli-local-export.d.ts +7 -0
  120. package/dist/cli-local-export.d.ts.map +1 -0
  121. package/dist/cli-local-export.js +31 -0
  122. package/dist/cli-local-export.js.map +1 -0
  123. package/dist/cli-local-improve-context.d.ts +3 -0
  124. package/dist/cli-local-improve-context.d.ts.map +1 -0
  125. package/dist/cli-local-improve-context.js +47 -0
  126. package/dist/cli-local-improve-context.js.map +1 -0
  127. package/dist/cli-local-improve.d.ts +16 -0
  128. package/dist/cli-local-improve.d.ts.map +1 -0
  129. package/dist/cli-local-improve.js +214 -0
  130. package/dist/cli-local-improve.js.map +1 -0
  131. package/dist/cli-local-record.d.ts +8 -0
  132. package/dist/cli-local-record.d.ts.map +1 -0
  133. package/dist/cli-local-record.js +67 -0
  134. package/dist/cli-local-record.js.map +1 -0
  135. package/dist/cli-local-runtime.d.ts +7 -0
  136. package/dist/cli-local-runtime.d.ts.map +1 -0
  137. package/dist/cli-local-runtime.js +21 -0
  138. package/dist/cli-local-runtime.js.map +1 -0
  139. package/dist/cli-next-command.d.ts +1 -0
  140. package/dist/cli-next-command.d.ts.map +1 -1
  141. package/dist/cli-next-command.js +12 -9
  142. package/dist/cli-next-command.js.map +1 -1
  143. package/dist/cli-run.d.ts.map +1 -1
  144. package/dist/cli-run.js +3 -0
  145. package/dist/cli-run.js.map +1 -1
  146. package/dist/cli-skill-command.d.ts +0 -3
  147. package/dist/cli-skill-command.d.ts.map +1 -1
  148. package/dist/cli-skill-command.js +9 -24
  149. package/dist/cli-skill-command.js.map +1 -1
  150. package/dist/cli-usage.d.ts.map +1 -1
  151. package/dist/cli-usage.js +21 -12
  152. package/dist/cli-usage.js.map +1 -1
  153. package/dist/concept-input.d.ts +1 -1
  154. package/dist/concept-input.d.ts.map +1 -1
  155. package/dist/concept-input.js +1 -1
  156. package/dist/concept-input.js.map +1 -1
  157. package/dist/conversion-status-contract.d.ts +13 -1
  158. package/dist/conversion-status-contract.d.ts.map +1 -1
  159. package/dist/conversion-status-contract.js +12 -11
  160. package/dist/conversion-status-contract.js.map +1 -1
  161. package/dist/corpus-client.d.ts +11 -7
  162. package/dist/corpus-client.d.ts.map +1 -1
  163. package/dist/corpus-client.js +36 -8
  164. package/dist/corpus-client.js.map +1 -1
  165. package/dist/corpus-inspiration-failure.d.ts +9 -0
  166. package/dist/corpus-inspiration-failure.d.ts.map +1 -0
  167. package/dist/corpus-inspiration-failure.js +49 -0
  168. package/dist/corpus-inspiration-failure.js.map +1 -0
  169. package/dist/corpus-request-error.d.ts +7 -13
  170. package/dist/corpus-request-error.d.ts.map +1 -1
  171. package/dist/corpus-request-error.js +3 -12
  172. package/dist/corpus-request-error.js.map +1 -1
  173. package/dist/draft-corpus-query.d.ts +5 -0
  174. package/dist/draft-corpus-query.d.ts.map +1 -0
  175. package/dist/draft-corpus-query.js +31 -0
  176. package/dist/draft-corpus-query.js.map +1 -0
  177. package/dist/draft-identity.d.ts +2 -0
  178. package/dist/draft-identity.d.ts.map +1 -1
  179. package/dist/draft-identity.js +1 -0
  180. package/dist/draft-identity.js.map +1 -1
  181. package/dist/draft-run.d.ts +5 -1
  182. package/dist/draft-run.d.ts.map +1 -1
  183. package/dist/draft-run.js +10 -4
  184. package/dist/draft-run.js.map +1 -1
  185. package/dist/draft-workspace.d.ts +2 -0
  186. package/dist/draft-workspace.d.ts.map +1 -1
  187. package/dist/draft-workspace.js.map +1 -1
  188. package/dist/http-response-diagnostic.d.ts +12 -0
  189. package/dist/http-response-diagnostic.d.ts.map +1 -0
  190. package/dist/http-response-diagnostic.js +58 -0
  191. package/dist/http-response-diagnostic.js.map +1 -0
  192. package/dist/improve-branch-stage.d.ts.map +1 -1
  193. package/dist/improve-branch-stage.js +6 -25
  194. package/dist/improve-branch-stage.js.map +1 -1
  195. package/dist/improve-concept.d.ts +1 -1
  196. package/dist/improve-concept.d.ts.map +1 -1
  197. package/dist/improve-concept.js +1 -1
  198. package/dist/improve-concept.js.map +1 -1
  199. package/dist/improve-core/concept-input.d.ts +2 -43
  200. package/dist/improve-core/concept-input.d.ts.map +1 -1
  201. package/dist/improve-core/concept-input.js +3 -53
  202. package/dist/improve-core/concept-input.js.map +1 -1
  203. package/dist/improve-core/improve-concept.d.ts +0 -6
  204. package/dist/improve-core/improve-concept.d.ts.map +1 -1
  205. package/dist/improve-core/improve-concept.js +4 -36
  206. package/dist/improve-core/improve-concept.js.map +1 -1
  207. package/dist/improve-core/improve-page-words.d.ts +2 -2
  208. package/dist/improve-core/improve-page-words.d.ts.map +1 -1
  209. package/dist/improve-core/improve-page-words.js +8 -6
  210. package/dist/improve-core/improve-page-words.js.map +1 -1
  211. package/dist/improve-generation-stages.d.ts.map +1 -1
  212. package/dist/improve-generation-stages.js +6 -24
  213. package/dist/improve-generation-stages.js.map +1 -1
  214. package/dist/improve-kit-readme.d.ts.map +1 -1
  215. package/dist/improve-kit-readme.js +1 -0
  216. package/dist/improve-kit-readme.js.map +1 -1
  217. package/dist/improve-source-words.d.ts +14 -0
  218. package/dist/improve-source-words.d.ts.map +1 -0
  219. package/dist/improve-source-words.js +66 -0
  220. package/dist/improve-source-words.js.map +1 -0
  221. package/dist/improve-workspace.d.ts +3 -0
  222. package/dist/improve-workspace.d.ts.map +1 -1
  223. package/dist/improve-workspace.js.map +1 -1
  224. package/dist/index.d.ts +1 -1
  225. package/dist/index.d.ts.map +1 -1
  226. package/dist/index.js +1 -1
  227. package/dist/index.js.map +1 -1
  228. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  229. package/dist/legacy-skill-catalog.js +44 -5
  230. package/dist/legacy-skill-catalog.js.map +1 -1
  231. package/dist/package-client.d.ts +3 -1
  232. package/dist/package-client.d.ts.map +1 -1
  233. package/dist/package-client.js +34 -11
  234. package/dist/package-client.js.map +1 -1
  235. package/dist/prototype-gates.d.ts.map +1 -1
  236. package/dist/prototype-gates.js +1 -1
  237. package/dist/prototype-gates.js.map +1 -1
  238. package/dist/prototype-poststep.js +1 -1
  239. package/dist/prototype-poststep.js.map +1 -1
  240. package/dist/prototype-requests.d.ts +1 -0
  241. package/dist/prototype-requests.d.ts.map +1 -1
  242. package/dist/prototype-requests.js.map +1 -1
  243. package/dist/prototype-revision.d.ts +1 -1
  244. package/dist/prototype-revision.js +1 -1
  245. package/dist/prototype-runner.d.ts.map +1 -1
  246. package/dist/prototype-runner.js +9 -3
  247. package/dist/prototype-runner.js.map +1 -1
  248. package/dist/reference-search-mode.d.ts +27 -2
  249. package/dist/reference-search-mode.d.ts.map +1 -1
  250. package/dist/reference-search-mode.js +29 -2
  251. package/dist/reference-search-mode.js.map +1 -1
  252. package/dist/review-page.js +2 -2
  253. package/dist/review-page.js.map +1 -1
  254. package/dist/review-prototype-gap.js +1 -1
  255. package/dist/review-prototype-gap.js.map +1 -1
  256. package/dist/run-journal-commands.d.ts.map +1 -1
  257. package/dist/run-journal-commands.js +1 -0
  258. package/dist/run-journal-commands.js.map +1 -1
  259. package/dist/skill-installer.d.ts +2 -1
  260. package/dist/skill-installer.d.ts.map +1 -1
  261. package/dist/skill-installer.js +3 -3
  262. package/dist/skill-installer.js.map +1 -1
  263. package/open-design.json +2 -2
  264. package/package.json +5 -4
  265. package/prototype-kit/analyze.mjs +4 -1
  266. package/prototype-kit/build.mjs +29 -4
  267. package/prototype-kit/inventory.mjs +11 -2
  268. package/prototype-kit/lib/local-page.mjs +50 -0
  269. package/prototype-kit/lib/static-server.mjs +1 -0
  270. package/skills/12ui-design/SKILL.md +35 -33
  271. package/skills/12ui-design/improve.md +48 -155
  272. package/skills/12ui-design/inspire.md +3 -1
  273. package/skills/12ui-design/outputs.md +22 -0
@@ -1,198 +1,91 @@
1
1
  # Improve an existing interface
2
2
 
3
- Use `improve` to make one existing interface better or pull a built page back to an approved design. It emits a target and implementation kit; it never edits the owning repository.
3
+ Use Improve to redesign an existing interface or align a built page with its original approved image. `--apply` edits the actual repository; omitting it produces the existing implementation kit for you to apply.
4
4
 
5
- Generating a design is two commands, not one: the first draws candidates and stops, you look at them, and `--pick <slot>` finishes the run. Bringing your own design with `--target` is one command.
5
+ ## Apply to the project
6
6
 
7
- ## Modes
7
+ For a chosen design:
8
8
 
9
- For a live page, pass its URL. The CLI captures the page and extracts a selector-verified DOM document in one local browser context. The plan maps design changes into the page's own selectors.
9
+ 12ui improve <url> --target <approved.png> --repo <repo> --apply --out-dir <directory-outside-repo>
10
10
 
11
- 12ui improve <url>
11
+ The CLI captures the current URL and supplies current and target imagery to the project executor. Retain the project's framework, routes, data, controls, and assets. Target images may abbreviate real content or omit controls; preserve those unless their removal was requested.
12
12
 
13
- For a screenshot, pass PNG, JPEG, or WebP. The kit is unanchored by default. Add `--plan-source-convert` only when a paid source conversion is worth a LayerDoc-to-LayerDoc comparison.
13
+ Local apply supports page scope and PNG/JPEG/WebP targets. Keep an explicit run directory outside the source repository, or omit it to use the CLI's default. The capture/draft/pick stages are available before apply; hosted branch/site/convert/plan stage controls do not apply to this mode.
14
14
 
15
- 12ui improve <image.png> --plan-source-convert
15
+ For a new direction, omit the target and inspect the generated candidates before choosing:
16
16
 
17
- Use `--target` to align or restore a live page to an existing design. A target image skips draft and pick, then buys one fused target conversion. A `*.layerdoc.json` target skips conversion too, so target preparation is free.
17
+ 12ui improve <url> --repo <repo> --apply --out-dir <directory-outside-repo> --direction "<specific visual direction>"
18
+ 12ui improve <url> --repo <repo> --apply --out-dir <directory-outside-repo> --from pick --pick B
18
19
 
19
- 12ui improve <url> --target <image.png|layerdoc.json>
20
+ Inspect the source diff and run the affected build/tests. Render the actual route at the source viewport and a narrower width, including relevant state transitions. Correct observed defects in the owning source and render again; a successful process exit is not visual or behavioral proof. Keep the run and follow its status and recovery instructions.
20
21
 
21
22
  ## What to keep
22
23
 
23
- `--retain` sets what the run holds from the live page, in the four facets the service understands. It leads the concept, so the brief you give is what the design answers.
24
+ `--retain` controls what candidate generation holds from the existing interface:
24
25
 
25
- | facet | held | freed |
26
+ | Facet | Held | Freed |
26
27
  | --- | --- | --- |
27
- | `layout` | section order and positions stay | the page is laid out again from scratch |
28
- | `content` | the same words, data and controls | the words may be rewritten and re-sequenced |
29
- | `assets` | the logo, wordmark and brand imagery | the brand may be replaced |
30
- | `style` | the existing palette, typography and texture | a new visual system |
28
+ | `layout` | Section order and positions | Layout may change |
29
+ | `content` | Words, data, and controls | Wording and sequence may change |
30
+ | `assets` | Logo, wordmark, and brand imagery | Brand imagery may change |
31
+ | `style` | Palette, typography, and texture | Visual system may change |
31
32
 
32
- The default is `assets,content`: keep the brand and the words, rework the layout and the visual system.
33
+ The default is `assets,content`: keep the brand and words while exploring layout and visual style. Add layout only when preserving geometry is part of the intended change.
33
34
 
34
- 12ui improve <url> --retain assets,content --direction "<detailed style-anchored direction>"
35
+ 12ui improve <url> --retain assets,content --direction "<specific visual direction>"
35
36
  12ui improve <url> --retain layout,content,assets
36
37
 
37
- No combination licenses inventing a product fact. With `content` held the page says the same things; with `content` freed the words may be rewritten but every claim, number, offer, and control it states must still be present and true. The /improve page exposes the same four facets as Keep layout, Keep copy, Keep brand, and Keep style.
38
-
39
- ## Direction
40
-
41
- Use `--direction` to steer generation. Give detailed, style-anchored direction: state the intended hierarchy, rhythm, typography, surfaces, color, controls, and mood. Detailed direction beat vague criticism in the measured prompt pass.
42
-
43
- `--direction` accepts at most 600 characters, and the CLI refuses a longer one before anything is captured, drawn, or bought. That is not the 1485-character concept limit the `--concept` flags carry: improve sends a 1485-character concept and reserves 885 of it for the retain mandates `--retain` selects and the no-invention clause it always sends, so 600 is what the flag has left. The reservation is the LONGEST assembly of those mandates, so a brief accepted under one `--retain` set is accepted under every other. Compose within 600 rather than trimming after a refusal; the refusal names the limit, what was written, and how much to cut.
44
-
45
- Never name emptiness or thin content as a defect. Models fabricate UI to fill it. The default concept already says to keep all real content, data, and controls and invent nothing.
46
-
47
- ## Candidates and picking
48
-
49
- Generate several real alternatives with `--candidates` (2 to 16, default 4); inspect them, then select one with `--pick`. The floor is 2 because a draft draws alternatives to choose between — to work from a single design you already have, pass `--target` instead, which skips draft and pick.
50
-
51
- `--pick` has no default. Run without it and the command stops after the draw, prints where the candidates are and the exact command that continues, and buys no conversion — converting a candidate nobody chose spends money on a guess, and a conversion cannot be cancelled once it starts. Two commands, and you look at the PNGs in between:
52
-
53
- 12ui improve <url> --out-dir <kit-dir>
54
- 12ui improve <url> --out-dir <kit-dir> --from pick --pick B
55
-
56
- Pass `--pick` up front only when the choice is already made (a scripted run that takes whatever the draw gives). The kit keeps every candidate, so re-picking never buys capture or draft again:
57
-
58
- 12ui improve <url> --out-dir <kit-dir> --from pick --pick C
59
-
60
- Picking is free. The new winner still needs its target conversion and plan; their stable keys replay any already-settled work instead of buying it twice. Re-picking does discard the conversion the old winner paid for: there is no cancel, so that conversion keeps running and keeps billing, and its id is recorded in `improve.json` under `abandonedConversions` and shown in the kit's README.
61
-
62
- ### Buying again: `--fresh` vs `--redraw`
63
-
64
- `--fresh` re-buys **one conversion of the same settled winner** under a new idempotency key, records the abandoned conversion identity, and leaves capture, draft and pick untouched. It is for a stuck conversion of a design you still want.
65
-
66
- `--redraw` re-buys **the whole draw**: it discards draft, pick, convert and plan, moves `candidates/` aside to `candidates.previous/`, and draws new candidates. It costs a full draft, so use it only when none of the candidates is worth picking.
67
-
68
- 12ui improve <url> --out-dir <kit-dir> --redraw --direction "<new direction>"
69
-
70
- `--redraw` is the one flag allowed to change what the draw is: `--direction`, `--candidates` and `--retain` may differ from what the kit recorded, and the new values are written down before the draft runs. Every other flag still has to match the record. Any conversion the redraw discards is appended to `abandonedConversions`, because it keeps running and keeps billing.
71
-
72
- ## Kit
73
-
74
- - `improve.json` records inputs, stage settlements, price ceilings, service identities, and replay counts.
75
- - `capture/` and `current.domdoc.json` hold the URL screenshot and selector-verified DOM extraction. Screenshot mode keeps `source.png` instead.
76
- - `candidates/` keeps every generated option. `winner.png` is the explicit selection or supplied target image.
77
- - `target/` holds the target LayerDoc, responsive HTML when generated, and extracted assets.
78
- - If responsive HTML fails or reaches the improve deadline, the kit warns that its free HTML fallback is fixed-layout and still continues to the LayerDoc-based plan. That run also writes `plan/STALL.md` and says so in its summary and README status: it is a recovered run, not a clean one.
79
- - `plan/` holds the selector diff, annotated implementation plan, `token-patch.css`, and added-element specs or assets.
80
- - `token-patch.css` never imports a font over the network. When the design uses a Google font, the patch declares it as a comment and a CSS custom property named for the family, and the plan and README name the family under "Fonts": load it the way the repository already loads fonts — self-host it, or add it to the existing loader — or keep the current family and skip that token.
81
-
82
- URL plans pass only with at least 60% plausible DOM-side coverage after content, spatial, and neighbour matching. If the gate blocks, use `plan/GATE.md` to inspect the mismatch. The target HTML and LayerDoc remain a sidecar source of truth, but do not treat an unsafe selector mapping as an inline patch.
83
-
84
- ## Using the kit
85
-
86
- A kit whose `pick` stage reads INCOMPLETE is a drafts-only kit. The CLI stops after the draw by design: it converted nothing and exited 0. Inspect the candidate PNGs in `candidates/`, then run the pick. The pick is mandatory — always run it, and the run's last line prints the exact command under `Next:`:
87
-
88
- 12ui improve <url> --out-dir <kit> --from pick --pick <slot>
38
+ No combination licenses inventing a product fact. Preserve real claims, numbers, offers, data, and controls. Do not describe sparse real content as a defect to fill with inventions. Leave at least one facet free so generation has a meaningful change to make.
89
39
 
90
- Convert and plan run from there. Exit code 0 with an INCOMPLETE kit means nothing has been picked yet, not that the run failed. Never work around the checkpoint by approximating the design in CSS.
40
+ Use `--direction` for concrete hierarchy, typography, surfaces, color, controls, and mood. Concept and direction text have no character limit. `--candidates` accepts 2–16 and defaults to four; an already approved image uses `--target` instead.
91
41
 
92
- Read `README.md` first. It carries the run's honest status, the assets table for this kit, and the recovery commands when a stage did not settle. The table's ship column is the instruction: copy the files marked ship, keep one of any alternate resolution, and read the references without shipping them.
42
+ ## Hosted implementation kits
93
43
 
94
- A kit written inside the repository is local audit evidence, not source: when `--out-dir` sits under a `.improve/` directory in a git working tree the CLI appends a `.improve/` rule to the repository root `.gitignore` if nothing ignores it already, and for any other in-repo out-dir it prints one line telling you to ignore that path before committing — never commit the kit.
44
+ Without `--apply`, URL input produces a DOM-anchored implementation kit; image input produces an unanchored kit. An image target skips draft and pick. A compatible LayerDoc target can reuse native structure for kit planning, but the original approved image remains the visual authority.
95
45
 
96
- Plates and cutouts arrive at full resolution and run over a megabyte. Pick one resolution per layer and optimise the PNG — or convert it to WebP where the repository already uses one — before committing, keeping the filename stem so the plan still matches.
97
-
98
- ### Asset roles
99
-
100
- - clean plate (`clean-N`): the backdrop with the foreground artwork removed. Use it as the background layer, at full strength. A conversion can emit several: only the base plate is the page's background, and the README marks every other one an alternate backdrop — use it only if you omit the layer it removed as well.
101
- - cutout (`cutout-N`): the foreground artwork as an alpha PNG. This is the imagery. Copy it into the repo and place it at its bounds; never redraw it in CSS.
102
- - upscaled plate / upscaled region (`upscaled-*`): a higher-resolution copy of a plate or region for crisp rendering; pick one resolution, do not ship both.
103
- - source crop (`crop-N`): the layer cropped straight out of the source image; prefer that layer's cutout when one exists.
104
- - `winner.png`: the whole design; the reference for every visual decision.
105
-
106
- ### Raster first
107
-
108
- When the target LayerDoc declares a raster layer, copy its file into the repository and reference it. Never approximate an existing asset with CSS. A hero can be a single plate or a single cutout, and the plan lists them before tokens for that reason. Keep any scrim light — at most 35% opacity — and state in your report why one is used.
109
-
110
- ### When a stage stalls
111
-
112
- Wait to the no-progress bound the CLI prints; never stop a conversion that is still publishing a live service stage or active lane. `--convert-stall-seconds` bounds each hosted wait the convert stage makes, including the free fixed-layout derivation, only when no new live status or progress is observed. It defaults to 960s (16m) for standard and pro — 20% above the measured 655/642/796s tall-landing walls, rounded to a minute, and four times the 240s standard typical — and 300s for fast. At a true no-progress bound the CLI buys nothing. It either derives fixed-layout HTML free from a LayerDoc that did land, or — when nothing landed and there is nothing to derive — stops and hands the conversion back by id, because that conversion is still running, still billing, and cannot be cancelled. The wait is not silent: a `[wait]` line every minute names the elapsed time, the no-progress bound, the conversion id, and the service stage.
113
-
114
- A fixed-layout fallback still finishes the kit and still writes `plan/STALL.md`, which names what stalled, how long it waited, and the `12ui resume <conversion-id> --out-dir <kit>/target` that collects `winner.html` when the original responsive export completes. The plan remains based on the fixed-layout fallback; collection does not silently recast it as responsive. `resume` recovers an existing purchase and buys nothing. Do not re-run improve to chase a responsive target.
115
-
116
- One operator command dispatches at most one conversion, on every model. Resuming with `--from convert` rebuilds the same idempotency key, so it re-attaches to the conversion the kit already bought however many times you run it, and `12ui resume <conversion-id> --out-dir <kit>/target` collects that conversion directly once it finishes. `--fresh` is the only way to buy another, and it is you asking. Every conversion the kit dispatches is priced in `improve.json` before it starts, under `conversionAttempts` and `stages.convert`, so the kit can state its own spend even when nothing settled.
117
-
118
- Past that, `plan/STALL.md` names the stage, the hosted run, any abandoned conversions, and the recovery, each command annotated with what it spends:
119
-
120
- 12ui improve <same input> --out-dir <kit> --from convert # resumes; settled stages replay
121
- 12ui convert <kit>/winner.png --output html # buys one conversion
122
- 12ui improve <url> --target <kit>/winner.png # buys one fused target conversion
123
-
124
- The third form is offered for a URL input only. Once the LayerDoc exists, carry its raster layers as real assets — copy the files and reference them. Do not approximate the design's layout or text in CSS from the PNG while a stage is incomplete; resume or convert first. The README and `STALL.md` print that one sentence, so an incomplete kit cannot tell you two things.
125
-
126
- `plan/STALL.md` has a lifecycle: the CLI writes it at its own bound as well as on a signal, and a later run that settles the stage REPLACES it with a short resolved note naming when the kit stalled and when it settled. A file saying INCOMPLETE beside a README saying settled is not a state this kit can be in; read the README for status either way.
127
-
128
- A stopped run writes the same `STALL.md` and README as a stalled one, at whatever stage it had reached (a signal that arrives after the last requested stage settled writes no `STALL.md` — that run is complete), and closes the kit's `journal.jsonl` with a terminal event naming the stop or the stall. `12ui next <kit>` reads that event and still reports the hosted run as live, because it is: stopping the CLI does not stop the conversion, and there is no cancel — a conversion nobody collects runs to completion and bills. `abandonedConversions` in `improve.json` lists the conversions YOU walked away from — a re-pick, a redraw, a `--fresh`; the CLI never adds one of its own. A conversion a stopped or stalled run was still waiting on is not abandoned: every dispatch writes its idempotency key to `conversionAttempts` before it happens, so `STALL.md` names the run the resume attaches to and `--from convert` re-attaches to it instead of buying another. SIGKILL is the exception: it runs no handler, so the kit is not written and the journal's last progress line is the record.
129
-
130
- ### When the coverage gate blocks
131
-
132
- `plan/GATE.md` replaces `plan-annotated.md` and `token-patch.css` when the captured page and the target are too far apart to anchor. Nothing is missing: the target, its assets, and the raster layers to carry are all still in the kit, and `GATE.md` lists them. Read it, carry the raster layers, and re-capture the page in the state the target depicts before asking for an anchored plan again.
133
-
134
- ### Fidelity self-check
135
-
136
- Before committing, screenshot the page and put it beside its approved source. Health checks — legibility, console, tests — do not answer whether the design landed. For the required target-based closeout of a non-trivial implementation, use [Restore after build](#restore-after-build).
137
-
138
- ### Never discard
139
-
140
- `winner.png`; every cutout and plate the assets table names; all real content, data, controls, routes, and tests.
141
-
142
- ## Replay and pricing
143
-
144
- Stages run capture, draft, pick, convert, then plan. Resume with `--from` and `--to`; settled stages replay and never buy again. Run `--dry-run` first for a zero-network, per-stage ceiling.
145
-
146
- Current ceilings are $0.001 for corpus search, $0.001 for the hosted plan, $0.03 per draft candidate, $0.05/$0.45/$0.90 for fast/standard/pro conversion, and $0.10 for the standard responsive export. Target LayerDoc preparation is free. Local capture, pick, DOM matching, gate, and annotation are free.
46
+ 12ui improve <url> --target <image.png|layerdoc.json> --repo <repo> --out-dir <kit>
47
+ 12ui improve <image.png> --plan-source-convert
147
48
 
148
- ## Whole-site polish
49
+ Use `--plan-source-convert` only when the extra source conversion is useful for the image-input plan. For a new direction, the kit stops after drawing candidates:
149
50
 
150
- Use site scope to carry one accepted root design across a live site's key pages. It accepts URL input only: the root is captured and improved as usual, then its accepted winner becomes the visual-system reference for each captured current page. The model receives the current page and accepted root as distinct references; by default, the current page comes first so its structure and content remain the editing anchor.
51
+ 12ui improve <url> --out-dir <kit>
52
+ 12ui improve <url> --out-dir <kit> --from pick --pick B
151
53
 
152
- 12ui improve <url> --scope site --direction "<detailed style-anchored direction>" --out-dir <kit-dir>
54
+ Read the kit README for status, assets, plan location, and recovery. A pending pick is an expected pause, not completion. `--redraw` requests new candidates when none are suitable; `--fresh` requests another conversion of the same winner. These are new work, so use them only when that change is intended and follow the CLI's accounting rather than treating them as ordinary resume.
153
55
 
154
- `--pages` caps free one-hop discovery, including the root, from 2 to 8 pages (default 5). Repeat `--page <url>` to replace discovery with explicit same-origin pages. `--page-concurrency` controls 1–10 simultaneous page conversions (default 3). `--reference-order current-first|root-first` records which image order was sent; the default is `current-first`.
56
+ 12ui improve <url> --out-dir <kit> --redraw --direction "<new visual direction>"
155
57
 
156
- Site scope runs seven stages: `capture → draft → pick → branch → convert → plan → site`. Capture uses one browser and one context for the root and every page. Draft and pick remain root-only. Branch produces one polished image for each non-root page from the accepted root and that page's current screen; the root is never sent as a branch screen. Convert writes the root target once, then one converted target for every non-root page. If responsive HTML is unavailable for the root or any page, that LayerDoc still drives its plan; the kit records the gap and includes free fixed-layout HTML when derivation succeeds. Plan creates a DOM-anchored plan for the root and every non-root page; a blocked page writes `GATE.md` but does not block the rest of the site. The final site stage rolls those plans up, with the root listed as `root`.
58
+ The kit does not edit code. Apply the plan in the owning source. If its selector mapping is blocked, inspect `plan/GATE.md`, retain the target assets, and capture the actual state the target depicts before requesting another mapping. Do not apply unsafe selector patches or silently treat fixed-layout output as responsive. The kit's README and recovery command report the available artifacts.
157
59
 
158
- The site kit has this exact shape:
60
+ ### Assets and typography
159
61
 
160
- ```text
161
- <out-dir>/
162
- improve.json # v2 record
163
- capture/source.png current.domdoc.json candidates/ winner.png target/ plan/ # root, as today
164
- pages/<id>/capture/source.png
165
- pages/<id>/current.domdoc.json
166
- pages/<id>/polished.png # branch output
167
- pages/<id>/target/polished.layerdoc.json (+.assets) polished.html or derived.fixed.html when available (+.assets)
168
- pages/<id>/plan/{diff.json,changes.md,plan-annotated.md,token-patch.css,assets/ | GATE.md}
169
- site-plan/{tokens.css,shared-shell.md,pages.md,APPLY.md}
170
- README.md
171
- ```
62
+ Use the kit asset table: ship files marked for shipping, keep one resolution of each asset, and keep reference images as references. Optimise large PNGs or use the repository's existing WebP flow while retaining stems used by the plan.
172
63
 
173
- `site-plan/tokens.css` deduplicates token patches and records conflicts, while `shared-shell.md` lists recurring header, navigation, sidebar, or footer changes once with their pages. `pages.md` reports every page's URL, gate, coverage, delta counts, polished image, and target HTML. `APPLY.md` is the coding-model brief: apply tokens through the repository theme entry point, apply shared shell changes once, then apply page residue in order and added-element specs with their assets. It also requires no invention, no dead controls, no hardcoded identity, and configurable data to remain configurable; `--repo` file hints are folded in when supplied.
64
+ - Clean plates are backgrounds with removed foreground artwork. Alternate plates are alternatives, not extra layers to stack.
65
+ - Cutouts are real foreground imagery with transparency. Copy and position them rather than approximating them in CSS.
66
+ - Upscaled files are higher-resolution alternatives; do not ship both resolutions unnecessarily.
67
+ - Source crops preserve original pixels; prefer a supplied cutout when transparent foreground imagery is needed.
174
68
 
175
- The kit does not apply code. Apply `APPLY.md`, then run `12ui improve <url> --scope site --out-dir <kit> --recheck`. Recheck reuses the existing kit, opens one browser/context for the root and every site page, and writes `recheck/<n>/pages/<id>/` captures and plans plus `recheck/<n>/report.md`; it never replays settled stages or buys work. Use the report's before→after coverage and matched/added/removed counts to decide whether another focused implementation turn is warranted. Pages without a kept target are captured and reported as unavailable rather than blocking the other pages.
69
+ Load identified fonts through the repository's existing font mechanism. Inspect overlays and scrims against the source so they do not obscure the artwork. Preserve the original winner, real assets, application data, controls, routes, and tests. Keep bulky kit audit output outside committed application source.
176
70
 
177
- ## Workflow patterns
71
+ ## Whole-site kits
178
72
 
179
- ### Improve in place
73
+ Site scope carries an accepted root design across the site's pages. It is a hosted kit workflow, not local `--apply`:
180
74
 
181
- Run against the existing page with no reference. State the intended style precisely. The first command stops at the draw; look at the candidate PNGs, then pick one and let it finish, and apply the selector-anchored plan in the owning repository.
75
+ 12ui improve <url> --scope site --direction "<specific visual direction>" --out-dir <kit>
182
76
 
183
- 12ui improve <url> --direction "<detailed style-anchored direction>" --repo <repo> --out-dir <kit-dir>
184
- 12ui improve <url> --repo <repo> --out-dir <kit-dir> --from pick --pick <slot>
77
+ The accepted root supplies the visual system; each current page remains its own content and structure reference. Read the site roll-up's `APPLY.md`, apply shared shell/theme changes once, then each page's remaining changes. Inspect every target and any page whose mapping is blocked.
185
78
 
186
- ### Restore after build
79
+ After applying a settled site kit:
187
80
 
188
- After draft, convert, and build, close every non-trivial implementation against each distinct page or state's original winner image or unchanged LayerDoc. Run against the build URL after the requested functionality and content are in place. A continuous Branch page may retain ordered approved screen PNGs and page HTML without a composite full-page image or LayerDoc. In that case, use target-based Improve for every available original approved target or state, then independently review the remaining rendered regions against those ordered approved screens. Do not treat one top viewport as proof for lower regions, substitute the root image, or use `--scope site` or `--redraw` to fabricate a target. The result is a minimal-delta plan in the build's own selectors, pulling it back inline without disrupting the working build. Target skips draft and pick; a matching LayerDoc avoids conversion and a PNG target buys one target conversion. Retain the requested behavior and content, apply the kit, and compare the rendered result with the source at relevant widths and transitions. `--recheck` only accepts a settled site kit, and a site run creates a separate branching workflow. Do not buy repeated conversions to chase perfection. The coverage gate blocks when drift is no longer safely mappable.
81
+ 12ui improve <url> --scope site --out-dir <kit> --recheck
189
82
 
190
- 12ui improve <build-url> --target <original-winner.png|original.layerdoc.json> --repo <repo> --out-dir <restore-kit>
83
+ Recheck reports the existing kit's pages against its kept targets. Use the evidence to decide whether a focused correction is needed. See command help for page selection and concurrency controls.
191
84
 
192
- ### Parallel build
85
+ ## Align after integration
193
86
 
194
- Recommended: start draft, pick a direction, then start conversion while the coding model begins its build from the picked image. Model builds usually recover the general pieces, not the design's pixel fidelity. When both are ready, align the running build to the original winner or converted LayerDoc.
87
+ Compare each distinct page or state with its original approved image after requested functionality and content are present. A continuous Branch page may keep ordered approved viewport PNGs without one full-page image. Review each corresponding rendered region against those originals; a top viewport does not prove the lower page. Do not fabricate a new target through redraw or site branching to make an existing mismatch disappear.
195
88
 
196
- 12ui improve <build-url> --target <picked-image.png|converted.layerdoc.json> --repo <repo> --out-dir <convergence-kit>
89
+ For a concrete mismatch, use a focused source edit or project apply with the matching original target. Preserve intended content and behavior, then re-render relevant widths and transitions. No mandatory broad LLM repair pass or repeated conversion is required to close an implementation that already matches.
197
90
 
198
- Convergence depends on the build retaining the design's rough structure. Trust the coverage gate: a block means the build drifted too far for a safe inline selector plan.
91
+ The pick is mandatory when generating candidates. Exit code 0 with an INCOMPLETE kit means nothing has been picked yet, not that the run failed. Never work around the checkpoint by approximating the design in CSS.
@@ -2,7 +2,9 @@
2
2
 
3
3
  Use this only when reference imagery itself is needed, or when you need direct control over corpus retrieval.
4
4
 
5
- 12ui corpus inspire --query "<product, audience, surface, goal, personality>" --out-dir <directory> --count 4
5
+ 12ui corpus inspire --query "<surface, layout, typography, imagery, palette; 400 chars max>" --out-dir <directory> --count 4
6
+
7
+ Hedge caption generation accepts at most 400 characters after whitespace normalization. Longer queries automatically use balanced retrieval with the complete text; the CLI explains and records the change. Use a short visual caption when you want hedge retrieval.
6
8
 
7
9
  `hedge` is the default mode for a text query: it spreads the first references across distinct directions while holding the query, carries retrieval evidence, and its returned order is authoritative. Use `--mode direct|balanced|adventurer|hedge` to select another locked retrieval policy. Preserve manifest order: it is ranked and diversified.
8
10
 
@@ -0,0 +1,22 @@
1
+ # Outputs and execution
2
+
3
+ Use `12ui capabilities` and `12ui <command> --help` for the installed CLI's supported inputs, outputs, and engine choices. The caller may be Codex, Claude, or another supported client; the CLI owns execution setup, selection, cost reporting, and recovery. Do not locate skill runtime scripts or assemble a separate authentication/capture handoff.
4
+
5
+ | Requested result | Input and boundary |
6
+ | --- | --- |
7
+ | Editable HTML/CSS and assets | Convert the approved image to `html`. Local HTML is complete without a LayerDoc. |
8
+ | Assets, PNG, JPG, WebP, PDF, React | Convert a completed local run or output directory to one requested format. Raster and PDF use a browser; React is whole-page JSX, CSS, and assets, not a behavior-complete application. |
9
+ | LayerDoc, fixed HTML, SVG, PSD, PPTX, Sketch | Requires native LayerDoc conversion or a compatible hosted conversion identity. Local HTML cannot be relabeled as LayerDoc. |
10
+ | Continuous pages and application states | Branch owns page/state grouping and prototype assembly. Follow its supported conversion path and inspect the resulting mapping. |
11
+
12
+ When a native design deliverable is requested up front:
13
+
14
+ 12ui convert <source-image> --output layerdoc|html_fixed|svg|psd|pptx|sketch
15
+
16
+ Reuse a compatible hosted conversion for further native derivations:
17
+
18
+ 12ui convert <conversion-id> --output html_fixed,svg,pdf --out-dir <dir> --idempotency-key <stable-key>
19
+
20
+ A new LayerDoc requirement after local conversion is a new operation on the original source, not an export of edited local HTML. Keep that distinction explicit and follow the CLI's supported next command. Never silently replace a failed local operation with a hosted purchase.
21
+
22
+ `--engine auto|codex|api` controls conversion execution when needed; auto is the default. For supported new conversions, auto selects ready local Codex regardless of the calling client; otherwise it selects API before starting, while saved runs keep their recorded engine. Branch image generation and optional prototype interaction labelling remain hosted even when conversion is local. Image execution is independent: before a new local run, the CLI selects external images when `OPENAI_API_KEY` is available, otherwise native images through Codex account access. An explicit image backend or saved run keeps its choice; explicit external images require the separate key before inference starts. Native does not imply zero cost or a known underlying image model. Project apply requires a ready Codex engine; without it, use the implementation-kit path and apply the plan in the calling coding client. Keep run records and use their status/recovery commands instead of restarting uncertain paid work.