@ryuxdsgn/design-intelligence 2.13.3 → 2.13.4
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/dist/adapters.js +29 -0
- package/dist/cli/fsutil.js +61 -0
- package/dist/cli/index.js +712 -0
- package/dist/intelligence/analyze.js +146 -0
- package/dist/intelligence/capture.js +25 -0
- package/dist/intelligence/content.js +1375 -0
- package/dist/intelligence/critique.js +231 -0
- package/dist/intelligence/guides.js +778 -0
- package/dist/product.js +16 -0
- package/dist/render.js +279 -0
- package/dist/validate.js +68 -0
- package/package.json +2 -1
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
// Hand-written framework text for each RYUX skill: the questions, decision trees, and templates an
|
|
2
|
+
// agent reasons with. Rules (Do / Do not / Why) are generated from content.ts and appended below
|
|
3
|
+
// each guide by render.ts. Keep each guide short; the core is loaded on every task.
|
|
4
|
+
import { UNTRUSTED_CONTENT } from "./capture.js";
|
|
5
|
+
export const CORE_POSITIONING = `RYUX is a design intelligence layer for AI and designers. It helps understand, reason, design,
|
|
6
|
+
build, critique, and verify interfaces using design knowledge and evidence. It is not a UI
|
|
7
|
+
generator, an anti-slop framework, a design system, or a prompt library.
|
|
8
|
+
|
|
9
|
+
**Understand before you design. Don't design from imagination when evidence is available.**
|
|
10
|
+
|
|
11
|
+
\`\`\`
|
|
12
|
+
Understand → Frame → Explore → Evaluate and select → Build and critique → Verify and deliver → done
|
|
13
|
+
\`\`\``;
|
|
14
|
+
export const CORE_CAPABILITIES = `Tell RYUX what you are doing; RYUX decides what it needs to know. Pick the entry point, read its
|
|
15
|
+
file, then read only the knowledge modules the task needs (task table below). Paths are relative
|
|
16
|
+
to this skill's folder.
|
|
17
|
+
|
|
18
|
+
| Entry point | When | Read |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| **Analyze** | understand a screen, product, or flow that exists | \`capabilities/analyze.md\` |
|
|
21
|
+
| **Design** | create or improve UI and UX without code: Figma, pen.dev, mockups, copy | \`capabilities/design.md\` |
|
|
22
|
+
| **Build** | implement or change the interface in code | \`capabilities/build.md\` |
|
|
23
|
+
| **Critique** | find what should change first, and why | \`capabilities/critique.md\` |
|
|
24
|
+
| **QA** | verify a build against the intended design | \`capabilities/qa.md\` |
|
|
25
|
+
|
|
26
|
+
Knowledge modules (\`knowledge/\`): product, ux, interaction, forms, edge-cases, content, ui,
|
|
27
|
+
design-system, accessibility, responsive, frontend, and anti-slop. Evidence comes from the brief, the
|
|
28
|
+
project, product data, standards, and the ryux MCP when connected; none is required. Every entry point ends at the quality gates: the Hard
|
|
29
|
+
Gates below and the Delivery Gate, with anti-slop as the last check, never the starting point.
|
|
30
|
+
|
|
31
|
+
Keep them apart: Analyze says what exists, Design what to do, Critique if it is right, QA if it matches.`;
|
|
32
|
+
export const CORE_PRINCIPLE = `Novelty is not a goal; a recognisable brand layer is: familiar structure, distinct surface.
|
|
33
|
+
Optimize for clarity, usability, consistency, product fit, accessibility, and intentional decisions.
|
|
34
|
+
Understand the context first; keep observed facts apart from assumptions; prefer evidence over
|
|
35
|
+
taste; invent no requirements; give each meaningful decision its trade-off; validate before claiming.`;
|
|
36
|
+
export const CORE_WORKFLOW = `One workflow, six stages; each entry point runs the stages it needs.
|
|
37
|
+
|
|
38
|
+
1. **Understand**: who, what task, which product and market (RX-PR-01). Read the RYUX project
|
|
39
|
+
context in DESIGN.md, then the product docs (Product docs paths, else PRD.md, docs/prd*,
|
|
40
|
+
docs/product*, README), and name what you read. Separate facts, assumptions, and unknowns
|
|
41
|
+
(RX-PR-02); ask and record direction as in capabilities/design.md, stage 1. DESIGN.md is
|
|
42
|
+
direction, not evidence. Read the entry point's file and only the modules the task table lists.
|
|
43
|
+
2. **Frame**: the user's task, the flow, what must be seen first, the primary action, and three to
|
|
44
|
+
five success criteria from the brief, written before any alternative exists.
|
|
45
|
+
3. **Explore**: on a new or complex surface, two or three alternatives that differ in hypothesis and
|
|
46
|
+
structure, not paint; reference screens through the ryux MCP when connected. A small change skips it.
|
|
47
|
+
4. **Evaluate and select**: rate the alternatives against the Frame criteria with evidence
|
|
48
|
+
(RX-PR-09, RX-PR-10); the user picks; write the Decision Receipt.
|
|
49
|
+
5. **Build and critique**: design or implement the choice, render, inspect, and fix; Reconsider an
|
|
50
|
+
unchosen alternative when a finding contradicts the choice, and say why.
|
|
51
|
+
6. **Verify and deliver**: Hard Gates and the Delivery Gate, with honest claims.
|
|
52
|
+
|
|
53
|
+
Analyze runs 1. Design runs 1-6. Build runs 1, 5, and 6 (2-4 through Design when no design exists).
|
|
54
|
+
Critique runs 1 and the critique half of 5. QA runs 6. Never go from "generate" straight to "done".`;
|
|
55
|
+
export const DESIGN_BODY = `# RYUX Design
|
|
56
|
+
|
|
57
|
+
> What should we design, and why? Design is the bridge between Analyze and Build. It works without
|
|
58
|
+
> code (Figma, pen.dev, a mockup, the copy) and ends in a Design Direction that Build follows.
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
The six stages of the core workflow (SKILL.md), as Design runs them.
|
|
63
|
+
|
|
64
|
+
1. **Understand.** Who, what task, which product and market, and the design intent
|
|
65
|
+
(knowledge/product.md). Take it from the prompt, then DESIGN.md, then knowledge and evidence.
|
|
66
|
+
Read the product docs first (the router, stage 1). Ask only when a missing answer materially
|
|
67
|
+
affects the user flow, what the product can do, or whether the content is correct, those
|
|
68
|
+
questions alone, most consequential first, at most three, in one message, before designing.
|
|
69
|
+
A product rule that changes which states or actions the screen has (refunds, fees, what happens
|
|
70
|
+
on failure) is a major decision. When the prompt and DESIGN.md disagree, the prompt wins for
|
|
71
|
+
this task; say so. A DESIGN.md written for a different product (another name, domain, or
|
|
72
|
+
audience than this brief) sets no direction for this task: say so, and treat direction as unset.
|
|
73
|
+
**Direction is the user's call:** when neither the prompt nor DESIGN.md sets the UI direction
|
|
74
|
+
(character, or brand colour and type) or the motion direction, ask for it in that message (it
|
|
75
|
+
counts toward the three) instead of choosing it yourself. **No DESIGN.md and no product docs is the
|
|
76
|
+
case where these questions matter most, never a reason to skip them:** ask, then wait for the
|
|
77
|
+
answer before designing. Complete context means no questions. Never ask what the prompt, DESIGN.md, or the
|
|
78
|
+
product docs already answer. For the rest, make the smallest reasonable assumption, write it
|
|
79
|
+
down, and continue (RX-PR-01, RX-PR-02).
|
|
80
|
+
**Record direction answers.** When the user answers a UI or motion direction question, write the
|
|
81
|
+
answer into the UI direction or Motion direction field of the RYUX project context in DESIGN.md:
|
|
82
|
+
between \`<!-- ryux-context:start -->\` and \`<!-- ryux-context:end -->\`, one line per field
|
|
83
|
+
(\`- **UI direction**: Calm, trustworthy\`). If DESIGN.md or the block does not exist, create it
|
|
84
|
+
with those two fields. Change only those field lines; leave every other line as it is. Your own
|
|
85
|
+
assumptions do not go into DESIGN.md.
|
|
86
|
+
**What exists.** When there is a screen, product, or design system already, read its
|
|
87
|
+
analysis or run Analyze first (capabilities/analyze.md). Existing screens, components, and any
|
|
88
|
+
screenshot or reference provided are your examples: read them before choosing patterns, take
|
|
89
|
+
their principles, and never copy their facts. Understand before you design. When the task
|
|
90
|
+
redesigns or improves what exists, list what works and keep it; change only what has a named
|
|
91
|
+
problem (RX-UX-10).
|
|
92
|
+
**Modules.** Read the modules the task needs from the task table before deciding anything, for example ux,
|
|
93
|
+
interaction, forms, and content for a form, or ui and responsive for a layout; for any surface
|
|
94
|
+
with a visual direction, ui and anti-slop as well. The rules shape the first idea, not only the
|
|
95
|
+
review of it.
|
|
96
|
+
2. **Frame.** Name the primary task, the flow, the one thing that must be seen first, and the
|
|
97
|
+
primary action. Write three to five success criteria from the brief (the user's main task, what
|
|
98
|
+
must be seen first, the brief's character words, conventions that must hold) before any
|
|
99
|
+
alternative exists; Explore and Evaluate use these, and they do not change after you see the
|
|
100
|
+
alternatives. For consequential choices, list the two or three patterns to compare, using
|
|
101
|
+
reference screens when the ryux MCP is connected (RX-PR-09).
|
|
102
|
+
3. **Explore.** On a new screen or flow, a complex or ambiguous surface, or a brief that asks for a
|
|
103
|
+
new look, render two or three alternatives as frames side by side: the main state only, the same
|
|
104
|
+
content and sample data in each, each labelled with a name and a one-line hypothesis.
|
|
105
|
+
- Each alternative is a hypothesis about what this user needs, not a style: on task UI, for
|
|
106
|
+
example, task-first (status and the next action lead), editorial (type and composition carry
|
|
107
|
+
the hierarchy), or expressive-brand (the brand layer leads without slowing the task). Choose
|
|
108
|
+
hypotheses that fit this product; never force three.
|
|
109
|
+
- Make them differ in structure, not paint: every two of them differ on at least two of
|
|
110
|
+
hierarchy, information order, composition or layout model, navigation or interaction model
|
|
111
|
+
(where the main action lives), and brand expression (type class, colour temperature). The same
|
|
112
|
+
layout in new colours is the same alternative; replace it. Conventions that must hold stay fixed
|
|
113
|
+
in all of them (RX-UX-08).
|
|
114
|
+
- On task UI the brand layer carries one signature from the product's own domain, never a layout
|
|
115
|
+
change for its own sake (RX-UI-12); on an expressive surface the signature can lead.
|
|
116
|
+
- A small change, or a screen inside a fixed design system, skips Explore: say so and continue.
|
|
117
|
+
4. **Evaluate and select.** Rate each alternative against the Frame criteria, Strong, Adequate, or
|
|
118
|
+
Weak with one reason each, rate the evidence (RX-PR-10), and recommend one with a Decision Receipt.
|
|
119
|
+
"It looks better" is not a reason. Then stop and let the user choose. Build only the chosen one
|
|
120
|
+
into the full design (states, widths, Visual Brief, RX-UI-10), write the Design Direction
|
|
121
|
+
below, and mark the others on the canvas as not chosen. When the user has already said to pick for
|
|
122
|
+
them, continue with the recommendation and say so.
|
|
123
|
+
**Modes after the choice.** Refine improves the chosen alternative without losing its hypothesis.
|
|
124
|
+
Reconsider returns to an unchosen alternative when a later finding or new evidence contradicts the
|
|
125
|
+
choice: name the finding, show the alternative again, and let the user decide.
|
|
126
|
+
5. **Design in the tool, then critique it.** Use the Figma MCP or the pen.dev MCP. System first:
|
|
127
|
+
look for the design system that exists (DESIGN.md, a tokens or theme file in the repo, the design file's variables and
|
|
128
|
+
components, a linked library) and build from it. Create only what is missing: variables for color
|
|
129
|
+
roles, spacing, radius, and type sizes and families before the first frame, and components for
|
|
130
|
+
repeated elements (RX-DS-03). Building the system does not replace the states: design every
|
|
131
|
+
state that matters (empty, loading, error, including content that fails to load) and every width
|
|
132
|
+
you claim, and source assets on purpose (RX-UI-13).
|
|
133
|
+
**Render and inspect.** Screenshot what you made, check it against the direction and the rules,
|
|
134
|
+
fix, and render again (capabilities/qa.md). Then, on the render:
|
|
135
|
+
- Literal values: turn each into a variable or name the exception (RX-DS-03).
|
|
136
|
+
- Counts: run the RX-AS-10 counts and report them in the gate.
|
|
137
|
+
- Hierarchy: run the four hierarchy checks from Critique (control beside its data, a primary
|
|
138
|
+
action that reads as an action, not a tab, no fact twice, grouped by what the user checks
|
|
139
|
+
together); fix what fails and check each fix.
|
|
140
|
+
- Weight ranking: list the screen's blocks in order of visual weight (size × contrast × surface)
|
|
141
|
+
and compare it with the priority order from Frame (stage 2). If two blocks of different
|
|
142
|
+
priority share a heading style and container, change one. On a checkout or order screen, the
|
|
143
|
+
choice that sets the price and the total rank first and second.
|
|
144
|
+
- Widths: a width check is a test, not a deliverable. List what broke at each width (wrap,
|
|
145
|
+
truncation, overflow), fix it or record why it is acceptable, and render again; RESPONSIVE
|
|
146
|
+
PASS names the findings and their fixes.
|
|
147
|
+
- Direction: list where the render differs from the Design Direction (hierarchy, states,
|
|
148
|
+
widths) and fix or record each one, and check the result against the Liveliness you set.
|
|
149
|
+
- Purpose: put each prominent or decorative element through the purpose gate (RX-AS-05); on
|
|
150
|
+
calm task UI, deliberate restraint is a valid answer.
|
|
151
|
+
- Reviewer's read: rate Clarity, Hierarchy, and Specificity from the Design Read
|
|
152
|
+
(capabilities/critique.md), plus Craft (type steps, spacing rhythm, alignment, detail), Strong,
|
|
153
|
+
Adequate, or Weak with one reason each; fix anything Weak before the gate.
|
|
154
|
+
- Reference check: put the main state beside two or three reference apps (named in the brief,
|
|
155
|
+
from the Reference Read, or comparable screens from the ryux MCP) and write, per reference,
|
|
156
|
+
what holds up and what reads weaker or more generic in yours (surface, hierarchy, brand layer,
|
|
157
|
+
assets); no score. Fix what reads weaker for the task; say so when no reference was available.
|
|
158
|
+
- Assets: generated images and illustrations arrive asynchronously. Wait until each one has
|
|
159
|
+
landed and render again before exporting or closing the gate; never finish with one pending.
|
|
160
|
+
6. **Verify and deliver.**
|
|
161
|
+
- Facts: check every product fact on the canvas (tool and command names, integrations,
|
|
162
|
+
platforms, pages, numbers) against the brief or the repo (RX-PR-02).
|
|
163
|
+
- Canvas copy is for the team, not for RYUX: annotations, state captions, and labels use plain
|
|
164
|
+
language ("Shown while prices load; button disabled"). Rule IDs, gate results, and Decision
|
|
165
|
+
Receipts go in the Design Direction or the final message, never in frames meant for review or
|
|
166
|
+
handoff.
|
|
167
|
+
- Handoff: a handoff frame annotates, in plain language, the interaction behaviour, the
|
|
168
|
+
truncation rule for each text that can overflow, and each component's code name.
|
|
169
|
+
- Close with the Delivery Gate, saying what was not designed, such as other widths or states. If
|
|
170
|
+
you wrote DESIGN.md, say so in the final message: which file and which fields.
|
|
171
|
+
|
|
172
|
+
${UNTRUSTED_CONTENT}
|
|
173
|
+
|
|
174
|
+
Do not edit frames you were not asked to change. Do not hand off a design as "final" with
|
|
175
|
+
placeholder or invented content.
|
|
176
|
+
|
|
177
|
+
## Design Direction (the output)
|
|
178
|
+
|
|
179
|
+
Write only the sections the task needs: a button fix needs three lines, a new flow needs most of
|
|
180
|
+
them. Every significant decision carries a one-line reason; a visual choice without a reason is not
|
|
181
|
+
a decision yet.
|
|
182
|
+
|
|
183
|
+
\`\`\`
|
|
184
|
+
# Design Direction: <surface>
|
|
185
|
+
|
|
186
|
+
Context who, which task, where in the product; what exists (from Analyze)
|
|
187
|
+
Design intent what the user must understand, feel, and do here, and how we know it worked
|
|
188
|
+
|
|
189
|
+
UX direction flow and steps; information hierarchy (first, second, third); interaction model;
|
|
190
|
+
states (empty, loading, error, success, permission); edge cases; constraints and
|
|
191
|
+
business rules given (never invented)
|
|
192
|
+
UI direction layout and grid; type scale; spacing and density; color roles; containers;
|
|
193
|
+
components reused or added; the focal point; the shape lock (radius per role);
|
|
194
|
+
the icon style (outline or filled, stroke weight, corners)
|
|
195
|
+
Design language personality, tone, interaction personality, density, formality; each with its
|
|
196
|
+
reason from the product, the audience, or the existing system
|
|
197
|
+
Visual direction for expressive surfaces: the Visual Brief (knowledge/ui.md, Visual production)
|
|
198
|
+
Motion direction each motion: purpose (what it communicates: state change, feedback, spatial
|
|
199
|
+
relationship, progress, hierarchy), lifecycle (before, trigger, transition, new
|
|
200
|
+
state, feedback), level L1 to L5, timing and easing from one personality,
|
|
201
|
+
reduced-motion behavior
|
|
202
|
+
Liveliness energy 1-3 (calm, balanced, expressive), rhythm 1-3 (even, steady with variation,
|
|
203
|
+
varied), motion as its RX-UI-11 level; each with its reason from the product and
|
|
204
|
+
the task. A decision, not a setup question: an operations dashboard can be energy
|
|
205
|
+
1 and rhythm 2 on purpose; calm is a valid choice when it is chosen
|
|
206
|
+
Asset direction per asset: purpose, source, style, composition, context, consistency, usage,
|
|
207
|
+
avoid, provenance (observed, sourced, illustrative, generated, inferred)
|
|
208
|
+
Responsive what changes, stays, disappears, or stacks at each width
|
|
209
|
+
|
|
210
|
+
Assumptions kept apart, all visible:
|
|
211
|
+
design assumptions (low-risk choices made from context);
|
|
212
|
+
unconfirmed capabilities (actions or features on the canvas the brief did not
|
|
213
|
+
confirm; proposed, not requirements); sample data (realistic mockup content,
|
|
214
|
+
never a fact, RX-AS-03)
|
|
215
|
+
Decisions one Decision Receipt per major decision (below)
|
|
216
|
+
\`\`\`
|
|
217
|
+
|
|
218
|
+
A direction the user gives, in the prompt or DESIGN.md, is input, not a suggestion: follow it, and
|
|
219
|
+
any deviation needs a Decision Receipt. A UI direction is a character ("calm, trustworthy,
|
|
220
|
+
minimal"), not a specification; translate it into concrete decisions (restrained color, strong
|
|
221
|
+
hierarchy, little decoration, clear status) instead of swapping in a style you prefer. Character
|
|
222
|
+
words are not a recipe: "trustworthy" does not mean blue and "premium" does not mean serif. Choose
|
|
223
|
+
color, type, spacing, and components from the brand, the design system, and evidence, and say which.
|
|
224
|
+
|
|
225
|
+
**Decision Receipt.** Write one for each major decision: the navigation model, payment method
|
|
226
|
+
priority, information hierarchy, checkout structure, interaction model, or responsive strategy.
|
|
227
|
+
Small choices ("8px between icon and label") need none; keep receipts few and short.
|
|
228
|
+
|
|
229
|
+
\`\`\`
|
|
230
|
+
Decision what was chosen
|
|
231
|
+
Options A / B / C compared
|
|
232
|
+
Evidence count, type, and ids: "3 observed checkout flows (scr_...) + RX-IX-05" | None
|
|
233
|
+
Confidence High | Medium | Low
|
|
234
|
+
Why one line, from the evidence or the stated goal
|
|
235
|
+
Trade-off what it costs
|
|
236
|
+
Assumption what must be true for it to hold
|
|
237
|
+
\`\`\`
|
|
238
|
+
|
|
239
|
+
Evidence names its count and never generalizes past it. "Evidence None, Confidence Low, Why:
|
|
240
|
+
business priority was not provided" is a valid receipt; keep it visible instead of upgrading it.
|
|
241
|
+
|
|
242
|
+
Visual, motion, and asset rules and tables live in knowledge/ui.md (RX-UI-07 to RX-UI-13); this
|
|
243
|
+
direction only records the choices made with them.`;
|
|
244
|
+
export const BUILD_BODY = `# RYUX Build
|
|
245
|
+
|
|
246
|
+
> Implement or change the interface in code, faithfully and in the repo's own stack.
|
|
247
|
+
|
|
248
|
+
Build runs Understand (steps 1-3), Build and critique (4-6), and Verify and deliver (7) of the core
|
|
249
|
+
workflow (SKILL.md); Frame, Explore, and Evaluate happen in Design.
|
|
250
|
+
|
|
251
|
+
1. **Read the repo first**: the stack, components, tokens, conventions, the architecture already
|
|
252
|
+
used (where components, state, pure logic, and data access live), and the test runner
|
|
253
|
+
(knowledge/frontend.md, knowledge/design-system.md). Reuse before creating.
|
|
254
|
+
2. **Find the design source**: the Design Direction, a Figma or pen.dev design, a DESIGN.md, or an
|
|
255
|
+
approved mockup; it is the spec. If there is none, run Design's Frame, Explore, and Evaluate
|
|
256
|
+
first (capabilities/design.md, stages 2-4) instead of inventing one in code.
|
|
257
|
+
3. **Read the modules the task needs** from the task table: for example accessibility, responsive,
|
|
258
|
+
and edge-cases for any UI, and forms and content for a form. When the build adds motion or
|
|
259
|
+
transitions, read knowledge/ui.md (RX-UI-11) before writing any: how often the surface is seen
|
|
260
|
+
decides how much it moves.
|
|
261
|
+
4. **Implement faithfully.** Use semantic elements, existing components, and real data paths.
|
|
262
|
+
Build must not invent business rules, prices, or limits; API behavior or response shapes; or
|
|
263
|
+
data presented as real (RX-FE-02, RX-PR-02). It must not silently change a design decision: a
|
|
264
|
+
change goes back to Design as a new Decision Receipt, and when the code shows the chosen design
|
|
265
|
+
cannot work (data, platform, performance), say so and send it back to Reconsider. Mark every
|
|
266
|
+
assumption in the code. Give each piece of logic one home in the repo's existing layers, never a
|
|
267
|
+
copy (RX-FE-13).
|
|
268
|
+
5. **Test what can break.** Unit tests for new or changed pure logic, edge cases included;
|
|
269
|
+
integration tests for critical flows such as checkout, payment, and form submit. Use the
|
|
270
|
+
repo's runner; with none, propose one and ask before adding it (RX-FE-14).
|
|
271
|
+
6. **Render and verify.** Run it and the tests, check every width and state, and fix deviations
|
|
272
|
+
from the design (capabilities/qa.md). When changing an existing screen, also check that what
|
|
273
|
+
you did not mean to change still works: neighbouring screens, shared components, and the flow
|
|
274
|
+
around the change.
|
|
275
|
+
When anything animates, run the motion passes in capabilities/qa.md as well. Run the counts of
|
|
276
|
+
RX-AS-10 on the render and report them in the gate.
|
|
277
|
+
7. **Close with the Delivery Gate.** CODE QUALITY and VISUAL QA need real checks (typecheck,
|
|
278
|
+
tests, render), or say what was not run.`;
|
|
279
|
+
export const CORE_EVIDENCE = `Say where every claim comes from:
|
|
280
|
+
|
|
281
|
+
| Source | Meaning | Example |
|
|
282
|
+
| --- | --- | --- |
|
|
283
|
+
| **Observed** (or Measured) | seen in the design, a capture, or read from its values | "body text is 16/24, from the CSS" |
|
|
284
|
+
| **Inferred** | a reasonable guess; say it is one | "probably an 8px scale" |
|
|
285
|
+
| **Knowledge** | a known pattern or standard, cited | "WCAG 1.4.3", "observed in 4 screens, scr_..." |
|
|
286
|
+
|
|
287
|
+
Product evidence (brief, requirements, analytics, research, support data) is Observed when sourced;
|
|
288
|
+
reference screens show what products do, not what this product's users need. Four questions, not four
|
|
289
|
+
output fields: where it came from (source, above), is it known (known, inferred, or **unknown**, kept
|
|
290
|
+
visible), how strong is the basis (Strong, Thin, None), how sure is the choice (High, Medium, Low).
|
|
291
|
+
Knowledge is what is generally known, evidence is what this context shows, judgment chooses from both.
|
|
292
|
+
|
|
293
|
+
Rate the evidence for a decision **Strong** (2+ comparable screens), **Thin** (one, or another
|
|
294
|
+
context), or **None** (a judgment call; say so, RX-PR-10). Scope each claim to its evidence: one
|
|
295
|
+
screen supports "observed in scr_x", not "apps do X"; name the count ("in 4 observed screens"), and
|
|
296
|
+
never generalize to a market or category from Thin evidence (RX-PR-02). Label every visual asset's provenance:
|
|
297
|
+
**observed** (from the real product), **sourced** (licensed, with its source), **illustrative**
|
|
298
|
+
(made to explain, labeled), **generated** (from a Visual Brief, labeled), or **inferred** (a
|
|
299
|
+
stand-in until the real one exists). Never invent numbers, user behavior, business rules, research,
|
|
300
|
+
compliance, product or competitor facts, screenshots, or references (RX-PR-02, RX-AS-01).
|
|
301
|
+
|
|
302
|
+
Record a source as \`{ type: observed | inferred | knowledge, origin, reference }\`, for example
|
|
303
|
+
\`{ knowledge, ryux-knowledge, scr_123 }\` from the ryux MCP, or \`{ observed, screenshot, hero.png }\`.
|
|
304
|
+
Optional sources (the ryux MCP, Figma, a browser, screenshots, other reference libraries) add
|
|
305
|
+
evidence when connected; none is required.`;
|
|
306
|
+
export const CORE_HONESTY = `Report what was checked, how, and what was not available. Do not claim "pixel perfect",
|
|
307
|
+
"fully accessible", "production ready", "senior-level", or "UX optimized" without evidence. Say
|
|
308
|
+
"Keyboard and focus checked by hand; no automated accessibility test was available" instead.
|
|
309
|
+
Rule IDs and gate results belong in your report, never on the design itself.`;
|
|
310
|
+
export const CORE_DECISION_RECORD = `For consequential choices (RX-PR-09) and deviations, write **Decision**, **Options** compared, **Evidence**,
|
|
311
|
+
**Trade-off**, and **Choice**. Evidence is Strong (2+ comparable screen_ids), Thin (one, or another context),
|
|
312
|
+
or None (no screen_id: a judgment call). With None on a consequential choice, show options or ask (RX-PR-10).`;
|
|
313
|
+
export const GATE_RULES = `- Each area is PASS, FAIL, NOT VERIFIED (it applies, but the evidence was not available: name what is missing), or N/A (it does not apply: say why). Scale the gate to the task: a copy fix or a one-component change marks the areas it cannot affect N/A, one line each.
|
|
314
|
+
- An area FAILS when a [Required] rule in its skills fails without a written exception.
|
|
315
|
+
- A Hard Gate failure cannot be excepted: fix it before declaring the work complete.
|
|
316
|
+
- VISUAL QA without a render is NOT VERIFIED; a PASS names the render tool, the widths, and the states inspected.
|
|
317
|
+
- CODE QUALITY is NOT VERIFIED while changed logic has no test run; say which checks ran (typecheck, tests).
|
|
318
|
+
- FINAL is FAIL if any area fails, NOT VERIFIED if none fails but one is not verified, else PASS. PASS means the checked criteria were met, not that the design is good or was validated with users ("not tested with users" unless it was).`;
|
|
319
|
+
export const GUIDES = {
|
|
320
|
+
product: `Answer these before any layout exists. Write the answers down; they are the brief.
|
|
321
|
+
|
|
322
|
+
1. **Who** is the user, and in what situation (device, place, time pressure)?
|
|
323
|
+
2. **What** are they trying to finish on this screen?
|
|
324
|
+
3. **Business goal**: what does the product need from this screen?
|
|
325
|
+
4. **Information that matters**: what must they see to decide or act?
|
|
326
|
+
5. **Primary action**: the one thing this screen exists for.
|
|
327
|
+
6. **Constraints**: platform, data that exists, technical or legal limits.
|
|
328
|
+
7. **Success**: how would you know the screen works?
|
|
329
|
+
8. **Assumptions**: everything you had to guess, kept visible and sorted into design assumptions,
|
|
330
|
+
unconfirmed capabilities, and sample data.
|
|
331
|
+
|
|
332
|
+
Unknown facts stay assumptions. Do not invent business rules, policies, metrics, user data,
|
|
333
|
+
permissions, pricing, requirements, or API behavior; ask when one materially affects the flow or
|
|
334
|
+
correctness, otherwise leave it out. Mockup content is realistic sample data, labeled (RX-PR-02,
|
|
335
|
+
RX-AS-03).
|
|
336
|
+
|
|
337
|
+
Find evidence with the ryux MCP (\`search_screens\`, \`get_flow\`, \`get_local_pattern\`) and cite the
|
|
338
|
+
\`screen_id\`, or call the decision a judgment call.
|
|
339
|
+
|
|
340
|
+
Lead with the user's outcome, keep only what serves the task, and follow the project's DESIGN.md
|
|
341
|
+
or brand when it exists (write down any deliberate departure).
|
|
342
|
+
|
|
343
|
+
**Decide with evidence.** For a consequential decision, compare patterns, then choose by context:
|
|
344
|
+
|
|
345
|
+
\`\`\`
|
|
346
|
+
Decision: payment confirmation layout
|
|
347
|
+
Context: standalone bank transfer, first-time users
|
|
348
|
+
Options:
|
|
349
|
+
A QR success screen scr_... strength: instant weakness: little detail
|
|
350
|
+
B bank-transfer receipt scr_... strength: verifiable weakness: dense
|
|
351
|
+
C marketplace order status scr_... strength: order link weakness: not standalone
|
|
352
|
+
Choice: B, because the context is a standalone transfer
|
|
353
|
+
Evidence: Strong (2+ comparable screens, same context) | Thin (1, or other context) | None
|
|
354
|
+
Trade-off: higher density
|
|
355
|
+
\`\`\`
|
|
356
|
+
|
|
357
|
+
With **None**, say so: present the options and their trade-offs, or ask. Never invent a reference.
|
|
358
|
+
|
|
359
|
+
Does not cover: layout or visual decisions (see ryux-ux and ryux-ui).`,
|
|
360
|
+
ux: `Choose structure from the user's goal, not from a template.
|
|
361
|
+
|
|
362
|
+
- **Information architecture**: what objects and tasks exist, how users name them, and how they
|
|
363
|
+
look for them (browse, search, or follow a notification).
|
|
364
|
+
- **Navigation**: the minimum set of destinations, named in the user's words. Where am I, and how
|
|
365
|
+
do I get back?
|
|
366
|
+
- **Flows**: list the steps; remove steps that only serve the system. Multi-step flows show
|
|
367
|
+
progress and a reviewable summary.
|
|
368
|
+
- **Grouping**: by meaning (task, time, status), with labels.
|
|
369
|
+
- **Progressive disclosure**: what the current decision needs first; rare options behind a
|
|
370
|
+
clearly labeled control.
|
|
371
|
+
- **Search, filter, sort**: only when the content is long enough to need them, matching how
|
|
372
|
+
users hunt.
|
|
373
|
+
- **Recovery paths**: every flow has a way back and a way out.
|
|
374
|
+
|
|
375
|
+
Reason like a senior designer: a principle, where it applies, where it does not, and what it costs.
|
|
376
|
+
|
|
377
|
+
\`\`\`
|
|
378
|
+
Rule: Recognition over recall (RX-UX-08)
|
|
379
|
+
Context: a complex enterprise form filled many times a day
|
|
380
|
+
Decision: show previously selected values and recent entries
|
|
381
|
+
Trade-off: higher visual density
|
|
382
|
+
Reason: less memory burden in a repeated workflow
|
|
383
|
+
\`\`\`
|
|
384
|
+
|
|
385
|
+
Does not cover: per-action behavior (see ryux-interaction), forms (see ryux-forms), or states
|
|
386
|
+
(see ryux-edge-cases).`,
|
|
387
|
+
interaction: `Define every meaningful action in four parts before implementing it:
|
|
388
|
+
|
|
389
|
+
| Phase | Question |
|
|
390
|
+
| --- | --- |
|
|
391
|
+
| Before | What tells the user this action exists, what it will do, and what it costs? |
|
|
392
|
+
| During | What do they see while it runs (pressed state, loading, progress)? |
|
|
393
|
+
| Result | How do they know it worked, and what changed? |
|
|
394
|
+
| Recovery | If it fails or was a mistake, how do they undo, retry, or get help? |
|
|
395
|
+
|
|
396
|
+
**Confirm or undo?** Reason about it; do not apply it mechanically.
|
|
397
|
+
1. Is it reversible? Then prefer an undo after the fact over a confirmation before.
|
|
398
|
+
2. Is it irreversible **and** high-impact (money, sending, deleting shared data)? Then confirm with
|
|
399
|
+
the specifics: amount, recipient, item.
|
|
400
|
+
3. Is recovery easy and the impact small? Then skip confirmation; it only adds friction.
|
|
401
|
+
4. Would a confirmation appear so often that people dismiss it by habit? Then it protects
|
|
402
|
+
nothing; use undo.
|
|
403
|
+
|
|
404
|
+
States to define for interactive elements: default, hover (pointer), focus, active or pressed,
|
|
405
|
+
disabled (with a reason, or keep it enabled and explain on use), loading, success, error. Keyboard:
|
|
406
|
+
every action is reachable; Enter submits; Escape closes. For repeat or expert use, add shortcuts
|
|
407
|
+
(recent items, quick amounts) without crowding the novice path.
|
|
408
|
+
|
|
409
|
+
**Navigation.** How a screen arrives tells people where back goes (RX-IX-13, RX-IX-14):
|
|
410
|
+
|
|
411
|
+
| Transition | Means | Back |
|
|
412
|
+
| --- | --- | --- |
|
|
413
|
+
| Push | one level deeper in the same task | returns to the screen before |
|
|
414
|
+
| Replace | a new stage; the old one is finished | does not return to the finished stage |
|
|
415
|
+
| Modal | a self-contained task, finished or cancelled | closes the task |
|
|
416
|
+
| Sheet | a short interruption over the current screen | dismisses the sheet |
|
|
417
|
+
|
|
418
|
+
After a completed payment, submission, or onboarding, the result replaces the flow (a one-way door).
|
|
419
|
+
Back is blocked only while a request is in flight or work is unsaved, and the screen says why.
|
|
420
|
+
Follow the platform's back gesture and button; on the web, the browser's back follows the same map.
|
|
421
|
+
|
|
422
|
+
Does not cover: form-specific behavior (see ryux-forms).`,
|
|
423
|
+
forms: `A form is a conversation. Design it field by field, then as a whole.
|
|
424
|
+
|
|
425
|
+
- **Grouping**: related fields together, with a group label when there are more than a few.
|
|
426
|
+
- **Labels**: visible and tied to the field; placeholders are examples, not labels.
|
|
427
|
+
- **Layout**: one column for sequential input is the default; put short related fields side by
|
|
428
|
+
side when people read them as one unit. Decide by relationship, not by filling width.
|
|
429
|
+
- **Fewest fields**: ask only what the task needs; mark whichever of required or optional is less
|
|
430
|
+
common.
|
|
431
|
+
- **Validation timing**: validate a field after the user leaves it or when the format is clear;
|
|
432
|
+
never erase what they typed.
|
|
433
|
+
- **Defaults and autofill**: prefill what you know; set autocomplete and inputmode.
|
|
434
|
+
- **Multi-step**: show the step, allow going back without losing data.
|
|
435
|
+
- **Unsaved changes**: autosave with a visible status, or warn before discarding.
|
|
436
|
+
- **Submission**: prevent double submits, show progress, then success with what happens next, or
|
|
437
|
+
failure with input kept and a retry.
|
|
438
|
+
|
|
439
|
+
Does not cover: general interaction states (see ryux-interaction) or error copy wording (see
|
|
440
|
+
ryux-content).`,
|
|
441
|
+
"edge-cases": `The happy path is not enough. Walk this list for the screen you built:
|
|
442
|
+
|
|
443
|
+
| Area | Cases |
|
|
444
|
+
| --- | --- |
|
|
445
|
+
| Data | empty, one item, many items, long content, missing fields, duplicates |
|
|
446
|
+
| Forms | invalid, partial, failed, loading, unsaved, expired |
|
|
447
|
+
| Network | slow, timeout, offline, server failure, retry |
|
|
448
|
+
| Permissions | read-only, restricted, different roles (only roles that exist) |
|
|
449
|
+
| System | session expired, unauthorized, unexpected error |
|
|
450
|
+
|
|
451
|
+
For first use and zero data, explain what will appear and give one action to start. For each case
|
|
452
|
+
that can happen, decide what the user sees and what they can do next. Cases that
|
|
453
|
+
cannot happen in this product do not need a design; say so in the Delivery Gate.
|
|
454
|
+
|
|
455
|
+
Does not cover: how errors are worded (see ryux-content).`,
|
|
456
|
+
content: `Content is interface: labels, CTAs, errors, empty states, confirmations, helper text, terminology,
|
|
457
|
+
numbers, dates, currency, and localization are all designed, not filled in last. Write them
|
|
458
|
+
specific, concise, human, action-oriented, and in context.
|
|
459
|
+
|
|
460
|
+
Avoid generic AI language: "unlock", "elevate", "transform", "seamlessly", "powerful solution",
|
|
461
|
+
"next-generation", "experience the future", and their Indonesian equivalents
|
|
462
|
+
("solusi terbaik", "pengalaman tak terlupakan").
|
|
463
|
+
|
|
464
|
+
- **Buttons** describe the actual action: "Bayar Rp45.000", not "Lanjutkan" when it pays.
|
|
465
|
+
- **Error messages**: 1. what happened, 2. why it matters when that helps, 3. how to recover.
|
|
466
|
+
- **Terminology**: one name per thing, everywhere.
|
|
467
|
+
- **Locale** comes from the product's market: language, money, dates, and numbers follow it.
|
|
468
|
+
- **Indonesian copy**: as users speak it, English only for terms they already use; money as
|
|
469
|
+
Rp1.250.000; dates and numbers as 2 Okt 2026, 14.30 WIB, 1,5, 12.500, +62 812-3456-7890.
|
|
470
|
+
- **Help** at the point of need (a hint under a field, "Kenapa diminta?"), not only in an FAQ.
|
|
471
|
+
- **Chat channels** (WhatsApp, Telegram): a short greeting, short paragraphs, sparse *bold*, and a
|
|
472
|
+
clear contact line; not a marketing page.
|
|
473
|
+
- **Offers and terms**: write only the terms you were given. Unknown minimums, quotas, deadlines,
|
|
474
|
+
and codes stay placeholders (\`[minimal belanja]\`, \`[tanggal selesai]\`); do not add "kuota
|
|
475
|
+
terbatas" or "sebelum kehabisan" unless a real limit was stated (RX-AS-04, RX-PR-02).
|
|
476
|
+
|
|
477
|
+
Does not cover: layout of the text (see ryux-ui).`,
|
|
478
|
+
ui: `**Visuals are not decoration. They are communication.** RYUX UI owns the visual expression of
|
|
479
|
+
a product: what each visual decision communicates, why it exists, and how it behaves. Functional UI
|
|
480
|
+
helps the user read, decide, or act. Anything decorative needs a stated reason (see the purpose
|
|
481
|
+
gates in ryux-anti-slop). It works in four layers.
|
|
482
|
+
|
|
483
|
+
**1. UI system.** Work in this order:
|
|
484
|
+
1. **Hierarchy**: what is read first, second, third? The primary action and key information win.
|
|
485
|
+
2. **Layout and alignment**: a shared grid; groups by meaning; consistent edges.
|
|
486
|
+
3. **Spacing and type**: one scale; size and weight carry hierarchy, not color alone.
|
|
487
|
+
4. **Density**: compact for repeat work, roomier for first-time or high-stakes decisions.
|
|
488
|
+
5. **Color**: roles first (surface, text, accent for the primary action, status); contrast checked.
|
|
489
|
+
6. **Containers**: use a container only when it groups or separates something.
|
|
490
|
+
7. **Icons**: next to labels, from one set, at consistent sizes.
|
|
491
|
+
|
|
492
|
+
**Justify values.** Every value comes from the scale and has a reason you can say in one line:
|
|
493
|
+
"12px between these two fields because they belong together; 24px before the next group because it
|
|
494
|
+
is a new topic." Tighter inside a group, looser between groups; density follows the task. If you
|
|
495
|
+
cannot say why 8 and not 12, the choice is not a decision yet.
|
|
496
|
+
|
|
497
|
+
**Set the type, don't only size it** (RX-UI-14). Body text reads best at 45 to 75 characters per line:
|
|
498
|
+
give paragraphs a max width and check the rendered count (about 30 to 34em in most text faces; CSS
|
|
499
|
+
\`ch\` is the width of a zero, so 65ch runs well past 75 characters). Line-height falls as size rises:
|
|
500
|
+
about 1.5 for body, 1.2 to 1.3 for headings, close to 1.1 for display. Large display text tightens
|
|
501
|
+
slightly; small uppercase labels open up (about 0.05em). Numbers people compare or watch change use
|
|
502
|
+
tabular figures. Two families at most, three weights at most: hierarchy comes from size and weight
|
|
503
|
+
steps, not from more faces. Headings do not end on one stranded word (\`text-wrap: balance\`, or
|
|
504
|
+
rewrite).
|
|
505
|
+
|
|
506
|
+
**Craft is the last 10 percent people notice first** (RX-UI-15). Icons sit on the optical center of
|
|
507
|
+
their text, sized to its line-height, with a stroke that matches the type weight. Number columns align
|
|
508
|
+
right or on the decimal. Borders, dividers, and shadows come from one small token set. Long text
|
|
509
|
+
truncates on purpose, with the full value still reachable.
|
|
510
|
+
|
|
511
|
+
**2. Art direction.** Each visual has a job (RX-UI-07), its composition leaves room for the
|
|
512
|
+
content (RX-UI-09), and the visual language is chosen, not defaulted (RX-UI-10). Name the visual
|
|
513
|
+
language in a few words (editorial, product-centric, human, technical, playful, premium,
|
|
514
|
+
institutional) and its form (shape language, geometric or organic, flat or with depth).
|
|
515
|
+
|
|
516
|
+
**Composition exploration.** For an expressive surface, sketch three compositions of the chosen
|
|
517
|
+
direction (subject left, subject right, centered or full-bleed) as quick frames, then choose by
|
|
518
|
+
focal point, hierarchy, negative space, relation to the copy, and balance (RX-UI-09).
|
|
519
|
+
|
|
520
|
+
**Expressive surfaces** (hero, landing, onboarding, empty states, brand moments). Restraint keeps
|
|
521
|
+
task UI usable; on expressive surfaces it is only the floor. Work concept, then signature, then
|
|
522
|
+
system:
|
|
523
|
+
1. **Concept**: explore two or three alternatives first (name, concept, signature; capabilities/design.md, stage 3), then choose one. The idea
|
|
524
|
+
comes from the product itself, not from the category: a tool about evidence might use receipts,
|
|
525
|
+
citations, and marks of proof; a calm finance app might use the ledger. The category default
|
|
526
|
+
(a terminal panel for developer tools, a dashboard screenshot for SaaS) is never the signature.
|
|
527
|
+
2. **Signature**: one element that carries the concept and that people would remember. Choose the
|
|
528
|
+
lever: type (scale contrast, a distinctive face), composition (a broken grid, an unexpected
|
|
529
|
+
crop, a large number), art direction, color temperature, motion personality, or copy voice.
|
|
530
|
+
3. **System**: everything else stays quiet and consistent so the signature reads.
|
|
531
|
+
The Liveliness you set (Design Direction) turns into these levers: one focal point per screen,
|
|
532
|
+
contrast in size and weight that builds the hierarchy, whitespace that groups, one deliberate
|
|
533
|
+
accent, and a motif the signature repeats. Low energy uses the same levers, quietly.
|
|
534
|
+
Then run the swap test (RX-AS-09): with a competitor's name and logo, would anything need to change?
|
|
535
|
+
If not, the surface has no point of view yet. Stay honest while being bold: a strong idea never
|
|
536
|
+
needs invented numbers, people, or logos.
|
|
537
|
+
|
|
538
|
+
**3. Motion.** Start from purpose: what the motion communicates; with no purpose, no motion.
|
|
539
|
+
Then ask how often someone will see it. The more often, the less of it they should notice: what
|
|
540
|
+
people open many times a day (a command palette, a shortcut, core navigation) appears at once, and
|
|
541
|
+
expression is kept for occasional or first-time moments. A purpose does not outweigh frequency.
|
|
542
|
+
Every motion follows one lifecycle: before, trigger, transition, new state, feedback.
|
|
543
|
+
The states themselves (waiting, result, recovery) are defined in ryux-interaction (RX-IX-01,
|
|
544
|
+
RX-IX-02); motion only makes them visible, and it never compensates for weak UX. Decide the trigger,
|
|
545
|
+
duration, easing, distance, opacity or scale, and how several elements are choreographed. Define
|
|
546
|
+
duration and easing once as motion tokens, and animate transform and opacity rather than layout
|
|
547
|
+
properties (width, height, top, margin), which cause jank. What opens and closes should be able to
|
|
548
|
+
reverse halfway: use transitions, not an open-only keyframe animation.
|
|
549
|
+
|
|
550
|
+
| Level | Examples | Needs |
|
|
551
|
+
| --- | --- | --- |
|
|
552
|
+
| L1 State feedback | button press, checkbox, toggle | starts on touch and lasts 100 to 150 ms; buttons and cards press to about 0.97 scale, list rows change background only |
|
|
553
|
+
| L2 Component transition | dropdown, modal, drawer, tooltip | shows where something came from or went: enters from about 0.95 scale with a fade (never from 0), exits faster along the same path, a menu grows from its trigger |
|
|
554
|
+
| L3 Page transition | navigation, route change | keeps the user oriented between places |
|
|
555
|
+
| L4 Storytelling | onboarding, product introduction, marketing | a message that is clearer moving than still |
|
|
556
|
+
| L5 Decorative | background particles, floating elements | a brand reason, and never delaying content or input |
|
|
557
|
+
|
|
558
|
+
Pick one **motion personality** per product and derive timing and easing from it:
|
|
559
|
+
|
|
560
|
+
| Trait | Calm (banking) | Energetic (game) |
|
|
561
|
+
| --- | --- | --- |
|
|
562
|
+
| Character | calm, precise | energetic, playful |
|
|
563
|
+
| Speed | moderate | fast |
|
|
564
|
+
| Easing | ease-out; default token \`cubic-bezier(0.23, 1, 0.32, 1)\` | spring |
|
|
565
|
+
| Movement | short, controlled | larger, expressive |
|
|
566
|
+
| Expression | subtle | high |
|
|
567
|
+
|
|
568
|
+
When neither the brief nor DESIGN.md sets the motion direction, start from Calm: the easing token
|
|
569
|
+
above, interface transitions under 300 ms, and no ease-in on anything that enters. Replace these
|
|
570
|
+
defaults as soon as the product sets its own. Data the user is reading (a balance, an amount, a
|
|
571
|
+
table value) does not move for effect. With reduced motion requested, large movement becomes a fade
|
|
572
|
+
or a cut (RX-A11Y-08).
|
|
573
|
+
|
|
574
|
+
**4. Visual production.** Decide where each asset comes from before making anything (RX-UI-13):
|
|
575
|
+
|
|
576
|
+
| Asset | First choice | Then | Never |
|
|
577
|
+
| --- | --- | --- | --- |
|
|
578
|
+
| Product visuals | real screens, labeled sample data | a rebuilt screen labeled illustrative | a fake dashboard shown as real |
|
|
579
|
+
| Photography | the brand's own shoot | a licensed library you can name | a stranger presented as a customer |
|
|
580
|
+
| Illustration and 3D | the brand's system | custom or generated from the brief, labeled | a generic character or blob unrelated to the product |
|
|
581
|
+
| Icons | the project's set | one set that matches the chosen icon style (for example Tabler, Iconoir, Phosphor, or Material Symbols), or a custom set drawn to that style | mixed sets, or one-off icons outside the style |
|
|
582
|
+
| Logos | official files from each owner; the product's own file (RX-AS-11) | the name in plain text, or [LOGO] | a redrawn, imitated, or invented logo; initials or an emoji as a mark; a generated favicon or app icon |
|
|
583
|
+
| Video | real product footage | a screen recording of the real product | stock footage implying use |
|
|
584
|
+
| Missing | a placeholder that looks like one (RX-AS-03) | | an invented stand-in |
|
|
585
|
+
|
|
586
|
+
Label every asset's provenance: observed (from the real product), sourced (licensed, with its
|
|
587
|
+
source), illustrative, generated, or inferred (a stand-in). See the evidence model in the router.
|
|
588
|
+
|
|
589
|
+
RYUX directs the generator; it is not the generator. Work context, goal,
|
|
590
|
+
audience, role, art direction, composition, then generate, critique the result against the brief,
|
|
591
|
+
and refine. A prompt without a brief is not art direction. Write the brief first:
|
|
592
|
+
|
|
593
|
+
\`\`\`
|
|
594
|
+
# Visual Brief
|
|
595
|
+
Role: its job (explain, orient, demonstrate, emotion, identity, context, story)
|
|
596
|
+
Objective: what the viewer must understand or feel
|
|
597
|
+
Audience: who sees it, in which context
|
|
598
|
+
Emotion: the feeling, in two or three words
|
|
599
|
+
Concept: the visual thesis, in one sentence
|
|
600
|
+
Subject: what is shown (the product concept, not a generic person or device)
|
|
601
|
+
Visual language: editorial / product-centric / technical / ..., and the art direction
|
|
602
|
+
Form: shape language, geometric or organic, depth
|
|
603
|
+
Composition: where the subject sits, and the space kept for copy
|
|
604
|
+
Color, material, lighting: from the product palette; surfaces; direction and softness
|
|
605
|
+
Motion: level (L1 to L5) and personality
|
|
606
|
+
Output: format, background, aspect ratios and sizes
|
|
607
|
+
Avoid: the category clichés (for fintech: coins, money rain, floating dashboards)
|
|
608
|
+
Sources: reference screen_ids or the analysis it came from
|
|
609
|
+
\`\`\`
|
|
610
|
+
|
|
611
|
+
A generated image is illustrative art; never present it as a real customer or a real product
|
|
612
|
+
screen (RX-UI-07).
|
|
613
|
+
|
|
614
|
+
Does not cover: component reuse and tokens (see ryux-design-system).`,
|
|
615
|
+
"design-system": `Prioritize the existing system. Before creating anything:
|
|
616
|
+
|
|
617
|
+
1. Search existing components.
|
|
618
|
+
2. Search existing tokens (color, spacing, radius, type, elevation).
|
|
619
|
+
3. Search existing patterns (how similar screens solve this).
|
|
620
|
+
4. Reuse if an existing component fits.
|
|
621
|
+
5. Extend with a variant if it almost fits.
|
|
622
|
+
6. Create a new component only for a real semantic or behavioral difference, and name why.
|
|
623
|
+
|
|
624
|
+
**Quality Locks** to keep across the product: spacing, typography, color roles, terminology,
|
|
625
|
+
components, interaction patterns and states, responsive behavior, and visual hierarchy.
|
|
626
|
+
|
|
627
|
+
Look for the existing system before defining one: DESIGN.md, a tokens or theme file in the repo, the
|
|
628
|
+
design file's variables and components, or a linked library. If the project has no system yet, define
|
|
629
|
+
the smallest token set the screen needs and use it consistently: color roles, a spacing scale, a
|
|
630
|
+
radius scale, and a type scale, not color alone. After rendering, count the literal values left and
|
|
631
|
+
convert them (RX-DS-03). Do not introduce a component library the project does not use.`,
|
|
632
|
+
accessibility: `Accessibility is product quality, not an enhancement. Check:
|
|
633
|
+
|
|
634
|
+
- **Semantics**: real headings, landmarks, lists, buttons, links, labels.
|
|
635
|
+
- **Keyboard**: everything reachable and operable; focus order follows the visual order.
|
|
636
|
+
- **Focus**: visible on every interactive element; never removed without a replacement.
|
|
637
|
+
- **Contrast**: 4.5:1 for text, 3:1 for large text and component boundaries.
|
|
638
|
+
- **Targets**: at least 24×24px, preferably 44×44px on touch.
|
|
639
|
+
- **Names**: icon-only buttons and meaningful images have accessible names.
|
|
640
|
+
- **Forms**: labels tied to fields; errors tied to fields and announced.
|
|
641
|
+
- **Color**: never the only signal.
|
|
642
|
+
- **Motion**: honor reduced-motion settings.
|
|
643
|
+
- **ARIA**: only when native semantics cannot express it.
|
|
644
|
+
|
|
645
|
+
Report what was checked and how. Do not claim full conformance without an audit.`,
|
|
646
|
+
responsive: `Responsive design is behavioral. When space decreases: **prioritize → simplify → reorganize**.
|
|
647
|
+
Do not squeeze everything into a smaller viewport.
|
|
648
|
+
|
|
649
|
+
| Element | On narrow screens |
|
|
650
|
+
| --- | --- |
|
|
651
|
+
| Content | keep the priority content first; move secondary content behind a control |
|
|
652
|
+
| Navigation | collapse to the few top destinations; keep the current location visible |
|
|
653
|
+
| Tables | priority columns, stacked rows, or scroll inside the table with the key column fixed |
|
|
654
|
+
| Forms | one column; keyboards that match the input |
|
|
655
|
+
| Actions | primary action within thumb reach; not hidden under the fold |
|
|
656
|
+
| Modals and drawers | full-screen or bottom sheet; close and primary action reachable |
|
|
657
|
+
| Text | keep the size; let it wrap; truncate only with access to the full value |
|
|
658
|
+
|
|
659
|
+
For each section, answer before building: what **changes**, what **stays**, what **disappears**,
|
|
660
|
+
what **reorders**, what becomes **scrollable**, what becomes **stacked**, and which **interaction**
|
|
661
|
+
changes (hover becomes tap, a side panel becomes a sheet)?
|
|
662
|
+
|
|
663
|
+
Example: a data table on desktop → on tablet, scroll horizontally inside the table or show the
|
|
664
|
+
priority columns → on mobile, a different information architecture: a list of rows as summary cards
|
|
665
|
+
that open a detail view.
|
|
666
|
+
|
|
667
|
+
Check the stated viewport and the smallest supported width. No horizontal page scroll.`,
|
|
668
|
+
frontend: `Connect design decisions to the code that ships them.
|
|
669
|
+
|
|
670
|
+
1. **Detect the stack first**: read package.json, the router, the styling approach, and two or
|
|
671
|
+
three nearby components. Write in that stack. Do not assume React or Tailwind.
|
|
672
|
+
2. **Semantic HTML** and native controls before custom ones.
|
|
673
|
+
3. **Architecture**: follow the layers the repo already has. Components render; state lives close
|
|
674
|
+
to where it is used; calculations, formatting, and validation live in pure modules; one layer
|
|
675
|
+
talks to the API. Each piece of logic has one home: search before writing, never copy.
|
|
676
|
+
Derived values instead of duplicated state.
|
|
677
|
+
4. **Tokens** instead of magic numbers; no duplicate styles.
|
|
678
|
+
5. **No invented logic**: prices, limits, and permissions come from data or are marked as
|
|
679
|
+
assumptions.
|
|
680
|
+
6. **Dependencies** only when they clearly earn their weight.
|
|
681
|
+
7. **Performance**: sized and lazy-loaded media; no heavy libraries for small effects.
|
|
682
|
+
8. **Tests**: unit tests for pure logic with its edge cases, integration tests for critical flows,
|
|
683
|
+
in the repo's own runner. Run them before claiming the work is done.
|
|
684
|
+
|
|
685
|
+
Does not cover: visual decisions (see ryux-ui) or component reuse decisions (see ryux-design-system).`,
|
|
686
|
+
"visual-qa": `As an entry point, Visual QA is the Verify and deliver stage of the core workflow (SKILL.md)
|
|
687
|
+
for a build; Design and Build also use its loop in Build and critique. It asks one question: **did the implementation match the intended design?** Whether the
|
|
688
|
+
design itself is good is Critique's question (ryux-critique).
|
|
689
|
+
|
|
690
|
+
**With a reference** (a Figma or pen.dev frame, DESIGN.md, or an approved screenshot):
|
|
691
|
+
1. Capture the reference and the implementation at the same viewport (see the capture table in
|
|
692
|
+
ryux-analyze).
|
|
693
|
+
2. Compare property by property: spacing, typography, color, size, position, components, states,
|
|
694
|
+
responsive behavior.
|
|
695
|
+
3. Report each deviation:
|
|
696
|
+
|
|
697
|
+
\`\`\`
|
|
698
|
+
Area | Expected (reference) | Actual (build) | Deviation | Severity | Fix
|
|
699
|
+
Card radius | 16px | 8px | half the radius | minor | use radius-lg
|
|
700
|
+
\`\`\`
|
|
701
|
+
|
|
702
|
+
**Without a reference**, check the build against its own intent and the rules below.
|
|
703
|
+
|
|
704
|
+
**Loop**: implement → render → compare → fix → render again.
|
|
705
|
+
|
|
706
|
+
**Render with what is available**, in this order: the project's own preview or test setup;
|
|
707
|
+
\`npx playwright screenshot --viewport-size=1440,900 <url>\` (and 390 wide for mobile); a browser
|
|
708
|
+
tool; a design-tool export such as pen.dev \`Export\`. If none is available, say so in the gate.
|
|
709
|
+
|
|
710
|
+
${UNTRUSTED_CONTENT}
|
|
711
|
+
|
|
712
|
+
**Motion** (when anything opens, closes, or switches with an animation): a screenshot cannot show it,
|
|
713
|
+
so drive it in a real browser (the project's test setup or Playwright). For each animated element,
|
|
714
|
+
run four passes: open it; close it about 60 ms into the opening; open and close it three times
|
|
715
|
+
quickly; and all of it again with reduced motion (\`reducedMotion: 'reduce'\`). During each pass read
|
|
716
|
+
\`document.getAnimations()\` and the computed transition and animation, or watch a recording, and
|
|
717
|
+
check the motion rules already in force (RX-UI-11, RX-A11Y-08):
|
|
718
|
+
- a close mid-way turns back from where it is, with no jump to fully open and no restart;
|
|
719
|
+
- closing takes no longer than opening; entrances never use ease-in;
|
|
720
|
+
- only transform and opacity move; a menu grows from its trigger, a drawer from its own edge;
|
|
721
|
+
- what people open many times a day (menus, tabs) appears at once or with a short fade;
|
|
722
|
+
- reduced motion leaves a fade or a cut, no movement;
|
|
723
|
+
- after a dialog or drawer closes, focus is back on the control that opened it.
|
|
724
|
+
Then record the interaction and step through it frame by frame: look for broken or skipped frames,
|
|
725
|
+
a flash of the wrong theme, and layout that jumps; aim for 60 frames per second and count dropped
|
|
726
|
+
frames in a performance trace or the recording. For gestures (RX-IX-15), record a drag that is
|
|
727
|
+
caught mid-animation. Fix what fails and run the passes again. Report each animated element as Verified (passes run,
|
|
728
|
+
widths) or NOT VERIFIED (why); motion read only from code is NOT VERIFIED.
|
|
729
|
+
|
|
730
|
+
**Rank issues by impact**: blocks the task, misleads (wrong numbers, unclear action), adds friction,
|
|
731
|
+
polish.`,
|
|
732
|
+
"anti-slop": `Anti-slop runs in Verify and deliver, after design, build, critique, and QA; it is the final
|
|
733
|
+
quality gate, never the
|
|
734
|
+
starting point. Anti-slop is the floor, not the ceiling: a tidy, generic surface still fails on expressive
|
|
735
|
+
surfaces (RX-AS-09), and the point of view comes from RX-UI-12. Anti-slop is not a list of banned
|
|
736
|
+
styles. It has three parts.
|
|
737
|
+
|
|
738
|
+
**Hard Gates**: reject or fix before delivery; no written exception. The list is generated below
|
|
739
|
+
from the rules.
|
|
740
|
+
|
|
741
|
+
**Purpose Gates**: these patterns are allowed when they have a purpose. For each one in the
|
|
742
|
+
result, ask three questions: **purpose** (what does it do?), **contribution** (what does it add to
|
|
743
|
+
understanding, interaction, or character?), and **necessity** (would something simpler do the
|
|
744
|
+
same?). "It looks more interesting" answers none of them; remove what fails.
|
|
745
|
+
|
|
746
|
+
**Quality Locks**: consistency that must hold across the product (listed below).
|
|
747
|
+
|
|
748
|
+
**Visual tells.** These are signals that a reason is missing, not banned styles. When you see one,
|
|
749
|
+
run the purpose gate; keep it when the answer is real, as in the last column.
|
|
750
|
+
|
|
751
|
+
| Tell | Why it hurts | Fix | Fine when |
|
|
752
|
+
| --- | --- | --- | --- |
|
|
753
|
+
| A blue-to-purple gradient wash behind everything | carries no meaning and appears on every AI page | color from the brand and its roles (RX-UI-10), or a plain surface | the gradient is the brand, or it encodes a value |
|
|
754
|
+
| A fake app, terminal, or agent window as the hero | the category default, often with invented output | a signature from the product's own idea; product UI only when real or labeled (RX-UI-12, RX-UI-07) | it is the real product with labeled sample data |
|
|
755
|
+
| Generic illustration: people with laptops, abstract blobs | unrelated to the product, so it steals attention and says nothing | a contextual illustration made from the brief, or no visual (RX-UI-07) | it explains a concept or an empty state words cannot |
|
|
756
|
+
| Floating devices and dashboard mockups | fake screens imply features and data | real screens with labeled sample data (RX-UI-07, RX-AS-01) | the screens are real and labeled |
|
|
757
|
+
| The template section order (hero, three cards, three-column pricing, four-column footer) | the page follows a template instead of what this content needs | order and form sections by what the reader needs next (RX-UI-05) | the content really has that shape |
|
|
758
|
+
| Identical feature cards in a row | equal boxes flatten priorities that are not equal | give the main point more weight; a list or one strong block (RX-UI-01) | the items are equal and compared side by side |
|
|
759
|
+
| A bento grid | a fashionable frame that hides which item matters | a layout from the content and its priority (RX-UI-05) | the items are independent and similar in weight |
|
|
760
|
+
| A typeface picked because it is in fashion | the same few faces on every generated page | a face chosen for the product's voice and legibility (RX-UI-10) | the brand already uses it |
|
|
761
|
+
| Monospace to look technical | mood instead of meaning; harder to read in prose | monospace only for code, IDs, and aligned numbers | it shows code, commands, or tabular figures |
|
|
762
|
+
| A sparkle or robot icon on every AI feature | says "AI" instead of what the feature does | an icon for the action, or none | the product's own AI mark, used once |
|
|
763
|
+
| A small badge above the headline that repeats it | a label that adds no information | cut it, or say something the headline does not | it carries real status: beta, new version, date |
|
|
764
|
+
| Endless floating, looping, or scroll-triggered motion | decorative motion with no reason, competing with the task | a single L4 moment with a message, or none (RX-UI-11) | it shows state, continuity, or the product's idea once |
|
|
765
|
+
| Glass, glow, and blur on every layer | decoration without a job that also lowers contrast | one surface treatment with a purpose (RX-AS-05, RX-A11Y-01) | one overlay needs to show what is behind it |
|
|
766
|
+
| Stock teamwork or handshake photos | borrowed people implying endorsement | real people with consent, or no people (RX-AS-02, RX-UI-13) | never as evidence of customers |
|
|
767
|
+
| Cards inside cards, surfaces on surfaces | every nesting level costs a border, a radius, and padding, and the grouping stops meaning anything | one container per real group; separate inside it with spacing or a divider (RX-UI-01) | the inner surface is a distinct object the user acts on, such as a selectable option |
|
|
768
|
+
| Every group boxed in the same white bordered card | the stack of equal boxes flattens priority and reads as a template | one container for the decision the user makes; other groups flat, with a heading and a divider (RX-UI-01) | each box is a selectable option the user compares |
|
|
769
|
+
| One "safe" accent on white with neutral grey everything | the default palette of generated UI; nothing in it is the brand's | colour temperature and surface tone chosen from the product's character (RX-UI-10) | the brand already defines it |
|
|
770
|
+
| A placeholder map: grey, or flat blocks in any colour without streets or names | reads as unfinished, and the map is the product's core visual | a styled map with streets, labels, and the route rendered in the brand palette | wireframe stage, labeled as such |
|
|
771
|
+
| A stub device status bar (the time and one icon) | the mockup reads as unfinished at first glance | the platform's full status bar (time, signal, Wi-Fi, battery), or no device chrome at all | the frame is a wireframe, labeled as such |
|
|
772
|
+
| Every content object drawn as the same icon in a different colour (book covers, place photos, products) | the screen reads as a template, and detail screens lose their main visual | a sample image slot shaped like the real asset (cover ratio, photo crop), labeled sample data (RX-UI-07) | the product really has no imagery for that object |
|
|
773
|
+
| Question headings by default ("Where to?", "What are you sending?") on every step | a generated voice once it repeats; the step's label says less than a plain noun would | a plain label for the field or step; a question only where it is clearest | it is the market's convention, with an observed screen (RX-PR-04) |
|
|
774
|
+
| One record split into a grid of cards | details that are read together (an order, a profile, a transaction) are scattered into equal boxes | one block with labeled rows or a table (RX-UI-05) | each card is a separate item the user compares or acts on |
|
|
775
|
+
| A dashboard of KPI tiles and charts that answer no question | decoration in place of the decision the screen supports | lead with what needs attention and the next action; dense tables where people scan (RX-UI-01, RX-UX-01) | each tile drives a decision and links to its detail |
|
|
776
|
+
| Display-size headings on task UI | a hero-sized title pushes the data and the action below the fold | a heading sized for its rank in the page (RX-UI-01, RX-UI-03) | it is the single message of a marketing or brand page |
|
|
777
|
+
| A landing-page layout for a product screen | hero, feature rows, and a closing CTA on an app screen, a settings page, or a tool | the structure the task needs: list, detail, form, or workspace (RX-UI-05) | the surface really is marketing |`,
|
|
778
|
+
};
|