ui-director-skill 2.1.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/INSTALL.md +5 -9
- package/README.md +26 -46
- package/SKILL.md +14 -20
- package/assets/capabilities.json +18 -19
- package/assets/install-manifest.json +4 -4
- package/assets/routing-rules.json +19 -63
- package/benchmark/README.md +54 -0
- package/benchmark/blind.mjs +141 -0
- package/benchmark/cases.json +66 -0
- package/benchmark/fixtures/reference.html +39 -0
- package/bin/ui.mjs +2 -1
- package/examples/usage.md +19 -50
- package/install.py +10 -9
- package/lib/workflows.mjs +115 -24
- package/package.json +3 -2
- package/references/delivery-contract.md +4 -3
- package/references/design-intelligence.md +1 -1
- package/references/integrations/skill-manager.md +5 -2
- package/references/integrations/upstream-adapters.md +24 -3
- package/references/integrations.md +1 -1
- package/references/motion-interaction.md +1 -1
- package/references/orchestration/context-management.md +13 -3
- package/references/orchestration/iteration-loop.md +7 -6
- package/references/orchestration/routing.md +10 -5
- package/references/platforms/hmi.md +5 -0
- package/references/quality-assurance.md +1 -1
- package/references/routing.md +1 -1
- package/references/stages/design-system.md +6 -3
- package/references/stages/deslop.md +3 -2
- package/references/stages/ux-strategy.md +10 -0
- package/references/stages/visual-direction.md +13 -2
- package/references/stages/visual-validation.md +23 -4
- package/references/visual-direction.md +1 -1
- package/skill_manager.py +4 -2
- package/templates/DESIGN.md +12 -12
- package/templates/PRODUCT.md +5 -7
- package/templates/REVIEW.md +16 -14
- package/assets/quality-rubric.json +0 -29
- package/config/optional-skills.json +0 -16
- package/config/quality-rubric.json +0 -13
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"market-analysis": {
|
|
3
|
+
"platform": "web",
|
|
4
|
+
"environment": "Chromium, English, light theme, local fixture data",
|
|
5
|
+
"targets": ["1440x900", "390x844"],
|
|
6
|
+
"prompt": "Build a runnable stock research screen for someone who wants to shortlist and compare two companies. Use these fictional sample records: ARB Arbor Labs, Technology, 42.10 USD, +3.2%, 1.4M volume; CDR Cedar Grid, Energy, 18.80 USD, -1.1%, 890K; SES Seaside Systems, Technology, 71.25 USD, +0.8%, 2.1M; RLP Railpoint, Industrials, 31.50 USD, +1.7%, 510K. Support sector filtering, comparing two companies and a simulated data load failure followed by retry. Preserve current selections on retry. Display units and meaningful labels.",
|
|
7
|
+
"captures": {"overview": "1440x900", "comparison": "1440x900", "load-failure": "1440x900", "mobile": "390x844"},
|
|
8
|
+
"checks": ["Filter Technology, select ARB and SES, and compare their prices, returns and volume.", "Simulate a failed load and recover by retrying. The selection and sector filter remain in place.", "Complete the main flow with keyboard navigation and verify readability on the narrow target."]
|
|
9
|
+
},
|
|
10
|
+
"boutique-commerce": {
|
|
11
|
+
"platform": "web",
|
|
12
|
+
"environment": "Chromium, English, light theme, local product data",
|
|
13
|
+
"targets": ["1440x900", "390x844"],
|
|
14
|
+
"prompt": "Build a runnable product page for a small ceramics studio. The Hearth mug costs 38 USD and comes in Sand and Moss (out of stock). The studio fires small batches with a matte glaze and ships within five days. Help a first-time shopper understand the material, shipping and variants, add Sand to a bag, then change quantity or undo removal. Use original or licensed imagery and local product data. Payment is out of scope.",
|
|
15
|
+
"captures": {"product": "1440x900", "unavailable-variant": "1440x900", "bag": "1440x900", "mobile": "390x844"},
|
|
16
|
+
"checks": ["Find material, price and shipping before adding.", "Inspect Moss, understand the availability, then select Sand and add it.", "Edit bag quantity, remove the item, and undo removal on the narrow target."]
|
|
17
|
+
},
|
|
18
|
+
"music-player": {
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"environment": "Chromium, English, local audio fixtures",
|
|
21
|
+
"targets": ["1440x900", "390x844"],
|
|
22
|
+
"prompt": "Build a responsive music player for a three-track 25-second demo collection. Generate or include local audio for Aster / First Light and Kestrel / Between Stations, plus a third track Night Letter with a reproducible unavailable-audio state. Include play, pause, seek, queue navigation, error recovery and motion tied to playback. Keep the title, playback status and queue coherent after switching tracks.",
|
|
23
|
+
"captures": {"playing": "1440x900", "queue": "390x844", "playback-error": "1440x900", "reduced-motion": "390x844"},
|
|
24
|
+
"checks": ["Start playback, seek, pause and resume. Report actual media time.", "Switch tracks rapidly and verify the visible active item and audio stay in sync.", "Recover from the unavailable track and check reduced-motion preferences."]
|
|
25
|
+
},
|
|
26
|
+
"cocos-hmi": {
|
|
27
|
+
"platform": "hmi",
|
|
28
|
+
"environment": "Cocos Creator 3.8.x, English, local deterministic signal replay. Record actual runtime and device or simulator.",
|
|
29
|
+
"targets": ["1920x720", "1280x480"],
|
|
30
|
+
"prompt": "Build a Cocos Creator 3.8.x automotive display prototype for an approved demo environment. Present speed in km/h, gear and battery state, and expose a secondary trip summary. Replay a provided sequence in code: connect at 0 km/h / P / 61%, drive at 52 km/h / D / 60%, stop receiving values long enough to indicate stale data, then reconnect at 48 km/h / D / 60%. Include day/night styles and retain the primary state while navigating the trip summary.",
|
|
31
|
+
"captures": {"day-driving": "1920x720", "night-driving": "1920x720", "stale": "1280x480", "reconnected": "1280x480"},
|
|
32
|
+
"checks": ["Read speed, gear, units and remaining battery at both target dimensions.", "Open the trip summary, surface stale data and recover on reconnect while maintaining context.", "Exercise the available input route and capture frame timing in the target runtime."]
|
|
33
|
+
},
|
|
34
|
+
"knowledge-workspace": {
|
|
35
|
+
"platform": "web",
|
|
36
|
+
"environment": "Chromium, English, local fixture data, clean storage before each run",
|
|
37
|
+
"targets": ["1440x900", "390x844"],
|
|
38
|
+
"prompt": "Build a reading workspace for a researcher who needs to find, read and save notes without losing their place. Seed three notes: Render pipeline review (graphics), Interview follow-up (research), and Release readiness (delivery). Support tag filtering, full-text search, opening a note, marking it saved and returning to the filtered list. Include a no-results state with a recovery action.",
|
|
39
|
+
"captures": {"library": "1440x900", "reader": "1440x900", "no-results": "1440x900", "mobile": "390x844"},
|
|
40
|
+
"checks": ["Filter graphics and open Render pipeline review. Save it and return without losing the filter.", "Search for an absent term and recover from the empty state.", "Repeat the flow with keyboard and on the narrow target."]
|
|
41
|
+
},
|
|
42
|
+
"mobile-notification-preferences": {
|
|
43
|
+
"platform": "mobile",
|
|
44
|
+
"environment": "Native Android app on an Android emulator or device, English, light theme, deterministic local settings. Use the same runtime, density and text scale across all groups.",
|
|
45
|
+
"targets": ["1080x2400"],
|
|
46
|
+
"prompt": "Build a runnable native Android notification preferences flow. Product updates starts off, Account alerts is enabled and read-only, and Weekly summary starts on. Stage local edits and expose one Save action. Make the first save fail on demand, allow retry with edits retained, and preserve saved values when reopening. Use the supplied project settings components and design tokens when available.",
|
|
47
|
+
"captures": {"initial": "1080x2400", "pending": "1080x2400", "failed": "1080x2400", "saved": "1080x2400"},
|
|
48
|
+
"checks": ["Change Product updates and Weekly summary by touch and explain the read-only Account alerts state.", "Trigger save failure, retry with edits preserved, and confirm feedback.", "Reopen preferences and verify the saved values and actionable state."]
|
|
49
|
+
},
|
|
50
|
+
"desktop-download-queue": {
|
|
51
|
+
"platform": "desktop",
|
|
52
|
+
"environment": "Native desktop app, English, local fixture data. Use the same OS, input devices and app-window capture density across all groups.",
|
|
53
|
+
"targets": ["1280x800", "960x640"],
|
|
54
|
+
"prompt": "Build a runnable desktop download queue for Plan.pdf (complete), Voice.m4a (paused at 40%), and Archive.zip (failed). Let the user find failed downloads, inspect a reason, retry Archive.zip, and return to the filtered queue. Keep keyboard focus and current selection when resizing. Use the supplied project components and design tokens when available.",
|
|
55
|
+
"captures": {"queue": "1280x800", "error-detail": "1280x800", "retried": "1280x800", "narrow-window": "960x640"},
|
|
56
|
+
"checks": ["Filter failed downloads using keyboard or mouse, inspect Archive.zip and explain the available action.", "Retry Archive.zip and verify the resulting state and focus.", "Resize the app window and verify the filter, relevant selection and usable layout."]
|
|
57
|
+
},
|
|
58
|
+
"reference-match": {
|
|
59
|
+
"platform": "web",
|
|
60
|
+
"environment": "Chromium, English, light theme. Give every run the same screenshot from fixtures/reference.html at the desktop target.",
|
|
61
|
+
"targets": ["1440x900", "390x844"],
|
|
62
|
+
"prompt": "Build the original article index shown in the supplied desktop screenshot. Match the type hierarchy, alignment, column proportions, neutral surfaces and rules. Keep the article list readable at the narrow target and make the filter tabs change the visible rows. Use only the visible labels and data in the supplied reference. Define the small-screen layout based on reading order.",
|
|
63
|
+
"captures": {"desktop-match": "1440x900", "filtered-list": "1440x900", "mobile": "390x844"},
|
|
64
|
+
"checks": ["Compare at the exact reference viewport and report mismatches in alignment, typography and spacing.", "Select a category tab and verify the visible rows change.", "Verify keyboard access and reading order at the narrow target."]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<meta charset="utf-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
5
|
+
<title>Field Notes · Journal</title>
|
|
6
|
+
<style>
|
|
7
|
+
* { box-sizing: border-box; }
|
|
8
|
+
body { margin: 0; background: #faf9f5; color: #22231e; font: 16px/1.5 Arial, sans-serif; }
|
|
9
|
+
header, main { max-width: 1152px; width: calc(100% - 64px); margin: auto; }
|
|
10
|
+
header { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; border-bottom: 1px solid #c6c6bb; }
|
|
11
|
+
.eyebrow, .meta { font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase; }
|
|
12
|
+
.intro { display: grid; grid-template-columns: 3fr 2fr; align-items: end; gap: 36px; padding: 72px 0 56px; }
|
|
13
|
+
h1, h2 { font-family: Georgia, serif; font-weight: normal; margin: 0; line-height: 1.04; }
|
|
14
|
+
h1 { font-size: clamp(56px, 9vw, 126px); letter-spacing: -0.075em; }
|
|
15
|
+
h2 { font-size: clamp(27px, 3.2vw, 46px); letter-spacing: -0.035em; }
|
|
16
|
+
.intro p { margin: 0 0 10px; font: 22px/1.4 Georgia, serif; max-width: 18em; }
|
|
17
|
+
.tabs { display: flex; gap: 26px; align-items: center; border-bottom: 1px solid #22231e; padding-bottom: 13px; }
|
|
18
|
+
.active { font-weight: bold; }
|
|
19
|
+
article { display: grid; grid-template-columns: minmax(90px, 1fr) 4fr 2fr; align-items: center; gap: 24px; min-height: 130px; border-bottom: 1px solid #c6c6bb; }
|
|
20
|
+
article p { margin: 0; color: #4c5143; }
|
|
21
|
+
@media (max-width: 660px) {
|
|
22
|
+
header, main { width: calc(100% - 40px); }
|
|
23
|
+
.intro, article { grid-template-columns: 1fr; gap: 8px; }
|
|
24
|
+
.intro { padding-block: 48px 28px; }
|
|
25
|
+
article { padding-block: 20px; }
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
<header><strong>Field Notes</strong><span class="eyebrow">Independent Journal</span></header>
|
|
29
|
+
<main>
|
|
30
|
+
<section class="intro">
|
|
31
|
+
<div><div class="eyebrow">Volume 01 / Index</div><h1>The Journal</h1></div>
|
|
32
|
+
<p>Writing on how places change, who shapes them, and what we learn from looking closely.</p>
|
|
33
|
+
</section>
|
|
34
|
+
<div class="tabs"><span class="active">All entries</span><span>Places</span><span>Practice</span></div>
|
|
35
|
+
<article><div class="meta">01 / Places</div><h2>Along the Tidal Line</h2><p>How a harbor marks the passage of time.</p></article>
|
|
36
|
+
<article><div class="meta">02 / Practice</div><h2>The Useful Sketch</h2><p>Drawing as a way to notice.</p></article>
|
|
37
|
+
<article><div class="meta">03 / Places</div><h2>A Garden in Winter</h2><p>Reading a landscape after the leaves fall.</p></article>
|
|
38
|
+
</main>
|
|
39
|
+
</html>
|
package/bin/ui.mjs
CHANGED
|
@@ -53,6 +53,7 @@ Usage: ui [command] [arguments]
|
|
|
53
53
|
ui doctor Check the installation and any managed providers
|
|
54
54
|
ui route "<request>" Preview intent, platform, deliverable and mode
|
|
55
55
|
Options: --intent, --platform, --deliverable, --mode
|
|
56
|
+
Modes: quick, standard, high-fidelity
|
|
56
57
|
ui design-init Create missing design documents and project profile
|
|
57
58
|
ui migrate Draft DESIGN.md for an existing MASTER.md
|
|
58
59
|
Both accept --platform and --dry-run
|
|
@@ -147,7 +148,7 @@ async function main() {
|
|
|
147
148
|
|
|
148
149
|
if (cmd === 'route') {
|
|
149
150
|
const options = readOptions(args.slice(2), ['--intent', '--platform', '--deliverable', '--mode']);
|
|
150
|
-
console.log(JSON.stringify(previewRoute(target ?? '', options), null, 2));
|
|
151
|
+
console.log(JSON.stringify(previewRoute(target ?? '', { ...options, root }), null, 2));
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
153
154
|
|
package/examples/usage.md
CHANGED
|
@@ -1,68 +1,37 @@
|
|
|
1
|
-
# Usage
|
|
1
|
+
# Usage examples
|
|
2
2
|
|
|
3
|
-
## Existing
|
|
3
|
+
## Existing workflow
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Use ui-director to improve the reporting filters in our existing admin console. Users should return from a report with the same filters applied. Reuse the data table and existing components. Exercise the retry path and keyboard navigation in the browser.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
Use ui-director to add an AI agent management page to the existing admin console.
|
|
9
|
-
```
|
|
7
|
+
Use Standard. Inspect the existing flow, locate its state owner, define the return and retry behavior, implement the changes and recheck the observed states.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## Original flagship page
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
NEW_SCREEN / STANDARD / implementation
|
|
11
|
+
> Use ui-director to design a High Fidelity home page for an independent ceramics studio. Explore compositions and typography that convey the feel of the pieces, choose a direction, then render the result at desktop and mobile sizes.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
```
|
|
13
|
+
Explore materially distinct directions before implementation. Compare them against the brief, site content and purchase path.
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
## Small fix
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
> Use ui-director to make a Quick fix to keyboard focus when closing the existing settings dialog.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Check the current focus order and restoration, make the smallest change and exercise the affected input path.
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
Use ui-director to create a professional quantitative trading dashboard from scratch. The visual direction is not defined yet.
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Expected route:
|
|
30
|
-
|
|
31
|
-
```text
|
|
32
|
-
NEW_SCREEN / CRAFT / implementation
|
|
33
|
-
|
|
34
|
-
research → system → visual → prototype → qa
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Small accessibility fix
|
|
38
|
-
|
|
39
|
-
Prompt:
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
Use ui-director to fix keyboard navigation and focus behavior in this settings form.
|
|
43
|
-
```
|
|
21
|
+
## Read-only review
|
|
44
22
|
|
|
45
|
-
|
|
23
|
+
> Use ui-director to audit the desktop settings flow. Report findings with screenshots or reproduction steps. Leave product source untouched.
|
|
46
24
|
|
|
47
|
-
|
|
48
|
-
FAST / implementation
|
|
25
|
+
Record gate statuses and important experience and visual findings. State which checks required a missing desktop runtime.
|
|
49
26
|
|
|
50
|
-
|
|
51
|
-
```
|
|
27
|
+
## Reference matching
|
|
52
28
|
|
|
53
|
-
|
|
29
|
+
> Use ui-director to match the supplied screenshot for just the existing account header. Keep the rest of the screen scoped out and use Quick depth.
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
Use ui-director to audit the desktop settings flow. Report findings with screenshots
|
|
57
|
-
or reproduction steps. Leave product source untouched.
|
|
58
|
-
```
|
|
31
|
+
Match the requested properties and verify the header in the same rendered state.
|
|
59
32
|
|
|
60
|
-
|
|
33
|
+
## Cocos HMI
|
|
61
34
|
|
|
62
|
-
|
|
35
|
+
> Use ui-director to update the Cocos Creator trip summary. Keep speed visible, preserve the current scene and approved tokens, and exercise stale-signal and reconnect flows on the target build.
|
|
63
36
|
|
|
64
|
-
|
|
65
|
-
Use ui-director in REFERENCE mode to implement a new account screen using the supplied
|
|
66
|
-
reference for hierarchy and density. Use approved product tokens. Compare the same
|
|
67
|
-
viewport and states after rendering.
|
|
68
|
-
```
|
|
37
|
+
Check the runtime Canvas scale and input paths using the project dimensions and signal replay.
|
package/install.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""UI Director
|
|
2
|
+
"""UI Director host installation, migration and diagnostics (stdlib only)."""
|
|
3
3
|
import argparse
|
|
4
4
|
import hashlib
|
|
5
5
|
import json
|
|
@@ -246,15 +246,10 @@ def preview(task, platform='auto', deliverable='auto', mode='auto', intent='auto
|
|
|
246
246
|
if result.returncode:
|
|
247
247
|
raise ValueError(result.stderr.strip())
|
|
248
248
|
route = json.loads(result.stdout)
|
|
249
|
-
|
|
250
|
-
'AUDIT': 'impeccable', 'MOTION': 'emil', 'SYSTEM': 'pro-max', 'DESLOP': 'unslop',
|
|
251
|
-
'POLISH': 'hallmark', 'REFERENCE': 'cook', 'BRAND': 'taste', 'NEW_SCREEN': 'frontend',
|
|
252
|
-
}[route['intent']]
|
|
253
|
-
if route['platform'] != 'web':
|
|
254
|
-
primary = 'pro-max' if route['intent'] == 'SYSTEM' else 'core'
|
|
255
|
-
route['provider_hint'] = primary
|
|
249
|
+
route['provider_hint'] = 'core'
|
|
256
250
|
route['max_repair_rounds'] = route.pop('maxRepairRounds')
|
|
257
251
|
route['source_writes_allowed'] = route.pop('sourceWritesAllowed')
|
|
252
|
+
route['product_source_writes_allowed'] = route.pop('productSourceWritesAllowed')
|
|
258
253
|
return route
|
|
259
254
|
|
|
260
255
|
def route(args):
|
|
@@ -281,7 +276,13 @@ def main():
|
|
|
281
276
|
p.add_argument('--agent',choices=AGENTS,default='all')
|
|
282
277
|
if cmd in ['init','migrate']:p.add_argument('--platform',choices=RULES['platforms'],default='web');p.add_argument('--dry-run',action='store_true')
|
|
283
278
|
p.set_defaults(run=fn)
|
|
284
|
-
p=sub.add_parser('route')
|
|
279
|
+
p=sub.add_parser('route')
|
|
280
|
+
p.add_argument('task')
|
|
281
|
+
p.add_argument('--platform',choices=['auto']+RULES['platforms'],default='auto')
|
|
282
|
+
p.add_argument('--intent',default='auto',help='One of '+', '.join(RULES['workflows']))
|
|
283
|
+
p.add_argument('--deliverable',choices=['auto']+RULES['deliverables'],default='auto')
|
|
284
|
+
p.add_argument('--mode',default='auto',help='One of '+', '.join(RULES['modes']))
|
|
285
|
+
p.set_defaults(run=route)
|
|
285
286
|
p=sub.add_parser('validate-design');p.add_argument('file',nargs='?',default='DESIGN.md');p.set_defaults(run=validate)
|
|
286
287
|
for cmd in ['bundle','status','check-updates','update-upstreams','rollback-upstreams','recover-upstreams']:
|
|
287
288
|
p=sub.add_parser(cmd);p.add_argument('--agent',choices=AGENTS,default='all');p.add_argument('--scope',choices=['project','global'],default='project');p.add_argument('--path',default='.')
|
package/lib/workflows.mjs
CHANGED
|
@@ -5,7 +5,8 @@ import { dirname, join, resolve } from 'node:path';
|
|
|
5
5
|
import { assertRealDirectory, packageRoot, projectState, readJson } from './core.mjs';
|
|
6
6
|
|
|
7
7
|
const rules = readJson(join(packageRoot, 'assets', 'routing-rules.json'));
|
|
8
|
-
const catalog = readJson(join(packageRoot, '
|
|
8
|
+
const catalog = readJson(join(packageRoot, 'assets', 'capabilities.json'));
|
|
9
|
+
const designStages = new Set(Object.values(rules.workflows).flat());
|
|
9
10
|
|
|
10
11
|
function choice(value, allowed, label) {
|
|
11
12
|
if (!allowed.includes(value)) throw new Error(`Invalid ${label} '${value}'. Choose: ${allowed.join(', ')}.`);
|
|
@@ -16,10 +17,78 @@ const motionTerms = /动效|动画|微交互|\banimations?\b|\bmotion\b/;
|
|
|
16
17
|
const polishTerms = /优化|美化|重设计|改版|\b(?:redesign|polish)\b/;
|
|
17
18
|
const buildsUi = /新建|新页面|新的?.{0,8}(?:页面|界面|流程)|(?:新增|实现).{0,20}(?:页|界面|流程|表单)|从零|\bnew\b[^.!?]{0,30}\b(?:screen|page|flow|form)\b|\b(?:add|create|build|implement)\s+(?!(?:an?|the)\s+(?:animation|motion)\b)[^.!?]{0,35}\b(?:screen|page|flow|form)\b/;
|
|
18
19
|
const existingUi = /(?:现有|已有|当前)(?:(?!(?:应用|项目)(?:里|中|内)|[,。,.!?]).){0,16}(?:页|界面|表单|控件|流程)|\b(?:existing|current|legacy)\b[^.!?]{0,35}\b(?:screen|page|view|form|flow|component)\b/;
|
|
20
|
+
const localEdit = /(?:只|仅)(?:改|调整|修|还原)|\b(?:small|local|quick|targeted)\s+(?:edit|fix|change|pass)\b|(?:修复|调整).{0,12}(?:焦点|间距|颜色|溢出|对齐)|\b(?:fix|adjust)\b[^.!?]{0,45}\b(?:focus|spacing|overflow|alignment|contrast|typo)\b/;
|
|
21
|
+
const referenceMatch = /复刻|还原|像素级|reference match|pixel.perfect|截图转|figma\s*转代码|\b(?:match|recreate)\b[^.!?]{0,50}\b(?:screenshot|reference|mockup)\b/;
|
|
22
|
+
const highFidelity = /高保真|像素级|旗舰|\b(?:high.fidelity|pixel.perfect|flagship)\b/;
|
|
23
|
+
const quickMode = /\b(?:quick|fast)\s+(?:mode|depth|fix|edit)\b|\b(?:quick|fast)\s*模式|快速模式/;
|
|
24
|
+
const standardMode = /\bstandard\s+(?:mode|depth)\b|\bstandard\s*模式|标准模式/;
|
|
25
|
+
const flowChange = /流程|导航|表单|状态|恢复|重试|信息(?:结构|层级|优先级)|\b(?:flow|navigation|form|state|recovery|retry|information (?:architecture|hierarchy|priority))\b/;
|
|
26
|
+
const platformHints = [
|
|
27
|
+
['hmi', /\b(?:hmi|qnx|automotive (?:display|cluster))\b|车机|车载|仪表盘.*驾驶/],
|
|
28
|
+
['web', /\b(?:web|browser|website|chromium|h5)\b|网页|浏览器|网站/],
|
|
29
|
+
['desktop', /\b(?:desktop|electron|winui|appkit|macos)\b|桌面应用/],
|
|
30
|
+
['mobile', /\b(?:android|ios|mobile)\b|移动端|手机/],
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
function readProjectProfile(root) {
|
|
34
|
+
const state = projectState(root);
|
|
35
|
+
const file = join(state, 'project.json');
|
|
36
|
+
try {
|
|
37
|
+
if (!lstatSync(state, { throwIfNoEntry: false })?.isDirectory()) return { profile: {}, warnings: [] };
|
|
38
|
+
if (!lstatSync(file, { throwIfNoEntry: false })?.isFile()) return { profile: {}, warnings: [] };
|
|
39
|
+
const profile = readJson(file);
|
|
40
|
+
if (!profile || typeof profile !== 'object' || Array.isArray(profile)) {
|
|
41
|
+
return { profile: {}, warnings: ['Project profile must be a JSON object. Using the built-in workflow.'] };
|
|
42
|
+
}
|
|
43
|
+
return { profile, warnings: [] };
|
|
44
|
+
} catch {
|
|
45
|
+
return { profile: {}, warnings: ['Could not read the project profile. Using the built-in workflow.'] };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function previewProjectSkills(entries, platform, stages, deliverable) {
|
|
50
|
+
const candidates = new Set();
|
|
51
|
+
const warnings = [];
|
|
52
|
+
if (entries === undefined) return { candidates, warnings };
|
|
53
|
+
if (!Array.isArray(entries)) {
|
|
54
|
+
return { candidates, warnings: ['Project design_skills must be an array. Using the built-in workflow.'] };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
for (const [index, entry] of entries.entries()) {
|
|
58
|
+
const name = typeof entry === 'string' ? entry : entry?.name;
|
|
59
|
+
const known = catalog.find(({ aliases }) => aliases.includes(name));
|
|
60
|
+
const validName = typeof name === 'string' && /^[a-z0-9][a-z0-9-]*$/i.test(name);
|
|
61
|
+
if (validName && typeof entry === 'string' && !known) {
|
|
62
|
+
warnings.push(`No preview metadata for design_skills entry at index ${index} (${name}). Check it in the host.`);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const platforms = known?.platforms ?? entry?.platforms;
|
|
66
|
+
const capabilities = known?.entryCapabilities?.[name] ?? known?.capabilities ?? entry?.capabilities;
|
|
67
|
+
const deliverables = known?.entryDeliverables?.[name];
|
|
68
|
+
if (!validName
|
|
69
|
+
|| !Array.isArray(platforms) || !platforms.length
|
|
70
|
+
|| !platforms.every((value) => rules.platforms.includes(value))
|
|
71
|
+
|| !Array.isArray(capabilities) || !capabilities.length
|
|
72
|
+
|| !capabilities.every((value) => designStages.has(value))) {
|
|
73
|
+
warnings.push(`Ignoring invalid design_skills entry at index ${index}.`);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (platforms.includes(platform) && capabilities.some((stage) => stages.includes(stage))
|
|
77
|
+
&& (!deliverables || deliverables.includes(deliverable))) {
|
|
78
|
+
candidates.add(name);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return { candidates, warnings };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function routeChoice(value, choices, aliases, label) {
|
|
85
|
+
const key = value.toUpperCase().replace(/[\s-]+/g, '_');
|
|
86
|
+
return choice(Object.hasOwn(aliases, key) ? aliases[key] : key, choices, label);
|
|
87
|
+
}
|
|
19
88
|
|
|
20
89
|
function inferIntent(task) {
|
|
21
|
-
if (
|
|
22
|
-
if (/去\s*ai\s*味|去除\s*ai\s*味|deslop|unslop
|
|
90
|
+
if (referenceMatch.test(task)) return 'REFERENCE';
|
|
91
|
+
if (/去\s*ai\s*味|去除\s*ai\s*味|deslop|unslop|模板化|\bvisual cleanup\b/.test(task)) return 'CLEANUP';
|
|
23
92
|
const system = /设计系统|设计规范|\bdesign system\b|\bdesign tokens\b/.test(task);
|
|
24
93
|
const worksOnSystem = /(?:创建|提取|建立|制定|实现|重构|更新)\s*(?:一套|新的|现有的?)?\s*(?:设计系统|设计规范)|\b(?:build|create|extract|define|implement|update)\s+(?:(?:a|the|our|new|existing)\s+)*(?:design system|design tokens)\b/.test(task);
|
|
25
94
|
const appliesSystem = /(?:沿用|复用|遵循|基于|使用|保持|保留).{0,12}(?:设计系统|设计规范)|\b(?:using|reuse|follow|apply|keep|preserve)\b[^.!?]{0,30}\b(?:design system|design tokens)\b/.test(task);
|
|
@@ -28,6 +97,7 @@ function inferIntent(task) {
|
|
|
28
97
|
const addsMotion = /\badd\s+(?:\w+\s+){0,3}(?:animations?|motion)\s+(?:to|for|on)\b/.test(task);
|
|
29
98
|
if (motionTerms.test(task) && (addsMotion || !buildsUi.test(task))
|
|
30
99
|
&& !/重设计|改版|官网|redesign|landing page/.test(task)) return 'MOTION';
|
|
100
|
+
if (localEdit.test(task) && !buildsUi.test(task)) return 'LOCAL';
|
|
31
101
|
if (polishTerms.test(task)) return 'POLISH';
|
|
32
102
|
if (/官网|品牌网站|landing page|marketing site/.test(task)) return 'BRAND';
|
|
33
103
|
return 'NEW_SCREEN';
|
|
@@ -36,56 +106,73 @@ function inferIntent(task) {
|
|
|
36
106
|
export function previewRoute(request, options = {}) {
|
|
37
107
|
const task = request.trim().toLowerCase();
|
|
38
108
|
if (!task) throw new Error('Usage: ui route "<request>" [--intent ...] [--platform ...] [--deliverable ...] [--mode ...]');
|
|
39
|
-
const
|
|
109
|
+
const { profile, warnings: profileWarnings } = readProjectProfile(options.root);
|
|
110
|
+
const explicitIntent = options.intent
|
|
111
|
+
&& routeChoice(options.intent, Object.keys(rules.workflows), rules.intentAliases, 'intent');
|
|
40
112
|
const explicitDeliverable = options.deliverable && choice(options.deliverable.toLowerCase(), rules.deliverables, 'deliverable');
|
|
113
|
+
const projectPlatform = rules.platforms.includes(profile.platform) ? profile.platform : 'web';
|
|
41
114
|
const platform = options.platform
|
|
42
115
|
? choice(options.platform.toLowerCase(), rules.platforms, 'platform')
|
|
43
|
-
:
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const review = /审计|审查|审核|评审|\baudit\b|\breview\b/.test(task);
|
|
116
|
+
: platformHints.find(([, hint]) => hint.test(task))?.[0] ?? projectPlatform;
|
|
117
|
+
const auditOnly = /(?:只|仅)(?:做一次|做)?(?:审计|审查|审核|评审|检查)|\b(?:audit|review)[ -]only\b|(?:^|[,;]\s*)read[ -]only\b|\bread[ -]only (?:audit|review)\b/.test(task);
|
|
118
|
+
const noSource = /(?:不要?|别|不得)(?:修改|改动|改写|改)\s*(?:(?:任何|现有|已有|产品)?(?:代码|源码|源文件)|(?=[,。,.!?]|$))|\b(?:(?:do not|don't) (?:modify|change|edit|touch)|without (?:modifying|changing|editing|touching))\s+(?:(?:the|any|product|existing)\s+)*(?:source|code|files)\b|\b(?:leave (?:the |product )?(?:source|code) untouched|no (?:source|code|file) changes)\b|\bdo not (?:modify|change|edit)(?=\s*(?:[,.!?]|$))/.test(task);
|
|
119
|
+
const review = /审计|审查|审核|评审|\b(?:audit|review|critique)\b/.test(task);
|
|
48
120
|
const withoutRecommendations = task.replace(/(?:修复|整改|改进)建议|\b(?:(?:recommend|suggest)\s+(?:potential\s+)?(?:fixes|changes|improvements)|fix\s+(?:recommendations|suggestions))\b/g, '');
|
|
49
121
|
const asksToApply = /(?:并|然后|随后|之后|同时|后)\s*(?:直接\s*)?(?:修复|修改|实现|重设计|应用(?:这些|上述|所提)?(?:修复|改动|修改))|\b(?:and|then)\s+(?:actually\s+)?(?:fix|apply|implement|redesign|update)\b/.test(withoutRecommendations);
|
|
50
|
-
const concept = /(?:只给|只要|仅给|只做).{0,8}方案|仅设计方案|不写代码|(?:做|提供|交付|输出|给出|制作).{0,12}概念稿|仅(?:输出|提供|交付)设计稿|\
|
|
122
|
+
const concept = /(?:只给|只要|仅给|只做).{0,8}方案|仅设计方案|不写代码|(?:做|提供|交付|输出|给出|制作).{0,12}概念稿|仅(?:输出|提供|交付)设计稿|\b(?:concept|mockups?)[ -]only\b|\bdesign-only\b|\bdesign only(?=\s*(?:[,.;!?]|$))|\bonly (?:a )?mockups?\b/.test(task);
|
|
51
123
|
const specification = /\bspecification\b|规格文档|设计规格|规格说明|规格书/.test(task);
|
|
52
124
|
const implementation = /^(?:please\s+)?(?:implement|build|code|create|add|fix|redesign)\b|^(?:请)?(?:实现|开发|落地|修复|重设计)|^(?:请)?(?:按|根据).+(?:实现|开发)/.test(task);
|
|
53
|
-
const
|
|
125
|
+
const designRequest = /^(?:please\s+)?design\b|^(?:请)?设计/.test(task);
|
|
126
|
+
const englishPrototype = /\b(?:create|build|design|make|produce|provide|deliver)\s+(?:(?:a|an|the|new|clickable|interactive|working|standalone|web|mobile|desktop|high[- ]fidelity|figma)\s+)*prototype\b/.test(task);
|
|
54
127
|
const chinesePrototype = /(?:做|制作|创建|搭建|设计)(?:一个|一份)?(?:可点击|交互|可交互)?原型/.test(task);
|
|
55
128
|
const figmaCreation = /在\s*figma\s*中?.{0,20}(?:做|制作|创建|设计).{0,12}原型/.test(task);
|
|
56
129
|
const requestedPrototype = explicitDeliverable === 'prototype'
|
|
57
|
-
|| (!explicitDeliverable && (
|
|
130
|
+
|| ((!explicitDeliverable || explicitDeliverable === 'implementation') && (englishPrototype || chinesePrototype || figmaCreation));
|
|
58
131
|
const figmaPrototype = requestedPrototype
|
|
59
|
-
&& (
|
|
132
|
+
&& (figmaCreation || /\b(?:figma prototype|in figma)\b/.test(task));
|
|
60
133
|
const designOnly = concept || explicitDeliverable === 'concept'
|
|
61
134
|
|| explicitDeliverable === 'specification' || requestedPrototype || (specification && !implementation);
|
|
62
135
|
const readOnly = auditOnly || (noSource && !designOnly)
|
|
63
|
-
|| (review && !implementation && !asksToApply && !designOnly);
|
|
136
|
+
|| (review && !implementation && !designRequest && !asksToApply && !designOnly);
|
|
64
137
|
const intent = readOnly || explicitDeliverable === 'audit' ? 'AUDIT' : explicitIntent || inferIntent(task);
|
|
65
138
|
const deliverable = intent === 'AUDIT' ? 'audit'
|
|
66
|
-
: concept ? 'concept' :
|
|
67
|
-
|
|
139
|
+
: concept ? 'concept' : requestedPrototype ? 'prototype'
|
|
140
|
+
: explicitDeliverable || (!implementation && (intent === 'SYSTEM' || specification) ? 'specification' : 'implementation');
|
|
68
141
|
const mode = options.mode
|
|
69
|
-
?
|
|
70
|
-
:
|
|
142
|
+
? routeChoice(options.mode, rules.modes, rules.modeAliases, 'mode')
|
|
143
|
+
: quickMode.test(task) ? 'QUICK'
|
|
144
|
+
: standardMode.test(task) ? 'STANDARD'
|
|
145
|
+
: highFidelity.test(task) ? 'HIGH_FIDELITY'
|
|
146
|
+
: localEdit.test(task) || ['LOCAL', 'CLEANUP'].includes(intent) ? 'QUICK' : 'STANDARD';
|
|
71
147
|
const buildArtifact = ['prototype', 'implementation'].includes(deliverable);
|
|
72
148
|
const sourceWritesAllowed = buildArtifact && !noSource && !figmaPrototype;
|
|
73
|
-
const
|
|
149
|
+
const scopedVisualEdit = mode === 'QUICK' && ['REFERENCE', 'POLISH'].includes(intent) && !flowChange.test(task);
|
|
150
|
+
const stages = rules.workflows[intent].filter((stage) => {
|
|
151
|
+
if (scopedVisualEdit && ['ux', 'system'].includes(stage)) return false;
|
|
152
|
+
return buildArtifact || stage !== 'prototype';
|
|
153
|
+
});
|
|
74
154
|
if (deliverable === 'prototype' && !stages.includes('prototype')) {
|
|
75
155
|
const reviewStage = stages.findIndex((stage) => stage === 'qa' || stage === 'motion-review');
|
|
76
156
|
stages.splice(reviewStage === -1 ? stages.length : reviewStage, 0, 'prototype');
|
|
77
157
|
}
|
|
78
158
|
if (sourceWritesAllowed && existingUi.test(task) && !stages.includes('baseline')) stages.unshift('baseline');
|
|
159
|
+
if (['LOCAL', 'CLEANUP'].includes(intent) && flowChange.test(task)) stages.splice(1, 0, 'ux');
|
|
79
160
|
if (motionTerms.test(task) && intent !== 'MOTION' && intent !== 'SYSTEM') {
|
|
80
161
|
stages.splice(stages.indexOf('qa'), 0, intent === 'AUDIT' ? 'motion-review' : 'motion');
|
|
81
162
|
}
|
|
163
|
+
const { candidates, warnings: selectionWarnings } = previewProjectSkills(profile.design_skills, platform, stages, deliverable);
|
|
164
|
+
const warnings = [...profileWarnings, ...selectionWarnings];
|
|
165
|
+
const automaticSelection = profile.design_skills === undefined && !profileWarnings.length;
|
|
82
166
|
return {
|
|
83
167
|
intent, platform, deliverable, mode, stages,
|
|
84
|
-
maxRepairRounds: buildArtifact ?
|
|
168
|
+
maxRepairRounds: buildArtifact ? null : 0,
|
|
85
169
|
sourceWritesAllowed,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
170
|
+
productSourceWritesAllowed: deliverable === 'implementation' && sourceWritesAllowed,
|
|
171
|
+
candidateSkills: [...candidates],
|
|
172
|
+
...(warnings.length ? { projectSkillWarnings: warnings } : {}),
|
|
173
|
+
note: automaticSelection
|
|
174
|
+
? 'Heuristic preview. The host may select suitable installed design skills automatically.'
|
|
175
|
+
: 'Heuristic preview of declared project candidates. Verify actual availability and fit in the host.',
|
|
89
176
|
};
|
|
90
177
|
}
|
|
91
178
|
|
|
@@ -117,7 +204,11 @@ export function checkUpstreams(root, home = homedir()) {
|
|
|
117
204
|
}
|
|
118
205
|
return {
|
|
119
206
|
scope: 'Local metadata scan only. Confirm source and availability through the host.',
|
|
120
|
-
skills: catalog.map((skill) => ({
|
|
207
|
+
skills: catalog.map((skill) => ({
|
|
208
|
+
...skill,
|
|
209
|
+
stages: skill.capabilities,
|
|
210
|
+
matches: candidates.filter(({ name }) => skill.aliases.includes(name)),
|
|
211
|
+
})),
|
|
121
212
|
};
|
|
122
213
|
}
|
|
123
214
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui-director-skill",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "UI/UX
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "UI/UX design skill for task flows, art direction and evidence-based review of rendered interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"lib",
|
|
31
31
|
"config",
|
|
32
32
|
"adapters",
|
|
33
|
+
"benchmark",
|
|
33
34
|
"references",
|
|
34
35
|
"templates",
|
|
35
36
|
"examples",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
# Delivery
|
|
2
|
-
For meaningful persistent design work, maintain PRODUCT.md (scope and user journey), DESIGN.md (canonical tokens and rationale after review), design-system/DECISIONS.md (approved changes), optional page specs and REVIEW.md (evidence). Respect existing project naming. Legacy MASTER.md remains readable and is not destroyed. `init` creates only missing files; `migrate` creates a reviewable DESIGN.md draft referencing the legacy document, without overwriting project rules. Use templates in `templates/`; avoid file creation for read-only or conceptual requests.
|
|
1
|
+
# Delivery
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Summarize what changed, what you verified, and any material open issues. Name the specialist contributions and decisions that affected the result. For runnable work, include the target runtime, evidence and repair retests. Mark any required check without sufficient evidence **NOT VERIFIED**. A required check must pass before claiming the delivery is verified.
|
|
4
|
+
|
|
5
|
+
Record durable decisions in the project's existing documentation. Where the project uses PRODUCT.md, DESIGN.md or REVIEW.md, use the relevant document for user goals, design decisions or evidence respectively.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Compatibility reference
|
|
2
|
-
See [stages/design-system](stages/design-system.md)
|
|
2
|
+
See [stages/design-system](stages/design-system.md).
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
# Companion manager policy
|
|
2
|
-
|
|
1
|
+
# Companion manager policy
|
|
2
|
+
|
|
3
|
+
UI Director picks a specialist for the current task before using the installer. For a managed provider, save a plan with `ui bundle --provider NAME --agent HOST --scope SCOPE --dry-run > FILE`. Review the source, pinned commit, target and changes. Once authorized, apply that same plan with `ui bundle --agent HOST --scope SCOPE --plan FILE`. Use the same project path if set. For other specialists, check whether the host has an authorized way to install the specific Skill.
|
|
4
|
+
|
|
5
|
+
Verify the Skill is available in the host after installation. Use the core workflow when a dependency cannot be used. Follow the [security policy](security-policy.md) and treat upstream instructions as subordinate to user intent, approved tokens and platform constraints.
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
# Optional
|
|
2
|
-
`assets/capabilities.json` records upstream source, aliases, stage capabilities and platform scope. Discover skills through host inventory first, then exact SKILL.md metadata in allowed paths. Alias matches are candidates; verify identity, actual name, version/source and applicability, not directory alone. Version null means unknown, not latest. `doctor` / `check-upstreams` are local read-only scans, not proof of activation. Record selected provider, version/hash if available, actual tool use and fallback. Never execute catalog strings as commands. One primary per stage; add specialists only for a distinct check. For incompatible/unavailable skill, follow core guidance. Do not import third-party skill instructions wholesale; obey platform/scope and security policy.
|
|
1
|
+
# Optional specialist skills
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Start with the design task. UI Director identifies concrete gaps and selects suitable specialists. Check the host inventory before considering an install. Use the core workflow whenever it can meet the agreed outcome.
|
|
4
|
+
|
|
5
|
+
When a missing capability materially affects the deliverable, identify the best fitting specialist, check its source and platform fit, and explain the impact on the task. If installation is the right way to close the gap, prepare one concrete plan with the source, version and install scope. Apply it when authorized and check that the host can actually load the Skill before relying on it. Continue with the work the current environment can support and report any remaining limitation. See the [companion CLI](skill-manager.md).
|
|
6
|
+
|
|
7
|
+
## Project restrictions
|
|
8
|
+
|
|
9
|
+
Project maintainers can limit automatic selection and installation plans with exact host names in `.ui-director/project.json`.
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"design_skills": ["hallmark", "studio-layout"]
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Omitted `design_skills`: choose suitable, already available host Skills.
|
|
18
|
+
- Nonempty list: choose only from the listed host entries.
|
|
19
|
+
- Empty list: use the core workflow. If a configured list cannot be read or interpreted, use the core workflow and report the issue when it affects delivery.
|
|
20
|
+
|
|
21
|
+
Assign each selected Skill one concrete output and pass accepted results to the next work that uses them. Resolve competing proposals against the user's goal and project constraints.
|
|
22
|
+
|
|
23
|
+
Run `ui route` from the project root to preview candidates declared in a project list. The host makes the actual selection, including automatic selection when the list is omitted. The preview also accepts custom entries with `name`, `platforms` and `capabilities` from the [routing table](../../assets/routing-rules.json). See the [catalog](../../assets/capabilities.json) for known entries.
|
|
24
|
+
|
|
25
|
+
Use the host's browser, device or test tools for evidence. Optional QA Skills follow the same selection rules. Follow the [security policy](security-policy.md) for external sources and tools.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Compatibility reference
|
|
2
|
-
See [integrations/upstream-adapters](integrations/upstream-adapters.md)
|
|
2
|
+
See [integrations/upstream-adapters](integrations/upstream-adapters.md).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Compatibility reference
|
|
2
|
-
See [stages/motion-interaction](stages/motion-interaction.md)
|
|
2
|
+
See [stages/motion-interaction](stages/motion-interaction.md).
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
#
|
|
2
|
-
Capture a brief with task, primary user journey, audience, platform, product type, deliverable, mode, constraints, approved tokens and acceptance tests. Keep a single authoritative brief. A stage returns result, decisions, open issues, evidence IDs and next action. Pass only relevant artifacts plus constraints to downstream stages. Distinguish observed facts from inferred design goals.
|
|
1
|
+
# Project memory
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Keep one brief for the task with the primary user job, deliverable, important constraints and acceptance evidence. Label assumptions separately from observed facts.
|
|
4
|
+
|
|
5
|
+
## Authority for design decisions
|
|
6
|
+
|
|
7
|
+
1. Explicit user-approved design constraints and project requirements.
|
|
8
|
+
2. Existing project tokens, shared components, theme configuration and implementation conventions.
|
|
9
|
+
3. Design intent and rationale recorded in DESIGN.md or other project documentation.
|
|
10
|
+
4. Optional specialist guidance.
|
|
11
|
+
|
|
12
|
+
An approved design constraint stays authoritative even if implementation drifted. Trace the token/component reference and compare code, rendered behavior, approved spec and available decisions. If code violates an approved requirement, repair it within scope and retest. If documentation describes an outdated choice and code reflects a known approved decision, update the affected documentation within scope. If intent is ambiguous or a broad shared change is needed, record the discrepancy, preserve current behavior for unrelated surfaces and ask only when proceeding would otherwise force an important decision.
|
|
13
|
+
|
|
14
|
+
Use existing documentation paths. PRODUCT.md can link to user jobs, flows and constraints. DESIGN.md should link to implementation sources and capture rationale or approved exceptions. DECISIONS.md records cross-screen changes with rationale, scope and approval. REVIEW.md can link to evidence. Keep an approved legacy MASTER.md in use until a reviewed migration resolves it. Avoid copying a token catalog into prose when the values already have a maintained source.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Evidence-driven iteration
|
|
2
|
-
1. Freeze scope, capture baseline where available, choose target states/viewport/device and explicit success criteria.
|
|
3
|
-
2. Implement the smallest coherent change. Run build and relevant tests. Render at actual target dimensions; record viewport, scale/DPR, state, environment and artifact path. Capture comparable final screenshots or video.
|
|
4
|
-
3. Evaluate against reference and rubric; separate visual, interaction, functional and performance findings. Independent reviewer if host supports it, otherwise a clearly labelled separate self-review pass. Never claim independent agents unless spawned.
|
|
5
|
-
4. Repair highest-severity issues first; rerun affected checks, compare evidence and log residuals. One repair+recheck is one round; initial implementation is not a repair round.
|
|
6
|
-
5. Stop if required gates pass, user budget exhausted, no material gain across two rounds, critical blocker, or max rounds. Do not hide a failing gate by relaxing criteria. Final report includes iterations actually completed and missing evidence.
|
|
7
2
|
|
|
8
|
-
|
|
3
|
+
1. Identify the highest-impact uncertainty and choose a state and observable criterion that resolves it. Capture the baseline for an existing target.
|
|
4
|
+
2. Render and exercise the actual target. Collect the reference, baseline and changed state under equivalent conditions where available. Record differences in environment or input.
|
|
5
|
+
3. Review the evidence and prioritize findings by user impact, confidence and repair risk. Address failing hard gates and serious blockers before visual refinements.
|
|
6
|
+
4. Make the smallest coherent repair and re-run the affected flows, gates and visual comparisons. Update unresolved findings using the retest evidence.
|
|
7
|
+
5. Stop when the applicable required gates are verified and remaining changes offer little benefit, when further changes are too risky for the current scope, or when a user limit or concrete blocker is reached. Report any unverified or failing required gate.
|
|
8
|
+
|
|
9
|
+
Choose depth from task complexity, evidence gaps, remaining impact and cost of the next iteration. Honor any explicit limits. Audit and concept tasks can refine findings or proposals within their requested scope.
|