@12ui/design 0.2.0
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 +484 -0
- package/dist/artifact-materializer.d.ts +17 -0
- package/dist/artifact-materializer.d.ts.map +1 -0
- package/dist/artifact-materializer.js +66 -0
- package/dist/artifact-materializer.js.map +1 -0
- package/dist/cli-arguments.d.ts +8 -0
- package/dist/cli-arguments.d.ts.map +1 -0
- package/dist/cli-arguments.js +39 -0
- package/dist/cli-arguments.js.map +1 -0
- package/dist/cli-auth-command.d.ts +3 -0
- package/dist/cli-auth-command.d.ts.map +1 -0
- package/dist/cli-auth-command.js +100 -0
- package/dist/cli-auth-command.js.map +1 -0
- package/dist/cli-corpus-command.d.ts +12 -0
- package/dist/cli-corpus-command.d.ts.map +1 -0
- package/dist/cli-corpus-command.js +120 -0
- package/dist/cli-corpus-command.js.map +1 -0
- package/dist/cli-corpus-evidence.d.ts +17 -0
- package/dist/cli-corpus-evidence.d.ts.map +1 -0
- package/dist/cli-corpus-evidence.js +150 -0
- package/dist/cli-corpus-evidence.js.map +1 -0
- package/dist/cli-corpus-reference-downloads.d.ts +8 -0
- package/dist/cli-corpus-reference-downloads.d.ts.map +1 -0
- package/dist/cli-corpus-reference-downloads.js +111 -0
- package/dist/cli-corpus-reference-downloads.js.map +1 -0
- package/dist/cli-corpus-reference-receipts.d.ts +36 -0
- package/dist/cli-corpus-reference-receipts.d.ts.map +1 -0
- package/dist/cli-corpus-reference-receipts.js +137 -0
- package/dist/cli-corpus-reference-receipts.js.map +1 -0
- package/dist/cli-corpus-run.d.ts +17 -0
- package/dist/cli-corpus-run.d.ts.map +1 -0
- package/dist/cli-corpus-run.js +94 -0
- package/dist/cli-corpus-run.js.map +1 -0
- package/dist/cli-corpus-types.d.ts +52 -0
- package/dist/cli-corpus-types.d.ts.map +1 -0
- package/dist/cli-corpus-types.js +6 -0
- package/dist/cli-corpus-types.js.map +1 -0
- package/dist/cli-export-command.d.ts +3 -0
- package/dist/cli-export-command.d.ts.map +1 -0
- package/dist/cli-export-command.js +234 -0
- package/dist/cli-export-command.js.map +1 -0
- package/dist/cli-image-command.d.ts +8 -0
- package/dist/cli-image-command.d.ts.map +1 -0
- package/dist/cli-image-command.js +193 -0
- package/dist/cli-image-command.js.map +1 -0
- package/dist/cli-persistence.d.ts +25 -0
- package/dist/cli-persistence.d.ts.map +1 -0
- package/dist/cli-persistence.js +253 -0
- package/dist/cli-persistence.js.map +1 -0
- package/dist/cli-skill-command.d.ts +9 -0
- package/dist/cli-skill-command.d.ts.map +1 -0
- package/dist/cli-skill-command.js +215 -0
- package/dist/cli-skill-command.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +272 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-skill-config.d.ts +3 -0
- package/dist/codex-skill-config.d.ts.map +1 -0
- package/dist/codex-skill-config.js +83 -0
- package/dist/codex-skill-config.js.map +1 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +34 -0
- package/dist/config.js.map +1 -0
- package/dist/conversion-client.d.ts +264 -0
- package/dist/conversion-client.d.ts.map +1 -0
- package/dist/conversion-client.js +445 -0
- package/dist/conversion-client.js.map +1 -0
- package/dist/conversion-models.d.ts +4 -0
- package/dist/conversion-models.d.ts.map +1 -0
- package/dist/conversion-models.js +3 -0
- package/dist/conversion-models.js.map +1 -0
- package/dist/conversion-outputs.d.ts +118 -0
- package/dist/conversion-outputs.d.ts.map +1 -0
- package/dist/conversion-outputs.js +84 -0
- package/dist/conversion-outputs.js.map +1 -0
- package/dist/conversion-problems.d.ts +3 -0
- package/dist/conversion-problems.d.ts.map +1 -0
- package/dist/conversion-problems.js +21 -0
- package/dist/conversion-problems.js.map +1 -0
- package/dist/corpus-client.d.ts +171 -0
- package/dist/corpus-client.d.ts.map +1 -0
- package/dist/corpus-client.js +85 -0
- package/dist/corpus-client.js.map +1 -0
- package/dist/credential-setup.d.ts +27 -0
- package/dist/credential-setup.d.ts.map +1 -0
- package/dist/credential-setup.js +242 -0
- package/dist/credential-setup.js.map +1 -0
- package/dist/credential-store.d.ts +12 -0
- package/dist/credential-store.d.ts.map +1 -0
- package/dist/credential-store.js +103 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/idempotency-key.d.ts +2 -0
- package/dist/idempotency-key.d.ts.map +1 -0
- package/dist/idempotency-key.js +19 -0
- package/dist/idempotency-key.js.map +1 -0
- package/dist/image-generation-evidence.d.ts +26 -0
- package/dist/image-generation-evidence.d.ts.map +1 -0
- package/dist/image-generation-evidence.js +28 -0
- package/dist/image-generation-evidence.js.map +1 -0
- package/dist/image-output-width.d.ts +11 -0
- package/dist/image-output-width.d.ts.map +1 -0
- package/dist/image-output-width.js +55 -0
- package/dist/image-output-width.js.map +1 -0
- package/dist/image-provider-preflight.d.ts +21 -0
- package/dist/image-provider-preflight.d.ts.map +1 -0
- package/dist/image-provider-preflight.js +184 -0
- package/dist/image-provider-preflight.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/legacy-codex-cleanup.d.ts +11 -0
- package/dist/legacy-codex-cleanup.d.ts.map +1 -0
- package/dist/legacy-codex-cleanup.js +147 -0
- package/dist/legacy-codex-cleanup.js.map +1 -0
- package/dist/legacy-skill-catalog.d.ts +5 -0
- package/dist/legacy-skill-catalog.d.ts.map +1 -0
- package/dist/legacy-skill-catalog.js +123 -0
- package/dist/legacy-skill-catalog.js.map +1 -0
- package/dist/local-conversion-input.d.ts +21 -0
- package/dist/local-conversion-input.d.ts.map +1 -0
- package/dist/local-conversion-input.js +54 -0
- package/dist/local-conversion-input.js.map +1 -0
- package/dist/login-auth.d.ts +63 -0
- package/dist/login-auth.d.ts.map +1 -0
- package/dist/login-auth.js +282 -0
- package/dist/login-auth.js.map +1 -0
- package/dist/package-client.d.ts +147 -0
- package/dist/package-client.d.ts.map +1 -0
- package/dist/package-client.js +119 -0
- package/dist/package-client.js.map +1 -0
- package/dist/project-profiles.d.ts +45 -0
- package/dist/project-profiles.d.ts.map +1 -0
- package/dist/project-profiles.js +162 -0
- package/dist/project-profiles.js.map +1 -0
- package/dist/responsive-quality.d.ts +26 -0
- package/dist/responsive-quality.d.ts.map +1 -0
- package/dist/responsive-quality.js +68 -0
- package/dist/responsive-quality.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +173 -0
- package/dist/server.js.map +1 -0
- package/dist/skill-installer.d.ts +51 -0
- package/dist/skill-installer.d.ts.map +1 -0
- package/dist/skill-installer.js +328 -0
- package/dist/skill-installer.js.map +1 -0
- package/package.json +53 -0
- package/skills/design/SKILL.md +156 -0
- package/skills/design/agents/openai.yaml +6 -0
- package/skills/design/references/selection-contract.md +44 -0
- package/skills/design-convert/SKILL.md +118 -0
- package/skills/design-convert/agents/openai.yaml +6 -0
- package/skills/design-search/SKILL.md +86 -0
- package/skills/design-search/agents/openai.yaml +6 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design
|
|
3
|
+
description: "REQUIRED for all visual interface tasks (UI, Web, Mobile). Uses design-search to find high-quality references with strong UX and personality, image generation to explore distinctive directions, and design-convert to turn the chosen design into ready-to-use code quickly. Use for creating, redesigning, or implementing interfaces; it routes finished screenshots directly to conversion and keeps tiny edits code-only."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design
|
|
7
|
+
|
|
8
|
+
Author the visual direction before implementing it. Code-first agents tend to
|
|
9
|
+
settle on safe, generic visual defaults. Corpus-conditioned image generation
|
|
10
|
+
introduces personality and a wider design vocabulary; converting the selected
|
|
11
|
+
image then preserves that direction with near-pixel-perfect fidelity much
|
|
12
|
+
faster than manually recreating it in code.
|
|
13
|
+
|
|
14
|
+
This skill orchestrates `design-search`, image generation, `design-convert`,
|
|
15
|
+
project integration, and visual verification. It is for UI, web, and mobile
|
|
16
|
+
interfaces.
|
|
17
|
+
|
|
18
|
+
## Route the request
|
|
19
|
+
|
|
20
|
+
Inspect the input and the target repository, then choose exactly one route:
|
|
21
|
+
|
|
22
|
+
- **Finished screenshot or mockup:** invoke the `design-convert` workflow
|
|
23
|
+
directly. Do not search or generate alternatives.
|
|
24
|
+
- **Small visual edit:** edit the existing project code directly. Do not make a
|
|
25
|
+
paid corpus, image-generation, or conversion call.
|
|
26
|
+
- **Rough brief, new interface, or major redesign:** run the complete authored
|
|
27
|
+
workflow below.
|
|
28
|
+
|
|
29
|
+
If the route is unclear, prefer the least expensive route that can satisfy the
|
|
30
|
+
request. A request changes to the complete workflow only when it needs a new
|
|
31
|
+
visual direction, not merely because design work is involved.
|
|
32
|
+
|
|
33
|
+
## Complete authored workflow
|
|
34
|
+
|
|
35
|
+
### 1. Prepare
|
|
36
|
+
|
|
37
|
+
1. Inspect the repository instructions, framework, routes, styling, reusable
|
|
38
|
+
components, assets, package manager, validation commands, and current user
|
|
39
|
+
changes.
|
|
40
|
+
2. Create an isolated run directory, using the repository's scratch convention
|
|
41
|
+
or `.12ui-design/runs/<run-id>`.
|
|
42
|
+
3. Write `brief.txt` with the product and audience, required content and
|
|
43
|
+
interactions, exact copy, intended surface and viewport, desired
|
|
44
|
+
personality, accessibility needs, and prohibited brands or copied text.
|
|
45
|
+
4. Use one CLI installation and one account/origin throughout the run. Verify
|
|
46
|
+
it with `12ui auth status` and `12ui capabilities --json`.
|
|
47
|
+
|
|
48
|
+
Never substitute cached examples, invented corpus entries, placeholder images,
|
|
49
|
+
or mock conversion output for a real run.
|
|
50
|
+
|
|
51
|
+
### 2. Retrieve exactly four references
|
|
52
|
+
|
|
53
|
+
Invoke `design-search` with `--count 4`, saving its result under
|
|
54
|
+
`<run-dir>/references`. The complete authored workflow always requires four
|
|
55
|
+
distinct, successfully downloaded real corpus images. Preserve the returned
|
|
56
|
+
order and metrics.
|
|
57
|
+
|
|
58
|
+
If the search request is interrupted or ambiguous, use `12ui corpus resume`
|
|
59
|
+
with the saved output directory and original origin. Do not delete evidence,
|
|
60
|
+
start a replacement request, or spend another search for the same unchanged
|
|
61
|
+
brief.
|
|
62
|
+
|
|
63
|
+
### 3. Generate exactly four candidates
|
|
64
|
+
|
|
65
|
+
Create four frozen prompt files, one each for candidates A through D. Every
|
|
66
|
+
prompt must:
|
|
67
|
+
|
|
68
|
+
- attach and identify all four local corpus reference images;
|
|
69
|
+
- preserve the brief's required content, exact copy, interactions, surface, and
|
|
70
|
+
viewport;
|
|
71
|
+
- ask for a shippable interface rather than a mood board, wireframe, device
|
|
72
|
+
scene, or perspective presentation;
|
|
73
|
+
- use abstract composition, spacing, hierarchy, color relationships, material,
|
|
74
|
+
and typographic energy without copying brands, logos, names, or text;
|
|
75
|
+
- keep controls plausible, text legible, and states accessible; and
|
|
76
|
+
- prohibit watermarks and invented product claims.
|
|
77
|
+
|
|
78
|
+
Give every candidate all four references. Rotate which ordered reference is the
|
|
79
|
+
primary visual anchor: reference 1 for A, 2 for B, 3 for C, and 4 for D. The
|
|
80
|
+
other three remain active secondary references.
|
|
81
|
+
|
|
82
|
+
Dispatch the four candidates in parallel. Use the host's built-in imagegen
|
|
83
|
+
tool when it is available. Otherwise, invoke one `12ui image generate`
|
|
84
|
+
operation per candidate with its prompt file, all four repeated reference
|
|
85
|
+
arguments, a unique output path, the project root, an explicit
|
|
86
|
+
`--aspect landscape|portrait|square` matching the target surface, the
|
|
87
|
+
preselected provider, and a stable idempotency key. Check
|
|
88
|
+
`12ui image generate --help` for the installed version's exact flag spelling.
|
|
89
|
+
|
|
90
|
+
Run the four operations beneath one joinable foreground parent and wait for
|
|
91
|
+
all four to finish before the host turn exits. In a noninteractive coding
|
|
92
|
+
agent, use its supported foreground task-group primitive, `Promise.all`, or a
|
|
93
|
+
shell parent that explicitly `wait`s for every child. Never leave generation
|
|
94
|
+
as detached background work: the host may tear those processes down after the
|
|
95
|
+
turn, leaving dispatched evidence without a recoverable provider result. If
|
|
96
|
+
the host cannot guarantee that join, stop before dispatch and report the
|
|
97
|
+
limitation.
|
|
98
|
+
|
|
99
|
+
Select the provider before dispatch:
|
|
100
|
+
|
|
101
|
+
- built-in imagegen when the host exposes it;
|
|
102
|
+
- otherwise authenticated Codex image generation after successful
|
|
103
|
+
`codex --version` and `codex login status` preflights; or
|
|
104
|
+
- otherwise `gpt-image-2` only when `OPENAI_API_KEY` is available in the
|
|
105
|
+
process or exactly `<project-root>/.env` and the CLI's safety checks pass.
|
|
106
|
+
|
|
107
|
+
Never switch providers after dispatch. Preserve attempt evidence and stop on a
|
|
108
|
+
failed or ambiguous operation. Do not replace a candidate generated without
|
|
109
|
+
all four references. Save the original returned bytes under
|
|
110
|
+
`<run-dir>/candidates`, retain their real formats, and hash them immediately.
|
|
111
|
+
|
|
112
|
+
### 4. Choose the winner
|
|
113
|
+
|
|
114
|
+
The host agent inspects all four candidates at original detail against the
|
|
115
|
+
brief. Reject any candidate that omits required content, copies reference
|
|
116
|
+
identity or text, has implausible UX, contains illegible output, or cannot be
|
|
117
|
+
implemented on the requested surface.
|
|
118
|
+
|
|
119
|
+
Choose the strongest eligible direction using visible evidence: fulfillment of
|
|
120
|
+
the brief, hierarchy and usability, distinctiveness and personality,
|
|
121
|
+
accessibility, and feasibility. This is a host-agent design decision; do not
|
|
122
|
+
delegate the decision to an external evaluator.
|
|
123
|
+
|
|
124
|
+
Before conversion, write `<run-dir>/selection.json` following
|
|
125
|
+
[the selection contract](references/selection-contract.md). It must preserve
|
|
126
|
+
the exact prompts, reference IDs, candidate paths and SHA-256 hashes, selected
|
|
127
|
+
winner, rejection reasons for every non-winner, and a concise rationale tied to
|
|
128
|
+
visible features.
|
|
129
|
+
|
|
130
|
+
### 5. Convert only the winner
|
|
131
|
+
|
|
132
|
+
Invoke `design-convert` once for the winning bitmap. Use a stable idempotency
|
|
133
|
+
key derived from the project identity, winner digest, target, viewport, and
|
|
134
|
+
workflow revision. Preserve the base conversion ID and its durable evidence.
|
|
135
|
+
|
|
136
|
+
If conversion fails or its outcome is ambiguous, diagnose or resume that
|
|
137
|
+
operation. Do not convert another candidate merely to bypass the failure.
|
|
138
|
+
|
|
139
|
+
### 6. Integrate and verify
|
|
140
|
+
|
|
141
|
+
1. Inspect generated files and assets before copying them.
|
|
142
|
+
2. Merge the smallest coherent set into the target, preserving its routing,
|
|
143
|
+
components, tokens, dependency policy, accessibility conventions, and
|
|
144
|
+
unrelated user changes.
|
|
145
|
+
3. Remove duplicate generated scaffolding after integration.
|
|
146
|
+
4. Run focused typecheck, tests, lint, and build checks in parallel when their
|
|
147
|
+
outputs do not conflict.
|
|
148
|
+
5. Launch the real interface and exercise its interactions.
|
|
149
|
+
6. Compare the implementation with the winning image at the source viewport
|
|
150
|
+
and representative narrower and wider viewports. Correct integration defects
|
|
151
|
+
in project code and retain evidence for conversion defects.
|
|
152
|
+
|
|
153
|
+
Report the corpus idempotency key, set ID, and reference IDs, four candidate
|
|
154
|
+
paths and hashes, selected winner and rationale, base conversion ID, integrated
|
|
155
|
+
files, launched examples, validation results, and any remaining visual
|
|
156
|
+
differences.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Selection evidence contract
|
|
2
|
+
|
|
3
|
+
Write `selection.json` before converting a candidate. Use absolute candidate
|
|
4
|
+
paths so a resumed run cannot select the wrong file. Keep exact prompt text and
|
|
5
|
+
SHA-256 digests; do not replace them with summaries.
|
|
6
|
+
|
|
7
|
+
The document has this shape:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"version": 1,
|
|
12
|
+
"createdAt": "<ISO-8601 timestamp>",
|
|
13
|
+
"briefSha256": "<SHA-256>",
|
|
14
|
+
"corpus": {
|
|
15
|
+
"idempotencyKey": "<stable corpus inspiration key>",
|
|
16
|
+
"setId": "<returned set ID>",
|
|
17
|
+
"referenceIds": ["<id-1>", "<id-2>", "<id-3>", "<id-4>"]
|
|
18
|
+
},
|
|
19
|
+
"candidates": [
|
|
20
|
+
{
|
|
21
|
+
"id": "A",
|
|
22
|
+
"path": "<absolute original-image path>",
|
|
23
|
+
"sha256": "<SHA-256>",
|
|
24
|
+
"prompt": "<exact generation prompt>",
|
|
25
|
+
"referenceIds": ["<id-1>", "<id-2>", "<id-3>", "<id-4>"],
|
|
26
|
+
"primaryReferenceId": "<id-1>",
|
|
27
|
+
"provider": "<selected provider>",
|
|
28
|
+
"idempotencyKey": "<stable key>",
|
|
29
|
+
"attemptEvidencePath": "<absolute path when CLI-generated>",
|
|
30
|
+
"rejectionReasons": []
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"winner": "A",
|
|
34
|
+
"rationale": "<concise rationale based on visible features>"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Include exactly four candidate objects and four reference IDs in endpoint
|
|
39
|
+
order. Copy `corpus.idempotencyKey` and `corpus.setId` from the completed
|
|
40
|
+
inspiration manifest; neither value may be invented or replaced by an internal
|
|
41
|
+
request identifier. For each non-winner, `rejectionReasons` must contain at
|
|
42
|
+
least one specific visible reason. The winner must have an empty
|
|
43
|
+
`rejectionReasons` array. Record provider and attempt evidence for auditability;
|
|
44
|
+
do not store API keys or other secrets.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-convert
|
|
3
|
+
description: "Convert a PNG, JPEG, or WebP image into a structured LayerDoc with associated assets, then export responsive HTML, web or native app code, PDF, PSD, PPTX, Sketch, SVG, PNG, JPEG, or WebP. Use to recreate a finished design or turn a visual reference into production-ready output quickly."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design Convert
|
|
7
|
+
|
|
8
|
+
Convert one finished source image once, preserve its base LayerDoc conversion,
|
|
9
|
+
then export every required representation from that same structured source.
|
|
10
|
+
Integrate code output into the target repository and verify fidelity and
|
|
11
|
+
behavior.
|
|
12
|
+
|
|
13
|
+
## Prepare
|
|
14
|
+
|
|
15
|
+
1. Accept a static, non-interlaced PNG, JPEG, or WebP source.
|
|
16
|
+
2. Inspect its dimensions and intended CSS viewport. For a high-density mobile
|
|
17
|
+
capture, use the intended layout width rather than device pixels.
|
|
18
|
+
3. Inspect the target repository's instructions, framework, styling, language,
|
|
19
|
+
routes, package manager, components, assets, and validation commands.
|
|
20
|
+
4. Run `12ui auth status` and `12ui capabilities --json`.
|
|
21
|
+
5. Select only capabilities and exact project profiles the installed CLI
|
|
22
|
+
reports.
|
|
23
|
+
6. Derive a stable idempotency key from the project, source-image SHA-256,
|
|
24
|
+
viewport, model, and conversion revision.
|
|
25
|
+
|
|
26
|
+
Never invent output, substitute cached results, or repeat extraction to produce
|
|
27
|
+
another format. If an operation fails or is ambiguous, preserve its conversion
|
|
28
|
+
ID and evidence, then diagnose or resume it.
|
|
29
|
+
|
|
30
|
+
## Create one base LayerDoc conversion
|
|
31
|
+
|
|
32
|
+
Create the structured source once:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
12ui convert <source-image> \
|
|
36
|
+
--output layerdoc \
|
|
37
|
+
--model standard \
|
|
38
|
+
--width <intended-css-width> \
|
|
39
|
+
--idempotency-key <stable-key> \
|
|
40
|
+
--out <run-dir>/base.layerdoc.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Preserve the returned source conversion ID, LayerDoc, associated asset
|
|
44
|
+
directory and manifest, request evidence, and exact source digest. This
|
|
45
|
+
conversion ID is the source for all later exports.
|
|
46
|
+
|
|
47
|
+
Use `--detach` for long operations and finish the same operation with
|
|
48
|
+
`12ui resume <conversion-id>`. Do not submit a new conversion when resume can
|
|
49
|
+
unambiguously continue the existing one.
|
|
50
|
+
|
|
51
|
+
## Export from the base conversion
|
|
52
|
+
|
|
53
|
+
Export one or more supported outputs with:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
12ui export <source-conversion-id> \
|
|
57
|
+
--output <format> \
|
|
58
|
+
--out-dir <destination-directory> \
|
|
59
|
+
--idempotency-key <stable-export-key>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Supported formats are responsive HTML, web or native app code, PDF, PSD, PPTX,
|
|
63
|
+
Sketch, SVG, PNG, JPEG, and WebP. Request only formats reported by
|
|
64
|
+
`12ui capabilities --json`.
|
|
65
|
+
|
|
66
|
+
Independent exports may run in parallel because they all reference the same
|
|
67
|
+
immutable base conversion. Reuse the source conversion ID; never repeat image
|
|
68
|
+
extraction for export fan-out.
|
|
69
|
+
|
|
70
|
+
Web and native project exports require an exact capabilities-derived profile:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
12ui export <source-conversion-id> \
|
|
74
|
+
--output web_project \
|
|
75
|
+
--web-profile '{"version":1,"framework":"react","styling":"tailwind","language":"typescript","packaging":"page"}' \
|
|
76
|
+
--out-dir <run-dir>/web-export \
|
|
77
|
+
--idempotency-key <stable-web-export-key>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
12ui export <source-conversion-id> \
|
|
82
|
+
--output app_project \
|
|
83
|
+
--app-profile '{"version":1,"framework":"expo","styling":"native","language":"typescript","packaging":"screen"}' \
|
|
84
|
+
--out-dir <run-dir>/native-export \
|
|
85
|
+
--idempotency-key <stable-native-export-key>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Never guess a profile or silently change it after dispatch. Preserve every
|
|
89
|
+
export conversion ID and its relationship to the one base source conversion.
|
|
90
|
+
|
|
91
|
+
## Integrate code output
|
|
92
|
+
|
|
93
|
+
1. Extract generated project archives into an isolated temporary directory.
|
|
94
|
+
2. Inspect files and dependencies before copying them.
|
|
95
|
+
3. Merge the smallest coherent set into the target repository. Preserve
|
|
96
|
+
existing routing, tokens, components, accessibility patterns, dependency
|
|
97
|
+
policy, and unrelated user changes.
|
|
98
|
+
4. Reuse repository-owned assets and primitives where they are the source of
|
|
99
|
+
truth.
|
|
100
|
+
5. Remove duplicate generated scaffolding after integration.
|
|
101
|
+
|
|
102
|
+
## Verify
|
|
103
|
+
|
|
104
|
+
- Run focused typecheck, tests, lint, and build checks in parallel when their
|
|
105
|
+
outputs do not conflict.
|
|
106
|
+
- Launch every generated web or native example and exercise its interactions.
|
|
107
|
+
- Compare the launched result with the source at the intended viewport plus
|
|
108
|
+
representative narrower and wider viewports.
|
|
109
|
+
- Render or open PDF, PSD, PPTX, and Sketch artifacts with appropriate tooling;
|
|
110
|
+
inspect their structure, dimensions, assets, and visible fidelity.
|
|
111
|
+
- Inspect SVG and raster exports at original resolution.
|
|
112
|
+
- Correct integration defects in project code. For a conversion defect,
|
|
113
|
+
preserve the conversion ID and visible evidence before deciding whether a
|
|
114
|
+
changed source or conversion revision warrants a new base conversion.
|
|
115
|
+
|
|
116
|
+
Report the source digest and base conversion ID, associated assets, every
|
|
117
|
+
export format/profile/conversion ID, integrated files, launches and
|
|
118
|
+
interactions, validation results, and remaining visual differences.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-search
|
|
3
|
+
description: "Search the 12UI Design Corpus from a rough UI, web, or mobile concept and return a pre-explored, ranked, diverse set of reference images. Use before visual generation or implementation when the design needs high visual quality, sound UX, and more personality."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design Search
|
|
7
|
+
|
|
8
|
+
Turn a rough interface concept into real, local visual-reference files using
|
|
9
|
+
the authenticated 12UI Design Corpus. The service has already explored,
|
|
10
|
+
ranked, and diversified the design space. Preserve its result order and
|
|
11
|
+
metrics; do not invent a second ranking.
|
|
12
|
+
|
|
13
|
+
## Prepare the query
|
|
14
|
+
|
|
15
|
+
Write a concise query file that describes:
|
|
16
|
+
|
|
17
|
+
- product, audience, and user goal;
|
|
18
|
+
- surface: UI, web, or mobile;
|
|
19
|
+
- required content and interactions;
|
|
20
|
+
- desired personality, visual energy, and useful contrasts; and
|
|
21
|
+
- target viewport when known.
|
|
22
|
+
|
|
23
|
+
Do not name brands to imitate or ask to copy logos, names, or text. Corpus
|
|
24
|
+
images are inspiration rather than templates. Preserve the usage notice
|
|
25
|
+
returned by the service.
|
|
26
|
+
|
|
27
|
+
Verify the account with `12ui auth status`. Keep one CLI installation and one
|
|
28
|
+
origin for the entire request and any resume.
|
|
29
|
+
|
|
30
|
+
## Search
|
|
31
|
+
|
|
32
|
+
Standalone search defaults to four references. Respect an explicit requested
|
|
33
|
+
count instead of forcing four:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
12ui corpus inspire \
|
|
37
|
+
--query-file <query.txt> \
|
|
38
|
+
--out-dir <references-dir>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For an explicit count:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
12ui corpus inspire \
|
|
45
|
+
--query-file <query.txt> \
|
|
46
|
+
--count <requested-count> \
|
|
47
|
+
--out-dir <references-dir>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Add `--origin <origin>` only when targeting a specific verified deployment.
|
|
51
|
+
Use `--wildness` only when the user or orchestrating workflow requests it. Do
|
|
52
|
+
not add guessed filters that could turn a metered request into an empty set.
|
|
53
|
+
|
|
54
|
+
`corpus inspire` reserves the output directory, saves request and response
|
|
55
|
+
evidence, downloads full images, and writes `manifest.json`. Confirm the
|
|
56
|
+
manifest count, unique IDs, decodable image files, and digest receipts.
|
|
57
|
+
|
|
58
|
+
Return references in the exact endpoint order. Report the endpoint-provided
|
|
59
|
+
rank, distance, diversity, quality, or other metrics exactly as returned. Do
|
|
60
|
+
not recalculate, reorder, average, normalize, or silently discard entries.
|
|
61
|
+
|
|
62
|
+
## Resume without another search
|
|
63
|
+
|
|
64
|
+
If an attempt is interrupted, ambiguous, or only partly downloaded, retain its
|
|
65
|
+
directory and run:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
12ui corpus resume --out-dir <references-dir>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Pass the exact original `--origin` when the attempt recorded one. Resume reuses
|
|
72
|
+
the saved idempotency key and completes the same operation or downloads. Do not
|
|
73
|
+
delete evidence, start a replacement request, or overwrite bytes that disagree
|
|
74
|
+
with their saved digest.
|
|
75
|
+
|
|
76
|
+
If `manifest.json` already exists, verify and reuse it. If the response is
|
|
77
|
+
underfilled, duplicated, corrupt, or still ambiguous after resume, report the
|
|
78
|
+
stable idempotency key and evidence path and stop. Never fill missing slots
|
|
79
|
+
with cached or invented references.
|
|
80
|
+
|
|
81
|
+
## Handoff
|
|
82
|
+
|
|
83
|
+
Provide the manifest path, stable idempotency key, returned set ID, ordered
|
|
84
|
+
reference IDs, local image paths, exact returned metrics, usage notice, and
|
|
85
|
+
resume evidence. When called by `design`, it must hand back exactly four valid
|
|
86
|
+
references before generation can begin.
|