ui-director-skill 0.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/INSTALL.md +42 -91
  3. package/README.md +48 -284
  4. package/SKILL.md +25 -109
  5. package/assets/bundle-profiles.json +178 -0
  6. package/assets/capabilities.json +260 -0
  7. package/assets/install-manifest.json +27 -0
  8. package/assets/project-profile.example.json +23 -0
  9. package/assets/quality-rubric.json +29 -0
  10. package/assets/routing-rules.json +68 -0
  11. package/assets/upstreams.json +100 -0
  12. package/bin/ui.mjs +148 -26
  13. package/config/optional-skills.json +16 -0
  14. package/config/quality-rubric.json +13 -0
  15. package/examples/usage.md +25 -27
  16. package/install.py +303 -0
  17. package/lib/core.mjs +60 -9
  18. package/lib/workflows.mjs +168 -0
  19. package/package.json +8 -3
  20. package/references/delivery-contract.md +4 -0
  21. package/references/design-intelligence.md +2 -0
  22. package/references/integrations/security-policy.md +2 -0
  23. package/references/integrations/skill-manager.md +2 -0
  24. package/references/integrations/upstream-adapters.md +4 -0
  25. package/references/integrations.md +2 -0
  26. package/references/motion-interaction.md +2 -0
  27. package/references/orchestration/context-management.md +4 -0
  28. package/references/orchestration/iteration-loop.md +8 -0
  29. package/references/orchestration/routing.md +8 -0
  30. package/references/platforms/desktop.md +3 -0
  31. package/references/platforms/mobile.md +3 -0
  32. package/references/platforms/web.md +3 -0
  33. package/references/quality-assurance.md +2 -0
  34. package/references/routing.md +2 -58
  35. package/references/stages/design-research.md +2 -0
  36. package/references/stages/design-system.md +4 -0
  37. package/references/stages/deslop.md +2 -0
  38. package/references/stages/motion-interaction.md +31 -0
  39. package/references/stages/prototyping.md +2 -0
  40. package/references/stages/visual-direction.md +2 -0
  41. package/references/stages/visual-validation.md +6 -0
  42. package/references/visual-direction.md +2 -0
  43. package/skill_manager.py +655 -0
  44. package/templates/DECISIONS.md +3 -0
  45. package/templates/DESIGN.md +26 -0
  46. package/templates/PRODUCT.md +9 -0
  47. package/templates/REVIEW.md +19 -0
  48. package/references/project-inspection.md +0 -25
  49. package/references/quality-gates.md +0 -59
@@ -0,0 +1,68 @@
1
+ {
2
+ "modes": {
3
+ "FAST": 1,
4
+ "STANDARD": 3,
5
+ "CRAFT": 5,
6
+ "REFERENCE": 8
7
+ },
8
+ "workflows": {
9
+ "AUDIT": [
10
+ "qa"
11
+ ],
12
+ "MOTION": [
13
+ "motion",
14
+ "motion-review"
15
+ ],
16
+ "SYSTEM": [
17
+ "research",
18
+ "system",
19
+ "qa"
20
+ ],
21
+ "DESLOP": [
22
+ "baseline",
23
+ "deslop",
24
+ "qa"
25
+ ],
26
+ "POLISH": [
27
+ "baseline",
28
+ "system",
29
+ "visual",
30
+ "prototype",
31
+ "qa"
32
+ ],
33
+ "REFERENCE": [
34
+ "research",
35
+ "system",
36
+ "visual",
37
+ "prototype",
38
+ "qa"
39
+ ],
40
+ "NEW_SCREEN": [
41
+ "research",
42
+ "system",
43
+ "visual",
44
+ "prototype",
45
+ "qa"
46
+ ],
47
+ "BRAND": [
48
+ "research",
49
+ "system",
50
+ "visual",
51
+ "prototype",
52
+ "qa"
53
+ ]
54
+ },
55
+ "platforms": [
56
+ "web",
57
+ "mobile",
58
+ "desktop",
59
+ "other"
60
+ ],
61
+ "deliverables": [
62
+ "concept",
63
+ "specification",
64
+ "prototype",
65
+ "implementation",
66
+ "audit"
67
+ ]
68
+ }
@@ -0,0 +1,100 @@
1
+ [
2
+ {
3
+ "stage": "system",
4
+ "skill": "ui-ux-pro-max",
5
+ "source": "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill",
6
+ "id": "pro-max",
7
+ "notes": "Design knowledge"
8
+ },
9
+ {
10
+ "stage": "visual",
11
+ "skill": "frontend-design",
12
+ "source": "https://github.com/anthropics/skills",
13
+ "id": "frontend",
14
+ "notes": "General distinctive web UI; do not apply CSS to native"
15
+ },
16
+ {
17
+ "stage": "visual",
18
+ "skill": "design-taste-frontend",
19
+ "source": "https://github.com/Leonxlnx/taste-skill",
20
+ "id": "taste",
21
+ "notes": "Brand/marketing website specialist; discover actual current instructions"
22
+ },
23
+ {
24
+ "stage": "visual",
25
+ "skill": "taste-skill-classics",
26
+ "source": "https://github.com/Leonxlnx/taste-skill-classics",
27
+ "id": "taste-classics",
28
+ "notes": "Legacy style options, only if requested; verify provenance/version"
29
+ },
30
+ {
31
+ "stage": "research",
32
+ "skill": "hallmark",
33
+ "source": "https://github.com/Nutlope/hallmark",
34
+ "id": "hallmark",
35
+ "notes": "Reference extraction, token governance and critique"
36
+ },
37
+ {
38
+ "stage": "deslop",
39
+ "skill": "unslop",
40
+ "source": "https://github.com/heydamir/unslop",
41
+ "id": "unslop",
42
+ "notes": "Anti-template refinement; verify installed entry name"
43
+ },
44
+ {
45
+ "stage": "baseline",
46
+ "skill": "impeccable",
47
+ "source": "https://github.com/pbakaus/impeccable",
48
+ "id": "impeccable",
49
+ "notes": "Design audit, refinement and visual checks"
50
+ },
51
+ {
52
+ "stage": "motion",
53
+ "skill": "animate",
54
+ "source": "https://github.com/emilkowalski/skills",
55
+ "id": "emil",
56
+ "notes": "Motion and performance; native use principles only"
57
+ },
58
+ {
59
+ "stage": "qa",
60
+ "skill": "web-design-guidelines",
61
+ "source": "https://github.com/vercel-labs/agent-skills",
62
+ "id": "vercel",
63
+ "notes": "Web UX and accessibility review"
64
+ },
65
+ {
66
+ "stage": "research",
67
+ "skill": "stitch",
68
+ "source": "https://github.com/google-labs-code/stitch-skills",
69
+ "id": "stitch",
70
+ "notes": "Optional design conversion; requires available tools and permission"
71
+ },
72
+ {
73
+ "stage": "research",
74
+ "skill": "figma-implement-design",
75
+ "source": "https://github.com/openai/skills",
76
+ "id": "figma",
77
+ "notes": "Use actual Figma tools and authorization"
78
+ },
79
+ {
80
+ "stage": "baseline",
81
+ "skill": "playwright-interactive",
82
+ "source": "https://github.com/openai/skills",
83
+ "id": "playwright",
84
+ "notes": "Actual rendered evidence; desktop only if supported"
85
+ },
86
+ {
87
+ "stage": "qa",
88
+ "skill": "design-qa",
89
+ "source": "https://github.com/openai/plugins",
90
+ "id": "design-qa",
91
+ "notes": "Reference vs implementation QA; runtime availability varies"
92
+ },
93
+ {
94
+ "stage": "research",
95
+ "skill": "cook",
96
+ "source": "https://github.com/Leonxlnx/cook",
97
+ "id": "cook",
98
+ "notes": "Optional inspiration for render/critique loop; core loop is independent"
99
+ }
100
+ ]
package/bin/ui.mjs CHANGED
@@ -1,16 +1,20 @@
1
1
  #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { resolve } from 'node:path';
4
5
  import {
5
6
  commandExists,
6
7
  currentCommit,
7
8
  diffProvider,
9
+ directorSkillTargets,
8
10
  ensureState,
9
11
  installDirectorSkill,
10
12
  installProvider,
11
13
  loadLock,
12
14
  lockExists,
15
+ missingSkillFiles,
13
16
  packageVersion,
17
+ packageRoot,
14
18
  providerDir,
15
19
  providersConfig,
16
20
  resolveCapability,
@@ -23,6 +27,7 @@ import {
23
27
  validateProvider,
24
28
  writeLock,
25
29
  } from '../lib/core.mjs';
30
+ import { checkUpstreams, previewRoute, scaffoldDesign, validateDesign } from '../lib/workflows.mjs';
26
31
 
27
32
  const VERSION = packageVersion();
28
33
  const root = resolve(process.cwd());
@@ -31,7 +36,65 @@ const cmd = args[0] || 'status';
31
36
  const target = args[1];
32
37
 
33
38
  function help() {
34
- console.log(`UI Director ${VERSION}\n\nUsage:\n ui [command] [provider|capability]\n\nCommands:\n ui init Initialize UI Director in current project\n ui status Show provider status (default)\n ui update [provider] Update all or one specialist provider\n ui doctor Validate runtime, providers and adapters\n ui diff [provider] Show upstream changes\n ui rollback [provider] Roll back all possible or one provider\n ui resolve <capability> Resolve a logical capability to current files\n ui --version Print version\n ui --help Show this help\n\nProviders:\n ui-ux-pro-max\n jakub-skills\n design-system\n impeccable\n`);
39
+ console.log(`UI Director ${VERSION}
40
+
41
+ Usage: ui [command] [arguments]
42
+
43
+ ui init Install the skill and restore managed providers
44
+ ui init --local Install the skill using built-in guidance
45
+ ui upgrade Back up and refresh the project skill
46
+ ui skill install|upgrade Install or upgrade a host skill with backup
47
+ ui bundle Preview or install companion skill profiles
48
+ ui companions status Inspect managed companion skills
49
+ ui companions check-updates Check pinned upstream commits
50
+ ui companions update Update managed companion skills
51
+ ui companions rollback Restore the previous companion transaction
52
+ ui companions recover Recover an interrupted companion transaction
53
+ ui doctor Check the installation and any managed providers
54
+ ui route "<request>" Preview intent, platform, deliverable and mode
55
+ Options: --intent, --platform, --deliverable, --mode
56
+ ui design-init Create missing design documents and project profile
57
+ ui migrate Draft DESIGN.md for an existing MASTER.md
58
+ Both accept --platform and --dry-run
59
+ ui validate-design [file] Check the structure of DESIGN.md
60
+ ui check-upstreams Find optional skills in local skill directories
61
+ ui status Show managed provider status (default)
62
+ ui update [provider] Update managed providers
63
+ ui diff [provider] Show upstream changes
64
+ ui rollback [provider] Roll back managed providers
65
+ ui resolve <capability> Resolve a managed capability to checked-out files
66
+ ui --version Print version
67
+ ui --help Show this help
68
+
69
+ Managed providers: ui-ux-pro-max, jakub-skills, design-system, impeccable
70
+ Host skill commands require Python 3.9+. Companion management also requires Git.
71
+ `);
72
+ }
73
+
74
+ function runInstaller(installerArgs) {
75
+ const command = process.platform === 'win32' ? 'py' : 'python3';
76
+ const prefix = process.platform === 'win32' ? ['-3'] : [];
77
+ const result = spawnSync(command, [...prefix, '-B', resolve(packageRoot, 'install.py'), ...installerArgs], {
78
+ stdio: 'inherit',
79
+ });
80
+ if (result.error) throw new Error(`Python 3.9+ is required for this command: ${result.error.message}`);
81
+ process.exitCode = result.status ?? 1;
82
+ }
83
+
84
+ function readOptions(tokens, labels, flags = []) {
85
+ const options = {};
86
+ for (let i = 0; i < tokens.length; i++) {
87
+ const label = tokens[i];
88
+ if (flags.includes(label)) {
89
+ options[label.slice(2)] = true;
90
+ continue;
91
+ }
92
+ if (!labels.includes(label)) throw new Error(`Unknown option '${label}'.`);
93
+ const value = tokens[++i];
94
+ if (!value || value.startsWith('--')) throw new Error(`Missing value for '${label}'.`);
95
+ options[label.slice(2)] = value;
96
+ }
97
+ return options;
35
98
  }
36
99
 
37
100
  function names() {
@@ -61,7 +124,64 @@ async function main() {
61
124
  if (cmd === '--help' || cmd === '-h' || cmd === 'help') return help();
62
125
  if (cmd === '--version' || cmd === '-v' || cmd === 'version') return console.log(VERSION);
63
126
 
127
+ if (cmd === 'skill') {
128
+ const action = args[1];
129
+ const allowed = new Set(['install', 'upgrade', 'doctor', 'check-upstreams']);
130
+ if (!allowed.has(action)) throw new Error("Usage: ui skill <install|upgrade|doctor|check-upstreams> [options]");
131
+ return runInstaller([action, ...args.slice(2)]);
132
+ }
133
+
134
+ if (cmd === 'bundle') return runInstaller(['bundle', ...args.slice(1)]);
135
+
136
+ if (cmd === 'companions') {
137
+ const action = new Map([
138
+ ['status', 'status'],
139
+ ['check-updates', 'check-updates'],
140
+ ['update', 'update-upstreams'],
141
+ ['rollback', 'rollback-upstreams'],
142
+ ['recover', 'recover-upstreams'],
143
+ ]).get(args[1]);
144
+ if (!action) throw new Error("Usage: ui companions <status|check-updates|update|rollback|recover> [options]");
145
+ return runInstaller([action, ...args.slice(2)]);
146
+ }
147
+
148
+ if (cmd === 'route') {
149
+ const options = readOptions(args.slice(2), ['--intent', '--platform', '--deliverable', '--mode']);
150
+ console.log(JSON.stringify(previewRoute(target ?? '', options), null, 2));
151
+ return;
152
+ }
153
+
154
+ if (cmd === 'design-init' || cmd === 'migrate') {
155
+ const options = readOptions(args.slice(1), ['--platform'], ['--dry-run']);
156
+ for (const { status, file } of scaffoldDesign(root, {
157
+ platform: options.platform, migrate: cmd === 'migrate', dryRun: options['dry-run'],
158
+ })) console.log(`${status}: ${file}`);
159
+ return;
160
+ }
161
+
162
+ if (cmd === 'validate-design') {
163
+ if (args.length > 2) throw new Error('Usage: ui validate-design [file]');
164
+ const result = validateDesign(root, target);
165
+ console.log(JSON.stringify(result, null, 2));
166
+ if (result.warnings.length) process.exitCode = 1;
167
+ return;
168
+ }
169
+
170
+ if (cmd === 'check-upstreams') {
171
+ readOptions(args.slice(1), []);
172
+ console.log(JSON.stringify(checkUpstreams(root), null, 2));
173
+ return;
174
+ }
175
+
176
+ if (cmd === 'upgrade' || (cmd === 'init' && target === '--local')) {
177
+ const extra = cmd === 'upgrade' ? args.slice(1) : args.slice(2);
178
+ readOptions(extra, []);
179
+ for (const path of installDirectorSkill(root, { backup: cmd === 'upgrade' })) console.log(`Installed: ${path}`);
180
+ return;
181
+ }
182
+
64
183
  if (cmd === 'init') {
184
+ readOptions(args.slice(1), []);
65
185
  assertRuntime();
66
186
  ensureState(root);
67
187
  const hasLock = lockExists(root);
@@ -101,33 +221,35 @@ async function main() {
101
221
  const nodeMajor = Number(process.versions.node.split('.')[0]);
102
222
  console.log(`${nodeMajor >= 18 ? '✓' : '✗'} Node ${process.versions.node}`);
103
223
  if (nodeMajor < 18) errors.push('Node 18+ is required');
104
- console.log(`${commandExists('git') ? '✓' : '✗'} Git`);
105
- if (!commandExists('git')) errors.push('Git is required');
106
-
107
- const results = validateAll(root);
108
- for (const [name, result] of Object.entries(results)) {
109
- console.log(`${result.ok ? '✓' : '✗'} ${name}`);
110
- for (const e of result.errors) console.log(` - ${e}`);
111
- if (!result.ok) errors.push(`${name}: ${result.errors.join('; ')}`);
224
+ if (lockExists(root) || names().some((name) => existsSync(providerDir(root, name)))) {
225
+ const hasGit = commandExists('git');
226
+ console.log(`${hasGit ? '✓' : '✗'} Git`);
227
+ if (!hasGit) errors.push('Git is required for managed providers');
228
+
229
+ const results = validateAll(root);
230
+ for (const [name, result] of Object.entries(results)) {
231
+ console.log(`${result.ok ? '✓' : '✗'} ${name}`);
232
+ for (const e of result.errors) console.log(` - ${e}`);
233
+ if (!result.ok) errors.push(`${name}: ${result.errors.join('; ')}`);
234
+ }
235
+
236
+ const lockResult = validateLockState(root);
237
+ console.log(`${lockResult.ok ? '✓' : '✗'} lockfile`);
238
+ for (const e of lockResult.errors) console.log(` - ${e}`);
239
+ if (!lockResult.ok) errors.push(...lockResult.errors.map((e) => `lockfile: ${e}`));
240
+ } else {
241
+ console.log('· Built-in guidance (no managed providers configured)');
112
242
  }
113
243
 
114
- const lockResult = validateLockState(root);
115
- console.log(`${lockResult.ok ? '✓' : '✗'} lockfile`);
116
- for (const e of lockResult.errors) console.log(` - ${e}`);
117
- if (!lockResult.ok) errors.push(...lockResult.errors.map((e) => `lockfile: ${e}`));
118
-
119
- const skillTargets = [
120
- resolve(root, '.agents', 'skills', 'ui-director', 'SKILL.md'),
121
- resolve(root, '.claude', 'skills', 'ui-director', 'SKILL.md'),
122
- ];
123
- for (const s of skillTargets) {
124
- const target = resolve(s, '..');
125
- const complete = existsSync(s)
126
- && existsSync(resolve(target, 'bin', 'ui.mjs'))
127
- && existsSync(resolve(target, 'config', 'providers.json'))
128
- && existsSync(resolve(target, 'package.json'));
129
- console.log(`${complete ? '✓' : '✗'} ${target}`);
130
- if (!complete) errors.push(`skill installation is incomplete: ${target}`);
244
+ const projectTargets = directorSkillTargets(root);
245
+ const installedTargets = projectTargets.filter((target) => existsSync(target));
246
+ for (const target of (installedTargets.length ? installedTargets : projectTargets)) {
247
+ const missing = missingSkillFiles(target);
248
+ console.log(`${missing.length ? '✗' : '✓'} ${target}`);
249
+ if (missing.length) {
250
+ console.log(` - missing ${missing.join(', ')}`);
251
+ errors.push(`skill installation is incomplete: ${target}`);
252
+ }
131
253
  }
132
254
 
133
255
  if (errors.length) {
@@ -0,0 +1,16 @@
1
+ [
2
+ { "id": "pro-max", "aliases": ["ui-ux-pro-max"], "stages": ["research", "system"], "platforms": ["web", "mobile", "desktop"] },
3
+ { "id": "frontend", "aliases": ["frontend-design"], "stages": ["visual"], "platforms": ["web"] },
4
+ { "id": "taste", "aliases": ["design-taste-frontend", "taste-skill"], "stages": ["visual"], "platforms": ["web"] },
5
+ { "id": "taste-classics", "aliases": ["design-taste-frontend", "high-end-visual-design", "minimalist-ui", "industrial-brutalist-ui"], "stages": ["visual"], "platforms": ["web"] },
6
+ { "id": "hallmark", "aliases": ["hallmark"], "stages": ["research", "system", "visual", "deslop", "qa"], "platforms": ["web"] },
7
+ { "id": "unslop", "aliases": ["unslop"], "stages": ["deslop"], "platforms": ["web"] },
8
+ { "id": "impeccable", "aliases": ["impeccable"], "stages": ["baseline", "deslop", "qa"], "platforms": ["web"] },
9
+ { "id": "emil", "aliases": ["animate", "review-animations", "animation-performance"], "stages": ["motion", "motion-review"], "platforms": ["web"] },
10
+ { "id": "vercel", "aliases": ["web-design-guidelines"], "stages": ["qa"], "platforms": ["web"] },
11
+ { "id": "stitch", "aliases": ["stitch", "design-md", "stitch-design"], "stages": ["research", "system", "prototype"], "platforms": ["web"] },
12
+ { "id": "figma", "aliases": ["figma-implement-design", "figma-generate-design", "figma"], "stages": ["research", "prototype"], "platforms": ["web", "mobile", "desktop"] },
13
+ { "id": "playwright", "aliases": ["playwright-interactive", "playwright", "screenshot"], "stages": ["baseline", "qa"], "platforms": ["web"] },
14
+ { "id": "design-qa", "aliases": ["design-qa"], "stages": ["qa"], "platforms": ["web", "mobile", "desktop"] },
15
+ { "id": "cook", "aliases": ["cook"], "stages": ["qa"], "platforms": ["web"] }
16
+ ]
@@ -0,0 +1,13 @@
1
+ {
2
+ "targets": { "STANDARD": 85, "CRAFT": 92, "REFERENCE": 92 },
3
+ "dimensions": {
4
+ "visual": 25,
5
+ "ux": 20,
6
+ "consistency": 15,
7
+ "distinctiveness": 15,
8
+ "motion": 10,
9
+ "engineering": 10,
10
+ "accessibility": 5
11
+ },
12
+ "hardGates": ["scope", "functionality", "safety", "required_evidence", "critical_accessibility"]
13
+ }
package/examples/usage.md CHANGED
@@ -11,16 +11,9 @@ Use ui-director to add an AI agent management page to the existing admin console
11
11
  Expected logical route:
12
12
 
13
13
  ```text
14
- EXTEND / STANDARD
15
-
16
- design-system
17
- → layout
18
- → typography
19
- → interface
20
- → implementation
21
- → accessibility (if interactive/forms)
22
- → audit
23
- → polish
14
+ NEW_SCREEN / STANDARD / implementation
15
+
16
+ inspect existing screen → system → visual → prototype → qa
24
17
  ```
25
18
 
26
19
  `research` should normally be skipped.
@@ -36,18 +29,9 @@ Use ui-director to create a professional quantitative trading dashboard from scr
36
29
  Expected route:
37
30
 
38
31
  ```text
39
- CREATE / DEEP
40
-
41
- research
42
- → interface
43
- → layout
44
- → typography
45
- → colors
46
- → implementation
47
- → accessibility
48
- → audit
49
- → distill
50
- → polish
32
+ NEW_SCREEN / CRAFT / implementation
33
+
34
+ research → system → visual → prototype → qa
51
35
  ```
52
36
 
53
37
  ## Small accessibility fix
@@ -61,10 +45,24 @@ Use ui-director to fix keyboard navigation and focus behavior in this settings f
61
45
  Expected route:
62
46
 
63
47
  ```text
64
- FIX / FAST
48
+ FAST / implementation
49
+
50
+ inspect the current form → target keyboard and focus behavior → verify the affected states
51
+ ```
52
+
53
+ ## Read-only review
65
54
 
66
- design-system
67
- → accessibility
68
- → implementation
69
- → targeted audit
55
+ ```text
56
+ Use ui-director to audit the desktop settings flow. Report findings with screenshots
57
+ or reproduction steps. Leave product source untouched.
58
+ ```
59
+
60
+ The route should be `AUDIT` with the `audit` deliverable. Report any checks that require a desktop runtime when it is unavailable.
61
+
62
+ ## Match a supplied reference
63
+
64
+ ```text
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.
70
68
  ```