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,11 @@
1
+ # YSS UI Hooks 速查
2
+
3
+ 业务页面生成时优先从 `@yss-ui/hooks` 复用 hooks。
4
+
5
+ ## 高度与异步
6
+
7
+ - `useTableHeight` 和 `useTreeHeight` 必须绑定真实容器 `ref`,并按页面的分页、工具栏、搜索区选择扣除项。
8
+ - `useLoading` 负责异步 loading 和错误边界;Orval mutator 已提示的错误不得在 `onError` 重复提示。
9
+ - `usePollingTask` 只负责轮询调度,不接管页面的 `loading/data/error`。
10
+ - `useUrlState` 用于把查询条件、分页和 Tab 状态同步到 URL。
11
+ - `useFullscreen` 用于容器、图表或编辑器全屏。
@@ -0,0 +1,14 @@
1
+ # YSS UI Utils 速查
2
+
3
+ 业务页面生成时优先从 `@yss-ui/utils` 复用工具函数,避免重复实现。
4
+
5
+ ## 常用工具
6
+
7
+ - 权限:`getAuthBtns`、`hasAuth`、`getBtnInfo`、`clearAuthInfo`。
8
+ - 复制:`copyToClipboard(text)`。
9
+ - 下载:`downloadFileStream`、`getFileNameFromContentDisposition`、`handleBlobResponse`、`downloadFileFromUrl`。
10
+ - 格式化:`formatMoney`、`formatDate`、`formatFileSize`、`formatDateRelative`。
11
+ - 主题:`applyYssTheme`、`lightenColor`、`darkenColor`。
12
+ - URL:`getUrlData`。
13
+
14
+ 接口导出下载必须读取 `file-export-download` 专项技能,优先复用统一的 Blob 响应处理,不在页面 Hook 重复解析文件名和创建下载链接。
@@ -88,6 +88,9 @@ workflow_execution_result:
88
88
  removal_target: schema_version_2
89
89
  result_values: [completed, blocked, needs-human, failed]
90
90
  required: [result_schema, work_unit, workflow_reference, result, evidence_refs, changed_artifacts, new_impacts, stale_candidates, next_route, blocking_signals]
91
+ unavailable_skill:
92
+ required: [skill, provider, fallback, resolution]
93
+ blocking_result: blocked
91
94
  blocking_signals: [drift, new_impacts, violation, missing_evidence, stale_candidates]
92
95
  completed_requires_empty: [new_impacts, stale_candidates]
93
96
  completed_requires_non_empty: [evidence_refs]
@@ -130,43 +133,101 @@ lifecycle_native_entries:
130
133
  work_unit_routes:
131
134
  work-unit.discovery-opportunity:
132
135
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
136
+ primary_skill: yss-product-lifecycle
137
+ supporting_skills: [competitive-intelligence, research]
133
138
  skills: [competitive-intelligence, research]
134
139
  route_by: {market_or_competitor_fact: competitive-intelligence, technical_or_standard_fact: research, no_external_fact: yss-product-lifecycle}
140
+ applies_when: opportunity_or_external_fact_requires_validation
141
+ not_applicable_reason: no_external_fact
135
142
  work-unit.discovery-requirements:
136
143
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
144
+ primary_skill: yss-product-lifecycle
145
+ supporting_skills: [grilling, domain-modeling]
137
146
  skills: [grilling, domain-modeling]
147
+ applies_when: requirements_or_domain_boundary_unclear
148
+ not_applicable_reason: requirements_already_confirmed
138
149
  work-unit.spec-synthesis:
139
150
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
151
+ primary_skill: yss-product-lifecycle
152
+ supporting_skills: [domain-modeling]
140
153
  compatibility: {source: mattpocock/skills, skill: to-spec, invocation_mode: reference, formal_artifact_owner: explicit-user-entry}
141
154
  skills: [domain-modeling]
142
155
  human_gate: spec-baseline
156
+ applies_when: new_feature_or_behavior_change
157
+ not_applicable_reason: existing_frozen_spec_is_current
143
158
  work-unit.prototype-design:
144
159
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
145
- skills: [yss-design-system, yss-prototype-stage, yss-antd-design, product-design:index]
160
+ primary_skill: yss-prototype-stage
161
+ supporting_skills: [prototype-review, yss-design-system, yss-antd-design, product-design:index]
162
+ skills: [prototype-review, yss-design-system, yss-prototype-stage, yss-antd-design, product-design:index]
146
163
  human_gate: prototype-confirmation
164
+ applies_when: product_design_impact
165
+ not_applicable_reason: no_ui_or_product_design_impact
147
166
  work-unit.technical-analysis:
148
167
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
168
+ primary_skill: yss-router
169
+ supporting_skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding]
149
170
  skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-router]
150
171
  human_gate: openapi-freeze_if_api_impact
172
+ applies_when: technical_or_contract_impact
173
+ not_applicable_reason: no_technical_or_contract_impact
151
174
  work-unit.ticket-decomposition:
152
175
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
176
+ primary_skill: yss-product-lifecycle
177
+ supporting_skills: [yss-router]
153
178
  compatibility: {source: mattpocock/skills, skill: to-tickets, invocation_mode: reference, formal_artifact_owner: explicit-user-entry}
154
179
  skills: [yss-router]
180
+ applies_when: frozen_scope_ready_for_slicing
181
+ not_applicable_reason: contract_or_scope_not_frozen
155
182
  work-unit.slice-implementation:
156
183
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
184
+ primary_skill: yss-router
185
+ supporting_skills: [tdd, yss-ui, yss-page-module-development]
157
186
  compatibility: {source: mattpocock/skills, skill: implement, invocation_mode: reference, formal_artifact_owner: explicit-user-entry}
158
187
  skills: [tdd, yss-router, yss-ui, yss-page-module-development]
188
+ frontend_route:
189
+ primary_skill: yss-ui
190
+ page_orchestration_skill: yss-page-module-development
191
+ conditional_skills:
192
+ api_impact: [yss-api-integration]
193
+ formily_impact: [yss-formily, formily-foundation, formily-linkage-effects, formily-mode-slot-detail, formily-step-flow]
194
+ table_impact: [ytable-usage, yedit-table-usage]
195
+ tree_impact: [ytree-usage]
196
+ height_impact: [yss-use-table-height, yss-use-tree-height]
197
+ export_impact: [file-export-download]
198
+ theme_impact: [theme-token-usage]
199
+ not_applicable_reasons:
200
+ api_impact: no_api_impact
201
+ formily_impact: no_formily_impact
202
+ table_impact: no_table_impact
203
+ tree_impact: no_tree_impact
204
+ height_impact: no_height_impact
205
+ export_impact: no_export_impact
206
+ theme_impact: no_theme_impact
207
+ applies_when: ready_for_agent
208
+ not_applicable_reason: slice_contract_not_approved
159
209
  work-unit.frontend-implementation-verification:
160
210
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
211
+ primary_skill: yss-ui
212
+ supporting_skills: [yss-design-system, code-review]
161
213
  skills: [yss-ui, yss-design-system, code-review]
162
214
  applies_when: ui_impact
215
+ not_applicable_reason: no_ui_impact
163
216
  work-unit.code-review:
164
217
  native: {source: yss-product-lifecycle, skill: code-review, invocation_mode: model-invoked}
218
+ primary_skill: code-review
219
+ supporting_skills: []
165
220
  skills: [code-review]
221
+ applies_when: implementation_candidate_exists
222
+ not_applicable_reason: no_implementation_candidate
166
223
  work-unit.release-and-retrospective:
167
224
  native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
225
+ primary_skill: yss-product-lifecycle
226
+ supporting_skills: []
168
227
  skills: [yss-product-lifecycle]
169
228
  human_gate: merge_or_release
229
+ applies_when: release_or_stage_completion
230
+ not_applicable_reason: work_not_ready_for_release
170
231
 
171
232
  compatibility_flow_preconditions:
172
233
  to-spec:
@@ -9,7 +9,7 @@ Use this reference when multiple YSS skills seem applicable.
9
9
  - `yss-page-module-development`: Page/module workflow. Use for creating or reorganizing a page folder, deciding structure, and assembling page, hooks, schemas, and blocks.
10
10
  - `yss-components`: Component layout and visual/page composition rules. Use for YTable/YTree/YssFormily/YSplitPane usage details.
11
11
  - `yss-hook`: Request, pagination, parameter, tree-selection, and response-mapping logic in `views/**/hooks/useXxx.ts`.
12
- - `api-integration`: Orval-generated API client imports, request/response mapping, `useRequest` calling patterns, submit/list/detail flows.
12
+ - `yss-api-integration`: Orval-generated API client imports, request/response mapping, `useRequest` calling patterns, submit/list/detail flows.
13
13
  - `yss-formily`: Hand-written YssFormily schema implementation and form behavior.
14
14
  - `yss-formily-schema-generator`: Generate YssFormily schema from requirements, screenshots, mockups, Figma, or natural-language field descriptions.
15
15
  - `yss-use-table-height`: Only table available-height calculation and required container/pagination/toolbar wiring.
@@ -4,6 +4,10 @@ forbidden_statuses: [approved, ready-for-agent, completed]
4
4
  skill_aliases:
5
5
  api-integration: yss-api-integration
6
6
  microapp-commit: yss-microapp-commit
7
+ page-module-development: yss-page-module-development
8
+ yss-ui-business-page-generation: yss-page-module-development
9
+ use-table-height: yss-use-table-height
10
+ use-tree-height: yss-use-tree-height
7
11
  implementation_path_policy:
8
12
  applies_to: harness-resident-runtime-code
9
13
  project_roots:
@@ -169,8 +173,8 @@ dependency_closure:
169
173
  when_components: [yss-components]
170
174
  when_hooks: [yss-hook]
171
175
  when_form: [yss-formily]
172
- when_api: [api-integration]
173
- api-integration:
176
+ when_api: [yss-api-integration]
177
+ yss-api-integration:
174
178
  when_regeneration: [yss-openapi-governance]
175
179
 
176
180
  component_impact_values:
@@ -59,7 +59,7 @@ pnpm why vue @yss-ui/components @yss-ui/hooks ant-design-vue vxe-table
59
59
  | Formily schema、联动、校验、详情态 | `yss-formily` |
60
60
  | 表格高度 | `yss-use-table-height` |
61
61
  | 树高度 | `yss-use-tree-height` |
62
- | Orval、API、useRequest 接入 | `api-integration` |
62
+ | Orval、API、useRequest 接入 | `yss-api-integration` |
63
63
  | 视觉、token、响应式体验 | `yss-design-system` |
64
64
 
65
65
  不得引用不存在的复数 Hook skill 名称。
@@ -5,6 +5,15 @@ description: Use when working with YTable that needs responsive height, paginati
5
5
 
6
6
  # useTableHeight 表格高度计算 Hook
7
7
 
8
+ 本目录是表格高度的 canonical 技能;历史名称 `use-table-height` 仅通过注册表和 Router alias 解析。
9
+
10
+ ## YSS canonical execution rules
11
+
12
+ - 使用真实签名 `useTableHeight(containerRef, options)`,结果解构为 `tableHeight`、`isReady` 和 `recalculateHeight`。
13
+ - `YTable` 必须绑定 `:height="tableHeight"`;不要只绑定 `max-height`,也不要用固定魔法高度替代 Hook。
14
+ - `pageable`、工具栏和 `YEditTable` 添加按钮分别对应 `withPagination`、`withToolbar` 和 `withAddButton`。
15
+ - 容器使用 `flex: 1; min-height: 0; overflow: hidden`,避免观察由表格内容反向撑开的直属容器。
16
+
8
17
  ## Authoritative Docs And Boundary
9
18
 
10
19
  - YSS UI hooks documentation: `http://192.168.164.27:3200/hooks`
@@ -5,6 +5,15 @@ description: Use when working with YTree that needs responsive height, virtual s
5
5
 
6
6
  # useTreeHeight 树组件高度计算 Hook
7
7
 
8
+ 本目录是树高度的 canonical 技能;历史名称 `use-tree-height` 仅通过注册表和 Router alias 解析。
9
+
10
+ ## YSS canonical execution rules
11
+
12
+ - 使用真实签名 `useTreeHeight(containerRef, options)`,结果绑定到 `YTree` 的 `:height`。
13
+ - `filterable` 时配置 `extraOffset: YTREE_SEARCH_HEIGHT`;不得重复扣减或添加无依据偏移。
14
+ - 容器使用 `flex: 1; min-height: 0; overflow: hidden`,隐藏态切换后在可见的 `nextTick` 中调用 `recalculateHeight()`。
15
+ - 不因节点数量少而强制开启虚拟滚动;按实际可见节点阈值决定是否裁剪 DOM。
16
+
8
17
  ## Authoritative Docs And Boundary
9
18
 
10
19
  - YSS UI hooks documentation: `http://192.168.164.27:3200/hooks`
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: ytable-usage
3
+ description: 指导 YSS UI 业务列表页、CRUD 表格、远程分页、操作列、气泡确认、列筛选、字典翻译、行拖拽、工具栏和自定义插槽正确使用 @yss-ui/components 的 YTable;当需要配置 YTableColumn、YTableActionConfig、pagination、filter-change 或表格实例方法时使用。
4
+ ---
5
+
6
+ # YTable 使用
7
+
8
+ ## 触发条件
9
+
10
+ - 生成或修改业务列表、CRUD 表格、远程分页、操作列、列筛选、工具栏或行拖拽。
11
+ - 需要配置 `YTableColumn`、`YTableActionConfig`、分页状态或表格实例方法。
12
+
13
+ ## 不适用场景
14
+
15
+ - 可编辑表格是核心需求:使用 `../yedit-table-usage/SKILL.md`。
16
+ - 页面只有短小静态数据且不需要表格交互。
17
+
18
+ ## 实施流程
19
+
20
+ 1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YTable` 的 Props、Events、Slots、Types 与实例方法;需要远程分页、筛选、操作列、拖拽或工具栏时,再用 `get_demo` 获取对应官方 Demo。
21
+ 2. MCP 工具不可用、调用失败或用 `search_docs/list_components` 校正后仍无结果时,才读取最新 `llms-full.txt`;若文档与当前项目依赖版本不一致,用当前源码和导出核验。
22
+ 3. 把远程数据、`loading`、分页映射、API 调用和事件处理放入 Hook;把列定义和纯配置放入 `constant.ts`。
23
+ 4. 在模板中组合 `data/columns/loading/pagination`,并根据真实开启的工具栏和分页配置高度 Hook。
24
+ 5. 完成后核对删除确认、远程筛选、分页字段映射和 API 错误处理边界。
25
+
26
+ ## 硬约束(禁止/必须)
27
+
28
+ - 必须从 `@yss-ui/components` 导入 `YTable`、`YTableColumn`、`YTableActionConfig` 等真实导出,不使用 `a-table` 实现业务主表格。
29
+ - 远程分页状态使用 `current/pageSize/total/remote`,显式设置 `remote: true`;后端 `pageIndex/pageSize/totalCount` 只在 Hook 中映射。
30
+ - 开启内置分页时传 `pageable`,受控更新使用 `v-model:pagination`,请求时机使用 `@page-change="handlePageChange"`。
31
+ - `page-change` 事件参数固定为 `{ current: number, pageSize: number }`;回调必须读取 `current`,禁止写成组件不会派发的 `currentPage`。
32
+ - YTable 没有 `request` 或 `searchParams` Props;远程查询由业务 Hook 管理。`refresh()` 是真实实例方法,内部调用 vxe-table `updateData()` 刷新当前表格数据,不等于重新调用后端接口。
33
+ - 行键使用 `:row-config="{ keyField: 'id', useKey: true }"`,不臆造 `row-key` Prop。
34
+ - 新增、导入、批量操作等主按钮直接放入 `#toolbar-right` 或 `#toolbar-left` 插槽即可自动渲染工具栏;**无需配置 `:toolbar-config="{ custom: true }"`**,避免无端展示列设置图标;**仅在业务明确需要列设置时才传入 `:toolbar-config="{ custom: true }"`**。
35
+ - 删除、启停、发布等危险操作使用 `actionConfig.buttons[].isConfirm = true`,不默认使用 `Modal.confirm`。
36
+ - 列配置超过 10 行时放入 `constant.ts`;需要调用组件 Hook 的操作配置使用工厂函数注入回调,禁止在 `constant.ts` 直接引用组件局部的 `openEdit/deleteItem`。
37
+ - 远程筛选必须提供稳定 `filters`,设置 `filterMethod: () => true` 禁用本地二次过滤,并监听 `filter-change`。
38
+ - 自适应滚动列表绑定 `:height="tableHeight"`;`pageable`、工具栏分别对应 `withPagination: true`、`withToolbar: true`。纯短表不强制引入高度 Hook。
39
+ - `mutator.ts` 已对网络错误和 `success === false` 统一 `message.error` 并 reject。API Hook 不再检查 `success === false`,不在 `else/catch` 重复 `message.error`;用 `finally` 恢复 loading,让异常继续中断流程。
40
+
41
+ ## 标准代码骨架
42
+
43
+ ```typescript
44
+ import type { YTableActionConfig, YTableColumn } from '@yss-ui/components';
45
+
46
+ /** 列表行数据。 */
47
+ export interface ItemRow {
48
+ id: string;
49
+ name: string;
50
+ status: string;
51
+ }
52
+
53
+ /** 状态字典。 */
54
+ export const STATUS_OPTIONS = [
55
+ { label: '启用', value: '1' },
56
+ { label: '停用', value: '0' },
57
+ ];
58
+
59
+ /** 列表固定列配置。 */
60
+ export const TABLE_COLUMNS: YTableColumn[] = [
61
+ { type: 'seq', title: '序号', width: 70 },
62
+ { field: 'name', title: '名称', minWidth: 180 },
63
+ { field: 'status', title: '状态', width: 120, isTransform: true },
64
+ { type: 'action', title: '操作', width: 180 },
65
+ ];
66
+
67
+ /** 按组件 Hook 提供的回调创建操作列配置。 */
68
+ export const createActionConfig = (handlers: {
69
+ onEdit: (row: ItemRow) => void;
70
+ onDelete: (row: ItemRow) => Promise<void>;
71
+ }): YTableActionConfig => ({
72
+ width: 180,
73
+ fixed: 'right',
74
+ buttons: [
75
+ { value: 'edit', label: '编辑', type: 'link', click: ({ row }) => handlers.onEdit(row) },
76
+ {
77
+ value: 'delete',
78
+ label: '删除',
79
+ type: 'link',
80
+ isConfirm: true,
81
+ confirmProps: { title: '确认删除该数据吗?', okText: '确定', cancelText: '取消' },
82
+ click: ({ row }) => handlers.onDelete(row),
83
+ },
84
+ ],
85
+ });
86
+ ```
87
+
88
+ ## 远程分页 Hook 关键模式
89
+
90
+ ```typescript
91
+ import { ref } from 'vue';
92
+ import type { YTablePagination } from '@yss-ui/components';
93
+ import type { ItemRow } from '../constant';
94
+
95
+ /** 列表 API 依赖,由当前项目的 Orval 函数适配。 */
96
+ export interface ItemListApi {
97
+ queryPage: (params: { pageIndex: number; pageSize: number }) => Promise<{
98
+ list?: ItemRow[];
99
+ totalCount?: number;
100
+ }>;
101
+ deleteItem: (params: { id: string }) => Promise<unknown>;
102
+ }
103
+
104
+ /** 管理 YTable 远程分页和删除刷新。 */
105
+ export const useItemList = (api: ItemListApi) => {
106
+ const dataList = ref<ItemRow[]>([]);
107
+ const loading = ref(false);
108
+ const pagination = ref<YTablePagination>({ current: 1, pageSize: 20, total: 0, remote: true });
109
+
110
+ /** 查询当前页;错误提示由 mutator 统一处理。 */
111
+ const loadList = async () => {
112
+ loading.value = true;
113
+ try {
114
+ const result = await api.queryPage({
115
+ pageIndex: pagination.value.current,
116
+ pageSize: pagination.value.pageSize,
117
+ });
118
+ dataList.value = result.list ?? [];
119
+ pagination.value = { ...pagination.value, total: result.totalCount ?? 0 };
120
+ } finally {
121
+ loading.value = false;
122
+ }
123
+ };
124
+
125
+ /** 同步 YTable 分页状态并重新查询。 */
126
+ const handlePageChange = async ({ current, pageSize }: { current: number; pageSize: number }) => {
127
+ pagination.value = { ...pagination.value, current, pageSize };
128
+ await loadList();
129
+ };
130
+
131
+ /** 删除后刷新列表;不重复弹出 API 错误。 */
132
+ const handleDelete = async (row: ItemRow) => {
133
+ await api.deleteItem({ id: row.id });
134
+ await loadList();
135
+ };
136
+
137
+ return { dataList, loading, pagination, loadList, handlePageChange, handleDelete };
138
+ };
139
+ ```
140
+
141
+ ```vue
142
+ <script setup lang="ts">
143
+ import { onMounted, ref } from 'vue';
144
+ import { YButton, YTable } from '@yss-ui/components';
145
+ import { useTableHeight } from '@yss-ui/hooks';
146
+ import { createActionConfig, STATUS_OPTIONS, TABLE_COLUMNS, type ItemRow } from './constant';
147
+ import { useItemList, type ItemListApi } from './hooks/useItemList';
148
+
149
+ /** 列表实例的 API 依赖。 */
150
+ interface Props {
151
+ api: ItemListApi;
152
+ }
153
+
154
+ const props = defineProps<Props>();
155
+ const emit = defineEmits<{
156
+ create: [];
157
+ edit: [row: ItemRow];
158
+ }>();
159
+ const tableAreaRef = ref<HTMLDivElement>();
160
+ const { tableHeight } = useTableHeight(tableAreaRef, { withPagination: true, withToolbar: true });
161
+ const { dataList, loading, pagination, loadList, handlePageChange, handleDelete } = useItemList(props.api);
162
+ const actionConfig = createActionConfig({
163
+ onEdit: row => emit('edit', row),
164
+ onDelete: handleDelete,
165
+ });
166
+
167
+ onMounted(loadList);
168
+ </script>
169
+
170
+ <template>
171
+ <div ref="tableAreaRef" class="table-area">
172
+ <YTable
173
+ :data="dataList"
174
+ :columns="TABLE_COLUMNS"
175
+ :action-config="actionConfig"
176
+ :loading="loading"
177
+ :options-map="{ status: STATUS_OPTIONS }"
178
+ :row-config="{ keyField: 'id', useKey: true }"
179
+ :height="tableHeight"
180
+ pageable
181
+ v-model:pagination="pagination"
182
+ @page-change="handlePageChange"
183
+ >
184
+ <template #toolbar-right>
185
+ <YButton type="primary" @click="emit('create')">新增</YButton>
186
+ </template>
187
+ </YTable>
188
+ </div>
189
+ </template>
190
+
191
+ <style scoped lang="less">
192
+ @import './style.less';
193
+ </style>
194
+ ```
195
+
196
+ ```less
197
+ /* style.less */
198
+ .table-area {
199
+ height: 100%;
200
+ min-height: 0;
201
+ overflow: hidden;
202
+ }
203
+ ```
204
+
205
+ ## 表格多选与批量操作标准模式
206
+
207
+ 当业务需要 Checkbox 多选与批量操作(如批量删除、批量导出、批量启用)时,遵循以下规范:
208
+
209
+ 1. **列配置**:首列必须声明 `{ type: 'checkbox', width: 50, fixed: 'left', align: 'center' }`。
210
+ 2. **行唯一键**:必须显式指定 `:row-config="{ keyField: 'id', useKey: true }"`(`keyField` 与业务主键如 `userCode` 对齐)。
211
+ 3. **受控双向绑定**:推荐优先使用 `v-model:selected-row-keys="selectedRowKeys"` 或 `v-model:selected-rows="selectedRows"`,或者统一监听 `@selection-change`。
212
+ 4. **批量操作按钮**:放在 `#toolbar-right`,并配置 `:disabled="selectedRowKeys.length === 0"`。
213
+ 5. **清空选中态**:批量操作成功后,直接重置 `selectedRowKeys.value = []` 或调用 `tableRef.value.clearSelection()`。
214
+
215
+ ```vue
216
+ <YTable
217
+ ref="tableRef"
218
+ v-model:selected-row-keys="selectedRowKeys"
219
+ :row-config="{ keyField: 'id', useKey: true }"
220
+ :data="dataList"
221
+ :columns="TABLE_COLUMNS"
222
+ pageable
223
+ v-model:pagination="pagination"
224
+ @page-change="handlePageChange"
225
+ >
226
+ <template #toolbar-right>
227
+ <YButton :disabled="selectedRowKeys.length === 0" @click="handleBatchDelete">批量删除</YButton>
228
+ </template>
229
+ </YTable>
230
+ ```
231
+
232
+ ## 插槽与实例边界
233
+
234
+ - 优先使用 kebab-case:单元格 `#<field>`、表头 `#<field>-header`、筛选 `#<field>-filter`、工具栏 `#toolbar-left/#toolbar-right`、展开行 `#expand-row`、分组表头 `#group-header`、更多图标 `#action-more-icon`。
235
+ - `getTableInstance()`、`refresh()`、`recalculate()`、`clearSelection()`、`getSelectedRows()`、`getSelectedRowKeys()`、`setSelection()`、`getPaginationInstance()` 是真实暴露方法;只在对应语义下使用。
236
+
237
+ ## 交付检查清单
238
+
239
+ - [ ] 分页状态和 `page-change` 参数均使用 `current/pageSize`,未使用 `currentPage`;`filter-change` 与 YTable 真实 API 一致。
240
+ - [ ] 多选列已配置 `type: 'checkbox'`,已设置 `:row-config="{ keyField: 'xxx', useKey: true }"`,批量按钮绑定了 `selectedRowKeys.length === 0` 禁用。
241
+ - [ ] 批量操作成功后已重置 `selectedRowKeys` 并调用 `tableRef.clearSelection()`。
242
+ - [ ] 未使用虚构 `request/searchParams/row-key` Props,也未把 `refresh()` 当成远程请求。
243
+ - [ ] 工具栏、字典翻译、操作确认与高度偏移均与实际开关一致。
244
+ - [ ] API Hook 没有 `success === false` 分支或重复 `message.error`。
245
+
246
+ ## 失败兜底策略
247
+
248
+ - 分页字段混乱时,在 Hook 中分离 YTable 状态和后端参数,不直接把 `pageIndex/totalCount` 绑到组件。
249
+ - 操作过多时使用 `displayLimit` 和更多菜单;远程刷新失效时回到业务 `loadList()`,不把实例 `refresh()` 当成接口请求。
250
+ - API 失败后只在 `finally` 恢复本地 loading,让 mutator 的 reject 继续中断删除后刷新等后续流程。
251
+
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: ytree-usage
3
+ description: 指导 YSS UI 左树右表、组织树、分类树、目录树和节点管理页使用 @yss-ui/components 的 YTree,覆盖 fieldNames 字段映射、搜索过滤、受控选中、节点动作、删除确认、虚拟滚动和自适应高度;当生成或修改树形筛选、左树右表、树搜索或树节点操作时使用。
4
+ ---
5
+
6
+ # YTree 使用
7
+
8
+ ## 触发条件
9
+
10
+ - 生成或修改左树右表、组织树、分类树、目录树、树搜索或树节点操作。
11
+ - 需要配置 `fieldNames`、受控选中、`YTreeActionItem` 或树区域自适应高度。
12
+
13
+ ## 不适用场景
14
+
15
+ - 树数据只用于表单 TreeSelect 字段:使用 `YFormily` 或对应表单规范。
16
+ - 页面只有普通列表而没有层级筛选:使用 `../ytable-usage/SKILL.md`。
17
+
18
+ ## 实施流程
19
+
20
+ 1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YTree` 的 Props、Slots、Events 和 `YTreeActionItem`;需要搜索、节点动作、受控选中或左树右表时,再用 `get_demo` 获取对应官方 Demo。
21
+ 2. MCP 工具不可用、调用失败或用 `search_docs/list_components` 校正后仍无结果时,才读取最新 `llms-full.txt`;若文档与当前项目依赖版本不一致,用当前源码和导出核验。
22
+ 3. 确定树数据的 title/key/children 字段、受控状态和选中后的业务联动。
23
+ 4. 按容器布局配置 `useTreeHeight`,再添加搜索和节点动作。
24
+ 5. 若包含删除,单独完成气泡确认链路;不把 `danger` 颜色当成二次确认。
25
+
26
+ ## 硬约束(禁止/必须)
27
+
28
+ - 从 `@yss-ui/components` 导入 `YTree`、`YTreeActionItem` 等真实导出;高度使用 `@yss-ui/hooks` 的 `useTreeHeight`。
29
+ - 数据字段不一致时配置 `fieldNames`,不为了改名重复递归复制树数据。
30
+ - 搜索使用 `filterable + v-model:searchValue`;受控选中使用 `v-model:selectedKeys`。
31
+ - 普通节点菜单使用 `showActions + getNodeActions`,并监听 `@action`。`YTreeActionItem` 只支持 `key/label/icon/disabled/danger`,禁止臆造 `isConfirm/click` 等字段。
32
+ - `danger: true` 只改变危险项视觉,不会弹出确认框。删除必须放在节点附近的 `#node-suffix` 或当前选中节点操作区,用 Ant Design Vue `Popconfirm` 的 `@confirm` 调用接口;不使用居中 `Modal.confirm`。
33
+ - 树区域需要滚动时绑定 `:height="treeHeight"`,不默认添加 `:virtual="true"`。只有展开后可见扁平节点数 `* itemHeight > height` 时才会实际裁剪 DOM。
34
+ - 使用 YTree 内置搜索时,高度 Hook 通过 `extraOffset: YTREE_SEARCH_HEIGHT` 扣除 48px;不再叠加无依据的魔法数。
35
+ - 左树右表优先组合 `YSplitPane + YCard + YTree + YTable`;切换节点时同步查询条件并把右表分页重置为第 1 页。
36
+ - 节点删除 API 的错误由 `mutator.ts` 统一提示并 reject;不在 `else/catch` 重复 `message.error`。
37
+
38
+ ## 标准代码骨架
39
+
40
+ ```vue
41
+ <script setup lang="ts">
42
+ import { ref } from 'vue';
43
+ import { YTree, type YTreeActionItem } from '@yss-ui/components';
44
+ import { useTreeHeight, YTREE_SEARCH_HEIGHT } from '@yss-ui/hooks';
45
+
46
+ /** 树节点数据。 */
47
+ interface TreeNode {
48
+ id: string;
49
+ name: string;
50
+ children?: TreeNode[];
51
+ }
52
+
53
+ const emit = defineEmits<{
54
+ create: [node: TreeNode];
55
+ edit: [node: TreeNode];
56
+ }>();
57
+ const treeAreaRef = ref<HTMLDivElement>();
58
+ const treeData = ref<TreeNode[]>([]);
59
+ const searchValue = ref('');
60
+ const selectedKeys = ref<Array<string | number>>([]);
61
+ const { treeHeight } = useTreeHeight(treeAreaRef, {
62
+ extraOffset: YTREE_SEARCH_HEIGHT,
63
+ });
64
+
65
+ /** 生成当前节点的非危险操作。 */
66
+ const getNodeActions = (): YTreeActionItem[] => [
67
+ { key: 'add', label: '新增子节点' },
68
+ { key: 'edit', label: '编辑' },
69
+ ];
70
+
71
+ /** 处理 YTree 动作事件。 */
72
+ const handleTreeAction = ({ key, node }: { key: string; node: TreeNode }) => {
73
+ if (key === 'add') emit('create', node);
74
+ if (key === 'edit') emit('edit', node);
75
+ };
76
+ </script>
77
+
78
+ <template>
79
+ <div ref="treeAreaRef" class="tree-area">
80
+ <YTree
81
+ :height="treeHeight"
82
+ :tree-data="treeData"
83
+ :field-names="{ title: 'name', key: 'id', children: 'children' }"
84
+ filterable
85
+ show-actions
86
+ v-model:searchValue="searchValue"
87
+ v-model:selectedKeys="selectedKeys"
88
+ :get-node-actions="getNodeActions"
89
+ @action="handleTreeAction"
90
+ />
91
+ </div>
92
+ </template>
93
+
94
+ <style scoped lang="less">
95
+ @import './style.less';
96
+ </style>
97
+ ```
98
+
99
+ ```less
100
+ /* style.less */
101
+ .tree-area {
102
+ flex: 1;
103
+ min-height: 0;
104
+ overflow: hidden;
105
+ }
106
+ ```
107
+
108
+ ## 删除确认边界
109
+
110
+ ```vue
111
+ <template #node-suffix="{ node }">
112
+ <Popconfirm title="确认删除该节点吗?" ok-text="确定" cancel-text="取消" @confirm="handleDelete(node)">
113
+ <YButton type="link" @click.stop>删除</YButton>
114
+ </Popconfirm>
115
+ </template>
116
+ ```
117
+
118
+ `Popconfirm` 从 `ant-design-vue` 导入,`YButton` 从 `@yss-ui/components` 导入。如果每个节点都展示删除会过密,把同样的 `Popconfirm` 放到选中节点的页面工具栏。
119
+
120
+ ## 交付检查清单
121
+
122
+ - [ ] `fieldNames`、`searchValue`、`selectedKeys`、`action` 与真实 API 一致。
123
+ - [ ] 节点动作项未出现虚构字段,删除不会点菜单后立即执行。
124
+ - [ ] 高度偏移与内置搜索实际开关一致,没有多扣魔法数。
125
+ - [ ] 左树选中后,右表查询条件和分页重置闭环清晰。
126
+
127
+ ## 失败兜底策略
128
+
129
+ - 节点字段不统一时先修正 `fieldNames`,不复制整棵树换键。
130
+ - 点击删除立即调用 API 时,移出节点动作菜单,改为节点附近或页面操作区 `Popconfirm`。
131
+ - 传入 `height` 但节点未裁剪时,先核对展开后可见节点数、`itemHeight` 和阈值,不盲目强制 `virtual=true`。
132
+ - 节点 API 失败后让 mutator reject 中断右表刷新等后续流程,不重复错误提示。
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: component-selection-imports
3
+ description: 指导 YSS UI 业务页面、CRUD、列表页、表单页和组件评审在编码前判定组件、Hook 与工具函数的真实导出来源;当需要在 @yss-ui/components、@yss-ui/hooks、@yss-ui/utils 与 ant-design-vue 之间选择,或需要排查虚构 Y 前缀组件、错误导入、Formily UI 边界时使用。
4
+ ---
5
+
6
+ # 组件选择与导入
7
+
8
+ ## 触发条件
9
+
10
+ - 生成 YSS UI 业务页面前需要判定组件、Hook 或工具函数来源。
11
+ - 出现错误 Y 前缀、导入冲突、Formily UI 跨层或者组件是否已封装不明确。
12
+
13
+ ## 不适用场景
14
+
15
+ - 只修改与 UI 导入无关的纯数据逻辑。
16
+ - 组件库内部组件开发;该场景应按组件开发规范处理内部依赖。
17
+
18
+ ## 判定流程
19
+
20
+ 1. 当前会话可用 yss-ui MCP 时,先用 `list_components` 确认组件、Hook 或 Utils 是否真实存在,再用 `get_component_docs` 确认名称、导出包、Props、Events 和 Slots,不只看 demo 标签名。
21
+ 2. `get_component_docs` 未命中时,先用 `search_docs` 和 `list_components` 校正别名与归属,不得立即判定为未封装。
22
+ 3. MCP 工具不可用、调用失败或校正后仍无结果时,读取当前上下文中的最新 `llms-full.txt`;上下文没有时读取 `http://192.168.164.27:3200/llms-full.txt`。
23
+ 4. 必要时读取 `../yss-page-module-development/references/component-map.md`、`hooks-map.md`、`utils-map.md` 快速缩小范围;文档与当前项目依赖版本不一致时,最终以当前源码和可编译导出为准。
24
+ 5. 已导出的 YSS 能力优先从 `@yss-ui/components`、`@yss-ui/hooks`、`@yss-ui/utils` 导入;确认未封装后才从 `ant-design-vue` 导入原组件。
25
+ 6. 若文档与导出源码不一致,记录差异并按当前仓库可编译的导出处理,不猜测 API。
26
+
27
+ ## 硬约束(禁止/必须)
28
+
29
+ - 业务层已封装组件必须从 `@yss-ui/components` 导入;可编辑表格必须优先使用 `YEditTable`,业务主表格必须优先使用 `YTable`。
30
+ - 当前公共导出包含 `YButton`、`YCard`、`YTable`、`YEditTable`、`YTree`、`YSplitPane`、`YFormily` 等;未导出 `YModal`、`YDrawer`、`YInput`、`YPopconfirm`,禁止臆造这些名称。
31
+ - 当前未封装的 `Modal`、`Drawer`、`Popconfirm`、`Input` 等从 `ant-design-vue` 导入。删除操作使用按钮附近的 `Popconfirm`,不默认使用居中 `Modal.confirm`。
32
+ - 业务层禁止导入 `@formily/antdv` 或 `@formily/antd*` UI 组件;使用 `YFormily` 提供的 Schema 与组件边界。
33
+ - 禁止因文档暂时不可达就把猜测的 `Y*` 组件改成 Ant Design Vue “先落地”。只能复用当前仓库已证明可用的导入,或明确报告待确认项。
34
+ - 接口错误提示由 `mutator.ts` 的响应拦截器统一处理。API Hook 不得在 `success === false` 分支或 `catch` 内重复调用 `message.error`;`message` 只用于非 API 错误的本地交互反馈或成功提示。
35
+
36
+ ## 标准代码骨架
37
+
38
+ ```typescript
39
+ import {
40
+ YButton,
41
+ YCard,
42
+ YEditTable,
43
+ YTable,
44
+ YTree,
45
+ YFormily,
46
+ type YEditTableColumn,
47
+ type YTableColumn,
48
+ } from '@yss-ui/components';
49
+ import { useLoading, useTableHeight, useTreeHeight } from '@yss-ui/hooks';
50
+ import { copyToClipboard, formatDate } from '@yss-ui/utils';
51
+ import { Drawer, Input, Modal, Popconfirm } from 'ant-design-vue';
52
+ ```
53
+
54
+ ## 交付检查清单
55
+
56
+ - [ ] 每个关键导入都能在最新文档或包的 `src/index.ts` 中追溯。
57
+ - [ ] 未导出的 Y 前缀组件没有出现在业务代码中。
58
+ - [ ] 删除、表格、编辑表格和 Formily 导入边界符合项目约束。
59
+ - [ ] API Hook 中没有重复 `message.error`,异常仍由 `Promise.reject` 中断后续流程。
60
+
61
+ ## 失败兜底策略
62
+
63
+ - MCP 与 `llms-full.txt` 都不可用时,用 CodeGraph/源码 `src/index.ts` 和当前项目已编译的相近页面交叉确认,不猜测导出。
64
+ - 文档与源码不一致时,优先保证当前仓库可编译,并在交付中明确标注文档差异。