create-yss-spec 3.4.8 → 3.4.9

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 (365) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +5 -5
  4. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +2 -2
  5. package/template/.agents/skills/archify/SKILL.md +2 -19
  6. package/template/.agents/skills/archify/references/geometry-and-routing.md +20 -0
  7. package/template/.agents/skills/code-review/SKILL.md +3 -33
  8. package/template/.agents/skills/code-review/references/candidate-capture.md +33 -0
  9. package/template/.agents/skills/code-review/references/yss-review-standards.md +3 -5
  10. package/template/.agents/skills/codebase-design/SKILL.md +2 -2
  11. package/template/.agents/skills/competitive-intelligence/SKILL.md +1 -1
  12. package/template/.agents/skills/diagnosing-bugs/SKILL.md +6 -2
  13. package/template/.agents/skills/formily-foundation/SKILL.md +1 -1
  14. package/template/.agents/skills/formily-step-flow/SKILL.md +3 -2
  15. package/template/.agents/skills/frontend-commit/SKILL.md +6 -6
  16. package/template/.agents/skills/grilling/SKILL.md +2 -2
  17. package/template/.agents/skills/implement/SKILL.md +1 -1
  18. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +3 -3
  19. package/template/.agents/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  20. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +10 -6
  21. package/template/.agents/skills/java-backend-commit/SKILL.md +5 -5
  22. package/template/.agents/skills/llm-wiki/SKILL.md +1 -1
  23. package/template/.agents/skills/prototype/SKILL.md +1 -1
  24. package/template/.agents/skills/prototype-review/SKILL.md +1 -1
  25. package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +2 -2
  26. package/template/.agents/skills/tdd/SKILL.md +1 -1
  27. package/template/.agents/skills/to-questionnaire/SKILL.md +4 -2
  28. package/template/.agents/skills/to-spec/SKILL.md +3 -3
  29. package/template/.agents/skills/to-tickets/SKILL.md +7 -7
  30. package/template/.agents/skills/using-git-worktrees/SKILL.md +13 -11
  31. package/template/.agents/skills/wait-what/SKILL.md +1 -1
  32. package/template/.agents/skills/wayfinder/SKILL.md +4 -2
  33. package/template/.agents/skills/writing-for-agents/SKILL.md +9 -73
  34. package/template/.agents/skills/writing-for-agents/references/writing-principles.md +76 -0
  35. package/template/.agents/skills/yss-api-integration/SKILL.md +2 -2
  36. package/template/.agents/skills/yss-application/SKILL.md +12 -0
  37. package/template/.agents/skills/yss-audit-log/SKILL.md +3 -1
  38. package/template/.agents/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  39. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  40. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  41. package/template/.agents/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  42. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +6 -0
  43. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  44. package/template/.agents/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  45. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  46. package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  47. package/template/.agents/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  48. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  49. package/template/.agents/skills/yss-domain/SKILL.md +17 -5
  50. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +2 -2
  51. package/template/.agents/skills/yss-domain/references/existing-project.md +5 -0
  52. package/template/.agents/skills/yss-dto/SKILL.md +13 -10
  53. package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  54. package/template/.agents/skills/yss-exception/SKILL.md +2 -2
  55. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +12 -12
  56. package/template/.agents/skills/yss-hook/SKILL.md +8 -44
  57. package/template/.agents/skills/yss-hook/references/use-request.md +42 -0
  58. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  59. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  60. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  61. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  62. package/template/.agents/skills/yss-mybatis/SKILL.md +10 -0
  63. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
  64. package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -32
  65. package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +34 -0
  66. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
  67. package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -5
  68. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  69. package/template/.agents/skills/yss-repository/SKILL.md +13 -1
  70. package/template/.agents/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  71. package/template/.agents/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  72. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  73. package/template/.agents/skills/yss-stage-decision/SKILL.md +1 -1
  74. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  75. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -3
  76. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  77. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  78. package/template/.agents/skills/yss-validation/SKILL.md +1 -1
  79. package/template/.agents/skills/yss-web-controller/SKILL.md +16 -7
  80. package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
  81. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +2 -2
  82. package/template/.codex/skills/archify/SKILL.md +2 -19
  83. package/template/.codex/skills/archify/references/geometry-and-routing.md +20 -0
  84. package/template/.codex/skills/code-review/SKILL.md +3 -33
  85. package/template/.codex/skills/code-review/references/candidate-capture.md +33 -0
  86. package/template/.codex/skills/code-review/references/yss-review-standards.md +3 -5
  87. package/template/.codex/skills/codebase-design/SKILL.md +2 -2
  88. package/template/.codex/skills/competitive-intelligence/SKILL.md +1 -1
  89. package/template/.codex/skills/data-analytics/mcp/server.cjs +2 -1
  90. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +9 -32
  91. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +29 -0
  92. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  93. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +4 -4
  94. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +12 -22
  95. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +5 -10
  96. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +47 -49
  97. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +45 -0
  98. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +4 -5
  99. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +1 -1
  100. package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +1 -1
  101. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  102. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  103. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +4 -4
  104. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  105. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +2 -2
  106. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  107. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  108. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  109. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +4 -4
  110. package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +16 -14
  111. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +1 -1
  112. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +1 -1
  113. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +7 -7
  114. package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +7 -7
  115. package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +4 -2
  116. package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +5 -5
  117. package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +3 -3
  118. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +7 -71
  119. package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +70 -0
  120. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +4 -4
  121. package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +1 -1
  122. package/template/.codex/skills/data-analytics/src/analytics-app-core.md +1 -1
  123. package/template/.codex/skills/diagnosing-bugs/SKILL.md +6 -2
  124. package/template/.codex/skills/formily-foundation/SKILL.md +1 -1
  125. package/template/.codex/skills/formily-step-flow/SKILL.md +3 -2
  126. package/template/.codex/skills/frontend-commit/SKILL.md +6 -6
  127. package/template/.codex/skills/grilling/SKILL.md +2 -2
  128. package/template/.codex/skills/implement/SKILL.md +1 -1
  129. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +3 -3
  130. package/template/.codex/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  131. package/template/.codex/skills/improve-codebase-architecture/SKILL.md +10 -6
  132. package/template/.codex/skills/java-backend-commit/SKILL.md +5 -5
  133. package/template/.codex/skills/llm-wiki/SKILL.md +1 -1
  134. package/template/.codex/skills/product-design/references/critical-overrides.md +3 -4
  135. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  136. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  137. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +2 -1
  138. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +2 -50
  139. package/template/.codex/skills/product-design/skills/ideate/references/image-prompt-patterns.md +51 -0
  140. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +6 -6
  141. package/template/.codex/skills/product-design/skills/index/SKILL.md +2 -2
  142. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +6 -6
  143. package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +1 -1
  144. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  145. package/template/.codex/skills/prototype/SKILL.md +1 -1
  146. package/template/.codex/skills/prototype-review/SKILL.md +1 -1
  147. package/template/.codex/skills/resolving-merge-conflicts/SKILL.md +2 -2
  148. package/template/.codex/skills/tdd/SKILL.md +1 -1
  149. package/template/.codex/skills/to-questionnaire/SKILL.md +4 -2
  150. package/template/.codex/skills/to-spec/SKILL.md +3 -3
  151. package/template/.codex/skills/to-tickets/SKILL.md +7 -7
  152. package/template/.codex/skills/using-git-worktrees/SKILL.md +13 -11
  153. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  154. package/template/.codex/skills/wayfinder/SKILL.md +4 -2
  155. package/template/.codex/skills/writing-for-agents/SKILL.md +9 -73
  156. package/template/.codex/skills/writing-for-agents/references/writing-principles.md +76 -0
  157. package/template/.codex/skills/yss-api-integration/SKILL.md +2 -2
  158. package/template/.codex/skills/yss-application/SKILL.md +12 -0
  159. package/template/.codex/skills/yss-audit-log/SKILL.md +3 -1
  160. package/template/.codex/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  161. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  162. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  163. package/template/.codex/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  164. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +6 -0
  165. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  166. package/template/.codex/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  167. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  168. package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  169. package/template/.codex/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  170. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  171. package/template/.codex/skills/yss-domain/SKILL.md +17 -5
  172. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +2 -2
  173. package/template/.codex/skills/yss-domain/references/existing-project.md +5 -0
  174. package/template/.codex/skills/yss-dto/SKILL.md +13 -10
  175. package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  176. package/template/.codex/skills/yss-exception/SKILL.md +2 -2
  177. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +12 -12
  178. package/template/.codex/skills/yss-hook/SKILL.md +8 -44
  179. package/template/.codex/skills/yss-hook/references/use-request.md +42 -0
  180. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  181. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  182. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  183. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  184. package/template/.codex/skills/yss-mybatis/SKILL.md +10 -0
  185. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
  186. package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -32
  187. package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +34 -0
  188. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
  189. package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -5
  190. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  191. package/template/.codex/skills/yss-repository/SKILL.md +13 -1
  192. package/template/.codex/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  193. package/template/.codex/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  194. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  195. package/template/.codex/skills/yss-stage-decision/SKILL.md +1 -1
  196. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  197. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -3
  198. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  199. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  200. package/template/.codex/skills/yss-validation/SKILL.md +1 -1
  201. package/template/.codex/skills/yss-web-controller/SKILL.md +16 -7
  202. package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
  203. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +2 -2
  204. package/template/.cursor/skills/archify/SKILL.md +2 -19
  205. package/template/.cursor/skills/archify/references/geometry-and-routing.md +20 -0
  206. package/template/.cursor/skills/code-review/SKILL.md +3 -33
  207. package/template/.cursor/skills/code-review/references/candidate-capture.md +33 -0
  208. package/template/.cursor/skills/code-review/references/yss-review-standards.md +3 -5
  209. package/template/.cursor/skills/codebase-design/SKILL.md +2 -2
  210. package/template/.cursor/skills/competitive-intelligence/SKILL.md +1 -1
  211. package/template/.cursor/skills/diagnosing-bugs/SKILL.md +6 -2
  212. package/template/.cursor/skills/formily-foundation/SKILL.md +1 -1
  213. package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -2
  214. package/template/.cursor/skills/frontend-commit/SKILL.md +6 -6
  215. package/template/.cursor/skills/grilling/SKILL.md +2 -2
  216. package/template/.cursor/skills/implement/SKILL.md +1 -1
  217. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +3 -3
  218. package/template/.cursor/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  219. package/template/.cursor/skills/improve-codebase-architecture/SKILL.md +10 -6
  220. package/template/.cursor/skills/java-backend-commit/SKILL.md +5 -5
  221. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -1
  222. package/template/.cursor/skills/prototype/SKILL.md +1 -1
  223. package/template/.cursor/skills/prototype-review/SKILL.md +1 -1
  224. package/template/.cursor/skills/resolving-merge-conflicts/SKILL.md +2 -2
  225. package/template/.cursor/skills/tdd/SKILL.md +1 -1
  226. package/template/.cursor/skills/to-questionnaire/SKILL.md +4 -2
  227. package/template/.cursor/skills/to-spec/SKILL.md +3 -3
  228. package/template/.cursor/skills/to-tickets/SKILL.md +7 -7
  229. package/template/.cursor/skills/using-git-worktrees/SKILL.md +13 -11
  230. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  231. package/template/.cursor/skills/wayfinder/SKILL.md +4 -2
  232. package/template/.cursor/skills/writing-for-agents/SKILL.md +9 -73
  233. package/template/.cursor/skills/writing-for-agents/references/writing-principles.md +76 -0
  234. package/template/.cursor/skills/yss-api-integration/SKILL.md +2 -2
  235. package/template/.cursor/skills/yss-application/SKILL.md +12 -0
  236. package/template/.cursor/skills/yss-audit-log/SKILL.md +3 -1
  237. package/template/.cursor/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  238. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  239. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  240. package/template/.cursor/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  241. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +6 -0
  242. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  243. package/template/.cursor/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  244. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  245. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  246. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  247. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  248. package/template/.cursor/skills/yss-domain/SKILL.md +17 -5
  249. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +2 -2
  250. package/template/.cursor/skills/yss-domain/references/existing-project.md +5 -0
  251. package/template/.cursor/skills/yss-dto/SKILL.md +13 -10
  252. package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  253. package/template/.cursor/skills/yss-exception/SKILL.md +2 -2
  254. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +12 -12
  255. package/template/.cursor/skills/yss-hook/SKILL.md +8 -44
  256. package/template/.cursor/skills/yss-hook/references/use-request.md +42 -0
  257. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  258. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  259. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  260. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  261. package/template/.cursor/skills/yss-mybatis/SKILL.md +10 -0
  262. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
  263. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -32
  264. package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +34 -0
  265. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
  266. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -5
  267. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  268. package/template/.cursor/skills/yss-repository/SKILL.md +13 -1
  269. package/template/.cursor/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  270. package/template/.cursor/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  271. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  272. package/template/.cursor/skills/yss-stage-decision/SKILL.md +1 -1
  273. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  274. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -3
  275. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  276. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  277. package/template/.cursor/skills/yss-validation/SKILL.md +1 -1
  278. package/template/.cursor/skills/yss-web-controller/SKILL.md +16 -7
  279. package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
  280. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +2 -2
  281. package/template/.pi/skills/archify/SKILL.md +2 -19
  282. package/template/.pi/skills/archify/references/geometry-and-routing.md +20 -0
  283. package/template/.pi/skills/code-review/SKILL.md +3 -33
  284. package/template/.pi/skills/code-review/references/candidate-capture.md +33 -0
  285. package/template/.pi/skills/code-review/references/yss-review-standards.md +3 -5
  286. package/template/.pi/skills/codebase-design/SKILL.md +2 -2
  287. package/template/.pi/skills/competitive-intelligence/SKILL.md +1 -1
  288. package/template/.pi/skills/diagnosing-bugs/SKILL.md +6 -2
  289. package/template/.pi/skills/formily-foundation/SKILL.md +1 -1
  290. package/template/.pi/skills/formily-step-flow/SKILL.md +3 -2
  291. package/template/.pi/skills/frontend-commit/SKILL.md +6 -6
  292. package/template/.pi/skills/grilling/SKILL.md +2 -2
  293. package/template/.pi/skills/implement/SKILL.md +1 -1
  294. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +3 -3
  295. package/template/.pi/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  296. package/template/.pi/skills/improve-codebase-architecture/SKILL.md +10 -6
  297. package/template/.pi/skills/java-backend-commit/SKILL.md +5 -5
  298. package/template/.pi/skills/llm-wiki/SKILL.md +1 -1
  299. package/template/.pi/skills/prototype/SKILL.md +1 -1
  300. package/template/.pi/skills/prototype-review/SKILL.md +1 -1
  301. package/template/.pi/skills/resolving-merge-conflicts/SKILL.md +2 -2
  302. package/template/.pi/skills/tdd/SKILL.md +1 -1
  303. package/template/.pi/skills/to-questionnaire/SKILL.md +4 -2
  304. package/template/.pi/skills/to-spec/SKILL.md +3 -3
  305. package/template/.pi/skills/to-tickets/SKILL.md +7 -7
  306. package/template/.pi/skills/using-git-worktrees/SKILL.md +13 -11
  307. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  308. package/template/.pi/skills/wayfinder/SKILL.md +4 -2
  309. package/template/.pi/skills/writing-for-agents/SKILL.md +9 -73
  310. package/template/.pi/skills/writing-for-agents/references/writing-principles.md +76 -0
  311. package/template/.pi/skills/yss-api-integration/SKILL.md +2 -2
  312. package/template/.pi/skills/yss-application/SKILL.md +12 -0
  313. package/template/.pi/skills/yss-audit-log/SKILL.md +3 -1
  314. package/template/.pi/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  315. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  316. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  317. package/template/.pi/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  318. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +6 -0
  319. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +2 -2
  320. package/template/.pi/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  321. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +5 -34
  322. package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  323. package/template/.pi/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  324. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  325. package/template/.pi/skills/yss-domain/SKILL.md +17 -5
  326. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +2 -2
  327. package/template/.pi/skills/yss-domain/references/existing-project.md +5 -0
  328. package/template/.pi/skills/yss-dto/SKILL.md +13 -10
  329. package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  330. package/template/.pi/skills/yss-exception/SKILL.md +2 -2
  331. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +12 -12
  332. package/template/.pi/skills/yss-hook/SKILL.md +8 -44
  333. package/template/.pi/skills/yss-hook/references/use-request.md +42 -0
  334. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  335. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  336. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  337. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  338. package/template/.pi/skills/yss-mybatis/SKILL.md +10 -0
  339. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
  340. package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -32
  341. package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +34 -0
  342. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
  343. package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -5
  344. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  345. package/template/.pi/skills/yss-repository/SKILL.md +13 -1
  346. package/template/.pi/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  347. package/template/.pi/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  348. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  349. package/template/.pi/skills/yss-stage-decision/SKILL.md +1 -1
  350. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  351. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -3
  352. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  353. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  354. package/template/.pi/skills/yss-validation/SKILL.md +1 -1
  355. package/template/.pi/skills/yss-web-controller/SKILL.md +16 -7
  356. package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
  357. package/template/docs/process/schemas/digital-human-task-package.schema.json +60 -4
  358. package/template/scripts/backend-standards-coverage +26 -0
  359. package/template/scripts/lib/backend-review.mjs +58 -20
  360. package/template/scripts/lib/backend-standards-coverage.mjs +237 -0
  361. package/template/scripts/lib/first-slice-artifacts.mjs +1 -1
  362. package/template/scripts/lib/lifecycle-transition.mjs +4 -1
  363. package/template/scripts/lib/profile-skill-sync.mjs +46 -5
  364. package/template/skills-lock.json +64 -62
  365. package/template.snapshot.json +4 -4
@@ -10,21 +10,31 @@ description: 用于按批准的 YSS 架构与持久化合同实现或重构 PO
10
10
  ## 架构分流
11
11
 
12
12
  1. 读取当前 Slice Implementation Contract 的 `architecture_identity`、`persistence_profile`、实现仓登记、数据合同、`allowed_write_paths` 和预期证据。
13
- 2. 将架构身份与工程基线、Manifest 和 `docs/agents/yss-skill-registry.yaml` 核对;成熟度以注册表为准,不能把 `draft` 称为已支持。
13
+ 2. 将架构身份与当前工程基线、既有工程观测(生成 Manifest 只证明历史来源)和 `docs/agents/yss-skill-registry.yaml` 核对;成熟度以注册表为准,不能把 `draft` 称为已支持。
14
14
  3. 根据 `architecture_profile` **且只**加载一个文件:
15
15
  - [target-domain-model](references/profiles/target-domain-model.md)
16
16
  - [layered-mvc-service](references/profiles/layered-mvc-service.md)
17
17
  - [mvc-data-analysis-v1](references/profiles/mvc-data-analysis-v1.md)
18
+ - [existing-domain-driven-maven](references/profiles/existing-domain-driven-maven.md)
19
+ - [existing-layered-mvc-maven](references/profiles/existing-layered-mvc-maven.md)
18
20
  4. Profile 缺失、身份冲突、Manifest 漂移或数据输入不完整时返回 `blocked` / `drift` / `new_impacts`,不得选择“最像”的分支继续。
19
21
 
20
22
  ## 共用规则
21
23
 
24
+ <a id="repository.ownership"></a>
25
+ <!-- yss-rule {"id":"repository.ownership","when":"persistence","level":"mandatory","evidence":"code-and-verification"} -->
22
26
  - 只实现批准合同已有的结构与 seam,不创建或改写 Domain Gateway、Application Query Port、service/core 接口或 Web/API DTO。
23
27
  - 持久化 Profile 命中 MyBatis 时加载 `yss-mybatis`,以当前组件能力索引核验基类、分页、批量、扫描、XML 和数据源行为;本 Skill 不复制这些规则。
24
28
  - POJO、转换和 Java 规范分别消费 Registry 编译出的 `lombok`、`mapstruct`、`alibaba-java-code-style`;不在此重复其注解和处理器规则。
29
+ <a id="repository.mapping"></a>
30
+ <!-- yss-rule {"id":"repository.mapping","when":"persistence","level":"mandatory","evidence":"code-and-verification"} -->
25
31
  - 数据合同必须显式覆盖主键、逻辑删除、审计字段、空值、枚举/值对象映射和敏感字段;动态排序、分组与过滤必须使用批准白名单和参数绑定。
32
+ <a id="repository.transaction"></a>
33
+ <!-- yss-rule {"id":"repository.transaction","when":"persistence","level":"mandatory","evidence":"code-and-verification"} -->
26
34
  - 事务归所选 Profile 的用例边界。Repository/Gateway Adapter 不临时新增业务事务,也不把数据库异常原文或凭据暴露给上层。
27
35
  - 基础机械结构只有在合同标记 `controlled-generation`、metadata 完整且目标文件不存在时才可受控生成;查询语义、分页、并发、事务和迁移行为使用 `behavior-tdd`。
36
+ <a id="repository.sql"></a>
37
+ <!-- yss-rule {"id":"repository.sql","when":"persistence","level":"mandatory","evidence":"code-and-verification"} -->
28
38
  - 发现 SQL、DDL、索引、数据模型或 API schema 新影响时立即暂停并返回 `new_impacts`,不能以 TODO 代替合同重编译。
29
39
 
30
40
  ## 产物与证据
@@ -46,3 +56,5 @@ description: 用于按批准的 YSS 架构与持久化合同实现或重构 PO
46
56
  ## 新脚手架平台约束
47
57
 
48
58
  消费批准切片架构身份中的 `platform_configuration`,并与工程 Manifest、effective POM 和依赖树核对。命中 MyBatis 时,`framework.mybatis` 必须从该配置指向的 compatibility 条目解析出对当前架构有效的 `component_binding`;构件、摘要、源码 tree、证据或绑定状态不一致时回合同编译器阻断。Validation namespace、Jackson、starter 和处理器版本只消费解析后的精确平台事实,不在本 Skill 中按 Boot 大版本推导。不得在业务实现中升级、降级或替换 YSS 组件;平台迁移使用独立迁移工作单元。详见仓库共享合同 `docs/engineering/backend-platforms.md`。
59
+
60
+ 只读审计可先盘点、记录缺失合同;不得用实施前置要求阻止发现既有违规。整改仍需批准合同,不因缺少生成 Manifest 阻断已有效登记的既有工程。
@@ -0,0 +1,7 @@
1
+ # existing-domain-driven-maven
2
+
3
+ 复用注册表中的既有 DDD 身份及当前工程基线、观测 Manifest、build_units/role_paths。实际源码根和端口责任决定落点,不要求生成目录、类名或脚手架 Manifest。
4
+
5
+ 领域聚合经 Domain Gateway,展示读模型经 Application Query Port;Infrastructure 只实现已有端口。
6
+
7
+ 遵守主 Skill 的数据映射、白名单、参数绑定和持久化往返规则;业务事务归已批准用例层。Mapper 能力按 yss-mybatis 当前平台证据选择。无分页/批量需求不建空实现。角色无法映射记录 missing_evidence;改变端口、数据或架构回合同编译器。
@@ -0,0 +1,7 @@
1
+ # existing-layered-mvc-maven
2
+
3
+ 复用注册表中的既有 MVC 身份及当前工程基线、观测 Manifest、build_units/role_paths。实际源码根和端口责任决定落点,不要求生成目录、类名或脚手架 Manifest。
4
+
5
+ 持久层实现已登记的 service/core 用例接口;不创建 DDD Gateway、聚合或 Application Query Port。
6
+
7
+ 遵守主 Skill 的数据映射、白名单、参数绑定和持久化往返规则;业务事务归已批准用例层。Mapper 能力按 yss-mybatis 当前平台证据选择。无分页/批量需求不建空实现。角色无法映射记录 missing_evidence;改变端口、数据或架构回合同编译器。
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
2
2
  import { access, readFile, readdir } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import test from "node:test";
5
+ import { parseDocument } from "../../../../scripts/vendor/yaml.mjs";
5
6
  import { fileURLToPath } from "node:url";
6
7
 
7
8
  const repositorySkillRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
@@ -15,7 +16,8 @@ async function text(target) {
15
16
  test("repository router exposes exactly the registered profile entry points", async () => {
16
17
  const profilesRoot = path.join(repositorySkillRoot, "references/profiles");
17
18
  const profiles = (await readdir(profilesRoot)).filter((name) => name.endsWith(".md")).sort();
18
- assert.deepEqual(profiles, ["layered-mvc-service.md", "mvc-data-analysis-v1.md", "target-domain-model.md"]);
19
+ const registry = parseDocument(await text(path.join(projectRoot, "docs/agents/yss-skill-registry.yaml"))).toJS();
20
+ assert.deepEqual(profiles, [...Object.keys(registry.architecture_profiles), ...Object.keys(registry.existing_project_profiles)].map(id => `${id}.md`).sort());
19
21
 
20
22
  const skill = await text(path.join(repositorySkillRoot, "SKILL.md"));
21
23
  for (const profile of profiles) assert.match(skill, new RegExp(`references/profiles/${profile.replace(".md", "")}`));
@@ -69,4 +69,4 @@ Plan 的目标与退出条件由 `docs/process/lifecycle-registry.yaml` 持有
69
69
 
70
70
  ## 战略交接快照包
71
71
 
72
- 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
72
+ 跨仓交付或恢复时读取 [战略交接合同](references/strategic-handoff-routing.md)。只接受当前可核验包与承接结果;用户决定、版本失效和批准边界仍由主控持有。
@@ -0,0 +1,3 @@
1
+ ## 战略交接快照包
2
+
3
+ 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
@@ -36,9 +36,7 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
36
36
 
37
37
  ## 战略交接快照包
38
38
 
39
- 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
40
-
41
- 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
39
+ 仅在输入来自战略交接包时,读取 [战略承接核验](references/strategic-handoff-routing.md),绑定收据、摘要和逐规则承接;源变化或未知依赖阻断并回交主控。
42
40
 
43
41
  ## 后端脚手架平台承接
44
42
 
@@ -0,0 +1,5 @@
1
+ ## 战略交接快照包
2
+
3
+ 跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
4
+
5
+ 战术合同必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
@@ -18,7 +18,9 @@ description: "生成或改造完整 YSS UI CRUD、列表、表单、详情或左
18
18
  - 只写文档、提交信息或发版流程,不生成业务页面代码。
19
19
  - 用户明确要求不用 YSS UI 组件库。
20
20
 
21
- ## 必读参考
21
+ ## 按影响读取参考
22
+
23
+ 先读组件来源与当前实现合同;仅加载当前页面实际使用的组件、Hook、Utils 与交付验证资料,不预读所有专项技能。
22
24
 
23
25
  - 组件来源速查:`./references/component-map.md`
24
26
  - Hooks 速查:`./references/hooks-map.md`
@@ -56,7 +58,7 @@ description: "生成或改造完整 YSS UI CRUD、列表、表单、详情或左
56
58
  - 新增/导入/批量操作等主操作直接放入 `#toolbar-right` 插槽;**无需配置 `:toolbar-config="{ custom: true }"`**,避免无端展示列设置图标;**仅在业务明确需要列设置时才传入 `:toolbar-config="{ custom: true }"`**。
57
59
  - 删除确认默认使用 `YTable actionConfig.buttons[].isConfirm` 按钮项或 AntDV `Popconfirm` 气泡确认,禁止默认使用居中 `Modal.confirm`。
58
60
  - 样式抽离到 `style.less`,在 SFC 中使用 `<style scoped lang="less">@import './style.less';</style>`。
59
- - `index.vue` 原则上不超过 150 行;状态、API、副作用和处理方法进入 `hooks/`,列定义和静态配置进入 `constant.ts`。
61
+ - `index.vue` 按职责保持可读;状态或副作用使视图难以理解时拆分,不以固定行数作为验收门禁;状态、API、副作用和处理方法进入 `hooks/`,列定义和静态配置进入 `constant.ts`。
60
62
  - 页面目录默认使用 `index.vue + constant.ts + style.less + hooks/`;只有存在多个私有视图或大量独立类型时才增加 `components/` 和 `type.ts`。`index.vue` 只做 Hook 组合、视图编排和事件转发。
61
63
  - 列表查询只维护一份 `currentParams`;查询、重置、树节点切换均回到第一页,翻页保留筛选条件,批量操作成功后清空选中态。组件 API 服从 `ytable-usage` / `ytree-usage`,请求和竞态服从 `yss-hook`。
62
64
  - Modal/Drawer 表单的 `open/mode/currentId/formModel/submitting`、回填、提交和关闭收敛在同一业务 Hook。新增/编辑数据在打开容器前准备,容器关闭时销毁并清理;默认依赖响应式 `mode`/model,不用动态 `:key` 强制重挂载。
@@ -84,7 +86,7 @@ src/views/{module-name}/
84
86
 
85
87
  ## 生成流程
86
88
 
87
- 1. 读取本 skill 的三个 reference,并按上述文档检索顺序核对真实 API 与导出,禁止根据旧示例猜测。
89
+ 1. 读取组件来源速查;页面使用 Hook 或 Utils 时才追加相应 reference。按上述文档检索顺序核对真实 API 与导出,禁止根据旧示例猜测。
88
90
  2. 读取 `theme-token-usage`,检查项目真实主题变量与运行时同步链路。
89
91
  3. 若有截图或旧项目路径,先读取已批准且 digest 当前的 Visual Baseline manifest 和 `frontend_implementation_plan`,按 `case_id` 提取布局、状态、交互、响应式与控件类型验收项;缺失或摘要漂移时返回 `blocked`,不得凭目录或截图猜测。
90
92
  4. 按需求类型加载细分 skill:列表读 `ytable-usage` 与 `yss-hook`;表单读 `yss-formily`;编辑表格读 `yedit-table-usage`;树读 `ytree-usage`;导出下载读 `file-export-download`。
@@ -20,7 +20,7 @@ Read `references/source-index.md` as a path-hint index whenever the task depends
20
20
  ## Workflow
21
21
 
22
22
  1. Identify whether the task is JSR-303 annotation validation or an expression/EL parser request.
23
- 2. Read `references/source-index.md`; for JSR-303 behavior, read `yss-component-validation-jsr303/readme.md` first.
23
+ 2. Select the approved platform index and inspect the actual POM, validation message resources, consuming Controller annotations and matching exception Advice. The current module README is empty; do not treat reading it as prerequisite evidence.
24
24
  3. 当前组件仓不存在历史 `yss-component-validation-engine-parent`;表达式、LiteFlow EL 或 `ExpressParserFactory` 请求返回 `blocked`,先确认真实组件来源和生命周期影响,不以旧索引或通用知识生成实现。
25
25
  4. Keep validation failures mapped to the service/API error contract used by the local project.
26
26
  5. 消费工程基线选择 javax/jakarta,不自行升级 Java/Boot。MVC 输入校验放在 server/client,业务不变量由 service/core 验证;不生成 DDD Domain。HTTP 失败形态由 server 的合同测试验证。
@@ -11,7 +11,7 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
11
11
 
12
12
  以下 Application / Domain Gateway / Infrastructure / Web module 叙述仅适用于 target-domain-model;MVC 的 service/core/repository/server/client 所有权由所选 Profile 引用定义。
13
13
 
14
- 这是一个 Web 适配层生成型 skill。优先复用脚本 `scripts/generate_controller.mjs` 和模板,不手写重复 CRUD。
14
+ 本 Skill 同时支持只读审计、既有整改和新建 CRUD 生成。审计读取实际入口和现有契约,缺证据只记录缺口;整改消费批准 Slice、冻结 API/no-impact 与稳定用例 seam;仅新建 CRUD 才要求 Web generation contract、metadata 并调用 initialize-only 生成器。
15
15
 
16
16
  ## 何时使用
17
17
 
@@ -19,12 +19,13 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
19
19
  - 用户要根据冻结 OpenAPI 字段合同、metadata 和稳定 Application 接口生成 Request / Response / Controller / WebConvertor。
20
20
  - 用户要求统一 Web Adapter 风格、返回值和接口路径。
21
21
 
22
- ## 不适用
22
+ 手工认证、回调、Cookie、下载或流式接口适用本 Skill,但不强制使用 CRUD 脚本或 metadata。
23
23
 
24
- - 用户只是要新增一个手写复杂接口,不一定要用脚本。
25
- - 用户还没有稳定的 Application Service、冻结 OpenAPI 或 metadata,先回 实现合同编译器 补 `yss-application` / `yss-domain` 和相应合同输入。
24
+ ## 实施前置与审计边界
26
25
 
27
- ## 优先流程
26
+ - 只读审计可以记录用例 seam 或契约缺失。既有整改缺少批准 Slice、稳定用例 seam 或接口契约时,回实现合同编译器补齐;仅新建 CRUD 生成要求 metadata,不因缺 metadata 拒绝既有代码审计或手工接口整改。
27
+
28
+ ## 新建 CRUD 生成流程
28
29
 
29
30
  1. 先确认冻结 OpenAPI、批准且版本当前的 Web generation contract schema v2、Application Service 接口、metadata、基础包、模块名、领域 segment 和 web 落盘目录;合同必须绑定 Slice `contract_id` / `contract_version` / `slice_id`、`yss-dto` wire profile 引用与 digest、允许写路径、证据与验证命令。
30
31
  2. 加载并遵守 `yss-dto` 与 `yss-validation`;错误映射影响命中时再加载 `yss-exception`。
@@ -61,13 +62,19 @@ node scripts/generate_controller.mjs \
61
62
 
62
63
  ## 约束
63
64
 
65
+ <a id="web.use-case"></a>
66
+ <!-- yss-rule {"id":"web.use-case","when":"web","level":"mandatory","evidence":"code-and-verification"} -->
64
67
  - 生成代码只依赖既有 Application Service;读写操作都禁止绕过 Application。复杂查询经 Application Query Port 接入 Infrastructure。
68
+ <a id="web.wire"></a>
69
+ <!-- yss-rule {"id":"web.wire","when":"wire","level":"mandatory","evidence":"code-and-verification"} -->
65
70
  - 返回包装类、分页默认值、允许字段与 `PageResult.of(...)` 参数语义必须消费合同绑定的 `yss-dto/references/openapi-wire-profile.yaml`;Web skill 不复制或自行维护第二套协议。
66
71
  - DTO / VO / CMD / Query 默认用 Lombok 处理 getter/setter、constructor、builder 和日志样板;不要在 Controller 内部类或非约定包临时定义主要 DTO / VO。
67
72
  - `WebConvertor` 使用 `@Mapper(componentModel = "spring")` 和构造器注入;禁止静态 `INSTANCE`、在 Controller / Application 中大段手写字段赋值、使用 `BeanUtils.copyProperties` 或反射式通用拷贝。
73
+ <a id="web.pagination"></a>
74
+ <!-- yss-rule {"id":"web.pagination","when":"pagination","level":"mandatory","evidence":"code-and-verification"} -->
68
75
  - HTTP Request 不继承会暴露内部协作字段的 `PageQuery`;只生成冻结 OpenAPI allowlist 字段,禁止把 `offset`、`needTotalCount`、`tempTotalCount` 变成客户端输入。
69
76
  - `fields.<table>.pagination` 必须显式列出 `yss-dto` wire profile 允许暴露的字段子集;模板不得无条件生成字段或自行定义默认值。
70
- - 先跑脚本,再按项目规范做少量手调。
77
+ - 仅新建 CRUD 先跑脚本;既有整改和手工协议适配不重跑初始化生成器。
71
78
  - Validation namespace 参数必须来自批准的精确平台配置和当前工程基线,不得按记忆或 Boot 大版本自行选择。
72
79
  - 若用户只是要改单个 Controller,先看现有代码,不要盲覆盖整个目录。
73
80
  - 脚本是 initialize-only;写入前先规划全部目标并校验 `allowed_write_paths`,任一目标已存在或传入 `--force` 时整体返回 `unsupported`。落盘使用排他创建和失败回滚,不得留下部分文件;旧项目迁移不属于该生成器。
@@ -85,8 +92,10 @@ node scripts/generate_controller.mjs \
85
92
 
86
93
  ## 阶段 7 合同
87
94
 
88
- - 只消费已批准且当前的 schema v2 Web generation contract 和冻结 OpenAPI/no-impact record;schema v1 为 `unsupported`,不得自动升级,也不得用 Controller 或半成品 backend 反向定义产品契约。
95
+ - 所有写入消费批准且当前的 Slice 与冻结 OpenAPI/no-impact record;只有新建 CRUD 生成还要求 schema v2 Web generation contract。生成合同 v1 为 `unsupported`,不得自动升级;不得用 Controller 反向定义产品契约。
89
96
  - DTO/VO/WebConvertor 机械骨架可用 `controlled-generation`;权限、错误映射、校验语义和接口行为必须使用 `behavior-tdd`。
97
+ <a id="web.write-scope"></a>
98
+ <!-- yss-rule {"id":"web.write-scope","when":"change","level":"mandatory","evidence":"code-and-verification"} -->
90
99
  - 写入必须位于合同 `allowed_write_paths`,并提供 Controller、DTO/VO、WebConvertor、契约/API 测试和实际验证结果。
91
100
  - 按统一 `YSS Skill Execution Result` 返回偏离与新增影响;出现新 API/schema、权限或响应包装变化时暂停并回到 实现合同编译器/生命周期。
92
101
 
@@ -216,7 +216,7 @@ onMounted(loadList);
216
216
  2. **行唯一键**:必须显式指定 `:row-config="{ keyField: 'id', useKey: true }"`(`keyField` 与业务主键如 `userCode` 对齐)。
217
217
  3. **受控双向绑定**:推荐优先使用 `v-model:selected-row-keys="selectedRowKeys"` 或 `v-model:selected-rows="selectedRows"`,或者统一监听 `@selection-change`。
218
218
  4. **批量操作按钮**:放在 `#toolbar-right`,并配置 `:disabled="selectedRowKeys.length === 0"`。
219
- 5. **清空选中态**:批量操作成功后,直接重置 `selectedRowKeys.value = []` 或调用 `tableRef.value.clearSelection()`。
219
+ 5. **清空选中态**:批量操作成功后,清空实际受控的 `selectedRowKeys` / `selectedRows`,并在存在表格内部选择缓存时调用已核验的 `tableRef.value.clearSelection()`。受控状态与组件可见勾选必须一致;不能只清其中一层。
220
220
 
221
221
  ```vue
222
222
  <YTable
@@ -244,7 +244,7 @@ onMounted(loadList);
244
244
 
245
245
  - [ ] 分页状态和 `page-change` 参数均使用 `current/pageSize`,未使用 `currentPage`;`filter-change` 与 YTable 真实 API 一致。
246
246
  - [ ] 多选列已配置 `type: 'checkbox'`,已设置 `:row-config="{ keyField: 'xxx', useKey: true }"`,批量按钮绑定了 `selectedRowKeys.length === 0` 禁用。
247
- - [ ] 批量操作成功后已重置 `selectedRowKeys` 并调用 `tableRef.clearSelection()`。
247
+ - [ ] 批量成功后,所有实际受控选择字段与表格可见勾选均已清空;内部缓存存在时已通过 `clearSelection()` 清除。
248
248
  - [ ] 未使用虚构 `request/searchParams/row-key` Props,也未把 `refresh()` 当成远程请求。
249
249
  - [ ] 工具栏、字典翻译、操作确认与高度偏移均与实际开关一致。
250
250
  - [ ] 查询、重置、翻页、刷新和导出复用同一份 `currentParams`;查询/重置回到第一页,批量成功后清空选中态。
@@ -587,15 +587,71 @@
587
587
  },
588
588
  "review_input": {
589
589
  "type": "object",
590
- "required": [
591
- "slice_contract_ref"
592
- ],
593
590
  "properties": {
594
591
  "slice_contract_ref": {
595
592
  "type": "string",
596
593
  "minLength": 1
594
+ },
595
+ "scope_kind": {
596
+ "enum": [
597
+ "baseline",
598
+ "change"
599
+ ]
600
+ },
601
+ "standards_coverage_ref": {
602
+ "type": "string",
603
+ "minLength": 1
604
+ },
605
+ "standards_coverage_digest": {
606
+ "type": "string",
607
+ "pattern": "^[a-f0-9]{64}$"
608
+ },
609
+ "review_base_ref": {
610
+ "type": "string",
611
+ "pattern": "^[a-f0-9]{40}$"
612
+ },
613
+ "responsibility_evidence": {
614
+ "type": "array",
615
+ "items": {
616
+ "type": "object",
617
+ "required": [
618
+ "ref",
619
+ "digest"
620
+ ],
621
+ "properties": {
622
+ "ref": {
623
+ "type": "string",
624
+ "minLength": 1
625
+ },
626
+ "digest": {
627
+ "type": "string",
628
+ "pattern": "^(sha256:)?[a-f0-9]{64}$"
629
+ }
630
+ }
631
+ }
597
632
  }
598
- }
633
+ },
634
+ "allOf": [
635
+ {
636
+ "if": {
637
+ "required": [
638
+ "scope_kind"
639
+ ],
640
+ "properties": {
641
+ "scope_kind": {
642
+ "const": "change"
643
+ }
644
+ }
645
+ },
646
+ "then": {
647
+ "required": [
648
+ "slice_contract_ref",
649
+ "standards_coverage_ref",
650
+ "standards_coverage_digest"
651
+ ]
652
+ }
653
+ }
654
+ ]
599
655
  },
600
656
  "review_result_ref": {
601
657
  "type": "string",
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { parseArgs } from 'node:util';
5
+ import { parseSliceYaml, selectSliceWorkUnit } from './lib/slice-contract.mjs';
6
+ import { inspectSliceContract } from './lib/slice-execution-preflight.mjs';
7
+ import { inspectMaintenanceCandidate } from './lib/maintenance-candidate.mjs';
8
+ import { compileStandardsCoverage, coverageFile } from './lib/backend-standards-coverage.mjs';
9
+ import { validateBackendReview } from './lib/backend-review.mjs';
10
+ try {
11
+ const {values}=parseArgs({options:{input:{type:'string'},root:{type:'string'},verify:{type:'boolean'}},strict:true});
12
+ if(!values.input)throw Error('usage: scripts/backend-standards-coverage --input <review-state.json|yaml> [--root <governance-root>] [--verify]');
13
+ const root=path.resolve(values.root||'.'),state=parseSliceYaml(fs.readFileSync(path.resolve(values.input),'utf8'));
14
+ if(values.verify)console.log(JSON.stringify(validateBackendReview(state,{root}),null,2));
15
+ else {
16
+ const input=state.review_input;if(!input)throw Error('review_input required');
17
+ const projectRoot=path.resolve(root,input.project_root||'.');let contract=null,comparison_ref=null;
18
+ if(input.scope_kind==='change') {
19
+ const loaded=inspectSliceContract(input.slice_contract_ref,{root,approval_ref:input.approval_ref,work_unit_id:input.work_unit_id});
20
+ if(!loaded.report.execution_allowed)throw Error(loaded.report.blockers.join('; '));
21
+ contract=selectSliceWorkUnit(loaded.contract,input.work_unit_id);
22
+ comparison_ref=input.review_mode==='worktree'?inspectMaintenanceCandidate({manifestPath:coverageFile(projectRoot,input.candidate_snapshot_ref)}).manifest.merge_base:input.review_base_ref;
23
+ }
24
+ console.log(JSON.stringify(compileStandardsCoverage({root,projectRoot,contract,scope_kind:input.scope_kind,baseline_binding:input.baseline_binding,comparison_ref,actual_skills:input.actual_skill_impacts||[],responsibility_evidence:input.responsibility_evidence||[]}),null,2));
25
+ }
26
+ } catch(error){console.error(error.message);process.exitCode=1;}
@@ -3,8 +3,10 @@ import path from 'node:path';
3
3
  import { spawnSync } from 'node:child_process';
4
4
  import { createHash } from 'node:crypto';
5
5
  import { parseSliceYaml, selectSliceWorkUnit } from './slice-contract.mjs';
6
+ import { validateApprovalRecord } from './approval-record.mjs';
6
7
  import { inspectSliceContract } from './slice-execution-preflight.mjs';
7
8
  import { inspectMaintenanceCandidate } from './maintenance-candidate.mjs';
9
+ import { compileStandardsCoverage, coverageDigest, coverageFile, verifyCoverageRows } from './backend-standards-coverage.mjs';
8
10
 
9
11
  const ensure = (condition, message) => { if (!condition) throw new Error(`backend-review: ${message}`); };
10
12
  const text = value => typeof value === 'string' && value.trim();
@@ -22,12 +24,14 @@ function file(root, ref) {
22
24
 
23
25
  export function backendReviewSkills(contract, actualSkills = []) {
24
26
  return [...new Set([...(contract.resolution?.required_skills || []), ...(contract.common?.required_skills || []),
25
- ...(contract.backend?.required_skills || []), ...actualSkills, 'alibaba-java-code-style', 'yss-repository', 'yss-mybatis'])].sort();
27
+ ...(contract.backend?.required_skills || []), ...actualSkills, 'alibaba-java-code-style'])].sort();
26
28
  }
27
29
 
28
30
  /** Validate existing code-review result and constraint_results; this is not an approval authority. */
29
31
  export function validateBackendReview(state, { root = process.cwd() } = {}) {
30
32
  const input = state?.review_input;
33
+ ensure(['baseline','change'].includes(input?.scope_kind), 'scope_kind required; historical records are read-only');
34
+ if (input.scope_kind === 'baseline') return validateBaselineReview(state, {root});
31
35
  ensure(input?.slice_contract_ref, 'review input must bind Slice contract');
32
36
  const loaded = inspectSliceContract(input.slice_contract_ref, { root, approval_ref: input.approval_ref, work_unit_id: input.work_unit_id });
33
37
  ensure(loaded.report.execution_allowed, `approved current contract required: ${loaded.report.blockers.join('; ')}`);
@@ -68,25 +72,9 @@ export function validateBackendReview(state, { root = process.cwd() } = {}) {
68
72
  ensure(tree === input.candidate_digest, 'committed candidate mismatch');
69
73
  ensure(git(projectRoot, ['rev-parse','HEAD^{tree}']).toString().trim() === tree && !git(projectRoot, ['status','--porcelain']).length, 'committed candidate is not current clean checkout');
70
74
  }
71
- const layerSkills = { domain: 'yss-domain', application: 'yss-application', infrastructure: 'yss-repository', web: 'yss-web-controller' };
72
- const actualSkills = [...input.actual_skill_impacts, ...(contract.backend.affected_layers || []).map(layer => layerSkills[layer]).filter(Boolean)];
73
- const required = backendReviewSkills(contract, actualSkills);
74
- const applicable = new Set([...(contract.resolution?.required_skills || []), ...(contract.common?.required_skills || []), ...(contract.backend?.required_skills || []), ...actualSkills, "alibaba-java-code-style"]);
75
- ensure(Array.isArray(result.constraint_results), 'constraint_results required');
76
- for (const skill of required) {
77
- const rows = result.constraint_results.filter(row => row.skill === skill && row.axis === 'Standards');
78
- ensure(rows.length, `skill not reviewed: ${skill}`);
79
- for (const row of rows) {
80
- ensure(text(row.constraint) && text(row.rule_ref) && text(row.code_ref) && text(row.evidence_ref), `${skill}: rule/code/evidence required`);
81
- ensure(['passed','not-applicable'].includes(row.status), `${skill}: unresolved violation`);
82
- ensure(row.status !== 'not-applicable' || (text(row.reason) && !applicable.has(skill)), `${skill}: applicable skill cannot be waived`);
83
- ensure(row.rule_ref.startsWith(`.agents/skills/${skill}/`), `${skill}: rule must cite its canonical skill`);
84
- const rule = fs.readFileSync(file(root, row.rule_ref.split('#')[0]));
85
- ensure(digest(rule) === row.rule_digest, `${skill}: rule evidence stale`);
86
- ensure(fs.existsSync(file(projectRoot, row.code_ref.split(':')[0])), `${skill}: missing code location`);
87
- ensure(digest(fs.readFileSync(file(root, row.evidence_ref))) === row.evidence_digest, `${skill}: verification evidence stale`);
88
- }
89
- }
75
+ const coverage = currentStandardsCoverage(input, {root, projectRoot, contract});
76
+ verifyCoverageRows(coverage, result.constraint_results, {root, projectRoot});
77
+ const required = coverage.skills.map(row => row.skill);
90
78
  ensure(Array.isArray(result.verification_results) && result.verification_results.length > 0, 'machine verification required');
91
79
  for (const check of result.verification_results) {
92
80
  ensure(text(check.command) && Number.isFinite(Date.parse(check.executed_at)) && check.exit_code === 0 && check.candidate_digest === result.candidate_digest, 'machine check failed, absent or stale');
@@ -100,3 +88,53 @@ export function validateBackendReview(state, { root = process.cwd() } = {}) {
100
88
  }
101
89
  return { status: 'passed', candidate_digest: input.candidate_digest, reviewed_skills: required };
102
90
  }
91
+
92
+ /** Recompute derived coverage, do not trust a submitted expected-rule list. */
93
+ export function currentStandardsCoverage(input, {root, projectRoot, contract=null}={}) {
94
+ ensure(input.standards_coverage_ref && input.standards_coverage_digest, 'standards coverage binding required');
95
+ const bytes=fs.readFileSync(file(root,input.standards_coverage_ref));
96
+ ensure(digest(bytes)===input.standards_coverage_digest, 'standards coverage digest stale');
97
+ const recorded=parseSliceYaml(bytes.toString());
98
+ let comparison_ref=null;
99
+ if(input.scope_kind==='change') {
100
+ comparison_ref=input.review_mode==='worktree'
101
+ ? inspectMaintenanceCandidate({manifestPath:file(projectRoot,input.candidate_snapshot_ref)}).manifest.merge_base
102
+ : input.review_base_ref;
103
+ }
104
+ const current=compileStandardsCoverage({root,projectRoot,contract,scope_kind:input.scope_kind,
105
+ baseline_binding:input.baseline_binding,comparison_ref,actual_skills:input.actual_skill_impacts||[],responsibility_evidence:input.responsibility_evidence||[]});
106
+ ensure(coverageDigest(current)===coverageDigest(recorded),'standards coverage stale or incomplete');
107
+ return current;
108
+ }
109
+
110
+ function validateBaselineReview(state,{root}) {
111
+ const input=state.review_input,projectRoot=fs.realpathSync(path.resolve(root,input.project_root||'.'));
112
+ const coverage=currentStandardsCoverage(input,{root,projectRoot});
113
+ const result=parseSliceYaml(fs.readFileSync(file(root,state.review_result_ref),'utf8'));
114
+ ensure(result.skill==='code-review' && result.result==='completed','independent code-review baseline report required');
115
+ ensure(result.candidate_digest===coverageDigest(coverage.inventory) && input.candidate_digest===result.candidate_digest,'baseline candidate stale');
116
+ for(const key of ['actor_id','runtime_id','instance_id'])ensure(text(result.reviewer?.[key])&&text(result.implementer?.[key]),'baseline actor identity required');
117
+ ensure(result.reviewer.actor_id!==result.implementer.actor_id && result.reviewer.instance_id!==result.implementer.instance_id,'independent Reviewer required');
118
+ ensure(result.implementer.actor_id===input.implementation_actor_id && result.implementer.instance_id===input.implementation_instance_id,'baseline actor mismatch');
119
+ verifyCoverageRows(coverage,result.constraint_results,{root,projectRoot});
120
+ ensure(result.axes?.Standards==='passed','Standards must pass');
121
+ ensure(['passed','missing_evidence'].includes(result.axes?.Spec),'baseline Spec must be explicit');
122
+ if(result.axes.Spec==='passed') {
123
+ ensure(input.spec_binding?.ref && input.spec_binding?.digest,'approved Spec evidence binding required');
124
+ ensure(digest(fs.readFileSync(file(root,input.spec_binding.ref)))===input.spec_binding.digest.replace(/^sha256:/,''),'Spec evidence stale');
125
+ ensure(text(input.spec_binding.approval_ref),'Spec approval record required');
126
+ const approval=parseSliceYaml(fs.readFileSync(file(root,input.spec_binding.approval_ref),'utf8'));
127
+ validateApprovalRecord(approval,{root,requireApproved:true,rolesDoc:parseSliceYaml(fs.readFileSync(file(root,'docs/agents/digital-human-roles.yaml'),'utf8'))});
128
+ ensure(approval.gate_id==='gate.spec-baseline-approved' && approval.artifact_bindings?.some(b=>b.digest.replace(/^sha256:/,'')===input.spec_binding.digest.replace(/^sha256:/,'')),'Spec approval does not bind current baseline');
129
+ ensure(Array.isArray(result.constraint_results)&&result.constraint_results.some(r=>r.axis==='Spec'&&r.status==='passed'&&text(r.evidence_ref)),'Spec acceptance evidence required');
130
+ for(const row of result.constraint_results.filter(r=>r.axis==='Spec')) {
131
+ ensure(row.status==='passed'&&text(row.constraint)&&text(row.code_ref)&&text(row.evidence_ref),'Spec acceptance unresolved');
132
+ coverageFile(projectRoot,row.code_ref.split(':')[0]);
133
+ ensure(digest(fs.readFileSync(file(root,row.evidence_ref)))===row.evidence_digest,'Spec acceptance evidence stale');
134
+ }
135
+ }
136
+ ensure(Array.isArray(result.findings)&&result.findings.every(f=>f.disposition==='suggestion'||f.status==='resolved'||(f.disposition==='missing_evidence'&&f.axis==='Spec'&&result.axes.Spec==='missing_evidence')),'baseline blocking findings remain');
137
+ ensure(Array.isArray(result.verification_results)&&result.verification_results.length,'baseline verification required');
138
+ for(const check of result.verification_results)ensure(text(check.command)&&check.exit_code===0&&Number.isFinite(Date.parse(check.executed_at))&&check.candidate_digest===result.candidate_digest&&digest(fs.readFileSync(file(root,check.evidence_ref)))===check.evidence_digest,'baseline machine evidence missing or stale');
139
+ return {status:'audited',axes:result.axes,execution_allowed:false,scope_kind:'baseline',candidate_digest:result.candidate_digest,reviewed_skills:coverage.skills.map(s=>s.skill)};
140
+ }