@12ui/design 0.2.75 → 0.2.76

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 (126) hide show
  1. package/README.md +126 -116
  2. package/SKILL.md +33 -28
  3. package/dist/cli-arguments.d.ts.map +1 -1
  4. package/dist/cli-arguments.js +21 -7
  5. package/dist/cli-arguments.js.map +1 -1
  6. package/dist/cli-capabilities.d.ts +3 -2
  7. package/dist/cli-capabilities.d.ts.map +1 -1
  8. package/dist/cli-capabilities.js +2 -1
  9. package/dist/cli-capabilities.js.map +1 -1
  10. package/dist/cli-help/design.d.ts +1 -1
  11. package/dist/cli-help/design.js +1 -1
  12. package/dist/cli-help/design.js.map +1 -1
  13. package/dist/cli-help/index.d.ts +18 -8
  14. package/dist/cli-help/index.d.ts.map +1 -1
  15. package/dist/cli-help/scene.d.ts +15 -5
  16. package/dist/cli-help/scene.d.ts.map +1 -1
  17. package/dist/cli-help/scene.js +44 -0
  18. package/dist/cli-help/scene.js.map +1 -1
  19. package/dist/cli-help/workflow.d.ts +2 -2
  20. package/dist/cli-help/workflow.d.ts.map +1 -1
  21. package/dist/cli-help/workflow.js +4 -3
  22. package/dist/cli-help/workflow.js.map +1 -1
  23. package/dist/cli-scene-command.d.ts.map +1 -1
  24. package/dist/cli-scene-command.js +39 -6
  25. package/dist/cli-scene-command.js.map +1 -1
  26. package/dist/cli-usage.d.ts.map +1 -1
  27. package/dist/cli-usage.js +8 -6
  28. package/dist/cli-usage.js.map +1 -1
  29. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  30. package/dist/legacy-skill-catalog.js +26 -2
  31. package/dist/legacy-skill-catalog.js.map +1 -1
  32. package/dist/mcp-slate-command.d.ts +9 -0
  33. package/dist/mcp-slate-command.d.ts.map +1 -1
  34. package/dist/mcp-slate-command.js +19 -5
  35. package/dist/mcp-slate-command.js.map +1 -1
  36. package/dist/mcp-workflow-tools.js +3 -3
  37. package/dist/mcp-workflow-tools.js.map +1 -1
  38. package/dist/scene/camera-diagnostics.d.ts +61 -0
  39. package/dist/scene/camera-diagnostics.d.ts.map +1 -0
  40. package/dist/scene/camera-diagnostics.js +166 -0
  41. package/dist/scene/camera-diagnostics.js.map +1 -0
  42. package/dist/scene/camera-solve.d.ts +2 -0
  43. package/dist/scene/camera-solve.d.ts.map +1 -1
  44. package/dist/scene/camera-solve.js +59 -42
  45. package/dist/scene/camera-solve.js.map +1 -1
  46. package/dist/scene/capture.d.ts +24 -0
  47. package/dist/scene/capture.d.ts.map +1 -1
  48. package/dist/scene/capture.js +53 -2
  49. package/dist/scene/capture.js.map +1 -1
  50. package/dist/scene/convert-run.d.ts +30 -0
  51. package/dist/scene/convert-run.d.ts.map +1 -0
  52. package/dist/scene/convert-run.js +135 -0
  53. package/dist/scene/convert-run.js.map +1 -0
  54. package/dist/scene/media-query.d.ts +21 -0
  55. package/dist/scene/media-query.d.ts.map +1 -0
  56. package/dist/scene/media-query.js +208 -0
  57. package/dist/scene/media-query.js.map +1 -0
  58. package/dist/scene/page-css.d.ts +38 -0
  59. package/dist/scene/page-css.d.ts.map +1 -0
  60. package/dist/scene/page-css.js +210 -0
  61. package/dist/scene/page-css.js.map +1 -0
  62. package/dist/scene/page-images.d.ts +33 -0
  63. package/dist/scene/page-images.d.ts.map +1 -0
  64. package/dist/scene/page-images.js +53 -0
  65. package/dist/scene/page-images.js.map +1 -0
  66. package/dist/scene/page-merge.d.ts +41 -0
  67. package/dist/scene/page-merge.d.ts.map +1 -0
  68. package/dist/scene/page-merge.js +197 -0
  69. package/dist/scene/page-merge.js.map +1 -0
  70. package/dist/scene/responsive-bands.d.ts +19 -0
  71. package/dist/scene/responsive-bands.d.ts.map +1 -0
  72. package/dist/scene/responsive-bands.js +25 -0
  73. package/dist/scene/responsive-bands.js.map +1 -0
  74. package/dist/scene/scene-index.d.ts +10 -0
  75. package/dist/scene/scene-index.d.ts.map +1 -0
  76. package/dist/scene/scene-index.js +43 -0
  77. package/dist/scene/scene-index.js.map +1 -0
  78. package/dist/scene/scene-merge.d.ts +29 -0
  79. package/dist/scene/scene-merge.d.ts.map +1 -0
  80. package/dist/scene/scene-merge.js +130 -0
  81. package/dist/scene/scene-merge.js.map +1 -0
  82. package/dist/scene/scene-verbs.d.ts +1 -1
  83. package/dist/scene/scene-verbs.d.ts.map +1 -1
  84. package/dist/scene/scene-verbs.js +1 -1
  85. package/dist/scene/scene-verbs.js.map +1 -1
  86. package/dist/scene/serve-detach.d.ts +23 -0
  87. package/dist/scene/serve-detach.d.ts.map +1 -0
  88. package/dist/scene/serve-detach.js +92 -0
  89. package/dist/scene/serve-detach.js.map +1 -0
  90. package/dist/scene/static-server.d.ts +2 -0
  91. package/dist/scene/static-server.d.ts.map +1 -1
  92. package/dist/scene/static-server.js +3 -0
  93. package/dist/scene/static-server.js.map +1 -1
  94. package/dist/scene/symmetric-eigen.d.ts +12 -0
  95. package/dist/scene/symmetric-eigen.d.ts.map +1 -0
  96. package/dist/scene/symmetric-eigen.js +43 -0
  97. package/dist/scene/symmetric-eigen.js.map +1 -0
  98. package/dist/workflow/adapter-12ui.d.ts.map +1 -1
  99. package/dist/workflow/adapter-12ui.js +3 -5
  100. package/dist/workflow/adapter-12ui.js.map +1 -1
  101. package/dist/workflow/providers.d.ts.map +1 -1
  102. package/dist/workflow/providers.js +5 -2
  103. package/dist/workflow/providers.js.map +1 -1
  104. package/dist/workflow/recipes.d.ts +1 -2
  105. package/dist/workflow/recipes.d.ts.map +1 -1
  106. package/dist/workflow/recipes.js +6 -18
  107. package/dist/workflow/recipes.js.map +1 -1
  108. package/dist/workflow/routing.d.ts.map +1 -1
  109. package/dist/workflow/routing.js +3 -1
  110. package/dist/workflow/routing.js.map +1 -1
  111. package/dist/workflow/types.d.ts +7 -0
  112. package/dist/workflow/types.d.ts.map +1 -1
  113. package/dist/workflow/types.js +7 -0
  114. package/dist/workflow/types.js.map +1 -1
  115. package/dist/workspace-draw-messages.d.ts.map +1 -1
  116. package/dist/workspace-draw-messages.js +1 -2
  117. package/dist/workspace-draw-messages.js.map +1 -1
  118. package/open-design.json +2 -2
  119. package/package.json +2 -2
  120. package/skills/12ui-design/SKILL.md +79 -19
  121. package/skills/12ui-design/agents/openai.yaml +2 -0
  122. package/skills/12ui-design/improve.md +1 -5
  123. package/skills/12ui-design/inspire.md +5 -8
  124. package/skills/12ui-design/outputs.md +2 -23
  125. package/skills/12ui-design/scene.md +27 -156
  126. package/skills/12ui-design/session.md +0 -161
@@ -1,161 +0,0 @@
1
- # Persistent local workflow
2
-
3
- Use one local workspace for related work. The CLI and MCP share the same operation service; choose whichever is available. Neither preparation nor artifact import needs a 12ui account. A session handoff lets this conversation use its native tools without extracting credentials or launching a nested coding agent.
4
-
5
- ## Prepare and import
6
-
7
- Import an existing reference once:
8
-
9
- 12ui workflow import <image.png> --workspace <workspace> --media-type image/png --role reference
10
-
11
- Use an absolute source path when the file is outside the workspace. Relative imported paths resolve inside the workspace, not the shell's current directory. The returned artifact identifies stored bytes by path, hash, size and media type. Put returned artifact objects in the request's `inputs`; do not invent hashes or use expiring remote URLs as durable input identities.
12
-
13
- Write a request JSON file. A new design direction can start with:
14
-
15
- ```json
16
- {
17
- "capability": "image",
18
- "prompt": "Design an editorial architecture homepage with warm materials, clear project navigation and restrained typography. Use the attached references as visual context.",
19
- "inputs": [],
20
- "output": { "kind": "image" }
21
- }
22
- ```
23
-
24
- 12ui workflow prepare <request.json> --workspace <workspace> --key <stable-operation-key>
25
-
26
- Preparation returns the persistent operation ID. Reusing the same key with the same request recovers that operation; changed intent needs a new key. Use separate operations for candidates, selected-page expansion, image edits, labels and implementation so dependent work can reuse verified outputs.
27
-
28
- `text`, `image`, `image-edit`, `code` and `convert` are distinct capabilities. Output kinds are `json`, `image`, `html` and `project`; JSON may include an output schema. Keep provider credentials, environment dumps and private authentication state out of prompts, parameters and result files.
29
-
30
- ## Execute in the current session
31
-
32
- 12ui workflow execute <operation-id> --workspace <workspace> --providers session --session-capabilities image
33
-
34
- Declare the capability of this request only after confirming its tool is available. For an image edit use `image-edit`; for implementation use `code`. A session route returns a handoff with the frozen prompt, input artifacts, expected output, public parameters, work/evidence directories and `attemptNumber`. Keep that attempt number with the returned result or failure; it prevents an old session from settling a newer attempt. Use its selected project directory for implementation; do not edit a different project. This claims the operation before generation. Execute it once using the available native tool, preserve its returned output, and register that output. Do not mistake the handoff for a generated result.
35
-
36
- Write a result JSON file using actual existing local files:
37
-
38
- ```json
39
- {
40
- "files": [
41
- { "path": "/absolute/generated-image.png", "mediaType": "image/png", "role": "candidate" }
42
- ]
43
- }
44
- ```
45
-
46
- For structured text, use `value` with the requested JSON object. Include `providerRequestId` and `usage` only when actually supplied by the provider; do not estimate missing quota or image price from an account-wide percentage.
47
-
48
- 12ui workflow register <operation-id> --workspace <workspace> --attempt <handoff-attempt-number> --result <result.json>
49
- 12ui workflow status <operation-id> --workspace <workspace>
50
-
51
- Registration copies and hashes file artifacts. Use the registered artifacts as inputs to the next prepared operation. Continue from this stored state after a restart, conversation change or executor change. Registration and schema validation establish an artifact contract, not visual approval; inspect the image/browser before accepting it for dependent work.
52
-
53
- For an `implement` operation, the service records a baseline of the explicit `projectCwd` before the handoff. Make the actual changes in that project, then register a normal result with `value` containing your report and optional `files` for real additional receipts. Registration compares the project with its saved baseline and adds verified project-change evidence and changed-file artifacts automatically. Do not fabricate that evidence JSON or use a provider receipt as proof of implementation. No changed files produces `project_no_changes`; a claimed no-op is not a successful implementation. Report actual browser/test checks separately: verified file changes do not prove those checks passed, and the service does not invent validation evidence.
54
-
55
- For a successful recipe plan, prepare its dependent operations deterministically:
56
-
57
- 12ui workflow continue <plan-operation-id> --workspace <workspace>
58
-
59
- Continue returns `readyOperationIds`, children, verified artifacts and waiting/blocked state. It does not execute models. Execute each ready operation with the intended provider policy, register its result, then continue the same parent plan again. Draft continuation creates candidate image operations; branch continuation unlocks later slots only after their actual dependency artifacts exist. A redesign plan continues to a draft plan, then to its candidate images. Repeated continuation reuses child IDs. Generic prepared requests have no recipe expansion; prepare their next dependent operation explicitly from registered artifacts.
60
-
61
- ## Provider selection and cost
62
-
63
- 12ui workflow capabilities --session-capabilities text,image,image-edit,code
64
-
65
- Only declare the subset actually available. Without a session image tool, a Codex or Claude text CLI is not an image provider. Default routing considers session, Codex, Claude, OpenAI and 12ui in order, filtering for the requested capability and explicit funding permission. Limit `--providers` when a particular execution boundary is required.
66
-
67
- Subscription execution consumes the user's model allowance and local resources. OpenAI API execution requires its key and authorization; 12ui execution requires its service credentials and authorization. Set `--allow-paid openai` or `--allow-paid 12ui` only when the user has authorized that provider's spend for this work. A configured key alone does not authorize either. Preparation does not imply authorization for later paid fallback.
68
-
69
- The OpenAI adapter requires an explicit account-available model: set public `parameters.model` on a generic request, or use `OPENAI_MODEL` for text/generated HTML and `OPENAI_IMAGE_MODEL` for images. `OPENAI_API_KEY` and `TWELVE_UI_API_KEY` identify separately funded routes; never put keys in requests or results. Native subprocesses remove API-key/provider overrides from their environment. Codex text/code execution is unavailable unless the user trusts their existing CLI configuration, including configured tools and hooks: pass `--trust-codex-config` on execution or discovery only with that authorization. Its read-only text sandbox does not isolate remote tool effects. This opt-in is independent of paid-provider authorization and is unnecessary for the current session's tools. Claude uses supported safe mode, empty MCP configuration and a fixed file-tool set for code; it cannot run shell tests, and its text path currently rejects image attachments. Run project checks in the parent session. Use the session for visual planning, labels and review when it can inspect images. OpenAI code produces HTML without running a project; 12ui code uses its conversion path. Neither is an implementation executor for an existing project.
70
-
71
- An unavailable provider can be skipped before dispatch. After a dispatch, a failure is not permission to buy the same work elsewhere. Follow the saved failure disposition: only a recorded proof of non-dispatch or a terminal no-output failure can make another provider eligible. An ambiguous outcome stays in reconciliation; preserve it and recover the actual result before any new dispatch. Do not clear state, change the key or repeatedly execute a handoff to work around this boundary.
72
-
73
- If a session tool refuses, is denied permission or has an uncertain outcome, preserve that evidence and record a failure JSON containing `code`, `message` and `disposition`:
74
-
75
- 12ui workflow fail <operation-id> --workspace <workspace> --attempt <handoff-attempt-number> --failure <failure.json>
76
-
77
- Use `terminal-stop` for refusals or permission denials and `ambiguous` when dispatch/output is uncertain. Neither permits fallback. Use `not-dispatched` or `terminal-no-output` only with actual evidence establishing that outcome; elapsed time, a missing screenshot or a new session is not proof. An ambiguous operation can be completed by registering its recovered original result, not by downgrading the failure to enable another call.
78
-
79
- An accepted hosted job with a failed download, or a completed response whose output is malformed, remains in reconciliation under its original operation and attempt. Recover the original provider output and dependencies, validate them and register them against that same attempt. Keep provider IDs and retained responses; do not regenerate or switch providers to repair a delivery failure. Refusals and permission denials remain terminal stops.
80
-
81
- ## Recipes and MCP
82
-
83
- Workflow recipes prepare the same persistent operations. They are request builders, not a hosted pipeline or a guarantee that images/code have already been generated.
84
-
85
- | Recipe | Input JSON | Prepared work |
86
- | --- | --- | --- |
87
- | `draft` | `concept`, optional `candidates`, `references`, `retain`, `content`, `aspect` | Text plan of distinct candidate prompts; continue it to prepare image operations. |
88
- | `branch` | `concept`, approved `source`, optional `scope`, `maxScreens`, `references` | Text plan of pages and ordered viewport slots; preserve the existing root and generate only additional slots. |
89
- | `edit` | `source`, `prompt`, optional `references`, `quality` | Image edit of the first source. |
90
- | `redesign` | `source`, `direction`, optional `references` | Text concept/retain/corpus-query plan; image generation and implementation are subsequent operations. |
91
- | `labels` | `source`, optional `context` | JSON labels and proposed interactions; not working behavior. |
92
- | `review` | `source`, optional `target`, `context`, `criteria` | Evidence-based visual findings and limitations; no numeric quality score, runtime verification or automatic repair. |
93
- | `convert` | `source`, optional `prompt`, `output`, `native` | Editable HTML/code by default. LayerDoc requires explicit native conversion and its supported provider. |
94
- | `implement` | absolute existing `projectCwd`, `targets`, optional `prompt` | Code changes in that selected project; preserve source changes and verify real behavior. |
95
-
96
- Image paths inside recipe JSON and file paths inside result JSON are relative to the workspace unless absolute. The JSON specification/result file passed to the CLI itself is read relative to the shell's current directory. For example, save `{"concept":"An editorial architecture homepage","candidates":4}` as the draft specification:
97
-
98
- 12ui workflow draft <draft-spec.json> --workspace <workspace> --key <draft-plan-key>
99
-
100
- Execute that operation with a text-capable session, register the JSON plan, and continue it to obtain stable candidate operation IDs. Inspect candidate images before selecting one for branch or implementation. Check installed help before relying on optional fields; generic `prepare` remains available for an explicit request.
101
-
102
- ## Capture, review and portable output
103
-
104
- Capture a running local or public page with local Chromium:
105
-
106
- 12ui workflow capture <http-or-https-url> --workspace <workspace> --width 1440 --height 900 --full-page
107
-
108
- This stores screenshot, DOM and manifest artifacts without model work. It uses a fresh unauthenticated browser, not the user's signed-in browser profile. Inspect `requestedUrl`, `capturedUrl` and `redirected` plus the actual image before treating it as application evidence. For an authenticated interface, capture with an available authorized session browser and import that screenshot instead. Chromium must already be available locally.
109
-
110
- Prepare a review specification with current screenshot `source`, optional approved `target` and `criteria`:
111
-
112
- 12ui workflow review <review-spec.json> --workspace <workspace> --key <review-key>
113
-
114
- Execute and register its findings like any text operation with image inputs. A screenshot review cannot prove route behavior, accessibility-tree semantics or tests. Use actual browser and project tools for those checks; prepare only justified corrections after inspection.
115
-
116
- For session-generated HTML, register the entrypoint and every asset with their original relative paths. For example:
117
-
118
- ```json
119
- {
120
- "files": [
121
- { "path": "/absolute/generated/index.html", "mediaType": "text/html", "role": "entrypoint", "relativePath": "index.html" },
122
- { "path": "/absolute/generated/assets/style.css", "mediaType": "text/css", "role": "asset", "relativePath": "assets/style.css" }
123
- ]
124
- }
125
- ```
126
-
127
- Preserve image, font, script and stylesheet mappings; copying only the HTML can break its references. The SDK's `collectBundleFiles(directory, entrypoint)` returns mapped file entries for an isolated generated-output directory; register those entries through the same operation service. Never collect a whole existing project checkout or credential directory. Project changes stay in the selected project; provider receipts alone are not a portable project.
128
-
129
- 12ui workflow export <operation-id> --workspace <workspace> --destination <new-output-directory>
130
-
131
- Export verifies stored bytes and retains the logical paths. A new or empty directory is required; an identical previous export is reused and differing existing files are refused. Export does not execute a model, convert to another native format, publish a site or validate browser behavior.
132
-
133
- ## Prototype interaction labels
134
-
135
- For an existing converted branch, prepare labels from its actual DOM candidates and known destinations:
136
-
137
- 12ui prototype <run-dir> --labels workflow --workspace <workspace>
138
-
139
- This performs local browser inventory/analysis and returns `awaiting_labels` with stable operation IDs. It does not dispatch a model or read hosted credentials. Execute each prepared operation through the shared workflow service with an available text provider, then register its JSON using the handoff's attempt number. For a dispatched/reconciling operation, recover its existing result instead of executing again. Repeat the same prototype command once those operations succeed; it consumes the exact completed results and runs the normal build/runtime gates. Legacy branch resume will not replace an `awaiting_labels` pause with hosted label calls.
140
-
141
- These operations freeze the real candidate IDs, screen, destinations and source HTML/plan/completion evidence. Generic image `workflow labels` annotations cannot be substituted. Each candidate requires exactly one supported action; unknown navigation targets, duplicate IDs and contradictory payloads are rejected before success. Ambiguous controls should be `none`; local-page outputs permit only navigation to known real pages or `none`. Existing links/forms and deterministic rules retain precedence. A prototype dialog demonstrates behavior; it does not execute a backend task.
142
-
143
- For converted branches, a semantic dropdown may label any evidenced menu trigger, regardless of its analyzer kind. Registration preserves the supplied option strings. The existing builder normalizes and deduplicates them; fewer than three usable choices produce an inert control with a recorded `dropdown_options_incomplete` degradation.
144
-
145
- The prototype manifest records source custody, operation IDs, provider, funding and reported usage. Its label `costMicros` counts only new hosted prototype-label calls; zero there does not imply free workflow model execution. Repeating preparation or moving the saved branch/workspace preserves IDs when the bound source content and candidate facts are unchanged. The source binding covers HTML, plan, completion and candidate facts, not a snapshot of every remotely linked asset.
146
-
147
- Standalone prototype still defaults to `--labels none`. Explicit `--labels 12ui` selects the older hosted per-screen route; it is separate from these local workflow operations.
148
-
149
- ## Verified native LayerDoc
150
-
151
- Native LayerDoc registration requires a canonical public LayerDoc v2 document with role `layerdoc` and `relativePath: "document.layerdoc.json"`, a role `layerdoc-assets` sidecar mapped to `layerdoc-assets.json`, and every referenced raster as a mapped role `asset` file. The sidecar uses schema `12ui.layerdoc-assets.v1`; its `assets` maps each canonical `artifactId` to `{path, sha256, mediaType}`. Paths identify retained local bytes. All files need portable relative mappings, and hashes, media types and declared pixel dimensions must agree with those bytes. Keep canonical artifact identities; do not insert invented URLs or relabel arbitrary JSON as LayerDoc.
152
-
153
- Read a completed native operation locally:
154
-
155
- 12ui workflow layerdoc <operation-id> --workspace <workspace>
156
-
157
- The SDK equivalents are `loadWorkflowLayerDoc({workspace, operationId})` and, for a relocated exported directory, `loadLayerDocBundle({directory})`. They return the canonical `document`, absolute `documentPath` and `manifestPath`, plus `assets` keyed by artifact ID with verified local `path`, `relativePath`, `sha256` and `mediaType`. Raster dimensions are validated against the document. This is a verified local reader contract, not an offline editor or a new conversion.
158
-
159
- The standard hosted `12ui convert <layerdoc.json>` path does not consume this sidecar bundle. It requires supported hydrated HTTP asset references; uploading local assets and hydrating those references needs a separate API path that is not supplied by the reader. Do not upload the raw canonical JSON alone and claim its local assets will follow.
160
-
161
- The MCP equivalents are `design.workflow.prepare`, `design.workflow.execute`, `design.workflow.register`, `design.workflow.continue`, `design.workflow.fail`, `design.workflow.status`, `design.workflow.import`, `design.workflow.capabilities`, `design.workflow.capture`, `design.workflow.export` and `design.workflow.layerdoc`. Recipes use `design.workflow.prepare` with `recipe` and `input`; registration and failure use the handoff's `attemptNumber`. MCP execution and discovery accept `trustCodexConfig` for the same explicit Codex configuration trust boundary. Use the tool's supplied schema. They call the same service and obey the same provider authorization, custody and reconciliation rules as the CLI. Do not log into 12ui merely to prepare, inspect or register local operations.