@teamix-evo/skills 0.12.0 → 0.13.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.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/manifest.json +11 -28
  3. package/package.json +2 -2
  4. package/src/teamix-evo-code-opentrek/SKILL.md +13 -13
  5. package/src/teamix-evo-code-opentrek/api-layering.md +53 -44
  6. package/src/teamix-evo-code-opentrek/checklist.md +24 -24
  7. package/src/teamix-evo-code-opentrek/file-structure.md +55 -36
  8. package/src/teamix-evo-code-opentrek/forms-and-validation.md +17 -16
  9. package/src/teamix-evo-code-opentrek/reuse-first.md +6 -9
  10. package/src/teamix-evo-code-opentrek/testing.md +14 -14
  11. package/src/teamix-evo-code-uni-manager/SKILL.md +15 -15
  12. package/src/teamix-evo-code-uni-manager/api-layering.md +74 -58
  13. package/src/teamix-evo-code-uni-manager/checklist.md +28 -28
  14. package/src/teamix-evo-code-uni-manager/error-and-loading.md +2 -2
  15. package/src/teamix-evo-code-uni-manager/file-structure.md +77 -62
  16. package/src/teamix-evo-code-uni-manager/forms-and-validation.md +17 -15
  17. package/src/teamix-evo-code-uni-manager/reuse-first.md +7 -10
  18. package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +1 -1
  19. package/src/teamix-evo-code-uni-manager/testing.md +37 -37
  20. package/src/teamix-evo-design-opentrek/SKILL.md +41 -20
  21. package/src/teamix-evo-design-opentrek/boundaries.md +1 -1
  22. package/src/teamix-evo-design-opentrek/checklist.md +5 -5
  23. package/src/teamix-evo-design-opentrek/components.md +19 -19
  24. package/src/teamix-evo-design-opentrek/examples/standard-card-list.html +1 -1
  25. package/src/teamix-evo-design-opentrek/examples/standard-table-list.html +1 -1
  26. package/src/teamix-evo-design-opentrek/foundations.md +17 -17
  27. package/src/teamix-evo-design-opentrek/pages/dashboard-page/SKILL.md +18 -19
  28. package/src/teamix-evo-design-opentrek/pages/dashboard-page/patterns/dashboard-opentrek.md +6 -6
  29. package/src/teamix-evo-design-opentrek/pages/detail-page/SKILL.md +24 -25
  30. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/api-doc-detail.md +3 -7
  31. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/comparison-detail.md +3 -7
  32. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/monitor-detail.md +3 -7
  33. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/resource-detail.md +10 -10
  34. package/src/teamix-evo-design-opentrek/pages/form-page/SKILL.md +26 -27
  35. package/src/teamix-evo-design-opentrek/pages/list-page/SKILL.md +35 -36
  36. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/item-card-spec.md +41 -32
  37. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list-opentrek.md +10 -10
  38. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list.md +23 -23
  39. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list-opentrek.md +8 -8
  40. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list.md +8 -8
  41. package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +2 -2
  42. package/src/teamix-evo-design-opentrek/patterns/dashboard.md +1 -1
  43. package/src/teamix-evo-design-opentrek/patterns/detail-page.md +9 -9
  44. package/src/teamix-evo-design-opentrek/patterns/form-page.md +6 -6
  45. package/src/teamix-evo-design-opentrek/patterns/list-page.md +9 -9
  46. package/src/teamix-evo-design-opentrek/patterns/page-types.md +3 -3
  47. package/src/teamix-evo-design-opentrek/principles.md +541 -0
  48. package/src/teamix-evo-design-opentrek/rules/common-components.json +206 -76
  49. package/src/teamix-evo-design-opentrek/rules/component-specs.json +2 -2
  50. package/src/teamix-evo-design-opentrek/rules/design-tokens.css +223 -218
  51. package/src/teamix-evo-design-opentrek/rules/design-tokens.json +10 -32
  52. package/src/teamix-evo-design-opentrek/rules/page-frame.json +197 -193
  53. package/src/teamix-evo-design-opentrek/{generation-flow.md → workflow.md} +141 -22
  54. package/src/teamix-evo-design-uni-manager/SKILL.md +30 -6
  55. package/src/teamix-evo-design-uni-manager/boundaries.md +2 -2
  56. package/src/teamix-evo-design-uni-manager/brand.md +1 -1
  57. package/src/teamix-evo-design-uni-manager/checklist.md +2 -2
  58. package/src/teamix-evo-design-uni-manager/components.md +11 -11
  59. package/src/teamix-evo-design-uni-manager/foundations.md +7 -7
  60. package/src/teamix-evo-design-uni-manager/generation-flow.md +3 -3
  61. package/src/teamix-evo-manage/SKILL.md +111 -709
  62. package/src/teamix-evo-manage/init.md +98 -0
  63. package/src/teamix-evo-manage/migrate.md +100 -0
  64. package/src/teamix-evo-manage/rearchitect-capture-guide.md +174 -0
  65. package/src/teamix-evo-manage/rearchitect.md +373 -0
  66. package/src/teamix-evo-manage/update-component-staging.md +188 -0
  67. package/src/teamix-evo-manage/update-token-rename.md +126 -0
  68. package/src/teamix-evo-manage/update-token-treatment.md +116 -0
  69. package/src/teamix-evo-manage/update.md +213 -0
  70. package/src/teamix-evo-design-opentrek/brand.md +0 -154
  71. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/search-combo-spec.md +0 -194
  72. package/src/teamix-evo-design-opentrek/philosophy.md +0 -98
  73. package/src/teamix-evo-design-opentrek/rules/README.md +0 -39
  74. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AGENT RUNTIME.svg +0 -1
  75. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI GATEWAY.svg +0 -1
  76. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI STUDIO.svg +0 -1
  77. package/src/teamix-evo-design-opentrek/rules/_assets/OP_DEV-2.svg +0 -1
  78. package/src/teamix-evo-design-opentrek/rules/_assets/OP_LOGO.svg +0 -1
  79. package/src/teamix-evo-design-opentrek/rules/_assets/OP_OPS.svg +0 -1
  80. package/src/teamix-evo-design-opentrek/rules/layout-rules.json +0 -218
  81. package/src/teamix-evo-design-opentrek/rules/page-header-spec.md +0 -123
  82. package/src/teamix-evo-design-opentrek/rules/sidebar-spec.md +0 -217
  83. package/src/teamix-evo-upgrade/SKILL.md +0 -431
  84. /package/src/teamix-evo-design-opentrek/{rules/boundaries.rules.json → boundaries.json} +0 -0
@@ -270,18 +270,12 @@
270
270
  {
271
271
  "id": "terminal",
272
272
  "comment": "终端 / 代码块",
273
- "vars": [
274
- "--color-terminal",
275
- "--color-terminal-foreground"
276
- ]
273
+ "vars": ["--color-terminal", "--color-terminal-foreground"]
277
274
  },
278
275
  {
279
276
  "id": "font-family",
280
277
  "comment": "Font Family / 字体族(v7.8.4 新增)\nbody 必须使用 var(--font-sans),代码片段使用 var(--font-mono)\n禁止在页面中硬编码 font-family 堆栈",
281
- "vars": [
282
- "--font-sans",
283
- "--font-mono"
284
- ]
278
+ "vars": ["--font-sans", "--font-mono"]
285
279
  },
286
280
  {
287
281
  "id": "typography",
@@ -321,9 +315,7 @@
321
315
  {
322
316
  "id": "layout-frame",
323
317
  "comment": "Layout Frame Width",
324
- "vars": [
325
- "--layout-sidebar-width"
326
- ]
318
+ "vars": ["--layout-sidebar-width"]
327
319
  },
328
320
  {
329
321
  "id": "table-cell",
@@ -347,17 +339,12 @@
347
339
  {
348
340
  "id": "page-header",
349
341
  "comment": "Page Header",
350
- "vars": [
351
- "--page-header-height",
352
- "--breadcrumb-height"
353
- ]
342
+ "vars": ["--page-header-height", "--breadcrumb-height"]
354
343
  },
355
344
  {
356
345
  "id": "action-toolbar",
357
346
  "comment": "ActionToolbar",
358
- "vars": [
359
- "--action-toolbar-search-combo-gap"
360
- ]
347
+ "vars": ["--action-toolbar-search-combo-gap"]
361
348
  },
362
349
  {
363
350
  "id": "radius",
@@ -1919,11 +1906,7 @@
1919
1906
  },
1920
1907
  "columns": {
1921
1908
  "default": 2,
1922
- "options": [
1923
- 2,
1924
- 3,
1925
- 4
1926
- ],
1909
+ "options": [2, 3, 4],
1927
1910
  "multiColumnGap": "64px(列与列间的水平间距)",
1928
1911
  "responsive": {
1929
1912
  ">=1200px": "使用配置列数",
@@ -1984,7 +1967,7 @@
1984
1967
  "value": "1rem",
1985
1968
  "note": "16px",
1986
1969
  "name": "text-base",
1987
- "usage": "Sidebar 品牌区文字、小标题、卡片标题、区块标题",
1970
+ "usage": "小标题、卡片标题、区块标题",
1988
1971
  "weight": {
1989
1972
  "medium": "500",
1990
1973
  "black": "900 (仅 Sidebar 品牌区)"
@@ -1995,7 +1978,7 @@
1995
1978
  "value": "1.125rem",
1996
1979
  "note": "18px",
1997
1980
  "name": "text-lg",
1998
- "usage": "页面主标题(PageHeader)、概览统计大数字",
1981
+ "usage": "页面主标题、PageHeader 面包屑层级",
1999
1982
  "weight": {
2000
1983
  "medium": "500"
2001
1984
  }
@@ -2408,13 +2391,8 @@
2408
2391
  "collapsedState": {
2409
2392
  "padding": "12px 10px 16px",
2410
2393
  "justifyContent": "center",
2411
- "hidden": [
2412
- "username",
2413
- "moreButton"
2414
- ],
2415
- "visible": [
2416
- "avatar"
2417
- ],
2394
+ "hidden": ["username", "moreButton"],
2395
+ "visible": ["avatar"],
2418
2396
  "note": "收起态详细规范见 collapseBehavior.footer"
2419
2397
  }
2420
2398
  },
@@ -1,241 +1,245 @@
1
1
  {
2
- "version": "1.2",
3
- "description": "页面框架规范 — 定义所有页面类型的框架级属性(Sidebar含品牌区/Breadcrumb/返回按钮),子技能自动继承,无需重复声明。TopNavigation 已移除,品牌标识下沉至 Sidebar 顶部。",
2
+ "version": "2.0",
3
+ "description": "页面框架规范 v2.0 定义 OpenTrek 页面骨架层级、组件 API、页面模式与关键约束。基于 PageShell + OpSidebar + OpPageContainer 范式,子技能自动继承框架组件。",
4
+
5
+ "skeletonLayers": {
6
+ "description": "骨架分层定义 — 从外到内的组件嵌套层级",
7
+ "L0": { "component": "PageShell", "role": "全屏视口壳,管理 sidebar + content 布局拓扑", "props": ["sidebar", "children", "background"] },
8
+ "L1": { "component": "OpSidebar", "role": "品牌头 + 多段导航 + 贴底分组 + 用户区", "props": ["brand", "navSections", "bottomSections", "footer"] },
9
+ "L2": { "component": "OpPageContainer", "role": "灰底 + 大白卡容器,header 固顶 + children 内滚", "props": ["header", "children"] },
10
+ "L3": { "component": "PageHeader", "role": "页头:面包屑 / 标题 / 描述 / 操作按钮", "props": ["children"] },
11
+ "nestingOrder": "PageShell(background='muted') > [OpSidebar + SidebarInset] > OpPageContainer(header=PageHeader) > 业务内容"
12
+ },
13
+
4
14
  "frameLevels": {
5
15
  "L0": {
6
16
  "name": "无导航页",
7
- "topNavigation": false,
8
17
  "sidebar": false,
9
18
  "breadcrumb": false,
10
- "backButton": false,
11
19
  "layout": "SINGLE_COL",
12
- "pageTypes": [
13
- "ResultPage",
14
- "ExceptionPage",
15
- "WelcomePage"
16
- ],
17
- "description": "无全局导航、无侧边栏、无面包屑的独立页面"
20
+ "pageTypes": ["ResultPage", "ExceptionPage", "WelcomePage"],
21
+ "description": "无 Sidebar、无面包屑的独立页面。OpPageContainer 全宽渲染。"
18
22
  },
19
23
  "L1": {
20
24
  "name": "主页面",
21
- "topNavigation": false,
22
25
  "sidebar": true,
23
26
  "breadcrumb": false,
24
- "backButton": false,
25
- "layout": "TWO_COL | SINGLE_COL",
26
- "pageTypes": [
27
- "ListPage",
28
- "Dashboard",
29
- "OverviewPage",
30
- "WorkspacePage",
31
- "KanbanPage"
32
- ],
33
- "description": "Sidebar(含Logo+产品名),使用页头业务组件的标题基础组件模式。适用于 ListPage、Dashboard、OverviewPage。Sidebar 仅在 TWO_COL 布局时显示,SINGLE_COL 布局时 Sidebar 隐藏。"
27
+ "layout": "TWO_COL",
28
+ "pageTypes": ["ListPage", "Dashboard", "OverviewPage", "WorkspacePage", "KanbanPage"],
29
+ "description": "OpSidebar(含品牌区)+ OpPageContainer,PageHeader 使用标题模式(仅显示页面标题,无面包屑)。",
30
+ "headerMode": "title"
34
31
  },
35
32
  "L2": {
36
33
  "name": "子页面",
37
- "topNavigation": false,
38
34
  "sidebar": true,
39
35
  "breadcrumb": true,
40
- "backButton": false,
41
- "layout": "TWO_COL | SINGLE_COL",
42
- "pageTypes": [
43
- "DetailPage",
44
- "FormPage",
45
- "WizardPage"
46
- ],
47
- "description": "Sidebar(含Logo+产品名),使用页头业务组件的面包屑基础组件模式。面包屑父级项可点击返回上一级。适用于 DetailPage、FormPage、WizardPage。Sidebar 仅在 TWO_COL 布局时显示,SINGLE_COL 布局时 Sidebar 隐藏."
36
+ "layout": "TWO_COL",
37
+ "pageTypes": ["DetailPage", "FormPage", "WizardPage"],
38
+ "description": "OpSidebar(含品牌区)+ OpPageContainer,PageHeader 使用面包屑模式(父级可点击返回)。禁止同时展示标题组件。",
39
+ "headerMode": "breadcrumb"
48
40
  }
49
41
  },
50
- "pageAreaOrder": "Sidebar(Logo+Name) → PageContainer → ContentWrapper → Card(白卡容器) → [Breadcrumb + PageHeader] → [ActionToolbar] → [内容区] → [Pagination]",
42
+
43
+ "componentAPI": {
44
+ "description": "框架组件 TypeScript 接口定义,供 AI 生成代码时参照。",
45
+ "PageShell": {
46
+ "import": "@/components/page-shell",
47
+ "props": {
48
+ "sidebar": "ReactNode — 左侧 slot,通常传入 OpSidebar",
49
+ "children": "ReactNode — 主区内容,通常传入 SidebarInset > OpPageContainer",
50
+ "background": "'background' | 'muted' | 'card' | 'sidebar' | 'accent' — 默认 'background',OpenTrek 固定用 'muted'"
51
+ }
52
+ },
53
+ "OpSidebar": {
54
+ "import": "@/components/business/op-sidebar",
55
+ "props": {
56
+ "brand": "ReactNode — 品牌头(默认 OpenTrek logo)",
57
+ "brandCollapsed": "ReactNode — 折叠态品牌 icon",
58
+ "headerAction": "ReactNode — 品牌行右侧操作槽(如 SidebarTrigger)",
59
+ "navSections": "OpSidebarNavSection[] — 必填,主导航多段",
60
+ "bottomSections": "OpSidebarNavSection[] — 贴底分组(mt-auto 推至底部)",
61
+ "footer": "ReactNode — 底部 slot(用户区)",
62
+ "collapsible": "'icon' | 'offcanvas' | 'none' — 默认 'icon'",
63
+ "variant": "'sidebar' | 'floating' | 'inset' — 默认 'sidebar'"
64
+ },
65
+ "subTypes": {
66
+ "OpSidebarNavSection": "{ label?: string; items: OpSidebarNavItem[] }",
67
+ "OpSidebarNavItem": "{ id: string; title: string; icon?: ReactNode; href?: string; isActive?: boolean; badge?: ReactNode; children?: SubItem[]; popoverContent?: ReactNode }"
68
+ }
69
+ },
70
+ "OpPageContainer": {
71
+ "import": "@/components/business/op-page-container",
72
+ "props": {
73
+ "header": "ReactNode — 页头 slot,通常传入 <PageHeader>",
74
+ "children": "ReactNode — 主区内容(内滚区域)"
75
+ },
76
+ "renderStructure": "div.py-5.pr-5(无左padding) > div.rounded-2xl.bg-card.px-6.pt-5.pb-6 > [header(flex-shrink-0)] + [children(overflow-y-auto.-mx-6.px-6)]"
77
+ },
78
+ "PageHeader": {
79
+ "import": "@/components/page-header",
80
+ "subComponents": [
81
+ "PageHeader — 根容器 header.relative.flex.flex-col.gap-2",
82
+ "PageHeaderNav — 导航层(面包屑 + 右侧链接)",
83
+ "PageHeaderContent — 主内容区(左右双列)",
84
+ "PageHeaderHeading — 标题行(支持 goBack / onBack)",
85
+ "PageHeaderTitle — 标题文字(支持 tooltip)",
86
+ "PageHeaderDescription — 描述文字",
87
+ "PageHeaderActions — 操作按钮区",
88
+ "PageHeaderFooter — 底部区域"
89
+ ]
90
+ }
91
+ },
92
+
93
+ "pagePatterns": {
94
+ "description": "5 种标准页面使用范式,每种定义适用场景和组合骨架。",
95
+ "l1-title": {
96
+ "name": "L1 标题模式",
97
+ "applies": ["ListPage", "Dashboard", "OverviewPage", "WorkspacePage"],
98
+ "skeleton": "<OpPageContainer header={<PageHeader><PageHeaderContent><PageHeaderHeading><PageHeaderTitle>页面标题</PageHeaderTitle></PageHeaderHeading><PageHeaderActions>操作按钮</PageHeaderActions></PageHeaderContent></PageHeader>}>{Tabs? → 列表/卡片 → 分页}</OpPageContainer>"
99
+ },
100
+ "l2-breadcrumb-detail": {
101
+ "name": "L2 面包屑模式 — 详情页",
102
+ "applies": ["DetailPage"],
103
+ "skeleton": "<OpPageContainer header={<PageHeader><PageHeaderNav><Breadcrumb><BreadcrumbList><BreadcrumbItem><BreadcrumbLink>父级列表</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator/><BreadcrumbItem><BreadcrumbPage>当前资源名</BreadcrumbPage></BreadcrumbItem></BreadcrumbList></Breadcrumb></PageHeaderNav></PageHeader>}><OpDetailHeader>...</OpDetailHeader>{详情内容/Tabs}</OpPageContainer>",
104
+ "constraints": ["禁止同时展示 PageHeaderTitle", "OpDetailHeader 在 children 区域,不在 header slot"]
105
+ },
106
+ "l2-breadcrumb-form": {
107
+ "name": "L2 面包屑模式 — 表单页",
108
+ "applies": ["FormPage", "WizardPage"],
109
+ "skeleton": "<OpPageContainer header={<PageHeader><PageHeaderNav><Breadcrumb>父级 → 新建 XXX</Breadcrumb></PageHeaderNav></PageHeader>}>{Form 表单}</OpPageContainer>",
110
+ "constraints": ["禁止同时展示 PageHeaderTitle"]
111
+ },
112
+ "tabs-shell": {
113
+ "name": "Tabs 壳页面",
114
+ "applies": ["ListPage (多 Tab 入口)"],
115
+ "skeleton": "<OpPageContainer header={<PageHeader><PageHeaderContent><PageHeaderHeading><PageHeaderTitle>模块标题</PageHeaderTitle></PageHeaderHeading></PageHeaderContent></PageHeader>}><Tabs><TabsList>...</TabsList><TabsContent className='mt-4 flex-1'>...</TabsContent></Tabs></OpPageContainer>"
116
+ },
117
+ "fullscreen-editor": {
118
+ "name": "全屏编辑器页",
119
+ "applies": ["画布设计", "代码编辑"],
120
+ "skeleton": "<div className='h-screen w-screen'>{全屏编辑器内容}</div>",
121
+ "constraints": ["独立路由,不包裹 PageShell/OpSidebar/OpPageContainer"]
122
+ }
123
+ },
124
+
125
+ "detailHeader": {
126
+ "description": "详情页顶部信息区块 — OpDetailHeader 组合结构与视觉规范",
127
+ "component": "OpDetailHeader",
128
+ "import": "@/components/business/op-detail-header",
129
+ "structure": "OpDetailHeader(CSS Grid auto 1fr auto) > [AvatarIcon|AvatarLetter] + [Body(Title+Description)] + [Actions] + [Meta(col-span-full)]",
130
+ "visualSpec": {
131
+ "root": "CSS Grid: auto 1fr auto / items-start / gap-x-3 (12px)",
132
+ "avatar": "48x48, grid col 1, rounded-lg",
133
+ "title": "text-base (16px) / font-medium / text-foreground, 后缀 gap-2 可放 Tag",
134
+ "description": "text-xs / text-muted-foreground / mt-2 / line-clamp-2",
135
+ "actions": "grid col 3 / flex / gap-2",
136
+ "metaFlex": "col-span-full / text-xs / mt-4 / mb-6 / gap-x-20 (80px) / gap-y-3",
137
+ "metaGrid": "col-span-full / text-xs / mt-4 / mb-6 / grid-cols-4 / gap-y-3"
138
+ },
139
+ "metaLayoutSelection": {
140
+ "lte5items": "OpDetailHeaderMeta(固定间距 Flex)",
141
+ "gt5items": "OpDetailHeaderMetaGrid(Grid 均分)"
142
+ },
143
+ "avatarPresets": {
144
+ "AvatarLetter": "标识型实体(Agent/Skill)— 48x48 彩色方块 + 首字母 + 渐变高光",
145
+ "AvatarIcon": "工具型实体(评估器/评测集/报告)— 48x48 底色 + 图标"
146
+ }
147
+ },
148
+
149
+ "keyConstraints": [
150
+ { "id": "KC-1", "rule": "灰底白卡范式", "detail": "OpPageContainer 的 bg-card rounded-2xl 是 OpenTrek 产品决策,所有业务页面必须遵循" },
151
+ { "id": "KC-2", "rule": "无左 padding", "detail": "OpPageContainer 左侧不设 padding,由 sidebar 右边距自然形成间距" },
152
+ { "id": "KC-3", "rule": "header 固顶", "detail": "PageHeader 区域 flex-shrink-0,不随内容滚动" },
153
+ { "id": "KC-4", "rule": "children 内滚", "detail": "内容区 overflow-y-auto,负外边距 -mx-6 px-6 保持滚动条不侵入白卡边距" },
154
+ { "id": "KC-5", "rule": "面包屑层级互斥", "detail": "仅 L2 页面显示面包屑;L1 页面仅显示标题。两者禁止同时出现。" },
155
+ { "id": "KC-6", "rule": "sidebar 无右边框", "detail": "op 范式中 sidebar 直接贴 muted 灰底,不需要分割线" }
156
+ ],
157
+
51
158
  "pageSkeleton": {
52
- "description": "各框架级别的页面骨架图。仅展示框架组件占位,不包含业务内容区细节(内容区骨架见子技能 SKILL.md)。",
159
+ "description": "各框架级别的页面骨架图,使用实际组件名。",
53
160
  "L0": {
54
161
  "label": "无导航页",
55
- "ascii": "┌───────────────────────────────────┐\n│ PageContainer (全宽) │\n│ ContentWrapper │\n│ ┌─ Card(白卡容器) ──────────────┐ │\n│ │ [PageHeader] │ │\n│ │ [ActionToolbar] │ │\n│ │ [内容区] │ │\n│ │ [Pagination] │ │\n│ └───────────────────────────────┘ │\n└───────────────────────────────────┘",
56
- "annotation": "无 TopNavigation / Sidebar / Breadcrumb。适用于 ResultPage、ExceptionPage、WelcomePage。所有内容放在 Card 白卡容器内."
162
+ "ascii": "┌──────────────────────────────────────┐\n│ OpPageContainer (全宽, 无 Sidebar) │\n│ ┌─ bg-card rounded-2xl ──────────┐ │\n│ │ [PageHeader] │ │\n│ │ [ActionToolbar] │ │\n│ │ [内容区] │ │\n│ │ [Pagination] │ │\n│ └─────────────────────────────────┘ │\n└──────────────────────────────────────┘"
57
163
  },
58
164
  "L1": {
59
165
  "label": "主页面",
60
- "ascii": "┌────────┬──────────────────────────────────────┐\n│Sidebar PageContainer │\n│Logo │ ┌─ ContentWrapper ────────────────┐ │\n│+Name │ │ ┌─ Card(白卡容器) ───────────┐ │ │\n│(240px) │ │ │ [PageHeader: 标题组件] │ │ │\n│ │ │ │ [ActionToolbar] │ │ │\n│ │ │ │ [DataTable/CardGrid] │ │ │\n│ │ │ │ [Pagination] │ │ │\n│└────────────────────────────┘ │ │\n│ │ └─────────────────────────────────┘ │\n└────────┴──────────────────────────────────────┘",
61
- "annotation": "Sidebar(顶部Logo+产品名)+ PageHeader(标题基础组件模式,无返回能力)+ ContentWrapper + Card白卡容器。适用于 ListPage、Dashboard、OverviewPage。Sidebar 仅在 TWO_COL 布局时显示,SINGLE_COL 布局时 Sidebar 隐藏。"
166
+ "ascii": "┌─ PageShell(bg=muted) ────────────────────────────┐\n│ ┌─ OpSidebar ─┐ ┌─ SidebarInset ─────────────┐ │\n│ │ Brand │ │ ┌─ OpPageContainer ──────┐ │ │\n│ │ navSections │ │ │ PageHeader: 标题模式 │ │ │\n│ bottomSects │ │ │ [ActionToolbar] │ │ │\n│ footer │ │ │ [DataTable/CardGrid] │ │ │\n│ │ │ [Pagination] │ │ │\n│ └─────────────┘└────────────────────────┘ │ │\n│ └─────────────────────────────┘ │\n└───────────────────────────────────────────────────┘"
62
167
  },
63
168
  "L2": {
64
169
  "label": "子页面",
65
- "ascii": "┌────────┬──────────────────────────────────────┐\n│Sidebar PageContainer │\n│Logo │ ┌─ ContentWrapper ────────────────┐ │\n│+Name │ │ ┌─ Card(白卡容器) ───────────┐ │ │\n│(240px) │ │ │ [PageHeader: 面包屑组件] │ │ │\n│ │ │ │ [ActionToolbar] │ │ │\n│ │ │ │ [内容组件] │ │ │\n│ │ │ │ [Pagination] │ │ │\n│└────────────────────────────┘ │ │\n│ │ └─────────────────────────────────┘ │\n└────────┴──────────────────────────────────────┘",
66
- "annotation": "Sidebar(顶部Logo+产品名)+ PageHeader(面包屑基础组件模式,父级项点击返回)。PageHeader 必须在白卡容器内顶部渲染。使用面包屑基础组件模式时禁止展示标题基础组件(Breadcrumb 已承载导航与页面标识)。适用于 DetailPage、FormPage、WizardPage。Sidebar 仅在 TWO_COL 布局时显示,SINGLE_COL 布局时 Sidebar 隐藏."
170
+ "ascii": "┌─ PageShell(bg=muted) ────────────────────────────┐\n│ ┌─ OpSidebar ─┐ ┌─ SidebarInset ─────────────┐ │\n│ │ Brand │ │ ┌─ OpPageContainer ──────┐ │ │\n│ │ navSections │ │ │ PageHeader: 面包屑模式 │ │ │\n│ bottomSects │ │ │ [OpDetailHeader] │ │ │\n│ footer │ │ │ [内容/Tabs] │ │ │\n│ │ │ [Pagination] │ │ │\n│ └─────────────┘└────────────────────────┘ │ │\n│ └─────────────────────────────┘ │\n└───────────────────────────────────────────────────┘"
67
171
  }
68
172
  },
173
+
69
174
  "universalComponents": {
70
- "description": "子技能自动继承的框架组件,SKILL.md 中无需再声明这些组件的存在性。",
175
+ "description": "子技能自动继承的框架组件。详细规格见 common-components.json 对应条目。",
71
176
  "sidebar": {
72
- "inheritLevel": [
73
- "L1",
74
- "L2"
75
- ],
76
- "condition": "layout 为 TWO_COL 时显示;SINGLE_COL 时隐藏",
77
- "specRef": "rules/sidebar-spec.md",
78
- "spec": {
79
- "width": "240px(= --layout-sidebar-width,详见 design-tokens.json sidebarRules.width.expanded)",
80
- "collapsedWidth": "68px(详见 design-tokens.json sidebarRules.width.collapsed)",
81
- "containerBorder": "禁止右侧外边框(详见 design-tokens.json sidebarRules.colors.container.border: none)",
82
- "header": {
83
- "description": "Sidebar 顶部品牌区域,替代原 TopNavigation 的 Logo+ProductName。禁止底部边框(与下方菜单区无分割线,通过背景色一致实现视觉区分)。",
84
- "height": "56px",
85
- "padding": "0 16px",
86
- "elements": [
87
- "Logo Icon (20x20)",
88
- "ProductName (text-xl, font-black, 20px, 间距 4px)"
89
- ],
90
- "collapsedState": {
91
- "description": "收起态:显示折叠 Logo(30x30px),隐藏 ProductName。hover Logo 显示展开 icon(14x14px, #717376),点击展开 sidebar。",
92
- "padding": "0 12px",
93
- "justifyContent": "center",
94
- "detail": "详见 design-tokens.json sidebarRules.collapseBehavior.header"
95
- },
96
- "backgroundColor": "var(--sidebar)",
97
- "borderBottom": "none(禁止底部边框/分割线)"
98
- },
99
- "menuLevels": {
100
- "max": 3,
101
- "variants": {
102
- "threeLevel": "默认变体:group-label + main-item + sub-item,适用信息架构需要 3 层归类的场景(顶层按业务域 / 模块分组、中层主导航、底层细分功能)",
103
- "twoLevel": "新增变体:main-item + sub-item,去掉分组标题,适用信息架构只有 2 层归类的场景(顶层主导航、底层细分功能,主菜单项同语义层级)",
104
- "selectionPrinciple": "以信息架构层级深度为准,与菜单项个数无关"
105
- },
106
- "detail": "详细定义见 design-tokens.json sidebarRules.structure.variants"
107
- },
177
+ "inheritLevel": ["L1", "L2"],
178
+ "condition": "TWO_COL 布局时显示;SINGLE_COL/fullscreen 时隐藏",
179
+ "specRef": "rules/common-components.json → OpSidebar",
180
+ "component": "OpSidebar",
181
+ "keySummary": {
182
+ "expandedWidth": "240px",
183
+ "collapsedWidth": "68px",
184
+ "noBorderRight": true,
108
185
  "menuItemHeight": "40px",
109
- "l2Indent": "16px",
110
- "selectedState": {
111
- "indicator": "灰色背景 var(--sidebar-active)",
112
- "background": "var(--sidebar-active)"
113
- },
114
- "colorTokens": {
115
- "background": "var(--sidebar)",
116
- "foreground": "var(--sidebar-foreground)",
117
- "activeBg": "var(--sidebar-active)",
118
- "activeFg": "var(--sidebar-active-foreground)",
119
- "hoverBg": "var(--sidebar-hover)",
120
- "groupText": "var(--sidebar-group)",
121
- "itemText": "var(--sidebar-item)",
122
- "itemTextMuted": "var(--sidebar-item-muted)",
123
- "accentBg": "var(--sidebar-accent)",
124
- "accentFg": "var(--sidebar-accent-foreground)",
125
- "border": "var(--sidebar-border)",
126
- "ring": "var(--sidebar-ring)"
127
- },
128
- "collapseBehavior": {
129
- "width": "68px",
130
- "menuItem": "40x40px 居中于 34px 中轴线,gap: 0,flex-shrink: 0",
131
- "overflow": "visible(容器)+ overflow-y: auto(content)",
132
- "flyout": "hover 右侧弹出子菜单浮层,z-index: 200",
133
- "alignment": "所有可见元素视觉中心对齐于 x = 34px",
134
- "detail": "详见 design-tokens.json sidebarRules.collapseBehavior"
135
- },
136
186
  "responsive": "768px 断点折叠为抽屉(Sheet 模式)"
137
- },
138
- "reference": "common-components.json Sidebar"
187
+ }
139
188
  },
140
189
  "breadcrumb": {
141
- "inheritLevel": [
142
- "L2"
143
- ],
144
- "specRef": "rules/page-header-spec.md",
145
- "spec": {
190
+ "inheritLevel": ["L2"],
191
+ "specRef": "rules/common-components.json → PageHeader",
192
+ "keySummary": {
146
193
  "maxLevels": 4,
147
- "maxItemWidth": "160px",
148
- "clickableParent": true,
149
- "lastItemClickable": false,
150
- "semantics": "反映系统层级(非用户浏览路径)"
151
- },
152
- "visualSpecSummary": {
153
- "containerHeight": "64px",
154
194
  "fontSize": "18px (var(--font-size-2xl))",
155
- "fontWeight": "500",
195
+ "fontWeight": 500,
156
196
  "gap": "4px",
157
- "separatorIcon": "ChevronRight 20px",
158
- "separatorColor": "hsl(var(--muted-foreground))",
159
- "parentColor": "hsl(var(--gray-secondary))",
160
- "currentColor": "hsl(var(--gray-title))",
161
- "detailSpec": "rules/page-header-spec.md §3 面包屑模式"
197
+ "separator": "ChevronRight SVG 20px",
198
+ "clickableParent": true,
199
+ "lastItemClickable": false
162
200
  },
163
201
  "constraints": [
164
- {
165
- "rule": "使用面包屑基础组件模式时,禁止展示标题基础组件",
166
- "scope": ["L2"],
167
- "pageTypes": ["FormPage", "DetailPage"],
168
- "rationale": "面包屑已承载导航和页面标识功能,不再需要额外的标题组件。PageHeader 区域仅保留 Breadcrumb,不渲染 Title 元素。"
169
- }
170
- ],
171
- "reference": "common-components.json Breadcrumb"
202
+ "使用面包屑模式时禁止展示标题组件(L1/L2 互斥)",
203
+ "面包屑反映系统层级(非用户浏览路径)",
204
+ "PageHeader 必须在白卡容器内顶部渲染"
205
+ ]
172
206
  }
173
207
  },
174
- "responsiveFrameRules": {
175
- "description": "各断点下的框架级响应式行为,子技能只定义内容区响应式变化。",
176
- "DesktopXL": {
177
- "breakpoint": "≥1920px",
178
- "sidebar": "展开(240px,详见 design-tokens.json sidebarRules)",
179
- "sidebarHeader": "Logo + ProductName 完整显示"
180
- },
181
- "Desktop": {
182
- "breakpoint": "1200px - 1919px",
183
- "sidebar": "可收起(68px,详见 design-tokens.json sidebarRules.width.collapsed),用户可控",
184
- "sidebarHeader": "收起时仅显示 Logo Icon,ProductName 隐藏"
185
- },
186
- "Tablet": {
187
- "breakpoint": "768px - 1199px",
188
- "sidebar": "强制折叠为抽屉(Overlay 模式),点击触发显示",
189
- "sidebarHeader": "抽屉内完整显示",
190
- "note": "表格横滚、DescriptionList 列数降级由子技能定义"
191
- },
192
- "Mobile": {
193
- "breakpoint": "<768px",
194
- "sidebar": "隐藏,提示使用桌面端",
195
- "sidebarHeader": "隐藏"
196
- }
197
- },
198
- "layoutSelectionRules": {
199
- "description": "页面选择 SINGLE_COL / TWO_COL 的判断逻辑。",
200
- "rules": [
201
- {
202
- "condition": "页面需要分类导航(左侧树/分类筛选)",
203
- "layout": "TWO_COL"
204
- },
205
- {
206
- "condition": "页面需要 Tab 分类的资源详情页(Tab 内有关联资源列表)",
207
- "layout": "TWO_COL"
208
- },
209
- {
210
- "condition": "纯内容展示(列表/表单/详情)无分类导航需求",
211
- "layout": "SINGLE_COL"
212
- },
213
- {
214
- "condition": "表单页(FormPage)",
215
- "layout": "SINGLE_COL(默认)| TWO_COL(有步骤导航时)"
216
- },
217
- {
218
- "condition": "Dashboard / 仪表板",
219
- "layout": "SINGLE_COL 或 GRID"
220
- }
208
+
209
+ "layoutVariants": {
210
+ "description": "页面布局变体定义。",
211
+ "standard": {
212
+ "name": "标准布局",
213
+ "composition": "PageShell(bg=muted) + OpSidebar + SidebarInset + OpPageContainer",
214
+ "background": "灰底(muted) + 白卡(bg-card)",
215
+ "applies": "所有业务管理页面(列表/详情/表单/Dashboard)"
216
+ },
217
+ "fullscreen": {
218
+ "name": "全屏独立",
219
+ "composition": "无 PageShell 包裹",
220
+ "background": "自定义",
221
+ "applies": "画布编辑器、设计器、代码编辑器"
222
+ },
223
+ "selectionRules": [
224
+ { "condition": "页面需要分类导航(左侧树/分类筛选)", "layout": "TWO_COL (standard)" },
225
+ { "condition": "纯内容展示(列表/表单/详情)无分类导航", "layout": "TWO_COL (standard)" },
226
+ { "condition": "Dashboard / 仪表板", "layout": "TWO_COL (standard)" },
227
+ { "condition": "画布/代码编辑等全屏场景", "layout": "fullscreen" }
221
228
  ]
222
229
  },
230
+
231
+ "responsiveFrameRules": {
232
+ "description": "各断点下的框架级响应式行为。",
233
+ "DesktopXL": { "breakpoint": ">=1920px", "sidebar": "展开 240px" },
234
+ "Desktop": { "breakpoint": "1200-1919px", "sidebar": "可收起 68px,用户可控" },
235
+ "Tablet": { "breakpoint": "768-1199px", "sidebar": "强制折叠为抽屉(Overlay 模式)" },
236
+ "Mobile": { "breakpoint": "<768px", "sidebar": "隐藏,提示使用桌面端" }
237
+ },
238
+
223
239
  "frameToSubtypeMapping": {
224
240
  "description": "页面子类型与框架级别的映射,覆盖 pageTypes 的默认 L 级分配。",
225
- "listPage": {
226
- "defaultFrame": "L1",
227
- "override": {
228
- "drawer": "L0(嵌入 Sheet 内的弹窗列表,无框架组件)"
229
- }
230
- },
231
- "detailPage": {
232
- "defaultFrame": "L2"
233
- },
234
- "formPage": {
235
- "defaultFrame": "L2",
236
- "override": {
237
- "dialogForm": "L0(弹窗表单,由全局状态管理)"
238
- }
239
- }
241
+ "listPage": { "defaultFrame": "L1", "override": { "drawer": "L0(嵌入 Sheet 内的弹窗列表)" } },
242
+ "detailPage": { "defaultFrame": "L2" },
243
+ "formPage": { "defaultFrame": "L2", "override": { "dialogForm": "L0(弹窗表单)" } }
240
244
  }
241
- }
245
+ }