intent-flow 0.1.0__py3-none-any.whl

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 (264) hide show
  1. intent_flow/__init__.py +1 -0
  2. intent_flow/_assets/agents/backend-java-ddd-design.yaml +23 -0
  3. intent_flow/_assets/agents/backend-java-ddd-implementer.yaml +24 -0
  4. intent_flow/_assets/agents/backend-java-ddd-verify.yaml +26 -0
  5. intent_flow/_assets/agents/ddd-schema-designer.yaml +21 -0
  6. intent_flow/_assets/agents/prd-writer.yaml +22 -0
  7. intent_flow/_assets/agents/project-decomposer.yaml +24 -0
  8. intent_flow/_assets/agents/requirement-intake.yaml +19 -0
  9. intent_flow/_assets/flow/stages.yaml +26 -0
  10. intent_flow/_assets/flow/status.yaml +17 -0
  11. intent_flow/_assets/flow/transitions.yaml +23 -0
  12. intent_flow/_assets/intent-flow.yaml.example +33 -0
  13. intent_flow/_assets/manifest.yaml +13 -0
  14. intent_flow/_assets/roles/developer.yaml +28 -0
  15. intent_flow/_assets/roles/fullstack.yaml +35 -0
  16. intent_flow/_assets/roles/product-manager.yaml +13 -0
  17. intent_flow/_assets/skills/backend-java-ddd/design/SKILL.md +442 -0
  18. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/SPEC.md +80 -0
  19. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/acceptance/acceptance.md +37 -0
  20. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-create.md +113 -0
  21. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-detail.md +97 -0
  22. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-disable.md +97 -0
  23. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-enable.md +90 -0
  24. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-page.md +113 -0
  25. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/application/country-update.md +102 -0
  26. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/change/260227-01-/321/205/320/253/342/225/234/321/205/320/276/342/225/242/321/207/320/276/320/261/321/207/320/240/320/226/321/206/320/270/320/261/321/205/320/255/320/247.md +63 -0
  27. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/change/260315-02-/321/205/320/253/342/225/234/321/205/320/276/342/225/242/321/211/342/225/227/320/250/321/210/320/276/320/264/321/205/342/225/225/320/221/321/207/320/267/320/235/321/205/320/262/320/256/321/205/342/225/235/342/225/221.md +53 -0
  28. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/constraints/ddd-implementation.md +7 -0
  29. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/core/create.md +110 -0
  30. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/core/disable.md +85 -0
  31. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/core/enable.md +85 -0
  32. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/core/object-profile.md +106 -0
  33. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/core/update.md +103 -0
  34. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/rules/application-rules.md +12 -0
  35. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/rules/cross-object-rules.md +11 -0
  36. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/rules/object-rules.md +13 -0
  37. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/create-country.md +26 -0
  38. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/detail-country.md +22 -0
  39. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/disable-country.md +22 -0
  40. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/enable-country.md +22 -0
  41. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/page-country.md +24 -0
  42. intent_flow/_assets/skills/backend-java-ddd/design/examples/country/scenarios/update-country.md +24 -0
  43. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/SPEC.md +79 -0
  44. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/acceptance/acceptance.md +36 -0
  45. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-create.md +80 -0
  46. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-detail.md +77 -0
  47. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-disable.md +77 -0
  48. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-enable.md +70 -0
  49. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-page.md +89 -0
  50. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/application/currency-update.md +75 -0
  51. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/change/260303-01-/321/205/342/225/225/320/221/321/207/320/267/320/235/321/207/320/276/320/261/321/207/320/240/320/226.md +64 -0
  52. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/constraints/ddd-implementation.md +7 -0
  53. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/core/create.md +94 -0
  54. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/core/disable.md +85 -0
  55. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/core/enable.md +85 -0
  56. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/core/object-profile.md +95 -0
  57. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/core/update.md +90 -0
  58. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/rules/application-rules.md +11 -0
  59. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/rules/cross-object-rules.md +10 -0
  60. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/rules/object-rules.md +13 -0
  61. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/create-currency.md +24 -0
  62. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/detail-currency.md +22 -0
  63. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/disable-currency.md +22 -0
  64. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/enable-currency.md +22 -0
  65. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/page-currency.md +24 -0
  66. intent_flow/_assets/skills/backend-java-ddd/design/examples/currency/scenarios/update-currency.md +23 -0
  67. intent_flow/_assets/skills/backend-java-ddd/design/references/INDEX.md +35 -0
  68. intent_flow/_assets/skills/backend-java-ddd/design/references/concepts/application-vs-core-behavior.md +54 -0
  69. intent_flow/_assets/skills/backend-java-ddd/design/references/concepts/business-object.md +43 -0
  70. intent_flow/_assets/skills/backend-java-ddd/design/references/concepts/object-spec-package.md +45 -0
  71. intent_flow/_assets/skills/backend-java-ddd/design/references/process/generation-process.md +75 -0
  72. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/business-object-generation-rules.md +82 -0
  73. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/change-impact-rules.md +45 -0
  74. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/consistency-check-rules.md +47 -0
  75. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/extraction-rules.md +126 -0
  76. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/file-generation-rules.md +275 -0
  77. intent_flow/_assets/skills/backend-java-ddd/design/references/rules/output-artifact-checklist.md +328 -0
  78. intent_flow/_assets/skills/backend-java-ddd/design/templates/INDEX.md +22 -0
  79. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/SPEC.md +34 -0
  80. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/acceptance.md +13 -0
  81. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/application-behavior.md +67 -0
  82. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/change.md +43 -0
  83. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/constraints.md +19 -0
  84. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/core-behavior.md +67 -0
  85. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/object-profile.md +35 -0
  86. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/rules.md +17 -0
  87. intent_flow/_assets/skills/backend-java-ddd/design/templates/object/scenario.md +25 -0
  88. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/anti-patterns/SKILL.md +488 -0
  89. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/bootstrap/SKILL.md +171 -0
  90. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/code-generation-workflow/SKILL.md +755 -0
  91. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/code-style/code-formatting/SKILL.md +297 -0
  92. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/code-style/comment-javadoc/SKILL.md +494 -0
  93. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/code-style/imports/SKILL.md +237 -0
  94. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/coding-standards/SKILL.md +304 -0
  95. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/exception-logging/SKILL.md +318 -0
  96. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/loading-strategy/SKILL.md +193 -0
  97. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/naming-convention/SKILL.md +223 -0
  98. intent_flow/_assets/skills/backend-java-ddd/implementer/00-core/project-architecture/SKILL.md +132 -0
  99. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/adapter/controller/SKILL.md +488 -0
  100. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/adapter/controller/examples/complete-controller.md +382 -0
  101. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/adapter/controller/examples/pagination.md +103 -0
  102. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/SKILL.md +216 -0
  103. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/async.md +446 -0
  104. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/batch.md +555 -0
  105. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/conditional.md +549 -0
  106. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/cross-domain-cmdexe.md +417 -0
  107. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/cross-domain.md +491 -0
  108. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/distributed-tx.md +406 -0
  109. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/mixed.md +470 -0
  110. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/simple-cmdexe.md +512 -0
  111. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/appservice/examples/simple-qryexe.md +434 -0
  112. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/cmdexe/SKILL.md +288 -0
  113. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/cmdexe/examples/action.md +648 -0
  114. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/cmdexe/examples/create.md +775 -0
  115. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/cmdexe/examples/update.md +721 -0
  116. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/convertor/SKILL.md +231 -0
  117. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/convertor/examples/convertor.md +612 -0
  118. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/dto/SKILL.md +75 -0
  119. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/dto/examples/cmd.md +205 -0
  120. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/dto/examples/co.md +168 -0
  121. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/dto/examples/qry.md +208 -0
  122. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/qryexe/SKILL.md +354 -0
  123. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/qryexe/examples/detail.md +156 -0
  124. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/application/qryexe/examples/pagination.md +145 -0
  125. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/entity/SKILL.md +280 -0
  126. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/entity/examples/aggregate-creation.md +1009 -0
  127. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/entity/examples/aggregate-design.md +728 -0
  128. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/entity/examples/method-design.md +640 -0
  129. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/entity/examples/update-patterns.md +503 -0
  130. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/gateway/SKILL.md +181 -0
  131. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/gateway/examples/gateway-capabilities.md +536 -0
  132. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/domain/gateway/examples/gateway-interface.md +270 -0
  133. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/external/SKILL.md +142 -0
  134. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/gatewayimpl/SKILL.md +197 -0
  135. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/gatewayimpl/examples/cascade-mechanism.md +353 -0
  136. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/gatewayimpl/examples/gateway.md +316 -0
  137. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/repository/SKILL.md +294 -0
  138. intent_flow/_assets/skills/backend-java-ddd/implementer/01-layers/infrastructure/repository/examples/pagination.md +439 -0
  139. intent_flow/_assets/skills/backend-java-ddd/implementer/02-plugins/enum-dict-plugin/SKILL.md +239 -0
  140. intent_flow/_assets/skills/backend-java-ddd/implementer/02-plugins/pagination-backend/SKILL.md +411 -0
  141. intent_flow/_assets/skills/backend-java-ddd/implementer/02-plugins/repository-methods/SKILL.md +229 -0
  142. intent_flow/_assets/skills/backend-java-ddd/implementer/02-plugins/seata-xa/SKILL.md +268 -0
  143. intent_flow/_assets/skills/backend-java-ddd/implementer/02-plugins/spring-cache/SKILL.md +252 -0
  144. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/README.md +45 -0
  145. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/architecture/ddd-architecture.md +101 -0
  146. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/architecture/project-structure.md +143 -0
  147. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/ddd-concepts/aggregate-update.md +432 -0
  148. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/ddd-concepts/method-design.md +344 -0
  149. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/ddd-concepts/parameter-object.md +416 -0
  150. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/ddd-concepts/rich-model.md +270 -0
  151. intent_flow/_assets/skills/backend-java-ddd/implementer/10-learning/ddd-concepts/value-object.md +375 -0
  152. intent_flow/_assets/skills/backend-java-ddd/scaffold/README.md +17 -0
  153. intent_flow/_assets/skills/backend-java-ddd/scaffold/add-service-module/SKILL.md +77 -0
  154. intent_flow/_assets/skills/backend-java-ddd/scaffold/examples/service-basis.md +27 -0
  155. intent_flow/_assets/skills/backend-java-ddd/scaffold/init-multi-module-project/SKILL.md +137 -0
  156. intent_flow/_assets/skills/backend-java-ddd/scaffold/init-single-module-project/SKILL.md +115 -0
  157. intent_flow/_assets/skills/backend-java-ddd/scaffold/references/INDEX.md +19 -0
  158. intent_flow/_assets/skills/backend-java-ddd/scaffold/references/config-conventions.md +29 -0
  159. intent_flow/_assets/skills/backend-java-ddd/scaffold/references/input-checklist.md +19 -0
  160. intent_flow/_assets/skills/backend-java-ddd/scaffold/references/project-structure.md +29 -0
  161. intent_flow/_assets/skills/backend-java-ddd/scaffold/references/what-is-scaffold.md +18 -0
  162. intent_flow/_assets/skills/backend-java-ddd/scaffold/templates/INDEX.md +8 -0
  163. intent_flow/_assets/skills/backend-java-ddd/scaffold/templates/files.md +33 -0
  164. intent_flow/_assets/skills/backend-java-ddd/scaffold/templates/module-layout.md +23 -0
  165. intent_flow/_assets/skills/code-repository/commit-changes/SKILL.md +41 -0
  166. intent_flow/_assets/skills/code-repository/commit-changes/mappings/git.yaml +12 -0
  167. intent_flow/_assets/skills/code-repository/commit-changes/references/commit.md +19 -0
  168. intent_flow/_assets/skills/code-repository/create-branch/SKILL.md +41 -0
  169. intent_flow/_assets/skills/code-repository/create-branch/mappings/git.yaml +12 -0
  170. intent_flow/_assets/skills/code-repository/create-branch/references/create.md +19 -0
  171. intent_flow/_assets/skills/code-repository/diff-changes/SKILL.md +41 -0
  172. intent_flow/_assets/skills/code-repository/diff-changes/mappings/git.yaml +12 -0
  173. intent_flow/_assets/skills/code-repository/diff-changes/references/diff.md +19 -0
  174. intent_flow/_assets/skills/code-repository/read-file/SKILL.md +41 -0
  175. intent_flow/_assets/skills/code-repository/read-file/mappings/git.yaml +12 -0
  176. intent_flow/_assets/skills/code-repository/read-file/references/read.md +19 -0
  177. intent_flow/_assets/skills/decomposition/analyze-impact/SKILL.md +41 -0
  178. intent_flow/_assets/skills/decomposition/analyze-impact/references/analyze.md +19 -0
  179. intent_flow/_assets/skills/decomposition/create-project-changes/SKILL.md +41 -0
  180. intent_flow/_assets/skills/decomposition/create-project-changes/references/create.md +19 -0
  181. intent_flow/_assets/skills/decomposition/normalize-requirement/SKILL.md +41 -0
  182. intent_flow/_assets/skills/decomposition/normalize-requirement/references/normalize.md +19 -0
  183. intent_flow/_assets/skills/decomposition/normalize-requirement/templates/normalized-requirement.template.md +34 -0
  184. intent_flow/_assets/skills/domains.yaml +207 -0
  185. intent_flow/_assets/skills/local-workspace/list-artifacts/SKILL.md +41 -0
  186. intent_flow/_assets/skills/local-workspace/list-artifacts/references/list.md +19 -0
  187. intent_flow/_assets/skills/local-workspace/read-artifact/SKILL.md +41 -0
  188. intent_flow/_assets/skills/local-workspace/read-artifact/references/read.md +19 -0
  189. intent_flow/_assets/skills/local-workspace/read-meta/SKILL.md +41 -0
  190. intent_flow/_assets/skills/local-workspace/read-meta/references/read.md +19 -0
  191. intent_flow/_assets/skills/local-workspace/write-artifact/SKILL.md +41 -0
  192. intent_flow/_assets/skills/local-workspace/write-artifact/references/write.md +19 -0
  193. intent_flow/_assets/skills/local-workspace/write-meta/SKILL.md +41 -0
  194. intent_flow/_assets/skills/local-workspace/write-meta/references/write.md +19 -0
  195. intent_flow/_assets/skills/project-management/create-work-item/SKILL.md +43 -0
  196. intent_flow/_assets/skills/project-management/create-work-item/mappings/jira.yaml +29 -0
  197. intent_flow/_assets/skills/project-management/create-work-item/mappings/tapd.yaml +29 -0
  198. intent_flow/_assets/skills/project-management/create-work-item/mappings/yunxiao.yaml +36 -0
  199. intent_flow/_assets/skills/project-management/create-work-item/references/create.md +22 -0
  200. intent_flow/_assets/skills/project-management/query-work-item/SKILL.md +41 -0
  201. intent_flow/_assets/skills/project-management/query-work-item/mappings/jira.yaml +15 -0
  202. intent_flow/_assets/skills/project-management/query-work-item/mappings/tapd.yaml +15 -0
  203. intent_flow/_assets/skills/project-management/query-work-item/mappings/yunxiao.yaml +15 -0
  204. intent_flow/_assets/skills/project-management/query-work-item/references/query.md +19 -0
  205. intent_flow/_assets/skills/project-management/sync-stage/SKILL.md +41 -0
  206. intent_flow/_assets/skills/project-management/sync-stage/mappings/jira.yaml +15 -0
  207. intent_flow/_assets/skills/project-management/sync-stage/mappings/tapd.yaml +15 -0
  208. intent_flow/_assets/skills/project-management/sync-stage/mappings/yunxiao.yaml +15 -0
  209. intent_flow/_assets/skills/project-management/sync-stage/references/sync.md +19 -0
  210. intent_flow/_assets/skills/project-management/update-status/SKILL.md +41 -0
  211. intent_flow/_assets/skills/project-management/update-status/mappings/jira.yaml +31 -0
  212. intent_flow/_assets/skills/project-management/update-status/mappings/tapd.yaml +31 -0
  213. intent_flow/_assets/skills/project-management/update-status/mappings/yunxiao.yaml +32 -0
  214. intent_flow/_assets/skills/project-management/update-status/references/update.md +19 -0
  215. intent_flow/_assets/skills/project-management/update-work-item/SKILL.md +41 -0
  216. intent_flow/_assets/skills/project-management/update-work-item/mappings/jira.yaml +15 -0
  217. intent_flow/_assets/skills/project-management/update-work-item/mappings/tapd.yaml +15 -0
  218. intent_flow/_assets/skills/project-management/update-work-item/mappings/yunxiao.yaml +15 -0
  219. intent_flow/_assets/skills/project-management/update-work-item/references/update.md +19 -0
  220. intent_flow/_assets/skills/remote-document/create-doc/SKILL.md +41 -0
  221. intent_flow/_assets/skills/remote-document/create-doc/mappings/feishu.yaml +12 -0
  222. intent_flow/_assets/skills/remote-document/create-doc/mappings/yuque.yaml +12 -0
  223. intent_flow/_assets/skills/remote-document/create-doc/references/create.md +19 -0
  224. intent_flow/_assets/skills/remote-document/publish-doc/SKILL.md +41 -0
  225. intent_flow/_assets/skills/remote-document/publish-doc/mappings/feishu.yaml +12 -0
  226. intent_flow/_assets/skills/remote-document/publish-doc/mappings/yuque.yaml +12 -0
  227. intent_flow/_assets/skills/remote-document/publish-doc/references/publish.md +19 -0
  228. intent_flow/_assets/skills/remote-document/read-doc/SKILL.md +41 -0
  229. intent_flow/_assets/skills/remote-document/read-doc/mappings/feishu.yaml +12 -0
  230. intent_flow/_assets/skills/remote-document/read-doc/mappings/yuque.yaml +12 -0
  231. intent_flow/_assets/skills/remote-document/read-doc/references/read.md +19 -0
  232. intent_flow/_assets/skills/remote-document/search-doc/SKILL.md +41 -0
  233. intent_flow/_assets/skills/remote-document/search-doc/mappings/feishu.yaml +12 -0
  234. intent_flow/_assets/skills/remote-document/search-doc/mappings/yuque.yaml +12 -0
  235. intent_flow/_assets/skills/remote-document/search-doc/references/search.md +19 -0
  236. intent_flow/_assets/skills/remote-document/update-doc/SKILL.md +41 -0
  237. intent_flow/_assets/skills/remote-document/update-doc/mappings/feishu.yaml +12 -0
  238. intent_flow/_assets/skills/remote-document/update-doc/mappings/yuque.yaml +12 -0
  239. intent_flow/_assets/skills/remote-document/update-doc/references/update.md +19 -0
  240. intent_flow/_assets/skills/requirement/analyze-requirement/SKILL.md +41 -0
  241. intent_flow/_assets/skills/requirement/analyze-requirement/references/analyze.md +19 -0
  242. intent_flow/_assets/skills/requirement/generate-prd/SKILL.md +41 -0
  243. intent_flow/_assets/skills/requirement/generate-prd/references/generate.md +19 -0
  244. intent_flow/_assets/skills/requirement/generate-prd/templates/prd.template.md +24 -0
  245. intent_flow/_assets/skills/requirement/generate-prototype/SKILL.md +41 -0
  246. intent_flow/_assets/skills/requirement/generate-prototype/references/generate.md +19 -0
  247. intent_flow/_assets/skills/requirement/generate-prototype/templates/prototype.template.md +26 -0
  248. intent_flow/_assets/skills/requirement/generate-scope/SKILL.md +41 -0
  249. intent_flow/_assets/skills/requirement/generate-scope/references/generate.md +19 -0
  250. intent_flow/_assets/skills/requirement/generate-scope/templates/scope.template.md +13 -0
  251. intent_flow/_assets/skills/requirement/intake-requirement/SKILL.md +41 -0
  252. intent_flow/_assets/skills/requirement/intake-requirement/references/intake.md +19 -0
  253. intent_flow/_assets/skills/resolution.yaml +17 -0
  254. intent_flow/adapters/__init__.py +1 -0
  255. intent_flow/adapters/opencode/__init__.py +1 -0
  256. intent_flow/adapters/opencode/adapter.yaml +31 -0
  257. intent_flow/adapters/opencode/build_runtime.py +1207 -0
  258. intent_flow/adapters/opencode/intent-flow.plugin.js +161 -0
  259. intent_flow/cli.py +1067 -0
  260. intent_flow-0.1.0.dist-info/METADATA +10 -0
  261. intent_flow-0.1.0.dist-info/RECORD +264 -0
  262. intent_flow-0.1.0.dist-info/WHEEL +5 -0
  263. intent_flow-0.1.0.dist-info/entry_points.txt +2 -0
  264. intent_flow-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,536 @@
1
+ # Gateway 能力列表与使用指南
2
+
3
+ > **面向对象**:AI 代码生成
4
+ > **组织方式**:按业务场景分类
5
+ > **核心原则**:大部分场景无需自定义方法,直接使用继承的能力
6
+
7
+ ---
8
+
9
+ ## 第一部分:完整能力清单
10
+
11
+ Gateway 接口继承 `BaseGateway<T, ID>`,自动拥有以下 12 个方法:
12
+
13
+ | 方法签名 | 功能 | 参数 | 返回值 | 注意事项 |
14
+ |---------|------|------|--------|---------|
15
+ | `findById(ID id)` | 根据主键查询聚合根 | 主键 ID | 聚合根对象(可能为 null) | ✅ 自动级联加载 @OneToMany 子实体 |
16
+ | `findByIds(Collection<ID> ids)` | 根据主键列表批量查询 | 主键 ID 集合 | 聚合根列表 | ✅ 自动级联加载子实体 |
17
+ | `findByCode(Object... values)` | 根据唯一键查询聚合根 | 唯一键值(按 order 顺序) | 聚合根对象(可能为 null) | ✅ 自动匹配 @AggregateKey 唯一键 |
18
+ | `findByCodes(List<String> codes)` | 根据单字段唯一键列表批量查询 | 唯一键值列表(单字段) | 聚合根列表 | ✅ 仅支持单字段唯一键 |
19
+ | `findByCodes(Collection<Object[]> keys)` | 根据组合唯一键列表批量查询 | 唯一键数组集合(多字段) | 聚合根列表 | ✅ 支持组合唯一键 |
20
+ | `findAll()` | 查询所有聚合根 | 无 | 聚合根列表 | ⚠️ 慎用,数据量大时影响性能 |
21
+ | `save(T entity)` | 保存聚合根 | 聚合根对象 | void | ✅ 自动级联保存/删除子实体<br>✅ 脏检查,只更新变更字段<br>✅ 自动设置子实体外键 |
22
+ | `saveBatch(Collection<T> entities)` | 批量保存聚合根 | 聚合根集合 | void | ✅ 批量优化,减少数据库交互 |
23
+ | `deleteById(ID id)` | 根据主键删除聚合根 | 主键 ID | void | ✅ 自动级联删除 @OneToMany 子实体 |
24
+ | `delete(T entity)` | 删除聚合根 | 聚合根对象 | void | ✅ 自动级联删除子实体 |
25
+ | `existsByCode(Object... values)` | 校验唯一键是否存在 | 唯一键值(按 order 顺序) | boolean | ✅ 自动匹配 @AggregateKey 唯一键 |
26
+ | `existsByCodeExcludeId(ID excludeId, Object... values)` | 校验唯一键是否存在(排除指定ID) | 排除的 ID + 唯一键值 | boolean | ✅ 更新时使用,排除自身 |
27
+
28
+ **关键特性**:
29
+ - ✅ **自动级联**:查询/保存/删除自动处理 @OneToMany 子实体
30
+ - ✅ **脏检查**:save() 时只更新变更的字段
31
+ - ✅ **批量优化**:批量操作减少数据库交互次数
32
+ - ✅ **外键管理**:自动设置子实体的 @AggregateKey 外键
33
+
34
+ ---
35
+
36
+ ## 第二部分:按场景使用指南
37
+
38
+ ### 场景 1:创建聚合根(无子实体)
39
+
40
+ **使用方法**:`save(T entity)`
41
+
42
+ ```java
43
+ // CmdExe 中的核心代码
44
+ if (countryGateway.existsByCode(cmd.getCountryCode())) {
45
+ throw new BusinessException("国家代码已存在");
46
+ }
47
+ Country country = Country.create(cmd.getCountryCode(), cmd.getCountryName());
48
+ countryGateway.save(country); // INSERT 聚合根
49
+ ```
50
+
51
+ **关键点**:
52
+ - ✅ 先用 `existsByCode` 校验唯一性
53
+ - ✅ 调用 Entity 的工厂方法创建聚合根
54
+ - ✅ `save()` 自动执行 INSERT
55
+
56
+ ---
57
+
58
+ ### 场景 2:创建聚合根(带子实体)
59
+
60
+ **使用方法**:`save(T entity)`
61
+
62
+ ```java
63
+ // CmdExe 中的核心代码
64
+ PlatformType platform = PlatformType.create(cmd.getPlatformCode(), cmd.getPlatformName());
65
+ cmd.getSites().forEach(siteCmd ->
66
+ platform.addSite(PlatformSite.create(siteCmd.getCountryCode(), siteCmd.getSiteName()))
67
+ );
68
+ platformGateway.save(platform); // INSERT 聚合根 + 批量 INSERT 子实体
69
+ ```
70
+
71
+ **关键点**:
72
+ - ✅ 通过聚合根的 `addSite()` 方法添加子实体
73
+ - ✅ `save()` 自动级联保存所有子实体
74
+ - ✅ 自动设置子实体的外键(@AggregateKey)
75
+
76
+ ---
77
+
78
+ ### 场景 3:更新聚合根(无子实体)
79
+
80
+ **使用方法**:`findById()` + `save()`
81
+
82
+ ```java
83
+ // CmdExe 中的核心代码
84
+ if (countryGateway.existsByCodeExcludeId(cmd.getCountryId(), cmd.getCountryCode())) {
85
+ throw new BusinessException("国家代码已被其他记录使用");
86
+ }
87
+ Country country = countryGateway.findById(cmd.getCountryId());
88
+ country.update(cmd.getCountryName());
89
+ countryGateway.save(country); // UPDATE 变更的字段
90
+ ```
91
+
92
+ **关键点**:
93
+ - ✅ 先用 `existsByCodeExcludeId` 校验唯一性(排除自身)
94
+ - ✅ 用 `findById` 加载聚合根
95
+ - ✅ 调用 Entity 的业务方法更新
96
+ - ✅ `save()` 自动脏检查,只更新变更字段
97
+
98
+ ---
99
+
100
+ ### 场景 4:更新聚合根(添加子实体)
101
+
102
+ **使用方法**:`findById()` + `save()`
103
+
104
+ ```java
105
+ // CmdExe 中的核心代码
106
+ PlatformType platform = platformGateway.findById(cmd.getPlatformId());
107
+ platform.addSite(PlatformSite.create(cmd.getCountryCode(), cmd.getSiteName()));
108
+ platformGateway.save(platform); // INSERT 新子实体
109
+ ```
110
+
111
+ **关键点**:
112
+ - ✅ 通过聚合根的 `addSite()` 方法添加子实体
113
+ - ✅ `save()` 自动 INSERT 新子实体
114
+ - ✅ 自动设置子实体的外键
115
+
116
+ ---
117
+
118
+ ### 场景 5:更新聚合根(删除子实体)
119
+
120
+ **使用方法**:`findById()` + `save()`
121
+
122
+ ```java
123
+ // CmdExe 中的核心代码
124
+ PlatformType platform = platformGateway.findById(cmd.getPlatformId());
125
+ platform.removeSite(cmd.getSiteId());
126
+ platformGateway.save(platform); // DELETE 移除的子实体(orphanRemoval=true)
127
+ ```
128
+
129
+ **关键点**:
130
+ - ✅ 通过聚合根的 `removeSite()` 方法移除子实体
131
+ - ✅ `save()` 自动 DELETE 从集合中移除的子实体
132
+ - ✅ 需要 @OneToMany 配置 `orphanRemoval=true`
133
+
134
+ ---
135
+
136
+ ### 场景 6:删除聚合根
137
+
138
+ **使用方法**:`deleteById(ID id)` 或 `delete(T entity)`
139
+
140
+ ```java
141
+ // CmdExe 中的核心代码(方式1)
142
+ countryGateway.deleteById(cmd.getCountryId()); // DELETE 聚合根
143
+
144
+ // 方式2:先查询再删除(需要业务校验时)
145
+ Country country = countryGateway.findById(cmd.getCountryId());
146
+ if (country.hasRelatedData()) {
147
+ throw new BusinessException("国家被引用,无法删除");
148
+ }
149
+ countryGateway.delete(country); // DELETE 聚合根
150
+ ```
151
+
152
+ **关键点**:
153
+ - ✅ 如果有 @OneToMany 子实体,自动级联删除
154
+ - ✅ 先删除子实体,再删除聚合根
155
+ - ✅ 方式1更简洁,方式2适合需要业务校验的场景
156
+
157
+ ---
158
+
159
+ ### 场景 7:根据主键查询单个聚合根
160
+
161
+ **使用方法**:`findById(ID id)`
162
+
163
+ ```java
164
+ // CmdExe 中的核心代码
165
+ Country country = countryGateway.findById(cmd.getCountryId());
166
+ if (country == null) {
167
+ throw new BusinessException("国家不存在");
168
+ }
169
+ ```
170
+
171
+ **关键点**:
172
+ - ✅ 返回值可能为 null,需要判空
173
+ - ✅ 如果有 @OneToMany 子实体,自动级联加载
174
+
175
+ ---
176
+
177
+ ### 场景 8:根据唯一键查询单个聚合根
178
+
179
+ **使用方法**:`findByCode(Object... values)`
180
+
181
+ ```java
182
+ // 单字段唯一键
183
+ Country country = countryGateway.findByCode("CN");
184
+
185
+ // 组合唯一键(2个字段)
186
+ // Entity: @AggregateKey(name="uk_tenant_order", order=1) 标注在 tenantId
187
+ // @AggregateKey(name="uk_tenant_order", order=2) 标注在 orderNo
188
+ Order order = orderGateway.findByCode(100L, "ORD-001");
189
+ ```
190
+
191
+ **关键点**:
192
+ - ✅ 参数顺序必须与 @AggregateKey 的 order 一致
193
+ - ✅ 自动根据参数数量匹配对应的唯一键
194
+ - ✅ 返回值可能为 null
195
+
196
+ ---
197
+
198
+ ### 场景 9:根据主键列表批量查询
199
+
200
+ **使用方法**:`findByIds(Collection<ID> ids)`
201
+
202
+ ```java
203
+ // CmdExe 中的核心代码
204
+ List<Integer> countryIds = cmd.getCountryIds();
205
+ List<Country> countries = countryGateway.findByIds(countryIds);
206
+ ```
207
+
208
+ **关键点**:
209
+ - ✅ 返回列表,不会为 null(可能为空列表)
210
+ - ✅ 如果有 @OneToMany 子实体,自动级联加载
211
+
212
+ ---
213
+
214
+ ### 场景 10:根据唯一键列表批量查询(单字段)
215
+
216
+ **使用方法**:`findByCodes(List<String> codes)`
217
+
218
+ ```java
219
+ // CmdExe 中的核心代码
220
+ List<String> countryCodes = List.of("CN", "US", "JP");
221
+ List<Country> countries = countryGateway.findByCodes(countryCodes);
222
+ ```
223
+
224
+ **关键点**:
225
+ - ✅ 仅支持单字段唯一键
226
+ - ✅ 返回列表,不会为 null
227
+
228
+ ---
229
+
230
+ ### 场景 11:根据组合唯一键列表批量查询
231
+
232
+ **使用方法**:`findByCodes(Collection<Object[]> keys)`
233
+
234
+ ```java
235
+ // CmdExe 中的核心代码
236
+ List<Object[]> keys = List.of(
237
+ new Object[]{100L, "ORD-001"},
238
+ new Object[]{100L, "ORD-002"},
239
+ new Object[]{200L, "ORD-001"}
240
+ );
241
+ List<Order> orders = orderGateway.findByCodes(keys);
242
+ ```
243
+
244
+ **关键点**:
245
+ - ✅ 支持组合唯一键
246
+ - ✅ 每个数组的元素顺序必须与 @AggregateKey 的 order 一致
247
+
248
+ ---
249
+
250
+ ### 场景 12:查询所有聚合根
251
+
252
+ **使用方法**:`findAll()`
253
+
254
+ ```java
255
+ // CmdExe 中的核心代码
256
+ List<Country> allCountries = countryGateway.findAll();
257
+ ```
258
+
259
+ **关键点**:
260
+ - ⚠️ 慎用,数据量大时影响性能
261
+ - ✅ 如果有 @OneToMany 子实体,自动级联加载
262
+ - ✅ 适用于配置类数据(如国家、币种等)
263
+
264
+ ---
265
+
266
+ ### 场景 13:批量保存聚合根
267
+
268
+ **使用方法**:`saveBatch(Collection<T> entities)`
269
+
270
+ ```java
271
+ // CmdExe 中的核心代码
272
+ List<Country> countries = cmd.getCountries().stream()
273
+ .map(c -> Country.create(c.getCode(), c.getName()))
274
+ .toList();
275
+ countryGateway.saveBatch(countries);
276
+ ```
277
+
278
+ **关键点**:
279
+ - ✅ 批量优化,减少数据库交互次数
280
+ - ✅ 适用于批量导入场景
281
+
282
+ ---
283
+
284
+ ### 场景 14:创建时校验唯一性(单字段)
285
+
286
+ **使用方法**:`existsByCode(Object... values)`
287
+
288
+ ```java
289
+ // CmdExe 中的核心代码
290
+ if (countryGateway.existsByCode(cmd.getCountryCode())) {
291
+ throw new BusinessException("国家代码已存在");
292
+ }
293
+ ```
294
+
295
+ **关键点**:
296
+ - ✅ 自动匹配 @AggregateKey 唯一键
297
+ - ✅ 返回 true 表示已存在
298
+
299
+ ---
300
+
301
+ ### 场景 15:创建时校验唯一性(组合键)
302
+
303
+ **使用方法**:`existsByCode(Object... values)`
304
+
305
+ ```java
306
+ // CmdExe 中的核心代码
307
+ // Entity: @AggregateKey(name="uk_tenant_order", order=1) 标注在 tenantId
308
+ // @AggregateKey(name="uk_tenant_order", order=2) 标注在 orderNo
309
+ if (orderGateway.existsByCode(cmd.getTenantId(), cmd.getOrderNo())) {
310
+ throw new BusinessException("订单号已存在");
311
+ }
312
+ ```
313
+
314
+ **关键点**:
315
+ - ✅ 参数顺序必须与 @AggregateKey 的 order 一致
316
+ - ✅ 自动根据参数数量匹配对应的唯一键
317
+
318
+ ---
319
+
320
+ ### 场景 16:更新时校验唯一性(单字段)
321
+
322
+ **使用方法**:`existsByCodeExcludeId(ID excludeId, Object... values)`
323
+
324
+ ```java
325
+ // CmdExe 中的核心代码
326
+ if (countryGateway.existsByCodeExcludeId(cmd.getCountryId(), cmd.getCountryCode())) {
327
+ throw new BusinessException("国家代码已被其他记录使用");
328
+ }
329
+ ```
330
+
331
+ **关键点**:
332
+ - ✅ 第1个参数是要排除的 ID
333
+ - ✅ 后面参数是唯一键值
334
+ - ✅ 排除自身,只检查其他记录
335
+
336
+ ---
337
+
338
+ ### 场景 17:更新时校验唯一性(组合键)
339
+
340
+ **使用方法**:`existsByCodeExcludeId(ID excludeId, Object... values)`
341
+
342
+ ```java
343
+ // CmdExe 中的核心代码
344
+ if (orderGateway.existsByCodeExcludeId(cmd.getOrderId(), cmd.getTenantId(), cmd.getOrderNo())) {
345
+ throw new BusinessException("订单号已被其他记录使用");
346
+ }
347
+ ```
348
+
349
+ **关键点**:
350
+ - ✅ 第1个参数是要排除的 ID
351
+ - ✅ 后面参数按 @AggregateKey 的 order 顺序
352
+
353
+ ---
354
+
355
+ ## 第三部分:何时需要自定义方法
356
+
357
+ ### 决策指南
358
+
359
+ ✅ **无需自定义方法的场景**(直接使用继承的 12 个方法):
360
+ - 根据主键查询/删除
361
+ - 根据唯一键查询/校验
362
+ - 批量查询(根据主键或唯一键)
363
+ - 整存整取(保存聚合根 + 子实体)
364
+
365
+ ⚠️ **需要自定义方法的场景**:
366
+ - 根据非唯一键字段查询(如根据状态、类型等)
367
+ - 跨子实体查询(如查询聚合根下的某个子实体)
368
+ - 复杂条件查询(如多条件组合、分页、排序)
369
+ - 业务规则校验(如检查是否存在关联数据)
370
+ - 统计查询(如计数、求和等)
371
+
372
+ ---
373
+
374
+ ### 自定义示例 1:根据非唯一键字段查询
375
+
376
+ **场景**:查询指定状态的国家列表
377
+
378
+ ```java
379
+ // Gateway 接口
380
+ public interface CountryGateway extends BaseGateway<Country, Integer> {
381
+ List<Country> findByStatus(StatusEnum status);
382
+ }
383
+
384
+ // GatewayImpl 实现
385
+ @Component
386
+ public class CountryGatewayImpl extends AbstractAggregateRepository<Country, Integer>
387
+ implements CountryGateway {
388
+
389
+ @Override
390
+ public List<Country> findByStatus(StatusEnum status) {
391
+ return selectList(Wrappers.lambdaQuery(Country.class)
392
+ .eq(Country::getStatus, status));
393
+ }
394
+ }
395
+
396
+ // CmdExe 使用
397
+ List<Country> activeCountries = countryGateway.findByStatus(StatusEnum.ENABLE);
398
+ ```
399
+
400
+ ---
401
+
402
+ ### 自定义示例 2:跨子实体查询
403
+
404
+ **场景**:查询平台类型下的所有站点
405
+
406
+ ```java
407
+ // Gateway 接口
408
+ public interface PlatformGateway extends BaseGateway<PlatformType, Integer> {
409
+ List<PlatformSite> findSitesByPlatformId(Integer platformTypeId);
410
+ }
411
+
412
+ // GatewayImpl 实现
413
+ @Component
414
+ public class PlatformGatewayImpl extends AbstractAggregateRepository<PlatformType, Integer>
415
+ implements PlatformGateway {
416
+
417
+ @Override
418
+ public List<PlatformSite> findSitesByPlatformId(Integer platformTypeId) {
419
+ return MapperDb.selectList(PlatformSite.class,
420
+ Wrappers.lambdaQuery(PlatformSite.class)
421
+ .eq(PlatformSite::getPlatformTypeId, platformTypeId));
422
+ }
423
+ }
424
+
425
+ // CmdExe 使用
426
+ List<PlatformSite> sites = platformGateway.findSitesByPlatformId(1);
427
+ ```
428
+
429
+ ---
430
+
431
+ ### 自定义示例 3:业务规则校验
432
+
433
+ **场景**:检查平台类型下是否存在指定国家的站点
434
+
435
+ ```java
436
+ // Gateway 接口
437
+ public interface PlatformGateway extends BaseGateway<PlatformType, Integer> {
438
+ boolean existsSiteByPlatformAndCountry(Integer platformTypeId, Integer countryId);
439
+ }
440
+
441
+ // GatewayImpl 实现
442
+ @Component
443
+ public class PlatformGatewayImpl extends AbstractAggregateRepository<PlatformType, Integer>
444
+ implements PlatformGateway {
445
+
446
+ @Override
447
+ public boolean existsSiteByPlatformAndCountry(Integer platformTypeId, Integer countryId) {
448
+ return MapperDb.selectCount(PlatformSite.class,
449
+ Wrappers.lambdaQuery(PlatformSite.class)
450
+ .eq(PlatformSite::getPlatformTypeId, platformTypeId)
451
+ .eq(PlatformSite::getCountryId, countryId)) > 0;
452
+ }
453
+ }
454
+
455
+ // CmdExe 使用
456
+ if (platformGateway.existsSiteByPlatformAndCountry(1, 100)) {
457
+ throw new BusinessException("该平台已存在该国家的站点");
458
+ }
459
+ ```
460
+
461
+ ---
462
+
463
+ ### 自定义示例 4:复杂条件查询(多条件组合)
464
+
465
+ **场景**:根据多个条件查询国家列表
466
+
467
+ ```java
468
+ // Gateway 接口
469
+ public interface CountryGateway extends BaseGateway<Country, Integer> {
470
+ List<Country> findByConditions(CountryQueryParam param);
471
+ }
472
+
473
+ // GatewayImpl 实现
474
+ @Component
475
+ public class CountryGatewayImpl extends AbstractAggregateRepository<Country, Integer>
476
+ implements CountryGateway {
477
+
478
+ @Override
479
+ public List<Country> findByConditions(CountryQueryParam param) {
480
+ return selectList(Wrappers.lambdaQuery(Country.class)
481
+ .like(StringUtils.isNotBlank(param.getCountryName()),
482
+ Country::getCountryName, param.getCountryName())
483
+ .eq(param.getStatus() != null,
484
+ Country::getStatus, param.getStatus())
485
+ .orderByDesc(Country::getCreateTime));
486
+ }
487
+ }
488
+
489
+ // CmdExe 使用
490
+ CountryQueryParam param = new CountryQueryParam();
491
+ param.setCountryName("中国");
492
+ param.setStatus(StatusEnum.ENABLE);
493
+ List<Country> countries = countryGateway.findByConditions(param);
494
+ ```
495
+
496
+ **关键点**:
497
+ - ✅ 参数 ≥3 个时,使用 Param 对象封装
498
+ - ✅ 使用条件构造器实现动态查询
499
+ - ✅ 参数详见:`domain/entity/examples/method-design.md`
500
+
501
+ ---
502
+
503
+ ### 自定义示例 5:统计查询
504
+
505
+ **场景**:统计指定状态的国家数量
506
+
507
+ ```java
508
+ // Gateway 接口
509
+ public interface CountryGateway extends BaseGateway<Country, Integer> {
510
+ long countByStatus(StatusEnum status);
511
+ }
512
+
513
+ // GatewayImpl 实现
514
+ @Component
515
+ public class CountryGatewayImpl extends AbstractAggregateRepository<Country, Integer>
516
+ implements CountryGateway {
517
+
518
+ @Override
519
+ public long countByStatus(StatusEnum status) {
520
+ return selectCount(Wrappers.lambdaQuery(Country.class)
521
+ .eq(Country::getStatus, status));
522
+ }
523
+ }
524
+
525
+ // CmdExe 使用
526
+ long activeCount = countryGateway.countByStatus(StatusEnum.ENABLE);
527
+ ```
528
+
529
+ ---
530
+
531
+ ## 相关文档
532
+
533
+ - Gateway 接口编写规范:[../SKILL.md](../SKILL.md)
534
+ - GatewayImpl 实现规范:[../../../infrastructure/gatewayimpl/SKILL.md](../../../infrastructure/gatewayimpl/SKILL.md)
535
+ - 自动级联原理详解:[../../../infrastructure/gatewayimpl/examples/cascade-mechanism.md](../../../infrastructure/gatewayimpl/examples/cascade-mechanism.md)
536
+ - Domain 方法参数规范:[../../entity/examples/method-design.md](../../entity/examples/method-design.md)