@rotifer/playground 0.5.0-alpha.2 → 0.7.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 +159 -15
- package/LICENSE +1 -1
- package/README.md +51 -23
- package/README.zh.md +54 -25
- package/dist/cloud/auth.d.ts +7 -1
- package/dist/cloud/auth.d.ts.map +1 -1
- package/dist/cloud/auth.js +65 -1
- package/dist/cloud/auth.js.map +1 -1
- package/dist/cloud/client.d.ts +4 -1
- package/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/client.js +9 -2
- package/dist/cloud/client.js.map +1 -1
- package/dist/cloud/types.d.ts +3 -1
- package/dist/cloud/types.d.ts.map +1 -1
- package/dist/cloud/types.js.map +1 -1
- package/dist/commands/agent-create.d.ts.map +1 -1
- package/dist/commands/agent-create.js +66 -3
- package/dist/commands/agent-create.js.map +1 -1
- package/dist/commands/agent-run.d.ts.map +1 -1
- package/dist/commands/agent-run.js +296 -32
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/arena-submit.d.ts.map +1 -1
- package/dist/commands/arena-submit.js +45 -17
- package/dist/commands/arena-submit.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +9 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +23 -16
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/network.js +4 -4
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +162 -44
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +209 -23
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +17 -1
- package/dist/commands/wrap.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/runtime/network-gateway.d.ts +53 -0
- package/dist/runtime/network-gateway.d.ts.map +1 -0
- package/dist/runtime/network-gateway.js +147 -0
- package/dist/runtime/network-gateway.js.map +1 -0
- package/dist/utils/binding.d.ts +25 -0
- package/dist/utils/binding.d.ts.map +1 -1
- package/dist/utils/binding.js.map +1 -1
- package/dist/utils/open-browser.d.ts +10 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +23 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/genes/academic-writer/.cloud-manifest.json +6 -0
- package/genes/academic-writer/.gene-manifest.json +8 -0
- package/genes/academic-writer/SKILL.md +274 -0
- package/genes/academic-writer/phenotype.json +28 -0
- package/genes/ai-components/.cloud-manifest.json +6 -0
- package/genes/ai-components/.gene-manifest.json +8 -0
- package/genes/ai-components/SKILL.md +381 -0
- package/genes/ai-components/phenotype.json +28 -0
- package/genes/algorithmic-art/.cloud-manifest.json +6 -0
- package/genes/algorithmic-art/.gene-manifest.json +8 -0
- package/genes/algorithmic-art/SKILL.md +405 -0
- package/genes/algorithmic-art/phenotype.json +28 -0
- package/genes/answer-synthesizer/.cloud-manifest.json +6 -0
- package/genes/answer-synthesizer/index.ts +194 -0
- package/genes/answer-synthesizer/phenotype.json +61 -0
- package/genes/api-designer/.cloud-manifest.json +6 -0
- package/genes/api-designer/.gene-manifest.json +8 -0
- package/genes/api-designer/SKILL.md +456 -0
- package/genes/api-designer/phenotype.json +28 -0
- package/genes/auto-coder/.cloud-manifest.json +6 -0
- package/genes/auto-coder/.gene-manifest.json +8 -0
- package/genes/auto-coder/SKILL.md +400 -0
- package/genes/auto-coder/phenotype.json +28 -0
- package/genes/auto-writer/.cloud-manifest.json +6 -0
- package/genes/auto-writer/.gene-manifest.json +8 -0
- package/genes/auto-writer/SKILL.md +361 -0
- package/genes/auto-writer/phenotype.json +28 -0
- package/genes/brand-personality/.cloud-manifest.json +6 -0
- package/genes/brand-personality/.gene-manifest.json +8 -0
- package/genes/brand-personality/SKILL.md +549 -0
- package/genes/brand-personality/phenotype.json +28 -0
- package/genes/business-writer/.cloud-manifest.json +6 -0
- package/genes/business-writer/.gene-manifest.json +8 -0
- package/genes/business-writer/SKILL.md +448 -0
- package/genes/business-writer/phenotype.json +28 -0
- package/genes/citation-manager/.cloud-manifest.json +6 -0
- package/genes/citation-manager/.gene-manifest.json +8 -0
- package/genes/citation-manager/SKILL.md +279 -0
- package/genes/citation-manager/index.ts +162 -0
- package/genes/citation-manager/package.json +1 -0
- package/genes/citation-manager/phenotype.json +50 -0
- package/genes/code-complexity/.cloud-manifest.json +6 -0
- package/genes/code-complexity/README.md +35 -0
- package/genes/code-complexity/index.ts +101 -0
- package/genes/code-complexity/phenotype.json +34 -0
- package/genes/copywriter/.cloud-manifest.json +6 -0
- package/genes/copywriter/.gene-manifest.json +8 -0
- package/genes/copywriter/SKILL.md +329 -0
- package/genes/copywriter/phenotype.json +28 -0
- package/genes/creative-writer/.cloud-manifest.json +6 -0
- package/genes/creative-writer/.gene-manifest.json +8 -0
- package/genes/creative-writer/SKILL.md +356 -0
- package/genes/creative-writer/phenotype.json +28 -0
- package/genes/data-modeler/.cloud-manifest.json +6 -0
- package/genes/data-modeler/.gene-manifest.json +8 -0
- package/genes/data-modeler/SKILL.md +486 -0
- package/genes/data-modeler/phenotype.json +28 -0
- package/genes/debugger/.cloud-manifest.json +6 -0
- package/genes/debugger/.gene-manifest.json +8 -0
- package/genes/debugger/SKILL.md +416 -0
- package/genes/debugger/phenotype.json +28 -0
- package/genes/design-tokens/.cloud-manifest.json +6 -0
- package/genes/design-tokens/.gene-manifest.json +8 -0
- package/genes/design-tokens/SKILL.md +222 -0
- package/genes/design-tokens/index.ts +128 -0
- package/genes/design-tokens/package.json +1 -0
- package/genes/design-tokens/phenotype.json +1 -0
- package/genes/devops-automator/.cloud-manifest.json +6 -0
- package/genes/devops-automator/.gene-manifest.json +8 -0
- package/genes/devops-automator/SKILL.md +490 -0
- package/genes/devops-automator/phenotype.json +28 -0
- package/genes/doc-coauthoring/.cloud-manifest.json +6 -0
- package/genes/doc-coauthoring/.gene-manifest.json +8 -0
- package/genes/doc-coauthoring/SKILL.md +375 -0
- package/genes/doc-coauthoring/phenotype.json +28 -0
- package/genes/doc-retrieval/.cloud-manifest.json +6 -0
- package/genes/doc-retrieval/index.ts +134 -0
- package/genes/doc-retrieval/phenotype.json +54 -0
- package/genes/docs-writer/.cloud-manifest.json +6 -0
- package/genes/docs-writer/.gene-manifest.json +8 -0
- package/genes/docs-writer/SKILL.md +492 -0
- package/genes/docs-writer/phenotype.json +28 -0
- package/genes/evolve-life/.cloud-manifest.json +6 -0
- package/genes/evolve-life/.compile-result.json +12 -0
- package/genes/evolve-life/README.md +52 -0
- package/genes/evolve-life/gene.ir.wasm +0 -0
- package/genes/evolve-life/gene.wasm +0 -0
- package/genes/evolve-life/index.ts +255 -0
- package/genes/evolve-life/phenotype.json +129 -0
- package/genes/evolve-life-bitwise/.cloud-manifest.json +6 -0
- package/genes/evolve-life-bitwise/.compile-result.json +12 -0
- package/genes/evolve-life-bitwise/gene.ir.wasm +0 -0
- package/genes/evolve-life-bitwise/gene.wasm +0 -0
- package/genes/evolve-life-bitwise/index.ts +273 -0
- package/genes/evolve-life-bitwise/phenotype.json +129 -0
- package/genes/evolve-life-sparse/.cloud-manifest.json +6 -0
- package/genes/evolve-life-sparse/.compile-result.json +12 -0
- package/genes/evolve-life-sparse/gene.ir.wasm +0 -0
- package/genes/evolve-life-sparse/gene.wasm +0 -0
- package/genes/evolve-life-sparse/index.ts +236 -0
- package/genes/evolve-life-sparse/phenotype.json +129 -0
- package/genes/fact-checker/.cloud-manifest.json +6 -0
- package/genes/fact-checker/.gene-manifest.json +8 -0
- package/genes/fact-checker/SKILL.md +373 -0
- package/genes/fact-checker/phenotype.json +28 -0
- package/genes/genesis-code-format/.cloud-manifest.json +6 -0
- package/genes/genesis-code-format/package.json +1 -0
- package/genes/genesis-code-format/phenotype.json +1 -0
- package/genes/genesis-file-read/.cloud-manifest.json +6 -0
- package/genes/genesis-file-read/index.ts +11 -1
- package/genes/genesis-file-read/package.json +1 -0
- package/genes/genesis-file-read/phenotype.json +1 -0
- package/genes/genesis-l0-constraint/.cloud-manifest.json +6 -0
- package/genes/genesis-l0-constraint/package.json +1 -0
- package/genes/genesis-l0-constraint/phenotype.json +1 -0
- package/genes/genesis-web-search/.cloud-manifest.json +2 -2
- package/genes/genesis-web-search/package.json +1 -0
- package/genes/genesis-web-search/phenotype.json +1 -0
- package/genes/genesis-web-search-lite/.cloud-manifest.json +6 -0
- package/genes/genesis-web-search-lite/package.json +1 -0
- package/genes/genesis-web-search-lite/phenotype.json +1 -0
- package/genes/git-workflow/.cloud-manifest.json +6 -0
- package/genes/git-workflow/.gene-manifest.json +8 -0
- package/genes/git-workflow/SKILL.md +407 -0
- package/genes/git-workflow/phenotype.json +28 -0
- package/genes/grammar-checker/.cloud-manifest.json +6 -0
- package/genes/grammar-checker/.gene-manifest.json +8 -0
- package/genes/grammar-checker/SKILL.md +194 -0
- package/genes/grammar-checker/index.ts +168 -0
- package/genes/grammar-checker/package.json +1 -0
- package/genes/grammar-checker/phenotype.json +52 -0
- package/genes/json-validator/.cloud-manifest.json +6 -0
- package/genes/json-validator/README.md +42 -0
- package/genes/json-validator/index.ts +112 -0
- package/genes/json-validator/phenotype.json +42 -0
- package/genes/license-advisor/.cloud-manifest.json +6 -0
- package/genes/license-advisor/.gene-manifest.json +8 -0
- package/genes/license-advisor/SKILL.md +117 -0
- package/genes/license-advisor/phenotype.json +28 -0
- package/genes/logic-architect/.cloud-manifest.json +6 -0
- package/genes/logic-architect/.gene-manifest.json +8 -0
- package/genes/logic-architect/SKILL.md +451 -0
- package/genes/logic-architect/phenotype.json +28 -0
- package/genes/markdown-formatter/.cloud-manifest.json +6 -0
- package/genes/markdown-formatter/README.md +34 -0
- package/genes/markdown-formatter/index.ts +86 -0
- package/genes/markdown-formatter/phenotype.json +32 -0
- package/genes/orch/.cloud-manifest.json +6 -0
- package/genes/orch/.gene-manifest.json +8 -0
- package/genes/orch/SKILL.md +504 -0
- package/genes/orch/phenotype.json +28 -0
- package/genes/particle-barneshut/.cloud-manifest.json +6 -0
- package/genes/particle-barneshut/.compile-result.json +12 -0
- package/genes/particle-barneshut/README.md +55 -0
- package/genes/particle-barneshut/gene.ir.wasm +0 -0
- package/genes/particle-barneshut/gene.wasm +0 -0
- package/genes/particle-barneshut/index.ts +486 -0
- package/genes/particle-barneshut/phenotype.json +137 -0
- package/genes/particle-brute/.cloud-manifest.json +6 -0
- package/genes/particle-brute/.compile-result.json +12 -0
- package/genes/particle-brute/README.md +55 -0
- package/genes/particle-brute/gene.ir.wasm +0 -0
- package/genes/particle-brute/gene.wasm +0 -0
- package/genes/particle-brute/index.ts +277 -0
- package/genes/particle-brute/phenotype.json +137 -0
- package/genes/particle-spatial/.cloud-manifest.json +6 -0
- package/genes/particle-spatial/.compile-result.json +12 -0
- package/genes/particle-spatial/README.md +53 -0
- package/genes/particle-spatial/gene.ir.wasm +0 -0
- package/genes/particle-spatial/gene.wasm +0 -0
- package/genes/particle-spatial/index.ts +352 -0
- package/genes/particle-spatial/phenotype.json +137 -0
- package/genes/performance-optimizer/.cloud-manifest.json +6 -0
- package/genes/performance-optimizer/.gene-manifest.json +8 -0
- package/genes/performance-optimizer/SKILL.md +480 -0
- package/genes/performance-optimizer/phenotype.json +28 -0
- package/genes/plagiarism-checker/.cloud-manifest.json +6 -0
- package/genes/plagiarism-checker/.gene-manifest.json +8 -0
- package/genes/plagiarism-checker/SKILL.md +342 -0
- package/genes/plagiarism-checker/phenotype.json +28 -0
- package/genes/product-manager/.cloud-manifest.json +6 -0
- package/genes/product-manager/.gene-manifest.json +8 -0
- package/genes/product-manager/SKILL.md +249 -0
- package/genes/product-manager/phenotype.json +28 -0
- package/genes/project-reviewer/.cloud-manifest.json +6 -0
- package/genes/project-reviewer/.gene-manifest.json +8 -0
- package/genes/project-reviewer/SKILL.md +312 -0
- package/genes/project-reviewer/phenotype.json +28 -0
- package/genes/prompt-engineer/.cloud-manifest.json +6 -0
- package/genes/prompt-engineer/.gene-manifest.json +8 -0
- package/genes/prompt-engineer/SKILL.md +411 -0
- package/genes/prompt-engineer/phenotype.json +28 -0
- package/genes/readability-analyzer/.cloud-manifest.json +6 -0
- package/genes/readability-analyzer/.gene-manifest.json +8 -0
- package/genes/readability-analyzer/SKILL.md +357 -0
- package/genes/readability-analyzer/index.ts +123 -0
- package/genes/readability-analyzer/package.json +1 -0
- package/genes/readability-analyzer/phenotype.json +35 -0
- package/genes/rotifer-protocol/SKILL.md +121 -0
- package/genes/security-auditor/.cloud-manifest.json +6 -0
- package/genes/security-auditor/.gene-manifest.json +8 -0
- package/genes/security-auditor/SKILL.md +494 -0
- package/genes/security-auditor/phenotype.json +28 -0
- package/genes/seo-optimizer/.cloud-manifest.json +6 -0
- package/genes/seo-optimizer/.gene-manifest.json +8 -0
- package/genes/seo-optimizer/SKILL.md +327 -0
- package/genes/seo-optimizer/index.ts +206 -0
- package/genes/seo-optimizer/package.json +1 -0
- package/genes/seo-optimizer/phenotype.json +1 -0
- package/genes/source-linker/.cloud-manifest.json +6 -0
- package/genes/source-linker/index.ts +88 -0
- package/genes/source-linker/phenotype.json +45 -0
- package/genes/style-optimizer/.cloud-manifest.json +6 -0
- package/genes/style-optimizer/.gene-manifest.json +8 -0
- package/genes/style-optimizer/SKILL.md +285 -0
- package/genes/style-optimizer/phenotype.json +28 -0
- package/genes/tech-lead/.cloud-manifest.json +6 -0
- package/genes/tech-lead/.gene-manifest.json +8 -0
- package/genes/tech-lead/SKILL.md +451 -0
- package/genes/tech-lead/phenotype.json +28 -0
- package/genes/test-wrap/.cloud-manifest.json +6 -0
- package/genes/test-wrap/.gene-manifest.json +8 -0
- package/genes/test-wrap/phenotype.json +28 -0
- package/genes/testing-strategist/.cloud-manifest.json +6 -0
- package/genes/testing-strategist/.gene-manifest.json +8 -0
- package/genes/testing-strategist/SKILL.md +500 -0
- package/genes/testing-strategist/phenotype.json +28 -0
- package/genes/text-summarizer/.cloud-manifest.json +6 -0
- package/genes/text-summarizer/README.md +34 -0
- package/genes/text-summarizer/index.ts +122 -0
- package/genes/text-summarizer/phenotype.json +32 -0
- package/genes/tone-analyzer/.cloud-manifest.json +6 -0
- package/genes/tone-analyzer/.gene-manifest.json +8 -0
- package/genes/tone-analyzer/SKILL.md +410 -0
- package/genes/tone-analyzer/phenotype.json +28 -0
- package/genes/translator/.cloud-manifest.json +6 -0
- package/genes/translator/.gene-manifest.json +8 -0
- package/genes/translator/SKILL.md +355 -0
- package/genes/translator/phenotype.json +28 -0
- package/genes/ui-components/.cloud-manifest.json +6 -0
- package/genes/ui-components/.gene-manifest.json +8 -0
- package/genes/ui-components/SKILL.md +467 -0
- package/genes/ui-components/phenotype.json +28 -0
- package/genes/uiux-designer/.cloud-manifest.json +6 -0
- package/genes/uiux-designer/.gene-manifest.json +8 -0
- package/genes/uiux-designer/SKILL.md +353 -0
- package/genes/uiux-designer/phenotype.json +28 -0
- package/genes/url-extractor/.cloud-manifest.json +6 -0
- package/genes/url-extractor/README.md +37 -0
- package/genes/url-extractor/index.ts +86 -0
- package/genes/url-extractor/phenotype.json +48 -0
- package/genes/ux-patterns/.cloud-manifest.json +6 -0
- package/genes/ux-patterns/.gene-manifest.json +8 -0
- package/genes/ux-patterns/SKILL.md +872 -0
- package/genes/ux-patterns/phenotype.json +28 -0
- package/genes/web3-components/.cloud-manifest.json +6 -0
- package/genes/web3-components/.gene-manifest.json +8 -0
- package/genes/web3-components/SKILL.md +390 -0
- package/genes/web3-components/phenotype.json +28 -0
- package/package.json +6 -5
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: uiux-designer
|
|
3
|
+
description: 统一 UI/UX 设计入口,通过风格维度参数调度设计令牌、组件、UX模式等子技能。支持预设快捷入口、参数微调、完全自定义、从输入推导。当用户提到"UI 设计""UX 设计""界面设计""组件设计""设计系统"时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UIUX Designer (参数化设计调度中心)
|
|
7
|
+
|
|
8
|
+
**定位**: UI/UX 设计的统一调度中心,通过风格参数驱动所有子技能。
|
|
9
|
+
|
|
10
|
+
**核心价值**: 从"5选1"到"无限可能",让每个品牌都有独特灵魂。
|
|
11
|
+
|
|
12
|
+
**设计哲学**: 参数化驱动,而非硬编码预设。
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 参数化架构
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
用户输入
|
|
20
|
+
│
|
|
21
|
+
▼
|
|
22
|
+
┌─────────────────────────────────────────────────────┐
|
|
23
|
+
│ uiux-designer (调度中心) │
|
|
24
|
+
│ │
|
|
25
|
+
│ 1. 收集/推导风格参数 │
|
|
26
|
+
│ - 预设快捷入口 │
|
|
27
|
+
│ - 关键词映射 │
|
|
28
|
+
│ - 参考网站分析 │
|
|
29
|
+
│ - 完全自定义 │
|
|
30
|
+
│ │
|
|
31
|
+
│ 2. 生成 StyleParams │
|
|
32
|
+
│ { │
|
|
33
|
+
│ colorTemperature: 65, │
|
|
34
|
+
│ borderRadius: 55, │
|
|
35
|
+
│ motionIntensity: 50, │
|
|
36
|
+
│ density: 60, │
|
|
37
|
+
│ emotionalTone: 70, │
|
|
38
|
+
│ contrast: 45, │
|
|
39
|
+
│ colors: { primary: "#E07A5F" } │
|
|
40
|
+
│ } │
|
|
41
|
+
│ │
|
|
42
|
+
│ 3. 分发参数到子技能 │
|
|
43
|
+
└─────────────────────────────────────────────────────┘
|
|
44
|
+
│
|
|
45
|
+
├──────────────────┬──────────────────┐
|
|
46
|
+
▼ ▼ ▼
|
|
47
|
+
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
48
|
+
│ design- │ │ ui- │ │ ux- │
|
|
49
|
+
│ tokens │ │ components │ │ patterns │
|
|
50
|
+
│ │ │ │ │ │
|
|
51
|
+
│ 生成CSS变量 │ │ 生成组件样式 │ │ 生成文案动效 │
|
|
52
|
+
└─────────────┘ └─────────────┘ └─────────────┘
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 风格参数收集流程
|
|
58
|
+
|
|
59
|
+
### 方式一:预设快捷入口
|
|
60
|
+
|
|
61
|
+
用户可选择预设作为起点:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
用户: "用温暖风格"
|
|
65
|
+
|
|
66
|
+
系统加载预设参数:
|
|
67
|
+
{
|
|
68
|
+
colorTemperature: 75,
|
|
69
|
+
borderRadius: 70,
|
|
70
|
+
motionIntensity: 55,
|
|
71
|
+
density: 65,
|
|
72
|
+
emotionalTone: 75,
|
|
73
|
+
contrast: 45,
|
|
74
|
+
colors: { primary: "#E07A5F" }
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**5种预设**:
|
|
79
|
+
- `minimal` - 极简:冷色、小圆角、快动效、克制文案
|
|
80
|
+
- `warm` - 温暖:暖色、大圆角、柔和动效、亲切文案
|
|
81
|
+
- `playful` - 活泼:多彩、超大圆角、弹性动效、热情文案
|
|
82
|
+
- `professional` - 专业:深蓝灰、小圆角、稳重动效、正式文案
|
|
83
|
+
- `bold` - 大胆:高对比、混合圆角、夸张动效、简短有力文案
|
|
84
|
+
|
|
85
|
+
### 方式二:预设 + 微调
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
用户: "温暖风格,但圆角小一点,动效快一点"
|
|
89
|
+
|
|
90
|
+
系统:
|
|
91
|
+
1. 加载 warm 预设
|
|
92
|
+
2. 覆盖指定参数:
|
|
93
|
+
- borderRadius: 70 → 50
|
|
94
|
+
- motionIntensity: 55 → 35
|
|
95
|
+
3. 输出调整后的设计
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 方式三:关键词推导
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
用户: "现代、专业、有点温度的感觉"
|
|
102
|
+
|
|
103
|
+
系统:
|
|
104
|
+
1. 识别关键词: 现代、专业、温度
|
|
105
|
+
2. 基于 professional 预设
|
|
106
|
+
3. 叠加"温度"偏移:
|
|
107
|
+
- colorTemperature: +15
|
|
108
|
+
- emotionalTone: +15
|
|
109
|
+
4. 生成最终参数
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 方式四:完全自定义
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
用户: "主色#2563EB,圆角50,动效强度60,文案友好(70)"
|
|
116
|
+
|
|
117
|
+
系统直接构建参数:
|
|
118
|
+
{
|
|
119
|
+
colorTemperature: 50, // 默认
|
|
120
|
+
borderRadius: 50,
|
|
121
|
+
motionIntensity: 60,
|
|
122
|
+
density: 50, // 默认
|
|
123
|
+
emotionalTone: 70,
|
|
124
|
+
contrast: 50, // 默认
|
|
125
|
+
colors: { primary: "#2563EB" }
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 方式五:从参考推导
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
用户: "参考 Linear.app 的风格"
|
|
133
|
+
|
|
134
|
+
系统分析:
|
|
135
|
+
- 背景色: 偏冷 → colorTemperature: 25
|
|
136
|
+
- 圆角: 中小 → borderRadius: 35
|
|
137
|
+
- 动效: 快速流畅 → motionIntensity: 35
|
|
138
|
+
- 留白: 适中 → density: 50
|
|
139
|
+
- 文案: 简洁 → emotionalTone: 30
|
|
140
|
+
- 对比: 清晰 → contrast: 55
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 参数询问模板
|
|
146
|
+
|
|
147
|
+
当用户请求需要确定风格参数时:
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
开始设计前,我需要了解一下品牌定位。你可以:
|
|
151
|
+
|
|
152
|
+
**快速开始**(选择预设):
|
|
153
|
+
- 极简 (minimal) - 适合开发工具、笔记应用
|
|
154
|
+
- 温暖 (warm) - 适合教育、健康、社区产品
|
|
155
|
+
- 活泼 (playful) - 适合社交、游戏、年轻品牌
|
|
156
|
+
- 专业 (professional) - 适合企业SaaS、金融、B2B
|
|
157
|
+
- 大胆 (bold) - 适合潮牌、NFT、时尚
|
|
158
|
+
|
|
159
|
+
**精细调整**(在预设基础上调整):
|
|
160
|
+
- "温暖风格,圆角小一点"
|
|
161
|
+
- "专业风格,但动效活泼一些"
|
|
162
|
+
|
|
163
|
+
**完全自定义**(指定具体参数):
|
|
164
|
+
- "主色#2563EB,圆角60,动效50,文案友好"
|
|
165
|
+
|
|
166
|
+
**从参考推导**:
|
|
167
|
+
- "参考 Linear.app 的风格"
|
|
168
|
+
- "类似 Notion,但更温暖"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 子技能调度
|
|
174
|
+
|
|
175
|
+
### 参数分发
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
interface StyleParams {
|
|
179
|
+
colorTemperature: number;
|
|
180
|
+
borderRadius: number;
|
|
181
|
+
motionIntensity: number;
|
|
182
|
+
density: number;
|
|
183
|
+
emotionalTone: number;
|
|
184
|
+
contrast: number;
|
|
185
|
+
colors?: { primary: string; secondary?: string };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// 调度到各子技能
|
|
189
|
+
function dispatch(params: StyleParams, task: string) {
|
|
190
|
+
switch (task) {
|
|
191
|
+
case 'tokens':
|
|
192
|
+
// design-tokens 使用全部参数生成 CSS 变量
|
|
193
|
+
return generateDesignTokens(params);
|
|
194
|
+
|
|
195
|
+
case 'components':
|
|
196
|
+
// ui-components 主要使用 borderRadius, motionIntensity, contrast
|
|
197
|
+
return generateComponentStyles(params);
|
|
198
|
+
|
|
199
|
+
case 'copy':
|
|
200
|
+
// ux-patterns 主要使用 emotionalTone
|
|
201
|
+
return getCopyStyle(params.emotionalTone);
|
|
202
|
+
|
|
203
|
+
case 'motion':
|
|
204
|
+
// ux-patterns 主要使用 motionIntensity
|
|
205
|
+
return getMotionParams(params.motionIntensity);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 任务调度表
|
|
211
|
+
|
|
212
|
+
| 任务类型 | 调度流程 | 使用的参数 |
|
|
213
|
+
|---------|---------|-----------|
|
|
214
|
+
| 新项目 UI 搭建 | 收集参数 → design-tokens → ui-components → ux-patterns | 全部 |
|
|
215
|
+
| 单个组件 | 收集参数 → ui-components | borderRadius, motionIntensity, contrast, colors |
|
|
216
|
+
| 文案设计 | 收集参数 → ux-patterns | emotionalTone |
|
|
217
|
+
| 动效设计 | 收集参数 → ux-patterns | motionIntensity |
|
|
218
|
+
| 配色方案 | 收集参数 → design-tokens | colorTemperature, contrast, colors |
|
|
219
|
+
| AI 聊天应用 | 收集参数 → design-tokens → ai-components | 全部 |
|
|
220
|
+
| Web3 DApp | 收集参数 → design-tokens → web3-components | 全部 |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 输出格式
|
|
225
|
+
|
|
226
|
+
### 参数确认输出
|
|
227
|
+
|
|
228
|
+
```markdown
|
|
229
|
+
**风格参数已确定**:
|
|
230
|
+
|
|
231
|
+
| 维度 | 值 | 说明 |
|
|
232
|
+
|------|-----|------|
|
|
233
|
+
| 色彩温度 | 65 | 偏暖 |
|
|
234
|
+
| 圆角程度 | 55 | 中等圆润 |
|
|
235
|
+
| 动效强度 | 50 | 标准 |
|
|
236
|
+
| 信息密度 | 60 | 略宽松 |
|
|
237
|
+
| 情感浓度 | 70 | 友好亲切 |
|
|
238
|
+
| 视觉对比 | 45 | 柔和 |
|
|
239
|
+
| 主色 | #E07A5F | 珊瑚橙 |
|
|
240
|
+
|
|
241
|
+
**效果预览**:
|
|
242
|
+
- 按钮: 中等圆角(18px),柔和阴影,轻微悬停缩放
|
|
243
|
+
- 文案: "保存成功!" / "哎呀,出了点问题"
|
|
244
|
+
- 动效: 310ms,轻微弹性缓动
|
|
245
|
+
|
|
246
|
+
接下来我将使用这些参数为你设计...
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### 组件输出
|
|
250
|
+
|
|
251
|
+
```markdown
|
|
252
|
+
**按钮组件**(基于当前参数):
|
|
253
|
+
|
|
254
|
+
```html
|
|
255
|
+
<button class="px-5 py-2.5 bg-[#E07A5F] text-white text-sm font-medium
|
|
256
|
+
rounded-[18px] shadow-md
|
|
257
|
+
transition-all duration-[310ms]
|
|
258
|
+
hover:shadow-lg hover:scale-[1.02] active:scale-95">
|
|
259
|
+
开始使用
|
|
260
|
+
</button>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
参数说明:
|
|
264
|
+
- `rounded-[18px]` ← borderRadius: 55
|
|
265
|
+
- `duration-[310ms]` ← motionIntensity: 50
|
|
266
|
+
- `shadow-md` ← contrast: 45
|
|
267
|
+
- `hover:scale-[1.02]` ← motionIntensity > 40
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 快速命令
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# 使用预设
|
|
276
|
+
"用温暖风格设计登录页面"
|
|
277
|
+
"极简风格的后台管理系统"
|
|
278
|
+
|
|
279
|
+
# 预设 + 调整
|
|
280
|
+
"温暖风格,圆角小一点"
|
|
281
|
+
"专业风格,动效活泼一些"
|
|
282
|
+
|
|
283
|
+
# 完全自定义
|
|
284
|
+
"主色#2563EB,圆角60,动效50,文案友好"
|
|
285
|
+
|
|
286
|
+
# 从参考推导
|
|
287
|
+
"参考 Linear.app 的风格"
|
|
288
|
+
"类似 Notion,但更温暖"
|
|
289
|
+
|
|
290
|
+
# 指定子技能
|
|
291
|
+
"用 brand-personality 生成风格参数"
|
|
292
|
+
"用 design-tokens 生成CSS变量"
|
|
293
|
+
"用 ui-components 做一个按钮"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## 子技能详解
|
|
299
|
+
|
|
300
|
+
### brand-personality (风格参数生成)
|
|
301
|
+
|
|
302
|
+
**用途**: 收集/推导风格维度参数,是设计决策的第一步。
|
|
303
|
+
|
|
304
|
+
**输出**: 6个维度参数 + 品牌色
|
|
305
|
+
|
|
306
|
+
**触发**: "确定风格"、"品牌定位"、"参考XX风格"
|
|
307
|
+
|
|
308
|
+
### design-tokens (CSS变量生成)
|
|
309
|
+
|
|
310
|
+
**用途**: 根据风格参数生成CSS变量(圆角、动效、间距、颜色)。
|
|
311
|
+
|
|
312
|
+
**输入**: StyleParams
|
|
313
|
+
|
|
314
|
+
**输出**: CSS :root 变量定义
|
|
315
|
+
|
|
316
|
+
### ui-components (组件样式生成)
|
|
317
|
+
|
|
318
|
+
**用途**: 根据风格参数生成组件样式。
|
|
319
|
+
|
|
320
|
+
**输入**: StyleParams
|
|
321
|
+
|
|
322
|
+
**输出**: 组件HTML/CSS/React代码
|
|
323
|
+
|
|
324
|
+
### ux-patterns (文案/动效生成)
|
|
325
|
+
|
|
326
|
+
**用途**: 根据 emotionalTone 和 motionIntensity 生成文案和动效。
|
|
327
|
+
|
|
328
|
+
**输入**: emotionalTone, motionIntensity
|
|
329
|
+
|
|
330
|
+
**输出**: 文案库、动效参数、惊喜级别
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 参考资源
|
|
335
|
+
|
|
336
|
+
- **brand-personality**: [SKILL.md](../brand-personality/SKILL.md) - 参数化风格系统
|
|
337
|
+
- **design-tokens**: [SKILL.md](../design-tokens/SKILL.md) - 参数到CSS变量映射
|
|
338
|
+
- **ui-components**: [SKILL.md](../ui-components/SKILL.md) - 参数化组件生成
|
|
339
|
+
- **ux-patterns**: [SKILL.md](../ux-patterns/SKILL.md) - 参数化文案和动效
|
|
340
|
+
- **ai-components**: [SKILL.md](../ai-components/SKILL.md) - AI专项组件
|
|
341
|
+
- **web3-components**: [SKILL.md](../web3-components/SKILL.md) - Web3专项组件
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 参数化优势总结
|
|
346
|
+
|
|
347
|
+
| 对比 | 旧方案(5选1) | 新方案(参数化) |
|
|
348
|
+
|-----|-------------|---------------|
|
|
349
|
+
| 灵活度 | 5种选择 | 无限组合 |
|
|
350
|
+
| 定制能力 | 只能选,不能改 | 预设 + 微调 + 完全自定义 |
|
|
351
|
+
| 品牌匹配 | 凑合用 | 精确匹配 |
|
|
352
|
+
| 扩展性 | 加预设 = 改代码 | 调参数 = 配置 |
|
|
353
|
+
| 表达力 | "温暖风格" | colorTemperature:75, emotionalTone:75... |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "ui.design",
|
|
3
|
+
"description": "Unified UI/UX design entry point. Dispatches design tokens, components, and UX pattern sub-skills via style dimension parameters. Supports presets, fine-tuning, and full customization.",
|
|
4
|
+
"inputSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"prompt": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"required": []
|
|
12
|
+
},
|
|
13
|
+
"outputSchema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"result": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": [],
|
|
22
|
+
"version": "0.1.0",
|
|
23
|
+
"author": "rotifer-team",
|
|
24
|
+
"createdAt": 1771939384426,
|
|
25
|
+
"fidelity": "Wrapped",
|
|
26
|
+
"transparency": "Open",
|
|
27
|
+
"source": "skill"
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# url-extractor
|
|
2
|
+
|
|
3
|
+
A Native Gene that extracts and categorizes all URLs from text content.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rotifer test url-extractor --input '{
|
|
9
|
+
"text": "Visit https://rotifer.dev for docs. Contact dev@rotifer.dev for help.",
|
|
10
|
+
"includeEmails": true
|
|
11
|
+
}'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- Extract HTTP/HTTPS/FTP URLs from any text
|
|
17
|
+
- Optional email address extraction
|
|
18
|
+
- Automatic deduplication
|
|
19
|
+
- Domain categorization
|
|
20
|
+
- Character position tracking for each URL
|
|
21
|
+
|
|
22
|
+
## Input
|
|
23
|
+
|
|
24
|
+
| Field | Type | Required | Description |
|
|
25
|
+
|-------|------|----------|-------------|
|
|
26
|
+
| `text` | string | Yes | Text to extract URLs from |
|
|
27
|
+
| `includeEmails` | boolean | No | Also extract emails (default: false) |
|
|
28
|
+
| `deduplicate` | boolean | No | Remove duplicates (default: true) |
|
|
29
|
+
|
|
30
|
+
## Output
|
|
31
|
+
|
|
32
|
+
| Field | Type | Description |
|
|
33
|
+
|-------|------|-------------|
|
|
34
|
+
| `urls` | array | Extracted URLs with protocol, domain, position |
|
|
35
|
+
| `emails` | array | Extracted emails (if enabled) |
|
|
36
|
+
| `totalFound` | number | Total URL count |
|
|
37
|
+
| `uniqueDomains` | string[] | List of unique domains found |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
interface ExtractorInput {
|
|
2
|
+
text: string;
|
|
3
|
+
includeEmails?: boolean;
|
|
4
|
+
deduplicate?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface UrlEntry {
|
|
8
|
+
url: string;
|
|
9
|
+
protocol: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
position: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ExtractorOutput {
|
|
15
|
+
urls: UrlEntry[];
|
|
16
|
+
emails: string[];
|
|
17
|
+
totalFound: number;
|
|
18
|
+
uniqueDomains: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const URL_REGEX = /https?:\/\/[^\s<>"')\]},;]+/gi;
|
|
22
|
+
const EMAIL_REGEX = /[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}/g;
|
|
23
|
+
|
|
24
|
+
function extractDomain(url: string): string {
|
|
25
|
+
try {
|
|
26
|
+
const match = url.match(/^https?:\/\/([^/?#]+)/);
|
|
27
|
+
return match ? match[1].toLowerCase() : "";
|
|
28
|
+
} catch {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function extractProtocol(url: string): string {
|
|
34
|
+
const match = url.match(/^(https?)/i);
|
|
35
|
+
return match ? match[1].toLowerCase() : "";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function cleanUrl(url: string): string {
|
|
39
|
+
return url.replace(/[.,;:!?)]+$/, "");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export async function express(input: ExtractorInput): Promise<ExtractorOutput> {
|
|
43
|
+
const text = input.text || "";
|
|
44
|
+
const includeEmails = input.includeEmails ?? false;
|
|
45
|
+
const deduplicate = input.deduplicate ?? true;
|
|
46
|
+
|
|
47
|
+
const urlMatches: UrlEntry[] = [];
|
|
48
|
+
const seen = new Set<string>();
|
|
49
|
+
const re = new RegExp(URL_REGEX.source, URL_REGEX.flags);
|
|
50
|
+
let match: RegExpExecArray | null;
|
|
51
|
+
|
|
52
|
+
while ((match = re.exec(text)) !== null) {
|
|
53
|
+
const raw = cleanUrl(match[0]);
|
|
54
|
+
if (deduplicate && seen.has(raw)) continue;
|
|
55
|
+
seen.add(raw);
|
|
56
|
+
urlMatches.push({
|
|
57
|
+
url: raw,
|
|
58
|
+
protocol: extractProtocol(raw),
|
|
59
|
+
domain: extractDomain(raw),
|
|
60
|
+
position: match.index,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let emails: string[] = [];
|
|
65
|
+
if (includeEmails) {
|
|
66
|
+
const emailRe = new RegExp(EMAIL_REGEX.source, EMAIL_REGEX.flags);
|
|
67
|
+
const emailSet = new Set<string>();
|
|
68
|
+
let em: RegExpExecArray | null;
|
|
69
|
+
while ((em = emailRe.exec(text)) !== null) {
|
|
70
|
+
const addr = em[0].toLowerCase();
|
|
71
|
+
if (!emailSet.has(addr)) {
|
|
72
|
+
emailSet.add(addr);
|
|
73
|
+
emails.push(addr);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const domainSet = new Set(urlMatches.map((u) => u.domain).filter((d) => d));
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
urls: urlMatches,
|
|
82
|
+
emails,
|
|
83
|
+
totalFound: urlMatches.length,
|
|
84
|
+
uniqueDomains: [...domainSet],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "text.extract",
|
|
3
|
+
"description": "Extracts and categorizes all URLs from text content, with optional validation of link accessibility.",
|
|
4
|
+
"inputSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"text": { "type": "string", "description": "Text content to extract URLs from" },
|
|
8
|
+
"includeEmails": { "type": "boolean", "description": "Also extract email addresses", "default": false },
|
|
9
|
+
"deduplicate": { "type": "boolean", "description": "Remove duplicate URLs", "default": true }
|
|
10
|
+
},
|
|
11
|
+
"required": ["text"]
|
|
12
|
+
},
|
|
13
|
+
"outputSchema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"urls": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"url": { "type": "string" },
|
|
22
|
+
"protocol": { "type": "string", "description": "http, https, ftp, etc." },
|
|
23
|
+
"domain": { "type": "string" },
|
|
24
|
+
"position": { "type": "number", "description": "Character offset in source text" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"description": "Extracted URLs with metadata"
|
|
28
|
+
},
|
|
29
|
+
"emails": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string" },
|
|
32
|
+
"description": "Extracted email addresses (if includeEmails is true)"
|
|
33
|
+
},
|
|
34
|
+
"totalFound": { "type": "number", "description": "Total URLs found" },
|
|
35
|
+
"uniqueDomains": { "type": "array", "items": { "type": "string" }, "description": "List of unique domains" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"dependencies": [],
|
|
39
|
+
"version": "0.1.0",
|
|
40
|
+
"author": "rotifer-genesis",
|
|
41
|
+
"fidelity": "Native",
|
|
42
|
+
"transparency": "Open",
|
|
43
|
+
"semantic_requirements": {
|
|
44
|
+
"timeModel": "Sync",
|
|
45
|
+
"concurrencyModel": "Stateless",
|
|
46
|
+
"failureSemantics": "Fail"
|
|
47
|
+
}
|
|
48
|
+
}
|