@12ui/design 0.2.11 → 0.2.13

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 (67) hide show
  1. package/README.md +9 -0
  2. package/dist/cli-arguments.d.ts.map +1 -1
  3. package/dist/cli-arguments.js +2 -0
  4. package/dist/cli-arguments.js.map +1 -1
  5. package/dist/cli-capabilities.d.ts +13 -0
  6. package/dist/cli-capabilities.d.ts.map +1 -1
  7. package/dist/cli-capabilities.js +16 -0
  8. package/dist/cli-capabilities.js.map +1 -1
  9. package/dist/cli-image-batch-command.d.ts.map +1 -1
  10. package/dist/cli-image-batch-command.js +104 -53
  11. package/dist/cli-image-batch-command.js.map +1 -1
  12. package/dist/cli-image-batch-materialize.d.ts +27 -0
  13. package/dist/cli-image-batch-materialize.d.ts.map +1 -0
  14. package/dist/cli-image-batch-materialize.js +41 -0
  15. package/dist/cli-image-batch-materialize.js.map +1 -0
  16. package/dist/cli-image-batch-resume.d.ts +27 -0
  17. package/dist/cli-image-batch-resume.d.ts.map +1 -0
  18. package/dist/cli-image-batch-resume.js +158 -0
  19. package/dist/cli-image-batch-resume.js.map +1 -0
  20. package/dist/cli-image-command.d.ts.map +1 -1
  21. package/dist/cli-image-command.js +14 -2
  22. package/dist/cli-image-command.js.map +1 -1
  23. package/dist/cli-progress.d.ts +44 -0
  24. package/dist/cli-progress.d.ts.map +1 -0
  25. package/dist/cli-progress.js +83 -0
  26. package/dist/cli-progress.js.map +1 -0
  27. package/dist/cli.js +92 -6
  28. package/dist/cli.js.map +1 -1
  29. package/dist/conversion-client.d.ts +32 -12
  30. package/dist/conversion-client.d.ts.map +1 -1
  31. package/dist/conversion-client.js +14 -0
  32. package/dist/conversion-client.js.map +1 -1
  33. package/dist/image-generation-batch-attempt.d.ts +28 -0
  34. package/dist/image-generation-batch-attempt.d.ts.map +1 -0
  35. package/dist/image-generation-batch-attempt.js +48 -0
  36. package/dist/image-generation-batch-attempt.js.map +1 -0
  37. package/dist/image-generation-completion.d.ts +43 -0
  38. package/dist/image-generation-completion.d.ts.map +1 -0
  39. package/dist/image-generation-completion.js +54 -0
  40. package/dist/image-generation-completion.js.map +1 -0
  41. package/dist/image-generation-fs.d.ts +3 -0
  42. package/dist/image-generation-fs.d.ts.map +1 -0
  43. package/dist/image-generation-fs.js +23 -0
  44. package/dist/image-generation-fs.js.map +1 -0
  45. package/dist/image-generation-request.d.ts +13 -3
  46. package/dist/image-generation-request.d.ts.map +1 -1
  47. package/dist/image-generation-request.js +21 -19
  48. package/dist/image-generation-request.js.map +1 -1
  49. package/dist/image-generation-resume.d.ts +36 -0
  50. package/dist/image-generation-resume.d.ts.map +1 -0
  51. package/dist/image-generation-resume.js +83 -0
  52. package/dist/image-generation-resume.js.map +1 -0
  53. package/dist/image-generation-run.d.ts +11 -0
  54. package/dist/image-generation-run.d.ts.map +1 -1
  55. package/dist/image-generation-run.js +23 -9
  56. package/dist/image-generation-run.js.map +1 -1
  57. package/dist/image-generation-staging.d.ts +25 -0
  58. package/dist/image-generation-staging.d.ts.map +1 -0
  59. package/dist/image-generation-staging.js +80 -0
  60. package/dist/image-generation-staging.js.map +1 -0
  61. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  62. package/dist/legacy-skill-catalog.js +34 -0
  63. package/dist/legacy-skill-catalog.js.map +1 -1
  64. package/package.json +1 -1
  65. package/skills/design/SKILL.md +54 -7
  66. package/skills/design/references/selection-contract.md +16 -0
  67. package/skills/design-convert/SKILL.md +55 -2
@@ -66,7 +66,13 @@ prompt text so a resumed run cannot silently select different evidence.
66
66
  "rejectionReasons": []
67
67
  }
68
68
  ],
69
+ "recommendation": {
70
+ "candidateId": "<recommended candidate id, or null when the run indicated none>",
71
+ "source": "<where the recommendation came from, or null>"
72
+ },
69
73
  "winner": "A",
74
+ "selectionSource": "<recommended|override|no-recommendation>",
75
+ "selectionOverrideReason": "<why the recommendation was not followed, or null>",
70
76
  "rationale": "<visible, brief-specific rationale>"
71
77
  }
72
78
  ```
@@ -79,6 +85,16 @@ has no rejection reasons; every other candidate has at least one specific
79
85
  visible reason. Set `providerIdempotencyEnforced` only to the recorded CLI
80
86
  value.
81
87
 
88
+ Set `selectionSource` to `recommended` when the winner is the recommended
89
+ candidate, `override` when it is not, and `no-recommendation` when the run
90
+ indicated none. Use null `recommendation` fields in that last case. An
91
+ `override` requires a specific `selectionOverrideReason` — an explicit user
92
+ preference, a brief or steering directive the recommendation could not see, or a
93
+ named visible defect in the recommended candidate — and keeps
94
+ `selectionOverrideReason` null in every other case. A flow that also writes
95
+ `design-run.json` records the same pair there, the reason under
96
+ `selection_override_reason`.
97
+
82
98
  Keep `corpus.fallback` null for the recommended Balanced result. If Direct or
83
99
  Adventurer was used after a complete Balanced set failed the brief, replace it
84
100
  with `{ "fromMode": "balanced", "reason": "<visible failure>",
@@ -22,6 +22,11 @@ results, or repeat extraction merely to obtain another format.
22
22
 
23
23
  ## Create the base LayerDoc
24
24
 
25
+ Conversion is slow paid work: expect about **4 minutes** for a 1440px source at
26
+ `--model standard`. The command blocks for that whole time and streams stage
27
+ progress to stderr. It has not hung — never kill it and never re-issue it with a
28
+ different idempotency key.
29
+
25
30
  ```bash
26
31
  set -o pipefail
27
32
  12ui convert <source-image> \
@@ -32,6 +37,50 @@ set -o pipefail
32
37
  --out <run-dir>/base.layerdoc.json | tee <run-dir>/base-result.json
33
38
  ```
34
39
 
40
+ ### When responsive HTML is one of the required formats
41
+
42
+ Ask for it in the SAME command. The export's reference generation and per-anchor
43
+ conversions then run alongside the conversion instead of queueing behind it, so
44
+ the pair costs about **5 minutes** in total rather than the ~8 minutes a convert
45
+ followed by a separate export costs. Prices are identical either way.
46
+
47
+ ```bash
48
+ set -o pipefail
49
+ 12ui convert <source-image> \
50
+ --output layerdoc \
51
+ --model standard \
52
+ --width <intended-css-width> \
53
+ --export html \
54
+ --export-quality standard \
55
+ --idempotency-key <stable-key> \
56
+ --out <run-dir>/base.layerdoc.json \
57
+ --export-out <run-dir>/exports/export.responsive.html | tee <run-dir>/base-result.json
58
+ ```
59
+
60
+ One blocking command, both artifacts on disk, no background-and-poll
61
+ choreography. The result JSON carries the base conversion under `id` and the
62
+ export conversion under `export.id`. If the export half fails the command exits
63
+ non-zero, but the base LayerDoc is still written and its ID is still reported —
64
+ retry only the export, with `12ui export <source-conversion-id> --output html`.
65
+
66
+ Use `--export html` whenever responsive HTML is wanted. Use the plain form when
67
+ it is not: the fused form buys a responsive export every time.
68
+
69
+ ### The exported page is the deliverable
70
+
71
+ The responsive HTML is the page, not a bag of parts. Adopt it by default: keep
72
+ its document, structure, classes, and anchor bindings, and build the surface by
73
+ adapting and composing that document — wire routing, real copy, state, and
74
+ interactions into it, wrap it as a section when the target page is larger than
75
+ the converted screen, and extend its visual system into anything it does not
76
+ cover.
77
+
78
+ Do not mine it for assets and re-author the markup around them. That discards
79
+ the converted design and lands the page back on the generic defaults the
80
+ conversion was bought to avoid. When something in the export is wrong, fix it in
81
+ the export's own markup. Rebuild from scratch only when the export cannot carry
82
+ the surface at all, and say so explicitly in the report when you do.
83
+
35
84
  Preserve the source conversion ID, LayerDoc, assets, manifest, and stdout. For
36
85
  a detached create, capture its ID and resume that same operation:
37
86
 
@@ -54,7 +103,10 @@ the exact request with the same idempotency key.
54
103
  ## Export from the base conversion
55
104
 
56
105
  Use one command with comma-separated outputs. The CLI starts independent
57
- exports in parallel without repeating image extraction:
106
+ exports in parallel without repeating image extraction. Every format except
107
+ `html` is fast (seconds to about a minute); `html` is responsive HTML and takes
108
+ about **4 minutes** on its own, which is why it is worth folding into the
109
+ convert command above when it is needed at all.
58
110
 
59
111
  ```bash
60
112
  12ui export <source-conversion-id> \
@@ -87,7 +139,8 @@ deleting it to force another run.
87
139
  Inspect generated files and dependencies before merging the smallest coherent
88
140
  set into the target. Preserve project routing, tokens, components,
89
141
  accessibility, dependency policy, and unrelated changes; remove duplicate
90
- generated scaffolding.
142
+ generated scaffolding. The exported document goes in as the page; the
143
+ integration work is adapting it to the project, not replacing it.
91
144
 
92
145
  Run focused checks in parallel when they do not contend for outputs. Launch
93
146
  web/native examples, exercise interactions, and compare source and responsive