diff --git a/.scd/plans/20261109-231834-d1-tokens-assets/decisions.md b/.scd/plans/20261109-231834-d1-tokens-assets/decisions.md new file mode 100644 index 0000000..0a330ee --- /dev/null +++ b/.scd/plans/20261109-231834-d1-tokens-assets/decisions.md @@ -0,0 +1,19 @@ +--- +status: approved +version: 1 +created_at: 2026-11-09T23:18:34+08:00 +updated_at: 2026-11-09T23:18:34+08:00 +recorded_timezone: Asia/Shanghai +--- + +# 决策与事件 + +- 事件ID:DEC-1 +- 类型:开工 +- 文件及文档版本:本目录四份 v1;依据 Issue #123 契约与 Initiative #122 图版本 2 +- 目标Git SHA:main HEAD(同步后) +- 用户实际依据:对 Initiative 确认摘要回复"ok";执行指令"全部完成 scdexcute"(覆盖图版本 2 全部 READY 波次的普通交付授权) +- 任务或Issue范围:Issue #123 范围内文件;NOTICES 仅 tokens/components 两节,#124/#125 各自追加 +- occurred_at:null # 会话内指令,无消息ID +- recorded_at:2026-11-09T23:18:34+08:00 +- 未决选择:无 diff --git a/.scd/plans/20261109-231834-d1-tokens-assets/implementation.md b/.scd/plans/20261109-231834-d1-tokens-assets/implementation.md new file mode 100644 index 0000000..f77ed4c --- /dev/null +++ b/.scd/plans/20261109-231834-d1-tokens-assets/implementation.md @@ -0,0 +1,17 @@ +--- +status: approved +version: 1 +created_at: 2026-11-09T23:18:34+08:00 +updated_at: 2026-11-09T23:18:34+08:00 +recorded_timezone: Asia/Shanghai +--- + +# 实施计划 + +1. 分支 delivery/123-design-tokens-assets +2. 下载 plugin87 main 分支 tokens/ 与 components/ 全部文件(git tree API 清点后逐个 raw 下载) +3. NOTICES 两节(plugin87 MIT,来源 URL,无改动声明) +4. 测试排除:collectPayloadFiles 跳过路径段 /data/;断言计数不变(79) +5. design-tokens.md 末尾加"数据资产与用法"段 +6. 验证:node --test tests/*.test.mjs 全绿;隔离会话 A3 +7. PR #123 → 独立验收 → 合并 → 关 Issue → 图版本 3 diff --git a/.scd/plans/20261109-231834-d1-tokens-assets/plan.md b/.scd/plans/20261109-231834-d1-tokens-assets/plan.md new file mode 100644 index 0000000..ba25103 --- /dev/null +++ b/.scd/plans/20261109-231834-d1-tokens-assets/plan.md @@ -0,0 +1,14 @@ +--- +status: approved +version: 1 +created_at: 2026-11-09T23:18:34+08:00 +updated_at: 2026-11-09T23:18:34+08:00 +recorded_timezone: Asia/Shanghai +--- + +# 任务索引 + +- 任务与Issue:Delivery Issue #123(design-tokens-assets),Initiative #122 图版本 2 +- 所需文档及版本:requirements.md v1、implementation.md v1、decisions.md v1 +- 基线来源:main 同步后 HEAD;Initiative #122 确认摘要与 Issue #123 契约 +- 批准与开工事件:decisions.md DEC-1(Initiative 项目确认 + 用户"全部完成 scdexcute"执行授权) diff --git a/.scd/plans/20261109-231834-d1-tokens-assets/requirements.md b/.scd/plans/20261109-231834-d1-tokens-assets/requirements.md new file mode 100644 index 0000000..64d152d --- /dev/null +++ b/.scd/plans/20261109-231834-d1-tokens-assets/requirements.md @@ -0,0 +1,17 @@ +--- +status: approved +version: 1 +created_at: 2026-11-09T23:18:34+08:00 +updated_at: 2026-11-09T23:18:34+08:00 +recorded_timezone: Asia/Shanghai +--- + +# 需求(来自 Issue #123 契约,APPROVED) + +- data/tokens/ 收录 plugin87 14 个 DTCG 令牌 JSON;data/components/ 收录 11 份组件规范 +- 建立 data/THIRD-PARTY-NOTICES.md(来源/许可/改动),本节点先写 tokens/components 两节 +- tests/chinese-skill-payload.test.mjs 排除 skills/*/data/,authored 计数保持精确 +- references/design-tokens.md 挂接数据路径并补组件规范用法段(中文) +- 验收 A1:14 令牌 JSON 可解析含 $type/$value;11 组件规范完整 +- 验收 A2:全量测试绿 +- 验收 A3:隔离会话从 data/tokens 给出按钮语义色具体值 diff --git a/skills/scd-uiux/data/THIRD-PARTY-NOTICES.md b/skills/scd-uiux/data/THIRD-PARTY-NOTICES.md new file mode 100644 index 0000000..819a110 --- /dev/null +++ b/skills/scd-uiux/data/THIRD-PARTY-NOTICES.md @@ -0,0 +1,10 @@ +# 第三方数据来源与许可 + +本目录收录第三方开源项目的机器可读设计资产。来源、许可与改动记录如下;各上游项目保留其原始版权与许可。 + +## plugin87/ux-ui-agent-skills(MIT License) + +- 来源:(main 分支,按文件原样收录) +- 许可:MIT License,版权归属上游作者 +- 收录范围:`tokens/`(14 个 DTCG 令牌 JSON)、`components/`(11 份组件规范 Markdown) +- 改动:无(原样搬运);后续如有改动在各节记录 diff --git a/skills/scd-uiux/data/components/atoms.md b/skills/scd-uiux/data/components/atoms.md new file mode 100644 index 0000000..9d3af63 --- /dev/null +++ b/skills/scd-uiux/data/components/atoms.md @@ -0,0 +1,237 @@ +# Atoms + +The smallest, indivisible UI elements. Each atom maps directly to design tokens and has a single, focused responsibility. + +--- + +## 1. Button + +The primary interactive control for triggering actions. + +**Anatomy:** `[icon?] [label] [icon?]` within a pressable container. + +**Variants:** +| Variant | Use Case | Token Mapping | +|---------|----------|---------------| +| Primary | Main CTA, one per visible area | `component.button.primary-*` | +| Secondary | Supporting actions | `component.button.secondary-*` | +| Ghost | Tertiary, toolbar, inline actions | `component.button.ghost-*` | +| Destructive | Delete, remove, irreversible | `component.button.destructive-*` | +| Link | Navigation-styled as button | `semantic.text.link` + underline | + +**Sizes:** +| Size | Height | Padding | Font | Icon | +|------|--------|---------|------|------| +| sm | 32px | 12px × 8px | body-sm (14px) | 16px | +| md | 40px | 16px × 10px | body-base (16px) | 20px | +| lg | 48px | 24px × 12px | body-lg (18px) | 24px | + +**States (8):** +1. **Default**: resting state +2. **Hover**: cursor over; background shifts one shade +3. **Focus**: keyboard focus; apply `focus-ring` shadow token +4. **Active/Pressed**: mouse down; background shifts two shades +5. **Disabled**: `opacity: 0.5`, `cursor: not-allowed`, `pointer-events: none` +6. **Loading**: replace icon with spinner, add `aria-busy="true"`, disable interaction +7. **Error**: N/A for a standalone button; a submit button reflects form error via the form, not its own style +8. **Selected**: `interactive.selected-bg` + `aria-pressed`/`aria-selected`, for toggle/segmented buttons only + +**Accessibility:** +- Native `