create-yss-spec 3.5.6 → 3.5.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 (578) hide show
  1. package/bin/create-yss-spec.js +3 -1
  2. package/cli-core.lock.json +10 -6
  3. package/package.json +4 -1
  4. package/src/api/_sync-service.js +3 -1
  5. package/src/command-runner.mjs +44 -9
  6. package/src/commands/doctor.js +40 -0
  7. package/src/commands/skills.js +7 -2
  8. package/src/content-identity.js +111 -0
  9. package/src/runtime-store.mjs +650 -0
  10. package/src/template/asset-runtime.js +124 -22
  11. package/src/template/instance-runtime.js +23 -7
  12. package/src/validation/metadata.js +8 -0
  13. package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -3
  14. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +30 -36
  15. package/template/.agents/skills/archify/SKILL.md +2 -2
  16. package/template/.agents/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
  17. package/template/.agents/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
  18. package/template/.agents/skills/code-review/SKILL.md +19 -11
  19. package/template/.agents/skills/code-review/references/candidate-capture.md +1 -1
  20. package/template/.agents/skills/code-review/references/legacy-convergence.md +3 -1
  21. package/template/.agents/skills/code-review/references/review-axis-checklists.md +2 -0
  22. package/template/.agents/skills/code-review/references/yss-review-standards.md +4 -2
  23. package/template/.agents/skills/competitive-intelligence/SKILL.md +32 -74
  24. package/template/.agents/skills/file-export-download/SKILL.md +4 -73
  25. package/template/.agents/skills/file-export-download/references/binary-contract-example.md +26 -0
  26. package/template/.agents/skills/file-export-download/references/download-call-example.md +45 -0
  27. package/template/.agents/skills/formily-foundation/SKILL.md +6 -105
  28. package/template/.agents/skills/formily-foundation/references/async-save-example.md +57 -0
  29. package/template/.agents/skills/formily-foundation/references/query-layout.md +50 -0
  30. package/template/.agents/skills/formily-linkage-effects/SKILL.md +3 -116
  31. package/template/.agents/skills/formily-linkage-effects/references/linkage-example.md +116 -0
  32. package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +3 -81
  33. package/template/.agents/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
  34. package/template/.agents/skills/formily-step-flow/SKILL.md +3 -143
  35. package/template/.agents/skills/formily-step-flow/references/step-flow-example.md +143 -0
  36. package/template/.agents/skills/handoff/SKILL.md +3 -1
  37. package/template/.agents/skills/i-have-adhd/SKILL.md +2 -2
  38. package/template/.agents/skills/i-have-adhd/references/yss-adaptation.md +2 -2
  39. package/template/.agents/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
  40. package/template/.agents/skills/implement/SKILL.md +2 -2
  41. package/template/.agents/skills/llm-wiki/references/transactions.md +2 -2
  42. package/template/.agents/skills/llm-wiki/scripts/core.mjs +40 -2
  43. package/template/.agents/skills/llm-wiki/scripts/transaction.mjs +30 -27
  44. package/template/.agents/skills/llm-wiki/scripts/v2.test.mjs +38 -2
  45. package/template/.agents/skills/lombok/SKILL.md +2 -0
  46. package/template/.agents/skills/mapstruct/SKILL.md +2 -0
  47. package/template/.agents/skills/tdd/SKILL.md +2 -2
  48. package/template/.agents/skills/theme-token-usage/SKILL.md +6 -5
  49. package/template/.agents/skills/wayfinder/references/chart-map.md +2 -2
  50. package/template/.agents/skills/wayfinder/references/ticket-types.md +1 -1
  51. package/template/.agents/skills/yss-api-integration/SKILL.md +13 -50
  52. package/template/.agents/skills/yss-api-integration/references/orval-list-example.md +38 -0
  53. package/template/.agents/skills/yss-application/SKILL.md +11 -5
  54. package/template/.agents/skills/yss-audit-log/SKILL.md +8 -6
  55. package/template/.agents/skills/yss-audit-log/references/README.md +5 -5
  56. package/template/.agents/skills/yss-cache/SKILL.md +4 -4
  57. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
  58. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
  59. package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
  60. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
  61. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  62. package/template/.agents/skills/yss-distributed-id/SKILL.md +4 -4
  63. package/template/.agents/skills/yss-dto/SKILL.md +9 -9
  64. package/template/.agents/skills/yss-dto/references/README.md +4 -4
  65. package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +4 -4
  66. package/template/.agents/skills/yss-excel-mvc/SKILL.md +4 -4
  67. package/template/.agents/skills/yss-exception/SKILL.md +42 -48
  68. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +26 -170
  69. package/template/.agents/skills/yss-formily-schema-generator/references/workflow.md +49 -193
  70. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
  71. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +4 -6
  72. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
  73. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
  74. package/template/.agents/skills/yss-mybatis/SKILL.md +4 -4
  75. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +6 -4
  76. package/template/.agents/skills/yss-openapi-draft-review/references/review-output.md +2 -0
  77. package/template/.agents/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
  78. package/template/.agents/skills/yss-openapi-governance/SKILL.md +5 -7
  79. package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +2 -0
  80. package/template/.agents/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
  81. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +32 -26
  82. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
  83. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +28 -6
  84. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
  85. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +38 -13
  86. package/template/.agents/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
  87. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -1
  88. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
  89. package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -5
  90. package/template/.agents/skills/yss-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
  91. package/template/.agents/skills/yss-repository/SKILL.md +2 -2
  92. package/template/.agents/skills/yss-research/SKILL.md +39 -48
  93. package/template/.agents/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
  94. package/template/.agents/skills/yss-research/references/competitive-analysis.md +76 -0
  95. package/template/.agents/skills/yss-research/references/competitive-analysis.schema.json +324 -0
  96. package/template/.agents/skills/yss-research/references/evidence-contract.md +8 -0
  97. package/template/.agents/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
  98. package/template/.agents/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
  99. package/template/.agents/skills/yss-research/scripts/validate-research-package.mjs +6 -2
  100. package/template/.agents/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
  101. package/template/.agents/skills/yss-resilience4j/SKILL.md +25 -31
  102. package/template/.agents/skills/yss-security-algorithm/SKILL.md +37 -43
  103. package/template/.agents/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
  104. package/template/.agents/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  105. package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -5
  106. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
  107. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
  108. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
  109. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -1
  110. package/template/.agents/skills/yss-tactical-design/references/output-template.md +3 -3
  111. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  112. package/template/.agents/skills/yss-technical-design/SKILL.md +6 -5
  113. package/template/.agents/skills/yss-ui/SKILL.md +7 -1
  114. package/template/.agents/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
  115. package/template/.agents/skills/yss-ui/references/checklist.md +38 -96
  116. package/template/.agents/skills/yss-ui/references/component-routing.md +3 -1
  117. package/template/.agents/skills/yss-ui/references/quick-recipes.md +17 -272
  118. package/template/.agents/skills/yss-ui/references/specialized-components.md +3 -3
  119. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  120. package/template/.agents/skills/yss-up-springboot3/SKILL.md +19 -21
  121. package/template/.agents/skills/yss-userinfo/SKILL.md +27 -33
  122. package/template/.agents/skills/yss-validation/SKILL.md +26 -32
  123. package/template/.agents/skills/yss-web-controller/SKILL.md +11 -44
  124. package/template/.agents/skills/yss-web-controller/references/crud-generation.md +38 -0
  125. package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
  126. package/template/.agents/skills/ytree-usage/SKILL.md +2 -80
  127. package/template/.agents/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
  128. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +30 -36
  129. package/template/.codex/skills/archify/SKILL.md +2 -2
  130. package/template/.codex/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
  131. package/template/.codex/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
  132. package/template/.codex/skills/code-review/SKILL.md +19 -11
  133. package/template/.codex/skills/code-review/references/candidate-capture.md +1 -1
  134. package/template/.codex/skills/code-review/references/legacy-convergence.md +3 -1
  135. package/template/.codex/skills/code-review/references/review-axis-checklists.md +2 -0
  136. package/template/.codex/skills/code-review/references/yss-review-standards.md +4 -2
  137. package/template/.codex/skills/competitive-intelligence/SKILL.md +32 -74
  138. package/template/.codex/skills/file-export-download/SKILL.md +4 -73
  139. package/template/.codex/skills/file-export-download/references/binary-contract-example.md +26 -0
  140. package/template/.codex/skills/file-export-download/references/download-call-example.md +45 -0
  141. package/template/.codex/skills/formily-foundation/SKILL.md +6 -105
  142. package/template/.codex/skills/formily-foundation/references/async-save-example.md +57 -0
  143. package/template/.codex/skills/formily-foundation/references/query-layout.md +50 -0
  144. package/template/.codex/skills/formily-linkage-effects/SKILL.md +3 -116
  145. package/template/.codex/skills/formily-linkage-effects/references/linkage-example.md +116 -0
  146. package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +3 -81
  147. package/template/.codex/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
  148. package/template/.codex/skills/formily-step-flow/SKILL.md +3 -143
  149. package/template/.codex/skills/formily-step-flow/references/step-flow-example.md +143 -0
  150. package/template/.codex/skills/handoff/SKILL.md +3 -1
  151. package/template/.codex/skills/i-have-adhd/SKILL.md +2 -2
  152. package/template/.codex/skills/i-have-adhd/references/yss-adaptation.md +2 -2
  153. package/template/.codex/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
  154. package/template/.codex/skills/implement/SKILL.md +2 -2
  155. package/template/.codex/skills/llm-wiki/references/transactions.md +2 -2
  156. package/template/.codex/skills/llm-wiki/scripts/core.mjs +40 -2
  157. package/template/.codex/skills/llm-wiki/scripts/transaction.mjs +30 -27
  158. package/template/.codex/skills/llm-wiki/scripts/v2.test.mjs +38 -2
  159. package/template/.codex/skills/lombok/SKILL.md +2 -0
  160. package/template/.codex/skills/mapstruct/SKILL.md +2 -0
  161. package/template/.codex/skills/product-design/references/communication-protocol.md +3 -3
  162. package/template/.codex/skills/product-design/references/critical-overrides.md +4 -5
  163. package/template/.codex/skills/product-design/skills/audit/SKILL.md +2 -4
  164. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +6 -8
  165. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +3 -3
  166. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +3 -5
  167. package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
  168. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +2 -4
  169. package/template/.codex/skills/product-design/skills/research/SKILL.md +4 -6
  170. package/template/.codex/skills/product-design/skills/research/assets/research-brief-template.md +3 -3
  171. package/template/.codex/skills/product-design/skills/share/SKILL.md +2 -4
  172. package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +2 -4
  173. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  174. package/template/.codex/skills/tdd/SKILL.md +2 -2
  175. package/template/.codex/skills/theme-token-usage/SKILL.md +6 -5
  176. package/template/.codex/skills/wayfinder/references/chart-map.md +2 -2
  177. package/template/.codex/skills/wayfinder/references/ticket-types.md +1 -1
  178. package/template/.codex/skills/yss-api-integration/SKILL.md +13 -50
  179. package/template/.codex/skills/yss-api-integration/references/orval-list-example.md +38 -0
  180. package/template/.codex/skills/yss-application/SKILL.md +11 -5
  181. package/template/.codex/skills/yss-audit-log/SKILL.md +8 -6
  182. package/template/.codex/skills/yss-audit-log/references/README.md +5 -5
  183. package/template/.codex/skills/yss-cache/SKILL.md +4 -4
  184. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
  185. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
  186. package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
  187. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
  188. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  189. package/template/.codex/skills/yss-distributed-id/SKILL.md +4 -4
  190. package/template/.codex/skills/yss-dto/SKILL.md +9 -9
  191. package/template/.codex/skills/yss-dto/references/README.md +4 -4
  192. package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +4 -4
  193. package/template/.codex/skills/yss-excel-mvc/SKILL.md +4 -4
  194. package/template/.codex/skills/yss-exception/SKILL.md +42 -48
  195. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +26 -170
  196. package/template/.codex/skills/yss-formily-schema-generator/references/workflow.md +49 -193
  197. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
  198. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +4 -6
  199. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
  200. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
  201. package/template/.codex/skills/yss-mybatis/SKILL.md +4 -4
  202. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +6 -4
  203. package/template/.codex/skills/yss-openapi-draft-review/references/review-output.md +2 -0
  204. package/template/.codex/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
  205. package/template/.codex/skills/yss-openapi-governance/SKILL.md +5 -7
  206. package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +2 -0
  207. package/template/.codex/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
  208. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +32 -26
  209. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
  210. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +28 -6
  211. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
  212. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +38 -13
  213. package/template/.codex/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
  214. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -1
  215. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
  216. package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -5
  217. package/template/.codex/skills/yss-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
  218. package/template/.codex/skills/yss-repository/SKILL.md +2 -2
  219. package/template/.codex/skills/yss-research/SKILL.md +39 -48
  220. package/template/.codex/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
  221. package/template/.codex/skills/yss-research/references/competitive-analysis.md +76 -0
  222. package/template/.codex/skills/yss-research/references/competitive-analysis.schema.json +324 -0
  223. package/template/.codex/skills/yss-research/references/evidence-contract.md +8 -0
  224. package/template/.codex/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
  225. package/template/.codex/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
  226. package/template/.codex/skills/yss-research/scripts/validate-research-package.mjs +6 -2
  227. package/template/.codex/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
  228. package/template/.codex/skills/yss-resilience4j/SKILL.md +25 -31
  229. package/template/.codex/skills/yss-security-algorithm/SKILL.md +37 -43
  230. package/template/.codex/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
  231. package/template/.codex/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  232. package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -5
  233. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
  234. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
  235. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
  236. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -1
  237. package/template/.codex/skills/yss-tactical-design/references/output-template.md +3 -3
  238. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  239. package/template/.codex/skills/yss-technical-design/SKILL.md +6 -5
  240. package/template/.codex/skills/yss-ui/SKILL.md +7 -1
  241. package/template/.codex/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
  242. package/template/.codex/skills/yss-ui/references/checklist.md +38 -96
  243. package/template/.codex/skills/yss-ui/references/component-routing.md +3 -1
  244. package/template/.codex/skills/yss-ui/references/quick-recipes.md +17 -272
  245. package/template/.codex/skills/yss-ui/references/specialized-components.md +3 -3
  246. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  247. package/template/.codex/skills/yss-up-springboot3/SKILL.md +19 -21
  248. package/template/.codex/skills/yss-userinfo/SKILL.md +27 -33
  249. package/template/.codex/skills/yss-validation/SKILL.md +26 -32
  250. package/template/.codex/skills/yss-web-controller/SKILL.md +11 -44
  251. package/template/.codex/skills/yss-web-controller/references/crud-generation.md +38 -0
  252. package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
  253. package/template/.codex/skills/ytree-usage/SKILL.md +2 -80
  254. package/template/.codex/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
  255. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +30 -36
  256. package/template/.cursor/skills/archify/SKILL.md +2 -2
  257. package/template/.cursor/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
  258. package/template/.cursor/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
  259. package/template/.cursor/skills/code-review/SKILL.md +19 -11
  260. package/template/.cursor/skills/code-review/references/candidate-capture.md +1 -1
  261. package/template/.cursor/skills/code-review/references/legacy-convergence.md +3 -1
  262. package/template/.cursor/skills/code-review/references/review-axis-checklists.md +2 -0
  263. package/template/.cursor/skills/code-review/references/yss-review-standards.md +4 -2
  264. package/template/.cursor/skills/competitive-intelligence/SKILL.md +32 -74
  265. package/template/.cursor/skills/file-export-download/SKILL.md +4 -73
  266. package/template/.cursor/skills/file-export-download/references/binary-contract-example.md +26 -0
  267. package/template/.cursor/skills/file-export-download/references/download-call-example.md +45 -0
  268. package/template/.cursor/skills/formily-foundation/SKILL.md +6 -105
  269. package/template/.cursor/skills/formily-foundation/references/async-save-example.md +57 -0
  270. package/template/.cursor/skills/formily-foundation/references/query-layout.md +50 -0
  271. package/template/.cursor/skills/formily-linkage-effects/SKILL.md +3 -116
  272. package/template/.cursor/skills/formily-linkage-effects/references/linkage-example.md +116 -0
  273. package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +3 -81
  274. package/template/.cursor/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
  275. package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -143
  276. package/template/.cursor/skills/formily-step-flow/references/step-flow-example.md +143 -0
  277. package/template/.cursor/skills/handoff/SKILL.md +3 -1
  278. package/template/.cursor/skills/i-have-adhd/SKILL.md +2 -2
  279. package/template/.cursor/skills/i-have-adhd/references/yss-adaptation.md +2 -2
  280. package/template/.cursor/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
  281. package/template/.cursor/skills/implement/SKILL.md +2 -2
  282. package/template/.cursor/skills/llm-wiki/references/transactions.md +2 -2
  283. package/template/.cursor/skills/llm-wiki/scripts/core.mjs +40 -2
  284. package/template/.cursor/skills/llm-wiki/scripts/transaction.mjs +30 -27
  285. package/template/.cursor/skills/llm-wiki/scripts/v2.test.mjs +38 -2
  286. package/template/.cursor/skills/lombok/SKILL.md +2 -0
  287. package/template/.cursor/skills/mapstruct/SKILL.md +2 -0
  288. package/template/.cursor/skills/tdd/SKILL.md +2 -2
  289. package/template/.cursor/skills/theme-token-usage/SKILL.md +6 -5
  290. package/template/.cursor/skills/wayfinder/references/chart-map.md +2 -2
  291. package/template/.cursor/skills/wayfinder/references/ticket-types.md +1 -1
  292. package/template/.cursor/skills/yss-api-integration/SKILL.md +13 -50
  293. package/template/.cursor/skills/yss-api-integration/references/orval-list-example.md +38 -0
  294. package/template/.cursor/skills/yss-application/SKILL.md +11 -5
  295. package/template/.cursor/skills/yss-audit-log/SKILL.md +8 -6
  296. package/template/.cursor/skills/yss-audit-log/references/README.md +5 -5
  297. package/template/.cursor/skills/yss-cache/SKILL.md +4 -4
  298. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
  299. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
  300. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
  301. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
  302. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  303. package/template/.cursor/skills/yss-distributed-id/SKILL.md +4 -4
  304. package/template/.cursor/skills/yss-dto/SKILL.md +9 -9
  305. package/template/.cursor/skills/yss-dto/references/README.md +4 -4
  306. package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +4 -4
  307. package/template/.cursor/skills/yss-excel-mvc/SKILL.md +4 -4
  308. package/template/.cursor/skills/yss-exception/SKILL.md +42 -48
  309. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +26 -170
  310. package/template/.cursor/skills/yss-formily-schema-generator/references/workflow.md +49 -193
  311. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
  312. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +4 -6
  313. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
  314. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
  315. package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -4
  316. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +6 -4
  317. package/template/.cursor/skills/yss-openapi-draft-review/references/review-output.md +2 -0
  318. package/template/.cursor/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
  319. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +5 -7
  320. package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +2 -0
  321. package/template/.cursor/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
  322. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +32 -26
  323. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
  324. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +28 -6
  325. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
  326. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +38 -13
  327. package/template/.cursor/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
  328. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -1
  329. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
  330. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -5
  331. package/template/.cursor/skills/yss-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
  332. package/template/.cursor/skills/yss-repository/SKILL.md +2 -2
  333. package/template/.cursor/skills/yss-research/SKILL.md +39 -48
  334. package/template/.cursor/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
  335. package/template/.cursor/skills/yss-research/references/competitive-analysis.md +76 -0
  336. package/template/.cursor/skills/yss-research/references/competitive-analysis.schema.json +324 -0
  337. package/template/.cursor/skills/yss-research/references/evidence-contract.md +8 -0
  338. package/template/.cursor/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
  339. package/template/.cursor/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
  340. package/template/.cursor/skills/yss-research/scripts/validate-research-package.mjs +6 -2
  341. package/template/.cursor/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
  342. package/template/.cursor/skills/yss-resilience4j/SKILL.md +25 -31
  343. package/template/.cursor/skills/yss-security-algorithm/SKILL.md +37 -43
  344. package/template/.cursor/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
  345. package/template/.cursor/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  346. package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -5
  347. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
  348. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
  349. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
  350. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -1
  351. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +3 -3
  352. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  353. package/template/.cursor/skills/yss-technical-design/SKILL.md +6 -5
  354. package/template/.cursor/skills/yss-ui/SKILL.md +7 -1
  355. package/template/.cursor/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
  356. package/template/.cursor/skills/yss-ui/references/checklist.md +38 -96
  357. package/template/.cursor/skills/yss-ui/references/component-routing.md +3 -1
  358. package/template/.cursor/skills/yss-ui/references/quick-recipes.md +17 -272
  359. package/template/.cursor/skills/yss-ui/references/specialized-components.md +3 -3
  360. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  361. package/template/.cursor/skills/yss-up-springboot3/SKILL.md +19 -21
  362. package/template/.cursor/skills/yss-userinfo/SKILL.md +27 -33
  363. package/template/.cursor/skills/yss-validation/SKILL.md +26 -32
  364. package/template/.cursor/skills/yss-web-controller/SKILL.md +11 -44
  365. package/template/.cursor/skills/yss-web-controller/references/crud-generation.md +38 -0
  366. package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
  367. package/template/.cursor/skills/ytree-usage/SKILL.md +2 -80
  368. package/template/.cursor/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
  369. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +30 -36
  370. package/template/.pi/skills/archify/SKILL.md +2 -2
  371. package/template/.pi/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
  372. package/template/.pi/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
  373. package/template/.pi/skills/code-review/SKILL.md +19 -11
  374. package/template/.pi/skills/code-review/references/candidate-capture.md +1 -1
  375. package/template/.pi/skills/code-review/references/legacy-convergence.md +3 -1
  376. package/template/.pi/skills/code-review/references/review-axis-checklists.md +2 -0
  377. package/template/.pi/skills/code-review/references/yss-review-standards.md +4 -2
  378. package/template/.pi/skills/competitive-intelligence/SKILL.md +32 -74
  379. package/template/.pi/skills/file-export-download/SKILL.md +4 -73
  380. package/template/.pi/skills/file-export-download/references/binary-contract-example.md +26 -0
  381. package/template/.pi/skills/file-export-download/references/download-call-example.md +45 -0
  382. package/template/.pi/skills/formily-foundation/SKILL.md +6 -105
  383. package/template/.pi/skills/formily-foundation/references/async-save-example.md +57 -0
  384. package/template/.pi/skills/formily-foundation/references/query-layout.md +50 -0
  385. package/template/.pi/skills/formily-linkage-effects/SKILL.md +3 -116
  386. package/template/.pi/skills/formily-linkage-effects/references/linkage-example.md +116 -0
  387. package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +3 -81
  388. package/template/.pi/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
  389. package/template/.pi/skills/formily-step-flow/SKILL.md +3 -143
  390. package/template/.pi/skills/formily-step-flow/references/step-flow-example.md +143 -0
  391. package/template/.pi/skills/handoff/SKILL.md +3 -1
  392. package/template/.pi/skills/i-have-adhd/SKILL.md +2 -2
  393. package/template/.pi/skills/i-have-adhd/references/yss-adaptation.md +2 -2
  394. package/template/.pi/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
  395. package/template/.pi/skills/implement/SKILL.md +2 -2
  396. package/template/.pi/skills/llm-wiki/references/transactions.md +2 -2
  397. package/template/.pi/skills/llm-wiki/scripts/core.mjs +40 -2
  398. package/template/.pi/skills/llm-wiki/scripts/transaction.mjs +30 -27
  399. package/template/.pi/skills/llm-wiki/scripts/v2.test.mjs +38 -2
  400. package/template/.pi/skills/lombok/SKILL.md +2 -0
  401. package/template/.pi/skills/mapstruct/SKILL.md +2 -0
  402. package/template/.pi/skills/tdd/SKILL.md +2 -2
  403. package/template/.pi/skills/theme-token-usage/SKILL.md +6 -5
  404. package/template/.pi/skills/wayfinder/references/chart-map.md +2 -2
  405. package/template/.pi/skills/wayfinder/references/ticket-types.md +1 -1
  406. package/template/.pi/skills/yss-api-integration/SKILL.md +13 -50
  407. package/template/.pi/skills/yss-api-integration/references/orval-list-example.md +38 -0
  408. package/template/.pi/skills/yss-application/SKILL.md +11 -5
  409. package/template/.pi/skills/yss-audit-log/SKILL.md +8 -6
  410. package/template/.pi/skills/yss-audit-log/references/README.md +5 -5
  411. package/template/.pi/skills/yss-cache/SKILL.md +4 -4
  412. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
  413. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
  414. package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
  415. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
  416. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  417. package/template/.pi/skills/yss-distributed-id/SKILL.md +4 -4
  418. package/template/.pi/skills/yss-dto/SKILL.md +9 -9
  419. package/template/.pi/skills/yss-dto/references/README.md +4 -4
  420. package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +4 -4
  421. package/template/.pi/skills/yss-excel-mvc/SKILL.md +4 -4
  422. package/template/.pi/skills/yss-exception/SKILL.md +42 -48
  423. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +26 -170
  424. package/template/.pi/skills/yss-formily-schema-generator/references/workflow.md +49 -193
  425. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
  426. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +4 -6
  427. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
  428. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
  429. package/template/.pi/skills/yss-mybatis/SKILL.md +4 -4
  430. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +6 -4
  431. package/template/.pi/skills/yss-openapi-draft-review/references/review-output.md +2 -0
  432. package/template/.pi/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
  433. package/template/.pi/skills/yss-openapi-governance/SKILL.md +5 -7
  434. package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +2 -0
  435. package/template/.pi/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
  436. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +32 -26
  437. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
  438. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +28 -6
  439. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
  440. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +38 -13
  441. package/template/.pi/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
  442. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -1
  443. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
  444. package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -5
  445. package/template/.pi/skills/yss-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
  446. package/template/.pi/skills/yss-repository/SKILL.md +2 -2
  447. package/template/.pi/skills/yss-research/SKILL.md +39 -48
  448. package/template/.pi/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
  449. package/template/.pi/skills/yss-research/references/competitive-analysis.md +76 -0
  450. package/template/.pi/skills/yss-research/references/competitive-analysis.schema.json +324 -0
  451. package/template/.pi/skills/yss-research/references/evidence-contract.md +8 -0
  452. package/template/.pi/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
  453. package/template/.pi/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
  454. package/template/.pi/skills/yss-research/scripts/validate-research-package.mjs +6 -2
  455. package/template/.pi/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
  456. package/template/.pi/skills/yss-resilience4j/SKILL.md +25 -31
  457. package/template/.pi/skills/yss-security-algorithm/SKILL.md +37 -43
  458. package/template/.pi/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
  459. package/template/.pi/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  460. package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -5
  461. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
  462. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
  463. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
  464. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -1
  465. package/template/.pi/skills/yss-tactical-design/references/output-template.md +3 -3
  466. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  467. package/template/.pi/skills/yss-technical-design/SKILL.md +6 -5
  468. package/template/.pi/skills/yss-ui/SKILL.md +7 -1
  469. package/template/.pi/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
  470. package/template/.pi/skills/yss-ui/references/checklist.md +38 -96
  471. package/template/.pi/skills/yss-ui/references/component-routing.md +3 -1
  472. package/template/.pi/skills/yss-ui/references/quick-recipes.md +17 -272
  473. package/template/.pi/skills/yss-ui/references/specialized-components.md +3 -3
  474. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  475. package/template/.pi/skills/yss-up-springboot3/SKILL.md +19 -21
  476. package/template/.pi/skills/yss-userinfo/SKILL.md +27 -33
  477. package/template/.pi/skills/yss-validation/SKILL.md +26 -32
  478. package/template/.pi/skills/yss-web-controller/SKILL.md +11 -44
  479. package/template/.pi/skills/yss-web-controller/references/crud-generation.md +38 -0
  480. package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
  481. package/template/.pi/skills/ytree-usage/SKILL.md +2 -80
  482. package/template/.pi/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
  483. package/template/.template-spec/agents/backend-architecture-profiles.md +1 -1
  484. package/template/.template-spec/agents/digital-human-roles.md +5 -1
  485. package/template/.template-spec/agents/digital-human-roles.yaml +49 -1
  486. package/template/.template-spec/engineering/backend-platforms.json +1 -1
  487. package/template/.template-spec/plan/entry-review.md +2 -1
  488. package/template/.template-spec/plan/templates/competitive-analysis-template.md +38 -36
  489. package/template/.template-spec/plan/templates/competitive-matrix-template.md +37 -17
  490. package/template/.template-spec/plan/templates/plan-template.md +11 -5
  491. package/template/.template-spec/process/document-writing.md +22 -3
  492. package/template/.template-spec/process/harness-process-tailoring.md +5 -1
  493. package/template/.template-spec/process/implementation-repo-integration.md +26 -8
  494. package/template/.template-spec/process/research-completion.md +2 -0
  495. package/template/.template-spec/process/runtime-storage.md +78 -0
  496. package/template/.template-spec/process/schemas/approval-context.schema.json +67 -0
  497. package/template/.template-spec/process/schemas/approval-record.schema.json +179 -16
  498. package/template/.template-spec/process/schemas/backend-delivery.schema.json +16 -0
  499. package/template/.template-spec/process/schemas/delivery-preflight-input.schema.json +4 -0
  500. package/template/.template-spec/process/schemas/digital-human-task-package.schema.json +236 -1
  501. package/template/.template-spec/process/schemas/implementation-repository-preparation-result.schema.json +335 -52
  502. package/template/.template-spec/process/schemas/lifecycle-checkpoint.schema.json +11 -0
  503. package/template/.template-spec/process/schemas/project-scaffold-contract.schema.json +3 -0
  504. package/template/.template-spec/process/schemas/review-bundle.schema.json +347 -35
  505. package/template/.template-spec/process/schemas/strategic-design-handoff-v3.schema.json +504 -0
  506. package/template/.template-spec/process/schemas/strategic-design-handoff-v4.schema.json +544 -8
  507. package/template/.template-spec/process/schemas/strategic-design-handoff-v5.schema.json +616 -0
  508. package/template/.template-spec/process/schemas/strategic-design-handoff.schema.json +616 -0
  509. package/template/.template-spec/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +712 -109
  510. package/template/.template-spec/process/schemas/strategic-handoff-domain-strategy.schema.json +595 -90
  511. package/template/.template-spec/process/schemas/strategic-handoff-export-v2.schema.json +448 -0
  512. package/template/.template-spec/process/schemas/strategic-handoff-export.schema.json +392 -0
  513. package/template/.template-spec/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +556 -83
  514. package/template/.template-spec/process/schemas/strategic-handoff-stage-decision-package.schema.json +418 -57
  515. package/template/.template-spec/process/script-execution.md +37 -0
  516. package/template/.template-spec/process/subagent-collaboration.md +7 -1
  517. package/template/.template-spec/templates/approval-record-template.json +7 -3
  518. package/template/.template-spec/templates/approval-record-template.yaml +8 -2
  519. package/template/.template-spec/templates/examples/lifecycle-writing-examples.md +92 -2
  520. package/template/.template-spec/templates/retro-report-template.md +10 -3
  521. package/template/.template-spec/templates/review-bundle-template.yaml +19 -10
  522. package/template/.template-spec/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +2 -0
  523. package/template/AGENTS.md +4 -3
  524. package/template/CONTEXT.md +2 -2
  525. package/template/README.md +2 -2
  526. package/template/scripts/advance-maintenance-iteration +51 -0
  527. package/template/scripts/lib/approval-checkpoint-discovery.mjs +26 -0
  528. package/template/scripts/lib/approval-consumption.mjs +35 -0
  529. package/template/scripts/lib/approval-current.mjs +111 -0
  530. package/template/scripts/lib/approval-record-io.mjs +56 -0
  531. package/template/scripts/lib/approval-record.mjs +79 -184
  532. package/template/scripts/lib/approved-execution-context.mjs +8 -6
  533. package/template/scripts/lib/asset-transactions.mjs +5 -1
  534. package/template/scripts/lib/backend-delivery.mjs +1 -1
  535. package/template/scripts/lib/backend-review.mjs +2 -1
  536. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +3 -2
  537. package/template/scripts/lib/business-ticket-lifecycle.mjs +2 -1
  538. package/template/scripts/lib/checkpoint-commit.mjs +50 -0
  539. package/template/scripts/lib/command-runner.mjs +44 -9
  540. package/template/scripts/lib/content-identity.mjs +273 -0
  541. package/template/scripts/lib/delivery-preflight.mjs +2 -1
  542. package/template/scripts/lib/digital-human-roles.mjs +12 -5
  543. package/template/scripts/lib/drift-report.mjs +110 -0
  544. package/template/scripts/lib/existing-backend-architecture.mjs +4 -1
  545. package/template/scripts/lib/lifecycle-context-query.mjs +172 -11
  546. package/template/scripts/lib/lifecycle-controls.mjs +9 -19
  547. package/template/scripts/lib/lifecycle-presentation.mjs +5 -0
  548. package/template/scripts/lib/lifecycle-status.mjs +63 -12
  549. package/template/scripts/lib/lifecycle-transition.mjs +2 -1
  550. package/template/scripts/lib/maintenance-candidate.mjs +24 -30
  551. package/template/scripts/lib/maintenance-research.mjs +52 -8
  552. package/template/scripts/lib/maintenance-storage.mjs +81 -0
  553. package/template/scripts/lib/plan-spec-entry.mjs +2 -1
  554. package/template/scripts/lib/project-governance.mjs +2 -1
  555. package/template/scripts/lib/read-only-intake.mjs +44 -9
  556. package/template/scripts/lib/review-capabilities.mjs +234 -0
  557. package/template/scripts/lib/review-package.mjs +100 -0
  558. package/template/scripts/lib/runtime-store.mjs +650 -0
  559. package/template/scripts/lib/skill-registry.mjs +4 -4
  560. package/template/scripts/lib/strategic-handoff.mjs +22 -9
  561. package/template/scripts/lib/task-package.mjs +47 -16
  562. package/template/scripts/lifecycle-status +26 -1
  563. package/template/scripts/maintenance-path +11 -0
  564. package/template/scripts/prepare-review-package +8 -0
  565. package/template/scripts/project-ci +13 -3
  566. package/template/scripts/query-lifecycle-context +8 -1
  567. package/template/scripts/run-read-only-intake +2 -2
  568. package/template/scripts/runtime-store +40 -0
  569. package/template/scripts/verify-approval-record +21 -13
  570. package/template/scripts/verify-lifecycle-checkpoint +7 -3
  571. package/template/scripts/verify-project-instance +21 -1
  572. package/template/skills-lock.json +64 -63
  573. package/template.snapshot.json +4 -4
  574. package/vendor/cli-core/cli.mjs +2 -0
  575. package/vendor/cli-core/command-runner.mjs +44 -9
  576. package/vendor/cli-core/package.json +1 -1
  577. package/vendor/cli-core/runtime-store.mjs +650 -0
  578. package/vendor/cli-core/scaffold.mjs +4 -2
@@ -7,6 +7,10 @@ description: "接入或排查 YSS QueryCache、UpdateCache、ClearCache、TTL、
7
7
 
8
8
  处理 `yss-component-cache-parent` 及其消费项目的缓存任务。
9
9
 
10
+ ## 平台与源码门禁
11
+
12
+ 接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-cache` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
13
+
10
14
  ## 工作流
11
15
 
12
16
  1. 按 `yss-skill-source-index-refresh/references/source-location.md` 定位真实源码。当前工作区有 `.codegraph/` 时先用 CodeGraph;否则读取 [source-index.md](references/source-index.md) 后用符号或 Maven 模块搜索。
@@ -43,7 +47,3 @@ description: "接入或排查 YSS QueryCache、UpdateCache、ClearCache、TTL、
43
47
  - `scripts/check-skill-freshness.sh <boot2-java8|boot3-java17> [source-root]`:比较所选平台线的技能契约与当前组件源码;发现平台错配或漂移返回 1。
44
48
 
45
49
  本 Skill 中新增的 `failure-mode`、区域策略和 `empty-key-eviction` 指引针对当前 Boot 3 组件;Boot 2 的精确配置与默认值须查其独立索引及源码。组件源码形成干净、固定的来源后,用 `yss-skill-source-index-refresh` 刷新所选平台的生成索引,再运行 freshness 检查。`source-index.md` 是平台选择页;不要手工修改生成索引或把 dirty 工作树的观察说成已核验事实。
46
-
47
- ## 平台与源码门禁
48
-
49
- 接入、修改、代码生成或给出精确类名/配置前,读取 [后端组件平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),从批准的 `platform_configuration.component_platform_line` 选择 `source-index.boot2-java8.md` 或 `source-index.boot3-java17.md`,并以 `--skill yss-cache --platform-line <line> --source-root <matching-root>` 运行统一 freshness 校验。平台线与源码根不匹配、组件 tree 不一致、组件子树 dirty、索引缺少平台信号,或 Manifest / 组件 GAV 缺少 verified 兼容证据时返回 `blocked`;不得回退另一代索引,也不在业务实现中升级、降级或替换 YSS 组件。既有工程只读分诊可继续,但不得据此宣称跨 Boot/JDK 兼容。
@@ -50,10 +50,10 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
50
50
 
51
51
  - 先在生命周期批准的脚手架受控生成合同下生成骨架,再做业务化定制;不要直接把脚手架当最终代码交付。
52
52
  - 永不生成 `User CRUD` 示例;`--with-example` 已禁用,业务代码必须按批准的 Slice Implementation Contract 逐切片实现。
53
- - 若目标工程已经存在,直接返回 `unsupported`。旧项目继续按原工程维护;需要现代化时单独立项、先评估再逐切片迁移,不属于本 skill。
54
- - 输出目录必须显式指定;目标工程目录必须不存在,`--force` 永久拒绝。
55
- - Harness 内多项目布局必须使用 `apps/backend/<project>/`;`apps/backend/` 只能是生成器的父容器,`app/backend/`、`app/frontend/` 及其子路径一律拒绝。`git-submodule` gitlink、空挂载点、detached HEAD 工作树不得覆盖生成,即使传入 `--force` 也不得当成普通目录,且不得走「请显式传入 `--force`」普通目录覆盖 / rename 路径。`--output-dir` 指向 detached HEAD 子仓时不得 mkdir、staging 或生成工程。先 `git submodule update --init` 并在子仓附加分支工作树内生成。维护生成器时按 [守卫顺序](references/generator-maintenance.md) 检查,不能将 gitlink 当普通目录。
56
- - 生成时的工程基线由本 skill 的 `references/engineering-baseline.md` 持有并绑定摘要;它不是独立 Skill。生成后必须回到 实现合同编译器,并按批准切片加载 `yss-domain`、`yss-application`、`yss-repository`、`yss-mybatis`、`yss-web-controller`、`yss-dto`、`yss-exception`、`yss-validation`、`mapstruct`、`lombok`、`alibaba-java-code-style` 等实际命中的行为 skill。
53
+ - 输出目录必须显式指定,生成器严格 `initialize-only`;目标工程目录必须不存在。已有工程、非空目标、`--force`、旧项目迁移和当前模板升级均返回 `unsupported`。旧项目继续按原工程维护;现代化或未来同一 Target Profile 模板升级须另行设计、批准,当前不提供该执行能力。
54
+ - Harness 内多项目使用 `apps/backend/<project>/`,`apps/backend/` 只作输出父容器;`app/backend/`、`app/frontend/` 及其子路径一律拒绝。
55
+ - `git-submodule` gitlink、空挂载点和 detached HEAD 不作为普通目录覆盖或 rename,`--force` 不解除边界。`--output-dir` 指向 detached HEAD 子仓时不得 mkdir、staging 或生成;工程准备须先初始化 submodule 并在子仓附加分支工作树内生成。维护生成器时读取 [守卫顺序](references/generator-maintenance.md)。
56
+ - 生成工程基线由本 Skill 的 `references/engineering-baseline.md` 持有并绑定摘要,不是独立 Skill。后续实现的专项路由见 [分层 Skill 路由](references/layer-skill-routing.md),由实现合同编译器按批准切片选择实际命中的技能。
57
57
  - 生成后的后端工程必须使用项目根目录 `./mvnw ...` 执行构建、测试、运行和 CI 验证;不得在 README、实施记录、Ticket、Review 或 Release 中默认写裸 `mvn ...`。既有仓库确实无法使用 wrapper 时,必须记录受控例外。
58
58
  - 原型确认后,`scaffold_status=required` 才能进入本 skill;本 skill 的生成边界是工程结构、POM、配置、Wrapper 和机械模板,不是业务实现。
59
59
  - 脚手架合同必须携带 `contract_id`、`contract_version`、实现合同编译器 draft 引用、生命周期批准引用、持久化引用、当前版本、允许写路径、预期证据文件和验证命令;字段缺失或版本过期时阻断。
@@ -63,8 +63,7 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
63
63
  - 生成项目必须写入 Manifest v4 `.yss/scaffold-generation.json`,记录技术、数据与 API 设计门禁、架构选择及 digest、生成器、合同 digest、Target Profile、模块闭包、模板 digest、下游完整 当前合同 freshness、generator-owned 文件 hash、严格 `generation_policy` 和完成等级;清单缺失或不一致时不得交给后续 实现合同编译器。
64
64
  - `first-slice-verified` 只能由 `run_first_slice_verification.mjs` 写入。手工改 Manifest、只生成 Controller、只通过局部模块测试或仅有结构扫描都不能升级完成等级。
65
65
  - 严禁把领域规则、状态机、权限、事务、复杂查询、错误映射、业务字段或用户可见行为塞进脚手架生成步骤。`./mvnw validate`、输出目录存在或“生成成功”都不等于生命周期批准、架构放行或 `ready-for-agent`。
66
- - 生命周期脚手架生成必须关闭 `--with-example`,不得把 User CRUD 或业务字段当作样板。生成器严格 `initialize-only`:非空目标、`--force`、旧项目迁移和当前模板升级一律 `unsupported`。未来若支持同一 Target Profile 内的模板升级,必须另行设计和批准,当前不预留可执行承诺。
67
- - 脚手架完成后,所有后续生成的后端代码必须回到 `yss-implementation-contract-compiler`,消费批准且版本当前的 Slice Implementation Contract 和对应 YSS skill;业务行为使用 `behavior-tdd`,机械生成才使用 `controlled-generation`。
66
+ - 脚手架完成后,所有后续后端代码必须回到 `yss-implementation-contract-compiler`,消费批准且版本当前的 Slice Implementation Contract 和适用 YSS skill;业务行为使用 `behavior-tdd`,机械生成才使用 `controlled-generation`。
68
67
  - 涉及 API 契约时,先确认 `docs/.scratch/<feature>/api/<feature>.yaml` 中的 OpenAPI Draft / Freeze 状态;不要用脚手架生成结果反向替代产品契约设计。
69
68
 
70
69
  ## 按需读取
@@ -79,7 +78,7 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
79
78
  ## 阶段 7 合同
80
79
 
81
80
  - 仅在实现仓库/输出目录、`scaffold_status=required` 和批准合同明确时运行。
82
- - 工程骨架属于 `controlled-generation`,必须记录生成器输入、预期文件和 `./mvnw ...` 编译/测试结果;不得将业务状态机、权限、事务或查询逻辑混入生成步骤。
81
+ - 工程骨架属于 `controlled-generation`,记录生成器输入、预期文件和实际编译/测试结果。
83
82
  - 生成结果必须包含 `.yss/scaffold-generation.json`,并由验证器回勾该清单;清单与批准合同不一致时阻断。
84
- - `./mvnw validate`、`./mvnw test`、`./mvnw package` 必须由受控工作单元真实执行,并记录每条命令的 `exit_code`、耗时、stdout/stderr 引用和执行时间;只列命令计划、生成器成功或打印输出均视为缺失证据并阻断。
83
+ - 三条根 Wrapper 验证必须按 [受控生成与验证](references/generation-workflow.md) 真实执行,逐条记录 `exit_code`、耗时、stdout/stderr 引用和执行时间;计划、生成器成功或打印输出不构成执行证据,缺失即阻断。
85
84
  - 生成后按统一 `YSS Skill Execution Result` 返回 changed/evidence files、实际验证结果和新增影响,再由 实现合同编译器 为业务工作单元重新路由。
@@ -2,16 +2,22 @@
2
2
 
3
3
  ## 1. 准备批准合同
4
4
 
5
- 新合同是服务级工程基线,使用 schema v4 与 `scaffold_request_id`,并把已批准的技术/数据设计、工程合同批准、架构决策、Java 包名、Maven 坐标和 Profile 分开登记:
5
+ 新合同是服务级工程基线,使用统一 Project Scaffold Contract schema v4 与 `scaffold_request_id`。以下仅展示身份、Profile 和生成策略片段;实际平台、Maven 坐标、设计与批准绑定必须来自当前已批准输入,示例值不能作为生成授权:
6
6
 
7
7
  ```json
8
8
  {
9
- "schema_version": 3,
9
+ "schema_version": 4,
10
+ "kind": "project-scaffold-contract",
11
+ "delivery_role": "backend",
12
+ "scaffold_kind": "backend-ddd",
13
+ "repository_scope": "external-repository",
14
+ "init_git": false,
10
15
  "scaffold_request_id": "scaffold-metadata-service-1",
11
16
  "project_name": "metadata-service",
12
17
  "target_output_dir": "/path/to/implementation-repo",
13
18
  "base_package": "com.yss.metadata",
14
19
  "architecture_family": "domain-driven",
20
+ "architecture_profile": "target-domain-model",
15
21
  "generator_skill": "yss-ddd-scaffold-generator",
16
22
  "decision_ref": "scaffold-architecture-decisions.yaml",
17
23
  "decision_id": "architecture-metadata-service",
@@ -29,9 +35,10 @@
29
35
  "profiles": {
30
36
  "architecture": "target-domain-model",
31
37
  "persistence": "mybatis-plus",
32
- "database": "mysql",
33
- "platform": "spring-boot-2.7-jdk8",
34
- "validation_namespace": "javax",
38
+ "verification_database": "h2",
39
+ "production_database": "not-bound",
40
+ "platform": "<approved-platform-profile>",
41
+ "validation_namespace": "<resolved-platform-namespace>",
35
42
  "dto_placement": "web",
36
43
  "repository": "yss-internal"
37
44
  },
@@ -49,7 +56,7 @@
49
56
  }
50
57
  ```
51
58
 
52
- 以上只是关键片段;实际合同还必须满足 `yss-implementation-contract-compiler/references/compiler-contract.yaml` 中的完整 `scaffold_contract_schema`,引用经用户确认并由生命周期批准的 `scaffold-architecture-decisions.yaml`,再持久化为当前版本。历史 schema v2 仅用于验证器只读兼容;新生成拒绝 schema v1/v2 且不自动升级。
59
+ 完整结构以仓库 `.template-spec/process/schemas/project-scaffold-contract.schema.json` 和编译器 `project_scaffold_contract_schema` 为准,不能使用历史 `scaffold_contract_schema` v3 生成新工程。完整合同还须绑定当前 `platform_configuration` v2、用户确认且生命周期批准的架构决定,以及 `design_prerequisites` 中技术设计、数据与 API 决策、真实工程合同批准;API 有影响时绑定同一 OpenAPI YAML 原字节的 Validation、独立 Review 与 Freeze,无影响时绑定评估、原因和证据。当前批准与持久化、允许路径和验证字段仍须完整,不能直接执行这个片段。历史 Manifest v2/v3 只供只读验证与受控恢复审计;新生成拒绝旧合同且不自动升级。
53
60
 
54
61
  ## 2. 一键生成并验证
55
62
 
@@ -1,5 +1,7 @@
1
1
  ## 推荐命令
2
2
 
3
+ 仅在入口所列批准合同、输出范围和平台证据已齐备时读取;命令从 Skill 根目录执行。项目坐标与平台参数使用当前批准输入,示例值不授予生成、覆盖或版本升级权限。
4
+
3
5
  ```bash
4
6
  node scripts/generate_and_verify_scaffold.mjs \
5
7
  --project-name my-service \
@@ -192,7 +192,7 @@ test("技术和数据设计齐全但缺少 API Decision 时在写文件前拒绝
192
192
  assert.equal(existsSync(path.join(data.output, "demo-service")), false);
193
193
  });
194
194
 
195
- test("API Draft、Validation、Review 或工程批准漂移时均在零写入状态阻断 DDD", async (t) => {
195
+ test("API、工程批准或独立当前批准上下文缺失及漂移时均在零写入状态阻断 DDD", async (t) => {
196
196
  const mutations = [
197
197
  ["OpenAPI YAML 摘要漂移", async (data) => writeFile(data.design.openapi.file, "\n# drift\n", { flag: "a" })],
198
198
  ["Redocly Validation 失败", async (data) => {
@@ -225,6 +225,33 @@ test("API Draft、Validation、Review 或工程批准漂移时均在零写入状
225
225
  approval.artifact_bindings = approval.artifact_bindings.filter((item) => !item.id.startsWith("api-contract."));
226
226
  await writeFile(data.design.approval.file, `${JSON.stringify(approval, null, 2)}\n`);
227
227
  }],
228
+ ["缺少独立当前批准上下文", async (data) => {
229
+ delete data.contract.design_prerequisites.technical_design.approval_context;
230
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
231
+ }],
232
+ ["消费范围替换", async (data) => {
233
+ data.contract.design_prerequisites.technical_design.approval_context.approval_scope = ["scaffold.other", "demo-service"];
234
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
235
+ }],
236
+ ["消费主体替换", async (data) => {
237
+ data.contract.design_prerequisites.technical_design.approval_context.subject_ref = data.design.data.ref;
238
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
239
+ }],
240
+ ["当前依据摘要漂移", async (data) => {
241
+ data.contract.design_prerequisites.technical_design.approval_context.basis[0].digest = `sha256:${"0".repeat(64)}`;
242
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
243
+ }],
244
+ ["当前起草主体替换", async (data) => {
245
+ data.contract.design_prerequisites.technical_design.approval_context.drafter_principal_ref = "other-drafter";
246
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
247
+ }],
248
+ ["当前起草者自签", async (data) => {
249
+ const approval = JSON.parse(await readFile(data.design.approval.file, "utf8"));
250
+ approval.drafter_principal_ref = approval.principal_ref;
251
+ data.contract.design_prerequisites.technical_design.approval_context.drafter_principal_ref = approval.principal_ref;
252
+ await writeFile(data.design.approval.file, `${JSON.stringify(approval, null, 2)}\n`);
253
+ await writeFile(data.contractFile, `${JSON.stringify(data.contract, null, 2)}\n`);
254
+ }],
228
255
  ];
229
256
  for (const [name, mutate] of mutations) {
230
257
  const data = await fixture({ apiImpact: "required" });
@@ -26,7 +26,7 @@ description: 建立或核验 YSS 设计系统、主题 Token 与页面视觉一
26
26
  2. 读取已有资产:先读根 `DESIGN.md`,再读 `.template-spec/design/design.md` 和 Token 派生快照,最后按任务读取相关 Spec、交互说明、状态矩阵、OpenAPI Draft、现有页面代码。
27
27
  3. 按设计系统基线约束输出或修改产物:颜色、排版、间距、圆角、动效、组件、状态、响应式。
28
28
  4. 若是产品设计阶段,先使用 `yss-prototype-stage`;规范直出由 YSS HTML adapter 执行;存在已选视觉稿时条件使用 `product-design:index`,其他 Agent 交付等价证据。
29
- 5. 若是前端实现阶段,配合 `yss-ui`、`yss-ui-business-page-generation`、`yss-formily` 及实际命中的组件专项,但本技能负责风格与体验一致性门禁。
29
+ 5. 若是前端实现阶段,配合 `yss-ui`、`yss-ui-business-page-generation`、`yss-formily` 及实际命中的组件专项,但本技能负责风格与体验一致性门禁。原型阶段只选择设计语义及已登记原型组件;生产组件名称、版本和 API 留给实现计划按目标仓来源核验,不在原型阶段调用 `yss-ui`。
30
30
  6. 若发现视觉 Token 或组件变体不足,先更新根 `DESIGN.md` 并重新生成投影;只有治理、流程或验收说明不足时才更新 `.template-spec/design/design.md`。
31
31
 
32
32
  新建高保真原型默认选择根规范已有的紧凑组件变体,按需读取 [原型默认主题](references/prototype-default-theme.md);此选择不改变生产主题默认值或既有批准页面。
@@ -72,7 +72,7 @@ description: 建立或核验 YSS 设计系统、主题 Token 与页面视觉一
72
72
 
73
73
  - 设计系统引用:明确引用根 `DESIGN.md`、治理说明 `.template-spec/design/design.md` 和所选主题的 Token 快照;原型证据记录规范与 Token 摘要。
74
74
  - 页面和模块:页面清单、布局结构、主路径、异常路径。
75
- - 组件选择:YSS UI / Ant Design 组件映射。
75
+ - 组件选择:设计 / 原型记录控件语义及原型组件映射;前端实现计划按目标仓已核验版本记录 YSS UI / Ant Design 生产组件映射。原型中的语义对应关系不能作为生产 API 事实。
76
76
  - 状态矩阵:加载、空、错、禁用、只读、无权限、冲突、成功。
77
77
  - API 反推:字段、筛选、分页、动作、错误码、权限、并发或幂等规则。
78
78
  - 响应式要求:关键断点和窄屏替代形态。
@@ -7,6 +7,10 @@ description: "接入或排查 YSS 分布式 ID 的 Segment、Snowflake、主键
7
7
 
8
8
  处理 `yss-component-distributed-id` 及 Leaf 消费项目的发号、主键填充与迁移。先从批准的 `platform_configuration.component_platform_line` 选择 [源码索引](references/source-index.md);Boot 2 的历史能力不能推定为 Boot 3 可用能力。无批准合同的既有工程故障可只读分诊,不据此改策略或宣布兼容。
9
9
 
10
+ ## 平台与源码门禁
11
+
12
+ 接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-distributed-id` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
13
+
10
14
  ## 接入决策
11
15
 
12
16
  1. 核对实际组件 GAV、平台线、依赖树及当前源码,再确定已有主键策略、注入模式和数据库约束。保持既有 Long 主键及调用方类型,策略变更单独评估数据和 API 影响。
@@ -23,7 +27,3 @@ description: "接入或排查 YSS 分布式 ID 的 Segment、Snowflake、主键
23
27
  - 行为修改使用组件父 reactor 的根 `./mvnw` 验证启动、单条/批量主键、迁移边界和目标数据库方言;H2 不能证明生产方言。只读故障分诊与已执行验证分别记录。
24
28
 
25
29
  当前源码入口与平台差异见 [能力与迁移说明](references/README.md)。不要从 Skill 的历史示例或旧资产复制生产源码;精确类名、配置和默认值以选定平台线的当前源码为准。
26
-
27
- ## 平台与源码门禁
28
-
29
- 接入、修改、代码生成或给出精确类名/配置前,读取 [后端组件平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),从批准的 `platform_configuration.component_platform_line` 选择 `source-index.boot2-java8.md` 或 `source-index.boot3-java17.md`,并以 `--skill yss-distributed-id --platform-line <line> --source-root <matching-root>` 运行统一 freshness 校验。平台线与源码根不匹配、组件 tree 不一致、组件子树 dirty、索引缺少平台信号,或 Manifest / 组件 GAV 缺少 verified 兼容证据时返回 `blocked`;不得回退另一代索引,也不在业务实现中升级、降级或替换 YSS 组件。既有工程只读分诊可继续,但不得据此宣称跨 Boot/JDK 兼容。
@@ -9,6 +9,10 @@ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO
9
9
 
10
10
  本 skill 同时负责把中台 DTO 映射到公开 HTTP/JSON 边界。`references/openapi-wire-profile.yaml` 是可复用的机器可读映射源;OpenAPI 治理和 Draft Review 必须消费它,不得各自复制一份 wrapper 或分页字段表。
11
11
 
12
+ ## 平台与源码门禁
13
+
14
+ 接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-dto` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
15
+
12
16
  ## 所有权边界
13
17
 
14
18
  - 先消费 `architecture_identity`:DDD 的 HTTP DTO 在 Web;通用 MVC 私有 DTO 在 server、已批准公开 DTO 在 client;数据分析 MVC 公开 DTO 在 client。service/core 自有内部 Command/Query/Result,不依赖 client DTO;server 用 MapStruct 转换。共用 wire profile 不意味着共用模块路径。
@@ -28,7 +32,7 @@ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO
28
32
  1. 优先沿用项目现有 DTO 体系,不重复造返回包装类。
29
33
  2. 涉及真实类名、返回结构、分页字段或排障时,先读 `references/source-index.md`,再定位源码或文档。
30
34
  3. 新 Target Profile 的 canonical 包固定为 `com.yss.cloud.dto.result`;`com.yss.cloud.dto.response` 为 `unsupported`,不得在新契约或脚手架输出中引入。检测到旧包时只报告边界,不自动改写;旧项目现代化须单独立项。
31
- 4. 需要设计或审查 API 时,先校验 `references/openapi-wire-profile.yaml`,再把 endpoint 的具体 DTO/VO schema 组合到 wrapper;Java 泛型不是 OpenAPI schema。
35
+ 4. 需要设计或审查 API 时,先辨认已批准协议;采用 YSS wrapper 的普通 HTTP/JSON 接口校验 `references/openapi-wire-profile.yaml`,再把 endpoint 的具体 DTO/VO schema 组合到 wrapper。下载、流式和第三方回调按批准协议检查;Java 泛型不是 OpenAPI schema。
32
36
  5. 只围绕当前 DTO 结构回答,不泛化到整个微服务理论。
33
37
 
34
38
  ## 源码索引
@@ -50,11 +54,11 @@ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO
50
54
  - Controller 返回优先使用项目既有的 `Result` 或派生结果对象。
51
55
  - 单对象返回优先 `SingleResult`,列表返回优先 `MultiResult`,分页返回优先 `PageResult`,前提是当前项目已采用这套体系。
52
56
  - 三种泛型结果要求 `T extends Serializable`;生成的 VO/响应类型必须满足该编译约束。
53
- - OpenAPI 响应以 `YssResultMeta` 表达公共字段,并用 `allOf` 叠加 endpoint-specific `data` / page 字段;每个响应声明 `x-yss-response-wrapper: SingleResult|MultiResult|PageResult`,不得把 `SingleResult<T>` 文字写成 schema。
54
- - wire shape 不是 Java 字段清单:`success` 为 boolean,`dataType` 为 `string|null`,`code` 只允许 `string|integer|null`;不得把全局 `code` 放宽为任意 object。
57
+ - 采用 YSS wrapper 的普通 HTTP/JSON 响应以 `YssResultMeta` 表达公共字段,并用 `allOf` 叠加 endpoint-specific `data` / page 字段;这些响应声明 `x-yss-response-wrapper: SingleResult|MultiResult|PageResult`,不得把 `SingleResult<T>` 文字写成 schema。
58
+ - YSS wrapper 的 wire shape 不是 Java 字段清单:`success` 为 boolean,`dataType` 为 `string|null`,`code` 只允许 `string|integer|null`;不得把该 profile 的全局 `code` 放宽为任意 object。
55
59
  - `MultiResult.data` 和 `PageResult.data` 对外是数组,空值按 `[]` 建模;`SingleResult.data` 按 endpoint schema 建模并显式处理 nullability。
56
60
  - `PageResult` 当前稳定公共字段为 `totalCount/pageSize/pageIndex/data[]`;`totalPages` 是计算 getter,只有目标 HTTP mapper / contract fixture 证明后才能进入具体契约。
57
- - `PageQuery` 客户端输入只允许 `pageIndex/pageSize/orderBy/orderDirection/groupBy`(后四项按 profile 的 optional / whitelist 规则);`orderDirection` 只能是 `ASC|DESC`。`offset`、`needTotalCount`、`tempTotalCount` 是计算或内部协作字段,禁止成为客户端输入。
61
+ - 采用 YSS 分页协议的 `PageQuery` 客户端输入只允许 `pageIndex/pageSize/orderBy/orderDirection/groupBy`(后四项按 profile 的 optional / whitelist 规则);`orderDirection` 只能是 `ASC|DESC`。`offset`、`needTotalCount`、`tempTotalCount` 是计算或内部协作字段,禁止从内部 `PageQuery` 泄露为客户端输入。其他已批准公开分页协议按冻结字段映射,不静默改名或套用该字段表。
58
62
  - `buildSuccess(...)` 各重载设置 code 的行为并不一致;冻结契约必须测试 `success/code/message/tips/dataType`、nullability 和三种 data shape,不能只测试 data。
59
63
  <a id="dto.wire-evidence"></a>
60
64
  <!-- yss-rule {"id":"dto.wire-evidence","when":"wire","level":"mandatory","evidence":"code-and-verification"} -->
@@ -74,7 +78,7 @@ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO
74
78
  - 不要把 `com.yss.cloud.dto.response` 作为新 API 的 canonical 包,也不要从 Java getter 机械生成 wire schema。
75
79
  <a id="dto.no-leak"></a>
76
80
  <!-- yss-rule {"id":"dto.no-leak","when":"pagination","level":"mandatory","evidence":"code-and-verification"} -->
77
- - 不要把 `offset`、`needTotalCount`、`tempTotalCount` 作为客户端分页输入;不要无证据把 `totalPages` 写入所有分页响应。
81
+ - 采用 YSS 分页协议时,不要把内部 `offset`、`needTotalCount`、`tempTotalCount` 作为客户端输入;其他批准协议按冻结契约核验公开字段。不要无证据把 `totalPages` 写入所有分页响应。
78
82
  - 若项目已有 `SingleResult`、`PageResult`、`MultiResult` 体系,优先保持一致。
79
83
 
80
84
  ## 按需读取
@@ -91,10 +95,6 @@ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO
91
95
  - POJO 样板可 `controlled-generation`;校验、权限输入、错误结构和序列化行为必须由对应 `behavior-tdd` 工作单元覆盖。
92
96
  - 必须加载合同要求的 `lombok`、`mapstruct` 和 `alibaba-java-code-style`,并按统一 `YSS Skill Execution Result` 返回文件、契约测试和偏离。
93
97
 
94
- ## 平台与源码门禁
95
-
96
- 接入、修改、代码生成或给出精确类名/配置前,读取 [后端组件平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),从批准的 `platform_configuration.component_platform_line` 选择 `source-index.boot2-java8.md` 或 `source-index.boot3-java17.md`,并以 `--skill yss-dto --platform-line <line> --source-root <matching-root>` 运行统一 freshness 校验。平台线与源码根不匹配、组件 tree 不一致、组件子树 dirty、索引缺少平台信号,或 Manifest / 组件 GAV 缺少 verified 兼容证据时返回 `blocked`;不得回退另一代索引,也不在业务实现中升级、降级或替换 YSS 组件。既有工程只读分诊可继续,但不得据此宣称跨 Boot/JDK 兼容。
97
-
98
98
  ## 既有契约与特殊协议
99
99
 
100
100
  只读审计先辨认已锁定的 wire 契约。下载、流式和第三方回调按批准协议检查媒体类型、状态、Header、错误与权限边界;不强套 Result,也不因声称“特殊接口”豁免契约证据。普通已采用 YSS wrapper 的接口继续按 wire profile 检查。旧包/旧协议差距单列迁移,不静默改锁或改公开响应。
@@ -29,7 +29,7 @@
29
29
 
30
30
  **位置**: `../assets/PageQuery.java`
31
31
 
32
- 分页查询基础类,所有需要分页的查询参数都应继承此类。
32
+ 用于 Application/Infrastructure 内部分页协作;是否继承按批准的工程 Profile 决定。公开 HTTP Page Request 默认不继承此类,只声明冻结 OpenAPI 允许的字段,再由 WebConvertor 转换,避免内部协作字段进入绑定面。
33
33
 
34
34
  **核心字段**:
35
35
 
@@ -57,11 +57,11 @@
57
57
 
58
58
  基础 DTO 抽象类,用于区分命令(写操作)和查询(读操作)对象。
59
59
 
60
- - **CommandDTO**: 实现 `Serializable` 接口,所有命令参数应继承此类。
61
- - **QueryDTO**: 继承自 `CommandDTO`,所有查询参数应继承此类。
60
+ - **CommandDTO**: 实现 `Serializable` 接口;当前工程采用此体系时,写操作参数优先继承。
61
+ - **QueryDTO**: 继承自 `CommandDTO`;Application/Infrastructure 内部读参数按批准 Profile 使用它或 `PageQuery`,不据此扩大公开请求字段。
62
62
 
63
63
  ## 使用场景
64
64
 
65
- 1. **API 响应**: 所有 Controller 方法应返回 `Result` 或其子类(如 `PageResult`, `SingleResult`)。
65
+ 1. **API 响应**: 普通接口已采用 YSS wrapper 时保持 `Result` 或其派生体系。下载、流式和第三方回调按批准协议核验媒体类型、状态、Header、错误与权限边界,不强套 wrapper,也不豁免契约证据。
66
66
  2. **分页查询**: `PageQuery` 用于 Application/Infrastructure 内部协作;公开 HTTP Page Request 默认只声明冻结 OpenAPI 允许的字段,再由 WebConvertor 转换,避免内部字段被继承到绑定面。MyBatis 拦截器所需形状必须由 Query Port 集成测试证明。
67
67
  3. **参数封装**: 使用 `CommandDTO` 封装增删改参数,使用 `QueryDTO` 封装查询参数,保持代码语义清晰。
@@ -1,14 +1,14 @@
1
1
  ## 检查清单
2
2
 
3
- - 分页字段名是否和框架约定一致。
3
+ - 分页字段名是否与已批准公开协议一致;采用 YSS 分页协议时对齐 wire profile。
4
4
  <a id="dto.sort"></a>
5
5
  <!-- yss-rule {"id":"dto.sort","when":"pagination","level":"mandatory","evidence":"code-and-verification"} -->
6
6
  - `orderBy` / `groupBy` 是否经过 Repository 白名单映射,禁止直接拼接 SQL。
7
7
  - Application Query Port / Infrastructure 是否收到批准的分页语义;Domain Gateway 不接收 `PageQuery`。
8
8
  - 新增 DTO 是否与现有序列化和校验方式兼容。
9
9
  - 返回结构是否和前端或上游调用方契约一致。
10
- - 是否通过 `scripts/verify-yss-dto-openapi-profile`,并引用 profile 版本。
11
- - wrapper extension、`YssResultMeta`、`allOf`、具体 data schema 和方向性是否逐 endpoint 对齐。
12
- - 是否有针对 `offset` / `needTotalCount` / `tempTotalCount` 的负向断言,以及对 `totalPages` 的目标 mapper 证据。
10
+ - 采用 YSS wrapper / 分页协议时,是否通过 `scripts/verify-yss-dto-openapi-profile`,并引用 profile 版本。
11
+ - 采用 YSS wrapper 的 endpoint,其 wrapper extension、`YssResultMeta`、`allOf`、具体 data schema 和方向性是否对齐;特殊协议检查实际媒体类型、状态、Header、错误与权限边界。
12
+ - 采用 YSS 分页协议时,是否有针对内部 `offset` / `needTotalCount` / `tempTotalCount` 泄露的负向断言;其他批准协议是否逐项绑定冻结公开字段。公开 `totalPages` 是否有目标 mapper / fixture 证据。
13
13
  - Controller、Application Service、Domain、Repository 之间是否存在 DTO/VO/DO/PO 混穿。
14
14
  - 前端 Orval 或调用方是否依赖当前返回包装结构。
@@ -7,6 +7,10 @@ description: "实现或排查 YSS Spring MVC Excel 导入导出、RequestExcel
7
7
 
8
8
  用于处理基于注解的 Excel 导入导出能力。
9
9
 
10
+ ## 平台与源码门禁
11
+
12
+ 接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-excel-mvc` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
13
+
10
14
  ## 何时使用
11
15
 
12
16
  - 用户要新增 Excel 导入接口。
@@ -64,7 +68,3 @@ description: "实现或排查 YSS Spring MVC Excel 导入导出、RequestExcel
64
68
  - 源码索引:`references/source-index.md`
65
69
  - 注解与返回结构:`assets/RequestExcel.java`、`assets/ResponseExcel.java`、`assets/ExcelDynamicData.java`
66
70
  - MVC 解析器:`assets/RequestFastExcelArgumentResolver.java`、`assets/ResponseFastExcelReturnValueHandler.java`
67
-
68
- ## 平台与源码门禁
69
-
70
- 接入、修改、代码生成或给出精确类名/配置前,读取 [后端组件平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),从批准的 `platform_configuration.component_platform_line` 选择 `source-index.boot2-java8.md` 或 `source-index.boot3-java17.md`,并以 `--skill yss-excel-mvc --platform-line <line> --source-root <matching-root>` 运行统一 freshness 校验。平台线与源码根不匹配、组件 tree 不一致、组件子树 dirty、索引缺少平台信号,或 Manifest / 组件 GAV 缺少 verified 兼容证据时返回 `blocked`;不得回退另一代索引,也不在业务实现中升级、降级或替换 YSS 组件。既有工程只读分诊可继续,但不得据此宣称跨 Boot/JDK 兼容。
@@ -5,61 +5,55 @@ description: "接入或排查 YSS 统一异常、错误码、异常处理器与
5
5
 
6
6
  # yss-exception
7
7
 
8
- Use this skill for YSS 异常组件. Keep implementation grounded in the local project and resolvable YSS backend component source.
8
+ 处理 YSS 业务、系统及未知异常的错误码、日志和 HTTP 映射;结论使用当前项目契约及匹配的平台源码。
9
9
 
10
- 中文说明:本技能用于 YSS 异常组件。执行时优先读取源码索引,避免凭记忆猜类名、配置项或接入方式。
10
+ ## 平台与源码门禁
11
11
 
12
- ## Source Index First
12
+ 接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-exception` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
13
13
 
14
- - Backend source location is environment-specific; resolve it with `yss-skill-source-index-refresh/references/source-location.md`.
15
- - Generated index: `references/source-index.md`
16
- - Component path hints: `yss-microservice-components/yss-component-exception`
14
+ ## 源码定位
17
15
 
18
- Read `references/source-index.md` as a path-hint index whenever the task depends on exact modules, annotations, auto configuration, properties, controllers, clients, repositories, DTOs, handlers, or troubleshooting.
16
+ 按 [源码定位策略](../yss-skill-source-index-refresh/references/source-location.md) 确认真实位置,再从 [平台索引](references/source-index.md) 定位当前任务需要的源码。`yss-microservice-components/yss-component-exception` 仅是模块路径提示。
19
17
 
20
- ## Workflow
18
+ ## 工作流
21
19
 
22
- 1. Read `references/source-index.md`, then read `readme.md` before changing exception behavior.
23
- 2. Classify the failure as business exception, known system exception, or unknown exception.
24
- 3. Use `ExceptionFactory` and `ResultErrorCode` conventions instead of ad-hoc runtime exceptions when creating YSS component errors.
25
- 4. Check `YssGlobalExceptionProperties` when global exception output/logging behavior is configurable.
26
- 5. Keep logging semantics aligned: business exceptions usually do not require error-stack logging; system/unknown exceptions usually do.
27
- 6. In the `target-domain-model` profile, Domain owns stable error meaning and parameters but does not depend directly on YSS `BizException` or HTTP. Translate at the Web boundary after verifying the component handler precedence.
20
+ 1. 修改异常行为前,按平台索引定位当前组件源码与可读取的 `readme.md`。
21
+ 2. 区分业务异常、已知系统异常和未知异常。
22
+ 3. 创建 YSS 组件错误时使用 `ExceptionFactory` 与 `ResultErrorCode` 约定,不临时构造无明确语义的 runtime exception。
23
+ 4. 命中全局异常输出或日志配置时核验 `YssGlobalExceptionProperties`。
24
+ 5. 保持异常与日志语义一致:业务异常通常不记 Error 堆栈;系统和未知异常通常需要。
25
+ 6. `target-domain-model` 的稳定错误含义与参数归 Domain,不直接依赖 YSS `BizException` 或 HTTP;先验证组件 handler 优先级,再在 Web 边界翻译。
28
26
  7. MVC Profile 的稳定业务错误归 service/core;Repository 保留 cause;server 持有 HTTP 映射与脱敏。不要为了复用错误码引入 Domain 层或让 core 依赖 client。分层依据 `.template-spec/agents/backend-architecture-profiles.md`。
29
27
 
30
- ## Boot 3 Current Source Behavior
28
+ ## Boot 3 行为
31
29
 
32
30
  - 以下当前行为针对 `boot3-java17`;Boot 2 旧工程必须读取其独立索引,旧行为只用于迁移识别。
33
- - `GlobalExceptionAdvice` maps `BizException` to HTTP 400. Unknown `Exception`, `RuntimeException`, and `NullPointerException` map to HTTP 500 and return a sanitized `SysException` with `ResultErrorCode.INTERNAL_ERROR` instead of raw exception text.
34
- - `MaxUploadSizeExceededException` maps to HTTP 413 (`PAYLOAD_TOO_LARGE`) with `ResultErrorCode.MAX_UPLOAD_SIZE_EXCEEDED`.
35
- - System and unknown failures are recorded with the SLF4J logger. `yss.exception.level=debug` adds a logger-backed debug stack trace; it never calls `Throwable#printStackTrace()`.
36
- - Every handled response attaches or reuses a trace id in MDC and exposes it through the `X-Trace-Id` response header. The public body does not contain the raw localized exception or stack trace.
37
- - Validation binding failures become `SysException(PARAM_VALIDATION_ERROR)`. Coordinate changes with `yss-validation` and contract tests.
38
-
39
- ## Source-Backed Exception Semantics
40
-
41
- - `BizException`: clear business meaning, generally no Error log and no retry.
42
- - `SysException`: known system problem, Error log, retry may be possible.
43
- - unknown `Exception`: full stack log, retry may be possible.
44
-
45
- ## Checklist
46
-
47
- - Required dependency or starter module is present.
48
- - Error code/message are meaningful to API consumers.
49
- - Response messages are sanitized and do not expose raw RuntimeException or localized exception details.
50
- - For affected boot3-java17 HTTP seams, assert the documented business 4xx, unknown/runtime 5xx and trace header behavior. Assert upload 413 only for upload-limit impact. Boot 2 assertions follow its own source and frozen contract; do not import Boot 3 behavior into it.
51
- - Business validation failures are not reported as unknown system errors.
52
- - Stack traces are preserved in structured logger output for unknown/system failures, never printed directly to stderr or serialized to clients.
53
- - Retry guidance matches exception type.
54
- - Known system failures use `ExceptionFactory.sysException(..., cause)`; Application code does not replace them with ad-hoc `RuntimeException`.
55
- - Endpoint tests cover the failure types actually affected by this change; upload-limit tests apply only to upload endpoints or changed upload handling. Public messages must follow the selected platform contract and never leak protected exception details.
56
-
57
- ## Do Not
58
-
59
- - Do not invent class names or configuration keys without checking the source index.
60
- - Do not replace component extension points with business-local framework code.
61
- - Do not broaden the task into unrelated YSS components unless the user asks.
62
-
63
- ## 平台与源码门禁
64
-
65
- 接入、修改、代码生成或给出精确类名/配置前,读取 [后端组件平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),从批准的 `platform_configuration.component_platform_line` 选择 `source-index.boot2-java8.md` 或 `source-index.boot3-java17.md`,并以 `--skill yss-exception --platform-line <line> --source-root <matching-root>` 运行统一 freshness 校验。平台线与源码根不匹配、组件 tree 不一致、组件子树 dirty、索引缺少平台信号,或 Manifest / 组件 GAV 缺少 verified 兼容证据时返回 `blocked`;不得回退另一代索引,也不在业务实现中升级、降级或替换 YSS 组件。既有工程只读分诊可继续,但不得据此宣称跨 Boot/JDK 兼容。
31
+ - `GlobalExceptionAdvice` 将 `BizException` 映射到 HTTP 400;未知 `Exception`、`RuntimeException` 和 `NullPointerException` 映射到 HTTP 500,返回脱敏的 `SysException` 与 `ResultErrorCode.INTERNAL_ERROR`,不返回异常原文。
32
+ - `MaxUploadSizeExceededException` 映射到 HTTP 413(`PAYLOAD_TOO_LARGE`)与 `ResultErrorCode.MAX_UPLOAD_SIZE_EXCEEDED`。
33
+ - 系统和未知失败使用 SLF4J logger;`yss.exception.level=debug` 增加 logger debug 堆栈,不调用 `Throwable#printStackTrace()`。
34
+ - 每个处理响应在 MDC 中附加或复用 trace id,并通过 `X-Trace-Id` 响应头公开;正文不含原始 localized exception 或堆栈。
35
+ - 校验绑定失败转为 `SysException(PARAM_VALIDATION_ERROR)`;修改时协同 `yss-validation` 与契约测试。
36
+
37
+ ## 异常语义
38
+
39
+ - `BizException`:有明确业务含义,通常不记 Error 日志、不重试。
40
+ - `SysException`:已知系统问题,记 Error 日志,是否可重试需按场景判断。
41
+ - 未知 `Exception`:保留完整堆栈日志,是否可重试需按场景判断。
42
+
43
+ ## 验收
44
+
45
+ - 核验所需依赖或 starter 已进入实际工程。
46
+ - 错误码与消息对 API 消费方有明确含义。
47
+ - 公开消息已脱敏,不暴露原始 RuntimeException 或 localized exception 细节。
48
+ - 对受影响的 `boot3-java17` HTTP seam 验证业务 4xx、未知/runtime 5xx 与 trace header;仅上传限制影响验证 413。Boot 2 使用其独立源码与冻结合同,不引入 Boot 3 断言。
49
+ - 业务校验失败不归为未知系统错误。
50
+ - 未知/系统失败的堆栈保留在结构化日志中,不直接打印 stderr 或序列化给客户端。
51
+ - 重试建议与异常类型及实际用例一致。
52
+ - 已知系统失败使用 `ExceptionFactory.sysException(..., cause)`,Application 不改为无明确语义的 `RuntimeException`。
53
+ - Endpoint 测试覆盖实际受影响的失败类型;仅上传端点或上传处理变更执行上传限制测试。公开消息符合所选平台合同,不泄露受保护异常细节。
54
+
55
+ ## 修改边界
56
+
57
+ - 类名和配置 key 先核验当前索引与源码,不凭记忆补造。
58
+ - 使用组件已有扩展 seam,不以业务本地框架代码替换。
59
+ - 保持当前组件任务范围;扩展到其他组件须有用户要求或重新路由依据。