@12ui/design 0.2.7 → 0.2.8
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.
- package/README.md +7 -0
- package/dist/cli-corpus-command.d.ts.map +1 -1
- package/dist/cli-corpus-command.js +7 -0
- package/dist/cli-corpus-command.js.map +1 -1
- package/dist/cli-corpus-evidence.d.ts.map +1 -1
- package/dist/cli-corpus-evidence.js +20 -2
- package/dist/cli-corpus-evidence.js.map +1 -1
- package/dist/cli-corpus-reference-image.d.ts +13 -0
- package/dist/cli-corpus-reference-image.d.ts.map +1 -0
- package/dist/cli-corpus-reference-image.js +54 -0
- package/dist/cli-corpus-reference-image.js.map +1 -0
- package/dist/cli-corpus-run.d.ts +6 -0
- package/dist/cli-corpus-run.d.ts.map +1 -1
- package/dist/cli-corpus-run.js +15 -2
- package/dist/cli-corpus-run.js.map +1 -1
- package/dist/cli-corpus-types.d.ts +4 -0
- package/dist/cli-corpus-types.d.ts.map +1 -1
- package/dist/cli-corpus-types.js.map +1 -1
- package/dist/cli-image-batch-command.d.ts.map +1 -1
- package/dist/cli-image-batch-command.js +2 -1
- package/dist/cli-image-batch-command.js.map +1 -1
- package/dist/cli-image-command.d.ts.map +1 -1
- package/dist/cli-image-command.js +7 -1
- package/dist/cli-image-command.js.map +1 -1
- package/dist/cli-persistence.d.ts.map +1 -1
- package/dist/cli-persistence.js +8 -1
- package/dist/cli-persistence.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/corpus-client.d.ts +15 -1
- package/dist/corpus-client.d.ts.map +1 -1
- package/dist/corpus-client.js +48 -2
- package/dist/corpus-client.js.map +1 -1
- package/dist/corpus-experiment.d.ts +170 -0
- package/dist/corpus-experiment.d.ts.map +1 -0
- package/dist/corpus-experiment.js +2 -0
- package/dist/corpus-experiment.js.map +1 -0
- package/dist/image-generation-batch-manifest.d.ts +2 -1
- package/dist/image-generation-batch-manifest.d.ts.map +1 -1
- package/dist/image-generation-batch-manifest.js +7 -1
- package/dist/image-generation-batch-manifest.js.map +1 -1
- package/dist/image-generation-error.d.ts +3 -0
- package/dist/image-generation-error.d.ts.map +1 -0
- package/dist/image-generation-error.js +30 -0
- package/dist/image-generation-error.js.map +1 -0
- package/dist/image-generation-evidence.d.ts +3 -1
- package/dist/image-generation-evidence.d.ts.map +1 -1
- package/dist/image-generation-evidence.js.map +1 -1
- package/dist/image-generation-request.d.ts +4 -0
- package/dist/image-generation-request.d.ts.map +1 -1
- package/dist/image-generation-request.js +3 -0
- package/dist/image-generation-request.js.map +1 -1
- package/dist/image-generation-run.d.ts.map +1 -1
- package/dist/image-generation-run.js +14 -4
- package/dist/image-generation-run.js.map +1 -1
- package/dist/image-generation-usage.d.ts +4 -0
- package/dist/image-generation-usage.d.ts.map +1 -1
- package/dist/image-generation-usage.js +37 -10
- package/dist/image-generation-usage.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/skills/design/SKILL.md +99 -14
- package/skills/design/references/continuation-contract.md +60 -0
- package/skills/design/references/selection-contract.md +34 -4
- package/skills/design-search/SKILL.md +21 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Continuation evidence contract
|
|
2
|
+
|
|
3
|
+
Write `continuations.json` when the selected first viewport does not cover the
|
|
4
|
+
complete interface. The winner remains the sole reference for every generation.
|
|
5
|
+
|
|
6
|
+
```json
|
|
7
|
+
{
|
|
8
|
+
"version": 1,
|
|
9
|
+
"createdAt": "<ISO-8601>",
|
|
10
|
+
"selectionPath": "<absolute selection.json path>",
|
|
11
|
+
"winner": {
|
|
12
|
+
"id": "A",
|
|
13
|
+
"path": "<absolute winner PNG path>",
|
|
14
|
+
"sha256": "<winner sha256>"
|
|
15
|
+
},
|
|
16
|
+
"baseConversion": {
|
|
17
|
+
"idempotencyKey": "<stable key>",
|
|
18
|
+
"conversionId": "<base LayerDoc conversion id>",
|
|
19
|
+
"resultEvidencePath": "<absolute result evidence path>"
|
|
20
|
+
},
|
|
21
|
+
"generation": {
|
|
22
|
+
"referenceMode": "inspiration",
|
|
23
|
+
"manifestPath": "<absolute batch manifest path>",
|
|
24
|
+
"manifestSha256": "<sha256>",
|
|
25
|
+
"batchAttemptPath": "<absolute batch attempt path>"
|
|
26
|
+
},
|
|
27
|
+
"continuations": [
|
|
28
|
+
{
|
|
29
|
+
"id": "viewport-2",
|
|
30
|
+
"kind": "<continuous-page|web-route|app-state|mobile-screen>",
|
|
31
|
+
"order": 2,
|
|
32
|
+
"prompt": "<semantic content, actions, state, and route purpose only>",
|
|
33
|
+
"promptSha256": "<sha256>",
|
|
34
|
+
"referencePath": "<same winner path>",
|
|
35
|
+
"referenceSha256": "<same winner sha256>",
|
|
36
|
+
"outputPath": "<absolute generated PNG path>",
|
|
37
|
+
"outputSha256": "<sha256>",
|
|
38
|
+
"attemptEvidencePath": "<absolute attempt path>",
|
|
39
|
+
"accepted": true,
|
|
40
|
+
"rejectionReason": null,
|
|
41
|
+
"conversionId": "<accepted image conversion id or null>",
|
|
42
|
+
"conversionEvidencePath": "<absolute evidence path or null>"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"integration": {
|
|
46
|
+
"mode": "<ordered-package|independent-surfaces>",
|
|
47
|
+
"packageEvidencePath": "<absolute package evidence path or null>"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Include 2-16 continuation entries. Every entry must repeat the winner path and
|
|
53
|
+
hash; never substitute a corpus image, composite, prior continuation, or
|
|
54
|
+
predecessor. The default continuation batch uses `inspiration`, because the
|
|
55
|
+
winner supplies a visual system rather than a first-viewport composition to
|
|
56
|
+
clone. If an intentional app-state edit must preserve exact structure, record
|
|
57
|
+
it in a separate `preserve-structure` batch. Preserve rejected generations
|
|
58
|
+
with a visible reason and null conversion fields. For `ordered-package`,
|
|
59
|
+
record the package evidence and keep continuous-page order exact. Never store
|
|
60
|
+
credentials or invent IDs or hashes.
|
|
@@ -5,10 +5,27 @@ prompt text so a resumed run cannot silently select different evidence.
|
|
|
5
5
|
|
|
6
6
|
```json
|
|
7
7
|
{
|
|
8
|
-
"version":
|
|
8
|
+
"version": 5,
|
|
9
9
|
"createdAt": "<ISO-8601>",
|
|
10
10
|
"requestSummary": "<concise implementation contract>",
|
|
11
11
|
"viewportMode": "<first-viewport|primary-state|single-screen|complete-simple-surface>",
|
|
12
|
+
"designMode": "<new-interface|exploratory-redesign|structure-preserving-reskin>",
|
|
13
|
+
"redesignSource": {
|
|
14
|
+
"originalPath": "<absolute source path, or null when absent>",
|
|
15
|
+
"originalSha256": "<source sha256, or null when absent>",
|
|
16
|
+
"preparedPath": "<absolute crop or original path, or null when absent>",
|
|
17
|
+
"preparedSha256": "<prepared sha256, or null when absent>",
|
|
18
|
+
"preparation": "<none|first-viewport-crop>"
|
|
19
|
+
},
|
|
20
|
+
"contract": {
|
|
21
|
+
"preserve": ["<specific constraint>"],
|
|
22
|
+
"change": ["<specific intended change>"]
|
|
23
|
+
},
|
|
24
|
+
"referencePolicy": {
|
|
25
|
+
"retrieval": "<text-only|text-and-redesign-source>",
|
|
26
|
+
"generation": "<one-corpus-image-per-candidate|redesign-source-only>",
|
|
27
|
+
"imagesPerGeneration": 1
|
|
28
|
+
},
|
|
12
29
|
"corpus": {
|
|
13
30
|
"query": "<exact query>",
|
|
14
31
|
"idempotencyKey": "<manifest value>",
|
|
@@ -28,6 +45,7 @@ prompt text so a resumed run cannot silently select different evidence.
|
|
|
28
45
|
]
|
|
29
46
|
},
|
|
30
47
|
"generation": {
|
|
48
|
+
"referenceMode": "<inspiration|preserve-structure>",
|
|
31
49
|
"manifestPath": "<absolute generation manifest path>",
|
|
32
50
|
"manifestSha256": "<sha256>",
|
|
33
51
|
"batchAttemptPath": "<absolute batch attempt path>"
|
|
@@ -39,9 +57,11 @@ prompt text so a resumed run cannot silently select different evidence.
|
|
|
39
57
|
"sha256": "<sha256>",
|
|
40
58
|
"prompt": "<exact prompt>",
|
|
41
59
|
"promptSha256": "<sha256>",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
60
|
+
"directionReferenceId": "<paired corpus id-1>",
|
|
61
|
+
"direction": "<short visibly grounded text direction>",
|
|
62
|
+
"generationReferencePath": "<paired corpus path or redesign-source path>",
|
|
63
|
+
"generationReferenceSha256": "<sha256>",
|
|
64
|
+
"referenceMode": "<inspiration|preserve-structure>",
|
|
45
65
|
"provider": "<codex|openai>",
|
|
46
66
|
"idempotencyKey": "<stable key>",
|
|
47
67
|
"providerIdempotencyEnforced": false,
|
|
@@ -60,3 +80,13 @@ from the batch and candidate attempt files. Never store credentials or invent
|
|
|
60
80
|
IDs, metrics, or provider guarantees. The winner has no rejection reasons;
|
|
61
81
|
every other candidate has at least one specific visible reason. Set
|
|
62
82
|
`providerIdempotencyEnforced` only to the recorded CLI value.
|
|
83
|
+
|
|
84
|
+
For `new-interface`, use null redesign-source paths/hashes, `text-only` retrieval, and one
|
|
85
|
+
paired corpus image per generation. For `exploratory-redesign`, record the
|
|
86
|
+
original and prepared source for retrieval but still use one paired corpus
|
|
87
|
+
image per generation. For `structure-preserving-reskin`, use the prepared
|
|
88
|
+
redesign source as the sole generation
|
|
89
|
+
image for all four candidates; each paired corpus image is represented only by
|
|
90
|
+
its short textual `direction`. Never attach the redesign source and a corpus
|
|
91
|
+
image to the same generation. Use `inspiration` reference mode for the first two
|
|
92
|
+
cases and `preserve-structure` for the last.
|
|
@@ -36,6 +36,24 @@ Add `--aspect landscape|portrait|square` when the target is known. Prefer
|
|
|
36
36
|
direct `--query`; use `--query-file` only when quoting genuinely requires it.
|
|
37
37
|
Add `--origin` only when the task deliberately targets another deployment.
|
|
38
38
|
|
|
39
|
+
For a redesign, distinguish the user's existing interface from corpus
|
|
40
|
+
inspiration. Send that redesign source into retrieval so visual structure can
|
|
41
|
+
condition the ranked space alongside the text:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
12ui corpus inspire \
|
|
45
|
+
--query "<what to preserve, what to change, desired direction>" \
|
|
46
|
+
--reference-image <existing-interface.png> \
|
|
47
|
+
--count 4 \
|
|
48
|
+
--out-dir <references-dir>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The command accepts one PNG, JPEG, or WebP source, records its absolute path,
|
|
52
|
+
SHA-256, media type, and size locally, and uploads its bytes privately for one
|
|
53
|
+
image-and-text embedding. The source is not one of the returned references and
|
|
54
|
+
its bytes are not persisted by 12UI. If the same source path changes before a
|
|
55
|
+
resume, stop rather than silently searching with different evidence.
|
|
56
|
+
|
|
39
57
|
The command reserves the output directory, records request/response evidence,
|
|
40
58
|
downloads full images in parallel, and writes `manifest.json`. Validate the
|
|
41
59
|
count, unique IDs, decodable files, and hashes. Return the exact endpoint order
|
|
@@ -56,5 +74,6 @@ references. If resume remains ambiguous or underfilled, report the stable key
|
|
|
56
74
|
and evidence path and stop.
|
|
57
75
|
|
|
58
76
|
Hand off the manifest path, idempotency key, set ID, ordered IDs, image paths,
|
|
59
|
-
hashes, returned metrics,
|
|
60
|
-
four valid references before
|
|
77
|
+
hashes, returned metrics, redesign-source evidence when present, and usage
|
|
78
|
+
notice. A `design` run requires exactly four valid references before
|
|
79
|
+
generation.
|