@12ui/design 0.2.56 → 0.2.58

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 (429) hide show
  1. package/SKILL.md +1 -1
  2. package/dist/artifact-materializer.d.ts.map +1 -1
  3. package/dist/artifact-materializer.js +4 -1
  4. package/dist/artifact-materializer.js.map +1 -1
  5. package/dist/branch-client.d.ts +86 -2
  6. package/dist/branch-client.d.ts.map +1 -1
  7. package/dist/branch-client.js +31 -0
  8. package/dist/branch-client.js.map +1 -1
  9. package/dist/cli-arguments.d.ts.map +1 -1
  10. package/dist/cli-arguments.js +3 -1
  11. package/dist/cli-arguments.js.map +1 -1
  12. package/dist/cli-capabilities.d.ts +1 -1
  13. package/dist/cli-conversion-derivation.js +2 -2
  14. package/dist/cli-conversion-derivation.js.map +1 -1
  15. package/dist/cli-convert-command.d.ts +2 -0
  16. package/dist/cli-convert-command.d.ts.map +1 -1
  17. package/dist/cli-convert-command.js +176 -38
  18. package/dist/cli-convert-command.js.map +1 -1
  19. package/dist/cli-corpus-command.js +2 -2
  20. package/dist/cli-corpus-command.js.map +1 -1
  21. package/dist/cli-corpus-evidence.d.ts.map +1 -1
  22. package/dist/cli-corpus-evidence.js +2 -1
  23. package/dist/cli-corpus-evidence.js.map +1 -1
  24. package/dist/cli-corpus-reference-downloads.d.ts +1 -0
  25. package/dist/cli-corpus-reference-downloads.d.ts.map +1 -1
  26. package/dist/cli-corpus-reference-downloads.js +13 -3
  27. package/dist/cli-corpus-reference-downloads.js.map +1 -1
  28. package/dist/cli-corpus-types.d.ts +2 -0
  29. package/dist/cli-corpus-types.d.ts.map +1 -1
  30. package/dist/cli-draft-command.d.ts +9 -0
  31. package/dist/cli-draft-command.d.ts.map +1 -1
  32. package/dist/cli-draft-command.js +26 -1
  33. package/dist/cli-draft-command.js.map +1 -1
  34. package/dist/cli-help/design.d.ts +7 -4
  35. package/dist/cli-help/design.d.ts.map +1 -1
  36. package/dist/cli-help/design.js +23 -6
  37. package/dist/cli-help/design.js.map +1 -1
  38. package/dist/cli-help/index.d.ts +9 -6
  39. package/dist/cli-help/index.d.ts.map +1 -1
  40. package/dist/cli-help/meta.d.ts +2 -2
  41. package/dist/cli-help/meta.d.ts.map +1 -1
  42. package/dist/cli-help/meta.js +4 -1
  43. package/dist/cli-help/meta.js.map +1 -1
  44. package/dist/cli-improve-command.d.ts.map +1 -1
  45. package/dist/cli-improve-command.js +273 -28
  46. package/dist/cli-improve-command.js.map +1 -1
  47. package/dist/cli-redesign-command.d.ts.map +1 -1
  48. package/dist/cli-redesign-command.js +97 -24
  49. package/dist/cli-redesign-command.js.map +1 -1
  50. package/dist/cli-run.d.ts.map +1 -1
  51. package/dist/cli-run.js +13 -3
  52. package/dist/cli-run.js.map +1 -1
  53. package/dist/cli-spend-command.d.ts +12 -1
  54. package/dist/cli-spend-command.d.ts.map +1 -1
  55. package/dist/cli-spend-command.js +94 -2
  56. package/dist/cli-spend-command.js.map +1 -1
  57. package/dist/cli-usage.js +5 -5
  58. package/dist/cli-usage.js.map +1 -1
  59. package/dist/concept-input.d.ts +6 -56
  60. package/dist/concept-input.d.ts.map +1 -1
  61. package/dist/concept-input.js +6 -65
  62. package/dist/concept-input.js.map +1 -1
  63. package/dist/conversion-client.d.ts +92 -3
  64. package/dist/conversion-client.d.ts.map +1 -1
  65. package/dist/conversion-client.js +317 -23
  66. package/dist/conversion-client.js.map +1 -1
  67. package/dist/corpus-client.d.ts +7 -1
  68. package/dist/corpus-client.d.ts.map +1 -1
  69. package/dist/corpus-client.js +3 -2
  70. package/dist/corpus-client.js.map +1 -1
  71. package/dist/corpus-reference-download-retry.d.ts +68 -0
  72. package/dist/corpus-reference-download-retry.d.ts.map +1 -0
  73. package/dist/corpus-reference-download-retry.js +123 -0
  74. package/dist/corpus-reference-download-retry.js.map +1 -0
  75. package/dist/corpus-request-error.d.ts +17 -0
  76. package/dist/corpus-request-error.d.ts.map +1 -0
  77. package/dist/corpus-request-error.js +21 -0
  78. package/dist/corpus-request-error.js.map +1 -0
  79. package/dist/draft-run.d.ts +15 -0
  80. package/dist/draft-run.d.ts.map +1 -1
  81. package/dist/draft-run.js +32 -5
  82. package/dist/draft-run.js.map +1 -1
  83. package/dist/draft-workspace.d.ts +2 -1
  84. package/dist/draft-workspace.d.ts.map +1 -1
  85. package/dist/draft-workspace.js.map +1 -1
  86. package/dist/hosted-draft-identity.d.ts +9 -0
  87. package/dist/hosted-draft-identity.d.ts.map +1 -1
  88. package/dist/hosted-draft-identity.js +2 -0
  89. package/dist/hosted-draft-identity.js.map +1 -1
  90. package/dist/improve-added-specs.d.ts +12 -31
  91. package/dist/improve-added-specs.d.ts.map +1 -1
  92. package/dist/improve-added-specs.js +64 -152
  93. package/dist/improve-added-specs.js.map +1 -1
  94. package/dist/improve-artifact-writer.d.ts +13 -0
  95. package/dist/improve-artifact-writer.d.ts.map +1 -0
  96. package/dist/improve-artifact-writer.js +27 -0
  97. package/dist/improve-artifact-writer.js.map +1 -0
  98. package/dist/improve-bootstrap-history.d.ts +21 -0
  99. package/dist/improve-bootstrap-history.d.ts.map +1 -0
  100. package/dist/improve-bootstrap-history.js +43 -0
  101. package/dist/improve-bootstrap-history.js.map +1 -0
  102. package/dist/improve-bootstrap-secret.d.ts +35 -0
  103. package/dist/improve-bootstrap-secret.d.ts.map +1 -0
  104. package/dist/improve-bootstrap-secret.js +61 -0
  105. package/dist/improve-bootstrap-secret.js.map +1 -0
  106. package/dist/improve-branch-stage.d.ts +10 -0
  107. package/dist/improve-branch-stage.d.ts.map +1 -0
  108. package/dist/improve-branch-stage.js +325 -0
  109. package/dist/improve-branch-stage.js.map +1 -0
  110. package/dist/improve-capture-redirect.d.ts +65 -0
  111. package/dist/improve-capture-redirect.d.ts.map +1 -0
  112. package/dist/improve-capture-redirect.js +85 -0
  113. package/dist/improve-capture-redirect.js.map +1 -0
  114. package/dist/improve-capture-words.d.ts +43 -0
  115. package/dist/improve-capture-words.d.ts.map +1 -0
  116. package/dist/improve-capture-words.js +25 -0
  117. package/dist/improve-capture-words.js.map +1 -0
  118. package/dist/improve-concept.d.ts +6 -7
  119. package/dist/improve-concept.d.ts.map +1 -1
  120. package/dist/improve-concept.js +12 -38
  121. package/dist/improve-concept.js.map +1 -1
  122. package/dist/improve-conversion-attempts.d.ts +21 -9
  123. package/dist/improve-conversion-attempts.d.ts.map +1 -1
  124. package/dist/improve-conversion-attempts.js +6 -1
  125. package/dist/improve-conversion-attempts.js.map +1 -1
  126. package/dist/improve-conversion-stage.d.ts +20 -2
  127. package/dist/improve-conversion-stage.d.ts.map +1 -1
  128. package/dist/improve-conversion-stage.js +386 -178
  129. package/dist/improve-conversion-stage.js.map +1 -1
  130. package/dist/improve-convert-progress.d.ts +44 -0
  131. package/dist/improve-convert-progress.d.ts.map +1 -0
  132. package/dist/improve-convert-progress.js +47 -0
  133. package/dist/improve-convert-progress.js.map +1 -0
  134. package/dist/improve-convert-resilience.d.ts +96 -58
  135. package/dist/improve-convert-resilience.d.ts.map +1 -1
  136. package/dist/improve-convert-resilience.js +128 -72
  137. package/dist/improve-convert-resilience.js.map +1 -1
  138. package/dist/improve-core/concept-input.d.ts +80 -0
  139. package/dist/improve-core/concept-input.d.ts.map +1 -0
  140. package/dist/improve-core/concept-input.js +92 -0
  141. package/dist/improve-core/concept-input.js.map +1 -0
  142. package/dist/improve-core/improve-added-specs.d.ts +62 -0
  143. package/dist/improve-core/improve-added-specs.d.ts.map +1 -0
  144. package/dist/improve-core/improve-added-specs.js +160 -0
  145. package/dist/improve-core/improve-added-specs.js.map +1 -0
  146. package/dist/improve-core/improve-artifacts.d.ts +18 -0
  147. package/dist/improve-core/improve-artifacts.d.ts.map +1 -0
  148. package/dist/improve-core/improve-artifacts.js +4 -0
  149. package/dist/improve-core/improve-artifacts.js.map +1 -0
  150. package/dist/improve-core/improve-concept.d.ts +7 -0
  151. package/dist/improve-core/improve-concept.d.ts.map +1 -0
  152. package/dist/improve-core/improve-concept.js +185 -0
  153. package/dist/improve-core/improve-concept.js.map +1 -0
  154. package/dist/improve-core/improve-discovery.d.ts +84 -0
  155. package/dist/improve-core/improve-discovery.d.ts.map +1 -0
  156. package/dist/improve-core/improve-discovery.js +154 -0
  157. package/dist/improve-core/improve-discovery.js.map +1 -0
  158. package/dist/improve-core/improve-dom-anchor.d.ts.map +1 -0
  159. package/dist/{improve-dom-anchor.js → improve-core/improve-dom-anchor.js} +2 -0
  160. package/dist/improve-core/improve-dom-anchor.js.map +1 -0
  161. package/dist/improve-core/improve-dom-diff.d.ts +59 -0
  162. package/dist/improve-core/improve-dom-diff.d.ts.map +1 -0
  163. package/dist/improve-core/improve-dom-diff.js +151 -0
  164. package/dist/improve-core/improve-dom-diff.js.map +1 -0
  165. package/dist/improve-core/improve-dom-extract.d.ts.map +1 -0
  166. package/dist/{improve-dom-extract.js → improve-core/improve-dom-extract.js} +2 -0
  167. package/dist/improve-core/improve-dom-extract.js.map +1 -0
  168. package/dist/improve-core/improve-dom-gate.d.ts +49 -0
  169. package/dist/improve-core/improve-dom-gate.d.ts.map +1 -0
  170. package/dist/improve-core/improve-dom-gate.js +99 -0
  171. package/dist/improve-core/improve-dom-gate.js.map +1 -0
  172. package/dist/improve-core/improve-dom-neighbour.d.ts.map +1 -0
  173. package/dist/{improve-dom-neighbour.js → improve-core/improve-dom-neighbour.js} +2 -0
  174. package/dist/improve-core/improve-dom-neighbour.js.map +1 -0
  175. package/dist/improve-core/improve-dom-scale.d.ts.map +1 -0
  176. package/dist/{improve-dom-scale.js → improve-core/improve-dom-scale.js} +2 -0
  177. package/dist/improve-core/improve-dom-scale.js.map +1 -0
  178. package/dist/improve-core/improve-icon-svg.d.ts +29 -0
  179. package/dist/improve-core/improve-icon-svg.d.ts.map +1 -0
  180. package/dist/improve-core/improve-icon-svg.js +85 -0
  181. package/dist/improve-core/improve-icon-svg.js.map +1 -0
  182. package/dist/improve-core/improve-kit-asset-model.d.ts +177 -0
  183. package/dist/improve-core/improve-kit-asset-model.d.ts.map +1 -0
  184. package/dist/improve-core/improve-kit-asset-model.js +269 -0
  185. package/dist/improve-core/improve-kit-asset-model.js.map +1 -0
  186. package/dist/improve-core/improve-layerdoc-diff.d.ts.map +1 -0
  187. package/dist/{improve-layerdoc-diff.js → improve-core/improve-layerdoc-diff.js} +2 -0
  188. package/dist/improve-core/improve-layerdoc-diff.js.map +1 -0
  189. package/dist/{improve-layerdoc-types.d.ts → improve-core/improve-layerdoc-types.d.ts} +9 -0
  190. package/dist/improve-core/improve-layerdoc-types.d.ts.map +1 -0
  191. package/dist/improve-core/improve-layerdoc-types.js +4 -0
  192. package/dist/improve-core/improve-layerdoc-types.js.map +1 -0
  193. package/dist/improve-core/improve-page-words.d.ts +180 -0
  194. package/dist/improve-core/improve-page-words.d.ts.map +1 -0
  195. package/dist/improve-core/improve-page-words.js +303 -0
  196. package/dist/improve-core/improve-page-words.js.map +1 -0
  197. package/dist/{improve-plan-annotated-render.d.ts → improve-core/improve-plan-annotated-render.d.ts} +19 -2
  198. package/dist/improve-core/improve-plan-annotated-render.d.ts.map +1 -0
  199. package/dist/{improve-plan-annotated-render.js → improve-core/improve-plan-annotated-render.js} +77 -28
  200. package/dist/improve-core/improve-plan-annotated-render.js.map +1 -0
  201. package/dist/improve-core/improve-plan-annotator.d.ts +34 -0
  202. package/dist/improve-core/improve-plan-annotator.d.ts.map +1 -0
  203. package/dist/improve-core/improve-plan-annotator.js +52 -0
  204. package/dist/improve-core/improve-plan-annotator.js.map +1 -0
  205. package/dist/{improve-plan-render.d.ts → improve-core/improve-plan-render.d.ts} +2 -1
  206. package/dist/improve-core/improve-plan-render.d.ts.map +1 -0
  207. package/dist/{improve-plan-render.js → improve-core/improve-plan-render.js} +7 -1
  208. package/dist/improve-core/improve-plan-render.js.map +1 -0
  209. package/dist/improve-core/improve-plan-vector-keep.d.ts +29 -0
  210. package/dist/improve-core/improve-plan-vector-keep.d.ts.map +1 -0
  211. package/dist/improve-core/improve-plan-vector-keep.js +68 -0
  212. package/dist/improve-core/improve-plan-vector-keep.js.map +1 -0
  213. package/dist/{improve-raster-layers-section.d.ts → improve-core/improve-raster-layers-section.d.ts} +9 -1
  214. package/dist/improve-core/improve-raster-layers-section.d.ts.map +1 -0
  215. package/dist/{improve-raster-layers-section.js → improve-core/improve-raster-layers-section.js} +5 -2
  216. package/dist/improve-core/improve-raster-layers-section.js.map +1 -0
  217. package/dist/improve-core/improve-refusal.d.ts +6 -0
  218. package/dist/improve-core/improve-refusal.d.ts.map +1 -0
  219. package/dist/improve-core/improve-refusal.js +27 -0
  220. package/dist/improve-core/improve-refusal.js.map +1 -0
  221. package/dist/improve-core/improve-retain.d.ts +121 -0
  222. package/dist/improve-core/improve-retain.d.ts.map +1 -0
  223. package/dist/improve-core/improve-retain.js +115 -0
  224. package/dist/improve-core/improve-retain.js.map +1 -0
  225. package/dist/improve-core/improve-site-plan.d.ts +75 -0
  226. package/dist/improve-core/improve-site-plan.d.ts.map +1 -0
  227. package/dist/improve-core/improve-site-plan.js +135 -0
  228. package/dist/improve-core/improve-site-plan.js.map +1 -0
  229. package/dist/improve-core/improve-site-shell.d.ts +56 -0
  230. package/dist/improve-core/improve-site-shell.d.ts.map +1 -0
  231. package/dist/improve-core/improve-site-shell.js +152 -0
  232. package/dist/improve-core/improve-site-shell.js.map +1 -0
  233. package/dist/improve-core/improve-site-tokens.d.ts +44 -0
  234. package/dist/improve-core/improve-site-tokens.d.ts.map +1 -0
  235. package/dist/improve-core/improve-site-tokens.js +87 -0
  236. package/dist/improve-core/improve-site-tokens.js.map +1 -0
  237. package/dist/improve-core/improve-source-hints.d.ts +25 -0
  238. package/dist/improve-core/improve-source-hints.d.ts.map +1 -0
  239. package/dist/improve-core/improve-source-hints.js +17 -0
  240. package/dist/improve-core/improve-source-hints.js.map +1 -0
  241. package/dist/{improve-token-patch.d.ts → improve-core/improve-token-patch.d.ts} +2 -0
  242. package/dist/improve-core/improve-token-patch.d.ts.map +1 -0
  243. package/dist/{improve-token-patch.js → improve-core/improve-token-patch.js} +25 -5
  244. package/dist/improve-core/improve-token-patch.js.map +1 -0
  245. package/dist/improve-core/index.d.ts +47 -0
  246. package/dist/improve-core/index.d.ts.map +1 -0
  247. package/dist/improve-core/index.js +49 -0
  248. package/dist/improve-core/index.js.map +1 -0
  249. package/dist/improve-delivery-stages.d.ts +6 -0
  250. package/dist/improve-delivery-stages.d.ts.map +1 -1
  251. package/dist/improve-delivery-stages.js +91 -6
  252. package/dist/improve-delivery-stages.js.map +1 -1
  253. package/dist/improve-dom-diff.d.ts +8 -24
  254. package/dist/improve-dom-diff.d.ts.map +1 -1
  255. package/dist/improve-dom-diff.js +23 -123
  256. package/dist/improve-dom-diff.js.map +1 -1
  257. package/dist/improve-dom-gate.d.ts +1 -18
  258. package/dist/improve-dom-gate.d.ts.map +1 -1
  259. package/dist/improve-dom-gate.js +1 -46
  260. package/dist/improve-dom-gate.js.map +1 -1
  261. package/dist/improve-generation-stages.d.ts +0 -2
  262. package/dist/improve-generation-stages.d.ts.map +1 -1
  263. package/dist/improve-generation-stages.js +191 -15
  264. package/dist/improve-generation-stages.js.map +1 -1
  265. package/dist/improve-kit-assets.d.ts +8 -116
  266. package/dist/improve-kit-assets.d.ts.map +1 -1
  267. package/dist/improve-kit-assets.js +9 -229
  268. package/dist/improve-kit-assets.js.map +1 -1
  269. package/dist/improve-kit-ignore.d.ts +32 -0
  270. package/dist/improve-kit-ignore.d.ts.map +1 -0
  271. package/dist/improve-kit-ignore.js +111 -0
  272. package/dist/improve-kit-ignore.js.map +1 -0
  273. package/dist/improve-kit-readme.d.ts +4 -0
  274. package/dist/improve-kit-readme.d.ts.map +1 -1
  275. package/dist/improve-kit-readme.js +155 -24
  276. package/dist/improve-kit-readme.js.map +1 -1
  277. package/dist/improve-kit-stall.d.ts +51 -3
  278. package/dist/improve-kit-stall.d.ts.map +1 -1
  279. package/dist/improve-kit-stall.js +205 -21
  280. package/dist/improve-kit-stall.js.map +1 -1
  281. package/dist/improve-kit-status.d.ts +36 -0
  282. package/dist/improve-kit-status.d.ts.map +1 -1
  283. package/dist/improve-kit-status.js +82 -7
  284. package/dist/improve-kit-status.js.map +1 -1
  285. package/dist/improve-options.d.ts +14 -0
  286. package/dist/improve-options.d.ts.map +1 -1
  287. package/dist/improve-options.js +95 -12
  288. package/dist/improve-options.js.map +1 -1
  289. package/dist/improve-passthrough-flags.d.ts +8 -0
  290. package/dist/improve-passthrough-flags.d.ts.map +1 -0
  291. package/dist/improve-passthrough-flags.js +11 -0
  292. package/dist/improve-passthrough-flags.js.map +1 -0
  293. package/dist/improve-plan-annotator.d.ts +13 -2
  294. package/dist/improve-plan-annotator.d.ts.map +1 -1
  295. package/dist/improve-plan-annotator.js +35 -37
  296. package/dist/improve-plan-annotator.js.map +1 -1
  297. package/dist/improve-pricing-plan.d.ts +3 -0
  298. package/dist/improve-pricing-plan.d.ts.map +1 -1
  299. package/dist/improve-pricing-plan.js +33 -5
  300. package/dist/improve-pricing-plan.js.map +1 -1
  301. package/dist/improve-recheck.d.ts +9 -0
  302. package/dist/improve-recheck.d.ts.map +1 -0
  303. package/dist/improve-recheck.js +200 -0
  304. package/dist/improve-recheck.js.map +1 -0
  305. package/dist/improve-reset.d.ts.map +1 -1
  306. package/dist/improve-reset.js +11 -0
  307. package/dist/improve-reset.js.map +1 -1
  308. package/dist/improve-run-summary.d.ts +6 -0
  309. package/dist/improve-run-summary.d.ts.map +1 -1
  310. package/dist/improve-run-summary.js +77 -7
  311. package/dist/improve-run-summary.js.map +1 -1
  312. package/dist/improve-site-plan.d.ts +57 -0
  313. package/dist/improve-site-plan.d.ts.map +1 -0
  314. package/dist/improve-site-plan.js +79 -0
  315. package/dist/improve-site-plan.js.map +1 -0
  316. package/dist/improve-site-shell.d.ts +11 -0
  317. package/dist/improve-site-shell.d.ts.map +1 -0
  318. package/dist/improve-site-shell.js +24 -0
  319. package/dist/improve-site-shell.js.map +1 -0
  320. package/dist/improve-site-stage.d.ts +10 -0
  321. package/dist/improve-site-stage.d.ts.map +1 -0
  322. package/dist/improve-site-stage.js +84 -0
  323. package/dist/improve-site-stage.js.map +1 -0
  324. package/dist/improve-site-tokens.d.ts +9 -0
  325. package/dist/improve-site-tokens.d.ts.map +1 -0
  326. package/dist/improve-site-tokens.js +17 -0
  327. package/dist/improve-site-tokens.js.map +1 -0
  328. package/dist/improve-source-hints.d.ts +3 -12
  329. package/dist/improve-source-hints.d.ts.map +1 -1
  330. package/dist/improve-source-hints.js +4 -5
  331. package/dist/improve-source-hints.js.map +1 -1
  332. package/dist/improve-spend-ledger.d.ts +69 -0
  333. package/dist/improve-spend-ledger.d.ts.map +1 -0
  334. package/dist/improve-spend-ledger.js +118 -0
  335. package/dist/improve-spend-ledger.js.map +1 -0
  336. package/dist/improve-stage-runners.d.ts +5 -2
  337. package/dist/improve-stage-runners.d.ts.map +1 -1
  338. package/dist/improve-stage-runners.js +5 -2
  339. package/dist/improve-stage-runners.js.map +1 -1
  340. package/dist/improve-stage-shared.d.ts +49 -2
  341. package/dist/improve-stage-shared.d.ts.map +1 -1
  342. package/dist/improve-stage-shared.js +80 -3
  343. package/dist/improve-stage-shared.js.map +1 -1
  344. package/dist/improve-stop-handler.d.ts +15 -0
  345. package/dist/improve-stop-handler.d.ts.map +1 -1
  346. package/dist/improve-stop-handler.js +74 -3
  347. package/dist/improve-stop-handler.js.map +1 -1
  348. package/dist/improve-terminal-event.d.ts.map +1 -1
  349. package/dist/improve-terminal-event.js +13 -4
  350. package/dist/improve-terminal-event.js.map +1 -1
  351. package/dist/improve-workspace.d.ts +282 -9
  352. package/dist/improve-workspace.d.ts.map +1 -1
  353. package/dist/improve-workspace.js +250 -78
  354. package/dist/improve-workspace.js.map +1 -1
  355. package/dist/index.d.ts +2 -1
  356. package/dist/index.d.ts.map +1 -1
  357. package/dist/index.js +1 -0
  358. package/dist/index.js.map +1 -1
  359. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  360. package/dist/legacy-skill-catalog.js +202 -0
  361. package/dist/legacy-skill-catalog.js.map +1 -1
  362. package/dist/mcp-convert.js +1 -1
  363. package/dist/mcp-convert.js.map +1 -1
  364. package/dist/redesign-capture.d.ts +146 -15
  365. package/dist/redesign-capture.d.ts.map +1 -1
  366. package/dist/redesign-capture.js +182 -65
  367. package/dist/redesign-capture.js.map +1 -1
  368. package/dist/redesign-workspace.d.ts +13 -0
  369. package/dist/redesign-workspace.d.ts.map +1 -1
  370. package/dist/redesign-workspace.js +14 -0
  371. package/dist/redesign-workspace.js.map +1 -1
  372. package/dist/responsive-alternative-materializer.d.ts +24 -0
  373. package/dist/responsive-alternative-materializer.d.ts.map +1 -0
  374. package/dist/responsive-alternative-materializer.js +93 -0
  375. package/dist/responsive-alternative-materializer.js.map +1 -0
  376. package/dist/result-integrity.d.ts +38 -0
  377. package/dist/result-integrity.d.ts.map +1 -0
  378. package/dist/result-integrity.js +46 -0
  379. package/dist/result-integrity.js.map +1 -0
  380. package/dist/review-edit-source.d.ts.map +1 -1
  381. package/dist/review-edit-source.js +6 -2
  382. package/dist/review-edit-source.js.map +1 -1
  383. package/dist/review-edit.js +2 -2
  384. package/dist/review-edit.js.map +1 -1
  385. package/dist/review-prototype-gap.js +1 -1
  386. package/dist/review-prototype-gap.js.map +1 -1
  387. package/dist/spend-run-filter.d.ts +21 -0
  388. package/dist/spend-run-filter.d.ts.map +1 -0
  389. package/dist/spend-run-filter.js +65 -0
  390. package/dist/spend-run-filter.js.map +1 -0
  391. package/dist/spend-scoped-report-lines.d.ts +4 -0
  392. package/dist/spend-scoped-report-lines.d.ts.map +1 -0
  393. package/dist/spend-scoped-report-lines.js +46 -0
  394. package/dist/spend-scoped-report-lines.js.map +1 -0
  395. package/dist/spend-scoped-report.d.ts +28 -0
  396. package/dist/spend-scoped-report.d.ts.map +1 -0
  397. package/dist/spend-scoped-report.js +45 -0
  398. package/dist/spend-scoped-report.js.map +1 -0
  399. package/open-design.json +2 -2
  400. package/package.json +5 -5
  401. package/skills/12ui-design/SKILL.md +14 -4
  402. package/skills/12ui-design/improve.md +67 -5
  403. package/skills/12ui-design/inspire.md +1 -1
  404. package/dist/improve-dom-anchor.d.ts.map +0 -1
  405. package/dist/improve-dom-anchor.js.map +0 -1
  406. package/dist/improve-dom-extract.d.ts.map +0 -1
  407. package/dist/improve-dom-extract.js.map +0 -1
  408. package/dist/improve-dom-neighbour.d.ts.map +0 -1
  409. package/dist/improve-dom-neighbour.js.map +0 -1
  410. package/dist/improve-dom-scale.d.ts.map +0 -1
  411. package/dist/improve-dom-scale.js.map +0 -1
  412. package/dist/improve-layerdoc-diff.d.ts.map +0 -1
  413. package/dist/improve-layerdoc-diff.js.map +0 -1
  414. package/dist/improve-layerdoc-types.d.ts.map +0 -1
  415. package/dist/improve-layerdoc-types.js +0 -2
  416. package/dist/improve-layerdoc-types.js.map +0 -1
  417. package/dist/improve-plan-annotated-render.d.ts.map +0 -1
  418. package/dist/improve-plan-annotated-render.js.map +0 -1
  419. package/dist/improve-plan-render.d.ts.map +0 -1
  420. package/dist/improve-plan-render.js.map +0 -1
  421. package/dist/improve-raster-layers-section.d.ts.map +0 -1
  422. package/dist/improve-raster-layers-section.js.map +0 -1
  423. package/dist/improve-token-patch.d.ts.map +0 -1
  424. package/dist/improve-token-patch.js.map +0 -1
  425. /package/dist/{improve-dom-anchor.d.ts → improve-core/improve-dom-anchor.d.ts} +0 -0
  426. /package/dist/{improve-dom-extract.d.ts → improve-core/improve-dom-extract.d.ts} +0 -0
  427. /package/dist/{improve-dom-neighbour.d.ts → improve-core/improve-dom-neighbour.d.ts} +0 -0
  428. /package/dist/{improve-dom-scale.d.ts → improve-core/improve-dom-scale.d.ts} +0 -0
  429. /package/dist/{improve-layerdoc-diff.d.ts → improve-core/improve-layerdoc-diff.d.ts} +0 -0
@@ -4,6 +4,7 @@ import { CONVERSION_DURATION_HINTS } from './cli-progress.js';
4
4
  import { isCliRefusal } from './cli-refusal.js';
5
5
  import { derivedOutputFilePath } from './cli-conversion-output-directory.js';
6
6
  import { improveConversionAttemptCount, openImproveConversionAttempt, } from './improve-conversion-attempts.js';
7
+ import { shellArg } from './improve-kit-status.js';
7
8
  import { readRunJournal } from './run-journal.js';
8
9
  const UUID = /[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}/iu;
9
10
  /**
@@ -18,73 +19,64 @@ const UUID = /[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}/iu;
18
19
  */
19
20
  export const IMPROVE_RESPONSIVE_TIMEOUT_MS = CONVERSION_DURATION_HINTS.fused * 1_000;
20
21
  export const IMPROVE_TEMPORARY_UNAVAILABLE_RETRY_DELAY_MS = 30_000;
21
- /** At most one extra conversion, and only on a stall with nothing to derive. */
22
- export const IMPROVE_CONVERT_STALL_ATTEMPTS = 2;
22
+ /**
23
+ * Standard `convert --output html` walls from the 2026-09-03 tall-landing
24
+ * round: Crisp 655s, Airtable 642s, Calendly 796s. These are a compact
25
+ * population check beside the model table, not a promise that a live run must
26
+ * complete inside the result.
27
+ */
28
+ const IMPROVE_TALL_STANDARD_WALLS_SECONDS = [655, 642, 796];
29
+ const IMPROVE_TALL_WALL_MARGIN = 1.2;
30
+ const roundUpToMinute = (seconds) => Math.ceil(seconds / 60) * 60;
31
+ const improveTallStandardNoProgressBoundSeconds = () => roundUpToMinute(Math.max(...IMPROVE_TALL_STANDARD_WALLS_SECONDS) * IMPROVE_TALL_WALL_MARGIN);
23
32
  /**
24
33
  * The floor `--convert-stall-seconds` refuses below: the conversion's own
25
34
  * typical wall for the model in play. A bound inside the typical window would
26
- * make the retry fire on a healthy run and buy the same design twice.
35
+ * stop improve on healthy work.
27
36
  *
28
- * `pro` has no measured hint of its own, so it borrows the standard wall and
29
- * pays for that borrowing below: no automatic retry until somebody measures it.
37
+ * `pro` has no measured hint of its own, so it borrows the standard wall.
30
38
  */
31
39
  export const improveConvertStallFloorSeconds = (model) => (model === 'fast' ? CONVERSION_DURATION_HINTS.convertFast : CONVERSION_DURATION_HINTS.convert);
32
40
  /**
33
- * The DEFAULT bound, which used to be the fused median alone — 300s against a
34
- * standard conversion's own 240s typical wall, a ratio of 1.25. That is inside
35
- * the healthy population by any reading, and it stopped being free the moment
36
- * the stall bought a second conversion: a healthy-but-above-median convert half
37
- * would cost double, and nothing measures P(convert half > 300s | healthy).
38
- *
39
- * So the default now obeys the rule the floor states: twice the model's typical
40
- * wall, or the fused median, whichever is larger. Standard 480s, fast 300s. An
41
- * explicit `--convert-stall-seconds` is still allowed down to the floor — a
42
- * caller who wants the tighter bound can ask for it and owns the consequence.
43
- */
44
- export const improveConvertStallDefaultSeconds = (model) => Math.max(IMPROVE_RESPONSIVE_TIMEOUT_MS / 1_000, 2 * improveConvertStallFloorSeconds(model));
45
- /**
46
- * Whether the automatic retry may fire for this model.
41
+ * The DEFAULT no-progress bound. The old 480s standard/pro wall was below all
42
+ * three measured tall landings (655s, 642s, 796s). The 240s standard typical
43
+ * wall gives the same 960s result as the measured maximum with 20% headroom:
44
+ * `ceil(796 * 1.2 / 60) * 60 = 960`, or four typical walls.
47
45
  *
48
- * The retry's whole justification is that the bound sits outside the model's
49
- * typical window, so it cannot fire on healthy work. `pro` has no measured
50
- * typical wall — `CONVERSION_DURATION_HINTS` carries `convert` and
51
- * `convertFast` and nothing else — so for pro that justification does not
52
- * exist, and buying a second pro conversion on an unmeasured guess is the
53
- * blind fix the study-first doctrine forbids. Pro stalls the way it did before
54
- * the retry shipped: STALL.md, terminal event, recovery commands.
46
+ * This is not an absolute completion deadline. The conversion client resets it
47
+ * whenever polling reports a live stage or active lane, so it only halts a
48
+ * conversion that shows no progress. Fast keeps its measured-table envelope
49
+ * (300s); pro shares standard because it has no model-specific wall.
55
50
  */
56
- export const improveConvertStallRetryAllowed = (model) => model !== 'pro';
57
- /** The reason every stall abandonment carries, and the prefix that counts them. */
51
+ export const improveConvertStallDefaultSeconds = (model) => (model === 'fast'
52
+ ? Math.max(IMPROVE_RESPONSIVE_TIMEOUT_MS / 1_000, 2 * improveConvertStallFloorSeconds(model))
53
+ : Math.max(improveTallStandardNoProgressBoundSeconds(), 4 * improveConvertStallFloorSeconds(model)));
54
+ /** The reason a pre-F19 stall abandonment carries, and the prefix that counts them. */
58
55
  export const IMPROVE_CONVERT_STALL_REASON = 'convert stalled';
59
56
  /** The reason `--fresh` writes when it rotates the base key away from a conversion. */
60
57
  export const IMPROVE_FRESH_ABANDON_REASON = 'fresh requested after recorded conversion remained unavailable';
61
- export const improveConvertStallReason = (seconds) => (`${IMPROVE_CONVERT_STALL_REASON} past ${seconds}s with no LayerDoc`);
62
58
  /**
63
- * How many conversions this KIT has already bought and abandoned to a stall.
59
+ * How many conversions this KIT bought and abandoned to a stall BEFORE F19.
64
60
  *
65
- * The retry used to be bounded per process and keyed on `randomUUID()`, so
66
- * nothing about it survived the invocation: on the resume STALL.md asks for,
67
- * attempt 1 rebuilt the deterministic base key, the server's dedupe attached it
68
- * to the FIRST, known-stalled conversion, and the run waited out the whole bound
69
- * on a run it had already declared dead before dispatching a third under
70
- * another random key. Counting the durable abandonments makes the retry's
71
- * identity reproducible across invocations and makes the bound a property of
72
- * the kit rather than of one shell.
61
+ * Nothing writes these any more: a stall abandons nothing, because the
62
+ * conversion it was waiting on is still running and is exactly what the next
63
+ * invocation must re-attach to. The count survives for kits written by an
64
+ * earlier CLI, whose newest conversion is reachable only through the derived
65
+ * retry key below.
73
66
  *
74
- * The attempt ledger is counted alongside them, and the larger wins: a stall
75
- * whose conversion never reported an id cannot be abandoned by id, so counting
76
- * abandonments alone read that spend as zero and let the next resume buy
77
- * another retry, and the one after that, forever.
67
+ * The attempt ledger is counted alongside the abandonments, and the larger
68
+ * wins: a stall whose conversion never reported an id could not be abandoned by
69
+ * id, so counting abandonments alone read that spend as zero.
78
70
  */
79
71
  export const improveConvertStallCount = (record) => Math.max((record.abandonedConversions ?? [])
80
72
  .filter((entry) => entry.reason.startsWith(IMPROVE_CONVERT_STALL_REASON))
81
73
  .length, improveConversionAttemptCount(record, 'stall-retry'));
82
74
  /**
83
- * The idempotency key of the Nth conversion dispatched under one attempt key.
84
- * The first is the key itself — the base key, or the `--fresh` key this
85
- * invocation is spending — and every later one is derived from the count of
86
- * stalls that preceded it, so two invocations of the same kit compute the same
87
- * key for the same conversion even with no ledger to read.
75
+ * The idempotency key of the Nth conversion a pre-F19 kit dispatched under one
76
+ * attempt key. The first is the key itself and every later one is derived from
77
+ * the count of stalls that preceded it, so a resume of such a kit computes the
78
+ * same key for the same conversion with no ledger to read. Nothing mints new
79
+ * keys of this shape.
88
80
  */
89
81
  export const improveConvertRetryKey = (key, index) => (`${key}:stall:${index - 1}`);
90
82
  /**
@@ -95,8 +87,8 @@ export const improveConvertRetryKey = (key, index) => (`${key}:stall:${index - 1
95
87
  * above backwards:
96
88
  * - a settled convert block: the stage replays and buys nothing;
97
89
  * - an open attempt in the ledger: the resume rebuilds the exact key that
98
- * attempt was dispatched under, whether `--fresh` or the stall retry minted
99
- * it, and lands back on the conversion it is still waiting for;
90
+ * attempt was dispatched under — the ordinary base key, `--fresh`, or a
91
+ * pre-F19 retry — and lands back on the conversion it is still waiting for;
100
92
  * - a kit that abandoned conversions to a stall with no ledger to read (one
101
93
  * written before the ledger existed): `improveConvertRetryKey` reaches the
102
94
  * newest of them, which is also what the base key reaches when only one was
@@ -107,10 +99,20 @@ export const improveConvertRetryKey = (key, index) => (`${key}:stall:${index - 1
107
99
  * `fresh-rotated-away` is the only reading that leaves a conversion nothing can
108
100
  * reach, and it now belongs to pre-ledger kits alone. The ledger is what ended
109
101
  * it: the nonce is on the record before the conversion is dispatched.
102
+ *
103
+ * `inFlight` disqualifies the FIRST reading, and only a caller still inside the
104
+ * convert stage may set it. Such a caller knows something the record cannot:
105
+ * whatever `convert` block it holds settled an EARLIER conversion, because this
106
+ * one has not returned. `--fresh` clears that block durably inside the stage, so
107
+ * the only way to still be reading it is a copy that predates the clear — and
108
+ * answering "settled" off it promises a stopped lane a free replay of a
109
+ * conversion it walked away from, while the one it is still paying for goes
110
+ * unnamed. Silence there is not a loss: `plan/STALL.md` names the hosted run and
111
+ * prints the `resume` that collects it either way.
110
112
  */
111
- export const improveResumeConversion = (record) => {
113
+ export const improveResumeConversion = (record, context = {}) => {
112
114
  const settled = record.convert?.sourceConversionId;
113
- if (settled && UUID.test(settled))
115
+ if (!context.inFlight && settled && UUID.test(settled))
114
116
  return { id: settled, reason: 'settled' };
115
117
  const open = openImproveConversionAttempt(record);
116
118
  if (open) {
@@ -127,23 +129,36 @@ export const improveResumeConversion = (record) => {
127
129
  return rotated ? { id: rotated.id, reason: 'fresh-rotated-away' } : undefined;
128
130
  };
129
131
  /**
130
- * The end of the line: this kit has spent every conversion the stall budget
131
- * allows. It reads as a stall so the terminal event, `plan/STALL.md` and the
132
- * recovery commands are all written exactly as a first stall's are.
132
+ * The wait ended and improve stopped. It bought nothing (F19).
133
+ *
134
+ * The CLI used to dispatch a second parent conversion here, on the reasoning
135
+ * that a bound outside the model's typical window cannot fire on healthy work.
136
+ * That reasoning was never a measurement, and the pipedrive lane paid for it:
137
+ * one operator command, one stalled conversion, and four conversion ids in the
138
+ * journal — with the first one still running and still billing, because there
139
+ * is no cancel. CLAUDE.md item 3 says retries never repeat paid work, so a
140
+ * stall now ends the invocation and hands the conversion back by id.
141
+ *
142
+ * The message is the recovery: both commands re-attach to what is already
143
+ * bought, and neither creates a conversion.
133
144
  */
134
- export const improveConvertStallExhausted = (args) => new Error(
145
+ export const improveConvertStallHalted = (args) => new Error(
135
146
  // The stalled attempt's own text leads, because it is what carries the
136
147
  // conversion id every downstream reader digs out of it — the terminal event,
137
- // STALL.md's hosted run line, the abandonment ledger.
148
+ // STALL.md's hosted run line.
138
149
  `${improveErrorText(args.cause)}\n\n`
139
- + `The wait ended at ${args.seconds}s and improve did not dispatch another conversion.`
140
- + ` This kit has already bought ${args.bought} conversion${args.bought === 1 ? '' : 's'}`
141
- + ' of this winner; each one keeps running and keeps billing, and none can be cancelled.'
142
- + (improveConvertStallRetryAllowed(args.model)
143
- ? ' Pass --fresh to buy one more under a new key once you have a reason to expect a different result.'
144
- : ` There is no measured typical wall for the ${args.model} conversion model, so improve will not`
145
- + ' spend a second one on a guess. Pass --fresh to buy another deliberately.'), { cause: args.cause });
146
- const RESPONSIVE_PARTIAL_FAILURE = 'could not be completed for every required viewport size';
150
+ + `The wait ended at ${args.seconds}s. improve dispatched nothing else:`
151
+ + ` the conversion${args.conversionId ? ` ${args.conversionId}` : ''} is still running,`
152
+ + ' it keeps billing, it cannot be cancelled, and buying a second one would pay twice for'
153
+ + ' the same design. Re-attach to it — neither command buys a conversion:\n\n'
154
+ + ` 12ui improve ${shellArg(args.input)} --out-dir ${shellArg(args.runDir)} --from convert\n`
155
+ + ` 12ui resume ${args.conversionId ?? '<conversion-id>'}`
156
+ + ` --out-dir ${shellArg(path.join(args.runDir, 'target'))}\n\n`
157
+ + 'plan/STALL.md names the same conversion and the same commands.'
158
+ + ' Pass --fresh only to buy another one deliberately.', { cause: args.cause });
159
+ // The one responsive shortfall that still fails: NO layout landed. A run that
160
+ // landed at least one ships degraded, so improve never sees it as an error.
161
+ const RESPONSIVE_NO_LAYOUT_FAILURE = 'no responsive layout could be produced';
147
162
  export const improveErrorText = (error) => {
148
163
  const detail = error;
149
164
  return [
@@ -176,7 +191,7 @@ export const retryImproveTemporarilyUnavailable = async (args) => {
176
191
  * has to be able to say which, and a stall must not overwrite a class the
177
192
  * journal could already read off the error — an HTTP status, a refusal code.
178
193
  */
179
- const STALL_TEXT = /timed out|timeout|deadline|did not settle|has not settled|not settled yet/iu;
194
+ const STALL_TEXT = /timed out|timeout|deadline|did not settle|has not settled|not settled yet|stalled and recoverable/iu;
180
195
  export const improveStalled = (error) => {
181
196
  if (isCliRefusal(error) || isImproveTemporarilyUnavailable(error))
182
197
  return false;
@@ -207,20 +222,61 @@ export const recordedImproveConversionId = async (record) => {
207
222
  }
208
223
  return undefined;
209
224
  };
210
- export const responsiveFallbackReason = (error) => {
225
+ /** The service's own words, reduced to one line the kit can print. */
226
+ const serviceFailureDetail = (error) => {
227
+ const line = improveErrorText(error).split('\n').map((part) => part.trim()).find(Boolean);
228
+ if (!line)
229
+ return 'the service reported no reason';
230
+ return line.replace(/\.$/u, '');
231
+ };
232
+ /**
233
+ * Why the run derived fixed-layout HTML instead — or `undefined` when the error
234
+ * is not about the responsive export at all, in which case it must keep
235
+ * throwing rather than be absorbed into a fallback.
236
+ *
237
+ * `serviceStage` is the newest stage the service reported over the wait. The
238
+ * mailchimp app kit is why it is a parameter: its journal records `failed` at
239
+ * 269s under a 480s bound, and the CLI — classifying on the error TEXT alone,
240
+ * which matched a "responsive html export … failed" phrase against a branch
241
+ * that wrote deadline wording — told the reader the export had overrun a
242
+ * deadline it never reached. A stage the service declares outranks any reading
243
+ * of prose.
244
+ */
245
+ export const responsiveFallbackReason = (error, context = {}) => {
211
246
  if (isImproveTemporarilyUnavailable(error))
212
247
  return undefined;
213
248
  const text = improveErrorText(error);
214
249
  const normalized = text.toLowerCase();
215
- if (normalized.includes(RESPONSIVE_PARTIAL_FAILURE)
250
+ const failedServerSide = context.serviceStage === 'failed';
251
+ const noResponsiveLayout = normalized.includes(RESPONSIVE_NO_LAYOUT_FAILURE);
252
+ const aboutResponsive = noResponsiveLayout
216
253
  || /responsive html export[\s\S]*(?:did not|failed|running|timed out|deadline)/iu.test(text)
217
- || /responsive[\s\S]*(?:timeout|timed out|deadline exceeded)/iu.test(text)) {
218
- return normalized.includes(RESPONSIVE_PARTIAL_FAILURE)
219
- ? 'Responsive HTML could not be completed for every required viewport size.'
220
- : 'Responsive HTML did not settle before the improve stage deadline.';
254
+ || /responsive[\s\S]*(?:timeout|timed out|deadline exceeded)/iu.test(text);
255
+ if (!aboutResponsive && !failedServerSide)
256
+ return undefined;
257
+ if (noResponsiveLayout) {
258
+ return {
259
+ outcome: 'server-failed',
260
+ warning: 'No responsive layout could be produced for this design.',
261
+ };
221
262
  }
222
- return undefined;
263
+ if (failedServerSide) {
264
+ return {
265
+ outcome: 'server-failed',
266
+ warning: `Responsive export failed server-side: ${serviceFailureDetail(error)}.`,
267
+ };
268
+ }
269
+ return {
270
+ outcome: 'deadline',
271
+ warning: 'Responsive HTML did not settle before the improve stage deadline.',
272
+ };
223
273
  };
274
+ /**
275
+ * One word for what happened to the responsive export, so the summary headline,
276
+ * the run summary's detail line and `plan/STALL.md` cannot disagree with the
277
+ * sentence stored beside them.
278
+ */
279
+ export const improveResponsiveOutcomeWord = (outcome) => (outcome === 'server-failed' ? 'failed server-side' : 'stalled');
224
280
  export const fixedImproveHtml = async (targetDir) => {
225
281
  const html = derivedOutputFilePath(targetDir, 'html_fixed');
226
282
  const assets = `${html}.assets`;
@@ -1 +1 @@
1
- {"version":3,"file":"improve-convert-resilience.js","sourceRoot":"","sources":["../src/improve-convert-resilience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,IAAI,GAAG,+CAA+C,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,KAAK,GAAG,KAAK,CAAC;AACrF,MAAM,CAAC,MAAM,4CAA4C,GAAG,MAAM,CAAC;AAEnE,gFAAgF;AAChF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAAsB,EAAU,EAAE,CAAC,CACjF,KAAK,KAAK,MAAM,C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AS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,OAAO;QACL,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACnE,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACtD,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;gBAAE,MAAM,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACvF,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * One place decides what a concept may be, because the service decides it once.
3
+ *
4
+ * `cleanText` in `workers/api/src/create/validation.ts` collapses every run of
5
+ * whitespace to a single space, trims, and then counts CODE POINTS. Over the
6
+ * limit is rejected with a 400; it is never truncated. Both `POST /api/v1/create`
7
+ * and the same route's `source: "build"` claim (what `12ui branch execute`
8
+ * calls) measure it that way, and the build claim spends a metered plan call
9
+ * the moment it is accepted.
10
+ *
11
+ * The CLI has to measure it identically in both directions. Counting the raw
12
+ * text would refuse a wrapped `--concept-file` the service would have taken,
13
+ * and not counting it at all is how `12ui create claim` used to put an
14
+ * over-length brief on the wire and learn the limit from a 400 (2026-08-12).
15
+ *
16
+ * A CAP NOBODY IS TOLD ABOUT REFUSES EVERY RUN. At 600 this one refused 21 of 21
17
+ * unprompted branch briefs across two trials (2026-08-13 and 2026-08-16) while
18
+ * appearing in no `--help` line and in no skill. Both halves of that were fixed,
19
+ * separately: the limit is now stated everywhere a caller reads before writing a
20
+ * brief — the `create claim` and `branch execute` usage lines, which `--help` and
21
+ * their usage refusals print; `12ui capabilities`; the command templates the
22
+ * skills and the CLI's own next-step hints hand over; and the refusal below —
23
+ * and the number first moved to 1200 on 2026-08-16 after a pre-registered blind
24
+ * A/B measured no quality difference between a skilful <=600 trim and the full
25
+ * brief (`labs/concept-cap-2026-08-16`; the owner raised it because forcing a
26
+ * trim costs agent tokens for nothing). The reasoning, the null result, and the
27
+ * open watch item live at `MAX_CREATE_CONCEPT_CHARACTERS` in
28
+ * workers/api/src/create/contract.ts.
29
+ *
30
+ * NOTHING HERE CLAIMS SHORT BRIEFS DESIGN BETTER. That claim used to ride in the
31
+ * refusal and the data refused to support it, so the refusal states the count,
32
+ * the limit, the trim, and where cut detail belongs — and stops there.
33
+ */
34
+ /**
35
+ * Mirrors `MAX_CREATE_CONCEPT_CHARACTERS` (workers/api/src/create/contract.ts),
36
+ * which is the constant the service actually enforces. `concept-input.test.ts`
37
+ * reads that file and fails if the two drift, because a CLI that measures a
38
+ * DIFFERENT number either refuses work the service would take or puts an
39
+ * over-length brief on the wire. If it is ever raised, the worker deploys first.
40
+ */
41
+ export declare const MAX_CONCEPT_CHARACTERS = 1485;
42
+ /** Exactly the service's normalization, so client and server count one string. */
43
+ export declare const normalizeConceptText: (value: string) => string;
44
+ /** Code points, not UTF-16 units: one emoji is one character to the service. */
45
+ export declare const conceptCharacterCount: (value: string) => number;
46
+ export type ConceptInput = {
47
+ /** Raw text, straight from `--concept` or a `--concept-file` read. */
48
+ value: string;
49
+ /** How to name the flag pair in a refusal, e.g. `--concept`. */
50
+ flag: string;
51
+ /** One clause naming where the cut detail belongs instead. */
52
+ trimHint: string;
53
+ };
54
+ /**
55
+ * The one shape every over-length text refusal takes.
56
+ *
57
+ * A refusal that names only the cap is half a message: the writer knows the
58
+ * text is too long and still has to count it themselves. F7 (wave-2, 2026-09-03)
59
+ * cost two lanes their first command each on `--direction` for exactly that —
60
+ * the refusal named 693 and 1200 and neither of them was the length of what
61
+ * they had written. Every limited text flag now names the count, the limit, the
62
+ * trim, and that nothing was spent.
63
+ */
64
+ export declare const conceptOverLimitMessage: (args: {
65
+ flag: string;
66
+ /** As the caller typed it, so a whitespace-collapse difference can be named. */
67
+ raw: string;
68
+ /** After {@link normalizeConceptText}: the string that would go on the wire. */
69
+ normalized: string;
70
+ limit: number;
71
+ trimHint: string;
72
+ /** Why this flag's limit is not the concept cap, when it is not. */
73
+ because?: string;
74
+ }) => string;
75
+ /**
76
+ * Normalize and measure before anything is sent. Returns the exact text the
77
+ * caller should submit, so what was measured is what goes on the wire.
78
+ */
79
+ export declare const readConceptValue: (input: ConceptInput) => string;
80
+ //# sourceMappingURL=concept-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concept-input.d.ts","sourceRoot":"","sources":["../../src/improve-core/concept-input.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,MAA4C,CAAC;AAElG,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,MAA2B,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG;IACzB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAG,MAcH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,YAAY,KAAG,MAYtD,CAAC"}
@@ -0,0 +1,92 @@
1
+ // GENERATED — do not edit. Copied verbatim from
2
+ // packages/layerdoc/src/improve-core by scripts/sync-improve-core.mjs.
3
+ /**
4
+ * One place decides what a concept may be, because the service decides it once.
5
+ *
6
+ * `cleanText` in `workers/api/src/create/validation.ts` collapses every run of
7
+ * whitespace to a single space, trims, and then counts CODE POINTS. Over the
8
+ * limit is rejected with a 400; it is never truncated. Both `POST /api/v1/create`
9
+ * and the same route's `source: "build"` claim (what `12ui branch execute`
10
+ * calls) measure it that way, and the build claim spends a metered plan call
11
+ * the moment it is accepted.
12
+ *
13
+ * The CLI has to measure it identically in both directions. Counting the raw
14
+ * text would refuse a wrapped `--concept-file` the service would have taken,
15
+ * and not counting it at all is how `12ui create claim` used to put an
16
+ * over-length brief on the wire and learn the limit from a 400 (2026-08-12).
17
+ *
18
+ * A CAP NOBODY IS TOLD ABOUT REFUSES EVERY RUN. At 600 this one refused 21 of 21
19
+ * unprompted branch briefs across two trials (2026-08-13 and 2026-08-16) while
20
+ * appearing in no `--help` line and in no skill. Both halves of that were fixed,
21
+ * separately: the limit is now stated everywhere a caller reads before writing a
22
+ * brief — the `create claim` and `branch execute` usage lines, which `--help` and
23
+ * their usage refusals print; `12ui capabilities`; the command templates the
24
+ * skills and the CLI's own next-step hints hand over; and the refusal below —
25
+ * and the number first moved to 1200 on 2026-08-16 after a pre-registered blind
26
+ * A/B measured no quality difference between a skilful <=600 trim and the full
27
+ * brief (`labs/concept-cap-2026-08-16`; the owner raised it because forcing a
28
+ * trim costs agent tokens for nothing). The reasoning, the null result, and the
29
+ * open watch item live at `MAX_CREATE_CONCEPT_CHARACTERS` in
30
+ * workers/api/src/create/contract.ts.
31
+ *
32
+ * NOTHING HERE CLAIMS SHORT BRIEFS DESIGN BETTER. That claim used to ride in the
33
+ * refusal and the data refused to support it, so the refusal states the count,
34
+ * the limit, the trim, and where cut detail belongs — and stops there.
35
+ */
36
+ /**
37
+ * Mirrors `MAX_CREATE_CONCEPT_CHARACTERS` (workers/api/src/create/contract.ts),
38
+ * which is the constant the service actually enforces. `concept-input.test.ts`
39
+ * reads that file and fails if the two drift, because a CLI that measures a
40
+ * DIFFERENT number either refuses work the service would take or puts an
41
+ * over-length brief on the wire. If it is ever raised, the worker deploys first.
42
+ */
43
+ export const MAX_CONCEPT_CHARACTERS = 1485;
44
+ /** Exactly the service's normalization, so client and server count one string. */
45
+ export const normalizeConceptText = (value) => value.replace(/\s+/gu, ' ').trim();
46
+ /** Code points, not UTF-16 units: one emoji is one character to the service. */
47
+ export const conceptCharacterCount = (value) => [...value].length;
48
+ /**
49
+ * The one shape every over-length text refusal takes.
50
+ *
51
+ * A refusal that names only the cap is half a message: the writer knows the
52
+ * text is too long and still has to count it themselves. F7 (wave-2, 2026-09-03)
53
+ * cost two lanes their first command each on `--direction` for exactly that —
54
+ * the refusal named 693 and 1200 and neither of them was the length of what
55
+ * they had written. Every limited text flag now names the count, the limit, the
56
+ * trim, and that nothing was spent.
57
+ */
58
+ export const conceptOverLimitMessage = (args) => {
59
+ const length = conceptCharacterCount(args.normalized);
60
+ // The raw count is what the caller can see in their editor. Name the counted
61
+ // one when they differ, or the refusal looks like it is off by the newlines.
62
+ const measured = length === conceptCharacterCount(args.raw)
63
+ ? `${length} characters`
64
+ : `${length} characters once its whitespace collapses`;
65
+ return `${args.flag} is ${measured}; the limit is ${args.limit}.`
66
+ + ` Trim ${length - args.limit}.`
67
+ + (args.because ? ` ${args.because}` : '')
68
+ + ` ${args.trimHint}`
69
+ // No quality claim here. The blind A/B behind the 1200 raise found none, so
70
+ // the refusal says what to do and what it cost, which is nothing.
71
+ + ' Nothing was sent and nothing was bought.';
72
+ };
73
+ /**
74
+ * Normalize and measure before anything is sent. Returns the exact text the
75
+ * caller should submit, so what was measured is what goes on the wire.
76
+ */
77
+ export const readConceptValue = (input) => {
78
+ const concept = normalizeConceptText(input.value);
79
+ if (!concept)
80
+ throw new Error(`${input.flag} must not be empty`);
81
+ const length = conceptCharacterCount(concept);
82
+ if (length <= MAX_CONCEPT_CHARACTERS)
83
+ return concept;
84
+ throw new Error(conceptOverLimitMessage({
85
+ flag: input.flag,
86
+ raw: input.value,
87
+ normalized: concept,
88
+ limit: MAX_CONCEPT_CHARACTERS,
89
+ trimHint: input.trimHint,
90
+ }));
91
+ };
92
+ //# sourceMappingURL=concept-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concept-input.js","sourceRoot":"","sources":["../../src/improve-core/concept-input.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,uEAAuE;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAE3C,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAElG,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;AAWlF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAUvC,EAAU,EAAE;IACX,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,6EAA6E;IAC7E,6EAA6E;IAC7E,MAAM,QAAQ,GAAG,MAAM,KAAK,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC;QACzD,CAAC,CAAC,GAAG,MAAM,aAAa;QACxB,CAAC,CAAC,GAAG,MAAM,2CAA2C,CAAC;IACzD,OAAO,GAAG,IAAI,CAAC,IAAI,OAAO,QAAQ,kBAAkB,IAAI,CAAC,KAAK,GAAG;UAC7D,SAAS,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG;UAC/B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;UACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;QACrB,4EAA4E;QAC5E,kEAAkE;UAChE,2CAA2C,CAAC;AAClD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAmB,EAAU,EAAE;IAC9D,MAAM,OAAO,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,oBAAoB,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,MAAM,IAAI,sBAAsB;QAAE,OAAO,OAAO,CAAC;IACrD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;QACtC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,GAAG,EAAE,KAAK,CAAC,KAAK;QAChB,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,sBAAsB;QAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { ImproveDescribePath } from './improve-artifacts.js';
2
+ import type { LayerDiffResult, LayerLeaf } from './improve-layerdoc-types.js';
3
+ type HierarchyLeaf = {
4
+ leaf: LayerLeaf;
5
+ parentPath: string[];
6
+ };
7
+ export type AddedElementSpec = {
8
+ designIndex: number;
9
+ insertion: string;
10
+ markdown: string;
11
+ asset?: {
12
+ kind: string;
13
+ path?: string;
14
+ destination?: string;
15
+ resolvable: boolean;
16
+ /** How the named file may be used: an external file, or inline only (F30). */
17
+ usage?: 'img' | 'inline';
18
+ /** The `currentColor` sibling, when the icon has both variants. */
19
+ inline?: {
20
+ path: string;
21
+ destination: string;
22
+ };
23
+ /** One sentence naming which file goes where. */
24
+ colorNote?: string;
25
+ };
26
+ };
27
+ /**
28
+ * Resolving an extracted raster means looking at whatever the conversion left
29
+ * beside the target design — a manifest and a directory in the CLI, an asset
30
+ * index in the browser — so the lookup is injected and the core only decides
31
+ * which artifact ids to ask for, in which order, and what an unresolved one
32
+ * says in the plan.
33
+ */
34
+ export type ImproveAssetResolver = (artifactIds: readonly string[]) => AddedElementSpec['asset'] | undefined;
35
+ /** Flatten target leaves while retaining group ancestry for sibling placement. */
36
+ export declare const flattenImproveHierarchy: (document: unknown) => HierarchyLeaf[];
37
+ /** Preference order for the extracted artifact a plan should hand a coder. */
38
+ export declare const improveArtifactIds: (leaf: LayerLeaf) => string[];
39
+ /**
40
+ * Every target leaf the diff never matched, with the full specification a coder
41
+ * needs to build it: where it goes relative to a real selector, its complete
42
+ * typography and style map, and the asset it references. Inline `iconSvg` is
43
+ * materialized into the returned `files` map rather than written here, so the
44
+ * CLI and the browser produce the same bytes at the same relative path.
45
+ */
46
+ export declare const buildImproveAddedElementSpecs: (args: {
47
+ targetDoc: unknown;
48
+ normalizedTarget: readonly LayerLeaf[];
49
+ before: readonly LayerLeaf[];
50
+ canvas: {
51
+ width: number;
52
+ height: number;
53
+ };
54
+ diff: LayerDiffResult;
55
+ describePath: ImproveDescribePath;
56
+ resolveAsset?: ImproveAssetResolver;
57
+ }) => {
58
+ specs: AddedElementSpec[];
59
+ files: Record<string, string>;
60
+ };
61
+ export {};
62
+ //# sourceMappingURL=improve-added-specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-added-specs.d.ts","sourceRoot":"","sources":["../../src/improve-core/improve-added-specs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAE9E,KAAK,aAAa,GA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