@ryuxdsgn/design-intelligence 2.13.7 → 2.13.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -167,16 +167,22 @@ async function runInstall(flags) {
167
167
  }
168
168
  if (nonInteractive)
169
169
  return;
170
+ let answers = {};
170
171
  if (!scope.global) {
171
172
  const s = await p.confirm({ message: "Set up project context now? Every question can be skipped.", initialValue: true });
172
173
  if (p.isCancel(s))
173
174
  return cancel();
174
- if (s && !(await setupInteractive(scope.root)))
175
- return cancel();
176
- if (!s)
175
+ if (s) {
176
+ const a = await setupInteractive(scope.root);
177
+ if (!a)
178
+ return cancel();
179
+ answers = a;
180
+ }
181
+ else
177
182
  p.log.info(`Set it up later with: ${CLI_CMD} setup`);
178
183
  }
179
- p.outro(`RYUX is ready. Try: ${pc.cyan('"Design a transaction detail page for our app."')}`);
184
+ p.note(suggestionsText(answers), "Try");
185
+ p.outro("RYUX is ready.");
180
186
  }
181
187
  async function runUpdate(flags) {
182
188
  const scope = scopeOf(flags);
@@ -578,11 +584,40 @@ async function setupInteractive(root) {
578
584
  p.log.info("Teach RYUX about this project. Every question can be skipped: blanks stay unknown, and RYUX asks when they matter.");
579
585
  const answers = await askContext(root);
580
586
  if (!answers)
581
- return false;
587
+ return null;
582
588
  const body = await writeContext(root, answers);
583
589
  p.log.success(`${CONTEXT_FILE} updated · ${filledCount(body)} of ${ASKED_FIELDS.length} setup fields filled`);
584
- return true;
590
+ return answers;
591
+ }
592
+ /** Curated, per product kind (setup's Product answer): a typical screen and flow to name in example prompts. */
593
+ const SUGGESTED = {
594
+ "Online store": { screen: "the checkout page", flow: "our checkout flow" },
595
+ "Payments or finance": { screen: "the transaction detail screen", flow: "our send-money flow" },
596
+ "Marketplace": { screen: "the seller's new listing form", flow: "our listing flow" },
597
+ "Booking or scheduling": { screen: "the date and time slot picker", flow: "our booking flow" },
598
+ "SaaS or dashboard": { screen: "the billing settings page", flow: "our onboarding flow" },
599
+ "Content or media": { screen: "the article reading page", flow: "our sign-up flow" },
600
+ "Internal tool": { screen: "the orders table with filters", flow: "our approval flow" },
601
+ };
602
+ /** Three concrete prompts, one per entry point, from the setup answers; the README examples when there are none. */
603
+ function promptSuggestions(answers) {
604
+ const kind = Object.keys(SUGGESTED).find((k) => (answers["Product"] ?? "").startsWith(k));
605
+ if (!kind) {
606
+ return [
607
+ "Design the transaction detail screen for our wallet, in pen.dev.",
608
+ "Critique our pricing page at https://example.com/pricing.",
609
+ "Analyze this checkout screen (screenshot attached).",
610
+ ];
611
+ }
612
+ const { screen, flow } = SUGGESTED[kind];
613
+ const changing = /existing flow|redesign/i.test(answers["Current work"] ?? "");
614
+ return [
615
+ `Design ${screen} for our app.`,
616
+ `Critique ${flow} and tell us what to fix first.`,
617
+ changing ? `Analyze ${flow} before we change it (screenshots attached).` : `QA the build of ${screen} against the design.`,
618
+ ];
585
619
  }
620
+ const suggestionsText = (answers) => [...promptSuggestions(answers).map((s) => `"${s}"`), "", "RYUX may ask up to three questions first."].join("\n");
586
621
  async function runSetup(flags) {
587
622
  if (flags.global) {
588
623
  console.error(`setup is per project. Run it inside the project folder: ${CLI_CMD} setup`);
@@ -599,6 +634,7 @@ async function runSetup(flags) {
599
634
  if (Object.keys(fromFlags).length) {
600
635
  const body = await writeContext(root, fromFlags);
601
636
  console.log(`${pc.green("✓ ")}${CONTEXT_FILE} updated · ${filledCount(body)} of ${ASKED_FIELDS.length} setup fields filled`);
637
+ console.log(`\nTry:\n${suggestionsText(fromFlags).split("\n").map((l) => (l ? ` ${l}` : "")).join("\n")}`);
602
638
  return;
603
639
  }
604
640
  if (!process.stdin.isTTY) {
@@ -609,8 +645,10 @@ async function runSetup(flags) {
609
645
  }
610
646
  p.intro(pc.bgCyan(pc.black(" RYUX setup ")));
611
647
  p.log.message(KEY_LEGEND);
612
- if (!(await setupInteractive(root)))
648
+ const answers = await setupInteractive(root);
649
+ if (!answers)
613
650
  return cancel();
651
+ p.note(suggestionsText(answers), "Try");
614
652
  p.outro(`RYUX is ready. Next: ${CLI_CMD} check`);
615
653
  }
616
654
  async function runInit(flags) {
@@ -130,6 +130,19 @@ export const RULES = [
130
130
  basis: "ryux evidence principle",
131
131
  check: "review",
132
132
  },
133
+ {
134
+ num: 11,
135
+ title: "An AI feature has a written standard for its output",
136
+ level: "contextual",
137
+ when: "the product shows content generated by AI: an answer, a summary, a draft, a recommendation",
138
+ do: "Before designing it, write what good and bad output look like, per kind of response:\n - Sort the responses the feature gives (a short answer, an open explanation, a list, a draft, a refusal) and write pass criteria for each kind, concrete enough for a reviewer to check: \"answers the question in the first sentence; at most two related details\", not \"not too verbose\".\n - Design the states generated output brings: a long and a short answer, no answer or a refusal, an answer that is wrong, slow generation, and a failed request (RX-EC-01).\n - Hand the criteria to the team as the feature's test: real inputs checked against them before launch, and again after every model or prompt change.",
139
+ dont: "Design an AI feature around one ideal sample answer, judge its output by feel, or leave out the states where the output is wrong, empty, or slow.",
140
+ why: "Generated output cannot be specified exactly, so the design is only as good as its definition of good; a screen built around one perfect answer breaks on the next one.",
141
+ basis: "NNGroup design critique in the AI era (criteria per response type; judge, evaluate, iterate; watch for regressions); RX-EC-01",
142
+ notWhen: "AI that works behind the scenes and shows users no generated content",
143
+ tradeoff: "criteria per response type take time before the first screen and need real inputs to write well",
144
+ check: "review: a criteria list per response type, and the wrong, empty, slow, and failed states in the design",
145
+ },
133
146
  ]),
134
147
  ...skill("ux", [
135
148
  {
@@ -1508,6 +1521,7 @@ export const ACTIVATION = [
1508
1521
  { task: "Checkout or payment", skills: ["product", "interaction", "forms", "content", "edge-cases", "ui", "anti-slop"] },
1509
1522
  { task: "Data-heavy view (list, table, dashboard)", skills: ["ux", "edge-cases", "responsive", "design-system", "frontend", "ui", "anti-slop"] },
1510
1523
  { task: "Frontend logic or utilities (formatting, state, data shown to users)", skills: ["frontend", "content", "edge-cases"] },
1524
+ { task: "AI feature (generated answers, summaries, drafts)", skills: ["product", "ux", "content", "edge-cases", "anti-slop"] },
1511
1525
  { task: "Copy only (UI text, chat, announcements)", skills: ["content", "anti-slop"] },
1512
1526
  { task: "Visual refinement", skills: ["ui", "design-system", "visual-qa", "anti-slop"] },
1513
1527
  ];
@@ -11,8 +11,8 @@ generator, an anti-slop framework, a design system, or a prompt library.
11
11
  \`\`\`
12
12
  Understand → Frame → Explore → Evaluate and select → Build and critique → Verify and deliver → done
13
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 only the knowledge modules the task needs (task table below); paths are relative to this skill's folder.
14
+ export const CORE_CAPABILITIES = `Tell RYUX what you are doing; RYUX decides what it needs to know (no task named: offer three concrete tasks for this project as choices,
15
+ from DESIGN.md and the repo's screens). Pick the entry point, read its file, then only the knowledge modules the task needs (task table below); paths are relative to this skill's folder.
16
16
 
17
17
  | Entry point | When | Read |
18
18
  | --- | --- | --- |
@@ -25,9 +25,8 @@ file, then only the knowledge modules the task needs (task table below); paths a
25
25
  Knowledge modules (\`knowledge/\`): product, ux, interaction, forms, edge-cases, content, ui,
26
26
  design-system, accessibility, responsive, frontend, and anti-slop. Evidence comes from the brief, the
27
27
  project, product data, standards, and the ryux MCP when connected; none is required. Every entry point ends at the quality gates: the Hard
28
- Gates below and the Delivery Gate, with anti-slop as the last check, never the starting point.
29
-
30
- Keep them apart: Analyze says what exists, Design what to do, Critique if it is right, QA if it matches.`;
28
+ Gates below and the Delivery Gate, with anti-slop as the last check, never the starting point. Keep them apart:
29
+ Analyze says what exists, Design what to do, Critique if it is right, QA if it matches.`;
31
30
  export const CORE_PRINCIPLE = `Novelty is not a goal; a recognisable brand layer is: familiar structure, distinct surface.
32
31
  Optimize for clarity, usability, consistency, product fit, accessibility, and intentional decisions.
33
32
  Understand the context first; keep observed facts apart from assumptions; prefer evidence over
@@ -44,7 +43,7 @@ export const CORE_WORKFLOW = `One workflow, six stages; each entry point runs th
44
43
  3. **Explore**: on a new or complex surface, two or three alternatives that differ in hypothesis and
45
44
  structure, not paint; reference screens through the ryux MCP when connected. A small change skips it.
46
45
  4. **Evaluate and select**: rate the alternatives against the Frame criteria with evidence
47
- (RX-PR-09, RX-PR-10); the user picks; write the Decision Receipt.
46
+ (RX-PR-09, RX-PR-10); the user picks from options (capabilities/design.md); write the Decision Receipt.
48
47
  5. **Build and critique**: design or implement the choice, render, inspect, and fix; Reconsider an
49
48
  unchosen alternative when a finding contradicts the choice, and say why.
50
49
  6. **Verify and deliver**: Hard Gates, the Delivery Gate, honest claims, and a user test plan (RX-UX-12).
@@ -73,7 +72,11 @@ The six stages of the core workflow (SKILL.md), as Design runs them.
73
72
  (character, or brand colour and type) or the motion direction, ask for it in that message (it
74
73
  counts toward the three) instead of choosing it yourself. **No DESIGN.md and no product docs is the
75
74
  case where these questions matter most, never a reason to skip them:** ask, then wait for the
76
- answer before designing. Complete context means no questions. Never ask what the prompt, DESIGN.md, or the
75
+ answer before designing. Complete context means no questions.
76
+ **Ask as choices.** When you ask, or the user picks (stage 4, Reconsider), use the agent's
77
+ question or choice tool if it has one: two to four options per question, the recommended one
78
+ first and labeled, and room for the user's own answer. Without such a tool, write numbered
79
+ options with the recommendation first, so the user can answer with a number. Never ask what the prompt, DESIGN.md, or the
77
80
  product docs already answer. For the rest, make the smallest reasonable assumption, write it
78
81
  down, and continue (RX-PR-01, RX-PR-02).
79
82
  **Record direction answers.** When the user answers a UI or motion direction question, write the
@@ -116,7 +119,8 @@ The six stages of the core workflow (SKILL.md), as Design runs them.
116
119
  - A small change, or a screen inside a fixed design system, skips Explore: say so and continue.
117
120
  4. **Evaluate and select.** Rate each alternative against the Frame criteria, Strong, Adequate, or
118
121
  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
122
+ "It looks better" is not a reason. Then stop and let the user choose, with the alternatives as
123
+ options and your recommendation first (stage 1, "Ask as choices"). Build only the chosen one
120
124
  into the full design (states, widths, Visual Brief, RX-UI-10), write the Design Direction
121
125
  below, and mark the others on the canvas as not chosen. When the user has already said to pick for
122
126
  them, continue with the recommendation and say so.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuxdsgn/design-intelligence",
3
- "version": "2.13.7",
3
+ "version": "2.13.8",
4
4
  "description": "RYUX: design intelligence for AI agents and designers. One skill, five entry points: Analyze, Design, Build, Critique, and QA, for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Cline, Copilot, and more.",
5
5
  "type": "module",
6
6
  "bin": {