@uibot/skills 0.0.0-stage → 0.2.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.
- package/content/agents/artifact-lite.md +33 -0
- package/content/agents/default.md +57 -0
- package/content/craft/accessibility-baseline.md +6 -0
- package/content/craft/animation-discipline.md +6 -0
- package/content/craft/anti-ai-slop.md +7 -0
- package/content/craft/color.md +6 -0
- package/content/craft/density-and-spacing.md +6 -0
- package/content/craft/form-validation.md +6 -0
- package/content/craft/laws-of-ux.md +6 -0
- package/content/craft/rtl-and-bidi.md +5 -0
- package/content/craft/state-coverage.md +5 -0
- package/content/craft/typography.md +6 -0
- package/content/skills/apply-design-md/SKILL.md +73 -0
- package/content/skills/extract-design-tokens/SKILL.md +80 -0
- package/content/skills/generate-admin-page/SKILL.md +200 -0
- package/content/skills/generate-landing-page/SKILL.md +114 -0
- package/content/skills/html-deck/SKILL.md +53 -0
- package/content/skills/html-mobile-mockup/SKILL.md +49 -0
- package/content/skills/html-prototype/SKILL.md +49 -0
- package/content/skills/html-social-carousel/SKILL.md +90 -0
- package/content/skills/html-social-carousel/example.html +219 -0
- package/content/skills/uibot-yaml-spec/SKILL.md +166 -0
- package/dist/builtin-pack.d.ts +36 -0
- package/dist/capability.d.ts +16 -0
- package/dist/evolver.d.ts +85 -0
- package/dist/fs-source.d.ts +10 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +162 -0
- package/dist/loader.d.ts +11 -0
- package/dist/match.d.ts +12 -0
- package/dist/reflection-store.d.ts +21 -0
- package/dist/registry.d.ts +10 -0
- package/dist/regression-store.d.ts +37 -0
- package/dist/schema.d.ts +9 -0
- package/dist/selector.d.ts +19 -0
- package/dist/usage-store.d.ts +24 -0
- package/package.json +38 -4
- package/README.md +0 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html-deck
|
|
3
|
+
title: HTML Deck Demo
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
triggers: [ppt, deck, slides, presentation, pitch, roadshow, PPT, 路演, 演示文稿]
|
|
6
|
+
tags: [html, deck, ppt]
|
|
7
|
+
category: html-artifact
|
|
8
|
+
od:
|
|
9
|
+
mode: deck
|
|
10
|
+
surface: web
|
|
11
|
+
scenario: presentation
|
|
12
|
+
preview:
|
|
13
|
+
type: html
|
|
14
|
+
entry: index.html
|
|
15
|
+
design_system:
|
|
16
|
+
requires: true
|
|
17
|
+
sections: [color, typography, layout]
|
|
18
|
+
craft:
|
|
19
|
+
requires: [typography, color, anti-ai-slop, animation-discipline]
|
|
20
|
+
outputs:
|
|
21
|
+
primary: index.html
|
|
22
|
+
secondary: [slides.json]
|
|
23
|
+
speakerNotes: true
|
|
24
|
+
animations: true
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Purpose
|
|
28
|
+
|
|
29
|
+
Generate a browser-presentable HTML deck. Use this for pitch decks, weekly
|
|
30
|
+
reviews, launch narratives, and magazine-style talks.
|
|
31
|
+
|
|
32
|
+
## Output Contract
|
|
33
|
+
|
|
34
|
+
Return a single complete HTML document wrapped as:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<artifact type="html" kind="deck">
|
|
38
|
+
<!doctype html>
|
|
39
|
+
<html>...</html>
|
|
40
|
+
</artifact>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each slide must be a fixed 16:9 `<section class="slide" data-slide="N">`.
|
|
44
|
+
Include keyboard navigation for ArrowLeft/ArrowRight and a visible slide count.
|
|
45
|
+
Use `/tailwind-play.js`; do not load external assets.
|
|
46
|
+
|
|
47
|
+
## Workflow
|
|
48
|
+
|
|
49
|
+
1. Plan 6-10 slides around one narrative arc: hook, context, core, proof, close.
|
|
50
|
+
2. Use one visual direction consistently; do not mix unrelated themes.
|
|
51
|
+
3. Put one main idea on each slide.
|
|
52
|
+
4. Use large headlines, sparse body text, and mono numerics for data.
|
|
53
|
+
5. Self-check that no three consecutive slides use the same layout rhythm.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html-mobile-mockup
|
|
3
|
+
title: HTML Mobile Mockup Demo
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
triggers: [mobile, mobile app, ios, android, phone, 手机, 移动端]
|
|
6
|
+
tags: [html, mobile, prototype]
|
|
7
|
+
category: html-artifact
|
|
8
|
+
od:
|
|
9
|
+
mode: prototype
|
|
10
|
+
surface: web
|
|
11
|
+
scenario: mobile
|
|
12
|
+
preview:
|
|
13
|
+
type: html
|
|
14
|
+
entry: index.html
|
|
15
|
+
design_system:
|
|
16
|
+
requires: true
|
|
17
|
+
sections: [color, typography, layout, components]
|
|
18
|
+
craft:
|
|
19
|
+
requires: [state-coverage, animation-discipline, anti-ai-slop]
|
|
20
|
+
outputs:
|
|
21
|
+
primary: index.html
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
Generate one mobile-app screen inside a realistic phone frame for quick app UI
|
|
27
|
+
direction validation.
|
|
28
|
+
|
|
29
|
+
## Output Contract
|
|
30
|
+
|
|
31
|
+
Return a single complete HTML document wrapped as:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<artifact type="html" kind="prototype">
|
|
35
|
+
<!doctype html>
|
|
36
|
+
<html>...</html>
|
|
37
|
+
</artifact>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Use a real-feeling device frame: status bar, Dynamic Island or camera cutout,
|
|
41
|
+
content safe area, and home indicator. Do not use external images or fonts.
|
|
42
|
+
|
|
43
|
+
## Workflow
|
|
44
|
+
|
|
45
|
+
1. Pick exactly one screen job: feed, detail, onboarding, profile, checkout, or focus.
|
|
46
|
+
2. Keep tap targets at least 44px and content within the phone safe area.
|
|
47
|
+
3. Use one accent color at most twice on the screen.
|
|
48
|
+
4. Include realistic empty/loading/error hints when the screen implies data.
|
|
49
|
+
5. Self-check that the frame still looks like a device, not a rounded card.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html-prototype
|
|
3
|
+
title: HTML Prototype Demo
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
triggers: [prototype, html prototype, interactive prototype, demo, 原型, 演示]
|
|
6
|
+
tags: [html, prototype, demo]
|
|
7
|
+
category: html-artifact
|
|
8
|
+
od:
|
|
9
|
+
mode: prototype
|
|
10
|
+
surface: web
|
|
11
|
+
scenario: demo
|
|
12
|
+
preview:
|
|
13
|
+
type: html
|
|
14
|
+
entry: index.html
|
|
15
|
+
design_system:
|
|
16
|
+
requires: true
|
|
17
|
+
sections: [color, typography, layout, components]
|
|
18
|
+
craft:
|
|
19
|
+
requires: [typography, color, anti-ai-slop]
|
|
20
|
+
outputs:
|
|
21
|
+
primary: index.html
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
Generate a single-file HTML prototype for quick direction validation. This is
|
|
27
|
+
not the real UIBotSpec path; it is a demo artifact that can later be promoted.
|
|
28
|
+
|
|
29
|
+
## Output Contract
|
|
30
|
+
|
|
31
|
+
Return exactly one complete HTML document wrapped as:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<artifact type="html" kind="prototype">
|
|
35
|
+
<!doctype html>
|
|
36
|
+
<html>...</html>
|
|
37
|
+
</artifact>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Use `/tailwind-play.js`, inline CSS, system fonts, and honest placeholders.
|
|
41
|
+
Never load external scripts, fonts, images, or stock assets.
|
|
42
|
+
|
|
43
|
+
## Workflow
|
|
44
|
+
|
|
45
|
+
1. Pick one page rhythm: landing, dashboard shell, docs index, or editorial page.
|
|
46
|
+
2. Bind the selected DESIGN.md tokens into CSS variables.
|
|
47
|
+
3. Use the craft references for typography, color, and anti-AI-slop before writing.
|
|
48
|
+
4. Write real, brief-specific copy; avoid invented metrics.
|
|
49
|
+
5. Self-check hierarchy, spacing, contrast, mobile reflow, and accent budget.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: html-social-carousel
|
|
3
|
+
title: HTML Social Carousel (1080×1080 三连发)
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
triggers:
|
|
6
|
+
- social carousel
|
|
7
|
+
- carousel post
|
|
8
|
+
- instagram carousel
|
|
9
|
+
- linkedin carousel
|
|
10
|
+
- x thread cards
|
|
11
|
+
- social series
|
|
12
|
+
- 三连发
|
|
13
|
+
- 轮播图
|
|
14
|
+
- 小红书三图
|
|
15
|
+
tags: [html, social, carousel, marketing]
|
|
16
|
+
category: html-artifact
|
|
17
|
+
od:
|
|
18
|
+
mode: prototype
|
|
19
|
+
platform: desktop
|
|
20
|
+
scenario: marketing
|
|
21
|
+
featured: 7
|
|
22
|
+
preview:
|
|
23
|
+
type: html
|
|
24
|
+
entry: index.html
|
|
25
|
+
design_system:
|
|
26
|
+
requires: true
|
|
27
|
+
sections: [color, typography, layout, components]
|
|
28
|
+
craft:
|
|
29
|
+
requires: [typography, color, anti-ai-slop]
|
|
30
|
+
outputs:
|
|
31
|
+
primary: index.html
|
|
32
|
+
example_prompt: "Design a 3-card cinematic social carousel — 'onwards.' → 'to the next one.' → 'looking ahead.'. 1080×1080 squares, drop-into-Instagram ready."
|
|
33
|
+
upstream: "https://github.com/op7418/open-design (skills/social-carousel)"
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# HTML Social Carousel
|
|
37
|
+
|
|
38
|
+
Produce a 3-panel social carousel on a single dark stage. Each panel is a
|
|
39
|
+
1080×1080 cinematic still — connected as a series, but each readable on its
|
|
40
|
+
own.
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. **Read the active DESIGN.md** (injected above). Pick the loudest serif
|
|
45
|
+
token for the headline lockups and a mono token for stamps / counters.
|
|
46
|
+
2. **Pick the theme + 3 captions** from the brief. The captions must read
|
|
47
|
+
as one sentence when stacked: ("onwards." → "to the next one." →
|
|
48
|
+
"looking ahead." or "input." → "iterate." → "ship.").
|
|
49
|
+
3. **Stage** — full-bleed dark page. Top header strip:
|
|
50
|
+
- Left: serif italic display "Three posts. One beat."
|
|
51
|
+
- Below the title: a one-line description in muted mono ("1080×1080
|
|
52
|
+
· cinematic loops · minimal type. Drop into Instagram, LinkedIn, or
|
|
53
|
+
X — each post stands on its own or runs as a three-part series.").
|
|
54
|
+
- Right: small mono badge "SERIES · 01 → 03".
|
|
55
|
+
4. **Cards** — 3 squares in a horizontal row (wraps to stack on narrow
|
|
56
|
+
viewports). Each card is `aspect-ratio: 1 / 1` with rounded 12px corners,
|
|
57
|
+
a subtle 1px border, and a soft drop shadow.
|
|
58
|
+
- Background: a layered gradient that *suggests* a cinematic photo (panel
|
|
59
|
+
1 = warm dawn meadow, panel 2 = forest dusk, panel 3 = pink-mountain
|
|
60
|
+
ridge). Use `radial-gradient` + `linear-gradient` only — no images.
|
|
61
|
+
- Top-left chip: brand wordmark in serif italic with a small accent dot.
|
|
62
|
+
- Below chip: micro mono index "AI · 01 / 03".
|
|
63
|
+
- Bottom-left: headline lockup in white serif display, italic accent on
|
|
64
|
+
one word.
|
|
65
|
+
- Bottom-right: a `1× LOOP` mono stamp inside a thin border.
|
|
66
|
+
- Bottom strip caption: small caps mono describing the imagined frame
|
|
67
|
+
("Man, walking forward — close.").
|
|
68
|
+
5. **Write** a single HTML document:
|
|
69
|
+
- `<!doctype html>` through `</html>`, CSS inline.
|
|
70
|
+
- Cards sized via `width: clamp(280px, 30vw, 380px)` so 3 fit comfortably
|
|
71
|
+
across desktop and stack < 1100px.
|
|
72
|
+
- `data-uibot-id` on stage / each card / each headline.
|
|
73
|
+
6. **Self-check** before emitting:
|
|
74
|
+
- The three headlines together form one sentence and feel cinematic.
|
|
75
|
+
- Mono used only for the wordmark index, the loop stamp, and the bottom
|
|
76
|
+
captions. The headlines stay serif.
|
|
77
|
+
- Each panel's color story is distinct — no two share a dominant hue.
|
|
78
|
+
|
|
79
|
+
## Output contract
|
|
80
|
+
|
|
81
|
+
Return exactly one complete HTML document wrapped as:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
<artifact type="html" kind="prototype">
|
|
85
|
+
<!doctype html>
|
|
86
|
+
<html>...</html>
|
|
87
|
+
</artifact>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
One sentence of context before the artifact, nothing after.
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Three posts. One beat. — social carousel</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
10
|
+
<style>
|
|
11
|
+
:root {
|
|
12
|
+
--stage: #0a0a0a;
|
|
13
|
+
--stage-2: #141414;
|
|
14
|
+
--paper: #f4ede0;
|
|
15
|
+
--serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
|
|
16
|
+
--mono: 'IBM Plex Mono', ui-monospace, monospace;
|
|
17
|
+
}
|
|
18
|
+
* { box-sizing: border-box; }
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
background:
|
|
23
|
+
radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.04), transparent 70%),
|
|
24
|
+
var(--stage);
|
|
25
|
+
color: #f4ede0;
|
|
26
|
+
font: 14px/1.5 -apple-system, system-ui, sans-serif;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.stage {
|
|
30
|
+
max-width: 1280px; margin: 0 auto; padding: 60px 32px 80px;
|
|
31
|
+
}
|
|
32
|
+
.stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 36px; }
|
|
33
|
+
.stage-head h1 { margin: 0; font: italic 700 36px/1 var(--serif); letter-spacing: -0.005em; }
|
|
34
|
+
.stage-head h1 em { font-style: normal; }
|
|
35
|
+
.stage-head h1 .dot { color: #a4a09a; }
|
|
36
|
+
.stage-head .lede { margin: 8px 0 0; font: 11px/1.6 var(--mono); color: rgba(244,237,224,0.5); letter-spacing: 0.06em; max-width: 60ch; text-transform: uppercase; }
|
|
37
|
+
.stage-head .badge { font: 10.5px/1 var(--mono); padding: 7px 10px; border: 1px solid rgba(244,237,224,0.3); color: rgba(244,237,224,0.7); letter-spacing: 0.18em; flex-shrink: 0; }
|
|
38
|
+
|
|
39
|
+
.row { display: flex; gap: 22px; justify-content: center; align-items: stretch; flex-wrap: wrap; }
|
|
40
|
+
|
|
41
|
+
.card {
|
|
42
|
+
width: clamp(280px, 30vw, 380px);
|
|
43
|
+
aspect-ratio: 1 / 1;
|
|
44
|
+
border-radius: 14px;
|
|
45
|
+
border: 1px solid rgba(255,255,255,0.06);
|
|
46
|
+
box-shadow: 0 30px 60px rgba(0,0,0,0.45);
|
|
47
|
+
position: relative;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
color: #ffffff;
|
|
50
|
+
}
|
|
51
|
+
.card .scrim {
|
|
52
|
+
position: absolute; inset: 0;
|
|
53
|
+
background:
|
|
54
|
+
linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
.card .top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: flex-start; }
|
|
58
|
+
.card .brand { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; background: rgba(255,255,255,0.10); backdrop-filter: blur(6px); border-radius: 999px; }
|
|
59
|
+
.card .brand .name { font: italic 700 13px/1 var(--serif); }
|
|
60
|
+
.card .brand .dot { width: 5px; height: 5px; background: var(--paper); border-radius: 50%; opacity: 0.9; }
|
|
61
|
+
.card .index { font: 11px/1.4 var(--mono); color: rgba(255,255,255,0.85); letter-spacing: 0.16em; text-align: right; padding: 6px 10px; background: rgba(0,0,0,0.30); backdrop-filter: blur(4px); border-radius: 4px; }
|
|
62
|
+
|
|
63
|
+
.card .lockup { position: absolute; left: 22px; right: 22px; bottom: 78px; }
|
|
64
|
+
.card .lockup h2 { margin: 0; font: 700 60px/1 var(--serif); letter-spacing: -0.005em; color: #ffffff; }
|
|
65
|
+
.card .lockup h2 em { font-style: italic; }
|
|
66
|
+
.card .lockup h2 .accent { font-style: italic; }
|
|
67
|
+
|
|
68
|
+
.card .footer { position: absolute; left: 22px; right: 22px; bottom: 22px; display: flex; justify-content: space-between; align-items: center; }
|
|
69
|
+
.card .footer .caption { font: 10.5px/1.4 var(--mono); color: rgba(255,255,255,0.85); letter-spacing: 0.14em; text-transform: uppercase; max-width: 70%; }
|
|
70
|
+
.card .loop { font: 10.5px/1 var(--mono); padding: 6px 8px; border: 1px solid rgba(255,255,255,0.55); border-radius: 4px; color: rgba(255,255,255,0.85); letter-spacing: 0.18em; }
|
|
71
|
+
|
|
72
|
+
/* Card 1 — dawn meadow, blue sky */
|
|
73
|
+
.card.c1 {
|
|
74
|
+
background:
|
|
75
|
+
linear-gradient(180deg, #5b8cb6 0%, #92aebd 32%, #b0a679 50%, #6f8a4d 70%, #2a4a2a 100%),
|
|
76
|
+
#4a6a8a;
|
|
77
|
+
}
|
|
78
|
+
.card.c1 .figure {
|
|
79
|
+
position: absolute; left: 50%; top: 56%;
|
|
80
|
+
width: 80px; height: 200px;
|
|
81
|
+
transform: translate(-50%, 0);
|
|
82
|
+
background:
|
|
83
|
+
radial-gradient(ellipse 30px 14px at 50% 30%, #2a1f15 0%, #2a1f15 60%, transparent 70%),
|
|
84
|
+
linear-gradient(180deg, #2a1f15 0%, #4a3018 22%, #6a3a1a 60%, transparent 100%);
|
|
85
|
+
filter: drop-shadow(0 6px 8px rgba(0,0,0,0.35));
|
|
86
|
+
clip-path: polygon(35% 0%, 65% 0%, 78% 26%, 70% 60%, 70% 100%, 30% 100%, 30% 60%, 22% 26%);
|
|
87
|
+
opacity: 0.92;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Card 2 — forest dusk, warm orange center */
|
|
91
|
+
.card.c2 {
|
|
92
|
+
background:
|
|
93
|
+
radial-gradient(ellipse 80% 50% at 50% 100%, #f49255 0%, #c95a30 35%, transparent 60%),
|
|
94
|
+
radial-gradient(ellipse 80% 80% at 50% 90%, rgba(255,180,120,0.5), transparent 60%),
|
|
95
|
+
linear-gradient(180deg, #1c2a25 0%, #2a3a30 30%, #4a3a26 70%, #2a1a14 100%);
|
|
96
|
+
}
|
|
97
|
+
.card.c2 .trees {
|
|
98
|
+
position: absolute; left: 0; right: 0; top: 0; bottom: 0;
|
|
99
|
+
}
|
|
100
|
+
.card.c2 .trees::before, .card.c2 .trees::after {
|
|
101
|
+
content: ''; position: absolute; bottom: 0; width: 50%; height: 70%;
|
|
102
|
+
background:
|
|
103
|
+
radial-gradient(circle at 20% 90%, #0f1a14 6px, transparent 7px),
|
|
104
|
+
radial-gradient(circle at 50% 88%, #0f1a14 8px, transparent 9px),
|
|
105
|
+
radial-gradient(circle at 80% 92%, #0f1a14 6px, transparent 7px);
|
|
106
|
+
}
|
|
107
|
+
.card.c2 .trees::before { left: 0; background:
|
|
108
|
+
linear-gradient(180deg, transparent 0%, transparent 30%, rgba(15,26,20,0.85) 30%, #0f1a14 100%);
|
|
109
|
+
mask: radial-gradient(ellipse 60% 90% at 50% 100%, black 70%, transparent 100%);
|
|
110
|
+
}
|
|
111
|
+
.card.c2 .trees::after { right: 0; background:
|
|
112
|
+
linear-gradient(180deg, transparent 0%, transparent 36%, rgba(15,26,20,0.85) 36%, #0f1a14 100%);
|
|
113
|
+
mask: radial-gradient(ellipse 60% 90% at 50% 100%, black 70%, transparent 100%);
|
|
114
|
+
}
|
|
115
|
+
.card.c2 .figure {
|
|
116
|
+
position: absolute; left: 52%; top: 56%; width: 56px; height: 130px;
|
|
117
|
+
transform: translate(-50%, 0);
|
|
118
|
+
background: linear-gradient(180deg, #2a1810 0%, #4a2818 100%);
|
|
119
|
+
clip-path: polygon(40% 0%, 60% 0%, 70% 22%, 70% 56%, 65% 100%, 35% 100%, 30% 56%, 30% 22%);
|
|
120
|
+
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Card 3 — pink ridge / mountain */
|
|
124
|
+
.card.c3 {
|
|
125
|
+
background:
|
|
126
|
+
linear-gradient(180deg, #1b1e3a 0%, #4a3956 28%, #c9627e 60%, #d57f86 75%, #b8d2d8 100%);
|
|
127
|
+
}
|
|
128
|
+
.card.c3 .ridge {
|
|
129
|
+
position: absolute; inset: 0;
|
|
130
|
+
background:
|
|
131
|
+
linear-gradient(180deg, transparent 60%, rgba(60,30,40,0.4) 80%, rgba(40,20,30,0.7) 100%);
|
|
132
|
+
}
|
|
133
|
+
.card.c3 .ridge::before {
|
|
134
|
+
content: ''; position: absolute; left: 0; right: 0; bottom: 24%;
|
|
135
|
+
height: 30%;
|
|
136
|
+
background:
|
|
137
|
+
linear-gradient(180deg, #b3526a 0%, #7a3148 100%);
|
|
138
|
+
clip-path: polygon(0% 60%, 12% 30%, 22% 50%, 36% 18%, 50% 40%, 60% 22%, 72% 48%, 86% 26%, 100% 50%, 100% 100%, 0% 100%);
|
|
139
|
+
}
|
|
140
|
+
.card.c3 .ridge::after {
|
|
141
|
+
content: ''; position: absolute; left: 0; right: 0; bottom: 0;
|
|
142
|
+
height: 32%;
|
|
143
|
+
background: linear-gradient(180deg, #2a1f2a 0%, #1a1018 100%);
|
|
144
|
+
clip-path: polygon(0% 50%, 8% 20%, 18% 38%, 30% 8%, 44% 32%, 56% 12%, 68% 36%, 82% 18%, 100% 40%, 100% 100%, 0% 100%);
|
|
145
|
+
}
|
|
146
|
+
.card.c3 .figure {
|
|
147
|
+
position: absolute; right: 18%; bottom: 14%; width: 30px; height: 56px;
|
|
148
|
+
background: #1a0d12;
|
|
149
|
+
clip-path: polygon(35% 0%, 65% 0%, 75% 30%, 60% 100%, 40% 100%, 25% 30%);
|
|
150
|
+
filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@media (max-width: 1180px) {
|
|
154
|
+
.row { flex-direction: column; align-items: center; }
|
|
155
|
+
.card { width: min(96vw, 480px); }
|
|
156
|
+
.card .lockup h2 { font-size: 56px; }
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
159
|
+
</head>
|
|
160
|
+
<body>
|
|
161
|
+
<div class="stage" data-od-id="stage">
|
|
162
|
+
<div class="stage-head">
|
|
163
|
+
<div>
|
|
164
|
+
<h1>Three posts<span class="dot">.</span> One <em>beat</em><span class="dot">.</span></h1>
|
|
165
|
+
<p class="lede">1080×1080 · cinematic video loops · minimal type. Drop into Instagram, LinkedIn, or X — each post stands on its own or runs as a three-part series.</p>
|
|
166
|
+
</div>
|
|
167
|
+
<span class="badge">SERIES · 01 → 03</span>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div class="row" data-od-id="cards">
|
|
171
|
+
|
|
172
|
+
<article class="card c1" data-od-id="card-1">
|
|
173
|
+
<div class="figure"></div>
|
|
174
|
+
<div class="scrim"></div>
|
|
175
|
+
<div class="top">
|
|
176
|
+
<div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>
|
|
177
|
+
<div class="index">01 · ONWARDS</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="lockup"><h2>onwards<em>.</em></h2></div>
|
|
180
|
+
<div class="footer">
|
|
181
|
+
<div class="caption">Man, walking forward — close.</div>
|
|
182
|
+
<div class="loop">1× LOOP</div>
|
|
183
|
+
</div>
|
|
184
|
+
</article>
|
|
185
|
+
|
|
186
|
+
<article class="card c2" data-od-id="card-2">
|
|
187
|
+
<div class="trees"></div>
|
|
188
|
+
<div class="figure"></div>
|
|
189
|
+
<div class="scrim"></div>
|
|
190
|
+
<div class="top">
|
|
191
|
+
<div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>
|
|
192
|
+
<div class="index">02 · TO THE NEXT ONE</div>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="lockup"><h2><span class="accent">to the</span><br/><em>next one.</em></h2></div>
|
|
195
|
+
<div class="footer">
|
|
196
|
+
<div class="caption">Woman, stepping into frame.</div>
|
|
197
|
+
<div class="loop">1× LOOP</div>
|
|
198
|
+
</div>
|
|
199
|
+
</article>
|
|
200
|
+
|
|
201
|
+
<article class="card c3" data-od-id="card-3">
|
|
202
|
+
<div class="ridge"></div>
|
|
203
|
+
<div class="figure"></div>
|
|
204
|
+
<div class="scrim"></div>
|
|
205
|
+
<div class="top">
|
|
206
|
+
<div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>
|
|
207
|
+
<div class="index">03 · LOOKING AHEAD</div>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="lockup"><h2>looking<br/><em>ahead.</em></h2></div>
|
|
210
|
+
<div class="footer">
|
|
211
|
+
<div class="caption">Woman, overlooking the city.</div>
|
|
212
|
+
<div class="loop">1× LOOP</div>
|
|
213
|
+
</div>
|
|
214
|
+
</article>
|
|
215
|
+
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</body>
|
|
219
|
+
</html>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: uibot-yaml-spec
|
|
3
|
+
title: UIBot YAML Spec Contract
|
|
4
|
+
version: "1.1.0"
|
|
5
|
+
triggers: [uibot, spec, yaml, page, setting, login, 页面, 页, 生成, 创建, 新增, 增加, 添加, 登录, 设置]
|
|
6
|
+
tags: [contract, yaml, uibot]
|
|
7
|
+
category: contract
|
|
8
|
+
allowedCapabilities: [catalog:component]
|
|
9
|
+
authors: [uibot-team]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Apply the mandatory UIBot YAML Spec contract before writing any page output.
|
|
15
|
+
This skill is required for every Playground generation turn.
|
|
16
|
+
|
|
17
|
+
## UI Craft (always on)
|
|
18
|
+
|
|
19
|
+
The compose spine injects a UI Craft baseline plus `frontend-principles` before
|
|
20
|
+
this skill. Honor it: pick a lane (ops console / marketing / admin chrome /
|
|
21
|
+
selected design-md), ban Inter-as-default-marketing and purple-gradient slop,
|
|
22
|
+
never invent KPIs, never nest buttons, never emit unscoped global CSS, and
|
|
23
|
+
check 375 / 768 / 1440. Prefer catalog blocks and runtime tokens.
|
|
24
|
+
|
|
25
|
+
## Mandatory Output Contract
|
|
26
|
+
|
|
27
|
+
Always output in this exact order:
|
|
28
|
+
|
|
29
|
+
1. A complete single-page UIBot YAML document in one fenced `yaml` block.
|
|
30
|
+
2. A matching HTML preview in one `<artifact type="html">...</artifact>` block.
|
|
31
|
+
3. Optional short notes after the artifact only if needed.
|
|
32
|
+
|
|
33
|
+
Never put HTML inside the chat body outside the artifact. Never put raw HTML in
|
|
34
|
+
markdown code fences unless the artifact wrapper is also present.
|
|
35
|
+
|
|
36
|
+
## YAML Envelope
|
|
37
|
+
|
|
38
|
+
The YAML block must be a single page object with these top-level fields:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
id: kebab-case-page-id
|
|
42
|
+
title: 简短中文页面名
|
|
43
|
+
blocks:
|
|
44
|
+
- type: Box
|
|
45
|
+
props: {}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Rules:
|
|
49
|
+
|
|
50
|
+
- `id` is required, ASCII lower-case kebab-case (`a-z`, `0-9`, hyphens only),
|
|
51
|
+
must match the route slug, and must never contain underscores or Chinese
|
|
52
|
+
characters.
|
|
53
|
+
- `title` is required, concise Chinese, and must never be `Untitled` or empty.
|
|
54
|
+
- `blocks` is required and must be the root page block array.
|
|
55
|
+
- Every block must declare `type` and `props`. `props` may be empty, but do not
|
|
56
|
+
omit it.
|
|
57
|
+
- BlockNode optional keys are `id`, `children`, `slots`, `events`, `visible`,
|
|
58
|
+
`requests`, `template`, and `variant`. Use them only when the catalog or the
|
|
59
|
+
runtime contract requires them; never invent other block-level keys.
|
|
60
|
+
- Do not wrap the page in `page:` or `pages:` unless the user explicitly asks
|
|
61
|
+
for a multi-page export. Playground stores one generated page per turn.
|
|
62
|
+
- Do not output YAML that starts directly with `blocks:`; always include `id`
|
|
63
|
+
and `title` first.
|
|
64
|
+
|
|
65
|
+
## Multi-Page Semantics
|
|
66
|
+
|
|
67
|
+
When the user asks to add a page using words like "新增", "增加", "添加",
|
|
68
|
+
"再来一个页面", "new page", or "add page":
|
|
69
|
+
|
|
70
|
+
- Create a new `id`.
|
|
71
|
+
- Do not reuse any existing page id from the project digest.
|
|
72
|
+
- Keep the style consistent with existing pages.
|
|
73
|
+
- Reference existing APIs/entities if useful, but the generated YAML is still
|
|
74
|
+
a single new page.
|
|
75
|
+
|
|
76
|
+
When the user asks to update, modify, adjust, or fix an existing page:
|
|
77
|
+
|
|
78
|
+
- Reuse that existing page id.
|
|
79
|
+
- Preserve compatible route and data bindings unless the user asks otherwise.
|
|
80
|
+
|
|
81
|
+
## Component And Data Rules
|
|
82
|
+
|
|
83
|
+
- Use only catalog-declared block types.
|
|
84
|
+
- Every block object must contain `type` and `props`; compose nested UI with
|
|
85
|
+
contract-declared `children` and `slots`, and attach interactions through
|
|
86
|
+
`events`.
|
|
87
|
+
- Button variants: `default | outline | secondary | ghost | destructive | link`.
|
|
88
|
+
Never use `primary`.
|
|
89
|
+
- Use Form children only as declared: `Form.Input`, `Form.Select`,
|
|
90
|
+
`Form.TextArea`, `Form.Checkbox`, `Form.Submit`. Do not nest non-Form blocks
|
|
91
|
+
inside a Form unless the catalog explicitly permits it.
|
|
92
|
+
- Bind editable field values to state with `_bindState`:
|
|
93
|
+
`value: { _bindState: form.fieldName }`. Use `_state` for read-only values.
|
|
94
|
+
- Attach declarative async data needs to the owning block's `requests` array.
|
|
95
|
+
Each request uses `id`, `connectionId`, and optional `payload` / `properties`.
|
|
96
|
+
On completion, use the normal action shape and write results into state:
|
|
97
|
+
```yaml
|
|
98
|
+
requests:
|
|
99
|
+
- id: load-users
|
|
100
|
+
connectionId: users-db
|
|
101
|
+
payload:
|
|
102
|
+
operation: Find
|
|
103
|
+
onSuccess:
|
|
104
|
+
- action: SetState
|
|
105
|
+
params:
|
|
106
|
+
path: users
|
|
107
|
+
value:
|
|
108
|
+
_payload: data
|
|
109
|
+
```
|
|
110
|
+
- Event-driven requests use `action: Request` with `params.connectionId` and a
|
|
111
|
+
nested `params.request` object. Actions always use `action` + `params`; chained
|
|
112
|
+
`onSuccess` / `onError` values are arrays of the same action shape.
|
|
113
|
+
- Navigation uses `action: Link` with `params.path` or `params.url`:
|
|
114
|
+
```yaml
|
|
115
|
+
events:
|
|
116
|
+
onClick:
|
|
117
|
+
- action: Link
|
|
118
|
+
params:
|
|
119
|
+
path: /target-id
|
|
120
|
+
```
|
|
121
|
+
- Use `visible` with a visibility condition to hide a block. Use `_if` only as
|
|
122
|
+
a three-item prop expression: `{ _if: [condition, thenValue, elseValue] }`.
|
|
123
|
+
- Operators are object expressions prefixed with underscore. This list is the
|
|
124
|
+
compiler's client-operator allowlist:
|
|
125
|
+
<!-- uibot-client-operators:start -->
|
|
126
|
+
`_state`, `_bindState`, `_payload`, `_event`, `_global`, `_if`, `_eq`, `_ne`,
|
|
127
|
+
`_contains`, `_gt`, `_lt`, `_gte`, `_lte`, `_in`, `_not`, `_and`, `_or`, `_user`, `_item`, `_index`,
|
|
128
|
+
`_array.length`, `_string.concat`, `_computed`, `_filter`, `_find`, `_len`,
|
|
129
|
+
`_concat`, `_count`, `_groupCount`, `_sort`, `_number.add`, `_js`.
|
|
130
|
+
<!-- uibot-client-operators:end -->
|
|
131
|
+
`_js` is serialization compatibility only and always fails closed; never emit
|
|
132
|
+
it. Use `_global` only when the host contract explicitly exposes that value.
|
|
133
|
+
- `_state` references use dot-notation paths:
|
|
134
|
+
`{ _state: path.to.value }`
|
|
135
|
+
- `_eq` accepts an array of two operands:
|
|
136
|
+
`{ _eq: [{ _state: user.role }, admin] }`
|
|
137
|
+
- `_lt`, `_gte`, and `_lte` compare two operands; `_in` takes `[value, array]`.
|
|
138
|
+
- `_count` takes `[array]` or `[array, predicate]`, with `_item` available in the predicate.
|
|
139
|
+
- `_number.add` takes exactly two finite numbers `[left, right]`; it is for `SetState`
|
|
140
|
+
values only and fails (writing nothing) on strings, null or non-finite input. A counter
|
|
141
|
+
is `SetState` with `path: count` and `value: { _number.add: [{ _state: count }, 1] }`;
|
|
142
|
+
reset it with `ResetState` or `SetState` to `0`. There is no `IncrementState` action.
|
|
143
|
+
- `_groupCount` takes `[array, fieldName]` and returns counts by field value.
|
|
144
|
+
- `_sort` takes `[array, { fieldName: asc|desc }]` and returns a sorted copy.
|
|
145
|
+
- `_payload` extracts response data:
|
|
146
|
+
`{ _payload: data }`
|
|
147
|
+
- If a new API is needed, append a final mock comment immediately after the
|
|
148
|
+
YAML closing fence:
|
|
149
|
+
`# MOCK: api:GET./path = [{"id":"1","name":"示例"}]`
|
|
150
|
+
|
|
151
|
+
## HTML Artifact Rules
|
|
152
|
+
|
|
153
|
+
- Emit a complete standalone HTML5 document: `<!DOCTYPE html>`, `<html>`,
|
|
154
|
+
`<head>`, `<body>`.
|
|
155
|
+
- Required `<head>` children:
|
|
156
|
+
`<meta charset="UTF-8">`,
|
|
157
|
+
`<meta name="viewport" content="width=device-width, initial-scale=1.0">`.
|
|
158
|
+
- Use local Tailwind only: `<script src="/tailwind-play.js"></script>`. No
|
|
159
|
+
other external CSS or JS.
|
|
160
|
+
- The artifact represents page content only; do not include global Studio
|
|
161
|
+
navigation, sidebars, or chrome.
|
|
162
|
+
- Mirror the YAML `blocks` hierarchy and approximate the specified Tailwind
|
|
163
|
+
styling as closely as possible.
|
|
164
|
+
- Use realistic placeholder data that aligns with any YAML mocks.
|
|
165
|
+
- Keep interaction realistic and aligned with YAML behavior (e.g., buttons
|
|
166
|
+
disabled when YAML says so, forms bound to matching field names).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in content pack: the skills, agents and craft guides UIBot ships with.
|
|
3
|
+
* It is read-only package content (`packages/skills/content`); a project root
|
|
4
|
+
* receives copies. A manifest of content hashes (`<root>/.uibot/builtin-pack.json`)
|
|
5
|
+
* records what was copied, so a later start can tell an untouched copy (safe to
|
|
6
|
+
* upgrade) from one the project edited or evolved (never touched).
|
|
7
|
+
*/
|
|
8
|
+
export declare const BUILTIN_PACK_DIR: string;
|
|
9
|
+
export declare const BUILTIN_PACK_KINDS: readonly ["skills", "agents", "craft"];
|
|
10
|
+
export interface SeedBuiltinPackResult {
|
|
11
|
+
/** Entries copied into the project (`skills/<id>`, `agents/<file>`, `craft/<file>`). */
|
|
12
|
+
seeded: string[];
|
|
13
|
+
/** Entries present and left alone (up to date, or the project's own). */
|
|
14
|
+
kept: string[];
|
|
15
|
+
/** Untouched copies replaced by a newer built-in version. */
|
|
16
|
+
upgraded: string[];
|
|
17
|
+
/** Built-in changed, but the project edited its copy; the copy is kept. */
|
|
18
|
+
modified: string[];
|
|
19
|
+
/** Copies from before the manifest existed that differ from the pack; cannot tell if edited. */
|
|
20
|
+
legacy: string[];
|
|
21
|
+
/** Edited/legacy copies replaced on request; the previous file is kept as `*.pre-upgrade`. */
|
|
22
|
+
replaced: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface SeedBuiltinPackOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Entries (`skills/<id>`) to overwrite even though the project changed them, or `"legacy"`
|
|
27
|
+
* for every copy that predates version tracking. The replaced file is backed up first.
|
|
28
|
+
*/
|
|
29
|
+
replace?: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Bring the project root's `.uibot/{skills,agents,craft}` in line with the pack:
|
|
33
|
+
* copy missing entries; upgrade copies the project never changed; keep everything else.
|
|
34
|
+
* Never overwrites an edited or evolved entry. Missing pack dir is a no-op.
|
|
35
|
+
*/
|
|
36
|
+
export declare function seedBuiltinPack(rootDir: string, packDir?: string, options?: SeedBuiltinPackOptions): SeedBuiltinPackResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UIBotPlugin } from "@uibot/contracts";
|
|
2
|
+
import { SkillRegistry } from "./registry.js";
|
|
3
|
+
import { SkillSelectorImpl } from "./selector.js";
|
|
4
|
+
export interface UIBotSkillsPluginOptions {
|
|
5
|
+
/** Directory to scan for `.uibot/skills/<id>/SKILL.md` files (default: `process.cwd()`) */
|
|
6
|
+
dir?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Create a UIBot plugin that loads all SKILL.md files from `dir/.uibot/skills/`
|
|
10
|
+
* and registers each as a `skill:definition` capability.
|
|
11
|
+
* Also exposes a `SkillSelectorImpl` via the exported `createSelector()` method.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createUIBotSkillsPlugin(options?: UIBotSkillsPluginOptions): UIBotPlugin & {
|
|
14
|
+
registry: SkillRegistry;
|
|
15
|
+
createSelector(): SkillSelectorImpl;
|
|
16
|
+
};
|