create-yss-spec 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/rules/yss-ai-skills.md +59 -0
  4. package/template/.agents/skills/.yss-skills-manifest.json +28 -0
  5. package/template/.agents/skills/component-selection-imports/SKILL.md +64 -0
  6. package/template/.agents/skills/file-export-download/SKILL.md +160 -0
  7. package/template/.agents/skills/file-export-download/agents/openai.yaml +4 -0
  8. package/template/.agents/skills/formily-foundation/SKILL.md +176 -0
  9. package/template/.agents/skills/formily-foundation/references/examples.md +486 -0
  10. package/template/.agents/skills/formily-linkage-effects/SKILL.md +167 -0
  11. package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +137 -0
  12. package/template/.agents/skills/formily-step-flow/SKILL.md +194 -0
  13. package/template/.agents/skills/frontend-commit/SKILL.md +118 -0
  14. package/template/.agents/skills/frontend-commit/agents/openai.yaml +7 -0
  15. package/template/.agents/skills/frontend-commit/references/scope-and-examples.md +111 -0
  16. package/template/.agents/skills/java-backend-commit/SKILL.md +121 -0
  17. package/template/.agents/skills/java-backend-commit/agents/openai.yaml +7 -0
  18. package/template/.agents/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  19. package/template/.agents/skills/page-form-module/SKILL.md +168 -0
  20. package/template/.agents/skills/page-list-module/SKILL.md +137 -0
  21. package/template/.agents/skills/page-skeleton/SKILL.md +76 -0
  22. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  23. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  24. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  25. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  26. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  27. package/template/.agents/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  28. package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  29. package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  30. package/template/.agents/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  31. package/template/.agents/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  32. package/template/.agents/skills/prototype-page-acceptance/SKILL.md +62 -0
  33. package/template/.agents/skills/theme-token-usage/SKILL.md +123 -0
  34. package/template/.agents/skills/theme-token-usage/agents/openai.yaml +4 -0
  35. package/template/.agents/skills/vue3-best-practices/SKILL.md +68 -0
  36. package/template/.agents/skills/yedit-table-usage/SKILL.md +227 -0
  37. package/template/.agents/skills/yss-api-integration/SKILL.md +12 -2
  38. package/template/.agents/skills/yss-components/SKILL.md +1 -1
  39. package/template/.agents/skills/yss-design-system/SKILL.md +1 -1
  40. package/template/.agents/skills/yss-formily/SKILL.md +233 -265
  41. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  42. package/template/.agents/skills/yss-hook/SKILL.md +1 -1
  43. package/template/.agents/skills/yss-openapi-governance/SKILL.md +2 -2
  44. package/template/.agents/skills/yss-page-module-development/SKILL.md +12 -2
  45. package/template/.agents/skills/yss-page-module-development/references/component-map.md +34 -0
  46. package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +11 -0
  47. package/template/.agents/skills/yss-page-module-development/references/utils-map.md +14 -0
  48. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  49. package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
  50. package/template/.agents/skills/yss-router/references/router-contract.yaml +6 -2
  51. package/template/.agents/skills/yss-ui/SKILL.md +1 -1
  52. package/template/.agents/skills/yss-use-table-height/SKILL.md +9 -0
  53. package/template/.agents/skills/yss-use-tree-height/SKILL.md +9 -0
  54. package/template/.agents/skills/ytable-usage/SKILL.md +251 -0
  55. package/template/.agents/skills/ytree-usage/SKILL.md +132 -0
  56. package/template/.claude/skills/.yss-skills-manifest.json +29 -0
  57. package/template/.claude/skills/component-selection-imports/SKILL.md +64 -0
  58. package/template/.claude/skills/file-export-download/SKILL.md +160 -0
  59. package/template/.claude/skills/file-export-download/agents/openai.yaml +4 -0
  60. package/template/.claude/skills/formily-foundation/SKILL.md +176 -0
  61. package/template/.claude/skills/formily-foundation/references/examples.md +486 -0
  62. package/template/.claude/skills/formily-linkage-effects/SKILL.md +167 -0
  63. package/template/.claude/skills/formily-mode-slot-detail/SKILL.md +137 -0
  64. package/template/.claude/skills/formily-step-flow/SKILL.md +194 -0
  65. package/template/.claude/skills/frontend-commit/SKILL.md +118 -0
  66. package/template/.claude/skills/frontend-commit/agents/openai.yaml +7 -0
  67. package/template/.claude/skills/frontend-commit/references/scope-and-examples.md +111 -0
  68. package/template/.claude/skills/java-backend-commit/SKILL.md +121 -0
  69. package/template/.claude/skills/java-backend-commit/agents/openai.yaml +7 -0
  70. package/template/.claude/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  71. package/template/.claude/skills/page-form-module/SKILL.md +168 -0
  72. package/template/.claude/skills/page-list-module/SKILL.md +137 -0
  73. package/template/.claude/skills/page-skeleton/SKILL.md +76 -0
  74. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  75. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  76. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  77. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  78. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  79. package/template/.claude/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  80. package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  81. package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  82. package/template/.claude/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  83. package/template/.claude/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  84. package/template/.claude/skills/prototype-page-acceptance/SKILL.md +62 -0
  85. package/template/.claude/skills/theme-token-usage/SKILL.md +123 -0
  86. package/template/.claude/skills/theme-token-usage/agents/openai.yaml +4 -0
  87. package/template/.claude/skills/vue3-best-practices/SKILL.md +68 -0
  88. package/template/.claude/skills/yedit-table-usage/SKILL.md +227 -0
  89. package/template/.claude/skills/yss-api-integration/SKILL.md +12 -2
  90. package/template/.claude/skills/yss-components/SKILL.md +1 -1
  91. package/template/.claude/skills/yss-design-system/SKILL.md +1 -1
  92. package/template/.claude/skills/yss-formily/SKILL.md +233 -265
  93. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  94. package/template/.claude/skills/yss-hook/SKILL.md +1 -1
  95. package/template/.claude/skills/yss-openapi-governance/SKILL.md +2 -2
  96. package/template/.claude/skills/yss-page-module-development/SKILL.md +12 -2
  97. package/template/.claude/skills/yss-page-module-development/references/component-map.md +34 -0
  98. package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +11 -0
  99. package/template/.claude/skills/yss-page-module-development/references/utils-map.md +14 -0
  100. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  101. package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
  102. package/template/.claude/skills/yss-router/references/router-contract.yaml +6 -2
  103. package/template/.claude/skills/yss-ui/SKILL.md +1 -1
  104. package/template/.claude/skills/yss-use-table-height/SKILL.md +9 -0
  105. package/template/.claude/skills/yss-use-tree-height/SKILL.md +9 -0
  106. package/template/.claude/skills/ytable-usage/SKILL.md +251 -0
  107. package/template/.claude/skills/ytree-usage/SKILL.md +132 -0
  108. package/template/.codex/skills/component-selection-imports/SKILL.md +64 -0
  109. package/template/.codex/skills/file-export-download/SKILL.md +160 -0
  110. package/template/.codex/skills/file-export-download/agents/openai.yaml +4 -0
  111. package/template/.codex/skills/formily-foundation/SKILL.md +176 -0
  112. package/template/.codex/skills/formily-foundation/references/examples.md +486 -0
  113. package/template/.codex/skills/formily-linkage-effects/SKILL.md +167 -0
  114. package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +137 -0
  115. package/template/.codex/skills/formily-step-flow/SKILL.md +194 -0
  116. package/template/.codex/skills/frontend-commit/SKILL.md +118 -0
  117. package/template/.codex/skills/frontend-commit/agents/openai.yaml +7 -0
  118. package/template/.codex/skills/frontend-commit/references/scope-and-examples.md +111 -0
  119. package/template/.codex/skills/java-backend-commit/SKILL.md +121 -0
  120. package/template/.codex/skills/java-backend-commit/agents/openai.yaml +7 -0
  121. package/template/.codex/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  122. package/template/.codex/skills/page-form-module/SKILL.md +168 -0
  123. package/template/.codex/skills/page-list-module/SKILL.md +137 -0
  124. package/template/.codex/skills/page-skeleton/SKILL.md +76 -0
  125. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  126. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  127. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  128. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  129. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  130. package/template/.codex/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  131. package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  132. package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  133. package/template/.codex/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  134. package/template/.codex/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  135. package/template/.codex/skills/prototype-page-acceptance/SKILL.md +62 -0
  136. package/template/.codex/skills/theme-token-usage/SKILL.md +123 -0
  137. package/template/.codex/skills/theme-token-usage/agents/openai.yaml +4 -0
  138. package/template/.codex/skills/vue3-best-practices/SKILL.md +68 -0
  139. package/template/.codex/skills/yedit-table-usage/SKILL.md +227 -0
  140. package/template/.codex/skills/yss-api-integration/SKILL.md +12 -2
  141. package/template/.codex/skills/yss-components/SKILL.md +1 -1
  142. package/template/.codex/skills/yss-design-system/SKILL.md +1 -1
  143. package/template/.codex/skills/yss-formily/SKILL.md +233 -265
  144. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  145. package/template/.codex/skills/yss-hook/SKILL.md +1 -1
  146. package/template/.codex/skills/yss-openapi-governance/SKILL.md +2 -2
  147. package/template/.codex/skills/yss-page-module-development/SKILL.md +12 -2
  148. package/template/.codex/skills/yss-page-module-development/references/component-map.md +34 -0
  149. package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +11 -0
  150. package/template/.codex/skills/yss-page-module-development/references/utils-map.md +14 -0
  151. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  152. package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
  153. package/template/.codex/skills/yss-router/references/router-contract.yaml +6 -2
  154. package/template/.codex/skills/yss-ui/SKILL.md +1 -1
  155. package/template/.codex/skills/yss-use-table-height/SKILL.md +9 -0
  156. package/template/.codex/skills/yss-use-tree-height/SKILL.md +9 -0
  157. package/template/.codex/skills/ytable-usage/SKILL.md +251 -0
  158. package/template/.codex/skills/ytree-usage/SKILL.md +132 -0
  159. package/template/.cursor/skills/.yss-skills-manifest.json +29 -0
  160. package/template/.cursor/skills/component-selection-imports/SKILL.md +64 -0
  161. package/template/.cursor/skills/file-export-download/SKILL.md +160 -0
  162. package/template/.cursor/skills/file-export-download/agents/openai.yaml +4 -0
  163. package/template/.cursor/skills/formily-foundation/SKILL.md +176 -0
  164. package/template/.cursor/skills/formily-foundation/references/examples.md +486 -0
  165. package/template/.cursor/skills/formily-linkage-effects/SKILL.md +167 -0
  166. package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +137 -0
  167. package/template/.cursor/skills/formily-step-flow/SKILL.md +194 -0
  168. package/template/.cursor/skills/frontend-commit/SKILL.md +118 -0
  169. package/template/.cursor/skills/frontend-commit/agents/openai.yaml +7 -0
  170. package/template/.cursor/skills/frontend-commit/references/scope-and-examples.md +111 -0
  171. package/template/.cursor/skills/java-backend-commit/SKILL.md +121 -0
  172. package/template/.cursor/skills/java-backend-commit/agents/openai.yaml +7 -0
  173. package/template/.cursor/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  174. package/template/.cursor/skills/page-form-module/SKILL.md +168 -0
  175. package/template/.cursor/skills/page-list-module/SKILL.md +137 -0
  176. package/template/.cursor/skills/page-skeleton/SKILL.md +76 -0
  177. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  178. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  179. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  180. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  181. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  182. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  183. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  184. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  185. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  186. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  187. package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +62 -0
  188. package/template/.cursor/skills/theme-token-usage/SKILL.md +123 -0
  189. package/template/.cursor/skills/theme-token-usage/agents/openai.yaml +4 -0
  190. package/template/.cursor/skills/vue3-best-practices/SKILL.md +68 -0
  191. package/template/.cursor/skills/yedit-table-usage/SKILL.md +227 -0
  192. package/template/.cursor/skills/yss-api-integration/SKILL.md +12 -2
  193. package/template/.cursor/skills/yss-components/SKILL.md +1 -1
  194. package/template/.cursor/skills/yss-design-system/SKILL.md +1 -1
  195. package/template/.cursor/skills/yss-formily/SKILL.md +233 -265
  196. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  197. package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
  198. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +2 -2
  199. package/template/.cursor/skills/yss-page-module-development/SKILL.md +12 -2
  200. package/template/.cursor/skills/yss-page-module-development/references/component-map.md +34 -0
  201. package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +11 -0
  202. package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +14 -0
  203. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  204. package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
  205. package/template/.cursor/skills/yss-router/references/router-contract.yaml +6 -2
  206. package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
  207. package/template/.cursor/skills/yss-use-table-height/SKILL.md +9 -0
  208. package/template/.cursor/skills/yss-use-tree-height/SKILL.md +9 -0
  209. package/template/.cursor/skills/ytable-usage/SKILL.md +251 -0
  210. package/template/.cursor/skills/ytree-usage/SKILL.md +132 -0
  211. package/template/.cursorrules +32 -0
  212. package/template/.hermes/skills/component-selection-imports/SKILL.md +64 -0
  213. package/template/.hermes/skills/file-export-download/SKILL.md +160 -0
  214. package/template/.hermes/skills/file-export-download/agents/openai.yaml +4 -0
  215. package/template/.hermes/skills/formily-foundation/SKILL.md +176 -0
  216. package/template/.hermes/skills/formily-foundation/references/examples.md +486 -0
  217. package/template/.hermes/skills/formily-linkage-effects/SKILL.md +167 -0
  218. package/template/.hermes/skills/formily-mode-slot-detail/SKILL.md +137 -0
  219. package/template/.hermes/skills/formily-step-flow/SKILL.md +194 -0
  220. package/template/.hermes/skills/frontend-commit/SKILL.md +118 -0
  221. package/template/.hermes/skills/frontend-commit/agents/openai.yaml +7 -0
  222. package/template/.hermes/skills/frontend-commit/references/scope-and-examples.md +111 -0
  223. package/template/.hermes/skills/java-backend-commit/SKILL.md +121 -0
  224. package/template/.hermes/skills/java-backend-commit/agents/openai.yaml +7 -0
  225. package/template/.hermes/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  226. package/template/.hermes/skills/page-form-module/SKILL.md +168 -0
  227. package/template/.hermes/skills/page-list-module/SKILL.md +137 -0
  228. package/template/.hermes/skills/page-skeleton/SKILL.md +76 -0
  229. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  230. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  231. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  232. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  233. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  234. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  235. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  236. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  237. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  238. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  239. package/template/.hermes/skills/prototype-page-acceptance/SKILL.md +62 -0
  240. package/template/.hermes/skills/theme-token-usage/SKILL.md +123 -0
  241. package/template/.hermes/skills/theme-token-usage/agents/openai.yaml +4 -0
  242. package/template/.hermes/skills/vue3-best-practices/SKILL.md +68 -0
  243. package/template/.hermes/skills/yedit-table-usage/SKILL.md +227 -0
  244. package/template/.hermes/skills/yss-api-integration/SKILL.md +12 -2
  245. package/template/.hermes/skills/yss-components/SKILL.md +1 -1
  246. package/template/.hermes/skills/yss-design-system/SKILL.md +1 -1
  247. package/template/.hermes/skills/yss-formily/SKILL.md +233 -265
  248. package/template/.hermes/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  249. package/template/.hermes/skills/yss-hook/SKILL.md +1 -1
  250. package/template/.hermes/skills/yss-openapi-governance/SKILL.md +2 -2
  251. package/template/.hermes/skills/yss-page-module-development/SKILL.md +12 -2
  252. package/template/.hermes/skills/yss-page-module-development/references/component-map.md +34 -0
  253. package/template/.hermes/skills/yss-page-module-development/references/hooks-map.md +11 -0
  254. package/template/.hermes/skills/yss-page-module-development/references/utils-map.md +14 -0
  255. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  256. package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
  257. package/template/.hermes/skills/yss-router/references/router-contract.yaml +6 -2
  258. package/template/.hermes/skills/yss-ui/SKILL.md +1 -1
  259. package/template/.hermes/skills/yss-use-table-height/SKILL.md +9 -0
  260. package/template/.hermes/skills/yss-use-tree-height/SKILL.md +9 -0
  261. package/template/.hermes/skills/ytable-usage/SKILL.md +251 -0
  262. package/template/.hermes/skills/ytree-usage/SKILL.md +132 -0
  263. package/template/.pi/skills/component-selection-imports/SKILL.md +64 -0
  264. package/template/.pi/skills/file-export-download/SKILL.md +160 -0
  265. package/template/.pi/skills/file-export-download/agents/openai.yaml +4 -0
  266. package/template/.pi/skills/formily-foundation/SKILL.md +176 -0
  267. package/template/.pi/skills/formily-foundation/references/examples.md +486 -0
  268. package/template/.pi/skills/formily-linkage-effects/SKILL.md +167 -0
  269. package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +137 -0
  270. package/template/.pi/skills/formily-step-flow/SKILL.md +194 -0
  271. package/template/.pi/skills/frontend-commit/SKILL.md +118 -0
  272. package/template/.pi/skills/frontend-commit/agents/openai.yaml +7 -0
  273. package/template/.pi/skills/frontend-commit/references/scope-and-examples.md +111 -0
  274. package/template/.pi/skills/java-backend-commit/SKILL.md +121 -0
  275. package/template/.pi/skills/java-backend-commit/agents/openai.yaml +7 -0
  276. package/template/.pi/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  277. package/template/.pi/skills/page-form-module/SKILL.md +168 -0
  278. package/template/.pi/skills/page-list-module/SKILL.md +137 -0
  279. package/template/.pi/skills/page-skeleton/SKILL.md +76 -0
  280. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  281. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  282. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  283. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  284. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  285. package/template/.pi/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  286. package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  287. package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  288. package/template/.pi/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  289. package/template/.pi/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  290. package/template/.pi/skills/prototype-page-acceptance/SKILL.md +62 -0
  291. package/template/.pi/skills/theme-token-usage/SKILL.md +123 -0
  292. package/template/.pi/skills/theme-token-usage/agents/openai.yaml +4 -0
  293. package/template/.pi/skills/vue3-best-practices/SKILL.md +68 -0
  294. package/template/.pi/skills/yedit-table-usage/SKILL.md +227 -0
  295. package/template/.pi/skills/yss-api-integration/SKILL.md +12 -2
  296. package/template/.pi/skills/yss-components/SKILL.md +1 -1
  297. package/template/.pi/skills/yss-design-system/SKILL.md +1 -1
  298. package/template/.pi/skills/yss-formily/SKILL.md +233 -265
  299. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  300. package/template/.pi/skills/yss-hook/SKILL.md +1 -1
  301. package/template/.pi/skills/yss-openapi-governance/SKILL.md +2 -2
  302. package/template/.pi/skills/yss-page-module-development/SKILL.md +12 -2
  303. package/template/.pi/skills/yss-page-module-development/references/component-map.md +34 -0
  304. package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +11 -0
  305. package/template/.pi/skills/yss-page-module-development/references/utils-map.md +14 -0
  306. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  307. package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
  308. package/template/.pi/skills/yss-router/references/router-contract.yaml +6 -2
  309. package/template/.pi/skills/yss-ui/SKILL.md +1 -1
  310. package/template/.pi/skills/yss-use-table-height/SKILL.md +9 -0
  311. package/template/.pi/skills/yss-use-tree-height/SKILL.md +9 -0
  312. package/template/.pi/skills/ytable-usage/SKILL.md +251 -0
  313. package/template/.pi/skills/ytree-usage/SKILL.md +132 -0
  314. package/template/.qoder/skills/component-selection-imports/SKILL.md +64 -0
  315. package/template/.qoder/skills/file-export-download/SKILL.md +160 -0
  316. package/template/.qoder/skills/file-export-download/agents/openai.yaml +4 -0
  317. package/template/.qoder/skills/formily-foundation/SKILL.md +176 -0
  318. package/template/.qoder/skills/formily-foundation/references/examples.md +486 -0
  319. package/template/.qoder/skills/formily-linkage-effects/SKILL.md +167 -0
  320. package/template/.qoder/skills/formily-mode-slot-detail/SKILL.md +137 -0
  321. package/template/.qoder/skills/formily-step-flow/SKILL.md +194 -0
  322. package/template/.qoder/skills/frontend-commit/SKILL.md +118 -0
  323. package/template/.qoder/skills/frontend-commit/agents/openai.yaml +7 -0
  324. package/template/.qoder/skills/frontend-commit/references/scope-and-examples.md +111 -0
  325. package/template/.qoder/skills/java-backend-commit/SKILL.md +121 -0
  326. package/template/.qoder/skills/java-backend-commit/agents/openai.yaml +7 -0
  327. package/template/.qoder/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  328. package/template/.qoder/skills/page-form-module/SKILL.md +168 -0
  329. package/template/.qoder/skills/page-list-module/SKILL.md +137 -0
  330. package/template/.qoder/skills/page-skeleton/SKILL.md +76 -0
  331. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  332. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  333. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  334. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  335. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  336. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  337. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  338. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  339. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  340. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  341. package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +62 -0
  342. package/template/.qoder/skills/theme-token-usage/SKILL.md +123 -0
  343. package/template/.qoder/skills/theme-token-usage/agents/openai.yaml +4 -0
  344. package/template/.qoder/skills/vue3-best-practices/SKILL.md +68 -0
  345. package/template/.qoder/skills/yedit-table-usage/SKILL.md +227 -0
  346. package/template/.qoder/skills/yss-api-integration/SKILL.md +12 -2
  347. package/template/.qoder/skills/yss-components/SKILL.md +1 -1
  348. package/template/.qoder/skills/yss-design-system/SKILL.md +1 -1
  349. package/template/.qoder/skills/yss-formily/SKILL.md +233 -265
  350. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  351. package/template/.qoder/skills/yss-hook/SKILL.md +1 -1
  352. package/template/.qoder/skills/yss-openapi-governance/SKILL.md +2 -2
  353. package/template/.qoder/skills/yss-page-module-development/SKILL.md +12 -2
  354. package/template/.qoder/skills/yss-page-module-development/references/component-map.md +34 -0
  355. package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +11 -0
  356. package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +14 -0
  357. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  358. package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
  359. package/template/.qoder/skills/yss-router/references/router-contract.yaml +6 -2
  360. package/template/.qoder/skills/yss-ui/SKILL.md +1 -1
  361. package/template/.qoder/skills/yss-use-table-height/SKILL.md +9 -0
  362. package/template/.qoder/skills/yss-use-tree-height/SKILL.md +9 -0
  363. package/template/.qoder/skills/ytable-usage/SKILL.md +251 -0
  364. package/template/.qoder/skills/ytree-usage/SKILL.md +132 -0
  365. package/template/.trae/skills/.yss-skills-manifest.json +29 -0
  366. package/template/.trae/skills/component-selection-imports/SKILL.md +64 -0
  367. package/template/.trae/skills/file-export-download/SKILL.md +160 -0
  368. package/template/.trae/skills/file-export-download/agents/openai.yaml +4 -0
  369. package/template/.trae/skills/formily-foundation/SKILL.md +176 -0
  370. package/template/.trae/skills/formily-foundation/references/examples.md +486 -0
  371. package/template/.trae/skills/formily-linkage-effects/SKILL.md +167 -0
  372. package/template/.trae/skills/formily-mode-slot-detail/SKILL.md +137 -0
  373. package/template/.trae/skills/formily-step-flow/SKILL.md +194 -0
  374. package/template/.trae/skills/frontend-commit/SKILL.md +118 -0
  375. package/template/.trae/skills/frontend-commit/agents/openai.yaml +7 -0
  376. package/template/.trae/skills/frontend-commit/references/scope-and-examples.md +111 -0
  377. package/template/.trae/skills/java-backend-commit/SKILL.md +121 -0
  378. package/template/.trae/skills/java-backend-commit/agents/openai.yaml +7 -0
  379. package/template/.trae/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  380. package/template/.trae/skills/page-form-module/SKILL.md +168 -0
  381. package/template/.trae/skills/page-list-module/SKILL.md +137 -0
  382. package/template/.trae/skills/page-skeleton/SKILL.md +76 -0
  383. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  384. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  385. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  386. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  387. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  388. package/template/.trae/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  389. package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  390. package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  391. package/template/.trae/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  392. package/template/.trae/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  393. package/template/.trae/skills/prototype-page-acceptance/SKILL.md +62 -0
  394. package/template/.trae/skills/theme-token-usage/SKILL.md +123 -0
  395. package/template/.trae/skills/theme-token-usage/agents/openai.yaml +4 -0
  396. package/template/.trae/skills/vue3-best-practices/SKILL.md +68 -0
  397. package/template/.trae/skills/yedit-table-usage/SKILL.md +227 -0
  398. package/template/.trae/skills/yss-api-integration/SKILL.md +12 -2
  399. package/template/.trae/skills/yss-components/SKILL.md +1 -1
  400. package/template/.trae/skills/yss-design-system/SKILL.md +1 -1
  401. package/template/.trae/skills/yss-formily/SKILL.md +233 -265
  402. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  403. package/template/.trae/skills/yss-hook/SKILL.md +1 -1
  404. package/template/.trae/skills/yss-openapi-governance/SKILL.md +2 -2
  405. package/template/.trae/skills/yss-page-module-development/SKILL.md +12 -2
  406. package/template/.trae/skills/yss-page-module-development/references/component-map.md +34 -0
  407. package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +11 -0
  408. package/template/.trae/skills/yss-page-module-development/references/utils-map.md +14 -0
  409. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  410. package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
  411. package/template/.trae/skills/yss-router/references/router-contract.yaml +6 -2
  412. package/template/.trae/skills/yss-ui/SKILL.md +1 -1
  413. package/template/.trae/skills/yss-use-table-height/SKILL.md +9 -0
  414. package/template/.trae/skills/yss-use-tree-height/SKILL.md +9 -0
  415. package/template/.trae/skills/ytable-usage/SKILL.md +251 -0
  416. package/template/.trae/skills/ytree-usage/SKILL.md +132 -0
  417. package/template/docs/agents/skill-migrations.md +16 -0
  418. package/template/docs/agents/skills-maintenance.md +1 -1
  419. package/template/docs/agents/yss-skill-registry.yaml +125 -25
  420. 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 +4 -4
  421. 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 +1 -1
  422. package/template/scripts/lib/scenario-checks.mjs +21 -0
  423. package/template/scripts/lib/skill-governance.mjs +50 -0
  424. package/template/scripts/lib/skill-registry.mjs +82 -5
  425. package/template/scripts/lib/skill-supply-chain.mjs +5 -1
  426. package/template/scripts/verify-skill-governance +10 -0
  427. package/template/scripts/verify-template +3 -2
  428. package/template/skills-lock.json +285 -29
  429. package/template.snapshot.json +4 -4
  430. package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  431. package/template/.agents/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  432. package/template/.agents/skills/yss-formily/agents/openai.yaml +0 -5
  433. package/template/.agents/skills/yss-formily/references/examples.md +0 -65
  434. package/template/.claude/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  435. package/template/.claude/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  436. package/template/.claude/skills/yss-formily/agents/openai.yaml +0 -5
  437. package/template/.claude/skills/yss-formily/references/examples.md +0 -65
  438. package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  439. package/template/.codex/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  440. package/template/.codex/skills/yss-formily/agents/openai.yaml +0 -5
  441. package/template/.codex/skills/yss-formily/references/examples.md +0 -65
  442. package/template/.cursor/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  443. package/template/.cursor/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  444. package/template/.cursor/skills/yss-formily/agents/openai.yaml +0 -5
  445. package/template/.cursor/skills/yss-formily/references/examples.md +0 -65
  446. package/template/.hermes/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  447. package/template/.hermes/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  448. package/template/.hermes/skills/yss-formily/agents/openai.yaml +0 -5
  449. package/template/.hermes/skills/yss-formily/references/examples.md +0 -65
  450. package/template/.pi/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  451. package/template/.pi/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  452. package/template/.pi/skills/yss-formily/agents/openai.yaml +0 -5
  453. package/template/.pi/skills/yss-formily/references/examples.md +0 -65
  454. package/template/.qoder/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  455. package/template/.qoder/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  456. package/template/.qoder/skills/yss-formily/agents/openai.yaml +0 -5
  457. package/template/.qoder/skills/yss-formily/references/examples.md +0 -65
  458. package/template/.trae/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  459. package/template/.trae/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  460. package/template/.trae/skills/yss-formily/agents/openai.yaml +0 -5
  461. package/template/.trae/skills/yss-formily/references/examples.md +0 -65
@@ -0,0 +1,91 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, ref } from 'vue';
3
+ import { Input as AInput } from 'ant-design-vue';
4
+ import { YButton, YCard, YTable } from '@yss-ui/components';
5
+ import { useTableHeight } from '@yss-ui/hooks';
6
+ import { TABLE_COLUMNS, type QualityRuleItem } from './constant';
7
+ import { useQualityRuleList } from './hooks/useQualityRuleList';
8
+ import { useRuleActions } from './hooks/useRuleActions';
9
+
10
+ defineOptions({ name: 'StandardListPage' });
11
+
12
+ const emit = defineEmits<{
13
+ create: [];
14
+ edit: [row: QualityRuleItem];
15
+ view: [row: QualityRuleItem];
16
+ }>();
17
+
18
+ const tableAreaRef = ref<HTMLDivElement>();
19
+ const { tableHeight, isReady } = useTableHeight(tableAreaRef, {
20
+ withPagination: true,
21
+ withToolbar: true,
22
+ });
23
+ const { tableData, loading, pagination, searchForm, fetchList, handlePageChange, handleSearch, handleReset } =
24
+ useQualityRuleList();
25
+ const { actionConfig, handleCreate } = useRuleActions({
26
+ refreshList: fetchList,
27
+ onCreate: () => emit('create'),
28
+ onEdit: row => emit('edit', row),
29
+ onView: row => emit('view', row),
30
+ });
31
+
32
+ /** 查看规则详情。 */
33
+ const handleRuleNameClick = (row: QualityRuleItem): void => {
34
+ emit('view', row);
35
+ };
36
+
37
+ onMounted(() => {
38
+ void fetchList();
39
+ });
40
+ </script>
41
+
42
+ <template>
43
+ <div class="quality-rule-page">
44
+ <YCard class="quality-rule-page__search-card">
45
+ <div class="quality-rule-page__search-content">
46
+ <AInput
47
+ v-model:value="searchForm.ruleName"
48
+ class="quality-rule-page__keyword"
49
+ placeholder="请输入规则名称"
50
+ allow-clear
51
+ @press-enter="handleSearch"
52
+ />
53
+ <div class="quality-rule-page__search-actions">
54
+ <YButton @click="handleReset">重置</YButton>
55
+ <YButton type="primary" :loading="loading" @click="handleSearch">查询</YButton>
56
+ </div>
57
+ </div>
58
+ </YCard>
59
+
60
+ <YCard class="quality-rule-page__table-card">
61
+ <div ref="tableAreaRef" class="quality-rule-page__table-area">
62
+ <YTable
63
+ v-if="isReady"
64
+ :data="tableData"
65
+ :columns="TABLE_COLUMNS"
66
+ :loading="loading"
67
+ :height="tableHeight"
68
+ :action-config="actionConfig"
69
+ :toolbar-config="{ custom: true }"
70
+ pageable
71
+ v-model:pagination="pagination"
72
+ @page-change="handlePageChange"
73
+ >
74
+ <template #toolbar-right>
75
+ <YButton @click="fetchList">刷新</YButton>
76
+ <YButton type="primary" @click="handleCreate">新增质量规则</YButton>
77
+ </template>
78
+ <template #ruleName="{ row }">
79
+ <button class="quality-rule-page__rule-link" type="button" @click="handleRuleNameClick(row)">
80
+ {{ row.ruleName ?? '-' }}
81
+ </button>
82
+ </template>
83
+ </YTable>
84
+ </div>
85
+ </YCard>
86
+ </div>
87
+ </template>
88
+
89
+ <style scoped lang="less">
90
+ @import url('./style.less');
91
+ </style>
@@ -0,0 +1,49 @@
1
+ .quality-rule-page {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ height: 100%;
6
+ min-height: 0;
7
+ gap: 12px;
8
+
9
+ &__search-content {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 12px;
13
+ }
14
+
15
+ &__keyword {
16
+ width: min(100%, 360px);
17
+ }
18
+
19
+ &__search-actions {
20
+ display: flex;
21
+ justify-content: flex-end;
22
+ gap: 8px;
23
+ }
24
+
25
+ &__table-card,
26
+ &__table-area {
27
+ flex: 1;
28
+ min-height: 0;
29
+ }
30
+
31
+ &__rule-link {
32
+ padding: 0;
33
+ color: var(--primary-color, #3371ff);
34
+ background: transparent;
35
+ border: 0;
36
+ cursor: pointer;
37
+
38
+ &:hover,
39
+ &:focus-visible {
40
+ color: var(--primary-color-hover, #4096ff);
41
+ text-decoration: underline;
42
+ }
43
+
44
+ &:focus-visible {
45
+ outline: 2px solid color-mix(in srgb, var(--primary-color, #3371ff) 35%, transparent);
46
+ outline-offset: 2px;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: prototype-page-acceptance
3
+ description: 当用户提供原型截图、老项目路径、旧页面截图或要求按既有页面复刻业务页面时,指导先提取视觉和交互验收清单,开发后用截图/运行结果逐项对照,避免只实现字段而忽略布局、按钮、表格高度和控件类型。
4
+ ---
5
+
6
+ # 原型页面还原验收 Skill
7
+
8
+ ## 触发条件
9
+
10
+ - 用户提供原型图、截图、设计稿、旧项目 view/logic/service 路径。
11
+ - 用户要求“参考老项目、照原型、复刻页面、保持和旧系统一致”。
12
+ - 开发结果需要人工视觉对照,而不只是接口和类型正确。
13
+
14
+ ## 不适用场景
15
+
16
+ - 纯逻辑修复、纯 API 对接、无 UI 改动。
17
+ - 用户明确要求自由设计,不需要贴近旧页面。
18
+ - 组件库内部能力开发,不涉及业务页面还原。
19
+
20
+ ## 硬约束(禁止/必须)
21
+
22
+ - 开发前必须打开用户给出的旧项目 view 文件、相关 logic/service 文件和当前项目相近页面,不得只看接口。
23
+ - 必须把截图/旧页面拆成验收清单:查询区布局、按钮位置、表格工具栏、表格高度/分页、操作列、弹窗/抽屉尺寸、表单 label 宽度和对齐、FormGrid 响应式、字段控件类型。
24
+ - Vue3 + YSS UI 列表查询区默认验收“字段在上、查询/重置按钮独占下一行并右对齐”;缩放或窄屏导致字段换行时,按钮必须仍在搜索卡片右下角,不得贴在第一行字段旁。
25
+ - 若截图里出现但需求文字没写的通用交互(查询/重置、表格列设置、新增按钮位置、分页器、抽屉底部按钮),默认按截图实现。
26
+ - 不允许用“用户没说”跳过截图里明显存在的 UI;只有业务含义不明时才询问。
27
+ - 开发后必须运行页面或至少完成类型/构建检查;可运行时必须截图对照首屏和关键弹窗/抽屉。
28
+ - 交付说明必须列出“已对照原型的验收项”和“未能验证的项”。
29
+
30
+ ## 标准代码骨架
31
+
32
+ ```text
33
+ 原型验收清单:
34
+ - 查询区:字段数量、FormGrid 响应式列数、label 固定宽度和右对齐、查询/重置按钮右下角位置,缩窄后按钮不贴第一行字段。
35
+ - 表格区:YTable、toolbar-config.custom、#toolbar-right 新增按钮、分页、无底部大空白。
36
+ - 操作列:按钮可见条件、更多菜单、删除气泡确认文案。
37
+ - 抽屉/弹窗:响应式宽度、底部按钮、查看态只读、label 右对齐且宽度统一、缩窄时 2 列变 1 列、备注/长文本占满行。
38
+ - 编辑表格:使用 YEditTable,列控件类型、可输入/多选、添加行/删除行、校验。
39
+ ```
40
+
41
+ ```text
42
+ 验收输出:
43
+ - 通过:查询区三列栅格,查询/重置按钮独占下一行并右对齐;缩窄到字段两行或三行时按钮仍在搜索卡片右下角。
44
+ - 通过:表格工具栏右侧为新增和列设置按钮,分页贴底显示,无大空白。
45
+ - 通过:抽屉宽度使用 min(90vw, 1200px),labelWidth 固定且右对齐,FormGrid 从 2 列响应式收缩为 1 列,查看态不显示保存。
46
+ - 未验证:后端真实数据返回为空,仅用 mock/空态验证布局。
47
+ ```
48
+
49
+ ## 交付检查清单
50
+
51
+ - [ ] 已读取旧项目 view/logic/service 或当前相近页面。
52
+ - [ ] 已把截图中可见 UI 转成验收清单。
53
+ - [ ] 查询/重置按钮右下角布局、表格工具栏、新增按钮、分页和空白高度已对照。
54
+ - [ ] 抽屉/弹窗响应式、label 宽度和右对齐、FormGrid 换列、底部按钮已对照。
55
+ - [ ] 编辑表格控件类型、可输入/多选、添加/删除已对照。
56
+ - [ ] 已运行类型检查、构建或浏览器截图验证,并说明未验证项。
57
+
58
+ ## 失败兜底策略
59
+
60
+ - 旧项目代码太复杂时,先提取最终 UI 结构和字段映射,再复用当前项目组件实现。
61
+ - 截图与文字需求冲突时,优先按文字业务规则,UI 布局仍尽量按截图;冲突点写入交付说明。
62
+ - 无法运行项目时,至少执行静态类型检查并逐项说明哪些视觉项未验证。
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: theme-token-usage
3
+ description: 指导 Vue3 YSS UI 微应用业务页面、公共组件、原型还原和主题修复使用可动态换肤的 CSS/Ant Design Token,覆盖主色、hover/active/selected/focus、状态色、中性色、透明色派生和暗色模式;当新增或修改 .vue、style.less、内联样式、TS 渲染配置、SVG 色值,或审查硬编码 #hex/rgb/渐变时使用。
4
+ ---
5
+
6
+ # YSS UI 主题 Token 使用 Skill
7
+
8
+ ## 触发条件
9
+
10
+ - 新增、重构或按原型实现 Vue3 业务页面、公共组件、布局、卡片、树、表格、表单、抽屉和详情页。
11
+ - 修改 `.vue`、`.less`、`.css`、`.scss`、TS/TSX 渲染配置或 SVG 中的颜色、背景、边框、阴影、渐变。
12
+ - 页面需要跟随主应用主题、JSP 预设主题、暗色模式或运行时主色切换。
13
+ - 评审或修复 `#1677ff`、`#3371ff`、`rgb/rgba/hsl` 等硬编码色值。
14
+
15
+ ## 不适用场景
16
+
17
+ - 只维护主题源文件中的默认值或主题预设,例如 `variables.less`、`store/theme.ts`、`config/themes.ts`。
18
+ - 用户明确要求不可换肤的品牌插画、数据可视化固定色板或第三方资产原色;仍需在代码中注明固定色语义。
19
+ - 只修改与视觉无关的类型、接口或纯业务逻辑。
20
+
21
+ ## 开发前检查
22
+
23
+ 1. 读取当前微应用的 `packages/src/styles/variables.less`、主题 store/config 和相近页面,确认真实 Token 名称与运行时同步逻辑。
24
+ 2. 确认主应用传入的 `colorPrimary` 最终是否同步到 Ant Design ConfigProvider、YSS CSS 变量和 VXE 变量。
25
+ 3. 搜索本次改动涉及的硬编码色值,覆盖 SFC style、`style.less`、内联 `style`、`:style`、TS 配置、SVG `fill/stroke`。
26
+ 4. 区分“主题消费代码”和“主题定义代码”;禁止机械替换主题源文件中的合法默认色板。
27
+
28
+ > 变量在 `:root` 中声明,不代表它会随运行时主题更新。必须同时检查主题同步代码是否写入该变量。
29
+
30
+ ## Token 选择
31
+
32
+ 按以下优先级选值:
33
+
34
+ | 语义 | 优先使用 | 兼容选择 |
35
+ | --- | --- | --- |
36
+ | 主色 | `var(--primary-color, #3371ff)` | `var(--yss-color-primary-6, #3371ff)` |
37
+ | hover | `var(--primary-color-hover, #4096ff)` | `var(--yss-color-primary-5, #4096ff)` |
38
+ | active | `var(--primary-color-active, #0958d9)` | `var(--yss-color-primary-7, #0958d9)` |
39
+ | 成功/警告/错误/信息 | `--success-color` / `--warning-color` / `--error-color` / `--info-color` | 对应 `--yss-color-*-6` |
40
+ | 正文/次要文字 | `--text-color` / `--text-color-secondary` | 使用项目已有语义 Token |
41
+ | 容器/页面背景 | `--bg-color-container` / `--bg-color` | 使用项目已有语义 Token |
42
+ | 边框/分割线 | `--border-color` / `--border-color-split` | 使用项目已有语义 Token |
43
+ | 反色文字 | `--text-color-inverse` | 不直接写 `#fff` |
44
+
45
+ 需要主色透明背景、focus ring 或阴影时,从真实主色动态派生:
46
+
47
+ ```less
48
+ background: color-mix(in srgb, var(--primary-color, #3371ff) 10%, transparent);
49
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #3371ff) 15%, transparent);
50
+ ```
51
+
52
+ 仅当主题同步逻辑明确维护 `--primary-1` 时才可使用 `var(--primary-1)`。禁止用带蓝色 fallback 的 `var(--primary-1, rgba(...))` 冒充动态主题;变量未同步时,红色等主题仍会回落为蓝色。
53
+
54
+ ## 硬约束(禁止/必须)
55
+
56
+ - 必须优先让 `YButton`、`YTable`、`YTree`、`YFormily` 和 Ant Design Vue 组件消费 ConfigProvider 主题;非必要不覆盖其主色样式。
57
+ - 业务消费代码禁止直接写品牌蓝、主题红及其 hover/active/selected/focus 色阶,包括十六进制、`rgb/rgba/hsl`、渐变和阴影。
58
+ - 必须使用语义 Token;禁止仅按“颜色长得接近”替换,例如把错误态改成主色。
59
+ - `var()` fallback 必须与项目默认 Token 一致;fallback 只负责兼容,不得成为实际换肤来源。
60
+ - 禁止在页面局部随意发明 `--primary-light` 等新变量。确需新增时,必须在统一主题源声明,并在运行时主题同步链路中更新。
61
+ - 禁止对 CSS 变量使用 Less 编译期颜色函数,例如 `fade(@primary-color, 10%)`;`@primary-color` 指向 `var()` 时无法可靠计算。
62
+ - 禁止写 `rgba(var(--primary-color), 0.1)`;十六进制 CSS 变量不能直接作为 `rgba()` 通道参数。
63
+ - 固定数据可视化色板、品牌资产原色或遮罩色允许保留,但必须与换肤语义无关,并添加中文说明。
64
+ - 新增交互样式时必须覆盖 default、hover、active、selected、focus、disabled 中实际存在的状态。
65
+
66
+ ## 标准代码骨架
67
+
68
+ ```less
69
+ @import url('@/styles/variables.less');
70
+
71
+ .module-card {
72
+ color: var(--text-color, rgba(0, 0, 0, 0.88));
73
+ background: var(--bg-color-container, #fff);
74
+ border: 1px solid var(--border-color-split, #f0f0f0);
75
+
76
+ &__link {
77
+ color: var(--primary-color, #3371ff);
78
+
79
+ &:hover {
80
+ color: var(--primary-color-hover, #4096ff);
81
+ }
82
+ }
83
+
84
+ &.is-selected {
85
+ color: var(--primary-color, #3371ff);
86
+ background: color-mix(in srgb, var(--primary-color, #3371ff) 10%, transparent);
87
+ border-color: var(--primary-color, #3371ff);
88
+ }
89
+
90
+ &:focus-visible {
91
+ outline: none;
92
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #3371ff) 15%, transparent);
93
+ }
94
+ }
95
+ ```
96
+
97
+ 仅在 JS、图表或 Canvas 必须读取计算后色值时,优先使用 Ant Design Vue `theme.useToken()`;若消费微应用 CSS 变量,则通过 `getComputedStyle(document.documentElement)` 读取,不复制默认色板到业务常量。
98
+
99
+ ## 验证流程
100
+
101
+ 1. 扫描本次变更中的 `#hex`、`rgb/rgba`、`hsl/hsla`、渐变和 SVG 色值,逐项说明保留理由或替换为 Token。
102
+ 2. 至少使用默认主色和一个明显不同的主色(例如红色)验证页面。
103
+ 3. 检查文字、链接、图标、边框、背景、阴影以及 hover/active/selected/focus 状态是否同步变化。
104
+ 4. 项目支持暗色模式时,再验证正文、次要文字、容器背景和边框;不得只验证主色。
105
+ 5. 有原型截图时,主题适配与视觉还原必须同时通过,不能为像素接近而写死色值。
106
+
107
+ ## 交付检查清单
108
+
109
+ - [ ] 已检查项目真实主题入口、Token 声明与运行时同步链路。
110
+ - [ ] 业务页面未硬编码品牌色及其交互态色阶。
111
+ - [ ] 主色透明态来自可动态更新的 Token,不依赖未同步的 `--primary-1` fallback。
112
+ - [ ] 状态色、中性色、容器背景和边框使用正确语义 Token。
113
+ - [ ] 已检查 SFC、Less、内联样式、TS 配置和 SVG,不只检查 `style.less`。
114
+ - [ ] 已用至少两种差异明显的主题色验证实际效果。
115
+ - [ ] 项目支持暗色模式时已完成暗色验收。
116
+ - [ ] 保留的固定色值均有明确、合理的非换肤语义。
117
+
118
+ ## 失败兜底策略
119
+
120
+ - 找不到 Token 时,先查项目 `variables.less`、主题 store/config 和 `llms-full.txt`;禁止猜测变量名。
121
+ - 只有颜色值但没有语义 Token 时,先在统一主题源补充语义变量和运行时同步,再在页面消费。
122
+ - 第三方组件不跟随主题时,优先通过 ConfigProvider/component token 或其官方 CSS 变量桥接;最后才使用受控的深度样式覆盖。
123
+ - 浏览器目标不支持 `color-mix()` 时,在主题层生成并同步明确的透明态变量;不要在各页面散落固定透明色。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "YSS UI 主题 Token 使用"
3
+ short_description: "约束业务页面使用可动态换肤的主题 Token,禁止硬编码品牌色"
4
+ default_prompt: "使用 $theme-token-usage 检查并实现页面样式,确保主题色、状态色和明暗模式可动态切换。"
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: vue3-best-practices
3
+ description: 在 Vue3 业务页面、组件和 composable 中规范响应式状态、组件通信、异步竞态与大数精度;实现或重构 Vue3 逻辑时使用。
4
+ ---
5
+
6
+ # Vue3 Best Practices Skill
7
+
8
+ ## 触发条件
9
+
10
+ - 业务页面出现响应式、组件通信、状态管理相关问题。
11
+ - 需要重构复杂组件逻辑到更稳的 Composition API 模式。
12
+ - 需要防止 `v-model`、`watch`、`reactive/ref` 常见误用。
13
+
14
+ ## 不适用场景
15
+
16
+ - 纯样式调整,无状态逻辑修改。
17
+ - 仅写提交信息,不涉及代码实现。
18
+ - 仅做接口层封装,不涉及 Vue 组件行为。
19
+
20
+ ## 硬约束(禁止/必须)
21
+
22
+ - 禁止直接修改 `props`,必须使用 `emit('update:xxx')`。
23
+ - 禁止在模板层写复杂业务逻辑,必须下沉到 `computed` 或 hook。
24
+ - 必须避免深层 watch 滥用,优先明确依赖源。
25
+ - 必须对异步请求做取消或竞态保护,避免旧请求覆盖新状态。
26
+ - 必须在复杂页面中拆 composable,禁止单文件耦合所有逻辑。
27
+ - 导出函数、composable、接口、类型与常量必须使用中文 JSDoc。
28
+ - 接口默认错误由 mutator 统一提示并 reject;业务逻辑只做状态恢复或错误转换,禁止在 `catch` 重复 `message.error`,除非请求显式设置了 `skipErrorHandler`。
29
+ - 在 hook/computed/watch 等业务逻辑里使用接口返回的 number 字段(id、主键、金额、数量等)时,禁止用 `Number()`/`parseInt`/`parseFloat`/`+x`/`*1`/`~~` 做任何数字转换,一律按字符串透传与比较;确需高精度数值计算时用 `decimal.js`/`big.js` 以字符串入参。底层 json-bigint 已存为字符串保精度,详见 `../yss-api-integration/SKILL.md`「大数字与精度」。
30
+
31
+ ## 标准代码骨架
32
+
33
+ ```typescript
34
+ const props = defineProps<{ modelValue: string }>();
35
+ const emit = defineEmits<{ 'update:modelValue': [value: string] }>();
36
+
37
+ const localValue = computed({
38
+ get: () => props.modelValue,
39
+ set: value => emit('update:modelValue', value),
40
+ });
41
+
42
+ const loading = ref(false);
43
+
44
+ /** 请求数据并维护加载状态。 */
45
+ const fetchData = async () => {
46
+ loading.value = true;
47
+ try {
48
+ await api();
49
+ } finally {
50
+ loading.value = false;
51
+ }
52
+ };
53
+ ```
54
+
55
+ ## 交付检查清单
56
+
57
+ - [ ] `props` 单向数据流未被破坏。
58
+ - [ ] `v-model` 实现使用标准 `update:*` 事件。
59
+ - [ ] 异步逻辑具备 loading 与异常处理。
60
+ - [ ] 复杂逻辑已拆分到 composable。
61
+ - [ ] 接口返回的 number 字段在逻辑中保持字符串透传,未被 `Number()`/`parseInt`/`+x` 等转换。
62
+ - [ ] 模板表达式简洁,便于维护和测试。
63
+
64
+ ## 失败兜底策略
65
+
66
+ - 响应式异常时,先定位是 `ref`/`reactive` 选型问题还是解构丢响应。
67
+ - 双向绑定异常时,先检查 `emit` 事件名和参数签名。
68
+ - 组件过重时,先抽离状态 hook,再处理视觉拆分。
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: yedit-table-usage
3
+ description: 指导 YSS UI 业务页面使用 @yss-ui/components 的 YEditTable 实现可编辑表格、行内编辑、添加/删除行、下拉多选与可创建 tags、行级候选联动、表头筛选、校验和查看态;当需求出现编辑表格、明细行、扩展属性、可编辑列或 YEditTableColumn 时使用。
4
+ ---
5
+
6
+ # YEditTable 使用
7
+
8
+ ## 触发条件
9
+
10
+ - 需求包含可编辑表格、行内编辑、明细行、扩展属性、行级候选联动或表格校验。
11
+ - 需要使用 `YEditTableColumn`、`validate()`、`addable`、`filterOptions` 或表头筛选。
12
+
13
+ ## 不适用场景
14
+
15
+ - 主列表只展示和分页:使用 `../ytable-usage/SKILL.md`。
16
+ - 表单主体不是表格:使用 `../yss-formily/SKILL.md`。
17
+
18
+ ## 实施流程
19
+
20
+ 1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YEditTable` 的 Props、Events、Methods、`YEditTableColumn` 和操作列配置;需要添加行、多选/可创建下拉、行级联动或校验时,再用 `get_demo` 获取对应官方 Demo。
21
+ 2. MCP 工具不可用、调用失败或用 `search_docs/list_components` 校正后仍无结果时,才读取最新 `llms-full.txt`;若文档与当前项目依赖版本不一致,用当前源码和导出核验。
22
+ 3. 区分列编辑器、行级候选、表头筛选三种职责,再设计行类型和校验。
23
+ 4. 把行类型、列配置、新行工厂和纯操作配置放到 `constant.ts`;把数据状态、API、联动和事件放到 Hook。
24
+ 5. 显式实现 `@add`、查看态、删除确认与 `validate()` 链路,再对照真实返回类型检查提交。
25
+
26
+ ## 硬约束(禁止/必须)
27
+
28
+ - 业务可编辑表格必须优先使用 `YEditTable`,从 `@yss-ui/components` 导入 `YEditTable`、`YEditTableColumn`、`YTableActionConfig`;不用 `a-table` 手搭编辑态。
29
+ - 有 `component` 的列会由组件自动补齐 `edit-render`,业务列不需要重复写 `editRender: {}`。
30
+ - `component: 'form-item-select'` 的 `props.multiple: true` 表示从现有候选中多选;`props.allowCreate: true` 会进入 Ant Design Vue `tags` 模式,值必须按数组建模。
31
+ - 当前实现中 `multiple` 优先于 `allowCreate`,同时配置并不会得到“多选且可新建”。该需求必须明确说明当前能力缺口,使用自定义插槽或先增强组件,禁止继续生成错误 demo。
32
+ - 行级候选使用 `rowOptionsFieldName` 指定的行字段,或列级 `filterOptions({ field, optionsMap, row })`;不修改全局 `optionsMap` 影响其他行。
33
+ - `filterOptions` 只过滤编辑态候选;表头筛选使用 `filterable + filters + filterMethod`,文本面板优先使用 `filterRender: { name: 'VxeInput', props: {...} }`。
34
+ - `addable` 只渲染添加按钮并发出 `add`,不会自动创建行。必须监听 `@add` 并修改 `v-model:data`;业务插入位置要与 `addPosition` 一致。
35
+ - `disabled` 只禁用表格编辑,不会自动隐藏添加按钮和操作列。查看态必须同时设置 `:addable="false"` 并移除操作列/按钮。
36
+ - 删除使用 `type: 'action' + actionConfig.buttons[].isConfirm`;不默认使用 `Modal.confirm`。
37
+ - `validate()` 真实返回 `Promise<{ valid: boolean; errorMsg: Map<string, string> }>`。组件 ref 未就绪时不得误判为校验成功。
38
+ - 弹窗/抽屉内使用添加按钮时,高度 Hook 配置 `withAddButton: true`;如果同时分页或开启工具栏,一并开启对应偏移。
39
+ - API 失败由 `mutator.ts` 统一提示并 reject。Hook 中不写 `success === false` 分支,不在 `else/catch` 重复 `message.error`;清理状态放在 `finally`。
40
+
41
+ ## 标准代码骨架
42
+
43
+ ```typescript
44
+ import type { YEditTableColumn, YTableActionConfig } from '@yss-ui/components';
45
+
46
+ /** 扩展属性行。 */
47
+ export interface ExtRow {
48
+ id?: string;
49
+ _rowKey: string;
50
+ extName?: string;
51
+ extValues?: string[];
52
+ memo?: string;
53
+ }
54
+
55
+ /** 可编辑表格列。 */
56
+ export const EDIT_COLUMNS: YEditTableColumn[] = [
57
+ {
58
+ field: 'extName',
59
+ title: '扩展属性',
60
+ minWidth: 220,
61
+ component: 'form-item-select',
62
+ props: { placeholder: '请选择扩展属性' },
63
+ customRule: (value, _row, _field, all) => {
64
+ if (!value) return { errMsg: '扩展属性不能为空' };
65
+ if (all.filter(item => item.extName === value).length > 1) return { errMsg: '扩展属性不能重复' };
66
+ return {};
67
+ },
68
+ },
69
+ {
70
+ field: 'extValues',
71
+ title: '扩展值',
72
+ minWidth: 240,
73
+ component: 'form-item-select',
74
+ props: { multiple: true, placeholder: '请选择扩展值' },
75
+ customRule: value =>
76
+ Array.isArray(value) && value.some(item => String(item).length > 100)
77
+ ? { errMsg: '单个扩展值最多 100 个字符' }
78
+ : {},
79
+ },
80
+ {
81
+ field: 'memo',
82
+ title: '备注',
83
+ minWidth: 240,
84
+ component: 'form-item-input',
85
+ props: { placeholder: '请输入备注' },
86
+ customRule: value => (String(value ?? '').length > 200 ? { errMsg: '最多 200 个字符' } : {}),
87
+ },
88
+ { type: 'action', title: '操作', width: 100, fixed: 'right' },
89
+ ];
90
+
91
+ /** 表格字典数据;实际项目可由 Hook 响应式提供。 */
92
+ export const EDIT_OPTIONS_MAP = {
93
+ extName: [
94
+ { label: '类型', value: 'type' },
95
+ { label: '级别', value: 'level' },
96
+ ],
97
+ extValues: [
98
+ { label: '默认', value: 'default' },
99
+ { label: '扩展', value: 'extended' },
100
+ ],
101
+ };
102
+
103
+ /** 创建前端新行。 */
104
+ export const createEmptyRow = (): ExtRow => ({
105
+ _rowKey: `temp-${Date.now()}-${Math.random().toString(36).slice(2)}`,
106
+ extValues: [],
107
+ });
108
+
109
+ /** 创建带删除确认的操作配置。 */
110
+ export const createActionConfig = (onDelete: (row: ExtRow) => void): YTableActionConfig => ({
111
+ buttons: [
112
+ {
113
+ value: 'delete',
114
+ label: '删除',
115
+ type: 'link',
116
+ isConfirm: true,
117
+ confirmProps: { title: '是否确认删除此条数据?', okText: '确定', cancelText: '取消' },
118
+ click: ({ row }) => onDelete(row),
119
+ },
120
+ ],
121
+ });
122
+ ```
123
+
124
+ ```vue
125
+ <script setup lang="ts">
126
+ import { computed, ref } from 'vue';
127
+ import { YEditTable } from '@yss-ui/components';
128
+ import { createActionConfig, createEmptyRow, EDIT_COLUMNS, EDIT_OPTIONS_MAP, type ExtRow } from './constant';
129
+
130
+ /** 组件模式。0-新增,1-编辑,2-查看。 */
131
+ interface Props {
132
+ mode: 0 | 1 | 2;
133
+ }
134
+
135
+ const props = defineProps<Props>();
136
+ const rows = ref<ExtRow[]>([]);
137
+ const tableRef = ref<InstanceType<typeof YEditTable>>();
138
+ const readonly = computed(() => props.mode === 2);
139
+ const columns = computed(() => (readonly.value ? EDIT_COLUMNS.filter(column => column.type !== 'action') : EDIT_COLUMNS));
140
+ const actionConfig = createActionConfig(row => {
141
+ rows.value = rows.value.filter(item => item._rowKey !== row._rowKey);
142
+ });
143
+
144
+ /** 处理组件 add 事件,显式更新 v-model:data。 */
145
+ const handleAddRow = () => {
146
+ rows.value = [...rows.value, createEmptyRow()];
147
+ };
148
+
149
+ /** 校验全部编辑行。 */
150
+ const validateRows = async (): Promise<boolean> => {
151
+ if (!tableRef.value) return false;
152
+ const { valid } = await tableRef.value.validate();
153
+ return valid;
154
+ };
155
+ </script>
156
+
157
+ <template>
158
+ <YEditTable
159
+ ref="tableRef"
160
+ v-model:data="rows"
161
+ :columns="columns"
162
+ :action-config="actionConfig"
163
+ :options-map="EDIT_OPTIONS_MAP"
164
+ :row-config="{ keyField: '_rowKey', useKey: true }"
165
+ :table-config="{ editConfig: { trigger: 'click', mode: 'row', autoClear: false } }"
166
+ :disabled="readonly"
167
+ :addable="!readonly"
168
+ add-btn-text="添加一行"
169
+ add-position="bottom"
170
+ @add="handleAddRow"
171
+ />
172
+ </template>
173
+
174
+ <style scoped lang="less">
175
+ @import './style.less';
176
+ </style>
177
+ ```
178
+
179
+ ## Select 值类型边界
180
+
181
+ ```typescript
182
+ /** allowCreate 对应 tags 模式,字段按数组存储。 */
183
+ interface CreatableRow {
184
+ tags?: string[];
185
+ }
186
+
187
+ const creatableColumn: YEditTableColumn = {
188
+ field: 'tags',
189
+ title: '标签',
190
+ component: 'form-item-select',
191
+ props: { allowCreate: true, placeholder: '请选择或输入标签' },
192
+ };
193
+ ```
194
+
195
+ ## 表头筛选
196
+
197
+ ```typescript
198
+ const textFilterColumn: YEditTableColumn = {
199
+ field: 'columnName',
200
+ title: '目标列名称',
201
+ component: 'form-item-input',
202
+ filterable: true,
203
+ filters: [{ data: '' }],
204
+ filterMethod: ({ option, cellValue }) =>
205
+ String(cellValue ?? '').toLowerCase().includes(String(option?.data ?? '').trim().toLowerCase()),
206
+ filterRender: { name: 'VxeInput', props: { clearable: true, placeholder: '请输入关键词' } },
207
+ };
208
+ ```
209
+
210
+ - 远程筛选监听 `@filter-change`,并设置 `filterMethod: () => true` 禁用本地二次筛选。
211
+ - 切换数据源或新增行后,可调用 `tableRef.value?.getTableInstance()?.clearFilter()`。
212
+ - 只在面板高度定制时使用 `#<field>-filter`;修改 `option.data` 后调用 `updateFilterOptionStatus(option, !!option.data)` 同步状态。
213
+
214
+ ## 交付检查清单
215
+
216
+ - [ ] `addable/@add/v-model:data/addPosition` 形成真实新增闭环。
217
+ - [ ] `allowCreate` 和 `multiple` 未被错误组合,行字段类型与 Select 模式匹配。
218
+ - [ ] 查看态同时禁用编辑、隐藏添加按钮和移除操作列。
219
+ - [ ] `validate()` 按 `{ valid, errorMsg }` 处理,组件 ref 未就绪时不提交。
220
+ - [ ] API Hook 没有重复 `message.error`,前端临时 key 不传给后端。
221
+
222
+ ## 失败兜底策略
223
+
224
+ - 添加按钮无反应时,先确认已监听 `@add` 并更新 `v-model:data`,不继续调整 `addPosition`。
225
+ - 查看态仍能删除/添加时,移除操作列并将 `addable` 设为 `false`,不只依赖 `disabled`。
226
+ - 可创建多选与字段类型冲突时,回到 `allowCreate => tags 数组`、`multiple => 现有候选多选` 的真实实现;当前组合能力不足时明确报告。
227
+ - API 联动失败时在 `finally` 恢复行级 loading,不捕获后重复 `message.error` 或继续使用失败结果。
@@ -1,11 +1,13 @@
1
1
  ---
2
- name: api-integration
2
+ name: yss-api-integration
3
3
  description: Guide AI to correctly use Orval-generated API clients in Vue 3 micro-applications. This skill must be used whenever the user needs backend API integration, including list queries, CRUD actions, detail loading, submit flows, or API refactoring. It covers type-safe API imports, request/response mapping, and especially standardized useRequest integration patterns (manual/run/runAsync, pagination parameters, unified error handling, loading state, and success callbacks).
4
4
  ---
5
5
 
6
6
  # API 集成 Skill
7
7
 
8
- 目录与锁文件身份是 `yss-api-integration`;Agent 发现名与 Router 闭包键是 `api-integration`。二者指向同一技能,注册表以 alias 对齐。
8
+ 本目录是 API 集成的 canonical 技能;历史名称 `api-integration` 仅通过注册表和 Router alias 解析,不再维护第二份内容。
9
+
10
+ 目录、frontmatter、注册表 ID 和 Router canonical 闭包键均为 `yss-api-integration`;历史名称 `api-integration` 只在注册表和 Router alias 表中解析为本技能。
9
11
 
10
12
  ## 📋 目标
11
13
 
@@ -56,6 +58,14 @@ packages/src/api/
56
58
 
57
59
  ## 🚀 使用步骤
58
60
 
61
+ ## YSS canonical execution rules
62
+
63
+ - 先检查当前生成文件、`mutator.ts` 和冻结的 OpenAPI JSON 派生证据,不根据示例猜测导出名或响应形状。
64
+ - 普通 JSON 请求中,`success === false` 已由 mutator reject;业务 Hook 不得再写 `if (res?.success)` 或重复 `message.error`。
65
+ - loading 在 `finally` 中恢复;只有显式传入 `skipBusinessError` 或 `skipErrorHandler` 时,才允许实现局部错误交互。
66
+ - 文件流必须保留 `{ data, headers }`,交给 `file-export-download` 的 `handleBlobResponse`;不得修改生成文件。
67
+ - 长整型 ID 按冻结契约保持字符串,不得用 `Number`、`parseInt` 或位运算恢复为 number。
68
+
59
69
  ### 1. 查看可用 API
60
70
 
61
71
  打开 `packages/src/api/generated/api.ts` 查看所有可用的 API 函数。
@@ -12,7 +12,7 @@ description: Use when YSS Vue 页面涉及布局、YTable、YEditTable、YFormil
12
12
  - YSS UI 组件文档:`http://192.168.164.27:3200/components`(组件契约以该手册为准;本技能依据 2026-08-18 可见内容整理)
13
13
  - 本地引用索引:`references/frontend-docs.md`
14
14
 
15
- 本技能只负责页面组件、布局和交互呈现规范。请求、分页参数、接口映射交给 `yss-hook` 或 `api-integration`;完整页面生成流程交给 `yss-page-module-development`;表格/树高度细节交给 `yss-use-table-height` 或 `yss-use-tree-height`。
15
+ 本技能只负责页面组件、布局和交互呈现规范。请求、分页参数、接口映射交给 `yss-hook` 或 `yss-api-integration`;完整页面生成流程交给 `yss-page-module-development`;表格/树高度细节交给 `yss-use-table-height` 或 `yss-use-tree-height`。
16
16
 
17
17
  组件文档与当前项目的已验证用法冲突时,先检查当前项目代码和依赖版本,再决定是否迁移;不得把上游 Ant Design Vue、vxe-table、Univer 或 Monaco 的未验证 API 当作 YSS 顶层契约。
18
18