create-yss-spec 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/README.md +2 -2
  2. package/package.json +3 -2
  3. package/src/command-runner.mjs +107 -0
  4. package/src/self-update.js +7 -4
  5. package/src/template/instance-runtime.js +1 -1
  6. package/template/.agents/skills/.strategic-design-skills-manifest.json +2 -2
  7. package/template/.agents/skills/code-review/SKILL.md +4 -0
  8. package/template/.agents/skills/code-review/agents/openai.yaml +1 -1
  9. package/template/.agents/skills/code-review/references/yss-review-standards.md +9 -2
  10. package/template/.agents/skills/competitive-intelligence/SKILL.md +4 -4
  11. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  12. package/template/.agents/skills/grill-with-docs/SKILL.md +1 -1
  13. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  14. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  15. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  16. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  17. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  18. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  19. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  20. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  21. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  22. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  23. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  24. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  25. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  26. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  27. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  28. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  29. package/template/.agents/skills/yss-mybatis/SKILL.md +34 -58
  30. package/template/.agents/skills/yss-mybatis/agents/openai.yaml +2 -2
  31. package/template/.agents/skills/yss-mybatis/references/source-index.md +88 -68
  32. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +50 -42
  33. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  34. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  35. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  36. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  37. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +5 -2
  38. package/template/.agents/skills/yss-repository/SKILL.md +28 -70
  39. package/template/.agents/skills/yss-repository/agents/openai.yaml +2 -2
  40. package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  41. package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  42. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  43. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  44. package/template/.agents/skills/yss-research/SKILL.md +1 -1
  45. package/template/.agents/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  46. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  47. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  48. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  49. package/template/.agents/skills/yss-stage-decision/SKILL.md +5 -3
  50. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  51. package/template/.claude/skills/code-review/SKILL.md +4 -0
  52. package/template/.claude/skills/code-review/agents/openai.yaml +1 -1
  53. package/template/.claude/skills/code-review/references/yss-review-standards.md +9 -2
  54. package/template/.claude/skills/competitive-intelligence/SKILL.md +4 -4
  55. package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  56. package/template/.claude/skills/grill-with-docs/SKILL.md +1 -1
  57. package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  58. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  59. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  60. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  61. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  62. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  63. package/template/.claude/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  64. package/template/.claude/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  65. package/template/.claude/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  66. package/template/.claude/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  67. package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  68. package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  69. package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  70. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  71. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  72. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  73. package/template/.claude/skills/yss-mybatis/SKILL.md +34 -58
  74. package/template/.claude/skills/yss-mybatis/agents/openai.yaml +2 -2
  75. package/template/.claude/skills/yss-mybatis/references/source-index.md +88 -68
  76. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +50 -42
  77. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  78. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  79. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  80. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  81. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +5 -2
  82. package/template/.claude/skills/yss-repository/SKILL.md +28 -70
  83. package/template/.claude/skills/yss-repository/agents/openai.yaml +2 -2
  84. package/template/.claude/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  85. package/template/.claude/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  86. package/template/.claude/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  87. package/template/.claude/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  88. package/template/.claude/skills/yss-research/SKILL.md +1 -1
  89. package/template/.claude/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  90. package/template/.claude/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  91. package/template/.claude/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  92. package/template/.claude/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  93. package/template/.claude/skills/yss-stage-decision/SKILL.md +5 -3
  94. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  95. package/template/.codex/skills/code-review/SKILL.md +4 -0
  96. package/template/.codex/skills/code-review/agents/openai.yaml +1 -1
  97. package/template/.codex/skills/code-review/references/yss-review-standards.md +9 -2
  98. package/template/.codex/skills/competitive-intelligence/SKILL.md +4 -4
  99. package/template/.codex/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  100. package/template/.codex/skills/grill-with-docs/SKILL.md +1 -1
  101. package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  102. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  103. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  104. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  105. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  106. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  107. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  108. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  109. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  110. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  111. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  112. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  113. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  114. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  115. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  116. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  117. package/template/.codex/skills/yss-mybatis/SKILL.md +34 -58
  118. package/template/.codex/skills/yss-mybatis/agents/openai.yaml +2 -2
  119. package/template/.codex/skills/yss-mybatis/references/source-index.md +88 -68
  120. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +50 -42
  121. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  122. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  123. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  124. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  125. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +5 -2
  126. package/template/.codex/skills/yss-repository/SKILL.md +28 -70
  127. package/template/.codex/skills/yss-repository/agents/openai.yaml +2 -2
  128. package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  129. package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  130. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  131. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  132. package/template/.codex/skills/yss-research/SKILL.md +1 -1
  133. package/template/.codex/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  134. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  135. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  136. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  137. package/template/.codex/skills/yss-stage-decision/SKILL.md +5 -3
  138. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  139. package/template/.cursor/skills/code-review/SKILL.md +4 -0
  140. package/template/.cursor/skills/code-review/agents/openai.yaml +1 -1
  141. package/template/.cursor/skills/code-review/references/yss-review-standards.md +9 -2
  142. package/template/.cursor/skills/competitive-intelligence/SKILL.md +4 -4
  143. package/template/.cursor/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  144. package/template/.cursor/skills/grill-with-docs/SKILL.md +1 -1
  145. package/template/.cursor/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  146. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  147. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  148. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  149. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  150. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  151. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  152. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  153. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  154. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  155. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  156. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  157. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  158. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  159. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  160. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  161. package/template/.cursor/skills/yss-mybatis/SKILL.md +34 -58
  162. package/template/.cursor/skills/yss-mybatis/agents/openai.yaml +2 -2
  163. package/template/.cursor/skills/yss-mybatis/references/source-index.md +88 -68
  164. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +50 -42
  165. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  166. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  167. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  168. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  169. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +5 -2
  170. package/template/.cursor/skills/yss-repository/SKILL.md +28 -70
  171. package/template/.cursor/skills/yss-repository/agents/openai.yaml +2 -2
  172. package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  173. package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  174. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  175. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  176. package/template/.cursor/skills/yss-research/SKILL.md +1 -1
  177. package/template/.cursor/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  178. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  179. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  180. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  181. package/template/.cursor/skills/yss-stage-decision/SKILL.md +5 -3
  182. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  183. package/template/.pi/skills/code-review/SKILL.md +4 -0
  184. package/template/.pi/skills/code-review/agents/openai.yaml +1 -1
  185. package/template/.pi/skills/code-review/references/yss-review-standards.md +9 -2
  186. package/template/.pi/skills/competitive-intelligence/SKILL.md +4 -4
  187. package/template/.pi/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  188. package/template/.pi/skills/grill-with-docs/SKILL.md +1 -1
  189. package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  190. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  191. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  192. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  193. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  194. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  195. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  196. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  197. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  198. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  199. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  200. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  201. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  202. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  203. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  204. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  205. package/template/.pi/skills/yss-mybatis/SKILL.md +34 -58
  206. package/template/.pi/skills/yss-mybatis/agents/openai.yaml +2 -2
  207. package/template/.pi/skills/yss-mybatis/references/source-index.md +88 -68
  208. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +50 -42
  209. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  210. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  211. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  212. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  213. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +5 -2
  214. package/template/.pi/skills/yss-repository/SKILL.md +28 -70
  215. package/template/.pi/skills/yss-repository/agents/openai.yaml +2 -2
  216. package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  217. package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  218. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  219. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  220. package/template/.pi/skills/yss-research/SKILL.md +1 -1
  221. package/template/.pi/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  222. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  223. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  224. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  225. package/template/.pi/skills/yss-stage-decision/SKILL.md +5 -3
  226. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  227. package/template/.qoder/skills/code-review/SKILL.md +4 -0
  228. package/template/.qoder/skills/code-review/agents/openai.yaml +1 -1
  229. package/template/.qoder/skills/code-review/references/yss-review-standards.md +9 -2
  230. package/template/.qoder/skills/competitive-intelligence/SKILL.md +4 -4
  231. package/template/.qoder/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  232. package/template/.qoder/skills/grill-with-docs/SKILL.md +1 -1
  233. package/template/.qoder/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  234. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  235. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  236. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  237. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  238. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  239. package/template/.qoder/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  240. package/template/.qoder/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  241. package/template/.qoder/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  242. package/template/.qoder/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  243. package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  244. package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  245. package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  246. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  247. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  248. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  249. package/template/.qoder/skills/yss-mybatis/SKILL.md +34 -58
  250. package/template/.qoder/skills/yss-mybatis/agents/openai.yaml +2 -2
  251. package/template/.qoder/skills/yss-mybatis/references/source-index.md +88 -68
  252. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +50 -42
  253. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  254. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  255. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  256. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  257. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +5 -2
  258. package/template/.qoder/skills/yss-repository/SKILL.md +28 -70
  259. package/template/.qoder/skills/yss-repository/agents/openai.yaml +2 -2
  260. package/template/.qoder/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  261. package/template/.qoder/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  262. package/template/.qoder/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  263. package/template/.qoder/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  264. package/template/.qoder/skills/yss-research/SKILL.md +1 -1
  265. package/template/.qoder/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  266. package/template/.qoder/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  267. package/template/.qoder/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  268. package/template/.qoder/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  269. package/template/.qoder/skills/yss-stage-decision/SKILL.md +5 -3
  270. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  271. package/template/.trae/skills/code-review/SKILL.md +4 -0
  272. package/template/.trae/skills/code-review/agents/openai.yaml +1 -1
  273. package/template/.trae/skills/code-review/references/yss-review-standards.md +9 -2
  274. package/template/.trae/skills/competitive-intelligence/SKILL.md +4 -4
  275. package/template/.trae/skills/domain-modeling/CONTEXT-FORMAT.md +1 -1
  276. package/template/.trae/skills/grill-with-docs/SKILL.md +1 -1
  277. package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-local.md +1 -1
  278. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  279. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +7 -3
  280. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +8 -8
  281. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +9 -0
  282. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +10 -7
  283. package/template/.trae/skills/yss-frontend-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +10 -0
  284. package/template/.trae/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +121 -0
  285. package/template/.trae/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +40 -0
  286. package/template/.trae/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +55 -0
  287. package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +1 -1
  288. package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +4 -0
  289. package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +25 -0
  290. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  291. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +8 -5
  292. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +17 -2
  293. package/template/.trae/skills/yss-mybatis/SKILL.md +34 -58
  294. package/template/.trae/skills/yss-mybatis/agents/openai.yaml +2 -2
  295. package/template/.trae/skills/yss-mybatis/references/source-index.md +88 -68
  296. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +50 -42
  297. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +5 -3
  298. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +3 -3
  299. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +124 -16
  300. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +16 -2
  301. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +5 -2
  302. package/template/.trae/skills/yss-repository/SKILL.md +28 -70
  303. package/template/.trae/skills/yss-repository/agents/openai.yaml +2 -2
  304. package/template/.trae/skills/yss-repository/references/profiles/layered-mvc-service.md +19 -1
  305. package/template/.trae/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +19 -1
  306. package/template/.trae/skills/yss-repository/references/profiles/target-domain-model.md +21 -1
  307. package/template/.trae/skills/yss-repository/tests/profile-routing.test.mjs +59 -0
  308. package/template/.trae/skills/yss-research/SKILL.md +1 -1
  309. package/template/.trae/skills/yss-skill-source-index-refresh/SKILL.md +8 -5
  310. package/template/.trae/skills/yss-skill-source-index-refresh/references/source-location.md +2 -1
  311. package/template/.trae/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +388 -18
  312. package/template/.trae/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.test.mjs +79 -1
  313. package/template/.trae/skills/yss-stage-decision/SKILL.md +5 -3
  314. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  315. package/template/AGENTS.md +2 -2
  316. package/template/CONTEXT.md +3 -2
  317. package/template/README.md +3 -3
  318. package/template/docs/agents/digital-human-roles.md +1 -1
  319. package/template/docs/agents/digital-human-roles.yaml +13 -11
  320. package/template/docs/agents/issue-tracker.md +1 -1
  321. package/template/docs/agents/strategic-design-skills-integration.md +2 -0
  322. package/template/docs/agents/yss-skill-registry.yaml +5 -0
  323. package/template/docs/architecture/README.md +1 -1
  324. package/template/docs/architecture/templates/business-architecture-template.md +1 -1
  325. package/template/docs/architecture/templates/functional-architecture-template.md +1 -1
  326. package/template/docs/design/README.md +1 -1
  327. package/template/docs/design/templates/interaction-spec-template.md +1 -1
  328. package/template/docs/design/templates/product-overview-design-template.md +1 -1
  329. package/template/docs/{discovery → plan}/IDEATION.md +5 -5
  330. package/template/docs/plan/README.md +9 -0
  331. package/template/docs/plan/entry-review.md +23 -0
  332. package/template/docs/plan/templates/plan-template.md +58 -0
  333. package/template/docs/process/harness-process-tailoring.md +1 -1
  334. package/template/docs/process/lifecycle-artifact-map.md +10 -6
  335. package/template/docs/process/lifecycle-registry-baseline.json +10 -1
  336. package/template/docs/process/lifecycle-registry.yaml +48 -20
  337. package/template/docs/process/plan-migration.md +13 -0
  338. package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -0
  339. package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +38 -0
  340. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +3 -0
  341. package/template/docs/process/schemas/lifecycle-registry.schema.json +1 -1
  342. package/template/docs/process/schemas/project-scaffold-contract.schema.json +113 -0
  343. package/template/docs/process/template-engineering-overview.md +2 -2
  344. package/template/docs/process/template-verification-profiles.yaml +25 -0
  345. package/template/docs/process/templates/context-reconciliation-template.yaml +2 -2
  346. package/template/docs/process/templates/lifecycle-checkpoint-template.yaml +1 -1
  347. package/template/docs/requirements/README.md +2 -2
  348. package/template/docs/templates/implementation-repo-registry-template.md +8 -0
  349. package/template/docs/templates/local-parent-ticket-template.md +1 -1
  350. package/template/docs/templates/review-report-template.md +7 -3
  351. package/template/docs/templates/subagent-task-package-template.md +1 -1
  352. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
  353. package/template/scripts/cache-template-commit +2 -2
  354. package/template/scripts/fixtures/strategic-handoff/source-roles.json +7 -7
  355. package/template/scripts/fixtures/user-decision/plan-fixture.mjs +30 -0
  356. package/template/scripts/lib/backend-delivery.mjs +5 -2
  357. package/template/scripts/lib/command-runner.mjs +107 -0
  358. package/template/scripts/lib/context-reconciliation.mjs +34 -0
  359. package/template/scripts/lib/json-schema.mjs +42 -13
  360. package/template/scripts/lib/lifecycle-context-query.mjs +141 -0
  361. package/template/scripts/lib/lifecycle-transition.mjs +118 -6
  362. package/template/scripts/lib/plan-spec-entry.mjs +87 -0
  363. package/template/scripts/lib/scenario-checks.mjs +44 -38
  364. package/template/scripts/lib/skill-registry.mjs +9 -0
  365. package/template/scripts/lib/skill-supply-chain.mjs +18 -2
  366. package/template/scripts/lib/strategic-handoff-io.mjs +5 -4
  367. package/template/scripts/lib/strategic-handoff.mjs +10 -9
  368. package/template/scripts/lib/task-package.mjs +2 -0
  369. package/template/scripts/lib/template-commit-cache.mjs +7 -5
  370. package/template/scripts/query-lifecycle-context +25 -0
  371. package/template/scripts/run-template-verification +9 -3
  372. package/template/scripts/sync-strategic-handoff-tools +9 -0
  373. package/template/scripts/verify-business-language-scenarios +0 -7
  374. package/template/scripts/verify-context-reconciliation +2 -48
  375. package/template/scripts/verify-context-reconciliation-scenarios +1 -1
  376. package/template/scripts/verify-frontend-scaffold-generator-scenarios +2 -0
  377. package/template/scripts/verify-lifecycle-checkpoint +2 -0
  378. package/template/scripts/verify-lifecycle-context-query-scenarios +88 -0
  379. package/template/scripts/verify-lifecycle-transition-scenarios +44 -4
  380. package/template/scripts/verify-plan-spec-entry +11 -0
  381. package/template/scripts/verify-plan-spec-entry-scenarios +79 -0
  382. package/template/scripts/verify-script-performance-scenarios +56 -0
  383. package/template/scripts/verify-subagent-task-package-scenarios +9 -8
  384. package/template/scripts/verify-template-cache-scenarios +11 -1
  385. package/template/scripts/verify-user-decision-scenarios +4 -4
  386. package/template/skills-lock.json +23 -23
  387. package/template.manifest.json +2 -1
  388. package/template.snapshot.json +5 -5
  389. package/template/.agents/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  390. package/template/.agents/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  391. package/template/.agents/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  392. package/template/.agents/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  393. package/template/.agents/skills/yss-mybatis/references/README.md +0 -57
  394. package/template/.agents/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  395. package/template/.claude/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  396. package/template/.claude/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  397. package/template/.claude/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  398. package/template/.claude/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  399. package/template/.claude/skills/yss-mybatis/references/README.md +0 -57
  400. package/template/.claude/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  401. package/template/.codex/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  402. package/template/.codex/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  403. package/template/.codex/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  404. package/template/.codex/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  405. package/template/.codex/skills/yss-mybatis/references/README.md +0 -57
  406. package/template/.codex/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  407. package/template/.cursor/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  408. package/template/.cursor/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  409. package/template/.cursor/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  410. package/template/.cursor/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  411. package/template/.cursor/skills/yss-mybatis/references/README.md +0 -57
  412. package/template/.cursor/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  413. package/template/.pi/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  414. package/template/.pi/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  415. package/template/.pi/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  416. package/template/.pi/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  417. package/template/.pi/skills/yss-mybatis/references/README.md +0 -57
  418. package/template/.pi/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  419. package/template/.qoder/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  420. package/template/.qoder/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  421. package/template/.qoder/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  422. package/template/.qoder/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  423. package/template/.qoder/skills/yss-mybatis/references/README.md +0 -57
  424. package/template/.qoder/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  425. package/template/.trae/skills/yss-mybatis/assets/BaseRepository.java +0 -112
  426. package/template/.trae/skills/yss-mybatis/assets/EntityQueryAspect.java +0 -37
  427. package/template/.trae/skills/yss-mybatis/assets/MybatisBaseConfiguration.java +0 -18
  428. package/template/.trae/skills/yss-mybatis/assets/PageQueryEntityConfigration.java +0 -18
  429. package/template/.trae/skills/yss-mybatis/references/README.md +0 -57
  430. package/template/.trae/skills/yss-repository/references/infrastructure-layer-guide.md +0 -107
  431. package/template/docs/discovery/README.md +0 -87
  432. package/template/docs/discovery/reports/.gitkeep +0 -0
  433. package/template/docs/discovery/reports/agent-governance-options.md +0 -71
  434. package/template/docs/discovery/reports/competitor-deep-dive/.gitkeep +0 -0
  435. package/template/docs/discovery/templates/discovery-template.md +0 -94
  436. /package/template/docs/{discovery → plan}/templates/competitive-analysis-template.md +0 -0
  437. /package/template/docs/{discovery → plan}/templates/competitive-matrix-template.md +0 -0
  438. /package/template/docs/{discovery → plan}/templates/market-analysis-template.md +0 -0
  439. /package/template/docs/{discovery → plan}/templates/user-pain-points-template.md +0 -0
@@ -1,18 +0,0 @@
1
- package com.yss.cloud.mybatis.config;
2
-
3
- import com.yss.cloud.mybatis.aop.EntityQueryAspect;
4
- import lombok.extern.slf4j.Slf4j;
5
- import org.springframework.context.annotation.Bean;
6
- import org.springframework.context.annotation.Configuration;
7
- import org.springframework.context.annotation.Primary;
8
-
9
- @Configuration
10
- @Slf4j
11
- public class PageQueryEntityConfigration {
12
- @Primary
13
- @Bean
14
- public EntityQueryAspect entityQueryAspect() {
15
- log.info("【MapperConfiguration】DataSource 获取数据源primaryDataSourceProperties配置");
16
- return new EntityQueryAspect();
17
- }
18
- }
@@ -1,57 +0,0 @@
1
- # 参考资料
2
-
3
- 本文档详细介绍了 `yss-component-mybatis-starter` 模块中的核心类和配置类,这些类构成了通用 MyBatis 模式的基础。
4
-
5
- ## 核心类 (Core Classes)
6
-
7
- ### 1. BaseRepository.java
8
- **位置**: `../assets/BaseRepository.java`
9
-
10
- `BaseRepository<T, D>` 是通用 MyBatis 模式下的核心 Mapper 接口,所有业务 Repository 都应继承它。
11
-
12
- **主要特性**:
13
- - **继承链**: 继承了 `io.mybatis.mapper.BaseMapper` (基础 CRUD), `io.mybatis.mapper.list.ListMapper` (批量操作), 和 `com.baomidou.mybatisplus.core.mapper.Mapper` (兼容性)。
14
- - **通用方法**:
15
- - `insert`, `update`, `delete`: 标准的单表操作。
16
- - `selectBatchIds`, `deleteBatchIds`: 批量操作。
17
- - `selectByMap`, `selectMaps`, `selectObjs`: 基于 Map 和 Wrapper 的查询。
18
- - **扩展点**: 允许用户通过继承此接口,获得开箱即用的 CRUD 能力,无需编写 XML。
19
-
20
- ### 2. EntityQueryAspect.java
21
- **位置**: `../assets/EntityQueryAspect.java`
22
-
23
- 这是一个 AOP 切面,用于实现非侵入式的自动分页功能。
24
-
25
- **工作原理**:
26
- - **切点**: 拦截所有 Repository 层 (`@Repository`) 和 Gateway 实现层的方法。
27
- - **条件**: 方法参数中必须包含 `com.yss.cloud.dto.page.PageQuery` 对象。
28
- - **逻辑**:
29
- 1. 检查 `PageQuery` 参数是否非空。
30
- 2. 调用 `PageHelper.offsetPage(offset, pageSize)` 开启分页。
31
- 3. 执行目标方法。
32
- 4. 获取分页结果的总记录数 (`page.getTotal()`)。
33
- 5. 将总数回填到 `PageQuery.tempTotalCount` 字段中。
34
-
35
- ### 3. MybatisBaseConfiguration.java
36
- **位置**: `../assets/MybatisBaseConfiguration.java`
37
-
38
- MyBatis 基础配置类,负责加载核心组件。
39
-
40
- **主要功能**:
41
- - **导入配置**: 导入了 `PageQueryEntityConfigration`,确保分页切面生效。
42
- - **启用属性**: 启用了 `PrimaryDataSourceProperties`, `MybatisPlusGlobalProperties`, `YssMybatisMapperProperties` 等配置属性类。
43
-
44
- ### 4. PageQueryEntityConfigration.java
45
- **位置**: `../assets/PageQueryEntityConfigration.java`
46
-
47
- 负责注册分页查询切面。
48
-
49
- **主要功能**:
50
- - 定义了 `entityQueryAspect` Bean,使其受 Spring 容器管理,从而激活自动分页拦截功能。
51
-
52
- ## 使用建议
53
-
54
- 当您在开发中使用通用 MyBatis 模式时:
55
- 1. **定义 Repository**: 直接继承 `BaseRepository<Entity, ID>`。
56
- 2. **分页查询**: 在方法参数中添加 `PageQuery`,框架会自动处理分页逻辑。
57
- 3. **批量操作**: 使用 `insertList`, `updateList` 等方法进行高效的数据处理。
@@ -1,107 +0,0 @@
1
- # YSS Infrastructure Target Profile 指南
2
-
3
- 本指南只定义 `target-domain-model + mybatis-plus`。历史 `Entity + DTO/VO Gateway` 为 `unsupported`,不存在旧架构 Profile。
4
-
5
- ## 1. 职责
6
-
7
- - 实现既有 Domain Gateway,负责 Aggregate 持久化;不创建或改写 Gateway interface。
8
- - 实现 Application Query Port,负责分页、列表和读模型。
9
- - 定义 PO、MyBatis-Plus Repository/Mapper、XML 和数据源适配。
10
- - 通过 Spring MapStruct Bean 完成 `PO <-> Domain Model`、`PO -> Application Result`。
11
-
12
- Infrastructure 不拥有业务事务边界,不向 Application/Web 暴露 PO,也不直接生成 HTTP VO。
13
-
14
- ## 2. 包结构
15
-
16
- ```text
17
- {base_package}.infrastructure
18
- ├── persistence
19
- │ ├── po
20
- │ ├── repository
21
- │ ├── convertor
22
- │ └── gateway
23
- └── query
24
- ├── adapter
25
- └── convertor
26
- ```
27
-
28
- 新脚手架固定使用 `{base_package}.infrastructure`。已有 `{base_package}.repository` 工程不由 scaffold 改写;需要现代化时单独立项。
29
-
30
- ## 3. Domain Gateway 实现
31
-
32
- ```java
33
- @Repository
34
- @RequiredArgsConstructor
35
- public class QualityTemplateGatewayImpl implements QualityTemplateGateway {
36
- private final QualityTemplateRepository repository;
37
- private final QualityTemplatePersistenceConvertor convertor;
38
-
39
- @Override
40
- public Optional<QualityTemplate> findById(QualityTemplateId id) {
41
- return Optional.ofNullable(repository.selectById(id.value()))
42
- .map(convertor::toDomain);
43
- }
44
-
45
- @Override
46
- public void save(QualityTemplate aggregate) {
47
- repository.insertOrUpdate(convertor.toPO(aggregate));
48
- }
49
- }
50
- ```
51
-
52
- GatewayImpl 不接收 Web Cmd/Query,不返回 VO/PageResult,不声明新的业务事务。
53
-
54
- ## 4. Query Port 实现
55
-
56
- 分页/列表属于 Application Query Port:
57
-
58
- ```java
59
- @Repository
60
- @RequiredArgsConstructor
61
- public class QualityTemplateQueryAdapter implements QualityTemplateQueryPort {
62
- private final QualityTemplateRepository repository;
63
- private final QualityTemplateQueryConvertor convertor;
64
-
65
- @Override
66
- public PageResult<QualityTemplateResult> page(QualityTemplatePageQuery query) {
67
- // orderBy/groupBy 必须先映射到批准列白名单,再构造 MyBatis 条件。
68
- return convertor.toResultPage(repository.selectPage(...));
69
- }
70
- }
71
- ```
72
-
73
- `PageQuery` 可以在 Web/Application/Infrastructure 协作链使用,但不得进入 Domain。`orderBy` / `groupBy` 禁止直接拼接 SQL。
74
-
75
- ## 5. PO 与 Repository
76
-
77
- - Target Profile 使用 `*PO`;旧式 `*Entity` 布局为 `unsupported`。
78
- - PO 默认使用最小 Lombok 注解,不无条件使用 `@Data`。
79
- - 当前实现继承项目既有 `BasePlusRepository<PO>`;普通 MyBatis 为 `unsupported`。
80
- - Mapper XML 位于项目既有扫描路径;扫描包和 XML 路径必须由集成测试证明。
81
-
82
- ## 6. MapStruct
83
-
84
- ```java
85
- @Mapper(componentModel = "spring")
86
- public interface QualityTemplatePersistenceConvertor {
87
- QualityTemplate toDomain(QualityTemplatePO source);
88
- QualityTemplatePO toPO(QualityTemplate source);
89
- }
90
- ```
91
-
92
- - 禁止 `INSTANCE = Mappers.getMapper(...)`。
93
- - Convertor 使用构造器注入。
94
- - 父 POM 必须配置 `mapstruct-processor`、Lombok 和 `lombok-mapstruct-binding`。
95
- - 验证必须编译生成实现,不能只检查接口文本。
96
-
97
- ## 7. 验证
98
-
99
- - Domain Gateway:保存后可通过 Gateway seam 重新加载等价 Aggregate。
100
- - Query Port:分页、total、排序白名单和空结果。
101
- - Mapper/Repository:实际 MyBatis-Plus/H2 或批准数据库 fixture。
102
- - Architecture:Infrastructure 可以依赖 Application/Domain;反向依赖必须失败。
103
- - 使用项目根 `./mvnw test/package` 留证。
104
-
105
- ## 8. 旧架构边界
106
-
107
- 检测到 Repository 直接接收 client Query、返回 VO、Convertor 做 `PO -> VO` 或使用旧式 Entity 布局时,返回 `unsupported`,不得由新 scaffold 自动改写。旧项目继续按原工程维护;现代化改造必须单独立项。
@@ -1,112 +0,0 @@
1
- package com.yss.cloud.mybatis.support;
2
-
3
- import com.baomidou.mybatisplus.core.conditions.Wrapper;
4
- import com.baomidou.mybatisplus.core.toolkit.Constants;
5
- import io.mybatis.mapper.BaseMapper;
6
- import io.mybatis.mapper.list.ListMapper;
7
- import io.mybatis.mapper.list.ListProvider;
8
- import io.mybatis.provider.Caching;
9
- import com.baomidou.mybatisplus.core.mapper.Mapper;
10
- import org.apache.ibatis.annotations.*;
11
-
12
- import java.io.Serializable;
13
- import java.util.Collection;
14
- import java.util.List;
15
- import java.util.Map;
16
-
17
- /**
18
- * @author zhudaoming
19
- */
20
- public interface BaseRepository<T, D extends Serializable> extends Mapper<T>, BaseMapper<T, D>, ListMapper<T> {
21
- /**s
22
- /**
23
- * 删除(根据ID或实体 批量删除)
24
- *
25
- * @param idList 主键ID列表或实体列表(不能为 null 以及 empty)
26
- */
27
- int deleteBatchIds(@Param(Constants.COLL) Collection<?> idList);
28
- /**
29
- * 查询(根据ID 批量查询)
30
- *
31
- * @param idList 主键ID列表(不能为 null 以及 empty)
32
- */
33
- List<T> selectBatchIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);
34
- /**
35
- * 查询(根据 columnMap 条件)
36
- *
37
- * @param columnMap 表字段 map 对象
38
- */
39
- List<T> selectByMap(@Param(Constants.COLUMN_MAP) Map<String, Object> columnMap);
40
- /**
41
- * 根据 Wrapper 条件,查询全部记录
42
- *
43
- * @param queryWrapper 实体对象封装操作类(可以为 null)
44
- */
45
- List<Map<String, Object>> selectMaps(@Param(Constants.WRAPPER) Wrapper<T> queryWrapper);
46
-
47
- /**
48
- * 根据 Wrapper 条件,查询全部记录
49
- * <p>注意: 只返回第一个字段的值</p>
50
- *
51
- * @param queryWrapper 实体对象封装操作类(可以为 null)
52
- */
53
- List<Object> selectObjs(@Param(Constants.WRAPPER) Wrapper<T> queryWrapper);
54
- /**
55
- * 保存实体,默认主键自增,并且名称为 id
56
- * <p>
57
- * 这个方法是个示例,你可以在自己的接口中使用相同的方式覆盖父接口中的配置
58
- *
59
- * @param entity 实体类
60
- * @return 1成功,0失败
61
- */
62
- @Override
63
- @Lang(Caching.class)
64
- @Options(useGeneratedKeys = true)
65
- @InsertProvider(type = EntityProvider.class, method = "insert")
66
- <S extends T> int insert(S entity);
67
-
68
- /**
69
- * 保存实体中不为空的字段,默认主键自增,并且名称为 id
70
- * <p>
71
- * 这个方法是个示例,你可以在自己的接口中使用相同的方式覆盖父接口中的配置
72
- *
73
- * @param entity 实体类
74
- * @return 1成功,0失败
75
- */
76
- @Override
77
- @Lang(Caching.class)
78
- @Options(useGeneratedKeys = true)
79
- @InsertProvider(type = EntityProvider.class, method = "insertSelective")
80
- <S extends T> int insertSelective(S entity);
81
-
82
- @Override
83
- @Lang(Caching.class)
84
- @Options(useGeneratedKeys = true)
85
- @InsertProvider(type = ListProvider.class, method = "insertList")
86
- <S extends T> int insertList(@Param("entityList") List<S> entityList);
87
-
88
- /**
89
- * 批量更新
90
- *
91
- * @author dengsd
92
- * @date 2022/9/27 11:49
93
- */
94
- @Override
95
- @Lang(Caching.class)
96
- @Options(useGeneratedKeys = true)
97
- @UpdateProvider(type = ListProvider.class, method = "updateList")
98
- <S extends T> int updateList(@Param("entityList") List<S> entityList);
99
-
100
-
101
- /**
102
- * 批量更新
103
- *
104
- * @author dengsd
105
- * @date 2022/9/27 11:49
106
- */
107
- @Override
108
- @Lang(Caching.class)
109
- @Options(useGeneratedKeys = true)
110
- @UpdateProvider(type = ListProvider.class, method = "updateListSelective")
111
- <S extends T> int updateListSelective(@Param("entityList") List<S> entityList);
112
- }
@@ -1,37 +0,0 @@
1
- package com.yss.cloud.mybatis.aop;
2
-
3
- import com.github.pagehelper.Page;
4
- import com.github.pagehelper.PageHelper;
5
- import com.yss.cloud.dto.page.PageQuery;
6
- import lombok.SneakyThrows;
7
- import org.aspectj.lang.ProceedingJoinPoint;
8
- import org.aspectj.lang.annotation.Around;
9
- import org.aspectj.lang.annotation.Aspect;
10
-
11
- @Aspect
12
- public class EntityQueryAspect {
13
-
14
- /**
15
- * 字段开启分页的方法
16
- *
17
- * @apiNote 1. 包命名需符合规范 com.yss.datamiddle.(项目名).service?.impl.serviceImpl.method <br/> 2. 参数为pageQuery dto的方法
18
- * @param joinPoint 加入切点
19
- * @param pageQuery 查询分页对象dtp
20
- * @return 执行结果
21
- */
22
- @Around("( (execution(public * (@org.springframework.stereotype.Repository *).*(..)) || execution(* com.yss..*.gateway.impl.*.*(..))))&& (args(pageQuery)||args(pageQuery,..))")
23
- @SneakyThrows
24
- public Object interceptEntityQueries(ProceedingJoinPoint joinPoint, PageQuery pageQuery) {
25
- if (pageQuery != null) {
26
- //分页查询开始
27
- Page<Object> page = PageHelper.offsetPage(pageQuery.getOffset(), pageQuery.getPageSize());
28
- // 继续执行目标方法
29
- Object result = joinPoint.proceed();
30
- long total = page.getTotal();
31
- pageQuery.setTempTotalCount(total);
32
- return result;
33
- }
34
- // 不满足条件时直接执行目标方法
35
- return joinPoint.proceed();
36
- }
37
- }
@@ -1,18 +0,0 @@
1
- package com.yss.cloud.mybatis;
2
-
3
- import com.yss.cloud.mybatis.config.PageQueryEntityConfigration;
4
- import org.springframework.boot.context.properties.EnableConfigurationProperties;
5
- import org.springframework.context.annotation.Configuration;
6
- import org.springframework.context.annotation.Import;
7
-
8
-
9
- @Configuration
10
- @Import({
11
- PageQueryEntityConfigration.class}
12
- )
13
- @EnableConfigurationProperties({PrimaryDataSourceProperties.class,
14
- MybatisPlusGlobalProperties.class,
15
- YssMybatisMapperProperties.class})
16
- public class MybatisBaseConfiguration {
17
-
18
- }
@@ -1,18 +0,0 @@
1
- package com.yss.cloud.mybatis.config;
2
-
3
- import com.yss.cloud.mybatis.aop.EntityQueryAspect;
4
- import lombok.extern.slf4j.Slf4j;
5
- import org.springframework.context.annotation.Bean;
6
- import org.springframework.context.annotation.Configuration;
7
- import org.springframework.context.annotation.Primary;
8
-
9
- @Configuration
10
- @Slf4j
11
- public class PageQueryEntityConfigration {
12
- @Primary
13
- @Bean
14
- public EntityQueryAspect entityQueryAspect() {
15
- log.info("【MapperConfiguration】DataSource 获取数据源primaryDataSourceProperties配置");
16
- return new EntityQueryAspect();
17
- }
18
- }
@@ -1,57 +0,0 @@
1
- # 参考资料
2
-
3
- 本文档详细介绍了 `yss-component-mybatis-starter` 模块中的核心类和配置类,这些类构成了通用 MyBatis 模式的基础。
4
-
5
- ## 核心类 (Core Classes)
6
-
7
- ### 1. BaseRepository.java
8
- **位置**: `../assets/BaseRepository.java`
9
-
10
- `BaseRepository<T, D>` 是通用 MyBatis 模式下的核心 Mapper 接口,所有业务 Repository 都应继承它。
11
-
12
- **主要特性**:
13
- - **继承链**: 继承了 `io.mybatis.mapper.BaseMapper` (基础 CRUD), `io.mybatis.mapper.list.ListMapper` (批量操作), 和 `com.baomidou.mybatisplus.core.mapper.Mapper` (兼容性)。
14
- - **通用方法**:
15
- - `insert`, `update`, `delete`: 标准的单表操作。
16
- - `selectBatchIds`, `deleteBatchIds`: 批量操作。
17
- - `selectByMap`, `selectMaps`, `selectObjs`: 基于 Map 和 Wrapper 的查询。
18
- - **扩展点**: 允许用户通过继承此接口,获得开箱即用的 CRUD 能力,无需编写 XML。
19
-
20
- ### 2. EntityQueryAspect.java
21
- **位置**: `../assets/EntityQueryAspect.java`
22
-
23
- 这是一个 AOP 切面,用于实现非侵入式的自动分页功能。
24
-
25
- **工作原理**:
26
- - **切点**: 拦截所有 Repository 层 (`@Repository`) 和 Gateway 实现层的方法。
27
- - **条件**: 方法参数中必须包含 `com.yss.cloud.dto.page.PageQuery` 对象。
28
- - **逻辑**:
29
- 1. 检查 `PageQuery` 参数是否非空。
30
- 2. 调用 `PageHelper.offsetPage(offset, pageSize)` 开启分页。
31
- 3. 执行目标方法。
32
- 4. 获取分页结果的总记录数 (`page.getTotal()`)。
33
- 5. 将总数回填到 `PageQuery.tempTotalCount` 字段中。
34
-
35
- ### 3. MybatisBaseConfiguration.java
36
- **位置**: `../assets/MybatisBaseConfiguration.java`
37
-
38
- MyBatis 基础配置类,负责加载核心组件。
39
-
40
- **主要功能**:
41
- - **导入配置**: 导入了 `PageQueryEntityConfigration`,确保分页切面生效。
42
- - **启用属性**: 启用了 `PrimaryDataSourceProperties`, `MybatisPlusGlobalProperties`, `YssMybatisMapperProperties` 等配置属性类。
43
-
44
- ### 4. PageQueryEntityConfigration.java
45
- **位置**: `../assets/PageQueryEntityConfigration.java`
46
-
47
- 负责注册分页查询切面。
48
-
49
- **主要功能**:
50
- - 定义了 `entityQueryAspect` Bean,使其受 Spring 容器管理,从而激活自动分页拦截功能。
51
-
52
- ## 使用建议
53
-
54
- 当您在开发中使用通用 MyBatis 模式时:
55
- 1. **定义 Repository**: 直接继承 `BaseRepository<Entity, ID>`。
56
- 2. **分页查询**: 在方法参数中添加 `PageQuery`,框架会自动处理分页逻辑。
57
- 3. **批量操作**: 使用 `insertList`, `updateList` 等方法进行高效的数据处理。
@@ -1,107 +0,0 @@
1
- # YSS Infrastructure Target Profile 指南
2
-
3
- 本指南只定义 `target-domain-model + mybatis-plus`。历史 `Entity + DTO/VO Gateway` 为 `unsupported`,不存在旧架构 Profile。
4
-
5
- ## 1. 职责
6
-
7
- - 实现既有 Domain Gateway,负责 Aggregate 持久化;不创建或改写 Gateway interface。
8
- - 实现 Application Query Port,负责分页、列表和读模型。
9
- - 定义 PO、MyBatis-Plus Repository/Mapper、XML 和数据源适配。
10
- - 通过 Spring MapStruct Bean 完成 `PO <-> Domain Model`、`PO -> Application Result`。
11
-
12
- Infrastructure 不拥有业务事务边界,不向 Application/Web 暴露 PO,也不直接生成 HTTP VO。
13
-
14
- ## 2. 包结构
15
-
16
- ```text
17
- {base_package}.infrastructure
18
- ├── persistence
19
- │ ├── po
20
- │ ├── repository
21
- │ ├── convertor
22
- │ └── gateway
23
- └── query
24
- ├── adapter
25
- └── convertor
26
- ```
27
-
28
- 新脚手架固定使用 `{base_package}.infrastructure`。已有 `{base_package}.repository` 工程不由 scaffold 改写;需要现代化时单独立项。
29
-
30
- ## 3. Domain Gateway 实现
31
-
32
- ```java
33
- @Repository
34
- @RequiredArgsConstructor
35
- public class QualityTemplateGatewayImpl implements QualityTemplateGateway {
36
- private final QualityTemplateRepository repository;
37
- private final QualityTemplatePersistenceConvertor convertor;
38
-
39
- @Override
40
- public Optional<QualityTemplate> findById(QualityTemplateId id) {
41
- return Optional.ofNullable(repository.selectById(id.value()))
42
- .map(convertor::toDomain);
43
- }
44
-
45
- @Override
46
- public void save(QualityTemplate aggregate) {
47
- repository.insertOrUpdate(convertor.toPO(aggregate));
48
- }
49
- }
50
- ```
51
-
52
- GatewayImpl 不接收 Web Cmd/Query,不返回 VO/PageResult,不声明新的业务事务。
53
-
54
- ## 4. Query Port 实现
55
-
56
- 分页/列表属于 Application Query Port:
57
-
58
- ```java
59
- @Repository
60
- @RequiredArgsConstructor
61
- public class QualityTemplateQueryAdapter implements QualityTemplateQueryPort {
62
- private final QualityTemplateRepository repository;
63
- private final QualityTemplateQueryConvertor convertor;
64
-
65
- @Override
66
- public PageResult<QualityTemplateResult> page(QualityTemplatePageQuery query) {
67
- // orderBy/groupBy 必须先映射到批准列白名单,再构造 MyBatis 条件。
68
- return convertor.toResultPage(repository.selectPage(...));
69
- }
70
- }
71
- ```
72
-
73
- `PageQuery` 可以在 Web/Application/Infrastructure 协作链使用,但不得进入 Domain。`orderBy` / `groupBy` 禁止直接拼接 SQL。
74
-
75
- ## 5. PO 与 Repository
76
-
77
- - Target Profile 使用 `*PO`;旧式 `*Entity` 布局为 `unsupported`。
78
- - PO 默认使用最小 Lombok 注解,不无条件使用 `@Data`。
79
- - 当前实现继承项目既有 `BasePlusRepository<PO>`;普通 MyBatis 为 `unsupported`。
80
- - Mapper XML 位于项目既有扫描路径;扫描包和 XML 路径必须由集成测试证明。
81
-
82
- ## 6. MapStruct
83
-
84
- ```java
85
- @Mapper(componentModel = "spring")
86
- public interface QualityTemplatePersistenceConvertor {
87
- QualityTemplate toDomain(QualityTemplatePO source);
88
- QualityTemplatePO toPO(QualityTemplate source);
89
- }
90
- ```
91
-
92
- - 禁止 `INSTANCE = Mappers.getMapper(...)`。
93
- - Convertor 使用构造器注入。
94
- - 父 POM 必须配置 `mapstruct-processor`、Lombok 和 `lombok-mapstruct-binding`。
95
- - 验证必须编译生成实现,不能只检查接口文本。
96
-
97
- ## 7. 验证
98
-
99
- - Domain Gateway:保存后可通过 Gateway seam 重新加载等价 Aggregate。
100
- - Query Port:分页、total、排序白名单和空结果。
101
- - Mapper/Repository:实际 MyBatis-Plus/H2 或批准数据库 fixture。
102
- - Architecture:Infrastructure 可以依赖 Application/Domain;反向依赖必须失败。
103
- - 使用项目根 `./mvnw test/package` 留证。
104
-
105
- ## 8. 旧架构边界
106
-
107
- 检测到 Repository 直接接收 client Query、返回 VO、Convertor 做 `PO -> VO` 或使用旧式 Entity 布局时,返回 `unsupported`,不得由新 scaffold 自动改写。旧项目继续按原工程维护;现代化改造必须单独立项。
@@ -1,87 +0,0 @@
1
- # 发现阶段 (Discovery) — 市场分析 · 竞品分析 · 用户洞察
2
-
3
- > **Phase 0 — 需求分析的前置输入。**
4
-
5
- ---
6
-
7
- ## 工作流
8
-
9
- Discovery 不是固定排在 Ideation 后面的单向步骤。它和机会构想共同组成“机会探索环”,用于把事实、假设和 MVP 边界来回校准:
10
-
11
- ```
12
- 市场 / 竞品 / 用户事实 <-> 机会构想假设 <-> MVP 边界
13
- ```
14
-
15
- 进入 Spec 前必须收敛为:
16
-
17
- - 用户是谁。
18
- - 痛点是什么。
19
- - 为什么现在做。
20
- - 第一版做什么。
21
- - 明确不做什么。
22
- - 成功标准是什么。
23
- - 产品功能建设方向是什么。
24
- - 后续可能影响哪些 UI、API、数据、权限、架构和安全门禁。
25
-
26
- 常见入口:
27
-
28
- - 只有模糊想法:先机会构想,再用市场、竞品和用户洞察验证。
29
- - 已有行业、竞品或用户材料:先用 `competitive-intelligence` 整理 Discovery 事实,再生成候选方案。
30
- - 明确 Bug 或小调整:不走完整 Discovery,直接进入 hotfix / tweak。
31
-
32
- ---
33
-
34
- ## 市场分析
35
-
36
- ### 数据源
37
- - 行业报告、上市公司财报、政府数据、投资机构研报
38
-
39
- ### 产出物
40
- - 市场总览报告 / 规模与增长预测 / 趋势洞察
41
-
42
- ---
43
-
44
- ## 竞品分析
45
-
46
- 推荐优先使用 `competitive-intelligence`,把公开证据、事实 / 推断、置信度和 Spec 输入分开记录。竞品分析结论只能作为 Discovery / Spec 输入,不能直接冻结为需求。
47
-
48
- ### 分析维度
49
- 产品功能 / 用户体验 / 技术能力 / 商业模式 / 用户口碑 / 市场表现
50
-
51
- ### 产出物
52
- - 竞品情报简报 / 竞品功能矩阵 / 竞品深度分析 / 差异化机会清单 / 产品功能指引输入
53
-
54
- ---
55
-
56
- ## 用户洞察
57
-
58
- ### 数据源
59
- - 应用商店评论 / 社交媒体 / 客服社区 / 行业报告
60
-
61
- ### 产出物
62
- - 用户画像 / 用户旅程地图 / 痛点优先级清单
63
-
64
- ---
65
-
66
- ## Discovery 收敛产物
67
-
68
- Discovery 的结论用于影响 Spec、功能架构、产品设计、API 和架构阶段,但不替代这些阶段的正式产物。
69
-
70
- - 机会说明。
71
- - MVP 范围和非目标范围。
72
- - 产品功能指引 / 能力候选地图。
73
- - 下游影响清单:UI、API、数据、权限、外部系统、发布回滚和风险 / 回滚约束。
74
-
75
- ---
76
-
77
- ## 商业论证
78
-
79
- ### AI Agent 任务
80
- ```python
81
- delegate_task(
82
- goal="基于市场分析和竞品分析,生成商业论证草案",
83
- context="""
84
- 输出:机会陈述 / 目标用户群 / 价值主张 / 商业模式 / 核心指标 / 风险评估
85
- """
86
- )
87
- ```
File without changes