create-yss-spec 2.2.7 → 2.2.8
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/README.md +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.agents/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.agents/skills/yss-design-system/SKILL.md +3 -1
- package/template/.agents/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.claude/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.claude/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.claude/skills/yss-design-system/SKILL.md +3 -1
- package/template/.claude/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.claude/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.claude/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.claude/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.claude/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
- package/template/.claude/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.codex/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.codex/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.codex/skills/yss-design-system/SKILL.md +3 -1
- package/template/.codex/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.cursor/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.cursor/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.cursor/skills/yss-design-system/SKILL.md +3 -1
- package/template/.cursor/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.hermes/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.hermes/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.hermes/skills/yss-design-system/SKILL.md +3 -1
- package/template/.hermes/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.hermes/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.hermes/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.hermes/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.hermes/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
- package/template/.hermes/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.pi/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.pi/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.pi/skills/yss-design-system/SKILL.md +3 -1
- package/template/.pi/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.qoder/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.qoder/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.qoder/skills/yss-design-system/SKILL.md +3 -1
- package/template/.qoder/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.qoder/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.qoder/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.qoder/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.qoder/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
- package/template/.qoder/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.trae/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.trae/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.trae/skills/yss-design-system/SKILL.md +3 -1
- package/template/.trae/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +4 -0
- package/template/.trae/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.trae/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.trae/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.trae/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
- package/template/.trae/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/AGENTS.md +4 -4
- package/template/README.md +10 -11
- package/template/__yss_dotfile__.gitignore +1 -0
- package/template/docs/agents/skills-maintenance.md +2 -2
- package/template/docs/api/templates/openapi-draft-review-checklist.md +2 -2
- package/template/docs/design/README.md +2 -2
- package/template/docs/design/design.md +48 -9
- package/template/docs/design/templates/interaction-spec-template.md +2 -2
- package/template/docs/design/templates/prototype-confirmation-template.md +1 -1
- package/template/docs/design/templates/prototype-evidence-template.yaml +52 -10
- package/template/docs/process/harness-process-tailoring.md +5 -5
- package/template/docs/process/template-engineering-overview.md +2 -2
- package/template/docs/process/template-verification-profiles.yaml +8 -1
- package/template/docs/process/templates/maintenance-checkpoint-template.yaml +3 -12
- package/template/docs/templates/requirement-freeze-template.md +1 -1
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +961 -0
- package/template/scripts/lib/maintenance-intensity.mjs +24 -10
- package/template/scripts/lib/skill-governance.mjs +19 -0
- package/template/scripts/node-verify-lifecycle-registry.mjs +1 -1
- package/template/scripts/verify-template-verification-scenarios +5 -0
- package/template/scripts/verify-yss-prototype-contract-scenarios +2 -0
- package/template/skills-lock.json +8 -8
- package/template.snapshot.json +4 -4
- package/template/docs/user-guide/templates//347/224/250/346/210/267/346/211/213/345/206/214/346/250/241/346/235/277.md +0 -53
- package/template/docs/user-guide//344/272/247/345/223/201/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201.md +0 -223
- package/template/docs/user-guide//344/272/247/345/223/201/347/240/224/345/217/221/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -1115
- package/template/docs/user-guide//345/244/226/351/203/250/345/221/275/344/273/244/350/241/214/345/267/245/345/205/267/345/256/236/350/267/265/346/214/207/345/215/227.md +0 -117
- package/template/docs/user-guide//347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -584
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +0 -31
- package/template/docs/user-guide//350/247/204/346/240/274/344/270/216/344/273/273/345/212/241/350/277/201/347/247/273/346/214/207/345/215/227.md +0 -44
- package/template/docs/user-guide//351/234/200/346/261/202/346/276/204/346/270/205/346/214/207/345/215/227.md +0 -230
- package/template/docs/user-guide//351/234/200/346/261/202/346/276/204/346/270/205/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -275
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 来源与定位
|
|
4
4
|
|
|
5
|
-
本文件基于本地设计系统包 `/Users/zhudaoming/Downloads/Product-Design-System` 首次分析整理,并在后续用项目 Ant Design 5 Less / `:root` CSS
|
|
5
|
+
本文件基于本地设计系统包 `/Users/zhudaoming/Downloads/Product-Design-System` 首次分析整理,并在后续用项目 Ant Design 5 Less / `:root` CSS 变量覆盖默认亮色主题。紧凑密度、间距和容器规格同时参考 `/Users/zhudaoming/Projects/demo/yss-meta/apps/frontend/metadata-platform/packages/src/styles` 的实际实现。自本文件落地后,项目内设计系统的权威来源为 `docs/design/design.md` 与 `docs/design/tokens/*`;外部目录只作为历史输入或实现样本,不作为后续工程依赖,也不作为实现语言。
|
|
6
6
|
|
|
7
7
|
关键来源:
|
|
8
8
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| 历史 `Product-Design-System` 包 | 首次引入 Ant Design 企业级语义、状态矩阵和验收习惯 | 保留原则、组件规则和审查清单 |
|
|
12
12
|
| 项目 Ant Design 5 Less / `:root` 变量 | 默认亮色主题、运行时切换别名、色板与布局 token | **默认主题权威**;冲突时以 `:root` 为准 |
|
|
13
|
+
| `yss-meta` 的 `packages/src/styles` | 已落地的紧凑间距、Card 圆角、CSS 变量桥接和客户主题案例 | 只提取稳定语义;utility class、客户覆盖和兼容补丁不进入默认规范 |
|
|
13
14
|
| `docs/design/tokens/tokens.default.json` | 默认亮色主题派生 token | 作为实现 token 基线 |
|
|
14
15
|
| `docs/design/tokens/tokens.dark.json` | 暗色主题派生 token | 暗色仍走 `darkAlgorithm`;本轮未按新 seed 重派生完整暗色色板 |
|
|
15
16
|
| `docs/design/tokens/tokens.compact.json` | 紧凑密度主题派生 token | 共享亮色 seed,紧凑高度算法保持现状 |
|
|
@@ -42,6 +43,8 @@
|
|
|
42
43
|
|
|
43
44
|
Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文件和 `docs/design/tokens/*` 为 source visual truth,而不是官方默认或历史 `#1677ff` / `Inter` / `8px` 品牌圆角。执行清单见 `.agents/skills/yss-design-system/references/design-qa-theme.md`。
|
|
44
45
|
|
|
46
|
+
版本边界固定为双轨:高保真原型以 React Ant Design v6 的 `design.md`、semantic token 和标准组件事实作为主题样式基线;生产实现使用 Vue 3、YSS UI 与目标实现仓 lockfile 中的 Ant Design Vue 4.x API。两者版本号不同不是冲突。原型到生产只迁移视觉角色、项目 Token、状态和验收行为,禁止迁移 React hook、props、JSX、静态 API 或事件模型。
|
|
47
|
+
|
|
45
48
|
## 设计原则
|
|
46
49
|
|
|
47
50
|
本项目采用该设计系统时,优先遵循四个原则:
|
|
@@ -156,6 +159,23 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
156
159
|
- 表单、筛选区、工具栏、表格和详情页应优先使用密集但有节奏的布局。
|
|
157
160
|
- 不使用任意 magic number;如确需新增尺寸,应先判断是否要扩展 token。
|
|
158
161
|
|
|
162
|
+
### 紧凑密度(默认原型规格)
|
|
163
|
+
|
|
164
|
+
高保真原型和中后台数据密集页面默认使用紧凑密度。紧凑密度不是把所有间距机械缩小,而是使用 `docs/design/tokens/tokens.compact.json` 和下表控制页面节奏;没有明确的展示型或触屏场景时,不切回宽松密度。
|
|
165
|
+
|
|
166
|
+
| 场景 | Padding | Margin / Gap | 说明 |
|
|
167
|
+
| --- | --- | --- | --- |
|
|
168
|
+
| 页面内容区 | 桌面端 `16px`;窄屏 `12px` | 一级区域 `16px` | 页面外缘由布局容器统一提供,子模块不得重复增加外边距 |
|
|
169
|
+
| Card | 默认 `16px`;表格 / 筛选密集 Card 可用 `12px` | Card 之间 `12px` | Card header 与 body 使用同一水平 padding;禁止 Card 套 Card 制造层级 |
|
|
170
|
+
| 筛选区 / 工具栏 | 垂直 `8px`、水平 `12px` | 控件间 `8px`;与主体 `12px` | 优先单行排列,空间不足时按字段组换行,不压缩到不可读 |
|
|
171
|
+
| 表单 | 区块 `16px` | 表单项纵向 `12px`;同行字段 `12px` | label 与控件的局部间距由组件 token 负责,不在页面重复覆盖 |
|
|
172
|
+
| 表格 / 列表 | 容器 `0` 或 `12px`,由是否独立成 Card 决定 | 工具栏与表格 `8px` | 表格内部 cell padding 使用组件紧凑规格,不用页面 CSS 逐列覆盖 |
|
|
173
|
+
| Modal / Drawer | `16px` | 内容区块 `12px`;操作区 `8px` | 复杂多步流程不塞入 Modal,改用独立页面或 Drawer 分区 |
|
|
174
|
+
|
|
175
|
+
紧凑模式的基础 token 为:`sizeXXS=4`、`sizeXS=8`、`sizeSM=8`、`size=12`、`sizeMD=16`、`sizeLG=16`、`sizeXL=24`、`sizeXXL=32`;默认控件高度 `28px`,小号 `21px`,大号 `35px`。业务页面只消费这些语义层级,不复制外部样例中的 `.m-*` / `.p-*` utility class。
|
|
176
|
+
|
|
177
|
+
Margin 使用规则:组件自身默认不声明外部 margin,兄弟元素之间优先由父级 `gap` 管理;只有文档流语义或无法使用布局容器时才使用 margin,并仍限定在 `4/8/12/16/24/32px` 阶梯内。禁止用负 margin 修补布局。
|
|
178
|
+
|
|
159
179
|
### 布局 token
|
|
160
180
|
|
|
161
181
|
| Token | 值 | 用途 |
|
|
@@ -179,9 +199,9 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
179
199
|
| `borderRadiusXS` | 2 | 极小元素 |
|
|
180
200
|
| `borderRadiusSM` | 4 | 小标签、小控件 |
|
|
181
201
|
| `borderRadius` | 6 | 默认控件圆角 |
|
|
182
|
-
| `borderRadiusLG` | 8 |
|
|
202
|
+
| `borderRadiusLG` | 8 | Card、大容器 / 浮层 |
|
|
183
203
|
|
|
184
|
-
保持“控件圆角小于或等于容器圆角”:默认控件 `6px`,小控件 `4px
|
|
204
|
+
保持“控件圆角小于或等于容器圆角”:默认控件 `6px`,小控件 `4px`,Card 与普通容器统一 `8px`。外部实现中的 `12px` panel 圆角属于局部产品扩展,不作为紧凑型默认值;确需使用时必须有明确层级语义,不能让同一页面的 Card 在 `8px`、`12px` 间任意混用。实现时以 `docs/design/tokens/tokens.compact.json` 为紧凑密度基线。
|
|
185
205
|
|
|
186
206
|
### 动效
|
|
187
207
|
|
|
@@ -204,8 +224,8 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
204
224
|
| --- | --- |
|
|
205
225
|
| Button Primary | 每个决策区域只保留一个主按钮,表达最重要动作 |
|
|
206
226
|
| Button Default | 次级动作默认使用描边 / 默认按钮,不与主操作争夺注意力 |
|
|
207
|
-
| Input / Select |
|
|
208
|
-
| Card |
|
|
227
|
+
| Input / Select | 紧凑模式默认高度 28px,focus 使用主色边框和可见焦点反馈 |
|
|
228
|
+
| Card | 用作真实内容容器,默认白底、`8px` 圆角、`16px` 内边距和 `12px` 外部 gap;避免卡片套卡片 |
|
|
209
229
|
| Modal | 用于阻断式决策或关键表单,不承载复杂多页流程 |
|
|
210
230
|
| Menu | 选中态使用淡蓝背景 + 主色文本,保证导航位置明确 |
|
|
211
231
|
| Tabs | 激活态使用主色文本 + 2px 下划线,不使用背景填充 |
|
|
@@ -226,6 +246,25 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
226
246
|
- 避免大面积渐变、装饰插画、夸张 hero、过多卡片化包装和单色系视觉堆叠。
|
|
227
247
|
- 权限不足、只读、空数据、加载中、校验失败、冲突、提交成功等状态必须在设计阶段明确。
|
|
228
248
|
|
|
249
|
+
## 高保真原型交付规格
|
|
250
|
+
|
|
251
|
+
高保真原型的主产物是可在浏览器运行和复验的 HTML,而不是截图、设计说明或生产前端代码。默认入口固定为 `docs/.scratch/<feature>/design/prototypes/index.html`;关联 CSS、JavaScript、字体和本地资源应与入口一起存放在该目录内,保持相对路径可移植。
|
|
252
|
+
|
|
253
|
+
- HTML 必须呈现真实页面密度、Card、表单、筛选、表格、弹层和状态反馈;不得只输出静态画布或图片热区。
|
|
254
|
+
- 默认启用本文件定义的紧凑密度:页面 padding、区域 gap、Card `8px` 圆角、Card padding 和 `28px` 控件高度必须可在浏览器计算样式中复核。
|
|
255
|
+
- 至少覆盖主流程、一个 loading / empty 状态,以及一个 error / no-permission / conflict 状态;主操作必须产生可见反馈。
|
|
256
|
+
- HTML 是评审与确认主载体;截图只作为指定视口和指定状态的验证证据,不能替代 HTML。
|
|
257
|
+
- 原型可以使用构建工具生成,但交付目录必须提供稳定的 `index.html` 入口。依赖开发服务器时,证据中必须记录启动命令、实际端口和版本;不得只交付无法独立定位入口的源码目录。
|
|
258
|
+
- 标准组件存在 Ant Design 实现时,React 原型必须精确锁定与 CLI 查询一致的 `antd@6.x`,使用 pnpm lockfile,并通过 `ConfigProvider` 消费由 `docs/design/tokens/theme.json` 转换出的可执行 ThemeConfig。生产映射仍以 YSS UI / Ant Design Vue 4.x lockfile 为准。
|
|
259
|
+
- Design QA、浏览器验证和视觉目标必须使用同一视口与同一状态;默认 desktop `1440×900`、mobile `390×844`,按实际影响追加其他视口。
|
|
260
|
+
- 原型仍须通过 `prototype-review`、AntD CLI 事实核对和浏览器验证;HTML 存在不代表 `gate.prototype-reviewed`、`gate.prototype-verified` 或 `gate.user-confirmation` 已通过。
|
|
261
|
+
|
|
262
|
+
### 无障碍覆盖
|
|
263
|
+
|
|
264
|
+
品牌 Seed `#3371ff` 保持项目身份,不等于每个组件状态都必须直接使用该填充。普通文本或控件状态不满足 WCAG 2.2 AA 时,优先通过组件 Token 调整实际填充色或文字色,并同时验证 default、hover、active、disabled 与 focus;不得用单页特例色绕过主题层。
|
|
265
|
+
|
|
266
|
+
原型证据至少覆盖对比度、键盘导航、焦点顺序与可见焦点、语义标签和 Dialog 焦点管理、200% zoom、`prefers-reduced-motion`、目标尺寸及自动化扫描。组件库默认能力不能替代对真实页面 DOM 与交互的验证。
|
|
267
|
+
|
|
229
268
|
## 响应式验收矩阵
|
|
230
269
|
|
|
231
270
|
来源包要求实现时覆盖以下视口。后续 UI 原型、前端实现和截图验收应至少抽取这些尺寸中的核心断点:
|
|
@@ -259,7 +298,7 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
259
298
|
- 组件样式优先通过 Ant Design token、component token、CSS variables 或主题算法表达。
|
|
260
299
|
- 消息、通知、Modal 静态方法应使用 `App`、hook API 或 context holder,避免主题上下文丢失。
|
|
261
300
|
- 暗色模式使用 `darkAlgorithm` 或 `docs/design/tokens/variables.dark.css`,不要手工反转颜色。本轮只同步了暗色的字体栈和圆角 seed;完整暗色色板仍是历史算法结果,启用暗色前应再派生一次。
|
|
262
|
-
-
|
|
301
|
+
- 紧凑模式默认使用 `compactAlgorithm` 或 `docs/design/tokens/tokens.compact.json`,不要逐组件压缩高度;高保真 HTML 必须按紧凑 token 验收实际 padding、gap、Card 圆角和控件高度。
|
|
263
302
|
|
|
264
303
|
如果前端不是 Ant Design:
|
|
265
304
|
|
|
@@ -286,13 +325,13 @@ Codex `$design-qa` 的 Colors/tokens 与 Fonts/typography 对照必须以本文
|
|
|
286
325
|
- 将 `docs/design/tokens/theme.json` 接入前端工程主题配置。
|
|
287
326
|
- 将 `docs/design/tokens/variables.css` 中的 `--brand-*` 与运行时别名纳入项目 token 管理。
|
|
288
327
|
- 如果项目启用暗色模式,用 `darkAlgorithm` 按新 seed 重派生 `docs/design/tokens/tokens.dark.json`,并补充截图验收。
|
|
289
|
-
-
|
|
328
|
+
- 将高保真 HTML 原型模板默认接入 `docs/design/tokens/tokens.compact.json`,并在浏览器证据中记录实际计算后的 padding、gap、Card 圆角和控件高度。
|
|
290
329
|
|
|
291
330
|
## Ant Design v6 原型补充基线
|
|
292
331
|
|
|
293
|
-
|
|
332
|
+
本节根据官方 `https://ant.design/design.md` 与本轮固定目标版本的 `antd design.md --format json` 提炼,用于高保真原型和后续前端实现,不替代项目 token,也不提供 Ant Design Vue API。
|
|
294
333
|
|
|
295
334
|
- 先按 `bg-layout`、`bg-container`、`bg-elevated`、文本、边框、状态、圆角和阴影等 semantic token 角色设计,再映射到 `ConfigProvider`、组件 token 或 CSS variables;不得用页面局部色值替代主题层。
|
|
296
|
-
- 默认亮色使用 `theme.defaultAlgorithm
|
|
335
|
+
- 默认亮色使用 `theme.defaultAlgorithm`;高保真原型默认叠加紧凑密度 algorithm,暗色和紧凑密度均通过 theme algorithm 切换,禁止手工反色或逐控件压缩。
|
|
297
336
|
- 每个决策区域只保留一个 single primary action。保存、提交、审批、发布、导出和重试等动作必须提供 interaction feedback;不可逆或高风险动作使用确认弹窗。
|
|
298
337
|
- 对实际字号、图标和背景复核 accessibility contrast。默认 token 不足时,通过种子 token 或组件 token 调整,不引入单页特例色。
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| Discovery | `docs/.scratch/<feature>/discovery/<feature>-discovery.md` | 可选 |
|
|
13
13
|
| 原型阶段合同 / Product Design 路由 | `yss-prototype-stage -> product-design:index -> <focused skill>` | 必需;记录 `$get-context`、`$ideate`、`$prototype`、`$image-to-code` 或 `$url-to-code` |
|
|
14
14
|
| 原型 / 线框图 | `<链接或导出图片路径>` | Excalidraw / Figma / Penpot / tldraw / Axure / Markdown |
|
|
15
|
-
| 高保真 HTML 原型 | `docs/.scratch/<feature>/design/prototypes/index.html` |
|
|
15
|
+
| 高保真 HTML 原型 | `docs/.scratch/<feature>/design/prototypes/index.html` | 低保真原型评审通过后补齐;主题/视觉标准必须为 Ant Design v6,标准 React 组件锁定 antd@6,生产映射为 YSS UI + Ant Design Vue 4.x;产出后必须获得用户确认 |
|
|
16
16
|
| 原型验证清单 | `docs/.scratch/<feature>/verification/prototype-evidence.yaml` | 记录实际 CLI / AntD 版本、CLI JSON 输出、浏览器验证和阻塞项 |
|
|
17
17
|
| 现有 API 草案 | `docs/.scratch/<feature>/api/<feature>.yaml` | 可选;通常应先完成产品设计和 Spec 校准 |
|
|
18
18
|
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
- loading、empty、error、no-permission、readonly、conflict、dirty-form 状态已展示,或明确不适用。
|
|
106
106
|
- 每个表格列、筛选条件、表单字段、抽屉、弹窗和按钮都有数据来源或契约反推说明。
|
|
107
107
|
- 设计可以拆成独立可演示的垂直切片。
|
|
108
|
-
- 低保真原型评审通过后,高保真 HTML 原型使用 Ant Design v6
|
|
108
|
+
- 低保真原型评审通过后,高保真 HTML 原型使用 Ant Design v6 主题/视觉标准覆盖主流程、关键状态和响应式断点,并记录到生产 YSS UI/Ant Design Vue 4.x 的语义映射。
|
|
109
109
|
- 原型产出前已使用 `antd` CLI 查询设计语言、组件 API、demo、token 和 semantic 信息;原型产出后已在 `prototype-evidence.yaml` 记录实际版本、CLI 与浏览器验证证据。
|
|
110
110
|
|
|
111
111
|
## 9. 决策与未决问题
|
|
@@ -1,27 +1,53 @@
|
|
|
1
1
|
# 复制到 docs/.scratch/<feature>/verification/prototype-evidence.yaml。
|
|
2
|
-
#
|
|
3
|
-
schema_version:
|
|
2
|
+
# schema v1 只读兼容;关闭 gate.prototype-verified 前必须迁移到本 schema v2。
|
|
3
|
+
schema_version: 2
|
|
4
4
|
feature: <feature>
|
|
5
5
|
prototype_ref: docs/.scratch/<feature>/design/prototypes/index.html
|
|
6
|
+
prototype_stack:
|
|
7
|
+
framework: react
|
|
8
|
+
package_manager: pnpm
|
|
9
|
+
package_manifest_ref: docs/.scratch/<feature>/design/prototypes/package.json
|
|
10
|
+
lockfile_ref: docs/.scratch/<feature>/design/prototypes/pnpm-lock.yaml
|
|
11
|
+
source_entry_ref: docs/.scratch/<feature>/design/prototypes/src/App.jsx
|
|
12
|
+
build_entry_ref: docs/.scratch/<feature>/design/prototypes/dist/index.html
|
|
13
|
+
build_command: pnpm build
|
|
14
|
+
build_result: pending
|
|
15
|
+
actual_antd_version: <exact-6.x-version-from-lockfile>
|
|
6
16
|
design_baseline:
|
|
17
|
+
design_standard: ant-design-v6
|
|
7
18
|
project_design_ref: docs/design/design.md
|
|
8
|
-
project_token_refs:
|
|
19
|
+
project_token_refs:
|
|
20
|
+
- docs/design/tokens/theme.json
|
|
21
|
+
- docs/design/tokens/tokens.compact.json
|
|
9
22
|
upstream_design_md_source: https://ant.design/design.md
|
|
10
23
|
upstream_design_md_record_ref: <path-to-json-output-or-summary>
|
|
24
|
+
theme_adapter_ref: docs/.scratch/<feature>/design/prototypes/src/yss-theme.js
|
|
11
25
|
project_override_reviewed: false
|
|
12
26
|
theme_override:
|
|
13
27
|
color_primary: "#3371ff"
|
|
14
28
|
color_error: "#f5222d"
|
|
15
29
|
color_bg_layout: "#f0f2f5"
|
|
30
|
+
compact_control_height: 28
|
|
16
31
|
border_radius: 6
|
|
17
32
|
font_family: system-stack
|
|
18
33
|
recorded: false
|
|
19
|
-
note:
|
|
34
|
+
note: 官方当前同样使用系统字体和 6px 默认控件圆角;真实项目差异主要是品牌/状态色、页面背景和默认紧凑密度,不得误写为 Inter/8px 差异。
|
|
35
|
+
visual_semantic_mapping:
|
|
36
|
+
runtime_component_library: ant-design-vue-4.x
|
|
37
|
+
runtime_version_source: implementation-lockfile
|
|
38
|
+
components:
|
|
39
|
+
- semantic_role: <primary-action-or-other-role>
|
|
40
|
+
antd_v6_component: <React-AntD-component-used-by-prototype>
|
|
41
|
+
project_token_refs: [<token-name>]
|
|
42
|
+
yss_or_antdv_target: <YSS-or-AntDV-production-component>
|
|
43
|
+
state_mapping: [default, hover, active, disabled, loading]
|
|
44
|
+
react_only_api_not_copied: false
|
|
45
|
+
verification_ref: <same-state-screenshot-or-test-ref>
|
|
20
46
|
antd:
|
|
21
47
|
fact_skill: yss-antd-design
|
|
22
48
|
cli_command: antd
|
|
23
49
|
cli_version: <actual-cli-version>
|
|
24
|
-
target_antd_version: <
|
|
50
|
+
target_antd_version: <same-exact-6.x-version>
|
|
25
51
|
queries:
|
|
26
52
|
design_md: <path-to-json-output>
|
|
27
53
|
components:
|
|
@@ -30,9 +56,9 @@ antd:
|
|
|
30
56
|
demo_ref: <path-to-json-output>
|
|
31
57
|
token_ref: <path-to-json-output>
|
|
32
58
|
semantic_ref: <path-to-json-output>
|
|
33
|
-
lint_applicable:
|
|
34
|
-
lint_reason:
|
|
35
|
-
lint_ref: <path-to-json-output
|
|
59
|
+
lint_applicable: true
|
|
60
|
+
lint_reason: react-source
|
|
61
|
+
lint_ref: <path-to-json-output>
|
|
36
62
|
lint_passed: false
|
|
37
63
|
browser_verification:
|
|
38
64
|
executor: <browser-or-automation-name>
|
|
@@ -40,14 +66,30 @@ browser_verification:
|
|
|
40
66
|
prototype_digest: <sha256-or-version-ref>
|
|
41
67
|
viewports:
|
|
42
68
|
- name: desktop
|
|
43
|
-
size:
|
|
69
|
+
size: 1440x900
|
|
44
70
|
result: pending
|
|
45
71
|
- name: narrow-mobile
|
|
46
|
-
size:
|
|
72
|
+
size: 390x844
|
|
47
73
|
result: pending
|
|
48
74
|
main_flow_result: pending
|
|
49
75
|
failure_permission_or_conflict_result: pending
|
|
50
76
|
console_error_ref: <path-to-console-output-or-none>
|
|
77
|
+
design_qa:
|
|
78
|
+
report_ref: docs/.scratch/<feature>/verification/design-qa.md
|
|
79
|
+
result: pending
|
|
80
|
+
accessibility_verification:
|
|
81
|
+
contrast_results_ref: <path-to-default-hover-active-disabled-focus-results>
|
|
82
|
+
keyboard_navigation_result: pending
|
|
83
|
+
focus_visible_and_order_result: pending
|
|
84
|
+
semantic_label_dialog_result: pending
|
|
85
|
+
zoom_200_result: pending
|
|
86
|
+
reduced_motion_result: pending
|
|
87
|
+
target_size_result: pending
|
|
88
|
+
automated_scan:
|
|
89
|
+
tool: <tool-or-manual>
|
|
90
|
+
version: <actual-version-or-not-applicable>
|
|
91
|
+
result: pending
|
|
92
|
+
ref: <path-to-result-or-manual-check>
|
|
51
93
|
review:
|
|
52
94
|
prototype_review_ref: docs/.scratch/<feature>/design/<feature>-prototype-review.md
|
|
53
95
|
result: pending
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
|---|---|---|---|
|
|
36
36
|
| L1 | `maintenance-intensity.yaml` 的 `levels.L1.triggers` | 至少一项与变更直接相关的实际检查 | `self-check` 或显式 `human-checkpoint` |
|
|
37
37
|
| L2 | `maintenance-intensity.yaml` 的 `levels.L2.triggers`,或该策略的 `default_level` | 修改前可失败的最小反例,以及本轮 fresh verification | 一名非实施者执行 `focused-independent` 聚焦审查;结论可内联 checkpoint |
|
|
38
|
-
| L3 | `maintenance-intensity.yaml` 的 `levels.L3.triggers` |
|
|
38
|
+
| L3 | `maintenance-intensity.yaml` 的 `levels.L3.triggers` | 维护者自检与本轮 fresh verification;正式发布另执行一次完整 `scripts/verify-template` | 日常不要求独立审查;发布证据由维护者提供 |
|
|
39
39
|
|
|
40
40
|
判定规则:
|
|
41
41
|
|
|
42
42
|
1. 等级只由 `maintenance-intensity.yaml` 计算;未给出 trigger 时使用该策略的 `default_level`,未知 trigger 必须更新策略后才可验证。
|
|
43
43
|
2. 实施者可先分级,不要求 L1/L2 预批准;发现新影响时立即更新 `escalation`、重新分级并补齐证据。
|
|
44
44
|
3. 发布、合并或阶段完成时按整体候选重新判定;不得把共同改变整体语义的修改拆成多个 L1/L2 规避 L3。
|
|
45
|
-
4. RED 用于证明行为差异。L1 不人为构造失败;L2 可使用已有失败、最小 fixture
|
|
46
|
-
5.
|
|
45
|
+
4. RED 用于证明行为差异。L1 不人为构造失败;L2 可使用已有失败、最小 fixture 或现有测试修改前失败;L3 不再强制构造完整 RED/GREEN/REFACTOR/压力场景,记录维护者自检和 fresh verification 即可。
|
|
46
|
+
5. 模板正式发布仍执行一次完整 `scripts/verify-template`,但不因 L3 额外冻结候选或派发正式独立审查。
|
|
47
47
|
6. 模板维护与产品切片使用同一 finding 闭环:`violation` / 机器检查失败 / 适用行空白由实施者修复后重新验证并按本表强度复审;`drift` / `new_impacts` 升级影响面并重新分级,禁止在旧合同或旧 checkpoint 上继续编码。审查者不得写实现。未命中的条件项才 `not-applicable`;命中后不得豁免。
|
|
48
48
|
|
|
49
49
|
模板维护默认停在 `implementation-ready`,不自动冻结候选或派发审查。需要独立审查时显式提升到 `review-ready`;完成独立审查和最终完整门禁后才能成为 `release-ready`。三个核验入口由 `docs/process/template-verification-profiles.yaml` 统一定义:
|
|
@@ -64,7 +64,7 @@ verification_evidence:
|
|
|
64
64
|
- kind: relevant-check | counterexample | red | green | refactor | pressure-scenario | fresh-verification | focused-independent-review | formal-independent-review
|
|
65
65
|
command: <本轮实际命令或可读取证据引用>
|
|
66
66
|
result: pass
|
|
67
|
-
review_mode: self-check | human-checkpoint | focused-independent | formal-independent # L2
|
|
67
|
+
review_mode: self-check | human-checkpoint | focused-independent | formal-independent # L2 需聚焦审查证据;L3 使用 self-check,历史 formal 记录只读兼容
|
|
68
68
|
escalation: none | <升级原因和原等级>
|
|
69
69
|
target_state: implementation-ready | review-ready | release-ready
|
|
70
70
|
current_state: implementation-ready | review-ready | release-ready | needs-human
|
|
@@ -81,4 +81,4 @@ Worktree 候选使用 `scripts/capture-maintenance-candidate --output <目录>`
|
|
|
81
81
|
|
|
82
82
|
固定远程模板输入可使用 `scripts/cache-template-commit --repository <remote-url> --commit <40位commit>`。缓存键仅由 URL 与 commit 构成,每次命中仍复核 metadata 和 Git object hash;缓存目录不进入 Git 或正式证据。
|
|
83
83
|
|
|
84
|
-
`focused-independent-review` 与 `formal-independent-review` 的 `command` 必须引用可读取的审查结论。L3
|
|
84
|
+
`focused-independent-review` 与 `formal-independent-review` 的 `command` 必须引用可读取的审查结论。L3 日常新记录使用 checkpoint 的 `self-check` 证据,不创建独立审查记录;历史 L3 正式记录继续使用 `docs/process/schemas/maintenance-review-record.schema.json` 并只读兼容,仍须带 `legacy_formal_review: true`、审查身份和明确通过结论。审查请求、实施者自述、否定裁决、伪造或非规范候选流、无效任务包、未关闭 findings 或 symlink 越界证据都会被拒绝。可用 `scripts/verify-maintenance-review-record` 单独校验历史记录。
|
|
@@ -70,10 +70,10 @@ YSS 模板工程是一套可版本化的研发治理系统。它用仓库身份
|
|
|
70
70
|
2. **更新权威资产**:修改对应的单一事实来源,避免在说明文档中复制规则。
|
|
71
71
|
3. **生成投影**:涉及 skills 时同步 Agent roots 和 `skills-lock.json`;涉及生命周期结构时同步派生视图;涉及实例分发时构建固定 commit 的 CLI 快照。
|
|
72
72
|
4. **Fresh verification**:实现内循环执行 `scripts/verify-template-fast` 并默认停在 `implementation-ready`;准备审查时执行 candidate 核验和首次完整 `scripts/verify-template`,跨仓 CLI 还要执行固定 commit 的集成测试和打包校验。
|
|
73
|
-
5.
|
|
73
|
+
5. **审查与发布**:L2 按需使用聚焦独立审查;L3 日常记录维护者自检,不冻结候选、不派发正式独立审查。正式发布前仍执行一次完整 `scripts/verify-template`。
|
|
74
74
|
6. **发布与回滚**:先发布或提交子仓,再更新父仓 gitlink;跨仓版本、验证命令、发布顺序和回滚点必须可以重建。
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
完成标准:当前强度要求的自检 / 审查证据通过,跨仓固定引用闭合,正式发布前完整 `scripts/verify-template` 通过,并且不存在未处理的 `violation`、`drift` 或 `new_impacts`。
|
|
77
77
|
|
|
78
78
|
## 8. 常用入口
|
|
79
79
|
|
|
@@ -61,6 +61,10 @@ required_files:
|
|
|
61
61
|
- .agents/skills/yss-tactical-design/references/output-template.md
|
|
62
62
|
- .agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs
|
|
63
63
|
- .agents/skills/yss-tactical-design/tests/run-scenarios.mjs
|
|
64
|
+
- .agents/skills/yss-prototype-stage/references/product-design-adapter.md
|
|
65
|
+
- .agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs
|
|
66
|
+
- .agents/skills/yss-prototype-stage/tests/run-scenarios.mjs
|
|
67
|
+
- docs/design/templates/prototype-evidence-template.yaml
|
|
64
68
|
- scripts/lib/template-verification.mjs
|
|
65
69
|
- scripts/lib/maintenance-intensity.mjs
|
|
66
70
|
- scripts/lib/maintenance-candidate.mjs
|
|
@@ -104,6 +108,7 @@ syntax_files:
|
|
|
104
108
|
- scripts/verify-matt-yss-integration-scenarios
|
|
105
109
|
- scripts/verify-prototype-backend-scaffold-scenarios
|
|
106
110
|
- scripts/verify-yss-router-scenarios
|
|
111
|
+
- scripts/verify-yss-prototype-contract-scenarios
|
|
107
112
|
- scripts/verify-openapi-yaml-first-scenarios
|
|
108
113
|
- scripts/verify-openapi-json-handoff-scenarios
|
|
109
114
|
- scripts/verify-repository-scope-scenarios
|
|
@@ -140,7 +145,7 @@ routing:
|
|
|
140
145
|
groups: [maintenance, collaboration]
|
|
141
146
|
- patterns: ["docs/templates/openapi-*", ".agents/skills/yss-openapi-*/**", ".agents/skills/yss-dto/**", "scripts/*openapi*", "scripts/*dto*"]
|
|
142
147
|
groups: [contracts]
|
|
143
|
-
- patterns: ["docs/process/implementation-*", "scripts/*repository*", "scripts/*implementation*", "scripts/*scaffold*"]
|
|
148
|
+
- patterns: ["docs/process/implementation-*", "scripts/*repository*", "scripts/*implementation*", "scripts/*scaffold*", "scripts/*prototype*"]
|
|
144
149
|
groups: [implementation]
|
|
145
150
|
- patterns: [".template-source/**", "scripts/vendor/**"]
|
|
146
151
|
groups: [tooling]
|
|
@@ -206,6 +211,8 @@ groups:
|
|
|
206
211
|
- { run: "scripts/verify-matt-yss-integration-scenarios" }
|
|
207
212
|
- { run: "scripts/verify-yss-router-scenarios" }
|
|
208
213
|
- { run: "scripts/verify-yss-ui-scenarios" }
|
|
214
|
+
- { run: "scripts/verify-yss-prototype-contract-scenarios" }
|
|
215
|
+
- { run: "node .agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs validate-evidence docs/design/templates/prototype-evidence-template.yaml --allow-template" }
|
|
209
216
|
governance-release:
|
|
210
217
|
commands:
|
|
211
218
|
- { run: "scripts/verify-governance-release" }
|
|
@@ -4,22 +4,13 @@ classification_reason: <分级理由>
|
|
|
4
4
|
triggers: [core-validator]
|
|
5
5
|
changed_assets: [<路径或资产引用>]
|
|
6
6
|
verification_evidence:
|
|
7
|
-
- kind:
|
|
8
|
-
command:
|
|
9
|
-
result: pass
|
|
10
|
-
- kind: green
|
|
11
|
-
command: <修改后通过命令或证据>
|
|
12
|
-
result: pass
|
|
13
|
-
- kind: refactor
|
|
14
|
-
command: <重构后验证命令或证据>
|
|
15
|
-
result: pass
|
|
16
|
-
- kind: pressure-scenario
|
|
17
|
-
command: <压力场景命令或证据>
|
|
7
|
+
- kind: self-check
|
|
8
|
+
command: <维护者自检命令或证据>
|
|
18
9
|
result: pass
|
|
19
10
|
- kind: fresh-verification
|
|
20
11
|
command: scripts/verify-template-fast
|
|
21
12
|
result: pass
|
|
22
|
-
review_mode:
|
|
13
|
+
review_mode: self-check
|
|
23
14
|
escalation: none
|
|
24
15
|
target_state: implementation-ready
|
|
25
16
|
current_state: implementation-ready
|
|
@@ -17,7 +17,7 @@ owner: ai
|
|
|
17
17
|
| Spec 初稿 | | | |
|
|
18
18
|
| 产品总体设计 / 功能架构 | | | 必需 |
|
|
19
19
|
| 产品设计 / 交互说明 | | | |
|
|
20
|
-
| 高保真 HTML 原型 | `docs/.scratch/<feature>/design/prototypes/index.html` | | 有 UI 时必需;Ant Design v6 |
|
|
20
|
+
| 高保真 HTML 原型 | `docs/.scratch/<feature>/design/prototypes/index.html` | | 有 UI 时必需;Ant Design v6 主题/视觉标准 + schema v2 语义映射/浏览器/无障碍证据,生产 API 为 YSS UI + Ant Design Vue 4.x |
|
|
21
21
|
| Prototype Review | | | |
|
|
22
22
|
| CONTEXT 术语 | | | 业务术语须含 PascalCase `英文标识` |
|
|
23
23
|
|